1 | {"version":3,"file":"eclat-form.umd.js","sources":["../../../../node_modules/tslib/tslib.es6.js","ng://@eclat/form/lib/contracts/form-config.ts","ng://@eclat/form/lib/form-utility.ts","ng://@eclat/form/lib/abstract-control.ts","ng://@eclat/form/lib/form-models.ts","ng://@eclat/form/lib/directives/eclat-form.directive.ts","ng://@eclat/form/lib/directives/eclat-form-container.directive.ts","ng://@eclat/form/lib/directives/eclat-form-error.directive.ts","ng://@eclat/form/lib/directives/group/eclat-form-group.directive.ts","ng://@eclat/form/lib/directives/group/eclat-form-group-name.directive.ts","ng://@eclat/form/lib/directives/array/eclat-form-array-name.directive.ts","ng://@eclat/form/lib/directives/array/eclat-form-array.directive.ts","ng://@eclat/form/lib/directives/array/eclat-form-array-children.directive.ts","ng://@eclat/form/lib/directives/eclat-form-submit.directive.ts","ng://@eclat/form/lib/directives/array/eclat-form-array-add.directive.ts","ng://@eclat/form/lib/directives/eclat-form-value.directive.ts","ng://@eclat/form/lib/directives/binder/eclat-form-group-binder.directive.ts","ng://@eclat/form/lib/directives/binder/eclat-form-group-name-binder.directive.ts","ng://@eclat/form/lib/directives/binder/eclat-form-array-name-binder.directive.ts","ng://@eclat/form/lib/directives/array/eclat-form-array-remove.directive.ts","ng://@eclat/form/lib/form-module.ts"],"sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { EclatFormRule } from '../abstract-control';\r\n\r\nexport type ControlRuleConfig<T> =\r\n EclatFormControlConfig<T>\r\n | (T extends any[] ? EclatFormArrayConfig<T> : EclatFormGroupConfig<T>)\r\n\r\nexport type EclatFormControlConfig<T> = EclatFormRule<T>[];\r\n\r\nexport interface EclatFormGroupConfig<T> {\r\n controlsRules: { [P in keyof T]: ControlRuleConfig<T[P]> };\r\n rules?: EclatFormControlConfig<T>;\r\n}\r\n\r\nexport interface EclatFormArrayConfig<T extends any[]> {\r\n controlConfig: ControlRuleConfig<T[0]>;\r\n rules?: EclatFormControlConfig<T>;\r\n}\r\n\r\nexport class EclatRecursiveConfig {\r\n}\r\n\r\nexport type RecursiveControlRuleConfig<T> =\r\n EclatFormControlConfig<T>\r\n | (T extends any[] ? EclatRecursiveFormArrayConfig<T> : EclatRecursiveFormGroupConfig<T>)\r\n\r\nexport interface EclatRecursiveFormGroupConfig<T> {\r\n controlsRules: { [P in keyof T]: RecursiveControlRuleConfig<T[P]> };\r\n rules?: EclatFormControlConfig<T>;\r\n}\r\n\r\nexport interface EclatRecursiveFormArrayConfig<T extends any[]> {\r\n controlConfig: RecursiveControlRuleConfig<T[0]> | EclatRecursiveConfig;\r\n rules?: EclatFormControlConfig<T>;\r\n}\r\n","import {\r\n EclatFormArrayConfig,\r\n EclatFormControlConfig,\r\n EclatFormGroupConfig,\r\n EclatRecursiveConfig,\r\n EclatRecursiveFormGroupConfig,\r\n} from './contracts/form-config';\r\n\r\nexport namespace EclatFormUtility {\r\n export function isEclatFormControlConfig<T>(\r\n eclatForm: EclatFormControlConfig<T> | EclatFormGroupConfig<any> | EclatFormArrayConfig<any>,\r\n ): eclatForm is EclatFormControlConfig<T> {\r\n if (Array.isArray(eclatForm)) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n export function isEclatFormGroupConfig<T>(\r\n eclatForm: EclatFormGroupConfig<T> | EclatFormControlConfig<any> | EclatFormArrayConfig<any>,\r\n ): eclatForm is EclatFormGroupConfig<T> {\r\n if ((<EclatFormGroupConfig<T>>eclatForm).controlsRules) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n export function isEclatFormArrayConfig<T extends any[]>(\r\n eclatForm: EclatFormGroupConfig<any> | EclatFormControlConfig<any> | EclatFormArrayConfig<T>,\r\n ): eclatForm is EclatFormArrayConfig<T> {\r\n if ((<EclatFormArrayConfig<T>>eclatForm).controlConfig) {\r\n return true;\r\n }\r\n\r\n return false;\r\n }\r\n\r\n export function eclatRecursiveTransformer<T>(data: EclatRecursiveFormGroupConfig<T>): EclatFormGroupConfig<T> {\r\n const path = recursivePathFinder(data);\r\n if (!path) {\r\n throw Error();\r\n }\r\n const paths: string[] = path.split('.');\r\n const latestPath = <any>paths.pop();\r\n\r\n paths.reduce(\r\n (acc, cur) => {\r\n return acc[cur];\r\n },\r\n data as any,\r\n )[latestPath] = data;\r\n\r\n return <any>data;\r\n }\r\n}\r\n\r\nfunction recursivePathFinder(data: any, path: string | null = null): string | null {\r\n if (data instanceof EclatRecursiveConfig) {\r\n return '';\r\n }\r\n if (Array.isArray(data)) {\r\n let found: string | null = null;\r\n\r\n data.some(\r\n (value, key) => {\r\n const temp = recursivePathFinder(value, path);\r\n if (temp !== null) {\r\n if (temp) {\r\n found = key + '.' + temp;\r\n } else {\r\n found = key.toString();\r\n }\r\n }\r\n return !!found;\r\n },\r\n );\r\n\r\n return found;\r\n }\r\n if (data === Object(data)) {\r\n let found: string | null = null;\r\n\r\n Object.entries(data).some(\r\n ([key, value]) => {\r\n const temp = recursivePathFinder(value, path);\r\n if (temp !== null) {\r\n if (temp) {\r\n found = key + '.' + temp;\r\n } else {\r\n found = key;\r\n }\r\n }\r\n return !!found;\r\n },\r\n );\r\n return found;\r\n }\r\n\r\n return null;\r\n}\r\n","import { AbstractControl, AsyncValidatorFn, ValidatorFn } from '@angular/forms';\r\nimport { Observable } from 'rxjs';\r\n\r\nexport interface EclatErrorMapping<T> {\r\n [key: string]: string | string[] | ((control: AbstractEclatFormControl<T>) => string | string[]);\r\n}\r\n\r\nexport interface EclatFormRule<T> {\r\n key: string;\r\n message: string | string[] | ((control: AbstractEclatFormControl<T>) => string | string[]);\r\n validator?: ValidatorFn;\r\n asyncValidator?: AsyncValidatorFn;\r\n}\r\n\r\nexport abstract class AbstractEclatFormControl<T, C extends AbstractControl = AbstractControl> {\r\n public control: C;\r\n protected asyncValidators: AsyncValidatorFn[];\r\n protected validators: ValidatorFn[];\r\n private readonly rules: EclatErrorMapping<T>;\r\n\r\n constructor(rules?: EclatFormRule<T>[]) {\r\n const validators: ValidatorFn[] = [];\r\n const asyncValidators: AsyncValidatorFn[] = [];\r\n const errorMapping: EclatErrorMapping<T> = {};\r\n\r\n if (rules) {\r\n rules.forEach(({ validator, asyncValidator, key, message }) => {\r\n errorMapping[key] = message;\r\n if (validator) {\r\n validators.push(validator);\r\n }\r\n if (asyncValidator) {\r\n asyncValidators.push(asyncValidator);\r\n }\r\n });\r\n }\r\n\r\n this.rules = errorMapping;\r\n this.validators = validators;\r\n this.asyncValidators = asyncValidators;\r\n }\r\n\r\n get errorMessages(): string[] {\r\n if (!this.control.errors) {\r\n return [];\r\n }\r\n\r\n return Object.entries(this.control.errors).reduce(\r\n (acc, [key, value]) => {\r\n if (value) {\r\n const temp = this.rules[key];\r\n const errors = typeof temp === 'function' ? temp(this) : temp;\r\n\r\n if (Array.isArray(errors)) {\r\n acc.push(...errors);\r\n }\r\n else {\r\n acc.push(errors);\r\n }\r\n }\r\n\r\n return acc;\r\n },\r\n <string[]>[],\r\n );\r\n }\r\n\r\n get value(): T {\r\n return this.control.value;\r\n }\r\n\r\n get valid(): boolean {\r\n return this.control.valid;\r\n }\r\n\r\n get valueChanges(): Observable<T> {\r\n return this.control.valueChanges;\r\n }\r\n\r\n public disable(isDisabled: boolean = true, opts?: {\r\n onlySelf?: boolean;\r\n emitEvent?: boolean;\r\n }): void {\r\n if (isDisabled) {\r\n this.control.disable(opts);\r\n } else {\r\n this.control.enable(opts);\r\n }\r\n }\r\n\r\n public abstract patchState(data: T, emitEvent?: boolean): void;\r\n\r\n public abstract resetState(data: T, emitEvent?: boolean): void;\r\n}\r\n","import { FormArray, FormControl, FormGroup } from '@angular/forms';\r\nimport {\r\n ControlRuleConfig,\r\n EclatFormArrayConfig,\r\n EclatFormControlConfig,\r\n EclatFormGroupConfig,\r\n} from './contracts/form-config';\r\nimport { EclatFormUtility } from './form-utility';\r\nimport { AbstractEclatFormControl } from './abstract-control';\r\n\r\nexport type EclatFormChild<T> = T extends any[]\r\n ? EclatFormArray<T>\r\n : T extends Date | String | RegExp ? EclatFormControl<T>\r\n : T extends object ? EclatFormGroup<T> : EclatFormControl<T>;\r\n\r\nexport function getEclatControl(config: any, data?: any): AbstractEclatFormControl<any> | null {\r\n if (EclatFormUtility.isEclatFormControlConfig(config)) {\r\n return new EclatFormControl(config, data);\r\n }\r\n if (EclatFormUtility.isEclatFormGroupConfig(config)) {\r\n return new EclatFormGroup(config, data);\r\n }\r\n if (EclatFormUtility.isEclatFormArrayConfig(config)) {\r\n return new EclatFormArray(config, data);\r\n }\r\n\r\n return null;\r\n}\r\n\r\nexport class EclatFormControl<T> extends AbstractEclatFormControl<T,\r\n FormControl> {\r\n constructor(config: EclatFormControlConfig<T>, initialData?: T) {\r\n super(config);\r\n this.control = new FormControl(null, this.validators, this.asyncValidators);\r\n\r\n if (initialData) {\r\n this.resetState(initialData);\r\n }\r\n }\r\n\r\n public patchState(data: T, emitEvent: boolean = true): void {\r\n this.control.patchValue(data, { emitEvent });\r\n }\r\n\r\n public resetState(data: T, emitEvent: boolean = true): void {\r\n this.control.reset(data, { emitEvent });\r\n }\r\n}\r\n\r\nexport class EclatFormGroup<T> extends AbstractEclatFormControl<T, FormGroup> {\r\n public children: { [P in keyof T]: EclatFormChild<T[P]> };\r\n\r\n constructor(dfg: EclatFormGroupConfig<T>, initialData?: T) {\r\n super(dfg.rules);\r\n const children: any = {};\r\n const controls: any = {};\r\n\r\n Object.keys(dfg.controlsRules).forEach((key: string) => {\r\n const value: ControlRuleConfig<any> = dfg.controlsRules[<keyof T>key];\r\n const eclatControl = getEclatControl(value);\r\n\r\n if (eclatControl) {\r\n children[key] = eclatControl;\r\n controls[key] = eclatControl.control;\r\n }\r\n });\r\n\r\n this.control = new FormGroup(controls, this.validators, this.asyncValidators);\r\n this.children = children;\r\n\r\n if (initialData) {\r\n this.resetState(initialData);\r\n }\r\n }\r\n\r\n public patchState(data: T, emitEvent: boolean = true): void {\r\n if (!data) {\r\n console.warn(`Expect an object, but ${data} is given`);\r\n return;\r\n }\r\n\r\n Object.entries(data).forEach(([key, value]) => {\r\n if (this.children[key as keyof T]) {\r\n this.children[key as keyof T].patchState(value, false);\r\n }\r\n });\r\n this.control.patchValue({}, {emitEvent});\r\n }\r\n\r\n public resetState(data: T, emitEvent: boolean = true): void {\r\n if (!data) {\r\n console.warn(`Expect an object, but ${data} is given`);\r\n return;\r\n }\r\n\r\n Object.entries(data).forEach(([key, value]) => {\r\n if (this.children[key as keyof T]) {\r\n this.children[key as keyof T].resetState(value, false);\r\n }\r\n });\r\n this.control.reset(undefined, {emitEvent});\r\n }\r\n\r\n public getChild<P extends keyof T>(key: P): EclatFormChild<T[P]> {\r\n return this.children[key];\r\n }\r\n\r\n private addChild(\r\n key: keyof T & string,\r\n config: ControlRuleConfig<T>,\r\n data: T,\r\n ): void {\r\n const eclatControl = getEclatControl(config);\r\n\r\n if (eclatControl) {\r\n eclatControl.resetState(data);\r\n\r\n this.children[key] = eclatControl as EclatFormChild<T[typeof key]>;\r\n this.control.addControl(key, this.children[key].control);\r\n }\r\n }\r\n\r\n private removeChild(key: keyof T & string): void {\r\n delete this.children[key];\r\n this.control.removeControl(key);\r\n }\r\n}\r\n\r\nexport class EclatFormArray<T extends any[]> extends AbstractEclatFormControl<T,\r\n FormArray> {\r\n public children: EclatFormChild<T[0]>[];\r\n private childConfig: ControlRuleConfig<T[0]>;\r\n\r\n constructor(dfa: EclatFormArrayConfig<T>, initialData?: T) {\r\n super(dfa.rules);\r\n\r\n this.control = new FormArray([], this.validators, this.asyncValidators);\r\n this.childConfig = dfa.controlConfig;\r\n this.children = [];\r\n\r\n if (initialData) {\r\n this.resetState(initialData);\r\n }\r\n }\r\n\r\n public addChild(data?: Partial<T[0]>): void {\r\n const eclatControl = getEclatControl(this.childConfig);\r\n if (eclatControl) {\r\n eclatControl.resetState(data);\r\n\r\n this.children.push(eclatControl as EclatFormChild<T[0]>);\r\n this.control.push(eclatControl.control);\r\n }\r\n }\r\n\r\n public removeChild(index: number): void {\r\n this.children.splice(index, 1);\r\n this.control.removeAt(index);\r\n }\r\n\r\n public patchState(data: T, emitEvent: boolean = true): void {\r\n if (!data) {\r\n console.warn(`Expect an array, but ${data} is given`);\r\n return;\r\n }\r\n\r\n this.control.controls = [];\r\n this.children = [];\r\n\r\n data.forEach(d => {\r\n const eclatControl = getEclatControl(this.childConfig);\r\n if (eclatControl) {\r\n eclatControl.patchState(d, false);\r\n\r\n this.children.push(eclatControl as EclatFormChild<T[0]>);\r\n this.control.push(eclatControl.control);\r\n }\r\n });\r\n this.control.patchValue([], { emitEvent });\r\n }\r\n\r\n public resetState(data: T, emitEvent: boolean = true): void {\r\n if (!data) {\r\n console.warn(`Expect an array, but ${data} is given`);\r\n return;\r\n }\r\n\r\n this.control.controls = [];\r\n this.children = [];\r\n\r\n data.forEach(d => {\r\n const eclatControl = getEclatControl(this.childConfig);\r\n if (eclatControl) {\r\n eclatControl.resetState(d, false);\r\n\r\n this.children.push(eclatControl as EclatFormChild<T[0]>);\r\n this.control.push(eclatControl.control);\r\n }\r\n });\r\n this.control.reset(undefined, { emitEvent });\r\n }\r\n\r\n public getChild(index: number): EclatFormChild<T[0]> {\r\n return this.children[index];\r\n }\r\n}\r\n","import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';\r\nimport { EclatFormState } from '../contracts/form-state';\r\nimport { AbstractEclatFormControl } from '../abstract-control';\r\nimport { getEclatControl } from '../form-models';\r\n\r\nexport class EclatFormContext<T> {\r\n constructor(public $implicit: AbstractEclatFormControl<T>) {\r\n }\r\n}\r\n\r\n@Directive({ selector: '[eclatForm][eclatFormOf]' })\r\nexport class EclatFormOfDirective<T> {\r\n private context?: EclatFormContext<T>;\r\n private latestState?: EclatFormState<T>;\r\n\r\n constructor(\r\n private templateRef: TemplateRef<EclatFormContext<T>>,\r\n private viewContainer: ViewContainerRef) {\r\n }\r\n\r\n @Input() set eclatFormOf(state: EclatFormState<T>) {\r\n if (!this.context || !this.latestState || this.latestState.config !== state.config) {\r\n this.setContext(getEclatControl(state.config, state.data));\r\n }\r\n else if (this.latestState.data !== state.data) {\r\n this.context.$implicit.resetState(state.data);\r\n }\r\n\r\n this.latestState = state;\r\n }\r\n\r\n private setContext(control?: AbstractEclatFormControl<T> | null) {\r\n if (!control) {\r\n throw new Error('control not found');\r\n }\r\n\r\n if (!this.context) {\r\n this.context = new EclatFormContext<T>(control);\r\n this.viewContainer.createEmbeddedView(this.templateRef, this.context);\r\n }\r\n else {\r\n this.context.$implicit = control;\r\n }\r\n }\r\n}\r\n","import { BehaviorSubject, Observable } from 'rxjs';\r\nimport { AbstractEclatFormControl } from '../abstract-control';\r\nimport { EventEmitter, Output } from '@angular/core';\r\n\r\nexport abstract class EclatFormContainerDirective<T extends AbstractEclatFormControl<any>> {\r\n @Output()\r\n private onSubmit: EventEmitter<any>;\r\n\r\n protected constructor() {\r\n this._formControl = new BehaviorSubject<T | undefined>(undefined);\r\n this.onSubmit = new EventEmitter();\r\n }\r\n\r\n protected _formControl: BehaviorSubject<T | undefined>;\r\n\r\n get formControl(): T | undefined {\r\n return this._formControl.getValue();\r\n }\r\n\r\n get formControl$(): Observable<T | undefined> {\r\n return this._formControl.asObservable();\r\n }\r\n\r\n submit(): void {\r\n if (this.formControl) {\r\n this.onSubmit.emit(this.formControl.value);\r\n }\r\n }\r\n\r\n abstract getChild(key: any): AbstractEclatFormControl<any> | undefined;\r\n}\r\n","import { Directive, Input, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\r\nimport { AbstractEclatFormControl } from '../abstract-control';\r\nimport { Subject, Subscription } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { EclatFormContainerDirective } from './eclat-form-container.directive';\r\n\r\nclass EclatFormErrorContext<T> {\r\n constructor(public control: AbstractEclatFormControl<T>) {\r\n }\r\n\r\n get $implicit(): string[] {\r\n return this.control.errorMessages;\r\n }\r\n}\r\n\r\n\r\n@Directive({ selector: '[eclatFormError]' })\r\nexport class EclatFormErrorDirective<T> implements OnInit, OnDestroy {\r\n @Input()\r\n errorMatcher: (control: AbstractEclatFormControl<T>) => boolean;\r\n private context?: EclatFormErrorContext<T>;\r\n private latestControlName: string;\r\n private onDestroy$: Subject<void>;\r\n private valueChangesSub?: Subscription;\r\n\r\n constructor(\r\n private templateRef: TemplateRef<EclatFormErrorContext<T>>,\r\n private viewContainer: ViewContainerRef,\r\n private parent: EclatFormContainerDirective<any>,\r\n ) {\r\n this.onDestroy$ = new Subject();\r\n this.errorMatcher = () => true;\r\n }\r\n\r\n @Input()\r\n set eclatControl(control: AbstractEclatFormControl<T>) {\r\n this.setContext(control);\r\n }\r\n\r\n @Input()\r\n set eclatControlName(controlName: keyof Record<any, T> | undefined) {\r\n if (!this.parent.formControl) {\r\n throw new Error('parent formControl not exist');\r\n }\r\n\r\n const instance = !controlName ? this.parent.formControl : this.parent.formControl.getChild(controlName);\r\n\r\n if (!instance) {\r\n throw new Error('control not found');\r\n return;\r\n }\r\n\r\n this.latestControlName = controlName;\r\n this.setContext(instance);\r\n }\r\n\r\n @Input() set eclatFormError(control: AbstractEclatFormControl<T> | keyof Record<any, T>) {\r\n if (control instanceof AbstractEclatFormControl) {\r\n this.setContext(control);\r\n }\r\n else {\r\n this.eclatControlName = control;\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.parent.formControl$.pipe(takeUntil(this.onDestroy$)).subscribe(\r\n (formControl) => {\r\n if (formControl && this.latestControlName) {\r\n this.eclatFormError = formControl.getChild(this.latestControlName);\r\n }\r\n },\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n }\r\n\r\n private setContext(control: AbstractEclatFormControl<T>) {\r\n if (!this.context) {\r\n this.context = new EclatFormErrorContext<T>(control);\r\n this.viewContainer.createEmbeddedView(this.templateRef, this.context);\r\n }\r\n else if (this.context.control !== control) {\r\n this.context.control = control;\r\n }\r\n if (this.valueChangesSub) {\r\n this.valueChangesSub.unsubscribe();\r\n }\r\n\r\n this.checkValidity(control);\r\n this.valueChangesSub = control.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(\r\n () => {\r\n this.checkValidity(control);\r\n },\r\n );\r\n }\r\n\r\n private checkValidity(control: AbstractEclatFormControl<T>): void {\r\n const isAttached = !!this.viewContainer.length;\r\n\r\n if (!control.valid && this.errorMatcher(control)) {\r\n if (!isAttached) {\r\n this.viewContainer.createEmbeddedView(this.templateRef, this.context);\r\n }\r\n }\r\n else {\r\n if (isAttached) {\r\n this.viewContainer.remove();\r\n }\r\n }\r\n }\r\n}\r\n","import { Directive, forwardRef, Input } from '@angular/core';\r\nimport { EclatFormChild, EclatFormGroup } from '../../form-models';\r\nimport { EclatFormContainerDirective } from '../eclat-form-container.directive';\r\n\r\n@Directive({\r\n selector: '[eclatFormGroup]',\r\n providers: [{\r\n provide: EclatFormContainerDirective,\r\n useExisting: forwardRef(() => EclatFormGroupDirective),\r\n }],\r\n})\r\nexport class EclatFormGroupDirective<T> extends EclatFormContainerDirective<EclatFormGroup<T>> {\r\n constructor() {\r\n super();\r\n }\r\n\r\n @Input()\r\n set eclatFormGroup(formGroup: EclatFormGroup<T>) {\r\n this._formControl.next(formGroup);\r\n }\r\n\r\n getChild(key: keyof T): EclatFormChild<T[any]> | undefined {\r\n if (this.formControl) {\r\n return this.formControl.getChild(key);\r\n }\r\n\r\n return undefined;\r\n }\r\n}\r\n\r\n","import { Directive, forwardRef, Input, OnDestroy, OnInit, SkipSelf } from '@angular/core';\r\nimport { EclatFormChild, EclatFormGroup } from '../../form-models';\r\nimport { EclatFormContainerDirective } from '../eclat-form-container.directive';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\n\r\n@Directive({\r\n selector: '[eclatFormGroupName]',\r\n providers: [{\r\n provide: EclatFormContainerDirective,\r\n useExisting: forwardRef(() => EclatFormGroupNameDirective),\r\n }],\r\n})\r\nexport class EclatFormGroupNameDirective<T extends any[]> extends EclatFormContainerDirective<EclatFormGroup<T>> implements OnInit, OnDestroy {\r\n private onDestroy$: Subject<void>;\r\n private latestName: string;\r\n\r\n constructor(@SkipSelf() private parent: EclatFormContainerDirective<any>) {\r\n super();\r\n this.onDestroy$ = new Subject();\r\n }\r\n\r\n @Input()\r\n set eclatFormGroupName(name: string) {\r\n this.latestName = name;\r\n this._formControl.next(<EclatFormGroup<any>>this.parent.getChild(name));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.parent.formControl$.pipe(takeUntil(this.onDestroy$)).subscribe(\r\n () => {\r\n this.eclatFormGroupName = this.latestName;\r\n },\r\n );\r\n }\r\n\r\n getChild(key: number): EclatFormChild<T[any]> | undefined {\r\n if (this.formControl) {\r\n return this.formControl.getChild(key);\r\n }\r\n\r\n return undefined;\r\n }\r\n}\r\n\r\n","import { Directive, forwardRef, Input, OnDestroy, OnInit, SkipSelf } from '@angular/core';\r\nimport { EclatFormArray, EclatFormChild } from '../../form-models';\r\nimport { EclatFormContainerDirective } from '../eclat-form-container.directive';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\n\r\n@Directive({\r\n selector: '[eclatFormArrayName]',\r\n providers: [{\r\n provide: EclatFormContainerDirective,\r\n useExisting: forwardRef(() => EclatFormArrayNameDirective),\r\n }],\r\n})\r\nexport class EclatFormArrayNameDirective<T extends any[]> extends EclatFormContainerDirective<EclatFormArray<T>> implements OnInit, OnDestroy {\r\n private onDestroy$: Subject<void>;\r\n private latestName: string;\r\n\r\n constructor(@SkipSelf() private parent: EclatFormContainerDirective<any>) {\r\n super();\r\n this.onDestroy$ = new Subject();\r\n }\r\n\r\n @Input()\r\n set eclatFormArrayName(name: string) {\r\n this.latestName = name;\r\n this._formControl.next(<EclatFormArray<any>>this.parent.getChild(name));\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.parent.formControl$.pipe(takeUntil(this.onDestroy$)).subscribe(\r\n () => {\r\n this.eclatFormArrayName = this.latestName;\r\n },\r\n );\r\n }\r\n\r\n getChild(key: number): EclatFormChild<T[any]> | undefined {\r\n if (this.formControl) {\r\n return this.formControl.getChild(key);\r\n }\r\n\r\n return undefined;\r\n }\r\n}\r\n\r\n","import { Directive, forwardRef, Input } from '@angular/core';\r\nimport { EclatFormArray, EclatFormChild } from '../../form-models';\r\nimport { EclatFormContainerDirective } from '../eclat-form-container.directive';\r\n\r\n@Directive({\r\n selector: '[eclatFormArray]',\r\n providers: [{\r\n provide: EclatFormContainerDirective,\r\n useExisting: forwardRef(() => EclatFormArrayDirective),\r\n }],\r\n})\r\nexport class EclatFormArrayDirective<T extends any[]> extends EclatFormContainerDirective<EclatFormArray<T>> {\r\n constructor() {\r\n super();\r\n }\r\n\r\n @Input()\r\n set eclatFormArray(formArray: EclatFormArray<T>) {\r\n this._formControl.next(formArray);\r\n }\r\n\r\n getChild(key: number): EclatFormChild<T[any]> | undefined {\r\n if (this.formControl) {\r\n return this.formControl.getChild(key);\r\n }\r\n\r\n return undefined;\r\n }\r\n}\r\n\r\n","import { Directive, EmbeddedViewRef, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\r\nimport { EclatFormContainerDirective } from '../eclat-form-container.directive';\r\nimport { EclatFormArray, EclatFormChild } from '../../form-models';\r\nimport { Subject, Subscription } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\n\r\n@Directive({\r\n selector: '[eclatFormArrayChildren]',\r\n})\r\nexport class EclatFormArrayChildrenDirective<T> implements OnInit, OnDestroy {\r\n private onDestroy$: Subject<void>;\r\n private latestChildren: EclatFormChild<any>[];\r\n private valueChangeSubs: Subscription | null;\r\n\r\n constructor(\r\n private templateRef: TemplateRef<any>,\r\n private viewContainer: ViewContainerRef,\r\n private parent: EclatFormContainerDirective<EclatFormArray<any>>,\r\n ) {\r\n this.onDestroy$ = new Subject();\r\n this.latestChildren = [];\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n }\r\n\r\n ngOnInit(): void {\r\n this.parent.formControl$.pipe(takeUntil(this.onDestroy$)).subscribe(\r\n (formControl) => {\r\n if (formControl) {\r\n if (this.valueChangeSubs) {\r\n this.valueChangeSubs.unsubscribe();\r\n }\r\n\r\n this.onChange(formControl);\r\n this.valueChangeSubs = formControl.valueChanges.pipe(takeUntil(this.onDestroy$)).subscribe(\r\n () => {\r\n this.onChange(formControl);\r\n },\r\n );\r\n }\r\n },\r\n );\r\n }\r\n\r\n private onChange(control: EclatFormArray<any>): void {\r\n const children: EclatFormChild<any>[] = [];\r\n const controlChildrenLength: number = control.children.length;\r\n\r\n control.children.forEach(\r\n (c, index) => {\r\n const lastIndex = this.latestChildren.findIndex(o => o === c);\r\n const first: boolean = index === 0;\r\n const last: boolean = index === (controlChildrenLength - 1);\r\n\r\n if (lastIndex < 0) {\r\n this.viewContainer.createEmbeddedView(this.templateRef, { $implicit: index, last, first }, index);\r\n } else if (lastIndex !== index) {\r\n const embeddedView: EmbeddedViewRef<any> = <EmbeddedViewRef<any>>this.viewContainer.get(lastIndex)!;\r\n embeddedView.context.$implicit = index;\r\n embeddedView.context.last = last;\r\n embeddedView.context.first = first;\r\n\r\n this.viewContainer.move(embeddedView, index);\r\n }\r\n\r\n children.push(c);\r\n },\r\n );\r\n while (this.viewContainer.length > controlChildrenLength) {\r\n this.viewContainer.remove();\r\n }\r\n\r\n this.latestChildren = children;\r\n }\r\n}\r\n\r\n","import { Directive, HostListener } from '@angular/core';\r\nimport { EclatFormContainerDirective } from './eclat-form-container.directive';\r\n\r\n@Directive({ selector: '[eclatFormSubmit]' })\r\nexport class EclatFormSubmitDirective {\r\n constructor(private parent: EclatFormContainerDirective<any>) {\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n @HostListener('tap', ['$event'])\r\n onClick(): void {\r\n this.parent.submit();\r\n }\r\n}\r\n","import { Directive, HostListener, Input } from '@angular/core';\r\nimport { EclatFormContainerDirective } from '../eclat-form-container.directive';\r\nimport { EclatFormArray } from '../../form-models';\r\n\r\n@Directive({\r\n selector: '[eclatFormAddChildren]',\r\n})\r\nexport class EclatFormArrayAddDirective<T> {\r\n @Input('eclatFormAddChildren')\r\n value: T;\r\n\r\n constructor(\r\n private parent: EclatFormContainerDirective<EclatFormArray<any>>,\r\n ) {\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick(): void {\r\n const control = this.parent.formControl;\r\n\r\n if (control) {\r\n control.addChild(this.value);\r\n }\r\n }\r\n}\r\n\r\n","import { Directive, Input, OnDestroy, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\r\nimport { AbstractEclatFormControl } from '../abstract-control';\r\nimport { Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { EclatFormContainerDirective } from './eclat-form-container.directive';\r\n\r\nclass EclatFormValueContext<T> {\r\n constructor(public control: AbstractEclatFormControl<T>) {\r\n }\r\n\r\n get $implicit(): T {\r\n return this.control.value;\r\n }\r\n}\r\n\r\n\r\n@Directive({ selector: '[eclatFormValue]' })\r\nexport class EclatFormValueDirective<T> implements OnInit, OnDestroy {\r\n private context?: EclatFormValueContext<T>;\r\n private latestControlName: string;\r\n private onDestroy$: Subject<void>;\r\n\r\n constructor(\r\n private templateRef: TemplateRef<EclatFormValueContext<T>>,\r\n private viewContainer: ViewContainerRef,\r\n private parent: EclatFormContainerDirective<any>,\r\n ) {\r\n this.onDestroy$ = new Subject();\r\n }\r\n\r\n @Input()\r\n set eclatControl(control: AbstractEclatFormControl<T>) {\r\n this.setContext(control);\r\n }\r\n\r\n @Input()\r\n set eclatControlName(controlName: keyof Record<any, T>) {\r\n if (!this.parent.formControl) {\r\n throw new Error('parent formControl not exist');\r\n }\r\n\r\n const instance = this.parent.formControl.getChild(controlName);\r\n\r\n if (!instance) {\r\n throw new Error('control not found');\r\n return;\r\n }\r\n\r\n this.latestControlName = controlName;\r\n this.setContext(instance);\r\n }\r\n\r\n @Input() set eclatFormValue(control: AbstractEclatFormControl<T> | keyof Record<any, T>) {\r\n if (control instanceof AbstractEclatFormControl) {\r\n this.setContext(control);\r\n }\r\n else if (control || control === 0) {\r\n this.eclatControlName = control;\r\n }\r\n }\r\n\r\n ngOnInit(): void {\r\n this.parent.formControl$.pipe(takeUntil(this.onDestroy$)).subscribe(\r\n (formControl) => {\r\n if (formControl && this.latestControlName) {\r\n this.eclatFormValue = formControl.getChild(this.latestControlName);\r\n }\r\n },\r\n );\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.onDestroy$.next();\r\n }\r\n\r\n private setContext(control: AbstractEclatFormControl<T>) {\r\n if (!this.context) {\r\n this.context = new EclatFormValueContext<T>(control);\r\n this.viewContainer.createEmbeddedView(this.templateRef, this.context);\r\n }\r\n else if (this.context.control !== control) {\r\n this.context.control = control;\r\n }\r\n }\r\n}\r\n","import { ControlContainer, FormGroupDirective } from '@angular/forms';\r\nimport { Directive, forwardRef, Input, OnChanges, SimpleChange, SimpleChanges } from '@angular/core';\r\nimport { EclatFormGroup } from '../../form-models';\r\n\r\n@Directive({\r\n selector: '[eclatFormGroup]',\r\n providers: [{\r\n provide: ControlContainer,\r\n useExisting: forwardRef(() => EclatFormGroupBinderDirective),\r\n }],\r\n})\r\nexport class EclatFormGroupBinderDirective<T> extends FormGroupDirective implements OnChanges {\r\n @Input()\r\n set eclatFormGroup(formGroup: EclatFormGroup<T>) {\r\n this.form = formGroup.control;\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges): void {\r\n const eclatFormGroupChanges = changes.eclatFormGroup;\r\n\r\n if (eclatFormGroupChanges) {\r\n const prevValue = eclatFormGroupChanges.previousValue ? eclatFormGroupChanges.previousValue.control : undefined;\r\n const currentValue = eclatFormGroupChanges.currentValue.control;\r\n const firstChange = eclatFormGroupChanges.firstChange;\r\n super.ngOnChanges({ form: new SimpleChange(prevValue, currentValue, firstChange) });\r\n }\r\n }\r\n}\r\n","import { ControlContainer, FormGroupName } from '@angular/forms';\r\nimport { Directive, forwardRef, Input } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[eclatFormGroupName]',\r\n providers: [{\r\n provide: ControlContainer,\r\n useExisting: forwardRef(() => EclatFormGroupNameBinderDirective),\r\n }],\r\n})\r\nexport class EclatFormGroupNameBinderDirective<T> extends FormGroupName {\r\n @Input()\r\n set eclatFormGroupName(name: string) {\r\n this.name = name;\r\n }\r\n}\r\n","import { ControlContainer, FormArrayName } from '@angular/forms';\r\nimport { Directive, forwardRef, Input } from '@angular/core';\r\n\r\n@Directive({\r\n selector: '[eclatFormArrayName]',\r\n providers: [{\r\n provide: ControlContainer,\r\n useExisting: forwardRef(() => EclatFormArrayNameBinderDirective),\r\n }],\r\n})\r\nexport class EclatFormArrayNameBinderDirective<T> extends FormArrayName {\r\n @Input()\r\n set eclatFormArrayName(name: string) {\r\n this.name = name;\r\n }\r\n}\r\n","import { Directive, HostListener, Input } from '@angular/core';\r\nimport { EclatFormContainerDirective } from '../eclat-form-container.directive';\r\nimport { EclatFormArray } from '../../form-models';\r\n\r\n@Directive({\r\n selector: '[eclatFormRemoveChildren]',\r\n})\r\nexport class EclatFormArrayRemoveDirective<T> {\r\n @Input('eclatFormRemoveChildren')\r\n index: number;\r\n\r\n constructor(\r\n private parent: EclatFormContainerDirective<EclatFormArray<any>>,\r\n ) {\r\n }\r\n\r\n @HostListener('click', ['$event'])\r\n onClick(): void {\r\n const control = this.parent.formControl;\r\n\r\n if (control) {\r\n control.removeChild(this.index);\r\n }\r\n }\r\n}\r\n\r\n","import { NgModule } from '@angular/core';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { CommonModule } from '@angular/common';\r\nimport { EclatFormOfDirective } from './directives/eclat-form.directive';\r\nimport { EclatFormErrorDirective } from './directives/eclat-form-error.directive';\r\nimport { EclatFormGroupDirective } from './directives/group/eclat-form-group.directive';\r\nimport { EclatFormGroupNameDirective } from './directives/group/eclat-form-group-name.directive';\r\nimport { EclatFormArrayNameDirective } from './directives/array/eclat-form-array-name.directive';\r\nimport { EclatFormArrayDirective } from './directives/array/eclat-form-array.directive';\r\nimport { EclatFormArrayChildrenDirective } from './directives/array/eclat-form-array-children.directive';\r\nimport { EclatFormSubmitDirective } from './directives/eclat-form-submit.directive';\r\nimport { EclatFormArrayAddDirective } from './directives/array/eclat-form-array-add.directive';\r\nimport { EclatFormValueDirective } from './directives/eclat-form-value.directive';\r\nimport { EclatFormGroupBinderDirective } from './directives/binder/eclat-form-group-binder.directive';\r\nimport { EclatFormGroupNameBinderDirective } from './directives/binder/eclat-form-group-name-binder.directive';\r\nimport { EclatFormArrayNameBinderDirective } from './directives/binder/eclat-form-array-name-binder.directive';\r\nimport { EclatFormArrayRemoveDirective } from './directives/array/eclat-form-array-remove.directive';\r\n\r\n@NgModule({\r\n imports: [CommonModule, ReactiveFormsModule],\r\n declarations: [EclatFormOfDirective, EclatFormErrorDirective, EclatFormGroupDirective, EclatFormGroupNameDirective, EclatFormArrayDirective, EclatFormArrayNameDirective, EclatFormArrayChildrenDirective, EclatFormSubmitDirective, EclatFormArrayAddDirective, EclatFormValueDirective, EclatFormGroupBinderDirective, EclatFormGroupNameBinderDirective, EclatFormArrayNameBinderDirective, EclatFormArrayRemoveDirective],\r\n exports: [CommonModule, ReactiveFormsModule, EclatFormOfDirective, EclatFormErrorDirective, EclatFormGroupDirective, EclatFormGroupNameDirective, EclatFormArrayDirective, EclatFormArrayNameDirective, EclatFormArrayChildrenDirective, EclatFormSubmitDirective, EclatFormArrayAddDirective, EclatFormValueDirective, EclatFormGroupBinderDirective, EclatFormGroupNameBinderDirective, EclatFormArrayNameBinderDirective, EclatFormArrayRemoveDirective],\r\n})\r\nexport class EclatFormModule {\r\n}\r\n"],"names":["EclatFormUtility","tslib_1.__extends","FormControl","FormGroup","FormArray","Directive","TemplateRef","ViewContainerRef","Input","BehaviorSubject","EventEmitter","Output","Subject","takeUntil","forwardRef","SkipSelf","HostListener","SimpleChange","ControlContainer","FormGroupDirective","FormGroupName","FormArrayName","NgModule","CommonModule","ReactiveFormsModule"],"mappings":";;;;;;IAAA;IACA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA;IACA;IACA;IACA;;IAEA,IAAI,aAAa,GAAG,SAAS,CAAC,EAAE,CAAC,EAAE;IACnC,IAAI,aAAa,GAAG,MAAM,CAAC,cAAc;IACzC,SAAS,EAAE,SAAS,EAAE,EAAE,EAAE,YAAY,KAAK,IAAI,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,SAAS,GAAG,CAAC,CAAC,EAAE,CAAC;IACpF,QAAQ,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACnF,IAAI,OAAO,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/B,CAAC,CAAC;;AAEF,IAAO,SAAS,SAAS,CAAC,CAAC,EAAE,CAAC,EAAE;IAChC,IAAI,aAAa,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IACxB,IAAI,SAAS,EAAE,GAAG,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,EAAE;IAC3C,IAAI,CAAC,CAAC,SAAS,GAAG,CAAC,KAAK,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,SAAS,GAAG,CAAC,CAAC,SAAS,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACzF,CAAC;AACD,AAw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