From f64f2e158740aac8b26a42f1811f0dab45b55b6c Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Fri, 3 May 2019 21:57:05 +0000 Subject: [PATCH 01/17] chore(package): update @types/node to version 12.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 381899f..62d62b9 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "@labshare/semantic-release-config": "^1.0.0", "@ngtools/webpack": "^1.3.3", "@types/jasmine": "^3.0.0", - "@types/node": "^11.9.0", + "@types/node": "^12.0.0", "css-loader": "^2.1.0", "html-loader": "0.5.5", "html-webpack-plugin": "3.2.0", From 9ea023f7d7abecbfa310b9e72bfc45484c475bf2 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Fri, 31 May 2019 07:34:55 +0000 Subject: [PATCH 02/17] chore(package): update @commitlint/cli to version 8.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 381899f..92ea5bd 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ }, "devDependencies": { "@angular/compiler-cli": "^6.0.4", - "@commitlint/cli": "^7.0.0", + "@commitlint/cli": "^8.0.0", "@commitlint/config-conventional": "^7.0.1", "@labshare/semantic-release-config": "^1.0.0", "@ngtools/webpack": "^1.3.3", From 4d74f770f12d67ccbc4cf7bd71632e2eaf3bed18 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Fri, 31 May 2019 07:58:05 +0000 Subject: [PATCH 03/17] chore(package): update @commitlint/config-conventional to version 8.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 381899f..94a22a6 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "devDependencies": { "@angular/compiler-cli": "^6.0.4", "@commitlint/cli": "^7.0.0", - "@commitlint/config-conventional": "^7.0.1", + "@commitlint/config-conventional": "^8.0.0", "@labshare/semantic-release-config": "^1.0.0", "@ngtools/webpack": "^1.3.3", "@types/jasmine": "^3.0.0", From 8f94d7c17c42afc3887bfa13d774bb7780e26b02 Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Wed, 5 Jun 2019 16:04:49 +0000 Subject: [PATCH 04/17] chore(package): update url-loader to version 2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 381899f..cbf7480 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "ts-loader": "^4.3.0", "tslint-angular": "^2.0.0", "typescript": "^3.2.2", - "url-loader": "1.1.1", + "url-loader": "2.0.0", "webpack": "^4.10.2", "webpack-cli": "^3.1.2", "webpack-node-externals": "^1.7.2" From f9240c7d0872a0fa7a982bcac3ca0ba50aa8617d Mon Sep 17 00:00:00 2001 From: Artem Serebryakov Date: Mon, 10 Jun 2019 12:47:10 -0400 Subject: [PATCH 05/17] fix: removed groups BREAKING CHANGE: major module restructure --- dist/ngx-forms.js | 2 +- src/app/app.module.ts | 21 +- src/app/dynamic-field/dynamic-field.module.ts | 19 - .../data-adapter}/date-picker.adapter.spec.ts | 0 .../data-adapter}/date-picker.adapter.ts | 0 .../fields/form-date/form-date.component.ts | 2 +- src/app/layouts/groups/group.component.html | 73 ---- src/app/layouts/groups/group.component.scss | 3 - .../layouts/groups/group.component.spec.ts | 335 ------------------ src/app/layouts/groups/group.component.ts | 133 ------- src/app/layouts/layouts.module.ts | 30 -- src/types.ts | 51 +-- 12 files changed, 21 insertions(+), 648 deletions(-) delete mode 100644 src/app/dynamic-field/dynamic-field.module.ts rename src/app/{adapters => fields/form-date/data-adapter}/date-picker.adapter.spec.ts (100%) rename src/app/{adapters => fields/form-date/data-adapter}/date-picker.adapter.ts (100%) delete mode 100644 src/app/layouts/groups/group.component.html delete mode 100644 src/app/layouts/groups/group.component.scss delete mode 100644 src/app/layouts/groups/group.component.spec.ts delete mode 100644 src/app/layouts/groups/group.component.ts delete mode 100644 src/app/layouts/layouts.module.ts diff --git a/dist/ngx-forms.js b/dist/ngx-forms.js index b558ebc..e2afbef 100644 --- a/dist/ngx-forms.js +++ b/dist/ngx-forms.js @@ -1 +1 @@ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ngxForms=t():e.ngxForms=t()}(window,function(){return function(e){var t={};function o(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)o.d(n,r,function(t){return e[t]}.bind(null,r));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="",o(o.s=10)}([function(e,t){e.exports=require("@angular/core")},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(){return function(){}}();t.BaseFieldComponent=n},function(e,t){e.exports=require("@angular/forms")},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(0);t.FIELD_DICT_TOKEN=new n.InjectionToken("fields"),t.LAYOUTS_TOKEN=new n.InjectionToken("layouts"),function(e){e.And="and",e.Or="or"}(t.ConditionType||(t.ConditionType={}))},function(e,t){e.exports=require("@angular/common")},function(e,t){e.exports=require("@ng-bootstrap/ng-bootstrap")},function(e,t,o){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var o=function(e,t){var o=e[1]||"",n=e[3];if(!n)return o;if(t&&"function"==typeof btoa){var r=(c=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(c))))+" */"),i=n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"});return[o].concat(i).concat([r]).join("\n")}var c;return[o].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+o+"}":o}).join("")},t.i=function(e,o){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},r=0;r=0&&l.splice(t,1)}function m(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var n=function(){0;return o.nc}();n&&(e.attrs.nonce=n)}return v(t,e.attrs),h(e,t),t}function v(e,t){Object.keys(t).forEach(function(o){e.setAttribute(o,t[o])})}function g(e,t){var o,n,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var c=a++;o=u||(u=m(t)),n=O.bind(null,o,c,!1),r=O.bind(null,o,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",v(t,e.attrs),h(e,t),t}(t),n=function(e,t,o){var n=o.css,r=o.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(n=p(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var c=new Blob([n],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(c),s&&URL.revokeObjectURL(s)}.bind(null,o,t),r=function(){y(o),o.href&&URL.revokeObjectURL(o.href)}):(o=m(t),n=function(e,t){var o=t.css,n=t.media;n&&e.setAttribute("media",n);if(e.styleSheet)e.styleSheet.cssText=o;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(o))}}.bind(null,o),r=function(){y(o)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=c()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var o=d(e,t);return f(o,t),function(e){for(var n=[],r=0;r=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),c=o(2),s=o(3),u=function(){function e(){}var t,o;return n([i.Input(),r("design:type","function"==typeof(t=void 0!==s.FormConfig&&s.FormConfig)?t:Object)],e.prototype,"formConfig",void 0),n([i.Input(),r("design:type",Object)],e.prototype,"model",void 0),n([i.Input(),r("design:type",Object)],e.prototype,"lookups",void 0),n([i.Input(),r("design:type","function"==typeof(o=void 0!==c.FormGroup&&c.FormGroup)?o:Object)],e.prototype,"group",void 0),e}();t.BaseLayout=u},function(e,t,o){"use strict";var n=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=o(47),c=o(4),s=function(){function e(){}return e=n([r.NgModule({imports:[c.CommonModule],declarations:[i.DynamicFieldDirective],exports:[i.DynamicFieldDirective],schemas:[r.NO_ERRORS_SCHEMA]})],e)}();t.DynamicFieldModule=s},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),o(11),function(e){for(var o in e)t.hasOwnProperty(o)||(t[o]=e[o])}(o(12))},function(e,t){e.exports=require("reflect-metadata")},function(e,t,o){"use strict";var n=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=o(4),c=o(2),s=o(13),u=o(14),a=o(3),l=o(15),p=o(42),f=o(9),d=o(50),h=o(5),y=function(){function e(){}var t;return t=e,e.forRoot=function(e){var o=e.fieldDictionary,n=e.layoutDictionary;return o&&Object.keys(o).forEach(function(e){return l.Fields[e]=o[e]}),n&&Object.keys(n).forEach(function(e){return p.defaultLayouts[e]=n[e]}),{ngModule:t,providers:[{provide:a.FIELD_DICT_TOKEN,useValue:l.Fields},{provide:a.LAYOUTS_TOKEN,useValue:p.defaultLayouts}]}},e=t=n([r.NgModule({imports:[i.CommonModule,u.BrowserAnimationsModule,c.ReactiveFormsModule,c.FormsModule,p.FormLayoutsModule,f.DynamicFieldModule,d.QuillModule,h.NgbModule],declarations:[s.DynamicFormDirective,l.FieldComponents,l.CustomInputs],entryComponents:[l.FieldComponents],exports:[s.DynamicFormDirective],providers:[{provide:a.FIELD_DICT_TOKEN,useValue:l.Fields},{provide:a.LAYOUTS_TOKEN,useValue:p.defaultLayouts}],schemas:[r.NO_ERRORS_SCHEMA]})],e)}();t.NgxFormModule=y},function(e,t,o){"use strict";var n=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,n){t(o,n,e)}};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=o(2),u=o(3),a=function(){function e(e,t,o){this.componentFactoryResolver=e,this.container=t,this.layouts=o,this.group=new s.FormGroup({})}var t,o,a,l;return Object.defineProperty(e.prototype,"changes",{get:function(){return this.group.valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"valid",{get:function(){return this.group.valid},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.group.value},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"rawValue",{get:function(){return this.group.getRawValue()},enumerable:!0,configurable:!0}),e.prototype.ngOnInit=function(){if(!this.layouts[this.formConfig.layout])throw new Error('Layout with name "'+this.formConfig.layout+'" was not found');var e=this.layouts[this.formConfig.layout],t=this.componentFactoryResolver.resolveComponentFactory(e),o=this.container.createComponent(t);o.instance.group=this.group,o.instance.formConfig=this.formConfig,o.instance.model=this.model,o.instance.lookups=this.lookups},e.prototype.ngAfterViewInit=function(){this.readOnly&&this.group.disable()},n([c.Input(),r("design:type","function"==typeof(t=void 0!==u.FormConfig&&u.FormConfig)?t:Object)],e.prototype,"formConfig",void 0),n([c.Input(),r("design:type",Object)],e.prototype,"model",void 0),n([c.Input(),r("design:type",Object)],e.prototype,"lookups",void 0),n([c.Input(),r("design:type",Boolean)],e.prototype,"readOnly",void 0),e=n([c.Directive({exportAs:"dynamicForm",selector:"dynamic-form"}),i(2,c.Inject(u.LAYOUTS_TOKEN)),r("design:paramtypes",["function"==typeof(o=void 0!==c.ComponentFactoryResolver&&c.ComponentFactoryResolver)?o:Object,"function"==typeof(a=void 0!==c.ViewContainerRef&&c.ViewContainerRef)?a:Object,"function"==typeof(l=void 0!==u.LayoutDictionary&&u.LayoutDictionary)?l:Object])],e)}();t.DynamicFormDirective=a},function(e,t){e.exports=require("@angular/platform-browser/animations")},function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(16),r=o(18),i=o(20),c=o(25),s=o(27),u=o(29),a=o(31),l=o(33),p=o(35),f=o(37),d=o(40);t.Fields={text:n.FormInputComponent,select:r.FormSelectComponent,multicheckbox:s.FormMultiCheckboxComponent,editor:i.FormTextEditorComponent,textarea:a.FormTextareaComponent,hidden:l.FormInputHiddenComponent,radio:u.FormRadioComponent,checkbox:c.FormCheckboxComponent,label:p.FormLabelComponent,date:f.FormDateComponent},t.FieldComponents=[n.FormInputComponent,r.FormSelectComponent,s.FormMultiCheckboxComponent,i.FormTextEditorComponent,a.FormTextareaComponent,l.FormInputHiddenComponent,u.FormRadioComponent,c.FormCheckboxComponent,p.FormLabelComponent,f.FormDateComponent],t.CustomInputs=[d.MulticheckboxControlComponent]},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"form-input",template:o(17)})],t)}(o(1).BaseFieldComponent);t.FormInputComponent=s},function(e,t){e.exports='\n \n'},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"form-select",template:o(19)})],t)}(o(1).BaseFieldComponent);t.FormSelectComponent=s},function(e,t){e.exports='\n \n'},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.quillToolbar={toolbar:["bold","italic","underline","strike",{header:1},{header:2},{list:"ordered"},{list:"bullet"},"blockquote","code-block","link"]},t}return r(t,e),t=i([c.Component({selector:"form-text-editor",template:o(21),styles:[o(22).toString()]})],t)}(o(1).BaseFieldComponent);t.FormTextEditorComponent=s},function(e,t){e.exports='\n \n'},function(e,t,o){var n=o(23);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};o(7)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,o){(e.exports=o(6)(!1)).push([e.i,"form-text-editor .ql-container.ql-disabled {\n background-color: #e9ecef; }\n\nform-text-editor .ql-editor {\n min-height: 200px; }\n",""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var o=t.protocol+"//"+t.host,n=o+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?o+i:n+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"form-checkbox",template:o(26)})],t)}(o(1).BaseFieldComponent);t.FormCheckboxComponent=s},function(e,t){e.exports='
\n \n
'},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"form-multicheckbox",template:o(28)})],t)}(o(1).BaseFieldComponent);t.FormMultiCheckboxComponent=s},function(e,t){e.exports='\n \n'},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"form-radio",template:o(30)})],t)}(o(1).BaseFieldComponent);t.FormRadioComponent=s},function(e,t){e.exports='\n \n'},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"form-textarea",template:o(32)})],t)}(o(1).BaseFieldComponent);t.FormTextareaComponent=s},function(e,t){e.exports='\n \n'},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"form-hidden",template:o(34)})],t)}(o(1).BaseFieldComponent);t.FormInputHiddenComponent=s},function(e,t){e.exports='\n \n\n'},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"form-label",template:o(36)})],t)}(o(1).BaseFieldComponent);t.FormLabelComponent=s},function(e,t){e.exports="{{group.value[this.field.name]}}"},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=o(1),u=o(5),a=o(38),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"form-date",template:o(39),providers:[{provide:u.NgbDateAdapter,useClass:a.DatePickerAdapter}]})],t)}(s.BaseFieldComponent);t.FormDateComponent=l},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)});Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.fromModel=function(e){return"string"==typeof e&&(e=new Date(e)),e?{year:e.getFullYear(),month:e.getMonth()+1,day:e.getDate()}:null},t.prototype.toModel=function(e){return e?new Date(e.year,e.month-1,e.day):null},t}(o(5).NgbDateAdapter);t.DatePickerAdapter=i},function(e,t){e.exports='\n \n'},function(e,t,o){"use strict";var n=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0});var i=o(0),c=o(2),s=function(){function e(){var e=this;this.localGroup=new c.FormGroup({inputs:new c.FormArray([])}),this.inputs=this.localGroup.controls.inputs,this.subscriptions=[],this.required=!1,this.onModelChange=function(e){},this.onModelTouched=function(e){},this.subscriptions.push(this.localGroup.valueChanges.subscribe(function(t){var o=e.options.filter(function(e,o){return t.inputs[o]});setTimeout(function(){e.onModelChange(o)})}))}var t;return t=e,e.prototype.ngOnInit=function(){var e=this;this.options.forEach(function(t){return e.inputs.push(new c.FormControl(!1))})},e.prototype.writeValue=function(e){var t=this;e&&this.options.forEach(function(o,n){return t.inputs.controls[n].setValue(e.indexOf(o)>-1)})},e.prototype.registerOnChange=function(e){this.onModelChange=e},e.prototype.registerOnTouched=function(e){this.onModelTouched=e},e.prototype.setDisabledState=function(e){e?this.localGroup.disable():this.localGroup.enable()},e.prototype.ngOnDestroy=function(){this.subscriptions.forEach(function(e){return e.unsubscribe()})},e.prototype.validate=function(){var e={},t=!0,o=this.inputs.value.some(function(e){return e});return this.required&&!o&&(e.required=!0,t=!1),t?null:e},n([i.Input(),r("design:type",Array)],e.prototype,"options",void 0),n([i.Input(),r("design:type",Object)],e.prototype,"required",void 0),e=t=n([i.Component({providers:[{multi:!0,provide:c.NG_VALUE_ACCESSOR,useExisting:t},{multi:!0,provide:c.NG_VALIDATORS,useExisting:t}],selector:"multicheckbox-control",template:o(41)}),r("design:paramtypes",[])],e)}();t.MulticheckboxControlComponent=s},function(e,t){e.exports='
\n
\n
\n \n
\n
\n
'},function(e,t,o){"use strict";var n=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var r=o(0),i=o(4),c=o(43),s=o(9),u=o(48);t.defaultLayouts={groups:c.GroupComponent,basic:u.BasicLayoutComponent};var a=function(){function e(){}return e=n([r.NgModule({imports:[i.CommonModule,s.DynamicFieldModule],declarations:[c.GroupComponent,u.BasicLayoutComponent],entryComponents:[c.GroupComponent,u.BasicLayoutComponent],schemas:[r.NO_ERRORS_SCHEMA]})],e)}();t.FormLayoutsModule=a},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=o(3),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.ref={groups:[]},t.subscriptions=[],t.groupProps=[],t.selected=0,t.fconfig=[],t.allFields=[],t}return r(t,e),t.prototype.ngOnInit=function(){var e=this;this.fconfig=JSON.parse(JSON.stringify(this.formConfig.form)),this.fconfig.forEach(function(t,o){var n=[];t.fields&&(n=n.concat(t.fields)),t.panels&&t.panels.forEach(function(e){e.fields&&(n=n.concat(e.fields))}),e.groupProps.push({hidden:o>0,valid:!0,controls:[],fields:n,invalids:[]}),n.forEach(function(t){if(t.lookup&&e.lookups){var o="string"==typeof t.lookup?{name:t.lookup,extract:null}:t.lookup;t.options=o.extract?e.lookups[o.name].map(function(e){return e[o.extract]}):e.lookups[o.name]}else;}),e.allFields=e.allFields.concat(n)})},t.prototype.checkRules=function(e,t,o){if(!e||!e.rules||!e.rules.length)return!0;var n=function(e){var n,r=t[e.field]||(n=o.find(function(t){return t.name===e.field}))&&n.value||"";return Array.isArray(e.equals)||(e.equals=[e.equals]),e.equals.indexOf(r)>-1};return e.type!==s.ConditionType.Or&&e.type?e.type!==s.ConditionType.And||e.rules.every(n):e.rules.some(n)},t.prototype.validateGroup=function(e){this.groupProps[e].valid=this.groupProps[e].controls.every(function(e){return e.valid})},t.prototype.ngAfterViewInit=function(){var e=this;this.fconfig.forEach(function(t,o){t.enableWhen&&(e.checkRules(t.enableWhen,e.model,e.allFields)||e.groupProps[o].fields.forEach(function(t){e.group.get(t.name).disable()})),e.groupProps[o].fields.filter(function(e){return e.required||e.requiredTrue}).forEach(function(t){var n=e.group.get(t.name);e.groupProps[o].controls.push(n),e.subscriptions.push(n.statusChanges.subscribe(function(){e.validateGroup(o)}))}),e.validateGroup(o)})},t.prototype.select=function(e){this.groupProps[this.selected].hidden=!0,this.groupProps[e].hidden=!1,this.selected=e},t.prototype.prev=function(){this.select(this.selected-1)},t.prototype.next=function(){this.select(this.selected+1)},t.prototype.disablePrev=function(){return this.selected<1},t.prototype.disableNext=function(){return this.selected>this.groupProps.length-2},t.prototype.ngOnDestroy=function(){this.subscriptions.forEach(function(e){return e.unsubscribe()})},t=i([c.Component({selector:"layout-group-group",template:o(44),styles:[o(45).toString()]})],t)}(o(8).BaseLayout);t.GroupComponent=u},function(e,t){e.exports='
\n\n
\n \n
\n\n
\n \n
\n \n \n \n \n\n \n \n \n \n\n\n
\n\n
\n
\n
\n \n \n
\n
\n
\n\n
\n
\n\n\n\n
\n
\n {{panelConfig.label}}\n
\n
\n
\n\n \n \n
\n
\n
\n
\n\n \n
\n
\n
\n
\n\n
\n
\n
\n
'},function(e,t,o){var n=o(46);"string"==typeof n&&(n=[[e.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};o(7)(n,r);n.locals&&(e.exports=n.locals)},function(e,t,o){(e.exports=o(6)(!1)).push([e.i,".required-icon {\n color: red; }\n",""])},function(e,t,o){"use strict";var n=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},i=this&&this.__param||function(e,t){return function(o,n){t(o,n,e)}};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=o(2),u=o(3),a=function(){function e(e,t,o,n){this.resolver=e,this.container=t,this.fb=o,this.inputs=n}var t,o,a,l,p,f;return e.prototype.ngOnInit=function(){if(!this.group)throw new Error("group is not set");if(!this.inputs[this.field.type])throw new Error('Input with type "'+this.field.type+'" was not found');var e=this.inputs[this.field.type],t=this.resolver.resolveComponentFactory(e);this.component=this.container.createComponent(t),this.component.instance.field=this.field,this.component.instance.group=this.group,this.component.instance.model=this.model,this.group.addControl(this.field.name,this.createControl(this.field)),this.model&&this.model[this.field.name]&&this.group.get(this.field.name).patchValue(this.model[this.field.name])},e.prototype.createControl=function(e){var t=e.disabled,o=e.required,n=e.minLength,r=e.maxLength,i=e.email,c=e.min,u=e.max,a=e.pattern,l=e.value,p=e.requiredTrue,f=[];return void 0!==o&&o&&f.push(s.Validators.required),void 0!==n&&f.push(s.Validators.minLength(n)),void 0!==r&&f.push(s.Validators.maxLength(r)),void 0!==i&&f.push(s.Validators.email),void 0!==c&&f.push(s.Validators.min(c)),void 0!==u&&f.push(s.Validators.max(u)),void 0!==a&&f.push(s.Validators.pattern(a)),p&&f.push(s.Validators.requiredTrue),this.fb.control({disabled:t,value:l},f)},e.prototype.ngOnDestroy=function(){this.component&&this.component.destroy()},n([c.Input(),r("design:type","function"==typeof(t=void 0!==u.FieldConfig&&u.FieldConfig)?t:Object)],e.prototype,"field",void 0),n([c.Input(),r("design:type","function"==typeof(o=void 0!==s.FormGroup&&s.FormGroup)?o:Object)],e.prototype,"group",void 0),n([c.Input(),r("design:type",Object)],e.prototype,"model",void 0),e=n([c.Directive({selector:"[dynamicField]"}),i(3,c.Inject(u.FIELD_DICT_TOKEN)),r("design:paramtypes",["function"==typeof(a=void 0!==c.ComponentFactoryResolver&&c.ComponentFactoryResolver)?a:Object,"function"==typeof(l=void 0!==c.ViewContainerRef&&c.ViewContainerRef)?l:Object,"function"==typeof(p=void 0!==s.FormBuilder&&s.FormBuilder)?p:Object,"function"==typeof(f=void 0!==u.FieldDictionary&&u.FieldDictionary)?f:Object])],e)}();t.DynamicFieldDirective=a},function(e,t,o){"use strict";var n,r=this&&this.__extends||(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var o in t)t.hasOwnProperty(o)&&(e[o]=t[o])})(e,t)},function(e,t){function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}),i=this&&this.__decorate||function(e,t,o,n){var r,i=arguments.length,c=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,o,n);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(c=(i<3?r(c):i>3?r(t,o,c):r(t,o))||c);return i>3&&c&&Object.defineProperty(t,o,c),c};Object.defineProperty(t,"__esModule",{value:!0});var c=o(0),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t=i([c.Component({selector:"layout-basic",template:o(49)})],t)}(o(8).BaseLayout);t.BasicLayoutComponent=s},function(e,t){e.exports='
\n
\n

{{formConfig.title}}

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
'},function(e,t){e.exports=require("ngx-quill")}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ngxForms=e():t.ngxForms=e()}(window,function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=5)}([function(t,e){t.exports=require("@angular/core")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){return function(){}}();e.BaseFieldComponent=n},function(t,e){t.exports=require("@angular/forms")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FIELD_DICT_TOKEN="FIELD_DICT_TOKEN",e.LAYOUTS_TOKEN="LAYOUTS_TOKEN"},function(t,e){t.exports=require("@ng-bootstrap/ng-bootstrap")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),o(6),function(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}(o(7))},function(t,e){t.exports=require("reflect-metadata")},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var r=o(0),i=o(8),c=o(2),u=o(9),a=o(10),s=o(3),p=o(11),f=o(40),l=o(4),d=o(41),h=o(44),y={basic:d.BasicLayoutComponent},m=function(){function t(){}var e;return e=t,t.forRoot=function(t){var o=t.fieldDictionary,n=t.layoutDictionary;return o&&Object.keys(o).forEach(function(t){return p.Fields[t]=o[t]}),n&&Object.keys(n).forEach(function(t){return y[t]=n[t]}),{ngModule:e,providers:[{provide:s.FIELD_DICT_TOKEN,useValue:p.Fields},{provide:s.LAYOUTS_TOKEN,useValue:y}]}},t=e=n([r.NgModule({imports:[i.CommonModule,a.BrowserAnimationsModule,c.ReactiveFormsModule,c.FormsModule,f.QuillModule,l.NgbModule],declarations:[u.DynamicFormDirective,p.FieldComponents,p.CustomInputs,d.BasicLayoutComponent,h.DynamicFieldDirective],entryComponents:[p.FieldComponents,d.BasicLayoutComponent],exports:[h.DynamicFieldDirective,u.DynamicFormDirective],providers:[{provide:s.FIELD_DICT_TOKEN,useValue:p.Fields},{provide:s.LAYOUTS_TOKEN,useValue:y}],schemas:[r.NO_ERRORS_SCHEMA]})],t)}();e.NgxFormModule=m},function(t,e){t.exports=require("@angular/common")},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=this&&this.__param||function(t,e){return function(o,n){e(o,n,t)}};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=o(2),a=o(3),s=function(){function t(t,e,o){this.componentFactoryResolver=t,this.container=e,this.layouts=o,this.group=new u.FormGroup({})}var e,o,s,p;return Object.defineProperty(t.prototype,"changes",{get:function(){return this.group.valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.group.valid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.group.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawValue",{get:function(){return this.group.getRawValue()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){if(!this.layouts[this.formConfig.layout])throw new Error('Layout with name "'+this.formConfig.layout+'" was not found');var t=this.layouts[this.formConfig.layout],e=this.componentFactoryResolver.resolveComponentFactory(t),o=this.container.createComponent(e);o.instance.group=this.group,o.instance.formConfig=this.formConfig,o.instance.model=this.model,o.instance.lookups=this.lookups},t.prototype.ngAfterViewInit=function(){this.readOnly&&this.group.disable()},n([c.Input(),r("design:type","function"==typeof(e=void 0!==a.FormConfig&&a.FormConfig)?e:Object)],t.prototype,"formConfig",void 0),n([c.Input(),r("design:type",Object)],t.prototype,"model",void 0),n([c.Input(),r("design:type",Object)],t.prototype,"lookups",void 0),n([c.Input(),r("design:type",Boolean)],t.prototype,"readOnly",void 0),t=n([c.Directive({exportAs:"dynamicForm",selector:"dynamic-form"}),i(2,c.Inject(a.LAYOUTS_TOKEN)),r("design:paramtypes",["function"==typeof(o=void 0!==c.ComponentFactoryResolver&&c.ComponentFactoryResolver)?o:Object,"function"==typeof(s=void 0!==c.ViewContainerRef&&c.ViewContainerRef)?s:Object,"function"==typeof(p=void 0!==a.LayoutDictionary&&a.LayoutDictionary)?p:Object])],t)}();e.DynamicFormDirective=s},function(t,e){t.exports=require("@angular/platform-browser/animations")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(12),r=o(14),i=o(16),c=o(23),u=o(25),a=o(27),s=o(29),p=o(31),f=o(33),l=o(35),d=o(38);e.Fields={text:n.FormInputComponent,select:r.FormSelectComponent,multicheckbox:u.FormMultiCheckboxComponent,editor:i.FormTextEditorComponent,textarea:s.FormTextareaComponent,hidden:p.FormInputHiddenComponent,radio:a.FormRadioComponent,checkbox:c.FormCheckboxComponent,label:f.FormLabelComponent,date:l.FormDateComponent},e.FieldComponents=[n.FormInputComponent,r.FormSelectComponent,u.FormMultiCheckboxComponent,i.FormTextEditorComponent,s.FormTextareaComponent,p.FormInputHiddenComponent,a.FormRadioComponent,c.FormCheckboxComponent,f.FormLabelComponent,l.FormDateComponent],e.CustomInputs=[d.MulticheckboxControlComponent]},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-input",template:o(13)})],e)}(o(1).BaseFieldComponent);e.FormInputComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-select",template:o(15)})],e)}(o(1).BaseFieldComponent);e.FormSelectComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.quillToolbar={toolbar:["bold","italic","underline","strike",{header:1},{header:2},{list:"ordered"},{list:"bullet"},"blockquote","code-block","link"]},e}return r(e,t),e=i([c.Component({selector:"form-text-editor",template:o(17),styles:[o(18).toString()]})],e)}(o(1).BaseFieldComponent);e.FormTextEditorComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){var n=o(19);"string"==typeof n&&(n=[[t.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};o(21)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,o){(t.exports=o(20)(!1)).push([t.i,"form-text-editor .ql-container.ql-disabled {\n background-color: #e9ecef; }\n\nform-text-editor .ql-editor {\n min-height: 200px; }\n",""])},function(t,e,o){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o=function(t,e){var o=t[1]||"",n=t[3];if(!n)return o;if(e&&"function"==typeof btoa){var r=(c=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(c))))+" */"),i=n.sources.map(function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"});return[o].concat(i).concat([r]).join("\n")}var c;return[o].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+o+"}":o}).join("")},e.i=function(t,o){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;r=0&&p.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return o.nc}();n&&(t.attrs.nonce=n)}return v(e,t.attrs),h(t,e),e}function v(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}function b(t,e){var o,n,r,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var c=s++;o=a||(a=m(e)),n=O.bind(null,o,c,!1),r=O.bind(null,o,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),h(t,e),e}(e),n=function(t,e,o){var n=o.css,r=o.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(n=f(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var c=new Blob([n],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(c),u&&URL.revokeObjectURL(u)}.bind(null,o,e),r=function(){y(o),o.href&&URL.revokeObjectURL(o.href)}):(o=m(e),n=function(t,e){var o=e.css,n=e.media;n&&t.setAttribute("media",n);if(t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}.bind(null,o),r=function(){y(o)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=c()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var o=d(t,e);return l(o,e),function(t){for(var n=[],r=0;r=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-checkbox",template:o(24)})],e)}(o(1).BaseFieldComponent);e.FormCheckboxComponent=u},function(t,e){t.exports='
\n \n
'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-multicheckbox",template:o(26)})],e)}(o(1).BaseFieldComponent);e.FormMultiCheckboxComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-radio",template:o(28)})],e)}(o(1).BaseFieldComponent);e.FormRadioComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-textarea",template:o(30)})],e)}(o(1).BaseFieldComponent);e.FormTextareaComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-hidden",template:o(32)})],e)}(o(1).BaseFieldComponent);e.FormInputHiddenComponent=u},function(t,e){t.exports='\n \n\n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-label",template:o(34)})],e)}(o(1).BaseFieldComponent);e.FormLabelComponent=u},function(t,e){t.exports="{{group.value[this.field.name]}}"},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=o(1),a=o(4),s=o(36),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-date",template:o(37),providers:[{provide:a.NgbDateAdapter,useClass:s.DatePickerAdapter}]})],e)}(u.BaseFieldComponent);e.FormDateComponent=p},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.fromModel=function(t){return"string"==typeof t&&(t=new Date(t)),t?{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}:null},e.prototype.toModel=function(t){return t?new Date(t.year,t.month-1,t.day):null},e}(o(4).NgbDateAdapter);e.DatePickerAdapter=i},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0});var i=o(0),c=o(2),u=function(){function t(){var t=this;this.localGroup=new c.FormGroup({inputs:new c.FormArray([])}),this.inputs=this.localGroup.controls.inputs,this.subscriptions=[],this.required=!1,this.onModelChange=function(t){},this.onModelTouched=function(t){},this.subscriptions.push(this.localGroup.valueChanges.subscribe(function(e){var o=t.options.filter(function(t,o){return e.inputs[o]});setTimeout(function(){t.onModelChange(o)})}))}var e;return e=t,t.prototype.ngOnInit=function(){var t=this;this.options.forEach(function(e){return t.inputs.push(new c.FormControl(!1))})},t.prototype.writeValue=function(t){var e=this;t&&this.options.forEach(function(o,n){return e.inputs.controls[n].setValue(t.indexOf(o)>-1)})},t.prototype.registerOnChange=function(t){this.onModelChange=t},t.prototype.registerOnTouched=function(t){this.onModelTouched=t},t.prototype.setDisabledState=function(t){t?this.localGroup.disable():this.localGroup.enable()},t.prototype.ngOnDestroy=function(){this.subscriptions.forEach(function(t){return t.unsubscribe()})},t.prototype.validate=function(){var t={},e=!0,o=this.inputs.value.some(function(t){return t});return this.required&&!o&&(t.required=!0,e=!1),e?null:t},n([i.Input(),r("design:type",Array)],t.prototype,"options",void 0),n([i.Input(),r("design:type",Object)],t.prototype,"required",void 0),t=e=n([i.Component({providers:[{multi:!0,provide:c.NG_VALUE_ACCESSOR,useExisting:e},{multi:!0,provide:c.NG_VALIDATORS,useExisting:e}],selector:"multicheckbox-control",template:o(39)}),r("design:paramtypes",[])],t)}();e.MulticheckboxControlComponent=u},function(t,e){t.exports='
\n
\n
\n \n
\n
\n
'},function(t,e){t.exports=require("ngx-quill")},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"layout-basic",template:o(43)})],e)}(o(42).BaseLayout);e.BasicLayoutComponent=u},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0});var i=o(0),c=o(2),u=o(3),a=function(){function t(){}var e,o;return n([i.Input(),r("design:type","function"==typeof(e=void 0!==u.FormConfig&&u.FormConfig)?e:Object)],t.prototype,"formConfig",void 0),n([i.Input(),r("design:type",Object)],t.prototype,"model",void 0),n([i.Input(),r("design:type",Object)],t.prototype,"lookups",void 0),n([i.Input(),r("design:type","function"==typeof(o=void 0!==c.FormGroup&&c.FormGroup)?o:Object)],t.prototype,"group",void 0),t}();e.BaseLayout=a},function(t,e){t.exports='
\n
\n

{{formConfig.title}}

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
'},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=this&&this.__param||function(t,e){return function(o,n){e(o,n,t)}};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=o(2),a=o(3),s=function(){function t(t,e,o,n){this.resolver=t,this.container=e,this.fb=o,this.inputs=n}var e,o,s,p,f,l;return t.prototype.ngOnInit=function(){if(!this.group)throw new Error("group is not set");if(!this.inputs[this.field.type])throw new Error('Input with type "'+this.field.type+'" was not found');var t=this.inputs[this.field.type],e=this.resolver.resolveComponentFactory(t);this.component=this.container.createComponent(e),this.component.instance.field=this.field,this.component.instance.group=this.group,this.component.instance.model=this.model,this.group.addControl(this.field.name,this.createControl(this.field)),this.model&&this.model[this.field.name]&&this.group.get(this.field.name).patchValue(this.model[this.field.name])},t.prototype.createControl=function(t){var e=t.disabled,o=t.required,n=t.minLength,r=t.maxLength,i=t.email,c=t.min,a=t.max,s=t.pattern,p=t.value,f=t.requiredTrue,l=[];return void 0!==o&&o&&l.push(u.Validators.required),void 0!==n&&l.push(u.Validators.minLength(n)),void 0!==r&&l.push(u.Validators.maxLength(r)),void 0!==i&&l.push(u.Validators.email),void 0!==c&&l.push(u.Validators.min(c)),void 0!==a&&l.push(u.Validators.max(a)),void 0!==s&&l.push(u.Validators.pattern(s)),f&&l.push(u.Validators.requiredTrue),this.fb.control({disabled:e,value:p},l)},t.prototype.ngOnDestroy=function(){this.component&&this.component.destroy()},n([c.Input(),r("design:type","function"==typeof(e=void 0!==a.FieldConfig&&a.FieldConfig)?e:Object)],t.prototype,"field",void 0),n([c.Input(),r("design:type","function"==typeof(o=void 0!==u.FormGroup&&u.FormGroup)?o:Object)],t.prototype,"group",void 0),n([c.Input(),r("design:type",Object)],t.prototype,"model",void 0),t=n([c.Directive({selector:"[dynamicField]"}),i(3,c.Inject(a.FIELD_DICT_TOKEN)),r("design:paramtypes",["function"==typeof(s=void 0!==c.ComponentFactoryResolver&&c.ComponentFactoryResolver)?s:Object,"function"==typeof(p=void 0!==c.ViewContainerRef&&c.ViewContainerRef)?p:Object,"function"==typeof(f=void 0!==u.FormBuilder&&u.FormBuilder)?f:Object,"function"==typeof(l=void 0!==a.FieldDictionary&&a.FieldDictionary)?l:Object])],t)}();e.DynamicFieldDirective=s}])}); \ No newline at end of file diff --git a/src/app/app.module.ts b/src/app/app.module.ts index 14b3130..ceb4f7f 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -3,12 +3,16 @@ import { CommonModule } from '@angular/common'; import { ReactiveFormsModule, FormsModule } from '@angular/forms'; import { DynamicFormDirective } from './dynamic-form/dynamic-form.component'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; -import { FIELD_DICT_TOKEN, LAYOUTS_TOKEN, FormsExtensions } from '../types'; +import { FIELD_DICT_TOKEN, LAYOUTS_TOKEN, FormsExtensions, LayoutDictionary } from '../types'; import { Fields, FieldComponents, CustomInputs } from './fields'; -import { FormLayoutsModule, defaultLayouts } from './layouts/layouts.module'; -import { DynamicFieldModule } from './dynamic-field/dynamic-field.module'; import { QuillModule } from 'ngx-quill'; import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; +import { BasicLayoutComponent } from './layouts/basic/basic-layout.component'; +import { DynamicFieldDirective } from './dynamic-field/dynamic-field.directive'; + +const defaultLayouts: LayoutDictionary = { + basic: BasicLayoutComponent +}; @NgModule({ imports: [ @@ -16,20 +20,22 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; BrowserAnimationsModule, ReactiveFormsModule, FormsModule, - FormLayoutsModule, - DynamicFieldModule, QuillModule, NgbModule ], declarations: [ DynamicFormDirective, FieldComponents, - CustomInputs + CustomInputs, + BasicLayoutComponent, + DynamicFieldDirective ], entryComponents: [ - FieldComponents + FieldComponents, + BasicLayoutComponent ], exports: [ + DynamicFieldDirective, DynamicFormDirective, ], providers: [ @@ -68,3 +74,4 @@ export class NgxFormModule { } // todo: be able to export full form with buttons, or just form as object editor +// todo: refactor file structure, add themes and layouts diff --git a/src/app/dynamic-field/dynamic-field.module.ts b/src/app/dynamic-field/dynamic-field.module.ts deleted file mode 100644 index 6a1b92e..0000000 --- a/src/app/dynamic-field/dynamic-field.module.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; -import { DynamicFieldDirective } from './dynamic-field.directive'; -import { CommonModule } from '@angular/common'; - -@NgModule({ - imports: [ - CommonModule - ], - declarations: [ - DynamicFieldDirective - ], - exports: [ - DynamicFieldDirective - ], - schemas: [ - NO_ERRORS_SCHEMA - ] -}) -export class DynamicFieldModule { } diff --git a/src/app/adapters/date-picker.adapter.spec.ts b/src/app/fields/form-date/data-adapter/date-picker.adapter.spec.ts similarity index 100% rename from src/app/adapters/date-picker.adapter.spec.ts rename to src/app/fields/form-date/data-adapter/date-picker.adapter.spec.ts diff --git a/src/app/adapters/date-picker.adapter.ts b/src/app/fields/form-date/data-adapter/date-picker.adapter.ts similarity index 100% rename from src/app/adapters/date-picker.adapter.ts rename to src/app/fields/form-date/data-adapter/date-picker.adapter.ts diff --git a/src/app/fields/form-date/form-date.component.ts b/src/app/fields/form-date/form-date.component.ts index 07740c4..76021e7 100644 --- a/src/app/fields/form-date/form-date.component.ts +++ b/src/app/fields/form-date/form-date.component.ts @@ -1,7 +1,7 @@ import { Component } from '@angular/core'; import { BaseFieldComponent } from '../base-field'; import { NgbDateAdapter } from '@ng-bootstrap/ng-bootstrap'; -import { DatePickerAdapter } from '../../adapters/date-picker.adapter'; +import { DatePickerAdapter } from './data-adapter/date-picker.adapter'; @Component({ selector: 'form-date', diff --git a/src/app/layouts/groups/group.component.html b/src/app/layouts/groups/group.component.html deleted file mode 100644 index f28a430..0000000 --- a/src/app/layouts/groups/group.component.html +++ /dev/null @@ -1,73 +0,0 @@ -
- -
- -
- -
- -
- - - - - - - - - - - -
- -
-
-
- - -
-
-
- -
-
- - - -
-
- {{panelConfig.label}} -
-
-
- - - -
-
-
-
- - -
-
-
-
- -
-
-
-
\ No newline at end of file diff --git a/src/app/layouts/groups/group.component.scss b/src/app/layouts/groups/group.component.scss deleted file mode 100644 index 8ee5811..0000000 --- a/src/app/layouts/groups/group.component.scss +++ /dev/null @@ -1,3 +0,0 @@ -.required-icon { - color: red; -} \ No newline at end of file diff --git a/src/app/layouts/groups/group.component.spec.ts b/src/app/layouts/groups/group.component.spec.ts deleted file mode 100644 index 168419d..0000000 --- a/src/app/layouts/groups/group.component.spec.ts +++ /dev/null @@ -1,335 +0,0 @@ -import { Component, NgModule } from "@angular/core"; -import { Field, FieldConfig, FieldDictionary, FIELD_DICT_TOKEN, ConditionType, LAYOUTS_TOKEN, FormConfig } from "../../../types"; -import { FormGroup, ReactiveFormsModule, FormsModule } from "@angular/forms"; -import { ComponentFixture, TestBed, async } from "@angular/core/testing"; -import { CommonModule } from "@angular/common"; -import { DynamicFieldModule } from "../../dynamic-field/dynamic-field.module"; -import { DynamicFieldDirective } from "../../dynamic-field/dynamic-field.directive"; -import { By } from "@angular/platform-browser"; -import { GroupComponent } from './group.component'; -import { DynamicFormDirective } from '../../dynamic-form/dynamic-form.component'; - -@Component({ - selector: 'form-input', - template: '
' -}) -export class FormInputComponent implements Field { - field: FieldConfig; - group: FormGroup; -} - -const defaultInputs: FieldDictionary = { - text: FormInputComponent -} - -const layouts = { - groups: GroupComponent -} - -@Component({ - template: `` -}) -class TestComponent { - formConfig - data: {}; - dynamicForm: {}; - lookups: {}; -} - -@NgModule({ - declarations: [FormInputComponent], - imports: [FormsModule, ReactiveFormsModule, CommonModule], - entryComponents: [FormInputComponent, GroupComponent] -}) -class TestModule { } - -describe('GroupComponent Core', () => { - let component: GroupComponent; - let fixture: ComponentFixture; - let model = { test: 'test', title: 'title' }; - - beforeEach(() => { - TestBed.configureTestingModule({ - declarations: [DynamicFieldDirective, TestComponent, GroupComponent, DynamicFormDirective], - imports: [FormsModule, ReactiveFormsModule, TestModule], - providers: [{ provide: FIELD_DICT_TOKEN, useValue: defaultInputs }] - }).compileComponents(); - }); - - beforeEach(() => { - fixture = TestBed.createComponent(GroupComponent); - component = fixture.componentInstance; - component.group = new FormGroup({}) - component.formConfig = { - form: [ - { label: 'fields and panels', panels: [{ label: 'fields', fields: [{ type: 'text', name: 'title', required: true }] }] }, - { label: 'fields, no panels', fields: [{ type: 'text', name: 'test', required: true }] }, - { label: 'fields, no panels', fields: [{ type: 'text', name: 'test', requiredTrue: true }] }, - { label: 'no fields with panels', panels: [{ label: 'no fields' }] }, - { label: 'no fields, no panels' } - ] - } as FormConfig; - component.model = model; - fixture.detectChanges(); - component.ngAfterViewInit(); - }); - - describe('ngOnInit()', () => { - - it('should create group', () => { - expect(component.group).toBeDefined(); - }); - - describe('Lookup Expansion', () => { - - it('should not find lookup when no lookups were passed', () => { - component.lookups = null; - component.formConfig = { form: [{ fields: [{ type: 'text', name: 'title', lookup: 'test' }] }] } as FormConfig; - component.ngOnInit(); - expect(component.fconfig[0].fields[0].options).toBeUndefined(); - }); - - it('should not find lookup when no lookups found', () => { - component.lookups = { test: ['a', 'b', 'c'] };; - component.formConfig = { form: [{ fields: [{ type: 'text', name: 'title' }] }] } as FormConfig; - component.ngOnInit(); - expect(component.fconfig[0].fields[0].options).toBeUndefined(); - }); - - it('should not copy lookup with wrong name', () => { - component.lookups = { test: ['a', 'b', 'c'] };; - component.formConfig = { form: [{ fields: [{ type: 'text', name: 'title', lookup: 'test1' }] }] } as FormConfig; - component.ngOnInit(); - expect(component.fconfig[0].fields[0].options).toBeUndefined(); - }); - - it('should copy lookup', () => { - component.lookups = { test: ['a', 'b', 'c'] };; - component.formConfig = { form: [{ fields: [{ type: 'text', name: 'title', lookup: 'test' }] }] } as FormConfig; - component.ngOnInit(); - expect(component.fconfig[0].fields[0].options).toEqual(['a', 'b', 'c']); - }); - - it('should extract lookup', () => { - component.lookups = { test: [{ t: 'a' }, { t: 'b' }, { t: 'c' }] };; - component.formConfig = { form: [{ fields: [{ type: 'text', name: 'title', lookup: { name: 'test', extract: 't' } }] }] } as FormConfig; - component.ngOnInit(); - expect(component.fconfig[0].fields[0].options).toEqual(['a', 'b', 'c']); - }); - - }); - - describe('Conditional Disabling', () => { - it('should enable the fields', () => { - component.model = { title: 'test' }; - component.formConfig = { form: [{ fields: [{ type: 'text', name: 'title' }], enableWhen: { rules: [{ field: "title", equals: ["test"] }] } }] } as FormConfig; - component.ngOnInit(); - component.ngAfterViewInit(); - expect(component.fconfig[0].fields[0].disabled).toBeFalsy(); - }); - }); - - describe('checkRules()', () => { - - it('should not run rules', () => { - const model = { title: 'test' }; - const cfg = { enableWhen: { rules: [] } }; - expect(component.checkRules(cfg.enableWhen, model, [])).toBeTruthy(); - }); - - it('should not run rules where there are none', () => { - const model = { title: 'test' }; - const cfg = { rules: [] }; - expect(component.checkRules(cfg, model, [])).toBeTruthy(); - }); - - it('should run one rule and return true', () => { - const model = { title: 'test' }; - const cfg = { rules: [{ field: "title", equals: ["test"] }] }; - expect(component.checkRules(cfg, model, [])).toBeTruthy(); - }); - - it('should run one rule, wrap equals, and return true', () => { - const model = { title: 'test' }; - const cfg = { rules: [{ field: "title", equals: "test" }] }; - expect(component.checkRules(cfg, model, [])).toBeTruthy(); - }); - - it('should run one rule and return false', () => { - const model = { title: 'test' }; - const cfg = { rules: [{ field: "title", equals: ["test1"] }] }; - expect(component.checkRules(cfg, model, [])).toBeFalsy(); - }); - - it('should check default field value and return true when rule match', () => { - const cfg = { - fields: [ - { name: "title", type: 'text', value: 'test' } - ], - enableWhen: { type: ConditionType.Or, rules: [{ field: "title", equals: ["test"] }] } - }; - expect(component.checkRules(cfg.enableWhen, {}, cfg.fields)).toBeTruthy(); - }); - - it('should check default field value and return false when rule match', () => { - const cfg = { - fields: [ - { name: "title", type: 'text' } - ], - enableWhen: { type: ConditionType.Or, rules: [{ field: "title", equals: ["test"] }] } - }; - expect(component.checkRules(cfg.enableWhen, {}, cfg.fields)).toBeFalsy(); - }); - - it('should check default field value and return true whrn all rules match', () => { - const cfg = { - fields: [ - { name: "title", type: 'text', value: 'test' }, - { name: "count", type: 'text', value: 1 } - ], - enableWhen: { type: ConditionType.And, rules: [{ field: "title", equals: ["test"] }, { field: "count", equals: [1] }] } - }; - expect(component.checkRules(cfg.enableWhen, {}, cfg.fields)).toBeTruthy(); - }); - - it('should check default field false when value is not found', () => { - const cfg = { - fields: [ - { name: "title", type: 'text', value: 'test' }, - { name: "count", type: 'text' } - ], - enableWhen: { type: ConditionType.And, rules: [{ field: "title", equals: ["test"] }, { field: "count", equals: [1] }] } - }; - expect(component.checkRules(cfg.enableWhen, {}, cfg.fields)).toBeFalsy(); - }); - - it('should run multiple rules with `and` and return false when one does not match', () => { - const model = { title: 'test', count: 1 }; - const cfg = { enableWhen: { type: ConditionType.And, rules: [{ field: "title", equals: ["test"] }, { field: "count", equals: [1123] }] } }; - expect(component.checkRules(cfg.enableWhen, model, [])).toBeFalsy(); - }); - - it('should run multiple rules with `or` and return false when none match', () => { - const model = { title: 'test', count: 1 }; - const cfg = { enableWhen: { type: ConditionType.Or, rules: [{ field: "title", equals: ["test1"] }, { field: "count", equals: [1123] }] } }; - expect(component.checkRules(cfg.enableWhen, model, [])).toBeFalsy(); - }); - - it('should run multiple rules with `or` and return true when one match', () => { - const model = { title: 'test', count: 1 }; - const cfg = { enableWhen: { type: ConditionType.Or, rules: [{ field: "title", equals: ["test"] }, { field: "count", equals: [1222] }] } }; - expect(component.checkRules(cfg.enableWhen, model, [])).toBeTruthy(); - }); - - it('should check default field value and return true when one OR rules match', () => { - const cfg = { - fields: [ - { name: "title", type: 'text', value: 'test' }, - { name: "count", type: 'text', value: 3 } - ], - enableWhen: { type: ConditionType.Or, rules: [{ field: "title", equals: ["test"] }, { field: "count", equals: [1] }] } - }; - expect(component.checkRules(cfg.enableWhen, {}, cfg.fields)).toBeTruthy(); - }); - - it('should check default field false when value is not found', () => { - const cfg = { - fields: [ - { name: "title", type: 'text' }, - { name: "count", type: 'text' } - ], - enableWhen: { type: ConditionType.Or, rules: [{ field: "title", equals: ["test"] }, { field: "count", equals: [1] }] } - }; - expect(component.checkRules(cfg.enableWhen, {}, cfg.fields)).toBeFalsy(); - }); - - it('should skip all rule checks', () => { - const cfg = { - fields: [ - { name: "title", type: 'text' }, - { name: "count", type: 'text' } - ], - enableWhen: { type: "XOR", rules: [{ field: "title", equals: ["test"] }, { field: "count", equals: [1] }] } - }; - expect(component.checkRules(cfg.enableWhen, {}, cfg.fields)).toBeTruthy(); - }); - - it('should run rules in ngAfterViewInit', () => { - component.lookups = { test: [{ t: 'a' }, { t: 'b' }, { t: 'c' }] };; - component.formConfig = { - form: [{ - fields: [ - { name: "title", type: 'text' }, - { name: "count", type: 'text' } - ], - enableWhen: { type: ConditionType.Or, rules: [{ field: "title", equals: ["test"] }, { field: "count", equals: [1] }] } - }] - } as FormConfig; - component.ngOnInit(); - component.ngAfterViewInit(); - expect(component.group.controls.title.enabled).toBeFalsy(); - }); - - it('should run rules in ngAfterViewInit and return true', () => { - component.lookups = { test: [{ t: 'a' }, { t: 'b' }, { t: 'c' }] };; - component.formConfig = { - form: [{ - fields: [ - { name: "title", type: 'text', value: 'test' }, - { name: "count", type: 'text', value: 1 } - ], - enableWhen: { type: ConditionType.Or, rules: [{ field: "title", equals: ["test"] }, { field: "count", equals: [1] }] } - }] - } as FormConfig; - component.ngOnInit(); - component.ngAfterViewInit(); - expect(component.group.controls.title.enabled).toBeTruthy(); - }); - - it('should not run rules in ngAfterViewInit', () => { - component.lookups = { test: [{ t: 'a' }, { t: 'b' }, { t: 'c' }] };; - component.formConfig = { - form: [{ - fields: [ - { name: "title", type: 'text' }, - { name: "count", type: 'text' } - ] - }] - } as FormConfig; - component.ngOnInit(); - component.ngAfterViewInit(); - expect(component.group.controls.title.enabled).toBeTruthy(); - }); - - }); - - describe('next()', () => { - it('should select next item', () => { - component.next(); - expect(component.selected).toEqual(1); - }); - }); - - describe('prev()', () => { - it('should select next item', () => { - component.select(2); - component.prev(); - expect(component.selected).toEqual(1); - }); - }); - - describe('subscription()', () => { - it('should extract lookup', () => { - component.lookups = { test: [{ t: 'a' }, { t: 'b' }, { t: 'c' }] };; - component.formConfig = { form: [{ fields: [{ type: 'text', name: 'title', lookup: { name: 'test', extract: 't' } }] }] } as FormConfig; - component.ngOnInit(); - component.ngAfterViewInit(); - component.group.patchValue({ title: 'test2' }); - expect(component.groupProps[0].valid).toBeTruthy(); - }); - }); - - - }); - -}); diff --git a/src/app/layouts/groups/group.component.ts b/src/app/layouts/groups/group.component.ts deleted file mode 100644 index 1e56ffa..0000000 --- a/src/app/layouts/groups/group.component.ts +++ /dev/null @@ -1,133 +0,0 @@ -import { Component, OnInit, AfterViewInit, OnDestroy } from '@angular/core'; -import { FieldConfig, ILookup, ConditionType, Law } from '../../../types'; // todo: move specific types here -import { BaseLayout } from '../base-layout'; -import { Subscription } from 'rxjs'; -import { AbstractControl } from '@angular/forms'; - -@Component({ - selector: 'layout-group-group', - template: require('./group.component.html'), - styles: [require('./group.component.scss').toString()] -}) -export class GroupComponent extends BaseLayout implements OnInit, AfterViewInit, OnDestroy { - - public ref = { groups: [] }; - private subscriptions: Subscription[] = []; - public groupProps = []; - public selected = 0; - public fconfig = []; - - private allFields = []; - - public ngOnInit(): void { - - this.fconfig = JSON.parse(JSON.stringify(this.formConfig.form)); - - this.fconfig.forEach((group, index) => { - let fields: FieldConfig[] = []; - if (group.fields) { fields = fields.concat(group.fields); } - if (group.panels) { - group.panels.forEach(panel => { - if (panel.fields) { fields = fields.concat(panel.fields); } - }); - } - this.groupProps.push({ hidden: index > 0, valid: true, controls: [], fields: fields, invalids: [] }); - - fields.forEach((field: FieldConfig) => { - if (field.lookup && this.lookups) { - const cfg = typeof field.lookup === 'string' ? { name: field.lookup, extract: null } as ILookup : field.lookup as ILookup; - field.options = cfg.extract ? this.lookups[cfg.name].map(l => l[cfg.extract]) : this.lookups[cfg.name]; - return; - } - - // TODO: this code is for cases when multiple lookups required the same time - // if (field.lookups && Array.isArray(field.lookups) && this.lookups) { - // field.options = field.lookups - // .map(obj => typeof obj === "string" ? { name: obj } : obj as ILookup) - // .map(obj => - // obj.extract ? this.lookups[obj.name].map(l => l[obj.extract]) : this.lookups[obj.name]); - // } - - }); - - this.allFields = this.allFields.concat(fields); - }); - - } - - public checkRules(enableWhen: Law, model, allFields: FieldConfig[]): boolean { - if (!enableWhen || !enableWhen.rules || !enableWhen.rules.length) { return true; } - - const checkRule = rule => { - let field; - const value = model[rule.field] || (field = allFields.find(f => f.name === rule.field)) && field.value || ''; - if (!Array.isArray(rule.equals)) { rule.equals = [rule.equals]; } - return rule.equals.indexOf(value) > -1; - }; - - if (enableWhen.type === ConditionType.Or || !enableWhen.type) { - return enableWhen.rules.some(checkRule); - } - - if (enableWhen.type === ConditionType.And) { - return enableWhen.rules.every(checkRule); - } - - return true; - } - - validateGroup(index) { - this.groupProps[index].valid = this.groupProps[index].controls.every((ctrl: AbstractControl) => ctrl.valid); - } - - ngAfterViewInit() { - this.fconfig.forEach((group, index) => { - - if (group.enableWhen) { - if (!this.checkRules(group.enableWhen, this.model, this.allFields)) { - this.groupProps[index].fields - .forEach((f: FieldConfig) => { - const control = this.group.get(f.name); - control.disable(); - }); - } - } - - this.groupProps[index].fields - .filter((f: FieldConfig) => f.required || f.requiredTrue) - .forEach((f: FieldConfig) => { - const control = this.group.get(f.name); - this.groupProps[index].controls.push(control); - this.subscriptions.push(control.statusChanges.subscribe(() => { this.validateGroup(index); })); - }); - this.validateGroup(index); - }); - } - - select(index: number): void { - this.groupProps[this.selected].hidden = true; - this.groupProps[index].hidden = false; - this.selected = index; - } - - public prev() { - this.select(this.selected - 1); - } - - public next() { - this.select(this.selected + 1); - } - - public disablePrev() { - return this.selected < 1; - } - - public disableNext() { - return this.selected > this.groupProps.length - 2; - } - - ngOnDestroy(): void { - this.subscriptions.forEach((sub: Subscription) => sub.unsubscribe()); - } - -} diff --git a/src/app/layouts/layouts.module.ts b/src/app/layouts/layouts.module.ts deleted file mode 100644 index 0b0b862..0000000 --- a/src/app/layouts/layouts.module.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { NgModule, NO_ERRORS_SCHEMA } from '@angular/core'; -import { CommonModule } from '@angular/common'; -import { LayoutDictionary } from '../../types'; -import { GroupComponent } from './groups/group.component'; -import { DynamicFieldModule } from '../dynamic-field/dynamic-field.module'; -import { BasicLayoutComponent } from './basic/basic-layout.component'; - -export const defaultLayouts: LayoutDictionary = { - groups: GroupComponent, - basic: BasicLayoutComponent -}; - -@NgModule({ - imports: [ - CommonModule, - DynamicFieldModule - ], - declarations: [ - GroupComponent, - BasicLayoutComponent - ], - entryComponents: [ - GroupComponent, - BasicLayoutComponent - ], - schemas: [ - NO_ERRORS_SCHEMA - ] -}) -export class FormLayoutsModule { } diff --git a/src/types.ts b/src/types.ts index 9f85b7f..1254cd3 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,11 +1,5 @@ -import { FormGroup, AbstractControl } from '@angular/forms'; +import { FormGroup } from '@angular/forms'; import { FieldConfig } from './types'; -import { InjectionToken } from '@angular/core'; - -export interface ILookup { - name: string; // Name of lookup from lookup payload - extract?: string; // Extract one field from lookup item when lookup is an object -} export interface FieldConfig { disabled?: boolean; @@ -23,8 +17,6 @@ export interface FieldConfig { min?: number; max?: number; pattern?: RegExp; - lookup?: string | ILookup; // Array of a lookup array inside lookup payload - // lookups?: (string | ILookup)[]; // Array of a lookup array inside lookup payload settings?: any; // Free format object for storing custom form inputs settings requiredTrue?: boolean; } @@ -41,57 +33,24 @@ export interface FieldDictionary { [key: string]: Type; } export interface LayoutDictionary { [key: string]: Type; } -export const FIELD_DICT_TOKEN = new InjectionToken('fields'); - -export const LAYOUTS_TOKEN = new InjectionToken('layouts'); +export const FIELD_DICT_TOKEN = "FIELD_DICT_TOKEN"; +export const LAYOUTS_TOKEN = "LAYOUTS_TOKEN"; export interface Layout { group: FormGroup; formConfig: any; model: any; - lookups: any; } -export const enum ConditionType { - And = 'and', - Or = 'or' -} export interface FormConfig { - form: PanelGroup[]; + form: any; layout: any; } -export interface ConditionRule { - field: string; - equals: any[] | any; -} - -export interface EnableWhenConfig { - type?: ConditionType; - rules: ConditionRule[]; -} - -export interface PanelConfig { - label?: string; - fields?: FieldConfig[]; - enableWhen?: any; -} - -export interface PanelGroup { - label?: string; - fields?: FieldConfig[]; - panels?: PanelConfig[]; - enableWhen?: EnableWhenConfig; - controls?: AbstractControl[]; -} - export interface FormsExtensions { fieldDictionary?: FieldDictionary; layoutDictionary?: LayoutDictionary; } -export interface Law { - type?: ConditionType; - rules: ConditionRule[]; -} + From f46f2c759a3e6fd478989b535737119e4acc35ab Mon Sep 17 00:00:00 2001 From: Artem Serebryakov Date: Mon, 10 Jun 2019 13:26:14 -0400 Subject: [PATCH 06/17] fix: removed lookups --- dist/ngx-forms.js | 2 +- src/app/dynamic-form/dynamic-form.component.ts | 2 -- src/app/layouts/base-layout.ts | 1 - 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/dist/ngx-forms.js b/dist/ngx-forms.js index e2afbef..c2769e1 100644 --- a/dist/ngx-forms.js +++ b/dist/ngx-forms.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ngxForms=e():t.ngxForms=e()}(window,function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=5)}([function(t,e){t.exports=require("@angular/core")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){return function(){}}();e.BaseFieldComponent=n},function(t,e){t.exports=require("@angular/forms")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FIELD_DICT_TOKEN="FIELD_DICT_TOKEN",e.LAYOUTS_TOKEN="LAYOUTS_TOKEN"},function(t,e){t.exports=require("@ng-bootstrap/ng-bootstrap")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),o(6),function(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}(o(7))},function(t,e){t.exports=require("reflect-metadata")},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var r=o(0),i=o(8),c=o(2),u=o(9),a=o(10),s=o(3),p=o(11),f=o(40),l=o(4),d=o(41),h=o(44),y={basic:d.BasicLayoutComponent},m=function(){function t(){}var e;return e=t,t.forRoot=function(t){var o=t.fieldDictionary,n=t.layoutDictionary;return o&&Object.keys(o).forEach(function(t){return p.Fields[t]=o[t]}),n&&Object.keys(n).forEach(function(t){return y[t]=n[t]}),{ngModule:e,providers:[{provide:s.FIELD_DICT_TOKEN,useValue:p.Fields},{provide:s.LAYOUTS_TOKEN,useValue:y}]}},t=e=n([r.NgModule({imports:[i.CommonModule,a.BrowserAnimationsModule,c.ReactiveFormsModule,c.FormsModule,f.QuillModule,l.NgbModule],declarations:[u.DynamicFormDirective,p.FieldComponents,p.CustomInputs,d.BasicLayoutComponent,h.DynamicFieldDirective],entryComponents:[p.FieldComponents,d.BasicLayoutComponent],exports:[h.DynamicFieldDirective,u.DynamicFormDirective],providers:[{provide:s.FIELD_DICT_TOKEN,useValue:p.Fields},{provide:s.LAYOUTS_TOKEN,useValue:y}],schemas:[r.NO_ERRORS_SCHEMA]})],t)}();e.NgxFormModule=m},function(t,e){t.exports=require("@angular/common")},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=this&&this.__param||function(t,e){return function(o,n){e(o,n,t)}};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=o(2),a=o(3),s=function(){function t(t,e,o){this.componentFactoryResolver=t,this.container=e,this.layouts=o,this.group=new u.FormGroup({})}var e,o,s,p;return Object.defineProperty(t.prototype,"changes",{get:function(){return this.group.valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.group.valid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.group.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawValue",{get:function(){return this.group.getRawValue()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){if(!this.layouts[this.formConfig.layout])throw new Error('Layout with name "'+this.formConfig.layout+'" was not found');var t=this.layouts[this.formConfig.layout],e=this.componentFactoryResolver.resolveComponentFactory(t),o=this.container.createComponent(e);o.instance.group=this.group,o.instance.formConfig=this.formConfig,o.instance.model=this.model,o.instance.lookups=this.lookups},t.prototype.ngAfterViewInit=function(){this.readOnly&&this.group.disable()},n([c.Input(),r("design:type","function"==typeof(e=void 0!==a.FormConfig&&a.FormConfig)?e:Object)],t.prototype,"formConfig",void 0),n([c.Input(),r("design:type",Object)],t.prototype,"model",void 0),n([c.Input(),r("design:type",Object)],t.prototype,"lookups",void 0),n([c.Input(),r("design:type",Boolean)],t.prototype,"readOnly",void 0),t=n([c.Directive({exportAs:"dynamicForm",selector:"dynamic-form"}),i(2,c.Inject(a.LAYOUTS_TOKEN)),r("design:paramtypes",["function"==typeof(o=void 0!==c.ComponentFactoryResolver&&c.ComponentFactoryResolver)?o:Object,"function"==typeof(s=void 0!==c.ViewContainerRef&&c.ViewContainerRef)?s:Object,"function"==typeof(p=void 0!==a.LayoutDictionary&&a.LayoutDictionary)?p:Object])],t)}();e.DynamicFormDirective=s},function(t,e){t.exports=require("@angular/platform-browser/animations")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(12),r=o(14),i=o(16),c=o(23),u=o(25),a=o(27),s=o(29),p=o(31),f=o(33),l=o(35),d=o(38);e.Fields={text:n.FormInputComponent,select:r.FormSelectComponent,multicheckbox:u.FormMultiCheckboxComponent,editor:i.FormTextEditorComponent,textarea:s.FormTextareaComponent,hidden:p.FormInputHiddenComponent,radio:a.FormRadioComponent,checkbox:c.FormCheckboxComponent,label:f.FormLabelComponent,date:l.FormDateComponent},e.FieldComponents=[n.FormInputComponent,r.FormSelectComponent,u.FormMultiCheckboxComponent,i.FormTextEditorComponent,s.FormTextareaComponent,p.FormInputHiddenComponent,a.FormRadioComponent,c.FormCheckboxComponent,f.FormLabelComponent,l.FormDateComponent],e.CustomInputs=[d.MulticheckboxControlComponent]},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-input",template:o(13)})],e)}(o(1).BaseFieldComponent);e.FormInputComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-select",template:o(15)})],e)}(o(1).BaseFieldComponent);e.FormSelectComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.quillToolbar={toolbar:["bold","italic","underline","strike",{header:1},{header:2},{list:"ordered"},{list:"bullet"},"blockquote","code-block","link"]},e}return r(e,t),e=i([c.Component({selector:"form-text-editor",template:o(17),styles:[o(18).toString()]})],e)}(o(1).BaseFieldComponent);e.FormTextEditorComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){var n=o(19);"string"==typeof n&&(n=[[t.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};o(21)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,o){(t.exports=o(20)(!1)).push([t.i,"form-text-editor .ql-container.ql-disabled {\n background-color: #e9ecef; }\n\nform-text-editor .ql-editor {\n min-height: 200px; }\n",""])},function(t,e,o){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o=function(t,e){var o=t[1]||"",n=t[3];if(!n)return o;if(e&&"function"==typeof btoa){var r=(c=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(c))))+" */"),i=n.sources.map(function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"});return[o].concat(i).concat([r]).join("\n")}var c;return[o].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+o+"}":o}).join("")},e.i=function(t,o){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;r=0&&p.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return o.nc}();n&&(t.attrs.nonce=n)}return v(e,t.attrs),h(t,e),e}function v(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}function b(t,e){var o,n,r,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var c=s++;o=a||(a=m(e)),n=O.bind(null,o,c,!1),r=O.bind(null,o,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),h(t,e),e}(e),n=function(t,e,o){var n=o.css,r=o.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(n=f(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var c=new Blob([n],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(c),u&&URL.revokeObjectURL(u)}.bind(null,o,e),r=function(){y(o),o.href&&URL.revokeObjectURL(o.href)}):(o=m(e),n=function(t,e){var o=e.css,n=e.media;n&&t.setAttribute("media",n);if(t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}.bind(null,o),r=function(){y(o)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=c()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var o=d(t,e);return l(o,e),function(t){for(var n=[],r=0;r=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-checkbox",template:o(24)})],e)}(o(1).BaseFieldComponent);e.FormCheckboxComponent=u},function(t,e){t.exports='
\n \n
'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-multicheckbox",template:o(26)})],e)}(o(1).BaseFieldComponent);e.FormMultiCheckboxComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-radio",template:o(28)})],e)}(o(1).BaseFieldComponent);e.FormRadioComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-textarea",template:o(30)})],e)}(o(1).BaseFieldComponent);e.FormTextareaComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-hidden",template:o(32)})],e)}(o(1).BaseFieldComponent);e.FormInputHiddenComponent=u},function(t,e){t.exports='\n \n\n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-label",template:o(34)})],e)}(o(1).BaseFieldComponent);e.FormLabelComponent=u},function(t,e){t.exports="{{group.value[this.field.name]}}"},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=o(1),a=o(4),s=o(36),p=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-date",template:o(37),providers:[{provide:a.NgbDateAdapter,useClass:s.DatePickerAdapter}]})],e)}(u.BaseFieldComponent);e.FormDateComponent=p},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.fromModel=function(t){return"string"==typeof t&&(t=new Date(t)),t?{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}:null},e.prototype.toModel=function(t){return t?new Date(t.year,t.month-1,t.day):null},e}(o(4).NgbDateAdapter);e.DatePickerAdapter=i},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0});var i=o(0),c=o(2),u=function(){function t(){var t=this;this.localGroup=new c.FormGroup({inputs:new c.FormArray([])}),this.inputs=this.localGroup.controls.inputs,this.subscriptions=[],this.required=!1,this.onModelChange=function(t){},this.onModelTouched=function(t){},this.subscriptions.push(this.localGroup.valueChanges.subscribe(function(e){var o=t.options.filter(function(t,o){return e.inputs[o]});setTimeout(function(){t.onModelChange(o)})}))}var e;return e=t,t.prototype.ngOnInit=function(){var t=this;this.options.forEach(function(e){return t.inputs.push(new c.FormControl(!1))})},t.prototype.writeValue=function(t){var e=this;t&&this.options.forEach(function(o,n){return e.inputs.controls[n].setValue(t.indexOf(o)>-1)})},t.prototype.registerOnChange=function(t){this.onModelChange=t},t.prototype.registerOnTouched=function(t){this.onModelTouched=t},t.prototype.setDisabledState=function(t){t?this.localGroup.disable():this.localGroup.enable()},t.prototype.ngOnDestroy=function(){this.subscriptions.forEach(function(t){return t.unsubscribe()})},t.prototype.validate=function(){var t={},e=!0,o=this.inputs.value.some(function(t){return t});return this.required&&!o&&(t.required=!0,e=!1),e?null:t},n([i.Input(),r("design:type",Array)],t.prototype,"options",void 0),n([i.Input(),r("design:type",Object)],t.prototype,"required",void 0),t=e=n([i.Component({providers:[{multi:!0,provide:c.NG_VALUE_ACCESSOR,useExisting:e},{multi:!0,provide:c.NG_VALIDATORS,useExisting:e}],selector:"multicheckbox-control",template:o(39)}),r("design:paramtypes",[])],t)}();e.MulticheckboxControlComponent=u},function(t,e){t.exports='
\n
\n
\n \n
\n
\n
'},function(t,e){t.exports=require("ngx-quill")},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"layout-basic",template:o(43)})],e)}(o(42).BaseLayout);e.BasicLayoutComponent=u},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0});var i=o(0),c=o(2),u=o(3),a=function(){function t(){}var e,o;return n([i.Input(),r("design:type","function"==typeof(e=void 0!==u.FormConfig&&u.FormConfig)?e:Object)],t.prototype,"formConfig",void 0),n([i.Input(),r("design:type",Object)],t.prototype,"model",void 0),n([i.Input(),r("design:type",Object)],t.prototype,"lookups",void 0),n([i.Input(),r("design:type","function"==typeof(o=void 0!==c.FormGroup&&c.FormGroup)?o:Object)],t.prototype,"group",void 0),t}();e.BaseLayout=a},function(t,e){t.exports='
\n
\n

{{formConfig.title}}

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
'},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=this&&this.__param||function(t,e){return function(o,n){e(o,n,t)}};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=o(2),a=o(3),s=function(){function t(t,e,o,n){this.resolver=t,this.container=e,this.fb=o,this.inputs=n}var e,o,s,p,f,l;return t.prototype.ngOnInit=function(){if(!this.group)throw new Error("group is not set");if(!this.inputs[this.field.type])throw new Error('Input with type "'+this.field.type+'" was not found');var t=this.inputs[this.field.type],e=this.resolver.resolveComponentFactory(t);this.component=this.container.createComponent(e),this.component.instance.field=this.field,this.component.instance.group=this.group,this.component.instance.model=this.model,this.group.addControl(this.field.name,this.createControl(this.field)),this.model&&this.model[this.field.name]&&this.group.get(this.field.name).patchValue(this.model[this.field.name])},t.prototype.createControl=function(t){var e=t.disabled,o=t.required,n=t.minLength,r=t.maxLength,i=t.email,c=t.min,a=t.max,s=t.pattern,p=t.value,f=t.requiredTrue,l=[];return void 0!==o&&o&&l.push(u.Validators.required),void 0!==n&&l.push(u.Validators.minLength(n)),void 0!==r&&l.push(u.Validators.maxLength(r)),void 0!==i&&l.push(u.Validators.email),void 0!==c&&l.push(u.Validators.min(c)),void 0!==a&&l.push(u.Validators.max(a)),void 0!==s&&l.push(u.Validators.pattern(s)),f&&l.push(u.Validators.requiredTrue),this.fb.control({disabled:e,value:p},l)},t.prototype.ngOnDestroy=function(){this.component&&this.component.destroy()},n([c.Input(),r("design:type","function"==typeof(e=void 0!==a.FieldConfig&&a.FieldConfig)?e:Object)],t.prototype,"field",void 0),n([c.Input(),r("design:type","function"==typeof(o=void 0!==u.FormGroup&&u.FormGroup)?o:Object)],t.prototype,"group",void 0),n([c.Input(),r("design:type",Object)],t.prototype,"model",void 0),t=n([c.Directive({selector:"[dynamicField]"}),i(3,c.Inject(a.FIELD_DICT_TOKEN)),r("design:paramtypes",["function"==typeof(s=void 0!==c.ComponentFactoryResolver&&c.ComponentFactoryResolver)?s:Object,"function"==typeof(p=void 0!==c.ViewContainerRef&&c.ViewContainerRef)?p:Object,"function"==typeof(f=void 0!==u.FormBuilder&&u.FormBuilder)?f:Object,"function"==typeof(l=void 0!==a.FieldDictionary&&a.FieldDictionary)?l:Object])],t)}();e.DynamicFieldDirective=s}])}); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ngxForms=e():t.ngxForms=e()}(window,function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s=5)}([function(t,e){t.exports=require("@angular/core")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){return function(){}}();e.BaseFieldComponent=n},function(t,e){t.exports=require("@angular/forms")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.FIELD_DICT_TOKEN="FIELD_DICT_TOKEN",e.LAYOUTS_TOKEN="LAYOUTS_TOKEN"},function(t,e){t.exports=require("@ng-bootstrap/ng-bootstrap")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),o(6),function(t){for(var o in t)e.hasOwnProperty(o)||(e[o]=t[o])}(o(7))},function(t,e){t.exports=require("reflect-metadata")},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var r=o(0),i=o(8),c=o(2),u=o(9),a=o(10),s=o(3),f=o(11),p=o(40),l=o(4),d=o(41),h=o(44),y={basic:d.BasicLayoutComponent},m=function(){function t(){}var e;return e=t,t.forRoot=function(t){var o=t.fieldDictionary,n=t.layoutDictionary;return o&&Object.keys(o).forEach(function(t){return f.Fields[t]=o[t]}),n&&Object.keys(n).forEach(function(t){return y[t]=n[t]}),{ngModule:e,providers:[{provide:s.FIELD_DICT_TOKEN,useValue:f.Fields},{provide:s.LAYOUTS_TOKEN,useValue:y}]}},t=e=n([r.NgModule({imports:[i.CommonModule,a.BrowserAnimationsModule,c.ReactiveFormsModule,c.FormsModule,p.QuillModule,l.NgbModule],declarations:[u.DynamicFormDirective,f.FieldComponents,f.CustomInputs,d.BasicLayoutComponent,h.DynamicFieldDirective],entryComponents:[f.FieldComponents,d.BasicLayoutComponent],exports:[h.DynamicFieldDirective,u.DynamicFormDirective],providers:[{provide:s.FIELD_DICT_TOKEN,useValue:f.Fields},{provide:s.LAYOUTS_TOKEN,useValue:y}],schemas:[r.NO_ERRORS_SCHEMA]})],t)}();e.NgxFormModule=m},function(t,e){t.exports=require("@angular/common")},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=this&&this.__param||function(t,e){return function(o,n){e(o,n,t)}};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=o(2),a=o(3),s=function(){function t(t,e,o){this.componentFactoryResolver=t,this.container=e,this.layouts=o,this.group=new u.FormGroup({})}var e,o,s,f;return Object.defineProperty(t.prototype,"changes",{get:function(){return this.group.valueChanges},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"valid",{get:function(){return this.group.valid},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.group.value},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"rawValue",{get:function(){return this.group.getRawValue()},enumerable:!0,configurable:!0}),t.prototype.ngOnInit=function(){if(!this.layouts[this.formConfig.layout])throw new Error('Layout with name "'+this.formConfig.layout+'" was not found');var t=this.layouts[this.formConfig.layout],e=this.componentFactoryResolver.resolveComponentFactory(t),o=this.container.createComponent(e);o.instance.group=this.group,o.instance.formConfig=this.formConfig,o.instance.model=this.model},t.prototype.ngAfterViewInit=function(){this.readOnly&&this.group.disable()},n([c.Input(),r("design:type","function"==typeof(e=void 0!==a.FormConfig&&a.FormConfig)?e:Object)],t.prototype,"formConfig",void 0),n([c.Input(),r("design:type",Object)],t.prototype,"model",void 0),n([c.Input(),r("design:type",Boolean)],t.prototype,"readOnly",void 0),t=n([c.Directive({exportAs:"dynamicForm",selector:"dynamic-form"}),i(2,c.Inject(a.LAYOUTS_TOKEN)),r("design:paramtypes",["function"==typeof(o=void 0!==c.ComponentFactoryResolver&&c.ComponentFactoryResolver)?o:Object,"function"==typeof(s=void 0!==c.ViewContainerRef&&c.ViewContainerRef)?s:Object,"function"==typeof(f=void 0!==a.LayoutDictionary&&a.LayoutDictionary)?f:Object])],t)}();e.DynamicFormDirective=s},function(t,e){t.exports=require("@angular/platform-browser/animations")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o(12),r=o(14),i=o(16),c=o(23),u=o(25),a=o(27),s=o(29),f=o(31),p=o(33),l=o(35),d=o(38);e.Fields={text:n.FormInputComponent,select:r.FormSelectComponent,multicheckbox:u.FormMultiCheckboxComponent,editor:i.FormTextEditorComponent,textarea:s.FormTextareaComponent,hidden:f.FormInputHiddenComponent,radio:a.FormRadioComponent,checkbox:c.FormCheckboxComponent,label:p.FormLabelComponent,date:l.FormDateComponent},e.FieldComponents=[n.FormInputComponent,r.FormSelectComponent,u.FormMultiCheckboxComponent,i.FormTextEditorComponent,s.FormTextareaComponent,f.FormInputHiddenComponent,a.FormRadioComponent,c.FormCheckboxComponent,p.FormLabelComponent,l.FormDateComponent],e.CustomInputs=[d.MulticheckboxControlComponent]},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-input",template:o(13)})],e)}(o(1).BaseFieldComponent);e.FormInputComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-select",template:o(15)})],e)}(o(1).BaseFieldComponent);e.FormSelectComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.quillToolbar={toolbar:["bold","italic","underline","strike",{header:1},{header:2},{list:"ordered"},{list:"bullet"},"blockquote","code-block","link"]},e}return r(e,t),e=i([c.Component({selector:"form-text-editor",template:o(17),styles:[o(18).toString()]})],e)}(o(1).BaseFieldComponent);e.FormTextEditorComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){var n=o(19);"string"==typeof n&&(n=[[t.i,n,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};o(21)(n,r);n.locals&&(t.exports=n.locals)},function(t,e,o){(t.exports=o(20)(!1)).push([t.i,"form-text-editor .ql-container.ql-disabled {\n background-color: #e9ecef; }\n\nform-text-editor .ql-editor {\n min-height: 200px; }\n",""])},function(t,e,o){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var o=function(t,e){var o=t[1]||"",n=t[3];if(!n)return o;if(e&&"function"==typeof btoa){var r=(c=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(c))))+" */"),i=n.sources.map(function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"});return[o].concat(i).concat([r]).join("\n")}var c;return[o].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+o+"}":o}).join("")},e.i=function(t,o){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},r=0;r=0&&f.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return o.nc}();n&&(t.attrs.nonce=n)}return v(e,t.attrs),h(t,e),e}function v(t,e){Object.keys(e).forEach(function(o){t.setAttribute(o,e[o])})}function b(t,e){var o,n,r,i;if(e.transform&&t.css){if(!(i=e.transform(t.css)))return function(){};t.css=i}if(e.singleton){var c=s++;o=a||(a=m(e)),n=O.bind(null,o,c,!1),r=O.bind(null,o,c,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(o=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),h(t,e),e}(e),n=function(t,e,o){var n=o.css,r=o.sourceMap,i=void 0===e.convertToAbsoluteUrls&&r;(e.convertToAbsoluteUrls||i)&&(n=p(n));r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var c=new Blob([n],{type:"text/css"}),u=t.href;t.href=URL.createObjectURL(c),u&&URL.revokeObjectURL(u)}.bind(null,o,e),r=function(){y(o),o.href&&URL.revokeObjectURL(o.href)}):(o=m(e),n=function(t,e){var o=e.css,n=e.media;n&&t.setAttribute("media",n);if(t.styleSheet)t.styleSheet.cssText=o;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(o))}}.bind(null,o),r=function(){y(o)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else r()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=c()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var o=d(t,e);return l(o,e),function(t){for(var n=[],r=0;r=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-checkbox",template:o(24)})],e)}(o(1).BaseFieldComponent);e.FormCheckboxComponent=u},function(t,e){t.exports='
\n \n
'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-multicheckbox",template:o(26)})],e)}(o(1).BaseFieldComponent);e.FormMultiCheckboxComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-radio",template:o(28)})],e)}(o(1).BaseFieldComponent);e.FormRadioComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-textarea",template:o(30)})],e)}(o(1).BaseFieldComponent);e.FormTextareaComponent=u},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-hidden",template:o(32)})],e)}(o(1).BaseFieldComponent);e.FormInputHiddenComponent=u},function(t,e){t.exports='\n \n\n'},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-label",template:o(34)})],e)}(o(1).BaseFieldComponent);e.FormLabelComponent=u},function(t,e){t.exports="{{group.value[this.field.name]}}"},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=o(1),a=o(4),s=o(36),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"form-date",template:o(37),providers:[{provide:a.NgbDateAdapter,useClass:s.DatePickerAdapter}]})],e)}(u.BaseFieldComponent);e.FormDateComponent=f},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)});Object.defineProperty(e,"__esModule",{value:!0});var i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.fromModel=function(t){return"string"==typeof t&&(t=new Date(t)),t?{year:t.getFullYear(),month:t.getMonth()+1,day:t.getDate()}:null},e.prototype.toModel=function(t){return t?new Date(t.year,t.month-1,t.day):null},e}(o(4).NgbDateAdapter);e.DatePickerAdapter=i},function(t,e){t.exports='\n \n'},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0});var i=o(0),c=o(2),u=function(){function t(){var t=this;this.localGroup=new c.FormGroup({inputs:new c.FormArray([])}),this.inputs=this.localGroup.controls.inputs,this.subscriptions=[],this.required=!1,this.onModelChange=function(t){},this.onModelTouched=function(t){},this.subscriptions.push(this.localGroup.valueChanges.subscribe(function(e){var o=t.options.filter(function(t,o){return e.inputs[o]});setTimeout(function(){t.onModelChange(o)})}))}var e;return e=t,t.prototype.ngOnInit=function(){var t=this;this.options.forEach(function(e){return t.inputs.push(new c.FormControl(!1))})},t.prototype.writeValue=function(t){var e=this;t&&this.options.forEach(function(o,n){return e.inputs.controls[n].setValue(t.indexOf(o)>-1)})},t.prototype.registerOnChange=function(t){this.onModelChange=t},t.prototype.registerOnTouched=function(t){this.onModelTouched=t},t.prototype.setDisabledState=function(t){t?this.localGroup.disable():this.localGroup.enable()},t.prototype.ngOnDestroy=function(){this.subscriptions.forEach(function(t){return t.unsubscribe()})},t.prototype.validate=function(){var t={},e=!0,o=this.inputs.value.some(function(t){return t});return this.required&&!o&&(t.required=!0,e=!1),e?null:t},n([i.Input(),r("design:type",Array)],t.prototype,"options",void 0),n([i.Input(),r("design:type",Object)],t.prototype,"required",void 0),t=e=n([i.Component({providers:[{multi:!0,provide:c.NG_VALUE_ACCESSOR,useExisting:e},{multi:!0,provide:c.NG_VALIDATORS,useExisting:e}],selector:"multicheckbox-control",template:o(39)}),r("design:paramtypes",[])],t)}();e.MulticheckboxControlComponent=u},function(t,e){t.exports='
\n
\n
\n \n
\n
\n
'},function(t,e){t.exports=require("ngx-quill")},function(t,e,o){"use strict";var n,r=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])})(t,e)},function(t,e){function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}),i=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e=i([c.Component({selector:"layout-basic",template:o(43)})],e)}(o(42).BaseLayout);e.BasicLayoutComponent=u},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)};Object.defineProperty(e,"__esModule",{value:!0});var i=o(0),c=o(2),u=o(3),a=function(){function t(){}var e,o;return n([i.Input(),r("design:type","function"==typeof(e=void 0!==u.FormConfig&&u.FormConfig)?e:Object)],t.prototype,"formConfig",void 0),n([i.Input(),r("design:type",Object)],t.prototype,"model",void 0),n([i.Input(),r("design:type","function"==typeof(o=void 0!==c.FormGroup&&c.FormGroup)?o:Object)],t.prototype,"group",void 0),t}();e.BaseLayout=a},function(t,e){t.exports='
\n
\n

{{formConfig.title}}

\n
\n
\n \n
\n
\n
\n
\n
\n
\n
'},function(t,e,o){"use strict";var n=this&&this.__decorate||function(t,e,o,n){var r,i=arguments.length,c=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,e,o,n);else for(var u=t.length-1;u>=0;u--)(r=t[u])&&(c=(i<3?r(c):i>3?r(e,o,c):r(e,o))||c);return i>3&&c&&Object.defineProperty(e,o,c),c},r=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},i=this&&this.__param||function(t,e){return function(o,n){e(o,n,t)}};Object.defineProperty(e,"__esModule",{value:!0});var c=o(0),u=o(2),a=o(3),s=function(){function t(t,e,o,n){this.resolver=t,this.container=e,this.fb=o,this.inputs=n}var e,o,s,f,p,l;return t.prototype.ngOnInit=function(){if(!this.group)throw new Error("group is not set");if(!this.inputs[this.field.type])throw new Error('Input with type "'+this.field.type+'" was not found');var t=this.inputs[this.field.type],e=this.resolver.resolveComponentFactory(t);this.component=this.container.createComponent(e),this.component.instance.field=this.field,this.component.instance.group=this.group,this.component.instance.model=this.model,this.group.addControl(this.field.name,this.createControl(this.field)),this.model&&this.model[this.field.name]&&this.group.get(this.field.name).patchValue(this.model[this.field.name])},t.prototype.createControl=function(t){var e=t.disabled,o=t.required,n=t.minLength,r=t.maxLength,i=t.email,c=t.min,a=t.max,s=t.pattern,f=t.value,p=t.requiredTrue,l=[];return void 0!==o&&o&&l.push(u.Validators.required),void 0!==n&&l.push(u.Validators.minLength(n)),void 0!==r&&l.push(u.Validators.maxLength(r)),void 0!==i&&l.push(u.Validators.email),void 0!==c&&l.push(u.Validators.min(c)),void 0!==a&&l.push(u.Validators.max(a)),void 0!==s&&l.push(u.Validators.pattern(s)),p&&l.push(u.Validators.requiredTrue),this.fb.control({disabled:e,value:f},l)},t.prototype.ngOnDestroy=function(){this.component&&this.component.destroy()},n([c.Input(),r("design:type","function"==typeof(e=void 0!==a.FieldConfig&&a.FieldConfig)?e:Object)],t.prototype,"field",void 0),n([c.Input(),r("design:type","function"==typeof(o=void 0!==u.FormGroup&&u.FormGroup)?o:Object)],t.prototype,"group",void 0),n([c.Input(),r("design:type",Object)],t.prototype,"model",void 0),t=n([c.Directive({selector:"[dynamicField]"}),i(3,c.Inject(a.FIELD_DICT_TOKEN)),r("design:paramtypes",["function"==typeof(s=void 0!==c.ComponentFactoryResolver&&c.ComponentFactoryResolver)?s:Object,"function"==typeof(f=void 0!==c.ViewContainerRef&&c.ViewContainerRef)?f:Object,"function"==typeof(p=void 0!==u.FormBuilder&&u.FormBuilder)?p:Object,"function"==typeof(l=void 0!==a.FieldDictionary&&a.FieldDictionary)?l:Object])],t)}();e.DynamicFieldDirective=s}])}); \ No newline at end of file diff --git a/src/app/dynamic-form/dynamic-form.component.ts b/src/app/dynamic-form/dynamic-form.component.ts index d0523e7..a8c5dc4 100644 --- a/src/app/dynamic-form/dynamic-form.component.ts +++ b/src/app/dynamic-form/dynamic-form.component.ts @@ -9,7 +9,6 @@ import { FormConfig, LayoutDictionary, LAYOUTS_TOKEN, Layout } from '../../types export class DynamicFormDirective implements OnInit, AfterViewInit { @Input() formConfig: FormConfig; @Input() model: any; - @Input() lookups: any; @Input() readOnly: boolean; public group: FormGroup; @@ -34,7 +33,6 @@ export class DynamicFormDirective implements OnInit, AfterViewInit { component.instance.group = this.group; component.instance.formConfig = this.formConfig; component.instance.model = this.model; - component.instance.lookups = this.lookups; } ngAfterViewInit() { diff --git a/src/app/layouts/base-layout.ts b/src/app/layouts/base-layout.ts index 3c14496..d365626 100644 --- a/src/app/layouts/base-layout.ts +++ b/src/app/layouts/base-layout.ts @@ -5,6 +5,5 @@ import { FormConfig, Layout } from '../../types'; export class BaseLayout implements Layout { @Input() formConfig: FormConfig; @Input() model: any; - @Input() lookups: object; @Input() group: FormGroup; } From b80c6436538902a871938d9388f8450e944ec016 Mon Sep 17 00:00:00 2001 From: Artem Serebryakov Date: Mon, 10 Jun 2019 13:26:21 -0400 Subject: [PATCH 07/17] fix: lint --- package.json | 35 ++++++++++++------- .../multicheckbox-control.component.ts | 2 +- src/types.ts | 5 ++- tslint.json | 3 +- 4 files changed, 28 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 4c04826..968cd5e 100644 --- a/package.json +++ b/package.json @@ -15,29 +15,40 @@ "lint:fix": "tslint --fix -p tsconfig.json -c tslint.json", "lint": "tslint -p tsconfig.json -c tslint.json" }, + "peerDependencies": { + "@angular/animations": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "@angular/common": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "@angular/compiler": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "@angular/core": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "@angular/forms": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "@angular/platform-browser": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "@angular/platform-browser-dynamic": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", + "quill": "^1.3.6", + "rxjs": "^5.5.2 || ^6.1.0 || ^6.3.0 || ^6.4.0 || ^6.5.0" + }, "dependencies": { - "@angular/animations": "^6.0.4", - "@angular/common": "^6.0.4", - "@angular/compiler": "^6.0.4", - "@angular/core": "^6.0.4", - "@angular/forms": "^6.0.4", - "@angular/http": "^6.0.4", - "@angular/platform-browser": "^6.0.4", - "@angular/platform-browser-dynamic": "^6.0.4", "@ng-bootstrap/ng-bootstrap": "^4.1.1", "bootstrap": "^4.3.1", "core-js": "^2.4.1", "fork-ts-checker-webpack-plugin": "^1.0.0", "ngx-chips": "^1.9.1", "ngx-quill": "^4.4.2", - "quill": "^1.3.6", "reflect-metadata": "^0.1.12", "rxjs": "^6.2.0", "rxjs-compat": "^6.2.0", "zone.js": "^0.8.18" }, "devDependencies": { - "@angular/compiler-cli": "^6.0.4", + "@angular/animations": "^8.0.0", + "@angular/common": "^8.0.0", + "@angular/compiler": "^8.0.0", + "@angular/core": "^8.0.0", + "@angular/forms": "^8.0.0", + "@angular/platform-browser": "^8.0.0", + "@angular/platform-browser-dynamic": "^8.0.0", + "quill": "^1.3.6", + "rxjs": "^6.5.0", + "@angular/compiler-cli": "^8.0.0", "@commitlint/cli": "^7.0.0", "@commitlint/config-conventional": "^7.0.1", "@labshare/semantic-release-config": "^1.0.0", @@ -58,7 +69,7 @@ "karma-phantomjs-launcher": "^1.0.4", "karma-sourcemap-loader": "^0.3.7", "karma-typescript": "^4.0.0", - "karma-webpack": "^4.0.0-beta.0", + "karma-webpack": "^4.0.2", "node-sass": "^4.9.0", "null-loader": "^0.1.1", "sass-loader": "7.1.0", @@ -66,7 +77,7 @@ "style-loader": "^0.22.0", "ts-loader": "^4.3.0", "tslint-angular": "^1.1.0", - "typescript": "^3.2.2", + "typescript": "^3.5.1", "url-loader": "1.1.1", "webpack": "^4.10.2", "webpack-cli": "^3.1.2", diff --git a/src/app/fields/form-multicheckbox/multicheckbox-control/multicheckbox-control.component.ts b/src/app/fields/form-multicheckbox/multicheckbox-control/multicheckbox-control.component.ts index 7f472b3..246944b 100644 --- a/src/app/fields/form-multicheckbox/multicheckbox-control/multicheckbox-control.component.ts +++ b/src/app/fields/form-multicheckbox/multicheckbox-control/multicheckbox-control.component.ts @@ -1,5 +1,5 @@ import { Component, Input, OnInit, OnDestroy } from '@angular/core'; -import { ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validator, FormControl, FormGroup, FormArray, Validators } from '@angular/forms'; +import { ControlValueAccessor, NG_VALIDATORS, NG_VALUE_ACCESSOR, Validator, FormControl, FormGroup, FormArray } from '@angular/forms'; import { Subscription } from 'rxjs'; @Component({ diff --git a/src/types.ts b/src/types.ts index 1254cd3..2eb1530 100644 --- a/src/types.ts +++ b/src/types.ts @@ -33,8 +33,8 @@ export interface FieldDictionary { [key: string]: Type; } export interface LayoutDictionary { [key: string]: Type; } -export const FIELD_DICT_TOKEN = "FIELD_DICT_TOKEN"; -export const LAYOUTS_TOKEN = "LAYOUTS_TOKEN"; +export const FIELD_DICT_TOKEN = 'FIELD_DICT_TOKEN'; +export const LAYOUTS_TOKEN = 'LAYOUTS_TOKEN'; export interface Layout { group: FormGroup; @@ -42,7 +42,6 @@ export interface Layout { model: any; } - export interface FormConfig { form: any; layout: any; diff --git a/tslint.json b/tslint.json index 53fdc51..db5a411 100644 --- a/tslint.json +++ b/tslint.json @@ -3,6 +3,7 @@ "rules": { "max-line-length": { "options": [300] - } + }, + "no-unused-variable": true } } \ No newline at end of file From a7c12d5577bd0130301654b1c74944856ed99f61 Mon Sep 17 00:00:00 2001 From: Artem Serebryakov Date: Mon, 10 Jun 2019 14:15:23 -0400 Subject: [PATCH 08/17] chore(test): fixed tests --- src/app/dynamic-field/dynamic-field.directive.spec.ts | 6 ++++++ src/app/dynamic-form/dynamic-form.component.spec.ts | 3 +-- src/app/layouts/basic/basic-layout.component.spec.ts | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/app/dynamic-field/dynamic-field.directive.spec.ts b/src/app/dynamic-field/dynamic-field.directive.spec.ts index 611bdff..09032cc 100644 --- a/src/app/dynamic-field/dynamic-field.directive.spec.ts +++ b/src/app/dynamic-field/dynamic-field.directive.spec.ts @@ -92,6 +92,12 @@ describe('DynamicFieldDirective', () => { let cfg = { name: 'test', type: 'text', disabled: true, required: true, minLength: 5, maxLength: 10, email: true, min: 1, max: 10, pattern: new RegExp('\d'), nullValidator: true, value: 5 }; + it('should test', () => { + dir.model = { "publicationTitle": "123"} + dir.ngOnInit(); + expect(dir.group.value['publicationTitle']).toEqual("123"); + }); + it('shoulld test constructor', () => { DynamicFieldDirective.constructor(); expect(dir).toBeTruthy(); diff --git a/src/app/dynamic-form/dynamic-form.component.spec.ts b/src/app/dynamic-form/dynamic-form.component.spec.ts index dd4ade1..83115bb 100644 --- a/src/app/dynamic-form/dynamic-form.component.spec.ts +++ b/src/app/dynamic-form/dynamic-form.component.spec.ts @@ -24,12 +24,11 @@ export class FormInputComponent implements Field { const defaultInputs: FieldDictionary = { text: FormInputComponent } const layouts = { test: LayoutComponent } -@Component({ template: `` }) +@Component({ template: `` }) class TestComponent { formConfig data: {}; dynamicForm: {}; - lookups: {}; model: any } diff --git a/src/app/layouts/basic/basic-layout.component.spec.ts b/src/app/layouts/basic/basic-layout.component.spec.ts index 319ff06..5ccfc9b 100644 --- a/src/app/layouts/basic/basic-layout.component.spec.ts +++ b/src/app/layouts/basic/basic-layout.component.spec.ts @@ -21,13 +21,12 @@ const defaultInputs: FieldDictionary = { } @Component({ - template: `` + template: `` }) class TestComponent { formConfig data: {}; dynamicForm: {}; - lookups: {}; } @NgModule({ From 0adcd9194c50af32e7d6a3d55d10231feeab7ac5 Mon Sep 17 00:00:00 2001 From: Artem Serebryakov Date: Mon, 10 Jun 2019 14:31:32 -0400 Subject: [PATCH 09/17] fix: lint --- tslint.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tslint.json b/tslint.json index db5a411..53fdc51 100644 --- a/tslint.json +++ b/tslint.json @@ -3,7 +3,6 @@ "rules": { "max-line-length": { "options": [300] - }, - "no-unused-variable": true + } } } \ No newline at end of file From ab943bd25ba4ede7c614f89775abc27668f9c6e9 Mon Sep 17 00:00:00 2001 From: Artem Serebryakov Date: Mon, 10 Jun 2019 14:50:09 -0400 Subject: [PATCH 10/17] fix: added tslint dep --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 2e97e40..8606eb4 100644 --- a/package.json +++ b/package.json @@ -78,6 +78,7 @@ "style-loader": "^0.22.0", "ts-loader": "^4.3.0", "tslint-angular": "^2.0.0", + "tslint": "^5.17.0", "typescript": "^3.2.2", "url-loader": "1.1.1", "webpack": "^4.10.2", From b7fb69d3e484d761c61e940ce948221a800f5651 Mon Sep 17 00:00:00 2001 From: Artem Serebryakov Date: Mon, 10 Jun 2019 15:24:03 -0400 Subject: [PATCH 11/17] fix: fixed lint --- package.json | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 8606eb4..a0d5277 100644 --- a/package.json +++ b/package.json @@ -15,18 +15,15 @@ "lint:fix": "tslint --fix -p tsconfig.json -c tslint.json", "lint": "tslint -p tsconfig.json -c tslint.json" }, - "peerDependencies": { - "@angular/animations": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "@angular/common": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "@angular/compiler": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "@angular/core": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "@angular/forms": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "@angular/platform-browser": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "@angular/platform-browser-dynamic": "^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0", - "quill": "^1.3.6", - "rxjs": "^5.5.2 || ^6.1.0 || ^6.3.0 || ^6.4.0 || ^6.5.0" - }, "dependencies": { + "@angular/animations": "^6.0.4", + "@angular/common": "^6.0.4", + "@angular/compiler": "^6.0.4", + "@angular/core": "^6.0.4", + "@angular/forms": "^6.0.4", + "@angular/http": "^6.0.4", + "@angular/platform-browser": "^6.0.4", + "@angular/platform-browser-dynamic": "^6.0.4", "@ng-bootstrap/ng-bootstrap": "^4.1.1", "bootstrap": "^4.3.1", "core-js": "^2.4.1", @@ -40,22 +37,14 @@ "zone.js": "^0.8.18" }, "devDependencies": { - "@angular/animations": "^8.0.0", - "@angular/common": "^8.0.0", - "@angular/compiler": "^8.0.0", - "@angular/core": "^8.0.0", - "@angular/forms": "^8.0.0", - "@angular/platform-browser": "^8.0.0", - "@angular/platform-browser-dynamic": "^8.0.0", - "quill": "^1.3.6", - "rxjs": "^6.5.0", - "@angular/compiler-cli": "^8.0.0", + "@angular/compiler-cli": "^6.0.4", "@commitlint/cli": "^7.0.0", "@commitlint/config-conventional": "^7.0.1", "@labshare/semantic-release-config": "^1.0.0", "@ngtools/webpack": "^1.3.3", "@types/jasmine": "^3.0.0", "@types/node": "^11.9.0", + "codelyzer": "^5.1.0", "css-loader": "^2.1.0", "html-loader": "0.5.5", "html-webpack-plugin": "3.2.0", @@ -70,15 +59,15 @@ "karma-phantomjs-launcher": "^1.0.4", "karma-sourcemap-loader": "^0.3.7", "karma-typescript": "^4.0.0", - "karma-webpack": "^4.0.2", + "karma-webpack": "^4.0.0-beta.0", "node-sass": "^4.9.0", "null-loader": "^0.1.1", "sass-loader": "7.1.0", "semantic-release": "^15.5.0", "style-loader": "^0.22.0", "ts-loader": "^4.3.0", - "tslint-angular": "^2.0.0", "tslint": "^5.17.0", + "tslint-angular": "^2.0.0", "typescript": "^3.2.2", "url-loader": "1.1.1", "webpack": "^4.10.2", From d6830ff9b579b0f7205852bfd9cb2ed214875e35 Mon Sep 17 00:00:00 2001 From: Artem Serebryakov Date: Mon, 10 Jun 2019 15:44:16 -0400 Subject: [PATCH 12/17] fix: readme BREAKING CHANGE: major update under the hood --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0b3a98d..faba35c 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ Dynamic form generator. This module provides components that wrap angular 2+ For ![Alt text](/imgs/readmess.png?raw=true "Optional Title") ## Requirements -- angular 2+ +- angular 6+ ## Installation -`npm install` +`npm i --save @labshare/ngx-forms` ## Linking `npm run build:watch` From 1003d576db7b9d897527066ebfda6fa411117b3a Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 10 Jun 2019 20:03:10 +0000 Subject: [PATCH 13/17] chore(release): 7.0.0 [skip ci] # [7.0.0](https://github.com/LabShare/ngx-forms/compare/v6.0.0...v7.0.0) (2019-06-10) ### Bug Fixes * readme ([d6830ff](https://github.com/LabShare/ngx-forms/commit/d6830ff)) ### BREAKING CHANGES * major update under the hood --- CHANGELOG.md | 12 ++++++++++++ package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index efd6b90..6b3e890 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,15 @@ +# [7.0.0](https://github.com/LabShare/ngx-forms/compare/v6.0.0...v7.0.0) (2019-06-10) + + +### Bug Fixes + +* readme ([d6830ff](https://github.com/LabShare/ngx-forms/commit/d6830ff)) + + +### BREAKING CHANGES + +* major update under the hood + ## [5.6.2](https://github.com/LabShare/ngx-forms/compare/v5.6.1...v5.6.2) (2019-05-01) diff --git a/package.json b/package.json index a0d5277..9463a19 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@labshare/ngx-forms", - "version": "5.6.2", + "version": "7.0.0", "main": "dist/ngx-forms", "typings": "index.d.ts", "scripts": { From 8c46464f3c3d8e55b125a618cc92327786f9e99a Mon Sep 17 00:00:00 2001 From: artemnih Date: Mon, 10 Jun 2019 16:23:24 -0400 Subject: [PATCH 14/17] Update README.md --- README.md | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index faba35c..bde5800 100644 --- a/README.md +++ b/README.md @@ -4,25 +4,37 @@ # ngx-forms -Dynamic form generator. This module provides components that wrap angular 2+ FormBuilder styled with Bootstrap CSS 4 -![Alt text](/imgs/readmess.png?raw=true "Optional Title") +Dynamic form generator, creates Angular Reactive forms from json schema -## Requirements -- angular 6+ +![Alt text](/imgs/readmess.png?raw=true "Optional Title") ## Installation `npm i --save @labshare/ngx-forms` -## Linking -`npm run build:watch` - ## Usage Add html tag with bindings -`` +``` + +``` + - `config` - json array that contains fields definitions - `#form="dynamicForm"` - bind to `dynamicForm` object that has form output - `model` - preload data. One way binding only +Add reference in the component controller +``` +export class MyFormComponent { + @ViewChild('form') public formReference: DynamicFormDirective; + + public const config = [ + { type: 'text', label: 'Title', name: 'title' } + ]; + + public const model = { title: "Example" } + +} +``` + ## Config example ```javascript [ @@ -62,3 +74,9 @@ Name | Type | Description | Example - `radio` - radio buttons - `checkbox` - checkbox buttons - `date` - datepicker + +## Linking for Development +``` +npm run link +npm run build:watch +``` From 6600e607f9ee0e0fae3451925e74fcdb92ff86ee Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 11 Jun 2019 13:01:31 +0000 Subject: [PATCH 15/17] chore(package): update css-loader to version 3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ad8815..6432f99 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "@types/jasmine": "^3.0.0", "@types/node": "^11.9.0", "codelyzer": "^5.1.0", - "css-loader": "^2.1.0", + "css-loader": "^3.0.0", "html-loader": "0.5.5", "html-webpack-plugin": "3.2.0", "husky": "^2.0.0", From 60f1fa00175539ddbd2cd0fa2f33cfb5c88f243e Mon Sep 17 00:00:00 2001 From: "greenkeeper[bot]" Date: Tue, 11 Jun 2019 21:06:49 +0000 Subject: [PATCH 16/17] fix(package): update ngx-chips to version 2.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ad8815..23282f1 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "bootstrap": "^4.3.1", "core-js": "^2.4.1", "fork-ts-checker-webpack-plugin": "^1.0.0", - "ngx-chips": "^1.9.1", + "ngx-chips": "^2.0.1", "ngx-quill": "^5.0.0", "quill": "^1.3.6", "reflect-metadata": "^0.1.12", From 78a2437b6e192e9e10fc06134af620852a2df31b Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 13 Jun 2019 17:48:55 +0000 Subject: [PATCH 17/17] chore(release): 7.0.1 [skip ci] ## [7.0.1](https://github.com/LabShare/ngx-forms/compare/v7.0.0...v7.0.1) (2019-06-13) ### Bug Fixes * **package:** update ngx-chips to version 2.0.1 ([60f1fa0](https://github.com/LabShare/ngx-forms/commit/60f1fa0)) --- CHANGELOG.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b3e890..da17ebb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [7.0.1](https://github.com/LabShare/ngx-forms/compare/v7.0.0...v7.0.1) (2019-06-13) + + +### Bug Fixes + +* **package:** update ngx-chips to version 2.0.1 ([60f1fa0](https://github.com/LabShare/ngx-forms/commit/60f1fa0)) + # [7.0.0](https://github.com/LabShare/ngx-forms/compare/v6.0.0...v7.0.0) (2019-06-10) diff --git a/package.json b/package.json index 469de2b..9a91be0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@labshare/ngx-forms", - "version": "7.0.0", + "version": "7.0.1", "main": "dist/ngx-forms", "typings": "index.d.ts", "scripts": {