UNPKG

armisa-models

Version:
48 lines (47 loc) 2.35 kB
"use strict"; var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; var _BaseSelfControl_hidden; Object.defineProperty(exports, "__esModule", { value: true }); exports.BaseSelfControl = void 0; class BaseSelfControl { constructor() { this.required = false; this.isTypedIncorrectChar = false; _BaseSelfControl_hidden.set(this, false); this.validation = true; this.restartValidation = () => { this.validation = true; }; this.initializeProperties = false; this.initializeListener = false; this._hasChange = false; } get hidden() { return __classPrivateFieldGet(this, _BaseSelfControl_hidden, "f"); } set hidden(value) { const oldValue = value; __classPrivateFieldSet(this, _BaseSelfControl_hidden, value, "f"); if (!__classPrivateFieldGet(this, _BaseSelfControl_hidden, "f") && __classPrivateFieldGet(this, _BaseSelfControl_hidden, "f") !== oldValue && typeof this.validation !== 'boolean') { this.validate(); } } get hasChange() { return this._hasChange; } set hasChange(value) { this._hasChange = value; } } exports.BaseSelfControl = BaseSelfControl; _BaseSelfControl_hidden = new WeakMap();