UNPKG

123 kBSource Map (JSON)View Raw
1{"version":3,"file":"soushians-form.js.map","sources":["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"],"sourcesContent":["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\ttemplate: `<div [formGroup]=\"group\">\r\n<mat-form-field>\r\n <mat-select [formControlName]=\"config.name\" [placeholder]=\"config.title\">\r\n <mat-option *ngFor=\"let option of config.options\" [value]=\"option.value\">{{option.key}}</mat-option>\r\n </mat-select>\r\n</mat-form-field>\r\n</div>`,\r\n\tstyles: [`:host{display:block}.mat-form-field{width:100%}`]\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\ttemplate: `<div [formGroup]=\"group\">\r\n <mat-checkbox [formControlName]=\"config.name\">\r\n {{config.title}}\r\n </mat-checkbox>\r\n</div>`,\r\n\tstyles: [`:host{display:block}.mat-form-field{width:100%}`]\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\ttemplate: `<div [formGroup]=\"group\">\r\n<mat-form-field fxFlexFill>\r\n <input matInput [type]=\"config.inputType\" [placeholder]=\"config.title\" [formControlName]=\"config.name\">\r\n</mat-form-field>\r\n</div>`,\r\n\tstyles: [`:host{display:block}.mat-form-field{width:100%}`]\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\ttemplate: `<div [formGroup]=\"form\">\r\n<mat-form-field fxFlexFill>\r\n <input matInput [type]=\"schema.inputType\" [placeholder]=\"schema.title\" [formControlName]=\"schema.name\">\r\n</mat-form-field>\r\n</div>`,\r\n\tstyles: [`:host{display:block}.mat-form-field{width:100%}`]\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\ttemplate: `<div class=\"example-container mat-elevation-z8\" *ngIf=\"ready\">\r\n <mat-table #table [dataSource]=\"dataSource\">\r\n \r\n <ng-container matColumnDef=\"select\">\r\n <mat-header-cell *matHeaderCellDef>\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [checked]=\"selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n </mat-header-cell>\r\n <mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selection.toggle(row) : null\"\r\n [checked]=\"selection.isSelected(row)\">\r\n </mat-checkbox>\r\n </mat-cell>\r\n </ng-container>\r\n\r\n <div *ngFor=\"let col of filedDisplayedColumns\">\r\n <ng-container [matColumnDef]=\"col\">\r\n <mat-header-cell *matHeaderCellDef> {{col}} </mat-header-cell>\r\n <mat-cell *matCellDef=\"let element\"> {{element[col]}} </mat-cell>\r\n </ng-container>\r\n </div>\r\n \r\n <ng-container matColumnDef=\"actions\">\r\n <mat-header-cell *matHeaderCellDef></mat-header-cell>\r\n <mat-cell class='left-align' *matCellDef=\"let row\">\r\n <button mat-icon-button>\r\n <mat-icon aria-label=\"انتخاب\">arrow_back</mat-icon>\r\n </button>\r\n </mat-cell>\r\n </ng-container>\r\n \r\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\r\n <mat-row *matRowDef=\"let row; columns: displayedColumns;\" (click)=\"selection.toggle(row)\"></mat-row>\r\n\r\n </mat-table>\r\n </div>\r\n\r\n\r\n<!-- <mat-form-field fxFlexFill [formGroup]=\"form\">\r\n \r\n <input matInput [id]=\"schema.name\" [type]=\"schema.inputType\" [placeholder]=\"schema.title\" [formControlName]=\"schema.name\">\r\n \r\n <mat-error *ngIf=\"form.get(schema.name).errors?.required\">\r\n {{schema.validator.required.message}}\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get(schema.name).errors?.minlength\">\r\n {{schema.validator.minlength.message}}\r\n </mat-error>\r\n <mat-error *ngIf=\"form.get(schema.name).email?.minlength\">\r\n {{schema.validator.email.message}}\r\n </mat-error>\r\n</mat-form-field> -->\r\n \r\n <!-- <div *ngIf=\"form.get(schema.name).invalid && (form.get(schema.name).dirty || form.get(schema.name).touched)\" class=\"alert alert-danger\">\r\n </div> -->`,\r\n\tstyles: [`:host{display:block}.mat-form-field{width:100%}`]\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\ttemplate: `<div [formGroup]=\"form\">\r\n <mat-form-field fxFlexFill>\r\n <input matInput [type]=\"schema.inputType\" [placeholder]=\"schema.title\" [formControlName]=\"schema.name\">\r\n </mat-form-field>\r\n</div>`,\r\n\tstyles: [`:host{display:block}.mat-form-field{width:100%}`]\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\ttemplate: `<mat-form-field fxFlexFill [formGroup]=\"group\">\r\n\r\n <input matInput [id]=\"config.name\" [type]=\"config.inputType\" [placeholder]=\"config.title\" [formControlName]=\"config.name\">\r\n\r\n <mat-error *ngIf=\"group.get(config.name).errors?.required\">\r\n {{config.validator.required.message}}\r\n </mat-error>\r\n <mat-error *ngIf=\"group.get(config.name).errors?.minlength\">\r\n {{config.validator.minlength.message}}\r\n </mat-error>\r\n <!-- <mat-error *ngIf=\"group.get(config.name).email?.minlength\">\r\n {{config.validator.email.message}}\r\n </mat-error> -->\r\n\r\n <!-- <div *ngIf=\"form.get(config.name).invalid && (form.get(config.name).dirty || form.get(config.name).touched)\" class=\"alert alert-danger\">\r\n </div> -->\r\n\r\n</mat-form-field>`,\r\n\tstyles: [`:host{display:block}.mat-form-field{width:100%}`]\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\ttemplate: `<mat-form-field fxFlexFill [formGroup]=\"group\">\r\n\r\n <!-- <input matInput [id]=\"config.name\" [type]=\"config.inputType\" [placeholder]=\"config.title\" [formControlName]=\"config.name\"> -->\r\n <input matInput [id]=\"config.name\" [matDatepicker]=\"_datepicker\" [placeholder]=\"config.title\" [formControlName]=\"config.name\">\r\n <mat-datepicker-toggle matSuffix [for]=\"_datepicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #_datepicker></mat-datepicker>\r\n\r\n <mat-error *ngIf=\"group.get(config.name).errors?.required\">\r\n {{config.validator.required.message}}\r\n </mat-error>\r\n <mat-error *ngIf=\"group.get(config.name).errors?.minlength\">\r\n {{config.validator.minlength.message}}\r\n </mat-error>\r\n <!-- <mat-error *ngIf=\"group.get(config.name).email?.minlength\">\r\n {{config.validator.email.message}}\r\n </mat-error> -->\r\n\r\n <!-- <div *ngIf=\"form.get(config.name).invalid && (form.get(config.name).dirty || form.get(config.name).touched)\" class=\"alert alert-danger\">\r\n </div> -->\r\n\r\n</mat-form-field>\r\n\r\n<!-- \r\n\r\n<div [formGroup]=\"formGroup\">\r\n <div class=\"field-wrapper\">\r\n <div [@filedAnimation]=\"mode\">\r\n <mat-form-field class=\"fit\" [(ngClass)]=\"mode\">\r\n <input matInput [matDatepicker]=\"_datepicker\" [placeholder]=\"placeholder\" [formControlName]=\"controlName\">\r\n <mat-datepicker-toggle matSuffix [for]=\"_datepicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #_datepicker></mat-datepicker>\r\n \r\n <mat-icon class=\"tooltip md-18\" *ngIf=\"tooltip\" [matTooltip]=\"tooltip\">help</mat-icon>\r\n </mat-form-field>\r\n <div class=\"value-box\"> \r\n <span class=\"name\">\r\n {{ placeholder }} :\r\n </span>\r\n <span class=\"value\">\r\n {{(DisplayValue$ | async | persianDate)}} \r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div> -->`,\r\n\tstyles: [`:host{display:block}.mat-form-field{width:100%}`]\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\ttemplate: `<div fxFlexFill [formGroup]=\"group\">\r\n\r\n <!-- <input matInput [id]=\"config.name\" [type]=\"config.inputType\" [placeholder]=\"config.title\" [formControlName]=\"config.name\"> -->\r\n <input [id]=\"config.name\" [type]=\"config.inputType\" [placeholder]=\"config.title\" [formControlName]=\"config.name\">\r\n\r\n <mat-error *ngIf=\"group.get(config.name).errors?.required\">\r\n {{config.validator.required.message}}\r\n </mat-error>\r\n <mat-error *ngIf=\"group.get(config.name).errors?.minlength\">\r\n {{config.validator.minlength.message}}\r\n </mat-error>\r\n <!-- <mat-error *ngIf=\"group.get(config.name).email?.minlength\">\r\n {{config.validator.email.message}}\r\n </mat-error> -->\r\n\r\n <!-- <div *ngIf=\"form.get(config.name).invalid && (form.get(config.name).dirty || form.get(config.name).touched)\" class=\"alert alert-danger\">\r\n </div> -->\r\n\r\n</div>\r\n\r\n<!-- \r\n\r\n<div [formGroup]=\"formGroup\">\r\n <div class=\"field-wrapper\">\r\n <div [@filedAnimation]=\"mode\">\r\n <mat-form-field class=\"fit\" [(ngClass)]=\"mode\">\r\n <input matInput [matDatepicker]=\"_datepicker\" [placeholder]=\"placeholder\" [formControlName]=\"controlName\">\r\n <mat-datepicker-toggle matSuffix [for]=\"_datepicker\"></mat-datepicker-toggle>\r\n <mat-datepicker #_datepicker></mat-datepicker>\r\n \r\n <mat-icon class=\"tooltip md-18\" *ngIf=\"tooltip\" [matTooltip]=\"tooltip\">help</mat-icon>\r\n </mat-form-field>\r\n <div class=\"value-box\"> \r\n <span class=\"name\">\r\n {{ placeholder }} :\r\n </span>\r\n <span class=\"value\">\r\n {{(DisplayValue$ | async | persianDate)}} \r\n </span>\r\n </div>\r\n </div>\r\n </div>\r\n</div> -->`,\r\n\tstyles: [`:host{display:block}.mat-form-field{width:100%}`]\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\tdebugger;\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\ttemplate: `<div fxLayout=\"row wrap\" fxLayoutAlign=\"start center\">\r\n <img [src]=\"captcha.captchaImg\" />\r\n\r\n <button mat-icon-button color=\"primary\" (click)=\"refresh()\">\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n\r\n <div [formGroup]=\"group\">\r\n <mat-form-field fxFlex>\r\n <input matInput [id]=\"config.name\" [placeholder]=\"config.title\" [formControlName]=\"config.name\" />\r\n </mat-form-field>\r\n </div>\r\n</div>`,\r\n\tstyles: [`img{border:1px solid #e4e4e4}`]\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\tdebugger;\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/src/linker/component_factory\";\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\ttemplate: `<div fxFlex=\"nogrow\" fxLayoutAlign=\"center center\" class=\"main-container\">\r\n <form *ngIf=\"formGroupCreated && card\" class=\"ngs-dynamic-form\" [formGroup]=\"formGroup\" (ngSubmit)=\"accepted()\">\r\n <mat-card>\r\n <mat-card-title>\r\n {{(schema$ | async)?.name}}\r\n </mat-card-title>\r\n <mat-card-content fxLayout=\"row wrap\" fxLayoutGap=\"25px\">\r\n <div *ngFor=\"let field of (schema$ | async)?.form.fields;\" [fxFlex]=\"field.width * 10\">\r\n <ng-container *ngIf=\"field && field.inputType\" dynamicField [config]=\"field\" [group]=\"formGroup\"></ng-container>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions align=\"end\">\r\n <button type=\"button\" *ngIf=\"(schema$ | async)?.events.cancel.show\" (click)=\"cancel.emit()\" mat-button color=\"primary\">{{(schema$\r\n | async)?.events.cancel.text}}</button>\r\n <button type=\"submit\" *ngIf=\"(schema$ | async)?.events.accept.show\" mat-raised-button color=\"primary\">{{(schema$\r\n | async)?.events.accept.text}}</button>\r\n </mat-card-actions>\r\n </mat-card>\r\n </form>\r\n <form *ngIf=\"formGroupCreated && !card\" class=\"ngs-dynamic-form\" [formGroup]=\"formGroup\" (ngSubmit)=\"accepted()\">\r\n <div>\r\n <h3>\r\n {{(schema$ | async)?.name}}\r\n </h3>\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"5px\">\r\n <div *ngFor=\"let field of (schema$ | async)?.form.fields;\" [fxFlex]=\"field.width * 10\">\r\n <ng-container dynamicField [config]=\"field\" [group]=\"formGroup\"></ng-container>\r\n </div>\r\n </div>\r\n <div>\r\n <button type=\"button\" *ngIf=\"(schema$ | async)?.events.cancel.show\" (click)=\"cancel.emit()\" mat-button color=\"primary\">{{(schema$\r\n | async)?.events.cancel.text}}</button>\r\n <button type=\"submit\" *ngIf=\"(schema$ | async)?.events.accept.show\" mat-raised-button color=\"primary\">{{(schema$\r\n | async)?.events.accept.text}}</button>\r\n </div>\r\n </div>\r\n </form>\r\n\r\n</div>`,\r\n\tstyles: [``]\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\tdebugger;\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\tdebugger;\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\ttemplate: `<div>\r\n\r\n <mat-form-field *ngIf=\"!noHeader\">\r\n <input matInput [(ngModel)]=\"schema.name\" placeholder=\"Name\">\r\n </mat-form-field>\r\n\r\n <mat-form-field *ngIf=\"!noHeader\">\r\n <input matInput [(ngModel)]=\"schema.title\" placeholder=\"عنوان\">\r\n </mat-form-field>\r\n\r\n <div class=\"button-row\">\r\n <button mat-button color=\"primary\" (click)=\"addFormGroup(schema)\"> addFormGroup </button>\r\n <button mat-button color=\"primary\" (click)=\"addFormArray(schema)\"> addFormArray </button>\r\n <button mat-button color=\"primary\" (click)=\"addFormControl(schema)\">addFormControl</button>\r\n </div>\r\n\r\n <div *ngFor=\"let field of schema.fields;let i = index\">\r\n <div [ngSwitch]=\"field.type\">\r\n <app-form-group *ngSwitchCase=\"'group'\" [schema]=\"field\" (change)=\"changed()\"></app-form-group>\r\n <!-- <app-form-array *ngSwitchCase=\"'array'\" [schema]=\"field\" (change)=\"changed()\"></app-form-array> -->\r\n <app-form-control *ngSwitchCase=\"'control'\" [schema]=\"field\" (changes)=\"changed()\" (delete)=\"deleteFormGroup(i)\"></app-form-control>\r\n </div>\r\n </div>\r\n</div>`\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\ttemplate: `<mat-card>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <input matInput [(ngModel)]=\"schema.name\" placeholder=\"Name\">\r\n </mat-form-field>\r\n \r\n <div class=\"button-row\">\r\n <button mat-button color=\"primary\" (click)=\"addFormGroup(schema)\">addFormGroup</button>\r\n <button mat-button color=\"primary\" (click)=\"addFormArray(schema)\">addFormArray</button>\r\n <!-- <button mat-button color=\"primary\" (click)=\"addFormControl(schema)\">addFormControl</button> -->\r\n </div>\r\n \r\n <div *ngFor=\"let field of schema.fields\">\r\n <div [ngSwitch]=\"field.type\">\r\n <app-form-group *ngSwitchCase=\"'group'\" [schema]=\"field\" (changes)=\"changed()\"></app-form-group>\r\n <app-form-array *ngSwitchCase=\"'array'\" [schema]=\"field\" (changes)=\"changed()\"></app-form-array>\r\n <!-- <app-form-control *ngSwitchCase=\"'control'\" [schema]=\"field\" (change)=\"changed($event)\"></app-form-control> -->\r\n </div>\r\n </div>\r\n \r\n </mat-card-content>\r\n</mat-card>`\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\ttemplate: `<mat-expansion-panel>\r\n <mat-expansion-panel-header>\r\n <mat-panel-title fxLayout=\"row\" fxLayoutAlign=\"start center\">\r\n <button mat-icon-button (click)=\"delete.emit()\">\r\n <mat-icon aria-label=\"icon-button\">delete_forever</mat-icon>\r\n </button>\r\n <span>{{schema.name}}</span>\r\n\r\n </mat-panel-title>\r\n </mat-expansion-panel-header>\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px\">\r\n <mat-form-field fxFlex>\r\n <input matInput [(ngModel)]=\"schema.name\" (change)=\"changed()\" placeholder=\"Name\">\r\n </mat-form-field>\r\n\r\n <mat-form-field fxFlex>\r\n <input matInput [(ngModel)]=\"schema.title\" (change)=\"changed()\" placeholder=\"Placeholder\" />\r\n </mat-form-field>\r\n\r\n <mat-form-field fxFlex>\r\n <mat-select [(ngModel)]=\"schema.inputType\" (change)=\"changed()\" placeholder=\"Input Type\">\r\n <mat-option value=\"table\">table</mat-option>\r\n <mat-option value=\"select\">select</mat-option>\r\n <mat-option value=\"text\">text</mat-option>\r\n <mat-option value=\"number\">number</mat-option>\r\n <mat-option value=\"email\">email</mat-option>\r\n <mat-option value=\"color\">color</mat-option>\r\n <mat-option value=\"radio\">radio</mat-option>\r\n <mat-option value=\"checkbox\">checkbox</mat-option>\r\n <mat-option value=\"checkbox\">captcha</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px\">\r\n <mat-form-field fxFlex>\r\n <input matInput [(ngModel)]=\"schema.value\" (change)=\"changed()\" placeholder=\"Value\" />\r\n </mat-form-field>\r\n\r\n <mat-form-field fxFlex>\r\n <mat-select [(ngModel)]=\"schema.width\" (change)=\"changed()\" placeholder=\"width\">\r\n <mat-option *ngFor=\"let item of width\" [value]=\"item\">{{item}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n <div fxLayout=\"column\" fxLayoutGap=\"10px\">\r\n <div *ngIf=\"schema.inputType=='table'\" [formGroup]=\"tableOptions\">\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" formControlName=\"dataEndpoint\" placeholder=\"dataEndpoint\" />\r\n </mat-form-field>\r\n </div>\r\n\r\n <div *ngIf=\"schema.inputType=='select'\">\r\n [options]\r\n <button (click)=\"addOption()\">+</button>\r\n <button (click)=\"insertOptions()\">insert</button>\r\n <div *ngFor=\"let option of options.controls;index as i\">\r\n {{i}}\r\n <div [formGroup]=\"options.controls[i]\">\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" formControlName=\"key\" placeholder=\"key\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" formControlName=\"value\" placeholder=\"value\" />\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </div>\r\n <br />\r\n <mat-card fxLayout=\"column\">\r\n <mat-slide-toggle (change)=\"changed()\" [(ngModel)]=\"schema.validator.required.active\">اجباری</mat-slide-toggle>\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" [(ngModel)]=\"schema.validator.required.message\" placeholder=\"پیغام\" />\r\n </mat-form-field>\r\n </mat-card>\r\n <mat-card fxLayout=\"column\">\r\n <mat-slide-toggle (change)=\"changed()\" [(ngModel)]=\"schema.validator.email.active\">ایمیل</mat-slide-toggle>\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" [(ngModel)]=\"schema.validator.email.message\" placeholder=\"پیغام\" />\r\n </mat-form-field>\r\n </mat-card>\r\n <mat-card fxLayout=\"column\">\r\n <mat-slide-toggle (change)=\"changed()\" [(ngModel)]=\"schema.validator.minlength.active\">حداقل تعداد کاراکتر</mat-slide-toggle>\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" [(ngModel)]=\"schema.validator.minlength.message\" placeholder=\"پیغام\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" [(ngModel)]=\"schema.validator.minlength.value\" placeholder=\"تعداد حداقل کاراکتر\" />\r\n </mat-form-field>\r\n </mat-card>\r\n </div>\r\n</mat-expansion-panel>`\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\ttemplate: `<div fxLayout=\"row\" *ngIf=\"schema\">\r\n <div [fxFlex]=\"50\" *ngIf=\"formGroup\">\r\n <form [formGroup]=\"formGroup\">\r\n <mat-card>\r\n <mat-card-title>ایجاد فرم جدید</mat-card-title>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <input type=\"text\" matInput (change)=\"changed()\" placeholder=\"نام فرم\" formControlName=\"name\">\r\n </mat-form-field>\r\n <!-- <div class=\"button-row\">\r\n <button mat-button color=\"primary\" (click)=\"addFormGroup(schema.form)\">Add form group</button>\r\n <button mat-button color=\"primary\" (click)=\"addFormArray(schema.form)\">Add form array</button>\r\n <button mat-button color=\"primary\" (click)=\"addFormControl(schema.form)\">Add form control</button>\r\n </div> -->\r\n </mat-card-content>\r\n </mat-card>\r\n <mat-card>\r\n <mat-card-content>\r\n <div [ngSwitch]=\"schema.form?.type\">\r\n <app-form-group *ngSwitchCase=\"'group'\" [schema]=\"schema.form\" noHeader=\"true\" (changes)=\"changed()\"></app-form-group>\r\n <app-form-array *ngSwitchCase=\"'array'\" [schema]=\"schema.form\" (changes)=\"changed()\"></app-form-array>\r\n </div>\r\n </mat-card-content>\r\n <mat-card-actions>\r\n <!-- <button mat-raised-button color=\"primary\" (click)=\"form.generate(schema)\">ایجاد فرم</button> -->\r\n <button mat-raised-button color=\"primary\" (click)=\"emit()\" type=\"submit\">ثبت</button>\r\n </mat-card-actions>\r\n\r\n <div [formGroup]=\"$any(formGroup.controls.events).controls.accept\">\r\n <mat-slide-toggle (change)=\"changed()\" formControlName=\"show\">نمایش تایید</mat-slide-toggle>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"changed()\" matInput placeholder=\"متن تایید\" formControlName=\"text\">\r\n </mat-form-field>\r\n </div>\r\n <div [formGroup]=\"$any(formGroup.controls.events).controls.cancel\">\r\n <mat-slide-toggle (change)=\"changed()\" formControlName=\"show\">نمایش انصراف</mat-slide-toggle>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"changed()\" matInput placeholder=\"متن انصراف\" formControlName=\"text\">\r\n </mat-form-field>\r\n </div>\r\n\r\n </mat-card>\r\n </form>\r\n </div>\r\n <div [fxFlex]=\"50\">\r\n <ngs-form-view [local]='true' [id]=\"schema._id\"></ngs-form-view>\r\n </div>\r\n</div>`\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 template: `<div fxLayout=\"row\" fxLayoutAlign=\"center\" fxLayoutGap=\"25px\" class=\"main-container\">\r\n\r\n <div class=\"content-action\">\r\n <mat-card fxLayout=\"column\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start\" class=\"with-sticky-action\">\r\n <div fxLayout=\"row wrap\" *ngIf=\"schema\" fxFlex=\"100\" fxLayoutAlign=\"start start\" fxLayoutAlign.lt-md=\"center\">\r\n <div fxFlex.gt-md=\"50\" fxFlex.lt-md=\"100\" *ngIf=\"formGroup\">\r\n <form [formGroup]=\"formGroup\">\r\n <mat-card>\r\n <mat-card-title>ایجاد فرم جدید</mat-card-title>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <input type=\"text\" matInput (change)=\"changed()\" placeholder=\"نام فرم\" formControlName=\"name\">\r\n </mat-form-field>\r\n <!-- <div class=\"button-row\">\r\n <button mat-button color=\"primary\" (click)=\"addFormGroup(schema.form)\">Add form group</button>\r\n <button mat-button color=\"primary\" (click)=\"addFormArray(schema.form)\">Add form array</button>\r\n <button mat-button color=\"primary\" (click)=\"addFormControl(schema.form)\">Add form control</button>\r\n </div> -->\r\n <mat-divider></mat-divider>\r\n <div [ngSwitch]=\"schema.form?.type\" class=\"schema-form\">\r\n <app-form-group *ngSwitchCase=\"'group'\" [schema]=\"schema.form\" noHeader=\"true\" (changes)=\"changed()\"></app-form-group>\r\n <app-form-array *ngSwitchCase=\"'array'\" [schema]=\"schema.form\" (changes)=\"changed()\"></app-form-array>\r\n </div>\r\n\r\n <mat-divider></mat-divider>\r\n <div class=\"form-buttons\" fxLayout=\"row wrap\" fxLayoutGap=\"10px\">\r\n\r\n <div fxLayout=\"column\" [formGroup]=\"$any(formGroup.controls.events).controls.accept\">\r\n <mat-slide-toggle (change)=\"changed()\" formControlName=\"show\">نمایش تایید</mat-slide-toggle>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"changed()\" matInput placeholder=\"متن تایید\" formControlName=\"text\">\r\n </mat-form-field>\r\n </div>\r\n <div fxLayout=\"column\" [formGroup]=\"$any(formGroup.controls.events).controls.cancel\">\r\n <mat-slide-toggle (change)=\"changed()\" formControlName=\"show\">نمایش انصراف</mat-slide-toggle>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"changed()\" matInput placeholder=\"متن انصراف\" formControlName=\"text\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n\r\n <mat-card-actions>\r\n <!-- <button mat-raised-button color=\"primary\" (click)=\"$any(form).generate(schema)\">ایجاد فرم</button> -->\r\n <button mat-raised-button color=\"primary\" (click)=\"emit()\" type=\"submit\">ثبت</button>\r\n </mat-card-actions>\r\n\r\n </mat-card-content>\r\n </mat-card>\r\n </form>\r\n </div>\r\n <div fxFlex.gt-md=\"50\" fxFlex.lt-md=\"100\" fxLayoutAlign=\"center start\">\r\n <ngs-form-view [local]='true' [id]=\" schema._id\">\r\n </ngs-form-view>\r\n\r\n </div>\r\n </div>\r\n </mat-card>\r\n </div>\r\n</div>`,\r\n styles: [`.form-buttons,.schema-form{padding:25px 10px}`]\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\ttemplate: `<div fxLayout=\"row\" fxLayoutAlign=\"center\" fxLayoutGap=\"25px\" class=\"main-container\">\r\n\r\n <div class=\"content-action\">\r\n <mat-card class=\"with-sticky-action\">\r\n <mat-card-header>\r\n <mat-card-title fxLayout=\"row\" fxLayoutGap=\"5px\">\r\n <mat-icon>assignment</mat-icon>\r\n <span>مدیریت فرم ها</span>\r\n </mat-card-title>\r\n <mat-card-subtitle fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\r\n <span>\r\n شامل تمامی درخواست‌ها از قبیل دائری، جمع‌آوری و ...\r\n </span>\r\n </mat-card-subtitle>\r\n </mat-card-header>\r\n\r\n <div fxLayout=\"row wrap\" fxLayoutGap=\"10px\" fxLayoutAlign=\"start\">\r\n\r\n <button fxFlex.lt-lg=\"19\" fxFlex.lg=\"24\" fxFlex.md=\"32\" fxFlex.sm=\"49\" fxFlex.xs=\"100\" class='link'\r\n mat-raised-button [routerLink]=\"['edit' , item._id]\" *ngFor=\"let item of (data$ | async)\">\r\n <div fxLayout='column' fxLayoutAlign='center center'>\r\n <mat-icon color='primary'>settings</mat-icon>\r\n <h3 class='title'>{{item.name}}</h3>\r\n </div>\r\n </button>\r\n\r\n </div>\r\n </mat-card>\r\n </div>\r\n</div>`,\r\n\tstyles: [`button.link{padding:25px 15px;margin:.5%;box-sizing:border-box}button mat-icon{font-size:34px;width:34px;height:34px}`]\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 } 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$\r\n\t\t.ofType(AddFormActionTypes.ADD_FORM)\r\n\t\t.pipe(map(action => action.payload), map(data => new AddFormStartAction(data)));\r\n\r\n\t@Effect()\r\n\tAddFormStart$ = this.actions$\r\n\t\t.ofType(AddFormActionTypes.ADD_FORM_START)\r\n\t\t.pipe(\r\n\t\t\tmap(action => action.payload),\r\n\t\t\tswitchMap((data: AddFormApiModel.Request) => this.service.add(data)),\r\n\t\t\tmap(res => new AddFormSucceedAction()),\r\n\t\t\tcatchError(() => of(new AddFormFailedAction()))\r\n\t\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 } 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$.ofType(FormsListActionTypes.FORMS_LIST).map(data => new FormsListStartAction());\r\n\r\n\t@Effect()\r\n\tGetForm$ = this.actions$\r\n\t\t.ofType(FormsListActionTypes.GET_FORM_SCHEMA)\r\n\t\t.pipe(\r\n\t\t\tmap(action => action.payload),\r\n\t\t\tswitchMap(id => this.service.get(id)),\r\n\t\t\tmap(formSchema => new FormSchemaFechedAction(formSchema))\r\n\t\t);\r\n\r\n\t@Effect()\r\n\tget_forms_list$ = this.actions$\r\n\t\t.ofType(FormsListActionTypes.FORMS_LIST_START)\r\n\t\t.pipe(\r\n\t\t\tswitchMap((data: any) => this.service.getList()),\r\n\t\t\tmap(res => new FormsListSucceedAction(res)),\r\n\t\t\tcatchError(() => of(new FormsListFailedAction()))\r\n\t\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 } 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$\r\n\t\t.ofType(EditFormActionTypes.EDIT_FORM)\r\n\t\t.pipe(map(action => action.payload), map(data => new EditFormStartAction(data)));\r\n\r\n\t@Effect()\r\n\tEditFormStart$ = this.actions$\r\n\t\t.ofType(EditFormActionTypes.EDIT_FORM_START)\r\n\t\t.pipe(\r\n\t\t\tmap(action => action.payload),\r\n\t\t\tswitchMap((data: EditFormApiModel.Request) => this.service.update(data)),\r\n\t\t\tmap(formSchema => new EditFormSucceedAction(formSchema)),\r\n\t\t\tcatchError(() => of(new EditFormFailedAction()))\r\n\t\t);\r\n\r\n\t@Effect()\r\n\tUpdateFormsListStart$ = this.actions$\r\n\t\t.ofType(EditFormActionTypes.EDIT_FORM_SUCCEED)\r\n\t\t.pipe(map(action => action.payload), map(formSchema => new UpdateFormSchemaAction(formSchema)));\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 } 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$\r\n\t\t.ofType(CaptchaActionTypes.GET_CAPTCHA)\r\n\t\t.pipe(map(action => action.payload), map(data => new GetCaptchaStartAction(data)));\r\n\r\n\t@Effect()\r\n\tAddFormStart$ = this.actions$\r\n\t\t.ofType(CaptchaActionTypes.GET_CAPTCHA_START)\r\n\t\t.pipe(\r\n\t\t\tmap(action => action.payload),\r\n\t\t\tswitchMap((data: AddFormApiModel.Request) => this.service.getCaptcha()),\r\n\t\t\tmap(res => new GetCaptchaSucceedAction()),\r\n\t\t\tcatchError(() => of(new GetCaptchaFailedAction()))\r\n\t\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 { StoreDevtoolsModule } from \"@ngrx/store-devtools\";\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\";\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"],"names":["BehaviorSubject","list.reducer","tslib_1.__extends"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAGiB,eAAe;AAAhC,WAAiB,eAAe;IAC/B,IAAA;QAKC,iBAAY,SAAyC;YAAzC,0BAAA,EAAA,8BAAY,EAA6B,CAAA;YAArD,iBAEC;YADA,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,OAAO,CAAC,UAAA,GAAG,IAAI,QAAC,KAAI,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC,GAAG,CAAC,IAAC,CAAC,CAAC;SACpE;;;;QAED,gCAAc;;;QAAd;YACC,OAAO;gBACN,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,IAAI,EAAE,IAAI,CAAC,IAAI;gBACf,MAAM,EAAE,IAAI,CAAC,MAAM;aACnB,CAAC;SACF;QACD,sBAAW,oBAAS;;;;YAApB;gBACC,OAAO,IAAI,SAAS,CAAC;oBACpB,GAAG,EAAE,IAAI,WAAW,CAAC,EAAE,EAAE,CAAE,UAAU,CAAC,QAAQ,CAAE,CAAC;oBACjD,IAAI,EAAE,IAAI,WAAW,CAAC,EAAE,EAAE,CAAE,UAAU,CAAC,QAAQ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