core icon indicating copy to clipboard operation
core copied to clipboard

Property '_animationState' is private and only accessible within class 'MatKeyboardContainerComponent'

Open alxpsr opened this issue 6 years ago • 3 comments

Package version: 0.1.1

If set "fullTemplateCheck": "true" in tsconfig.json i will got an error Property '_animationState' is private and only accessible within class 'MatKeyboardContainerComponent'

Problem is here:

// ngx-material-keyboard\src\core\src\components\keyboard-container\keyboard-container.component.ts

@HostBinding('@state')
private _animationState: KeyboardAnimationState = KeyboardAnimationState.Void;

This HostBinder used outside of MatKeyboardContainerComponent

alxpsr avatar Oct 18 '19 08:10 alxpsr

Hello everyone, same problem here. I am using angular 8. Any idea on how to fix it?

stebigs avatar Jan 14 '20 12:01 stebigs

apply this patch

const fs = require('fs');
const path = require('path');
const PATH_TO_FILE = path.join(__dirname, '../../node_modules/@ngx-material-keyboard/core/components/keyboard-container/keyboard-container.component.d.ts');

fs.readFile(PATH_TO_FILE, 'utf8', (err, data) => {
    if (err) {
        console.error(err);
        return;
    }

    const result = data.replace('private _animationState', 'public _animationState');

    fs.writeFile(PATH_TO_FILE, result, (err) => {
        if (err) {
            console.error('PATCH FAIL', err);
            return;
        }

        console.info('PATCH SUCCESS');
    });
})

alxpsr avatar Jan 14 '20 13:01 alxpsr

Is there a chance that this problem will be fixed in lib code? Identical problem is with methods _showKeyboard and _hideKeyboard.

Thx in advance.

mgierw avatar Aug 14 '20 13:08 mgierw