"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ControlDropDownValue = exports.BasicEntryFormControl = exports.BasicEntryForm = exports.EnumDefaultValidatorType = exports.EnumDynamicControlType = void 0; var EnumDynamicControlType; (function (EnumDynamicControlType) { EnumDynamicControlType[EnumDynamicControlType["Lebel"] = 0] = "Lebel"; EnumDynamicControlType[EnumDynamicControlType["TextBox"] = 1] = "TextBox"; EnumDynamicControlType[EnumDynamicControlType["DropDownEnumData"] = 2] = "DropDownEnumData"; EnumDynamicControlType[EnumDynamicControlType["DropDownServerData"] = 3] = "DropDownServerData"; EnumDynamicControlType[EnumDynamicControlType["CheckBox"] = 4] = "CheckBox"; EnumDynamicControlType[EnumDynamicControlType["DateTime"] = 5] = "DateTime"; EnumDynamicControlType[EnumDynamicControlType["NumText"] = 6] = "NumText"; EnumDynamicControlType[EnumDynamicControlType["IntNumText"] = 7] = "IntNumText"; })(EnumDynamicControlType || (exports.EnumDynamicControlType = EnumDynamicControlType = {})); var EnumDefaultValidatorType; (function (EnumDefaultValidatorType) { EnumDefaultValidatorType[EnumDefaultValidatorType["Email"] = 0] = "Email"; EnumDefaultValidatorType[EnumDefaultValidatorType["Password"] = 1] = "Password"; EnumDefaultValidatorType[EnumDefaultValidatorType["ConfirmPassword"] = 2] = "ConfirmPassword"; EnumDefaultValidatorType[EnumDefaultValidatorType["Mobile"] = 3] = "Mobile"; EnumDefaultValidatorType[EnumDefaultValidatorType["FromDateToDate"] = 4] = "FromDateToDate"; EnumDefaultValidatorType[EnumDefaultValidatorType["ServerSideValidator"] = 5] = "ServerSideValidator"; EnumDefaultValidatorType[EnumDefaultValidatorType["Custom"] = 6] = "Custom"; })(EnumDefaultValidatorType || (exports.EnumDefaultValidatorType = EnumDefaultValidatorType = {})); var BasicEntryForm = /** @class */ (function () { function BasicEntryForm() { this.formHeight = undefined; this.controls = []; this.iDValue = 0; this.isNew = true; this.parentID = -1; this.treeTier = 1; } BasicEntryForm.prototype.AddControl = function (Label, PropertyName, ControlType, DropDownValue, Required, DefaultValidationType, Max, Min, readonly, CustomValidation, ServerValidation) { var item = new BasicEntryFormControl(Label, PropertyName, ControlType, DropDownValue, Required, DefaultValidationType, Max, Min, readonly, CustomValidation, ServerValidation); debugger; //this.controls.push(new BasicEntryFormControl(Label, PropertyName, ControlType, DropDownValue, Required, DefaultValidationType, // Max, Min, readonly, CustomValidation, ServerValidation)); var controlID = this.controls.length.toString(); controlID = controlID + ControlType.toString(); item.controlID = controlID; this.controls.push(item); return item; }; return BasicEntryForm; }()); exports.BasicEntryForm = BasicEntryForm; var BasicEntryFormControl = /** @class */ (function () { function BasicEntryFormControl(Label, PropertyName, ControlType, DropDownValue, Required, DefaultValidationType, Max, Min, readonly, CustomValidation, ServerValidation) { this.isNew = true; this.readOnly = false; this.codeAutoGenerate = false; this.dropDownValues = []; this.propertyName = PropertyName; this.label = Label; this.controlType = ControlType; if (Required == undefined) { this.required = false; } else { this.required = Required; } if (DropDownValue != undefined) { this.dropdownValue = DropDownValue.split('|'); if (this.controlType == EnumDynamicControlType.DropDownEnumData) { for (var i = 0; i < this.dropdownValue.length; i++) { var spitedvalue; spitedvalue = this.dropdownValue[i].split(':'); if (spitedvalue.length == 2) { var drpValue = new ControlDropDownValue(Number(spitedvalue[1]), spitedvalue[0]); this.dropDownValues.push(drpValue); } } } } this.max = Max; this.min = Min; this.readOnly = readonly; if (this.readOnly == true) { this.required = false; } this.defaultValidationType = DefaultValidationType; this.customValidation = CustomValidation; this.serverValidation = ServerValidation; } return BasicEntryFormControl; }()); exports.BasicEntryFormControl = BasicEntryFormControl; var ControlDropDownValue = /** @class */ (function () { function ControlDropDownValue(keyvalue, datavalue) { this.keyValue = Number(keyvalue); this.dataValue = datavalue; } return ControlDropDownValue; }()); exports.ControlDropDownValue = ControlDropDownValue; //# sourceMappingURL=Basic-Entry-form.js.map