UNPKG

104 kBSource Map (JSON)View Raw
1{"version":3,"sources":["../node_modules/tslib/tslib.es6.js","ng://@soushians/form/lib/models/add-form.api-model.ts","ng://@soushians/form/lib/models/edit-form.api-model.ts","ng://@soushians/form/lib/models/form-list.api-model.ts","ng://@soushians/form/lib/models/form-field-validator.model.ts","ng://@soushians/form/lib/models/field-config.model.ts","ng://@soushians/form/lib/models/form-schema.model.ts","ng://@soushians/form/lib/form.config.ts","ng://@soushians/form/lib/services/form-configuration.service.ts","ng://@soushians/form/lib/services/form.service.ts","ng://@soushians/form/lib/view/form-controls/select/select.component.ts","ng://@soushians/form/lib/view/form-controls/checkbox/checkbox.component.ts","ng://@soushians/form/lib/view/form-controls/email/email.component.ts","ng://@soushians/form/lib/view/form-controls/color/color.component.ts","ng://@soushians/form/lib/view/form-controls/table/table.component.ts","ng://@soushians/form/lib/view/form-controls/number/number.component.ts","ng://@soushians/form/lib/view/form-controls/text/text.component.ts","ng://@soushians/form/lib/list/list.actions.ts","ng://@soushians/form/lib/view/form-controls/date/date.component.ts","ng://@soushians/form/lib/view/form-controls/file/file.component.ts","ng://@soushians/form/lib/services/form-captcha.service.ts","ng://@soushians/form/lib/models/captcha.model.ts","ng://@soushians/form/lib/view/form-controls/form-captcha/form-captcha.component.ts","ng://@soushians/form/lib/view/form-view/form-view.component.ts","ng://@soushians/form/lib/list/list.reducers.ts","ng://@soushians/form/lib/main-container/main-container.reducers.ts","ng://@soushians/form/lib/add/form-group/form-group.component.ts","ng://@soushians/form/lib/add/form-array/form-array.component.ts","ng://@soushians/form/lib/add/form-control/form-control.component.ts","ng://@soushians/form/lib/edit/edit-form.actions.ts","ng://@soushians/form/lib/add/add-form.actions.ts","ng://@soushians/form/lib/add/add-form-container/add-form-container.component.ts","ng://@soushians/form/lib/edit/edit-form-container/edit-form-container.component.ts","ng://@soushians/form/lib/add/add-form/add-form.component.ts","ng://@soushians/form/lib/edit/edit-form/edit-form.component.ts","ng://@soushians/form/lib/list/form-list-container/form-list.container.component.ts","ng://@soushians/form/lib/list/form-list/form-list.component.ts","ng://@soushians/form/lib/main-container/main-container.component/main-container.component.ts","ng://@soushians/form/lib/add/add-form.effects.ts","ng://@soushians/form/lib/list/list.effects.ts","ng://@soushians/form/lib/edit/edit-form.effects.ts","ng://@soushians/form/lib/form-routing.module.ts","ng://@soushians/form/lib/add/captcha.actions.ts","ng://@soushians/form/lib/add/captcha.effects.ts","ng://@soushians/form/lib/form.module.ts"],"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","__extends","__","this","constructor","prototype","create","AddFormApiModel","EditFormApiModel","FormListApiModel","__assign","assign","t","s","i","n","arguments","length","call","apply","__decorate","decorators","target","key","desc","c","r","getOwnPropertyDescriptor","Reflect","decorate","defineProperty","__metadata","metadataKey","metadataValue","metadata","Request","initValue","_this","keys","forEach","getRequestBody","name","form","events","FormGroup","_id","FormControl","Validators","required","title","accept","show","text","cancel","Response","Name","Controls","Validator","active","message","minlength","value","email","FieldConfig","type","fields","width","validator","FormSchemaModel","init","Math","random","toString","MODULE_DEFAULT_CONFIG","env","production","frontend_server","server","endpoints","addForm","editForm","getForm","getList","deleteForm","captchaUrl","MODULE_CONFIG_TOKEN","InjectionToken","FormConfigurationService","configFile","store","config$","BehaviorSubject","_config","next","select","getFormModuleConfig","subscribe","userConfig","Config","Injectable","args","providedIn","Inject","Store","FormService","http","configurationService","add","data","model","filter","config","take","switchMap","post","map","response","Result","get","stringTemplate","update","put","delete","selectFormById","subject","undefined","state","list","pipe","forms","find","formSchemaModel","asObservable","HttpClient","SelectComponent","Component","selector","template","CheckboxComponent","EmailComponent","ngOnInit","ColorComponent","Input","TableComponent","selection","SelectionModel","ready","schema","dataEndpoint","displayedColumns","filedDisplayedColumns","dataSource","MatTableDataSource","isAllSelected","numSelected","selected","patchValue","_a","masterToggle","clear","row","NumberComponent","TextComponent","FORMS_LIST","FORMS_LIST_START","FORMS_LIST_SUCCEED","FORMS_LIST_FAILED","ADD_FORM_SCHEMA","FORM_SCHEMA_UPDATE","GET_FORM_SCHEMA","FORM_SCHEMA_FETCHED","FormsListAction","FormsListActionTypes","FormsListStartAction","FormsListSucceedAction","payload","FormsListFailedAction","UpdateFormSchemaAction","AddFormSchemaAction","GetFormSchemaAction","FormSchemaFechedAction","DateFormInputControlComponent","FileFormInputControlComponent","FormCaptchaService","getCaptcha","captcha","sendCaptcha","UpsertCaptchaApiModel","CaptchaModel","_b","captchaImg","captchaCode","Captcha","FormCaptchaComponent","service","_captcha_generate","authentication","e","refresh","FormViewComponent","compiler","resolver","unsubscribe","Subject","EventEmitter","card","formGroupCreated","schema$","takeUntil","formGroup","createFrom","id","local","dispatch","ngOnDestroy","complete","generate","parentPath","formGroupPath","parentType","validators","push","minLength","ctr","path","formGroup_1","item","addControl","formArray_1","FormArray","idx","controls","accepted","emit","canceled","Compiler","ComponentFactoryResolver","Output","components","checkbox","password","date","file","table","color","DynamicFieldDirective","container","ngOnChanges","component","instance","group","inputType","supportedTypes","join","Error","resolveComponentFactory","createComponent","Directive","ViewContainerRef","initialState","status","reducer","action","entityIdx","concat","findIndex","FormReducers","list.reducer","FormGroupComponent","noHeader","changes","changed","addFormGroup","root","addFormArray","array","addFormControl","control","deleteFormGroup","splice","FormArrayComponent","FormControlComponent","options","tableOptions","some","addOption","removeOption","insertOptions","EDIT_FORM","EDIT_FORM_START","EDIT_FORM_SUCCEED","EDIT_FORM_FAILED","EditFormAction","EditFormActionTypes","EditFormStartAction","EditFormSucceedAction","EditFormFailedAction","ADD_FORM","ADD_FORM_START","ADD_FORM_SUCCEED","ADD_FORM_FAILED","AddFormAction","AddFormActionTypes","AddFormStartAction","AddFormSucceedAction","AddFormFailedAction","AddFormContainerComponent","update_schema","EditFormContainerComponent","route","_super","tslib_1.__extends","params","formSchema","ActivatedRoute","AddFormComponent","submited","changeOrder","$event","EditFormComponent","valid","FormListContainerComponent","data$","FormListComponent","MainContainerComponent","AddFormEffects","actions$","router","AddForm$","ofType","AddFormStart$","res","catchError","of","Actions","Router","tslib_1.__decorate","Effect","FormsListEffects","EditProfileRequest$","GetForm$","get_forms_list$","EditFormEffects","EditForm$","EditFormStart$","UpdateFormsListStart$","routes","children","RoutingModule","RouterModule","forChild","GET_CAPTCHA","GET_CAPTCHA_START","GET_CAPTCHA_SUCCEED","GET_CAPTCHA_FAILED","GetCaptchaStartAction","CaptchaActionTypes","GetCaptchaSucceedAction","GetCaptchaFailedAction","CaptchaEffects","GetCaptcha$","NgsFormModule","forRoot","ngModule","RootNgsFormModule","providers","provide","useValue","NgModule","imports","HttpClientModule","FormsModule","CommonModule","MatExpansionModule","MatSnackBarModule","MatIconModule","MatDatepickerModule","MatButtonModule","MatCardModule","MatCheckboxModule","MatTableModule","MatSelectModule","MatInputModule","MatFormFieldModule","MatTabsModule","MatDividerModule","FlexLayoutModule","MatRadioModule","MatSlideToggleModule","ReactiveFormsModule","declarations","entryComponents","exports","___starter","StoreModule","forFeature","EffectsModule"],"mappings":"wkDAgBA,IAAIA,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOA,EAAEM,eAAeD,KAAIN,EAAEM,GAAKL,EAAEK,MACpDN,EAAGC,IAGrB,SAASO,EAAUR,EAAGC,GAEzB,SAASQ,IAAOC,KAAKC,YAAcX,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEY,UAAkB,OAANX,EAAaC,OAAOW,OAAOZ,IAAMQ,EAAGG,UAAYX,EAAEW,UAAW,IAAIH,GAG5E,ICxBUK,ECAAC,ECAAC,EHwBNC,EAAW,WAQlB,OAPAA,EAAWf,OAAOgB,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIf,KADTc,EAAIG,UAA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ACRR,GACAiC,EAAAA,YAAYC,WAAW,OAAQjI,IAC/BkI,EAAAA,cAAcD,WAAW,CAACtE,GAAgBiB,GAAiBJ,GAAkBqB,KAC7EX,IAED4C,QAAS,CAAC/B,8CAOXG","sourcesContent":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { HttpRequestBaseModel } from \"@soushians/shared\";\r\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\r\nimport { FormSchemaModel } from \"../models\";\r\n\r\nexport namespace AddFormApiModel {\r\n\texport class Request implements HttpRequestBaseModel<Request> {\r\n\t\t_id: string;\r\n\t\tname: string;\r\n\t\tform: any[];\r\n\t\tevents: any[];\r\n\t\tconstructor(initValue = {} as AddFormApiModel.Request) {\r\n\t\t\tObject.keys(initValue).forEach(key => (this[key] = initValue[key]));\r\n\t\t}\r\n\r\n\t\tgetRequestBody() {\r\n\t\t\treturn {\r\n\t\t\t\tname: this.name,\r\n\t\t\t\tform: this.form,\r\n\t\t\t\tevents: this.events\r\n\t\t\t};\r\n\t\t}\r\n\t\tstatic get formGroup() {\r\n\t\t\treturn new FormGroup({\r\n\t\t\t\t_id: new FormControl(\"\", [ Validators.required ]),\r\n\t\t\t\tname: new FormControl(\"\", [ Validators.required ]),\r\n\t\t\t\ttitle: new FormControl(\"\", [ Validators.required ]),\r\n\t\t\t\tform: new FormControl({}),\r\n\t\t\t\tevents: new FormGroup({\r\n\t\t\t\t\taccept: new FormGroup({\r\n\t\t\t\t\t\tshow: new FormControl(false),\r\n\t\t\t\t\t\ttext: new FormControl(\"ثبت\")\r\n\t\t\t\t\t}),\r\n\t\t\t\t\tcancel: new FormGroup({\r\n\t\t\t\t\t\tshow: new FormControl(false),\r\n\t\t\t\t\t\ttext: new FormControl(\"انصراف\")\r\n\t\t\t\t\t})\r\n\t\t\t\t})\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\texport class Response {\r\n\t\tResult: FormSchemaModel;\r\n\t\tconstructor() {}\r\n\t}\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { HttpRequestBaseModel } from \"@soushians/shared\";\r\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\r\nimport { FormSchemaModel } from \"../models\";\r\n\r\nexport namespace EditFormApiModel {\r\n\texport class Request implements HttpRequestBaseModel<Request> {\r\n\t\t_id: string;\r\n\t\tname: string;\r\n\t\tform: any[];\r\n\t\tevents: any[];\r\n\t\tconstructor(initValue = {} as EditFormApiModel.Request) {\r\n\t\t\tObject.keys(initValue).forEach(key => (this[key] = initValue[key]));\r\n\t\t}\r\n\r\n\t\tgetRequestBody() {\r\n\t\t\treturn {\r\n\t\t\t\t_id: this._id,\r\n\t\t\t\tname: this.name,\r\n\t\t\t\tform: this.form,\r\n\t\t\t\tevents: this.events\r\n\t\t\t};\r\n\t\t}\r\n\t\tstatic get formGroup() {\r\n\t\t\treturn new FormGroup({\r\n\t\t\t\t_id: new FormControl(\"\", [ Validators.required ]),\r\n\t\t\t\tname: new FormControl(\"\", [ Validators.required ]),\r\n\t\t\t\tform: new FormControl({}),\r\n\t\t\t\tevents: new FormGroup({\r\n\t\t\t\t\taccept: new FormGroup({\r\n\t\t\t\t\t\tshow: new FormControl(false),\r\n\t\t\t\t\t\ttext: new FormControl(\"ثبت\")\r\n\t\t\t\t\t}),\r\n\t\t\t\t\tcancel: new FormGroup({\r\n\t\t\t\t\t\tshow: new FormControl(false),\r\n\t\t\t\t\t\ttext: new FormControl(\"انصراف\")\r\n\t\t\t\t\t})\r\n\t\t\t\t})\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\texport class Response {\r\n\t\tResult: FormSchemaModel;\r\n\t\tconstructor() {}\r\n\t}\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { HttpRequestBaseModel } from \"@soushians/shared\";\r\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\r\nimport { FormSchemaModel } from \"../models\";\r\n\r\nexport namespace FormListApiModel {\r\n\texport class Request implements HttpRequestBaseModel<Request> {\r\n\t\tName: string;\r\n\t\tControls: object[];\r\n\t\tconstructor(initValue = {} as FormListApiModel.Request) {\r\n\t\t\tObject.keys(initValue).forEach((key) => (this[key] = initValue[key]));\r\n\t\t}\r\n\r\n\t\tgetRequestBody() {\r\n\t\t\treturn {\r\n\t\t\t\tName: this.Name,\r\n\t\t\t\tControls: this.Controls\r\n\t\t\t};\r\n\t\t}\r\n\t\tstatic get formGroup() {\r\n\t\t\treturn new FormGroup({\r\n\t\t\t\tName: new FormControl(\"\", [ Validators.required ]),\r\n\t\t\t\tControls: new FormGroup({})\r\n\t\t\t});\r\n\t\t}\r\n\t}\r\n\r\n\texport class Response {\r\n\t\tResult: FormSchemaModel[];\r\n\t\tconstructor() {}\r\n\t}\r\n}\r\n","export interface validation {\r\n\tactive: boolean;\r\n\tmessage: string;\r\n\tvalue?: any;\r\n}\r\nexport class Validator {\r\n\trequired: validation;\r\n\tminlength: validation;\r\n\temail: validation;\r\n\r\n\tconstructor() {\r\n\t\tthis.required = {\r\n\t\t\tactive: false,\r\n\t\t\tmessage: \"این فیلد الزامی است\"\r\n\t\t};\r\n\t\tthis.minlength = {\r\n\t\t\tactive: false,\r\n\t\t\tmessage: \"حداقل تعداد کارکترها\",\r\n\t\t\tvalue: 5\r\n\t\t};\r\n\t\tthis.email = {\r\n\t\t\tactive: false,\r\n\t\t\tmessage: \"لطفا ایمیل صحیح وارد نمایید\"\r\n\t\t};\r\n\t}\r\n}\r\n","import { Validator } from \"./form-field-validator.model\";\r\n\r\nexport class FieldConfig {\r\n\tid: number;\r\n\ttype: \"group\" | \"array\" | \"control\";\r\n\tname: string;\r\n\tsubtype: string;\r\n\tdisabled?: boolean;\r\n\ttitle: string;\r\n\tparentType?: \"array\" | \"group\";\r\n\tformGroupPath?: string;\r\n\tpath?: string;\r\n\tinputType: \"select\" | \"text\" | \"number\" | \"email\" | \"color\" | \"checkbox\" | \"table\";\r\n\tvalue?: any;\r\n\torder?: number;\r\n\twidth?: number;\r\n\toptions: {\r\n\t\t[key: string]: string | number | boolean;\r\n\t}[];\r\n\tdataEndpoint?: string;\r\n\toptionsEndpoint: string;\r\n\tfields?: FieldConfig[];\r\n\tvalidator: Validator;\r\n\tconstructor(type: \"group\" | \"array\" | \"control\") {\r\n\t\tthis.type = type;\r\n\t\tif (type != \"control\") this.fields = [];\r\n\t\tthis.width = 3;\r\n\t\tthis.validator = new Validator();\r\n\t}\r\n}\r\n","import { FieldConfig } from \"./field-config.model\";\r\n\r\nexport class FormSchemaModel {\r\n\t_id: string;\r\n\tname: string;\r\n\tdescription: string;\r\n\tform: FieldConfig;\r\n\tevents = {\r\n\t\taccept: {\r\n\t\t\tshow: false,\r\n\t\t\ttext: \"ثبت\"\r\n\t\t},\r\n\t\tcancel: {\r\n\t\t\tshow: false,\r\n\t\t\ttext: \"انصراف\"\r\n\t\t}\r\n\t};\r\n\r\n\tconstructor() {\r\n\t\tthis.form = new FieldConfig(\"group\");\r\n\t}\r\n\tinit() {\r\n\t\tthis._id = (Math.random() * 10).toString();\r\n\t}\r\n}\r\n","import { InjectionToken } from \"@angular/core\";\r\n\r\nexport interface FormModuleConfig {\r\n\tenv?: {\r\n\t\tproduction: boolean;\r\n\t\tfrontend_server: string;\r\n\t\tserver: string;\r\n\t};\r\n\tendpoints?: {\r\n\t\taddForm: string;\r\n\t\teditForm: string;\r\n\t\tgetForm: string;\r\n\t\tgetList: string;\r\n\t\tdeleteForm: string;\r\n\t\tcaptchaUrl: string;\r\n\t};\r\n}\r\nexport const MODULE_DEFAULT_CONFIG: FormModuleConfig = {\r\n\tenv: {\r\n\t\tproduction: false,\r\n\t\tfrontend_server: \"frontend/server/did/not/set\",\r\n\t\tserver: \"server/did/not/set\"\r\n\t},\r\n\tendpoints: {\r\n\t\taddForm: \"\",\r\n\t\teditForm: \"\",\r\n\t\tgetForm: \"\",\r\n\t\tgetList: \"\",\r\n\t\tdeleteForm: \"\",\r\n\t\tcaptchaUrl: \"\"\r\n\r\n\t},\r\n};\r\nexport const MODULE_CONFIG_TOKEN = new InjectionToken<FormModuleConfig>(\"FormModuleConfig\");\r\n","import { BehaviorSubject } from \"rxjs\";\r\nimport { Inject, Injectable } from \"@angular/core\";\r\nimport { Store } from \"@ngrx/store\";\r\n\r\nimport { getFormModuleConfig } from \"@soushians/config\";\r\n\r\nimport { FormModuleConfig } from \"../form.config\";\r\nimport { MODULE_CONFIG_TOKEN, MODULE_DEFAULT_CONFIG } from \"../form.config\";\r\nimport { MainContainerState } from \"../main-container\";\r\n\r\n@Injectable({\r\n\tprovidedIn: \"root\"\r\n})\r\nexport class FormConfigurationService {\r\n\tprivate _config: FormModuleConfig;\r\n\tget config() {\r\n\t\treturn this._config;\r\n\t}\r\n\tconfig$ = new BehaviorSubject(MODULE_DEFAULT_CONFIG);\r\n\r\n\tconstructor(@Inject(MODULE_CONFIG_TOKEN) configFile, private store: Store<MainContainerState>) {\r\n\t\tthis._config = Object.assign({}, MODULE_DEFAULT_CONFIG, configFile);\r\n\t\tthis.config$.next(this._config);\r\n\t\tthis.store.select(getFormModuleConfig).subscribe(userConfig => {\r\n\t\t\tif (!userConfig) return;\r\n\t\t\tthis._config = Object.assign({}, this._config, userConfig.Config);\r\n\t\t\tthis.config$.next(this._config);\r\n\t\t});\r\n\t}\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs/Rx\";\r\nimport { Store } from \"@ngrx/store\";\r\nimport { BehaviorSubject } from \"rxjs/BehaviorSubject\";\r\nimport { filter, map } from \"rxjs/operators\";\r\n\r\nimport { stringTemplate } from \"@soushians/shared\";\r\n\r\nimport { FormSchemaModel, AddFormApiModel, EditFormApiModel, FormListApiModel } from \"../models\";\r\nimport { FormConfigurationService } from \"./form-configuration.service\";\r\n\r\nimport { MainContainerState } from \"../main-container/main-container.reducers\";\r\n\r\n@Injectable({\r\n\tprovidedIn: \"root\"\r\n})\r\nexport class FormService {\r\n\tconstructor(\r\n\t\tprivate http: HttpClient,\r\n\t\tprivate store: Store<MainContainerState>,\r\n\t\tprivate configurationService: FormConfigurationService\r\n\t) {}\r\n\r\n\tadd(data: AddFormApiModel.Request): Observable<FormSchemaModel> {\r\n\t\tconst model = new AddFormApiModel.Request(data);\r\n\t\treturn this.configurationService.config$\r\n\t\t\t.filter((config) => config.endpoints.addForm != \"\")\r\n\t\t\t.take(1)\r\n\t\t\t.switchMap((config) =>\r\n\t\t\t\tthis.http.post(config.env.frontend_server + config.endpoints.addForm, model.getRequestBody())\r\n\t\t\t)\r\n\t\t\t.map((response: AddFormApiModel.Response) => response.Result);\r\n\t}\r\n\tget(_id: string): Observable<FormSchemaModel> {\r\n\t\treturn this.configurationService.config$\r\n\t\t\t.filter((config) => config.endpoints.getForm != \"\")\r\n\t\t\t.take(1)\r\n\t\t\t.switchMap((config) =>\r\n\t\t\t\tthis.http.get(stringTemplate(config.env.frontend_server + config.endpoints.getForm, { _id }))\r\n\t\t\t)\r\n\t\t\t.map((response: EditFormApiModel.Response) => response.Result);\r\n\t}\r\n\tgetList(): Observable<FormSchemaModel[]> {\r\n\t\treturn this.configurationService.config$\r\n\t\t\t.filter((config) => config.endpoints.getList != \"\")\r\n\t\t\t.switchMap((config) => this.http.get(config.env.frontend_server + config.endpoints.getList))\r\n\t\t\t.map((response: FormListApiModel.Response) => response.Result);\r\n\t}\r\n\tupdate(data: EditFormApiModel.Request): Observable<FormSchemaModel> {\r\n\t\tconst model = new EditFormApiModel.Request(data);\r\n\t\treturn this.configurationService.config$\r\n\t\t\t.filter((config) => config.endpoints.editForm != \"\")\r\n\t\t\t.take(1)\r\n\t\t\t.switchMap((config) =>\r\n\t\t\t\tthis.http.put(config.env.frontend_server + config.endpoints.editForm, model.getRequestBody())\r\n\t\t\t)\r\n\t\t\t.map((response: EditFormApiModel.Response) => response.Result);\r\n\t}\r\n\tdelete(_id: string) {\r\n\t\treturn this.configurationService.config$\r\n\t\t\t.filter((config) => config.endpoints.deleteForm != \"\")\r\n\t\t\t.switchMap((config) => this.http.get(config.env.frontend_server + config.endpoints.deleteForm));\r\n\t}\r\n\tselectFormById(_id: string): Observable<FormSchemaModel> {\r\n\t\tconst subject = new BehaviorSubject<FormSchemaModel>(undefined);\r\n\t\tthis.store\r\n\t\t\t.select((state) => state.form.list.data)\r\n\t\t\t.pipe(filter((forms) => forms != null), map((forms) => forms.find((form) => form._id == _id)))\r\n\t\t\t.subscribe((formSchemaModel) => subject.next(formSchemaModel));\r\n\t\treturn subject.asObservable();\r\n\t}\r\n}\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { FieldConfig, Field } from \"../../../models\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-control-select\",\r\n\ttemplateUrl: \"./select.component.html\",\r\n\tstyleUrls: [ \"./select.component.scss\" ]\r\n})\r\nexport class SelectComponent implements Field {\r\n\tconfig: FieldConfig;\r\n\tgroup: FormGroup;\r\n\tconstructor() {}\r\n}\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\nimport { Field, FieldConfig } from \"../../../models\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-control-checkbox\",\r\n\ttemplateUrl: \"./checkbox.component.html\",\r\n\tstyleUrls: [ \"./checkbox.component.scss\" ]\r\n})\r\nexport class CheckboxComponent implements Field {\r\n\tconfig: FieldConfig;\r\n\tgroup: FormGroup;\r\n\r\n\tconstructor() {}\r\n}\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\nimport { FieldConfig, Field } from \"../../../models\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-control-email\",\r\n\ttemplateUrl: \"./email.component.html\",\r\n\tstyleUrls: [ \"./email.component.scss\" ]\r\n})\r\nexport class EmailComponent implements Field {\r\n\tconfig: FieldConfig;\r\n\tgroup: FormGroup;\r\n\r\n\tconstructor() {}\r\n\r\n\tngOnInit() {}\r\n}\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\nimport { FieldConfig, Field } from \"../../../models\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-control-color\",\r\n\ttemplateUrl: \"./color.component.html\",\r\n\tstyleUrls: [ \"./color.component.scss\" ]\r\n})\r\nexport class ColorComponent implements Field {\r\n\tconfig: FieldConfig;\r\n\tgroup: FormGroup;\r\n\r\n\t@Input() form: FormGroup;\r\n\t@Input() schema: FieldConfig;\r\n\tconstructor() {}\r\n\r\n\tngOnInit() {}\r\n}\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\nimport { FieldConfig, Field } from \"../../../models\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { MatTableDataSource } from \"@angular/material\";\r\nimport { SelectionModel } from \"@angular/cdk/collections\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-control-table\",\r\n\ttemplateUrl: \"./table.component.html\",\r\n\tstyleUrls: [ \"./table.component.scss\" ]\r\n})\r\nexport class TableComponent implements OnInit, Field {\r\n\tconfig: FieldConfig;\r\n\tgroup: FormGroup;\r\n\t@Input() form: FormGroup;\r\n\t@Input() schema: FieldConfig;\r\n\tready: boolean;\r\n\tdisplayedColumns: string[];\r\n\tfiledDisplayedColumns: string[];\r\n\tdataSource: MatTableDataSource<any>;\r\n\r\n\tselection = new SelectionModel<any>(true, []);\r\n\tconstructor(private http: HttpClient) {\r\n\t\tthis.ready = false;\r\n\t}\r\n\tngOnInit() {\r\n\t\tthis.http.get(this.schema.dataEndpoint).subscribe((data: any) => {\r\n\t\t\tthis.ready = true;\r\n\t\t\tthis.displayedColumns = data.displayedColumns;\r\n\t\t\tthis.filedDisplayedColumns = data.filedDisplayedColumns;\r\n\t\t\tthis.dataSource = new MatTableDataSource<any>(data.dataSource);\r\n\t\t});\r\n\t}\r\n\r\n\t/** Whether the number of selected elements matches the total number of rows. */\r\n\tisAllSelected() {\r\n\t\tconst numSelected = this.selection.selected.length;\r\n\t\tthis.form.patchValue({\r\n\t\t\t[this.schema.name]: this.selection.selected\r\n\t\t});\r\n\t\tconst numRows = this.dataSource.data.length;\r\n\t\treturn numSelected === numRows;\r\n\t}\r\n\r\n\t/** Selects all rows if they are not all selected; otherwise clear selection. */\r\n\tmasterToggle() {\r\n\t\tthis.isAllSelected() ? this.selection.clear() : this.dataSource.data.forEach(row => this.selection.select(row));\r\n\t}\r\n}\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\nimport { FieldConfig } from \"../../../models\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-control-number\",\r\n\ttemplateUrl: \"./number.component.html\",\r\n\tstyleUrls: [ \"./number.component.scss\" ]\r\n})\r\nexport class NumberComponent implements OnInit {\r\n\t@Input() form: FormGroup;\r\n\t@Input() schema: FieldConfig;\r\n\tconstructor() {}\r\n\r\n\tngOnInit() {}\r\n}\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\nimport { FieldConfig, Field } from \"../../../models\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-control-text\",\r\n\ttemplateUrl: \"./text.component.html\",\r\n\tstyleUrls: [ \"./text.component.scss\" ]\r\n})\r\nexport class TextComponent implements Field {\r\n\tconfig: FieldConfig;\r\n\tgroup: FormGroup;\r\n\r\n\tconstructor() {}\r\n}\r\n","import { Action } from \"@ngrx/store\";\r\n\r\nimport { FormSchemaModel } from \"../models\";\r\n\r\nexport enum FormsListActionTypes {\r\n\tFORMS_LIST = \"[FORM][LIST] FORMS_LIST\",\r\n\tFORMS_LIST_START = \"[FORM][LIST] FORMS_LIST_START\",\r\n\tFORMS_LIST_SUCCEED = \"[FORM][LIST] FORMS_LIST_SUCCEED\",\r\n\tFORMS_LIST_FAILED = \"[FORM][LIST] FORMS_LIST_FAILED\",\r\n\tADD_FORM_SCHEMA = \"[FORM][LIST] ADD_FORM_SCHEMA\",\r\n\tFORM_SCHEMA_UPDATE = \"[FORM][LIST] FORM_SCHEMA_UPDATE\",\r\n\tGET_FORM_SCHEMA = \"[FORM][LIST] GET_FORM_SCHEMA\",\r\n\tFORM_SCHEMA_FETCHED = \"[FORM][LIST] FORM_SCHEMA_FETCHED\"\r\n}\r\n\r\nexport class FormsListAction implements Action {\r\n\treadonly type = FormsListActionTypes.FORMS_LIST;\r\n}\r\nexport class FormsListStartAction implements Action {\r\n\treadonly type = FormsListActionTypes.FORMS_LIST_START;\r\n}\r\nexport class FormsListSucceedAction implements Action {\r\n\treadonly type = FormsListActionTypes.FORMS_LIST_SUCCEED;\r\n\tconstructor(public payload: FormSchemaModel[]) {}\r\n}\r\nexport class FormsListFailedAction implements Action {\r\n\treadonly type = FormsListActionTypes.FORMS_LIST_FAILED;\r\n}\r\nexport class UpdateFormSchemaAction implements Action {\r\n\treadonly type = FormsListActionTypes.FORM_SCHEMA_UPDATE;\r\n\tconstructor(public payload: FormSchemaModel) {}\r\n}\r\nexport class AddFormSchemaAction implements Action {\r\n\treadonly type = FormsListActionTypes.ADD_FORM_SCHEMA;\r\n\tconstructor(public payload: FormSchemaModel) {}\r\n}\r\nexport class GetFormSchemaAction implements Action {\r\n\treadonly type = FormsListActionTypes.GET_FORM_SCHEMA;\r\n\tconstructor(public payload: string) {}\r\n}\r\nexport class FormSchemaFechedAction implements Action {\r\n\treadonly type = FormsListActionTypes.FORM_SCHEMA_FETCHED;\r\n\tconstructor(public payload: FormSchemaModel) {}\r\n}\r\n\r\nexport type FormsListActions =\r\n\t| FormsListAction\r\n\t| FormsListStartAction\r\n\t| FormsListSucceedAction\r\n\t| FormsListFailedAction\r\n\t| UpdateFormSchemaAction\r\n\t| AddFormSchemaAction\r\n\t| GetFormSchemaAction\r\n\t| FormSchemaFechedAction;\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\nimport { FieldConfig, Field } from \"../../../models\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-control-date\",\r\n\ttemplateUrl: \"./date.component.html\",\r\n\tstyleUrls: [ \"./date.component.scss\" ]\r\n})\r\nexport class DateFormInputControlComponent implements Field {\r\n\tconfig: FieldConfig;\r\n\tgroup: FormGroup;\r\n\r\n\tconstructor() {}\r\n}\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\nimport { FieldConfig, Field } from \"../../../models\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-control-file\",\r\n\ttemplateUrl: \"./file.component.html\",\r\n\tstyleUrls: [ \"./file.component.scss\" ]\r\n})\r\nexport class FileFormInputControlComponent implements Field {\r\n\tconfig: FieldConfig;\r\n\tgroup: FormGroup;\r\n\r\n\tconstructor() {}\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { HttpClient } from \"@angular/common/http\";\r\nimport { Observable } from \"rxjs\";\r\nimport { Store } from \"@ngrx/store\";\r\nimport { BehaviorSubject } from \"rxjs/BehaviorSubject\";\r\nimport { filter, map, take, switchMap } from \"rxjs/operators\";\r\n\r\nimport { stringTemplate } from \"@soushians/shared\";\r\n\r\nimport { FormSchemaModel, AddFormApiModel, EditFormApiModel, FormListApiModel } from \"../models\";\r\nimport { FormConfigurationService } from \"./form-configuration.service\";\r\n\r\nimport { MainContainerState } from \"../main-container/main-container.reducers\";\r\nimport { UpsertCaptchaApiModel } from \"../models/captcha.model\";\r\n\r\n@Injectable({\r\n\tprovidedIn: \"root\"\r\n})\r\nexport class FormCaptchaService {\r\n\tconstructor(\r\n\t\tprivate http: HttpClient,\r\n\t\tprivate store: Store<MainContainerState>,\r\n\t\tprivate configurationService: FormConfigurationService\r\n\t) { }\r\n\r\n\tgetCaptcha(): Observable<any> {\r\n\t\treturn this.configurationService.config$.pipe(\r\n\t\t\tfilter((captcha) => captcha.endpoints.captchaUrl != \"\"),\r\n\t\t\ttake(1),\r\n\t\t\tswitchMap((captcha) =>\r\n\t\t\t\tthis.http.get(captcha.env.server + captcha.endpoints.captchaUrl)\r\n\t\t\t),\r\n\t\t\tmap((response: any) => response.Result),\r\n\t\t);\r\n\t}\r\n\tsendCaptcha(): Observable<FormSchemaModel[]> {\r\n\t\treturn this.configurationService.config$.pipe(\r\n\t\t\tfilter((config) => config.endpoints.getList != \"\"),\r\n\t\t\tswitchMap((config) => this.http.get(config.env.server + config.endpoints.getList)),\r\n\t\t\tmap((response: FormListApiModel.Response) => response.Result)\r\n\t\t);\r\n\t}\r\n}\r\n","\r\nexport class CaptchaModel {\r\n\tcaptchaImg: string;\r\n\tcaptchaCode: string;\r\n\tconstructor({ captchaImg, captchaCode }: { captchaImg?: string; captchaCode?: string; } = {}) {\r\n\t\tthis.captchaImg = `${captchaImg}?${Math.random()}`;\r\n\t\tthis.captchaCode = captchaCode || \"\";\r\n\t}\r\n}\r\n\r\nexport namespace UpsertCaptchaApiModel {\r\n\texport class Request {\r\n\t\tCaptcha: CaptchaModel;\r\n\t\tconstructor(initValue: Partial<UpsertCaptchaApiModel.Request> = {}) {\r\n\t\t\tObject.keys(initValue).forEach(key => (this[key] = initValue[key]));\r\n\t\t}\r\n\t\tgetRequestBody() {\r\n\t\t\treturn this.Captcha.captchaCode;\r\n\t\t}\r\n\t}\r\n\texport class Response {\r\n\t\tResult: CaptchaModel;\r\n\t\tconstructor() { }\r\n\t}\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { FormGroup, FormControl, FormArray, Validators } from \"@angular/forms\";\r\nimport { Store } from \"@ngrx/store\";\r\n\r\nimport { Field, FieldConfig } from \"../../../models\";\r\nimport { FormCaptchaService } from \"../../../services/form-captcha.service\";\r\nimport { CaptchaModel } from \"../../../models/captcha.model\";\r\nimport { MainContainerState } from \"../../../main-container\";\r\nimport { FormConfigurationService } from \"../../../services/form-configuration.service\";\r\nimport { map } from \"rxjs/operators\";\r\nimport { generate } from \"rxjs\";\r\n\r\n@Component({\r\n\tselector: \"lib-form-captcha\",\r\n\ttemplateUrl: \"./form-captcha.component.html\",\r\n\tstyleUrls: [\"./form-captcha.component.scss\"]\r\n})\r\nexport class FormCaptchaComponent implements OnInit, Field {\r\n\tconfig: FieldConfig;\r\n\tgroup: FormGroup;\r\n\r\n\tcaptcha: CaptchaModel;\r\n\tcaptchaSrc: string;\r\n\tconstructor(\r\n\t\tprivate service: FormCaptchaService,\r\n\t\tprivate store: Store<MainContainerState>,\r\n\t\tprivate configurationService: FormConfigurationService\r\n\t) {\r\n\t\t// this.captcha = new CaptchaModel({\r\n\t\t// \tcaptchaImg: \"http://172.22.34.28:8001/api/authentication/captcha\"\r\n\t\t// });\r\n\r\n\t\tthis._captcha_generate();\r\n\t}\r\n\tngOnInit() {\r\n\t\tthis.store.select((s: any) => s.authentication.captcha.captcha).subscribe(e => this.refresh());\r\n\t}\r\n\trefresh() {\r\n\t\tthis.captcha.captchaImg = this._captcha_generate() + `?${Math.random()}`;\r\n\t}\r\n\t_captcha_generate() {\r\n\t\tthis.configurationService.config$.pipe(\r\n\t\t\tmap(config => config.env.server + config.endpoints.captchaUrl)).subscribe(captcha => {\r\n\t\t\t\tthis.captcha = new CaptchaModel({\r\n\t\t\t\t\tcaptchaImg: captcha\r\n\t\t\t\t});\r\n\t\t\t});\r\n\t}\r\n\r\n}\r\n","import {\r\n\tComponent,\r\n\tOnInit,\r\n\tViewChild,\r\n\tViewContainerRef,\r\n\tComponentFactoryResolver,\r\n\tCompiler,\r\n\tReflectiveInjector,\r\n\tNgModule,\r\n\tInput,\r\n\tOutput,\r\n\tEventEmitter,\r\n\tOnChanges,\r\n\tDirective,\r\n\tType,\r\n\tOnDestroy\r\n} from \"@angular/core\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { FormControl, FormGroup, FormArray, AbstractControl, Validators } from \"@angular/forms\";\r\nimport { BehaviorSubject } from \"rxjs/BehaviorSubject\";\r\nimport { Subject } from \"rxjs\";\r\nimport { takeUntil } from \"rxjs/operators\";\r\nimport { ComponentRef } from \"@angular/core\";\r\nimport { Store } from \"@ngrx/store\";\r\n\r\nimport {\r\n\tSelectComponent,\r\n\tEmailComponent,\r\n\tColorComponent,\r\n\tCheckboxComponent,\r\n\tTextComponent,\r\n\tTableComponent\r\n} from \"../form-controls\";\r\nimport { FormService } from \"../../services/form.service\";\r\nimport { MainContainerState } from \"../../main-container/main-container.reducers\";\r\nimport { GetFormSchemaAction } from \"../../list/list.actions\";\r\nimport { Field, FieldConfig, FormSchemaModel } from \"../../models\";\r\nimport { DateFormInputControlComponent } from \"../form-controls/date/date.component\";\r\nimport { FileFormInputControlComponent } from \"../form-controls/file/file.component\";\r\nimport { FormCaptchaComponent } from \"../form-controls/form-captcha\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-view\",\r\n\ttemplateUrl: \"./form-view.component.html\",\r\n\tstyleUrls: [\"./form-view.component.css\"]\r\n})\r\nexport class FormViewComponent implements OnDestroy {\r\n\tunsubscribe = new Subject<void>();\r\n\t@Output() accept = new EventEmitter<FormGroup>();\r\n\t@Output() cancel = new EventEmitter<FormGroup>();\r\n\t@Input() local;\r\n\t@Input() card = false;\r\n\t@Input()\r\n\tset id(id: string) {\r\n\t\tif (!this.local) this.store.dispatch(new GetFormSchemaAction(id));\r\n\t\tthis.service\r\n\t\t\t.selectFormById(id)\r\n\t\t\t.pipe(takeUntil(this.unsubscribe))\r\n\t\t\t.subscribe(schema => this.schema$.next(schema));\r\n\t}\r\n\t@Input()\r\n\tset schema(schema: FormSchemaModel) {\r\n\t\tthis.schema$.next(schema);\r\n\t}\r\n\t_id: string;\r\n\tformGroup: FormGroup;\r\n\tformGroupCreated = false;\r\n\tschema$: BehaviorSubject<FormSchemaModel>;\r\n\r\n\tconstructor(\r\n\t\tprivate service: FormService,\r\n\t\tprivate compiler: Compiler,\r\n\t\tprivate resolver: ComponentFactoryResolver,\r\n\t\tprivate store: Store<MainContainerState>\r\n\t) {\r\n\t\tthis.schema$ = new BehaviorSubject(undefined);\r\n\t\tthis.schema$.pipe(takeUntil(this.unsubscribe)).subscribe(schema => {\r\n\t\t\tif (!schema) return;\r\n\t\t\tthis.formGroup = this.createFrom(schema.form) as FormGroup;\r\n\t\t\tif (!schema.form.name) return;\r\n\t\t\tthis.formGroupCreated = true;\r\n\t\t});\r\n\t}\r\n\tngOnDestroy() {\r\n\t\tthis.unsubscribe.next();\r\n\t\tthis.unsubscribe.complete();\r\n\t}\r\n\tgenerate(schema: FormSchemaModel) {\r\n\t\tthis.schema$.next(schema);\r\n\t}\r\n\r\n\tcreateFrom(data: FieldConfig, parentPath = \"\"): AbstractControl {\r\n\t\tif (data.type == \"control\") {\r\n\t\t\tlet formGroupPath;\r\n\t\t\tif (data.parentType == \"array\") {\r\n\t\t\t\t// parentPath = `${parentPath}.controls[${(data as FieldConfig).name}]`;\r\n\t\t\t} else if (data.parentType == \"group\") {\r\n\t\t\t\tformGroupPath = parentPath;\r\n\t\t\t\tparentPath = `${parentPath}.controls.${(data as FieldConfig).name}`;\r\n\t\t\t}\r\n\t\t\tconst validators = [];\r\n\t\t\tif (data.validator.required && data.validator.required.active) {\r\n\t\t\t\tvalidators.push(Validators.required);\r\n\t\t\t}\r\n\t\t\tif (data.validator.minlength && data.validator.minlength.active) {\r\n\t\t\t\tvalidators.push(Validators.minLength(data.validator.minlength.value));\r\n\t\t\t}\r\n\t\t\tif (data.validator.email && data.validator.email.active) {\r\n\t\t\t\tvalidators.push(Validators.email);\r\n\t\t\t}\r\n\t\t\tconst ctr = new FormControl(data.value, validators);\r\n\t\t\t(ctr as any).schema = data;\r\n\t\t\t(ctr as any).schema.path = parentPath;\r\n\t\t\t(ctr as any).schema.formGroupPath = formGroupPath;\r\n\t\t\treturn ctr;\r\n\t\t} else if (data.type == \"group\") {\r\n\t\t\tconst formGroup = new FormGroup({});\r\n\t\t\tif (data.parentType == undefined) {\r\n\t\t\t\tparentPath = (data as FieldConfig).name;\r\n\t\t\t} else if (data.parentType == \"array\") {\r\n\t\t\t\tparentPath = `${parentPath}.controls[${(data as FieldConfig).name}]`;\r\n\t\t\t} else if (data.parentType == \"group\") {\r\n\t\t\t\tparentPath = `${parentPath}.controls.${(data as FieldConfig).name}`;\r\n\t\t\t}\r\n\r\n\t\t\t(formGroup as any).schema = data;\r\n\t\t\t(formGroup as any).schema.path = parentPath;\r\n\t\t\tdata.fields.forEach(item => {\r\n\t\t\t\titem.parentType = \"group\";\r\n\t\t\t\tformGroup.addControl(item.name, this.createFrom(item, parentPath));\r\n\t\t\t});\r\n\t\t\treturn formGroup;\r\n\t\t} else {\r\n\t\t\tconst formArray: FormArray = new FormArray([]);\r\n\t\t\tparentPath =\r\n\t\t\t\tparentPath == \"\" ? (data as FieldConfig).name : `${parentPath}.controls.${(data as FieldConfig).name}`;\r\n\t\t\t(formArray as any).schema = data;\r\n\t\t\t(formArray as any).schema.path = parentPath;\r\n\t\t\tdata.fields.forEach((item, idx) => {\r\n\t\t\t\titem.parentType = \"array\";\r\n\t\t\t\titem.name = idx.toString();\r\n\t\t\t\tformArray.controls.push(this.createFrom(item, parentPath));\r\n\t\t\t});\r\n\t\t\treturn formArray;\r\n\t\t}\r\n\t}\r\n\r\n\taccepted() {\r\n\t\tthis.accept.emit(this.formGroup);\r\n\t}\r\n\tcanceled() {\r\n\t\tthis.cancel.emit(this.formGroup);\r\n\t}\r\n}\r\n\r\nconst components: { [type: string]: Type<Field> } = {\r\n\tcheckbox: CheckboxComponent,\r\n\ttext: TextComponent,\r\n\tpassword: TextComponent,\r\n\tdate: DateFormInputControlComponent,\r\n\tfile: FileFormInputControlComponent,\r\n\ttable: TableComponent,\r\n\tcolor: ColorComponent,\r\n\temail: EmailComponent,\r\n\tcaptcha: FormCaptchaComponent,\r\n\tselect: SelectComponent\r\n};\r\n\r\n@Directive({\r\n\tselector: \"[dynamicField]\"\r\n})\r\nexport class DynamicFieldDirective implements Field, OnChanges, OnInit {\r\n\t@Input() config: FieldConfig;\r\n\r\n\t@Input() group: FormGroup;\r\n\r\n\tcomponent: ComponentRef<Field>;\r\n\r\n\tconstructor(private resolver: ComponentFactoryResolver, private container: ViewContainerRef) { }\r\n\r\n\tngOnChanges() {\r\n\t\tif (this.component) {\r\n\t\t\tthis.component.instance.config = this.config;\r\n\t\t\tthis.component.instance.group = this.group;\r\n\t\t}\r\n\t}\r\n\r\n\tngOnInit() {\r\n\t\tif (this.config.inputType == undefined) return;\r\n\t\tif (!components[this.config.inputType]) {\r\n\t\t\tconst supportedTypes = Object.keys(components).join(\", \");\r\n\t\t\tthrow new Error(\r\n\t\t\t\t`Trying to use an unsupported type (${this.config.inputType}).\r\n\t\t Supported types: ${supportedTypes}`\r\n\t\t\t);\r\n\t\t}\r\n\t\tconst component = this.resolver.resolveComponentFactory<Field>(components[this.config.inputType]);\r\n\t\tthis.component = this.container.createComponent(component);\r\n\t\tthis.component.instance.config = this.config;\r\n\t\tthis.component.instance.group = this.group;\r\n\t}\r\n}\r\n","import { responseStatusTypes } from \"@soushians/shared\";\r\nimport { FormSchemaModel } from \"../models\";\r\nimport { FormsListActionTypes, FormsListActions } from \"./list.actions\";\r\n\r\nexport interface State {\r\n\tstatus: responseStatusTypes;\r\n\tdata: FormSchemaModel[];\r\n}\r\nexport const initialState: State = {\r\n\tstatus: \"pristine\",\r\n\tdata: []\r\n};\r\nexport function reducer(state = initialState, action: FormsListActions): State {\r\n\tswitch (action.type) {\r\n\t\tcase FormsListActionTypes.FORMS_LIST: {\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tstatus: \"dirty\"\r\n\t\t\t};\r\n\t\t}\r\n\t\tcase FormsListActionTypes.FORMS_LIST_START: {\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tstatus: \"pending\"\r\n\t\t\t};\r\n\t\t}\r\n\t\tcase FormsListActionTypes.FORMS_LIST_SUCCEED: {\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tdata: action.payload,\r\n\t\t\t\tstatus: \"succeed\"\r\n\t\t\t};\r\n\t\t}\r\n\t\tcase FormsListActionTypes.FORMS_LIST_FAILED: {\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tstatus: \"failed\"\r\n\t\t\t};\r\n\t\t}\r\n\t\tcase FormsListActionTypes.FORM_SCHEMA_UPDATE: {\r\n\t\t\tconst data = state.data.concat();\r\n\t\t\tvar entityIdx = state.data.findIndex(form => form._id == action.payload._id);\r\n\t\t\tif (entityIdx > -1) {\r\n\t\t\t\tdata[entityIdx] = Object.assign({}, data[entityIdx], action.payload);\r\n\t\t\t} else {\r\n\t\t\t\tdata.push(action.payload);\r\n\t\t\t}\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tdata: data\r\n\t\t\t};\r\n\t\t}\r\n\t\tcase FormsListActionTypes.ADD_FORM_SCHEMA: {\r\n\t\t\tconst data = state.data.concat();\r\n\t\t\tvar entityIdx = state.data.findIndex(form => form._id == action.payload._id);\r\n\t\t\tif (entityIdx > -1) {\r\n\t\t\t\tdata[entityIdx] = Object.assign({}, data[entityIdx], action.payload);\r\n\t\t\t} else {\r\n\t\t\t\tdata.push(action.payload);\r\n\t\t\t}\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tdata: data\r\n\t\t\t};\r\n\t\t}\r\n\t\tcase FormsListActionTypes.FORM_SCHEMA_FETCHED: {\r\n\t\t\tconst data = state.data.concat();\r\n\t\t\tvar entityIdx = state.data.findIndex(form => form._id == action.payload._id);\r\n\t\t\tif (entityIdx > -1) {\r\n\t\t\t\tdata[entityIdx] = Object.assign({}, data[entityIdx], action.payload);\r\n\t\t\t} else {\r\n\t\t\t\tdata.push(action.payload);\r\n\t\t\t}\r\n\t\t\treturn {\r\n\t\t\t\t...state,\r\n\t\t\t\tdata: data\r\n\t\t\t};\r\n\t\t}\r\n\r\n\t\tdefault: {\r\n\t\t\treturn state;\r\n\t\t}\r\n\t}\r\n}\r\n\r\nexport var getStatus = (state: State) => state.status;\r\n","import * as list from \"../list/list.reducers\";\r\n\r\nexport interface FormState {\r\n\tlist: list.State;\r\n}\r\n\r\nexport const FormReducers = {\r\n\tlist: list.reducer\r\n};\r\n\r\nexport interface MainContainerState {\r\n\t\"form\": FormState;\r\n}\r\n","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { FieldConfig } from \"../../models\";\r\n\r\n@Component({\r\n\tselector: \"app-form-group\",\r\n\ttemplateUrl: \"./form-group.component.html\"\r\n})\r\nexport class FormGroupComponent {\r\n\t@Input() schema: FieldConfig;\r\n\t@Input() noHeader: boolean = false;\r\n\t@Output() changes = new EventEmitter();\r\n\t@Output() delete = new EventEmitter();\r\n\tconstructor() {}\r\n\r\n\tchanged() {\r\n\t\tthis.changes.emit();\r\n\t}\r\n\r\n\taddFormGroup(root: FieldConfig) {\r\n\t\tconst group = new FieldConfig(\"group\");\r\n\t\tgroup.fields = [];\r\n\t\troot.fields.push(group);\r\n\t\tthis.schema.id = this.schema.id + 1;\r\n\t\treturn group;\r\n\t}\r\n\taddFormArray(root: FieldConfig) {\r\n\t\tconst array = new FieldConfig(\"array\");\r\n\t\tarray.fields = [];\r\n\t\troot.fields.push(array);\r\n\t\treturn array;\r\n\t}\r\n\taddFormControl(root: FieldConfig) {\r\n\t\tconst control = new FieldConfig(\"control\");\r\n\t\troot.fields.push(control);\r\n\t\treturn control;\r\n\t}\r\n\tdeleteFormGroup(idx: number) {\r\n\t\tthis.schema.fields.splice(idx, 1);\r\n\t}\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { FieldConfig } from \"../../models\";\r\n\r\n@Component({\r\n\tselector: \"app-form-array\",\r\n\ttemplateUrl: \"./form-array.component.html\"\r\n})\r\nexport class FormArrayComponent {\r\n\t@Input() schema: FieldConfig;\r\n\t@Output() changes = new EventEmitter();\r\n\tconstructor() {}\r\n\r\n\tchanged() {\r\n\t\tthis.changes.emit();\r\n\t}\r\n\r\n\taddFormGroup(root: FieldConfig) {\r\n\t\tconst group = new FieldConfig(\"group\");\r\n\t\tgroup.fields = [];\r\n\t\troot.fields.push(group);\r\n\t\treturn group;\r\n\t}\r\n\taddFormArray(root: FieldConfig) {\r\n\t\tconst array = new FieldConfig(\"array\");\r\n\t\tarray.fields = [];\r\n\t\troot.fields.push(array);\r\n\t\treturn array;\r\n\t}\r\n\taddFormControl(root: FieldConfig) {\r\n\t\tconst control = new FieldConfig(\"control\");\r\n\t\troot.fields.push(control);\r\n\t\treturn control;\r\n\t}\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { FormGroup, FormControl, FormArray } from \"@angular/forms\";\r\nimport { FieldConfig } from \"../../models\";\r\n\r\n@Component({\r\n\tselector: \"app-form-control\",\r\n\ttemplateUrl: \"./form-control.component.html\"\r\n})\r\nexport class FormControlComponent {\r\n\t@Input() schema: FieldConfig;\r\n\t@Output() changes = new EventEmitter();\r\n\t@Output() delete = new EventEmitter();\r\n\r\n\twidth = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ];\r\n\toptions = new FormArray([\r\n\t\tnew FormGroup({\r\n\t\t\tkey: new FormControl(),\r\n\t\t\tvalue: new FormControl()\r\n\t\t})\r\n\t]);\r\n\ttableOptions = new FormGroup({\r\n\t\tdataEndpoint: new FormControl(\"\")\r\n\t});\r\n\tconstructor() {}\r\n\r\n\tchanged() {\r\n\t\tif ([ this.schema.name, this.schema.title, this.schema.inputType ].some(item => !item)) return true;\r\n\t\tif (this.schema.inputType == \"table\") {\r\n\t\t\tthis.schema.options = this.tableOptions.value;\r\n\t\t} else if (this.schema.inputType == \"select\") {\r\n\t\t\tthis.schema.options = this.options.value;\r\n\t\t}\r\n\t\tthis.changes.emit();\r\n\t}\r\n\r\n\taddOption() {\r\n\t\tthis.options.push(\r\n\t\t\tnew FormGroup({\r\n\t\t\t\tkey: new FormControl(),\r\n\t\t\t\tvalue: new FormControl()\r\n\t\t\t})\r\n\t\t);\r\n\t}\r\n\tremoveOption(i) {\r\n\t\tthis.options.controls.splice(i, 1);\r\n\t}\r\n\tinsertOptions() {\r\n\t\tthis.schema.options = this.options.value;\r\n\t}\r\n}\r\n","import { Action } from \"@ngrx/store\";\r\n\r\nimport { FormSchemaModel } from \"../models\";\r\n\r\nexport enum EditFormActionTypes {\r\n\tEDIT_FORM = \"[FORM][EDIT] EDIT_FORM\",\r\n\tEDIT_FORM_START = \"[FORM][EDIT] EDIT_FORM_START\",\r\n\tEDIT_FORM_SUCCEED = \"[FORM][EDIT] EDIT_FORM_SUCCEED\",\r\n\tEDIT_FORM_FAILED = \"[FORM][EDIT] EDIT_FORM_FAILED\"\r\n}\r\n\r\nexport class EditFormAction implements Action {\r\n\treadonly type = EditFormActionTypes.EDIT_FORM;\r\n\tconstructor(public payload: FormSchemaModel) {}\r\n}\r\nexport class EditFormStartAction implements Action {\r\n\treadonly type = EditFormActionTypes.EDIT_FORM_START;\r\n\tconstructor(public payload: FormSchemaModel) {}\r\n}\r\nexport class EditFormSucceedAction implements Action {\r\n\treadonly type = EditFormActionTypes.EDIT_FORM_SUCCEED;\r\n\tconstructor(public payload: FormSchemaModel) {}\r\n}\r\nexport class EditFormFailedAction implements Action {\r\n\treadonly type = EditFormActionTypes.EDIT_FORM_FAILED;\r\n}\r\n\r\nexport type EditFormActions = EditFormAction | EditFormStartAction | EditFormSucceedAction | EditFormFailedAction;\r\n","import { Action } from \"@ngrx/store\";\r\n\r\nimport { FormSchemaModel } from \"../models\";\r\n\r\nexport enum AddFormActionTypes {\r\n\tADD_FORM = \"[FORM][ADD] ADD_FORM_PROFILE\",\r\n\tADD_FORM_START = \"[FORM][ADD] ADD_FORM_START\",\r\n\tADD_FORM_SUCCEED = \"[FORM][ADD] ADD_FORM_SUCCEED\",\r\n\tADD_FORM_FAILED = \"[FORM][ADD] ADD_FORM_FAILED\"\r\n}\r\n\r\nexport class AddFormAction implements Action {\r\n\treadonly type = AddFormActionTypes.ADD_FORM;\r\n\tconstructor(public payload: FormSchemaModel) {}\r\n}\r\nexport class AddFormStartAction implements Action {\r\n\treadonly type = AddFormActionTypes.ADD_FORM_START;\r\n\tconstructor(public payload: FormSchemaModel) {}\r\n}\r\nexport class AddFormSucceedAction implements Action {\r\n\treadonly type = AddFormActionTypes.ADD_FORM_SUCCEED;\r\n}\r\nexport class AddFormFailedAction implements Action {\r\n\treadonly type = AddFormActionTypes.ADD_FORM_FAILED;\r\n}\r\n\r\nexport type AddFormActions = AddFormAction | AddFormStartAction | AddFormSucceedAction | AddFormFailedAction;\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\r\nimport { Store } from \"@ngrx/store\";\r\n\r\nimport { MainContainerState } from \"../../main-container/main-container.reducers\";\r\nimport { FormSchemaModel } from \"../../models\";\r\nimport { AddFormAction } from \"../add-form.actions\";\r\nimport { AddFormSchemaAction, UpdateFormSchemaAction } from \"../../list/list.actions\";\r\nimport { FormService } from \"../../services/form.service\";\r\n\r\n@Component({\r\n\ttemplate: `<ngs-form-add \r\n\t\t\t\t\t[schema]=\"schema\" \r\n\t\t\t\t\t(changes)=\"update_schema($event)\" \r\n\t\t\t\t\t(submited)=add($event)\r\n\t\t\t\t></ngs-form-add>`\r\n})\r\nexport class AddFormContainerComponent implements OnInit {\r\n\tschema: FormSchemaModel;\r\n\tconstructor(public store: Store<MainContainerState>, public service: FormService) {}\r\n\tngOnInit() {\r\n\t\tthis.schema = new FormSchemaModel();\r\n\t\tthis.schema.init();\r\n\t\tthis.store.dispatch(new AddFormSchemaAction(this.schema));\r\n\t}\r\n\tadd(form: FormSchemaModel) {\r\n\t\tthis.store.dispatch(new AddFormAction(form));\r\n\t}\r\n\tupdate_schema(form: FormSchemaModel) {\r\n\t\tthis.store.dispatch(new UpdateFormSchemaAction(form));\r\n\t}\r\n}\r\n","import { Component } from \"@angular/core\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\r\nimport { Store } from \"@ngrx/store\";\r\n\r\nimport { MainContainerState } from \"../../main-container/main-container.reducers\";\r\nimport { EditFormApiModel } from \"../../models\";\r\nimport { FormService } from \"../../services/form.service\";\r\nimport { EditFormAction } from \"../../edit/edit-form.actions\";\r\nimport { AddFormContainerComponent } from \"../../add/add-form-container\";\r\nimport { GetFormSchemaAction } from \"../../list/list.actions\";\r\n\r\n@Component({\r\n\ttemplate: `<edit-form\r\n\t\t\t\t\t[formGroup]=\"formGroup\"\r\n\t\t\t\t\t[schema]=\"schema\"\r\n\t\t\t\t\t(changes)=\"update_schema($event)\"\r\n\t\t\t\t\t(submited)=\"update($event)\">\r\n\t\t\t\t</edit-form>`\r\n})\r\nexport class EditFormContainerComponent extends AddFormContainerComponent {\r\n\tformGroup = EditFormApiModel.Request.formGroup;\r\n\tconstructor(public service: FormService, private route: ActivatedRoute, public store: Store<MainContainerState>) {\r\n\t\tsuper(store, service);\r\n\t}\r\n\r\n\tngOnInit() {\r\n\t\tthis.route.params\r\n\t\t\t.map((params) => params[\"_id\"])\r\n\t\t\t.subscribe((id) => this.store.dispatch(new GetFormSchemaAction(id)));\r\n\r\n\t\tthis.route.params\r\n\t\t\t.map((params) => params[\"_id\"])\r\n\t\t\t.switchMap((id) => this.service.selectFormById(id))\r\n\t\t\t.filter((data) => data != null)\r\n\t\t\t.take(1)\r\n\t\t\t.subscribe((formSchema) => {\r\n\t\t\t\tthis.schema = formSchema;\r\n\t\t\t\tthis.formGroup.patchValue(formSchema);\r\n\t\t\t});\r\n\t}\r\n\r\n\tupdate(data) {\r\n\t\tthis.store.dispatch(new EditFormAction(data));\r\n\t}\r\n}\r\n","import { Component, OnInit, EventEmitter, Output, Input } from \"@angular/core\";\r\nimport { FormGroup } from \"@angular/forms\";\r\n\r\nimport { FormSchemaModel, AddFormApiModel, FieldConfig } from \"../../models\";\r\n\r\n@Component({\r\n\tselector: \"ngs-form-add\",\r\n\ttemplateUrl: \"./add-form.component.html\"\r\n})\r\nexport class AddFormComponent {\r\n\t@Input() schema: FormSchemaModel;\r\n\t@Input() formGroup = AddFormApiModel.Request.formGroup;\r\n\t@Output() submited = new EventEmitter();\r\n\t@Output() changes = new EventEmitter();\r\n\r\n\temit() {\r\n\t\tthis.formGroup.patchValue({ form: this.schema.form });\r\n\t\tthis.submited.emit(this.formGroup.value);\r\n\t}\r\n\tchanged() {\r\n\t\tthis.formGroup.patchValue({ form: this.schema.form });\r\n\t\tthis.changes.emit(this.formGroup.value);\r\n\t}\r\n\tchangeOrder($event) {}\r\n\r\n\taddFormGroup(root: FieldConfig) {\r\n\t\tconst group = new FieldConfig(\"group\");\r\n\t\tgroup.fields = [];\r\n\t\troot.fields.push(group);\r\n\t\treturn group;\r\n\t}\r\n\taddFormArray(root: FieldConfig) {\r\n\t\tconst array = new FieldConfig(\"array\");\r\n\t\tarray.fields = [];\r\n\t\troot.fields.push(array);\r\n\t\treturn array;\r\n\t}\r\n\taddFormControl(root: FieldConfig) {\r\n\t\tconst control = new FieldConfig(\"control\");\r\n\t\troot.fields.push(control);\r\n\t\treturn control;\r\n\t}\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\r\n\r\nimport { AddFormComponent } from \"../../add/add-form\";\r\n\r\n@Component({\r\n selector: \"edit-form\",\r\n templateUrl: \"./edit-form.component.html\",\r\n styleUrls: [\"./edit-form.component.scss\"]\r\n})\r\nexport class EditFormComponent extends AddFormComponent {\r\n @Input() schema: any;\r\n emit() {\r\n if (!this.formGroup.valid) return;\r\n return this.submited.emit(this.formGroup.value);\r\n }\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { Store } from \"@ngrx/store\";\r\n\r\nimport { MainContainerState } from \"../../main-container\";\r\nimport { FormSchemaModel } from \"../../models\";\r\nimport { FormsListAction } from \"../../list/list.actions\";\r\n\r\n@Component({\r\n\ttemplate: `<form-list\r\n\t\t\t\t\t[data]=\"data$\">\r\n\t\t\t\t</form-list>`\r\n})\r\nexport class FormListContainerComponent implements OnInit {\r\n\tdata$: Observable<FormSchemaModel[]>;\r\n\tconstructor(public store: Store<MainContainerState>) {\r\n\t\tthis.data$ = this.store.select(state => state.form.list.data);\r\n\t}\r\n\tngOnInit() {\r\n\t\tthis.store.dispatch(new FormsListAction());\r\n\t}\r\n}\r\n","import { Component, Input } from \"@angular/core\";\r\nimport { Observable } from \"rxjs/Observable\";\r\n\r\nimport { FormSchemaModel } from \"../../models\";\r\n\r\n@Component({\r\n\tselector: \"form-list\",\r\n\ttemplateUrl: \"./form-list.component.html\",\r\n\tstyleUrls: [\"./form-list.component.scss\"]\r\n})\r\nexport class FormListComponent {\r\n\t// tslint:disable-next-line:no-input-rename\r\n\t@Input(\"data\") data$: Observable<FormSchemaModel[]>;\r\n}\r\n","import { Component, OnInit } from \"@angular/core\";\r\n\r\nimport * as MainContainerReducer from \"../../main-container/main-container.reducers\";\r\nimport { Store } from \"@ngrx/store\";\r\nimport { ActivatedRoute } from \"@angular/router\";\r\n\r\n@Component({\r\n\ttemplate: \"<router-outlet></router-outlet>\",\r\n})\r\nexport class MainContainerComponent {\r\n\tconstructor(private route: ActivatedRoute, private store: Store<MainContainerReducer.MainContainerState>) { }\r\n}\r\n","import \"rxjs/add/operator/map\";\r\nimport \"rxjs/add/operator/mergeMap\";\r\nimport \"rxjs/add/operator/switchMap\";\r\n\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { Action } from \"@ngrx/store\";\r\nimport { Actions, Effect, ofType } from \"@ngrx/effects\";\r\nimport { of } from \"rxjs/observable/of\";\r\nimport { Store } from \"@ngrx/store\";\r\n\r\nimport { FormService } from \"../services/form.service\";\r\nimport { AddFormApiModel } from \"../models\";\r\nimport { AddFormActionTypes, AddFormStartAction, AddFormSucceedAction, AddFormFailedAction } from \"./add-form.actions\";\r\nimport { map, switchMap, catchError } from \"rxjs/operators\";\r\n\r\n@Injectable()\r\nexport class AddFormEffects {\r\n\tconstructor(private actions$: Actions<any>, private router: Router, private service: FormService) {}\r\n\r\n\t@Effect()\r\n\tAddForm$ = this.actions$.pipe(\r\n\t\tofType<any>(AddFormActionTypes.ADD_FORM),\r\n\t\tmap(action => action.payload),\r\n\t\tmap(data => new AddFormStartAction(data))\r\n\t);\r\n\r\n\t@Effect()\r\n\tAddFormStart$ = this.actions$.pipe(\r\n\t\tofType<any>(AddFormActionTypes.ADD_FORM_START),\r\n\t\tmap(action => action.payload),\r\n\t\tswitchMap((data: AddFormApiModel.Request) => this.service.add(data)),\r\n\t\tmap(res => new AddFormSucceedAction()),\r\n\t\tcatchError(() => of(new AddFormFailedAction()))\r\n\t);\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { Action } from \"@ngrx/store\";\r\nimport { Actions, Effect, ofType } from \"@ngrx/effects\";\r\nimport { of } from \"rxjs/observable/of\";\r\nimport { Store } from \"@ngrx/store\";\r\nimport { switchMap, map, catchError } from \"rxjs/operators\";\r\n\r\nimport { FormService } from \"../services/form.service\";\r\nimport { FormSchemaModel } from \"../models\";\r\nimport {\r\n\tFormsListAction,\r\n\tFormsListActionTypes,\r\n\tFormsListActions,\r\n\tFormsListFailedAction,\r\n\tFormsListStartAction,\r\n\tFormsListSucceedAction,\r\n\tFormSchemaFechedAction\r\n} from \"./list.actions\";\r\n\r\n@Injectable()\r\nexport class FormsListEffects {\r\n\tconstructor(private actions$: Actions<any>, private router: Router, private service: FormService) {}\r\n\r\n\t@Effect()\r\n\tEditProfileRequest$ = this.actions$.pipe(\r\n\t\tofType<any>(FormsListActionTypes.FORMS_LIST),\r\n\t\tmap(data => new FormsListStartAction())\r\n\t);\r\n\r\n\t@Effect()\r\n\tGetForm$ = this.actions$.pipe(\r\n\t\tofType<any>(FormsListActionTypes.GET_FORM_SCHEMA),\r\n\t\tmap(action => action.payload),\r\n\t\tswitchMap(id => this.service.get(id)),\r\n\t\tmap(formSchema => new FormSchemaFechedAction(formSchema))\r\n\t);\r\n\r\n\t@Effect()\r\n\tget_forms_list$ = this.actions$.pipe(\r\n\t\tofType(FormsListActionTypes.FORMS_LIST_START),\r\n\t\tswitchMap((data: any) => this.service.getList()),\r\n\t\tmap(res => new FormsListSucceedAction(res)),\r\n\t\tcatchError(() => of(new FormsListFailedAction()))\r\n\t);\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { Action } from \"@ngrx/store\";\r\nimport { Actions, Effect, ofType } from \"@ngrx/effects\";\r\nimport { of } from \"rxjs/observable/of\";\r\nimport { Store } from \"@ngrx/store\";\r\n\r\nimport { FormService } from \"../services/form.service\";\r\nimport { EditFormApiModel } from \"../models\";\r\nimport {\r\n\tEditFormActionTypes,\r\n\tEditFormStartAction,\r\n\tEditFormSucceedAction,\r\n\tEditFormFailedAction\r\n} from \"./edit-form.actions\";\r\nimport { UpdateFormSchemaAction } from \"../list\";\r\nimport { map, switchMap, catchError } from \"rxjs/operators\";\r\n\r\n@Injectable()\r\nexport class EditFormEffects {\r\n\tconstructor(private actions$: Actions<any>, private router: Router, private service: FormService) {}\r\n\r\n\t@Effect()\r\n\tEditForm$ = this.actions$.pipe(\r\n\t\tofType<any>(EditFormActionTypes.EDIT_FORM),\r\n\t\tmap(action => action.payload),\r\n\t\tmap(data => new EditFormStartAction(data))\r\n\t);\r\n\r\n\t@Effect()\r\n\tEditFormStart$ = this.actions$.pipe(\r\n\t\tofType<any>(EditFormActionTypes.EDIT_FORM_START),\r\n\t\tmap(action => action.payload),\r\n\t\tswitchMap((data: EditFormApiModel.Request) => this.service.update(data)),\r\n\t\tmap(formSchema => new EditFormSucceedAction(formSchema)),\r\n\t\tcatchError(() => of(new EditFormFailedAction()))\r\n\t);\r\n\r\n\t@Effect()\r\n\tUpdateFormsListStart$ = this.actions$.pipe(\r\n\t\tofType<any>(EditFormActionTypes.EDIT_FORM_SUCCEED),\r\n\t\tmap(action => action.payload),\r\n\t\tmap(formSchema => new UpdateFormSchemaAction(formSchema))\r\n\t);\r\n}\r\n","import { ModuleWithProviders } from \"@angular/core\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\n\r\nimport { MainContainerComponent } from \"./main-container/main-container.component/main-container.component\";\r\nimport { EditFormContainerComponent } from \"./edit/edit-form-container/edit-form-container.component\";\r\nimport { AddFormContainerComponent } from \"./add/add-form-container/add-form-container.component\";\r\nimport { FormListContainerComponent } from \"./list/form-list-container/form-list.container.component\";\r\n\r\nconst routes: Routes = [\r\n\t{\r\n\t\tpath: \"form\",\r\n\t\tcomponent: MainContainerComponent,\r\n\t\tchildren: [\r\n\t\t\t{\r\n\t\t\t\tpath: \"add\",\r\n\t\t\t\tcomponent: AddFormContainerComponent\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tpath: \"edit/:_id\",\r\n\t\t\t\tcomponent: EditFormContainerComponent\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tpath: \"\",\r\n\t\t\t\tcomponent: FormListContainerComponent\r\n\t\t\t}\r\n\t\t]\r\n\t}\r\n];\r\n\r\nexport const RoutingModule: ModuleWithProviders = RouterModule.forChild(routes);\r\n","import { Action } from \"@ngrx/store\";\r\n\r\nimport { FormSchemaModel } from \"../models\";\r\nimport { CaptchaModel } from \"../models/captcha.model\";\r\n\r\nexport enum CaptchaActionTypes {\r\n\tGET_CAPTCHA = \"[CAPTCHA][GET] GET_CAPTCHA\",\r\n\tGET_CAPTCHA_START = \"[CAPTCHA][GET] GET_CAPTCHA_START\",\r\n\tGET_CAPTCHA_SUCCEED = \"[CAPTCHA][GET] GET_CAPTCHA_SUCCEED\",\r\n\tGET_CAPTCHA_FAILED = \"[CAPTCHA][GET] GET_CAPTCHA_FAILED\"\r\n}\r\n\r\nexport class GetCaptchaAction implements Action {\r\n\treadonly type = CaptchaActionTypes.GET_CAPTCHA;\r\n\t// constructor(public payload: CaptchaModel) { }\r\n}\r\nexport class GetCaptchaStartAction implements Action {\r\n\treadonly type = CaptchaActionTypes.GET_CAPTCHA_START;\r\n\tconstructor(public payload: CaptchaModel) { }\r\n}\r\nexport class GetCaptchaSucceedAction implements Action {\r\n\treadonly type = CaptchaActionTypes.GET_CAPTCHA_SUCCEED;\r\n}\r\nexport class GetCaptchaFailedAction implements Action {\r\n\treadonly type = CaptchaActionTypes.GET_CAPTCHA_FAILED;\r\n}\r\n\r\nexport type CaptchaActions = GetCaptchaAction | GetCaptchaStartAction | GetCaptchaSucceedAction | GetCaptchaFailedAction;\r\n","import \"rxjs/add/operator/map\";\r\nimport \"rxjs/add/operator/mergeMap\";\r\nimport \"rxjs/add/operator/switchMap\";\r\n\r\nimport { Injectable } from \"@angular/core\";\r\nimport { Router } from \"@angular/router\";\r\nimport { Observable } from \"rxjs/Observable\";\r\nimport { Action } from \"@ngrx/store\";\r\nimport { Actions, Effect, ofType } from \"@ngrx/effects\";\r\nimport { of } from \"rxjs/observable/of\";\r\nimport { Store } from \"@ngrx/store\";\r\n\r\nimport { FormService } from \"../services/form.service\";\r\nimport { AddFormApiModel } from \"../models\";\r\nimport {\r\n\tCaptchaActionTypes,\r\n\tGetCaptchaSucceedAction,\r\n\tGetCaptchaFailedAction,\r\n\tGetCaptchaStartAction\r\n} from \"./captcha.actions\";\r\nimport { map, switchMap, catchError } from \"rxjs/operators\";\r\nimport { FormCaptchaService } from \"../services/form-captcha.service\";\r\n\r\n@Injectable()\r\nexport class CaptchaEffects {\r\n\tconstructor(private actions$: Actions<any>, private router: Router, private service: FormCaptchaService) {}\r\n\r\n\t@Effect()\r\n\tGetCaptcha$ = this.actions$.pipe(\r\n\t\tofType<any>(CaptchaActionTypes.GET_CAPTCHA),\r\n\t\tmap(action => action.payload),\r\n\t\tmap(data => new GetCaptchaStartAction(data))\r\n\t);\r\n\r\n\t@Effect()\r\n\tAddFormStart$ = this.actions$.pipe(\r\n\t\tofType<any>(CaptchaActionTypes.GET_CAPTCHA_START),\r\n\t\tmap(action => action.payload),\r\n\t\tswitchMap((data: AddFormApiModel.Request) => this.service.getCaptcha()),\r\n\t\tmap(res => new GetCaptchaSucceedAction()),\r\n\t\tcatchError(() => of(new GetCaptchaFailedAction()))\r\n\t);\r\n}\r\n","import { NgModule, ModuleWithProviders } from \"@angular/core\";\r\nimport { CommonModule } from \"@angular/common\";\r\nimport { RouterModule, Routes } from \"@angular/router\";\r\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\r\nimport { HttpClientModule } from \"@angular/common/http\";\r\nimport { FlexLayoutModule } from \"@angular/flex-layout\";\r\nimport {\r\n\tMatExpansionModule,\r\n\tMatSnackBarModule,\r\n\tMatIconModule,\r\n\tMatButtonModule,\r\n\tMatCardModule,\r\n\tMatSelectModule,\r\n\tMatInputModule,\r\n\tMatFormFieldModule,\r\n\tMatTabsModule,\r\n\tMatRadioModule,\r\n\tMatSlideToggleModule,\r\n\tMatDividerModule,\r\n\tMatCheckboxModule,\r\n\tMatTableModule,\r\n\tMatDatepickerModule\r\n} from \"@angular/material\";\r\nimport { StoreModule } from \"@ngrx/store\";\r\nimport { EffectsModule, mergeEffects } from \"@ngrx/effects\";\r\n\r\nimport { FormModuleConfig, MODULE_CONFIG_TOKEN, MODULE_DEFAULT_CONFIG } from \"./form.config\";\r\nimport { FormReducers } from \"./main-container/main-container.reducers\";\r\nimport { SelectComponent } from \"./view/form-controls/select/select.component\";\r\nimport { FormGroupComponent } from \"./add/form-group/form-group.component\";\r\nimport { FormArrayComponent } from \"./add/form-array/form-array.component\";\r\nimport { FormControlComponent } from \"./add/form-control/form-control.component\";\r\nimport { FormViewComponent, DynamicFieldDirective } from \"./view/form-view/form-view.component\";\r\nimport { TextComponent } from \"./view/form-controls/text/text.component\";\r\nimport { CheckboxComponent } from \"./view/form-controls/checkbox/checkbox.component\";\r\nimport { EmailComponent } from \"./view/form-controls/email/email.component\";\r\nimport { ColorComponent } from \"./view/form-controls/color/color.component\";\r\nimport { NumberComponent } from \"./view/form-controls/number/number.component\";\r\nimport { TableComponent } from \"./view/form-controls/table/table.component\";\r\nimport { EditFormContainerComponent } from \"./edit/edit-form-container/edit-form-container.component\";\r\nimport { EditFormComponent } from \"./edit/edit-form/edit-form.component\";\r\nimport { FormListContainerComponent } from \"./list/form-list-container/form-list.container.component\";\r\nimport { FormListComponent } from \"./list/form-list/form-list.component\";\r\nimport { AddFormContainerComponent } from \"./add/add-form-container/add-form-container.component\";\r\nimport { MainContainerComponent } from \"./main-container/main-container.component/main-container.component\";\r\nimport { AddFormComponent } from \"./add/add-form/add-form.component\";\r\nimport { AddFormEffects } from \"./add/add-form.effects\";\r\nimport { EditFormEffects } from \"./edit/edit-form.effects\";\r\nimport { FormsListEffects } from \"./list/list.effects\";\r\nimport { RoutingModule } from \"./form-routing.module\";\r\nimport { DateFormInputControlComponent } from \"./view/form-controls/date/date.component\";\r\nimport { FileFormInputControlComponent } from \"./view/form-controls/file/file.component\";\r\nimport { CaptchaEffects } from \"./add/captcha.effects\";\r\nimport { FormCaptchaComponent } from \"./view/form-controls/form-captcha/form-captcha.component\";\r\nimport { FormConfigurationService } from \"./services/form-configuration.service\";\r\n\r\n@NgModule({\r\n\timports: [\r\n\t\tHttpClientModule,\r\n\t\tFormsModule,\r\n\t\tRouterModule,\r\n\t\tCommonModule,\r\n\t\tMatExpansionModule,\r\n\t\tMatSnackBarModule,\r\n\t\tMatIconModule,\r\n\t\tMatDatepickerModule,\r\n\t\tMatButtonModule,\r\n\t\tMatCardModule,\r\n\t\tMatCheckboxModule,\r\n\t\tMatTableModule,\r\n\t\tMatSelectModule,\r\n\t\tMatInputModule,\r\n\t\tMatFormFieldModule,\r\n\t\tMatTabsModule,\r\n\t\tMatDividerModule,\r\n\t\tFlexLayoutModule,\r\n\t\tMatRadioModule,\r\n\t\tMatSlideToggleModule,\r\n\t\tReactiveFormsModule\r\n\t],\r\n\tdeclarations: [\r\n\t\tEditFormContainerComponent,\r\n\t\tEditFormComponent,\r\n\t\tFormListContainerComponent,\r\n\t\tFormListComponent,\r\n\t\tAddFormContainerComponent,\r\n\t\tMainContainerComponent,\r\n\t\tAddFormComponent,\r\n\t\tFormGroupComponent,\r\n\t\tFormArrayComponent,\r\n\t\tFormControlComponent,\r\n\t\tFormViewComponent,\r\n\t\tDynamicFieldDirective,\r\n\t\tSelectComponent,\r\n\t\tCheckboxComponent,\r\n\t\tEmailComponent,\r\n\t\tColorComponent,\r\n\t\tDateFormInputControlComponent,\r\n\t\tFileFormInputControlComponent,\r\n\t\tTextComponent,\r\n\t\tNumberComponent,\r\n\t\tTableComponent,\r\n\t\tFormCaptchaComponent\r\n\t\t// NgsFormSelectorComponent\r\n\t],\r\n\tentryComponents: [\r\n\t\tSelectComponent,\r\n\t\tCheckboxComponent,\r\n\t\tEmailComponent,\r\n\t\tColorComponent,\r\n\t\tDateFormInputControlComponent,\r\n\t\tFileFormInputControlComponent,\r\n\t\tTextComponent,\r\n\t\tNumberComponent,\r\n\t\tTableComponent,\r\n\t\tFormCaptchaComponent\r\n\t],\r\n\texports: [FormViewComponent]\r\n\t// exports: [ FormViewComponent, NgsFormSelectorComponent ]\r\n})\r\nexport class NgsFormModule {\r\n\tstatic forRoot(config?: FormModuleConfig): ModuleWithProviders {\r\n\t\treturn {\r\n\t\t\tngModule: RootNgsFormModule,\r\n\t\t\tproviders: [{ provide: MODULE_CONFIG_TOKEN, useValue: config }, FormConfigurationService]\r\n\t\t};\r\n\t}\r\n}\r\n\r\n@NgModule({\r\n\timports: [\r\n\t\tNgsFormModule,\r\n\t\tStoreModule.forFeature(\"form\", FormReducers),\r\n\t\tEffectsModule.forFeature([AddFormEffects, EditFormEffects, FormsListEffects, CaptchaEffects]),\r\n\t\tRoutingModule\r\n\t],\r\n\texports: [NgsFormModule]\r\n})\r\nexport class RootNgsFormModule {\r\n\tconstructor() {\r\n\t\t(<any>window).___starter = (<any>window).___starter || {};\r\n\t\t(<any>window).___starter.form = \"8.0.11\";\r\n\t}\r\n}\r\n"]}
\No newline at end of file