amisa-forms
Version:
models of armisa!
48 lines (47 loc) • 2.85 kB
JavaScript
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 __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 _BaseElementFactory_formFactory;
export var EnumValidateState;
(function (EnumValidateState) {
EnumValidateState[EnumValidateState["none"] = 0] = "none";
EnumValidateState[EnumValidateState["valid"] = 1] = "valid";
EnumValidateState[EnumValidateState["minValue"] = 2] = "minValue";
EnumValidateState[EnumValidateState["maxValue"] = 3] = "maxValue";
EnumValidateState[EnumValidateState["invalidValue"] = 4] = "invalidValue";
EnumValidateState[EnumValidateState["minLength"] = 5] = "minLength";
EnumValidateState[EnumValidateState["maxLength"] = 6] = "maxLength";
EnumValidateState[EnumValidateState["newCode"] = 7] = "newCode";
EnumValidateState[EnumValidateState["withoutParent"] = 8] = "withoutParent";
EnumValidateState[EnumValidateState["invalidLength"] = 9] = "invalidLength";
EnumValidateState[EnumValidateState["hasChildren"] = 10] = "hasChildren";
EnumValidateState[EnumValidateState["empty"] = 11] = "empty";
})(EnumValidateState || (EnumValidateState = {}));
export class BaseElementFactory {
constructor(formFactory, factoryFieldName, dispose, payLoadKey, responseKey) {
_BaseElementFactory_formFactory.set(this, void 0);
this.dispose = dispose;
__classPrivateFieldSet(this, _BaseElementFactory_formFactory, formFactory, "f");
this.factoryFieldName = factoryFieldName;
this.payLoadKey = payLoadKey;
this.responseKey = responseKey;
this.disabled = false;
this.hidden = false;
this.formFactory.addPayloadElement(this);
}
get any() {
return this;
}
get formFactory() {
return __classPrivateFieldGet(this, _BaseElementFactory_formFactory, "f");
}
}
_BaseElementFactory_formFactory = new WeakMap();