/*
 * Copyright (C) 2016-2020 Kano Computing Ltd.
 * License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
 */
export class PartEditorField {
    constructor(component, key) {
        this._component = component;
        this._key = key;
    }
    static get propertyType() {
        return null;
    }
    getDOM() {
        return this._el;
    }
    getFullKeyName() {
        return this._key.replace(/([a-z])([A-Z]+)/g, '$1 $2').replace(/\b\w/g, l => l.toUpperCase());
    }
    getValue() {
        return this._component[this._key];
    }
    setValue(v) {
        this._component[this._key] = v;
    }
    dispose() {
        if (this._el && this._el.parentNode) {
            this._el.parentNode.removeChild(this._el);
        }
    }
}
//# sourceMappingURL=field.js.map