UNPKG

156 kBJavaScriptView Raw
1(function (global, factory) {
2 typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@ngrx/store'), require('rxjs/BehaviorSubject'), require('rxjs/operators'), require('@soushians/shared'), require('@angular/forms'), require('rxjs'), require('@soushians/config'), require('@angular/material'), require('@angular/cdk/collections'), require('@angular/common'), require('@angular/router'), require('@angular/flex-layout'), require('@ngrx/effects'), require('rxjs/Observable'), require('rxjs/add/operator/map'), require('rxjs/add/operator/mergeMap'), require('rxjs/add/operator/switchMap'), require('rxjs/observable/of')) :
3 typeof define === 'function' && define.amd ? define('@soushians/form', ['exports', '@angular/core', '@angular/common/http', '@ngrx/store', 'rxjs/BehaviorSubject', 'rxjs/operators', '@soushians/shared', '@angular/forms', 'rxjs', '@soushians/config', '@angular/material', '@angular/cdk/collections', '@angular/common', '@angular/router', '@angular/flex-layout', '@ngrx/effects', 'rxjs/Observable', 'rxjs/add/operator/map', 'rxjs/add/operator/mergeMap', 'rxjs/add/operator/switchMap', 'rxjs/observable/of'], factory) :
4 (global = global || self, factory((global.soushians = global.soushians || {}, global.soushians.form = {}), global.ng.core, global.ng.common.http, global.store, global.rxjs.BehaviorSubject, global.rxjs.operators, global.shared, global.ng.forms, global.rxjs, global.config, global.ng.material, global.ng.cdk.collections, global.ng.common, global.ng.router, global.ng['flex-layout'], global.effects, global.rxjs.Observable, global.rxjs['add/operator/map'], global.rxjs['add/operator/mergeMap'], global.rxjs['add/operator/switchMap'], global.rxjs['observable/of']));
5}(this, function (exports, core, http, store, BehaviorSubject, operators, shared, forms, rxjs, config, material, collections, common, router, flexLayout, effects, Observable, map, mergeMap, switchMap, of) { 'use strict';
6
7 /*! *****************************************************************************
8 Copyright (c) Microsoft Corporation. All rights reserved.
9 Licensed under the Apache License, Version 2.0 (the "License"); you may not use
10 this file except in compliance with the License. You may obtain a copy of the
11 License at http://www.apache.org/licenses/LICENSE-2.0
12
13 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
15 WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
16 MERCHANTABLITY OR NON-INFRINGEMENT.
17
18 See the Apache Version 2.0 License for specific language governing permissions
19 and limitations under the License.
20 ***************************************************************************** */
21 /* global Reflect, Promise */
22
23 var extendStatics = function(d, b) {
24 extendStatics = Object.setPrototypeOf ||
25 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
26 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
27 return extendStatics(d, b);
28 };
29
30 function __extends(d, b) {
31 extendStatics(d, b);
32 function __() { this.constructor = d; }
33 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
34 }
35
36 var __assign = function() {
37 __assign = Object.assign || function __assign(t) {
38 for (var s, i = 1, n = arguments.length; i < n; i++) {
39 s = arguments[i];
40 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
41 }
42 return t;
43 };
44 return __assign.apply(this, arguments);
45 };
46
47 function __rest(s, e) {
48 var t = {};
49 for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
50 t[p] = s[p];
51 if (s != null && typeof Object.getOwnPropertySymbols === "function")
52 for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
53 if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
54 t[p[i]] = s[p[i]];
55 }
56 return t;
57 }
58
59 function __decorate(decorators, target, key, desc) {
60 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
61 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
62 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;
63 return c > 3 && r && Object.defineProperty(target, key, r), r;
64 }
65
66 function __param(paramIndex, decorator) {
67 return function (target, key) { decorator(target, key, paramIndex); }
68 }
69
70 function __metadata(metadataKey, metadataValue) {
71 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
72 }
73
74 function __awaiter(thisArg, _arguments, P, generator) {
75 return new (P || (P = Promise))(function (resolve, reject) {
76 function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
77 function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
78 function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
79 step((generator = generator.apply(thisArg, _arguments || [])).next());
80 });
81 }
82
83 function __generator(thisArg, body) {
84 var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
85 return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
86 function verb(n) { return function (v) { return step([n, v]); }; }
87 function step(op) {
88 if (f) throw new TypeError("Generator is already executing.");
89 while (_) try {
90 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;
91 if (y = 0, t) op = [op[0] & 2, t.value];
92 switch (op[0]) {
93 case 0: case 1: t = op; break;
94 case 4: _.label++; return { value: op[1], done: false };
95 case 5: _.label++; y = op[1]; op = [0]; continue;
96 case 7: op = _.ops.pop(); _.trys.pop(); continue;
97 default:
98 if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
99 if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
100 if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
101 if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
102 if (t[2]) _.ops.pop();
103 _.trys.pop(); continue;
104 }
105 op = body.call(thisArg, _);
106 } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
107 if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
108 }
109 }
110
111 function __exportStar(m, exports) {
112 for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
113 }
114
115 function __values(o) {
116 var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0;
117 if (m) return m.call(o);
118 return {
119 next: function () {
120 if (o && i >= o.length) o = void 0;
121 return { value: o && o[i++], done: !o };
122 }
123 };
124 }
125
126 function __read(o, n) {
127 var m = typeof Symbol === "function" && o[Symbol.iterator];
128 if (!m) return o;
129 var i = m.call(o), r, ar = [], e;
130 try {
131 while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
132 }
133 catch (error) { e = { error: error }; }
134 finally {
135 try {
136 if (r && !r.done && (m = i["return"])) m.call(i);
137 }
138 finally { if (e) throw e.error; }
139 }
140 return ar;
141 }
142
143 function __spread() {
144 for (var ar = [], i = 0; i < arguments.length; i++)
145 ar = ar.concat(__read(arguments[i]));
146 return ar;
147 }
148
149 function __spreadArrays() {
150 for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
151 for (var r = Array(s), k = 0, i = 0; i < il; i++)
152 for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
153 r[k] = a[j];
154 return r;
155 };
156
157 function __await(v) {
158 return this instanceof __await ? (this.v = v, this) : new __await(v);
159 }
160
161 function __asyncGenerator(thisArg, _arguments, generator) {
162 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
163 var g = generator.apply(thisArg, _arguments || []), i, q = [];
164 return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
165 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); }); }; }
166 function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
167 function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
168 function fulfill(value) { resume("next", value); }
169 function reject(value) { resume("throw", value); }
170 function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
171 }
172
173 function __asyncDelegator(o) {
174 var i, p;
175 return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
176 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; }
177 }
178
179 function __asyncValues(o) {
180 if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
181 var m = o[Symbol.asyncIterator], i;
182 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);
183 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); }); }; }
184 function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
185 }
186
187 function __makeTemplateObject(cooked, raw) {
188 if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
189 return cooked;
190 };
191
192 function __importStar(mod) {
193 if (mod && mod.__esModule) return mod;
194 var result = {};
195 if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
196 result.default = mod;
197 return result;
198 }
199
200 function __importDefault(mod) {
201 return (mod && mod.__esModule) ? mod : { default: mod };
202 }
203
204 /**
205 * @fileoverview added by tsickle
206 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
207 */
208 var AddFormApiModel;
209 (function (AddFormApiModel) {
210 var Request = /** @class */ (function () {
211 function Request(initValue) {
212 var _this = this;
213 if (initValue === void 0) { initValue = (/** @type {?} */ ({})); }
214 Object.keys(initValue).forEach((/**
215 * @param {?} key
216 * @return {?}
217 */
218 function (key) { return (_this[key] = initValue[key]); }));
219 }
220 /**
221 * @return {?}
222 */
223 Request.prototype.getRequestBody = /**
224 * @return {?}
225 */
226 function () {
227 return {
228 name: this.name,
229 form: this.form,
230 events: this.events
231 };
232 };
233 Object.defineProperty(Request, "formGroup", {
234 get: /**
235 * @return {?}
236 */
237 function () {
238 return new forms.FormGroup({
239 _id: new forms.FormControl("", [forms.Validators.required]),
240 name: new forms.FormControl("", [forms.Validators.required]),
241 title: new forms.FormControl("", [forms.Validators.required]),
242 form: new forms.FormControl({}),
243 events: new forms.FormGroup({
244 accept: new forms.FormGroup({
245 show: new forms.FormControl(false),
246 text: new forms.FormControl("ثبت")
247 }),
248 cancel: new forms.FormGroup({
249 show: new forms.FormControl(false),
250 text: new forms.FormControl("انصراف")
251 })
252 })
253 });
254 },
255 enumerable: true,
256 configurable: true
257 });
258 return Request;
259 }());
260 AddFormApiModel.Request = Request;
261 if (false) {
262 /** @type {?} */
263 Request.prototype._id;
264 /** @type {?} */
265 Request.prototype.name;
266 /** @type {?} */
267 Request.prototype.form;
268 /** @type {?} */
269 Request.prototype.events;
270 }
271 var Response = /** @class */ (function () {
272 function Response() {
273 }
274 return Response;
275 }());
276 AddFormApiModel.Response = Response;
277 if (false) {
278 /** @type {?} */
279 Response.prototype.Result;
280 }
281 })(AddFormApiModel || (AddFormApiModel = {}));
282
283 /**
284 * @fileoverview added by tsickle
285 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
286 */
287 var EditFormApiModel;
288 (function (EditFormApiModel) {
289 var Request = /** @class */ (function () {
290 function Request(initValue) {
291 var _this = this;
292 if (initValue === void 0) { initValue = (/** @type {?} */ ({})); }
293 Object.keys(initValue).forEach((/**
294 * @param {?} key
295 * @return {?}
296 */
297 function (key) { return (_this[key] = initValue[key]); }));
298 }
299 /**
300 * @return {?}
301 */
302 Request.prototype.getRequestBody = /**
303 * @return {?}
304 */
305 function () {
306 return {
307 _id: this._id,
308 name: this.name,
309 form: this.form,
310 events: this.events
311 };
312 };
313 Object.defineProperty(Request, "formGroup", {
314 get: /**
315 * @return {?}
316 */
317 function () {
318 return new forms.FormGroup({
319 _id: new forms.FormControl("", [forms.Validators.required]),
320 name: new forms.FormControl("", [forms.Validators.required]),
321 form: new forms.FormControl({}),
322 events: new forms.FormGroup({
323 accept: new forms.FormGroup({
324 show: new forms.FormControl(false),
325 text: new forms.FormControl("ثبت")
326 }),
327 cancel: new forms.FormGroup({
328 show: new forms.FormControl(false),
329 text: new forms.FormControl("انصراف")
330 })
331 })
332 });
333 },
334 enumerable: true,
335 configurable: true
336 });
337 return Request;
338 }());
339 EditFormApiModel.Request = Request;
340 if (false) {
341 /** @type {?} */
342 Request.prototype._id;
343 /** @type {?} */
344 Request.prototype.name;
345 /** @type {?} */
346 Request.prototype.form;
347 /** @type {?} */
348 Request.prototype.events;
349 }
350 var Response = /** @class */ (function () {
351 function Response() {
352 }
353 return Response;
354 }());
355 EditFormApiModel.Response = Response;
356 if (false) {
357 /** @type {?} */
358 Response.prototype.Result;
359 }
360 })(EditFormApiModel || (EditFormApiModel = {}));
361
362 /**
363 * @fileoverview added by tsickle
364 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
365 */
366 var FormListApiModel;
367 (function (FormListApiModel) {
368 var Request = /** @class */ (function () {
369 function Request(initValue) {
370 var _this = this;
371 if (initValue === void 0) { initValue = (/** @type {?} */ ({})); }
372 Object.keys(initValue).forEach((/**
373 * @param {?} key
374 * @return {?}
375 */
376 function (key) { return (_this[key] = initValue[key]); }));
377 }
378 /**
379 * @return {?}
380 */
381 Request.prototype.getRequestBody = /**
382 * @return {?}
383 */
384 function () {
385 return {
386 Name: this.Name,
387 Controls: this.Controls
388 };
389 };
390 Object.defineProperty(Request, "formGroup", {
391 get: /**
392 * @return {?}
393 */
394 function () {
395 return new forms.FormGroup({
396 Name: new forms.FormControl("", [forms.Validators.required]),
397 Controls: new forms.FormGroup({})
398 });
399 },
400 enumerable: true,
401 configurable: true
402 });
403 return Request;
404 }());
405 FormListApiModel.Request = Request;
406 if (false) {
407 /** @type {?} */
408 Request.prototype.Name;
409 /** @type {?} */
410 Request.prototype.Controls;
411 }
412 var Response = /** @class */ (function () {
413 function Response() {
414 }
415 return Response;
416 }());
417 FormListApiModel.Response = Response;
418 if (false) {
419 /** @type {?} */
420 Response.prototype.Result;
421 }
422 })(FormListApiModel || (FormListApiModel = {}));
423
424 /**
425 * @fileoverview added by tsickle
426 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
427 */
428 /**
429 * @record
430 */
431 function validation() { }
432 if (false) {
433 /** @type {?} */
434 validation.prototype.active;
435 /** @type {?} */
436 validation.prototype.message;
437 /** @type {?|undefined} */
438 validation.prototype.value;
439 }
440 var Validator = /** @class */ (function () {
441 function Validator() {
442 this.required = {
443 active: false,
444 message: "این فیلد الزامی است"
445 };
446 this.minlength = {
447 active: false,
448 message: "حداقل تعداد کارکترها",
449 value: 5
450 };
451 this.email = {
452 active: false,
453 message: "لطفا ایمیل صحیح وارد نمایید"
454 };
455 }
456 return Validator;
457 }());
458 if (false) {
459 /** @type {?} */
460 Validator.prototype.required;
461 /** @type {?} */
462 Validator.prototype.minlength;
463 /** @type {?} */
464 Validator.prototype.email;
465 }
466
467 /**
468 * @fileoverview added by tsickle
469 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
470 */
471 var FieldConfig = /** @class */ (function () {
472 function FieldConfig(type) {
473 this.type = type;
474 if (type != "control")
475 this.fields = [];
476 this.width = 3;
477 this.validator = new Validator();
478 }
479 return FieldConfig;
480 }());
481 if (false) {
482 /** @type {?} */
483 FieldConfig.prototype.id;
484 /** @type {?} */
485 FieldConfig.prototype.type;
486 /** @type {?} */
487 FieldConfig.prototype.name;
488 /** @type {?} */
489 FieldConfig.prototype.subtype;
490 /** @type {?} */
491 FieldConfig.prototype.disabled;
492 /** @type {?} */
493 FieldConfig.prototype.title;
494 /** @type {?} */
495 FieldConfig.prototype.parentType;
496 /** @type {?} */
497 FieldConfig.prototype.formGroupPath;
498 /** @type {?} */
499 FieldConfig.prototype.path;
500 /** @type {?} */
501 FieldConfig.prototype.inputType;
502 /** @type {?} */
503 FieldConfig.prototype.value;
504 /** @type {?} */
505 FieldConfig.prototype.order;
506 /** @type {?} */
507 FieldConfig.prototype.width;
508 /** @type {?} */
509 FieldConfig.prototype.options;
510 /** @type {?} */
511 FieldConfig.prototype.dataEndpoint;
512 /** @type {?} */
513 FieldConfig.prototype.optionsEndpoint;
514 /** @type {?} */
515 FieldConfig.prototype.fields;
516 /** @type {?} */
517 FieldConfig.prototype.validator;
518 }
519
520 /**
521 * @fileoverview added by tsickle
522 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
523 */
524 var FormSchemaModel = /** @class */ (function () {
525 function FormSchemaModel() {
526 this.events = {
527 accept: {
528 show: false,
529 text: "ثبت"
530 },
531 cancel: {
532 show: false,
533 text: "انصراف"
534 }
535 };
536 this.form = new FieldConfig("group");
537 }
538 /**
539 * @return {?}
540 */
541 FormSchemaModel.prototype.init = /**
542 * @return {?}
543 */
544 function () {
545 this._id = (Math.random() * 10).toString();
546 };
547 return FormSchemaModel;
548 }());
549 if (false) {
550 /** @type {?} */
551 FormSchemaModel.prototype._id;
552 /** @type {?} */
553 FormSchemaModel.prototype.name;
554 /** @type {?} */
555 FormSchemaModel.prototype.description;
556 /** @type {?} */
557 FormSchemaModel.prototype.form;
558 /** @type {?} */
559 FormSchemaModel.prototype.events;
560 }
561
562 /**
563 * @fileoverview added by tsickle
564 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
565 */
566 /**
567 * @record
568 */
569 function Field() { }
570 if (false) {
571 /** @type {?} */
572 Field.prototype.config;
573 /** @type {?} */
574 Field.prototype.group;
575 }
576
577 /**
578 * @fileoverview added by tsickle
579 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
580 */
581
582 /**
583 * @fileoverview added by tsickle
584 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
585 */
586 /**
587 * @record
588 */
589 function FormModuleConfig() { }
590 if (false) {
591 /** @type {?|undefined} */
592 FormModuleConfig.prototype.env;
593 /** @type {?|undefined} */
594 FormModuleConfig.prototype.endpoints;
595 }
596 /** @type {?} */
597 var MODULE_DEFAULT_CONFIG = {
598 env: {
599 production: false,
600 frontend_server: "frontend/server/did/not/set",
601 server: "server/did/not/set"
602 },
603 endpoints: {
604 addForm: "",
605 editForm: "",
606 getForm: "",
607 getList: "",
608 deleteForm: "",
609 captchaUrl: ""
610 },
611 };
612 /** @type {?} */
613 var MODULE_CONFIG_TOKEN = new core.InjectionToken("FormModuleConfig");
614
615 /**
616 * @fileoverview added by tsickle
617 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
618 */
619 var FormConfigurationService = /** @class */ (function () {
620 function FormConfigurationService(configFile, store) {
621 var _this = this;
622 this.store = store;
623 this.config$ = new rxjs.BehaviorSubject(MODULE_DEFAULT_CONFIG);
624 this._config = Object.assign({}, MODULE_DEFAULT_CONFIG, configFile);
625 this.config$.next(this._config);
626 this.store.select(config.getFormModuleConfig).subscribe((/**
627 * @param {?} userConfig
628 * @return {?}
629 */
630 function (userConfig) {
631 if (!userConfig)
632 return;
633 _this._config = Object.assign({}, _this._config, userConfig.Config);
634 _this.config$.next(_this._config);
635 }));
636 }
637 Object.defineProperty(FormConfigurationService.prototype, "config", {
638 get: /**
639 * @return {?}
640 */
641 function () {
642 return this._config;
643 },
644 enumerable: true,
645 configurable: true
646 });
647 FormConfigurationService.decorators = [
648 { type: core.Injectable, args: [{
649 providedIn: "root"
650 },] }
651 ];
652 /** @nocollapse */
653 FormConfigurationService.ctorParameters = function () { return [
654 { type: undefined, decorators: [{ type: core.Inject, args: [MODULE_CONFIG_TOKEN,] }] },
655 { type: store.Store }
656 ]; };
657 /** @nocollapse */ FormConfigurationService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function FormConfigurationService_Factory() { return new FormConfigurationService(core.ɵɵinject(MODULE_CONFIG_TOKEN), core.ɵɵinject(store.Store)); }, token: FormConfigurationService, providedIn: "root" });
658 return FormConfigurationService;
659 }());
660 if (false) {
661 /**
662 * @type {?}
663 * @private
664 */
665 FormConfigurationService.prototype._config;
666 /** @type {?} */
667 FormConfigurationService.prototype.config$;
668 /**
669 * @type {?}
670 * @private
671 */
672 FormConfigurationService.prototype.store;
673 }
674
675 /**
676 * @fileoverview added by tsickle
677 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
678 */
679 var FormService = /** @class */ (function () {
680 function FormService(http, store, configurationService) {
681 this.http = http;
682 this.store = store;
683 this.configurationService = configurationService;
684 }
685 /**
686 * @param {?} data
687 * @return {?}
688 */
689 FormService.prototype.add = /**
690 * @param {?} data
691 * @return {?}
692 */
693 function (data) {
694 var _this = this;
695 /** @type {?} */
696 var model = new AddFormApiModel.Request(data);
697 return this.configurationService.config$
698 .filter((/**
699 * @param {?} config
700 * @return {?}
701 */
702 function (config) { return config.endpoints.addForm != ""; }))
703 .take(1)
704 .switchMap((/**
705 * @param {?} config
706 * @return {?}
707 */
708 function (config) {
709 return _this.http.post(config.env.frontend_server + config.endpoints.addForm, model.getRequestBody());
710 }))
711 .map((/**
712 * @param {?} response
713 * @return {?}
714 */
715 function (response) { return response.Result; }));
716 };
717 /**
718 * @param {?} _id
719 * @return {?}
720 */
721 FormService.prototype.get = /**
722 * @param {?} _id
723 * @return {?}
724 */
725 function (_id) {
726 var _this = this;
727 return this.configurationService.config$
728 .filter((/**
729 * @param {?} config
730 * @return {?}
731 */
732 function (config) { return config.endpoints.getForm != ""; }))
733 .take(1)
734 .switchMap((/**
735 * @param {?} config
736 * @return {?}
737 */
738 function (config) {
739 return _this.http.get(shared.stringTemplate(config.env.frontend_server + config.endpoints.getForm, { _id: _id }));
740 }))
741 .map((/**
742 * @param {?} response
743 * @return {?}
744 */
745 function (response) { return response.Result; }));
746 };
747 /**
748 * @return {?}
749 */
750 FormService.prototype.getList = /**
751 * @return {?}
752 */
753 function () {
754 var _this = this;
755 return this.configurationService.config$
756 .filter((/**
757 * @param {?} config
758 * @return {?}
759 */
760 function (config) { return config.endpoints.getList != ""; }))
761 .switchMap((/**
762 * @param {?} config
763 * @return {?}
764 */
765 function (config) { return _this.http.get(config.env.frontend_server + config.endpoints.getList); }))
766 .map((/**
767 * @param {?} response
768 * @return {?}
769 */
770 function (response) { return response.Result; }));
771 };
772 /**
773 * @param {?} data
774 * @return {?}
775 */
776 FormService.prototype.update = /**
777 * @param {?} data
778 * @return {?}
779 */
780 function (data) {
781 var _this = this;
782 /** @type {?} */
783 var model = new EditFormApiModel.Request(data);
784 return this.configurationService.config$
785 .filter((/**
786 * @param {?} config
787 * @return {?}
788 */
789 function (config) { return config.endpoints.editForm != ""; }))
790 .take(1)
791 .switchMap((/**
792 * @param {?} config
793 * @return {?}
794 */
795 function (config) {
796 return _this.http.put(config.env.frontend_server + config.endpoints.editForm, model.getRequestBody());
797 }))
798 .map((/**
799 * @param {?} response
800 * @return {?}
801 */
802 function (response) { return response.Result; }));
803 };
804 /**
805 * @param {?} _id
806 * @return {?}
807 */
808 FormService.prototype.delete = /**
809 * @param {?} _id
810 * @return {?}
811 */
812 function (_id) {
813 var _this = this;
814 return this.configurationService.config$
815 .filter((/**
816 * @param {?} config
817 * @return {?}
818 */
819 function (config) { return config.endpoints.deleteForm != ""; }))
820 .switchMap((/**
821 * @param {?} config
822 * @return {?}
823 */
824 function (config) { return _this.http.get(config.env.frontend_server + config.endpoints.deleteForm); }));
825 };
826 /**
827 * @param {?} _id
828 * @return {?}
829 */
830 FormService.prototype.selectFormById = /**
831 * @param {?} _id
832 * @return {?}
833 */
834 function (_id) {
835 /** @type {?} */
836 var subject = new BehaviorSubject.BehaviorSubject(undefined);
837 this.store
838 .select((/**
839 * @param {?} state
840 * @return {?}
841 */
842 function (state) { return state.form.list.data; }))
843 .pipe(operators.filter((/**
844 * @param {?} forms
845 * @return {?}
846 */
847 function (forms) { return forms != null; })), operators.map((/**
848 * @param {?} forms
849 * @return {?}
850 */
851 function (forms) { return forms.find((/**
852 * @param {?} form
853 * @return {?}
854 */
855 function (form) { return form._id == _id; })); })))
856 .subscribe((/**
857 * @param {?} formSchemaModel
858 * @return {?}
859 */
860 function (formSchemaModel) { return subject.next(formSchemaModel); }));
861 return subject.asObservable();
862 };
863 FormService.decorators = [
864 { type: core.Injectable, args: [{
865 providedIn: "root"
866 },] }
867 ];
868 /** @nocollapse */
869 FormService.ctorParameters = function () { return [
870 { type: http.HttpClient },
871 { type: store.Store },
872 { type: FormConfigurationService }
873 ]; };
874 /** @nocollapse */ FormService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function FormService_Factory() { return new FormService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(store.Store), core.ɵɵinject(FormConfigurationService)); }, token: FormService, providedIn: "root" });
875 return FormService;
876 }());
877 if (false) {
878 /**
879 * @type {?}
880 * @private
881 */
882 FormService.prototype.http;
883 /**
884 * @type {?}
885 * @private
886 */
887 FormService.prototype.store;
888 /**
889 * @type {?}
890 * @private
891 */
892 FormService.prototype.configurationService;
893 }
894
895 /**
896 * @fileoverview added by tsickle
897 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
898 */
899 var SelectComponent = /** @class */ (function () {
900 function SelectComponent() {
901 }
902 SelectComponent.decorators = [
903 { type: core.Component, args: [{
904 selector: "ngs-form-control-select",
905 template: "<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>",
906 styles: [":host{display:block}.mat-form-field{width:100%}"]
907 }] }
908 ];
909 /** @nocollapse */
910 SelectComponent.ctorParameters = function () { return []; };
911 return SelectComponent;
912 }());
913 if (false) {
914 /** @type {?} */
915 SelectComponent.prototype.config;
916 /** @type {?} */
917 SelectComponent.prototype.group;
918 }
919
920 /**
921 * @fileoverview added by tsickle
922 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
923 */
924
925 /**
926 * @fileoverview added by tsickle
927 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
928 */
929 var CheckboxComponent = /** @class */ (function () {
930 function CheckboxComponent() {
931 }
932 CheckboxComponent.decorators = [
933 { type: core.Component, args: [{
934 selector: "ngs-form-control-checkbox",
935 template: "<div [formGroup]=\"group\">\r\n <mat-checkbox [formControlName]=\"config.name\">\r\n {{config.title}}\r\n </mat-checkbox>\r\n</div>",
936 styles: [":host{display:block}.mat-form-field{width:100%}"]
937 }] }
938 ];
939 /** @nocollapse */
940 CheckboxComponent.ctorParameters = function () { return []; };
941 return CheckboxComponent;
942 }());
943 if (false) {
944 /** @type {?} */
945 CheckboxComponent.prototype.config;
946 /** @type {?} */
947 CheckboxComponent.prototype.group;
948 }
949
950 /**
951 * @fileoverview added by tsickle
952 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
953 */
954
955 /**
956 * @fileoverview added by tsickle
957 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
958 */
959 var EmailComponent = /** @class */ (function () {
960 function EmailComponent() {
961 }
962 /**
963 * @return {?}
964 */
965 EmailComponent.prototype.ngOnInit = /**
966 * @return {?}
967 */
968 function () { };
969 EmailComponent.decorators = [
970 { type: core.Component, args: [{
971 selector: "ngs-form-control-email",
972 template: "<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>",
973 styles: [":host{display:block}.mat-form-field{width:100%}"]
974 }] }
975 ];
976 /** @nocollapse */
977 EmailComponent.ctorParameters = function () { return []; };
978 return EmailComponent;
979 }());
980 if (false) {
981 /** @type {?} */
982 EmailComponent.prototype.config;
983 /** @type {?} */
984 EmailComponent.prototype.group;
985 }
986
987 /**
988 * @fileoverview added by tsickle
989 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
990 */
991
992 /**
993 * @fileoverview added by tsickle
994 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
995 */
996 var ColorComponent = /** @class */ (function () {
997 function ColorComponent() {
998 }
999 /**
1000 * @return {?}
1001 */
1002 ColorComponent.prototype.ngOnInit = /**
1003 * @return {?}
1004 */
1005 function () { };
1006 ColorComponent.decorators = [
1007 { type: core.Component, args: [{
1008 selector: "ngs-form-control-color",
1009 template: "<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>",
1010 styles: [":host{display:block}.mat-form-field{width:100%}"]
1011 }] }
1012 ];
1013 /** @nocollapse */
1014 ColorComponent.ctorParameters = function () { return []; };
1015 ColorComponent.propDecorators = {
1016 form: [{ type: core.Input }],
1017 schema: [{ type: core.Input }]
1018 };
1019 return ColorComponent;
1020 }());
1021 if (false) {
1022 /** @type {?} */
1023 ColorComponent.prototype.config;
1024 /** @type {?} */
1025 ColorComponent.prototype.group;
1026 /** @type {?} */
1027 ColorComponent.prototype.form;
1028 /** @type {?} */
1029 ColorComponent.prototype.schema;
1030 }
1031
1032 /**
1033 * @fileoverview added by tsickle
1034 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1035 */
1036
1037 /**
1038 * @fileoverview added by tsickle
1039 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1040 */
1041 var TableComponent = /** @class */ (function () {
1042 function TableComponent(http) {
1043 this.http = http;
1044 this.selection = new collections.SelectionModel(true, []);
1045 this.ready = false;
1046 }
1047 /**
1048 * @return {?}
1049 */
1050 TableComponent.prototype.ngOnInit = /**
1051 * @return {?}
1052 */
1053 function () {
1054 var _this = this;
1055 this.http.get(this.schema.dataEndpoint).subscribe((/**
1056 * @param {?} data
1057 * @return {?}
1058 */
1059 function (data) {
1060 _this.ready = true;
1061 _this.displayedColumns = data.displayedColumns;
1062 _this.filedDisplayedColumns = data.filedDisplayedColumns;
1063 _this.dataSource = new material.MatTableDataSource(data.dataSource);
1064 }));
1065 };
1066 /** Whether the number of selected elements matches the total number of rows. */
1067 /**
1068 * Whether the number of selected elements matches the total number of rows.
1069 * @return {?}
1070 */
1071 TableComponent.prototype.isAllSelected = /**
1072 * Whether the number of selected elements matches the total number of rows.
1073 * @return {?}
1074 */
1075 function () {
1076 var _a;
1077 /** @type {?} */
1078 var numSelected = this.selection.selected.length;
1079 this.form.patchValue((_a = {},
1080 _a[this.schema.name] = this.selection.selected,
1081 _a));
1082 /** @type {?} */
1083 var numRows = this.dataSource.data.length;
1084 return numSelected === numRows;
1085 };
1086 /** Selects all rows if they are not all selected; otherwise clear selection. */
1087 /**
1088 * Selects all rows if they are not all selected; otherwise clear selection.
1089 * @return {?}
1090 */
1091 TableComponent.prototype.masterToggle = /**
1092 * Selects all rows if they are not all selected; otherwise clear selection.
1093 * @return {?}
1094 */
1095 function () {
1096 var _this = this;
1097 this.isAllSelected() ? this.selection.clear() : this.dataSource.data.forEach((/**
1098 * @param {?} row
1099 * @return {?}
1100 */
1101 function (row) { return _this.selection.select(row); }));
1102 };
1103 TableComponent.decorators = [
1104 { type: core.Component, args: [{
1105 selector: "ngs-form-control-table",
1106 template: "<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=\"\u0627\u0646\u062A\u062E\u0627\u0628\">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> -->",
1107 styles: [":host{display:block}.mat-form-field{width:100%}"]
1108 }] }
1109 ];
1110 /** @nocollapse */
1111 TableComponent.ctorParameters = function () { return [
1112 { type: http.HttpClient }
1113 ]; };
1114 TableComponent.propDecorators = {
1115 form: [{ type: core.Input }],
1116 schema: [{ type: core.Input }]
1117 };
1118 return TableComponent;
1119 }());
1120 if (false) {
1121 /** @type {?} */
1122 TableComponent.prototype.config;
1123 /** @type {?} */
1124 TableComponent.prototype.group;
1125 /** @type {?} */
1126 TableComponent.prototype.form;
1127 /** @type {?} */
1128 TableComponent.prototype.schema;
1129 /** @type {?} */
1130 TableComponent.prototype.ready;
1131 /** @type {?} */
1132 TableComponent.prototype.displayedColumns;
1133 /** @type {?} */
1134 TableComponent.prototype.filedDisplayedColumns;
1135 /** @type {?} */
1136 TableComponent.prototype.dataSource;
1137 /** @type {?} */
1138 TableComponent.prototype.selection;
1139 /**
1140 * @type {?}
1141 * @private
1142 */
1143 TableComponent.prototype.http;
1144 }
1145
1146 /**
1147 * @fileoverview added by tsickle
1148 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1149 */
1150
1151 /**
1152 * @fileoverview added by tsickle
1153 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1154 */
1155 var NumberComponent = /** @class */ (function () {
1156 function NumberComponent() {
1157 }
1158 /**
1159 * @return {?}
1160 */
1161 NumberComponent.prototype.ngOnInit = /**
1162 * @return {?}
1163 */
1164 function () { };
1165 NumberComponent.decorators = [
1166 { type: core.Component, args: [{
1167 selector: "ngs-form-control-number",
1168 template: "<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>",
1169 styles: [":host{display:block}.mat-form-field{width:100%}"]
1170 }] }
1171 ];
1172 /** @nocollapse */
1173 NumberComponent.ctorParameters = function () { return []; };
1174 NumberComponent.propDecorators = {
1175 form: [{ type: core.Input }],
1176 schema: [{ type: core.Input }]
1177 };
1178 return NumberComponent;
1179 }());
1180 if (false) {
1181 /** @type {?} */
1182 NumberComponent.prototype.form;
1183 /** @type {?} */
1184 NumberComponent.prototype.schema;
1185 }
1186
1187 /**
1188 * @fileoverview added by tsickle
1189 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1190 */
1191
1192 /**
1193 * @fileoverview added by tsickle
1194 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1195 */
1196 var TextComponent = /** @class */ (function () {
1197 function TextComponent() {
1198 }
1199 TextComponent.decorators = [
1200 { type: core.Component, args: [{
1201 selector: "ngs-form-control-text",
1202 template: "<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>",
1203 styles: [":host{display:block}.mat-form-field{width:100%}"]
1204 }] }
1205 ];
1206 /** @nocollapse */
1207 TextComponent.ctorParameters = function () { return []; };
1208 return TextComponent;
1209 }());
1210 if (false) {
1211 /** @type {?} */
1212 TextComponent.prototype.config;
1213 /** @type {?} */
1214 TextComponent.prototype.group;
1215 }
1216
1217 /**
1218 * @fileoverview added by tsickle
1219 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1220 */
1221
1222 /**
1223 * @fileoverview added by tsickle
1224 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1225 */
1226
1227 /**
1228 * @fileoverview added by tsickle
1229 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1230 */
1231 /** @enum {string} */
1232 var FormsListActionTypes = {
1233 FORMS_LIST: "[FORM][LIST] FORMS_LIST",
1234 FORMS_LIST_START: "[FORM][LIST] FORMS_LIST_START",
1235 FORMS_LIST_SUCCEED: "[FORM][LIST] FORMS_LIST_SUCCEED",
1236 FORMS_LIST_FAILED: "[FORM][LIST] FORMS_LIST_FAILED",
1237 ADD_FORM_SCHEMA: "[FORM][LIST] ADD_FORM_SCHEMA",
1238 FORM_SCHEMA_UPDATE: "[FORM][LIST] FORM_SCHEMA_UPDATE",
1239 GET_FORM_SCHEMA: "[FORM][LIST] GET_FORM_SCHEMA",
1240 FORM_SCHEMA_FETCHED: "[FORM][LIST] FORM_SCHEMA_FETCHED",
1241 };
1242 var FormsListAction = /** @class */ (function () {
1243 function FormsListAction() {
1244 this.type = FormsListActionTypes.FORMS_LIST;
1245 }
1246 return FormsListAction;
1247 }());
1248 if (false) {
1249 /** @type {?} */
1250 FormsListAction.prototype.type;
1251 }
1252 var FormsListStartAction = /** @class */ (function () {
1253 function FormsListStartAction() {
1254 this.type = FormsListActionTypes.FORMS_LIST_START;
1255 }
1256 return FormsListStartAction;
1257 }());
1258 if (false) {
1259 /** @type {?} */
1260 FormsListStartAction.prototype.type;
1261 }
1262 var FormsListSucceedAction = /** @class */ (function () {
1263 function FormsListSucceedAction(payload) {
1264 this.payload = payload;
1265 this.type = FormsListActionTypes.FORMS_LIST_SUCCEED;
1266 }
1267 return FormsListSucceedAction;
1268 }());
1269 if (false) {
1270 /** @type {?} */
1271 FormsListSucceedAction.prototype.type;
1272 /** @type {?} */
1273 FormsListSucceedAction.prototype.payload;
1274 }
1275 var FormsListFailedAction = /** @class */ (function () {
1276 function FormsListFailedAction() {
1277 this.type = FormsListActionTypes.FORMS_LIST_FAILED;
1278 }
1279 return FormsListFailedAction;
1280 }());
1281 if (false) {
1282 /** @type {?} */
1283 FormsListFailedAction.prototype.type;
1284 }
1285 var UpdateFormSchemaAction = /** @class */ (function () {
1286 function UpdateFormSchemaAction(payload) {
1287 this.payload = payload;
1288 this.type = FormsListActionTypes.FORM_SCHEMA_UPDATE;
1289 }
1290 return UpdateFormSchemaAction;
1291 }());
1292 if (false) {
1293 /** @type {?} */
1294 UpdateFormSchemaAction.prototype.type;
1295 /** @type {?} */
1296 UpdateFormSchemaAction.prototype.payload;
1297 }
1298 var AddFormSchemaAction = /** @class */ (function () {
1299 function AddFormSchemaAction(payload) {
1300 this.payload = payload;
1301 this.type = FormsListActionTypes.ADD_FORM_SCHEMA;
1302 }
1303 return AddFormSchemaAction;
1304 }());
1305 if (false) {
1306 /** @type {?} */
1307 AddFormSchemaAction.prototype.type;
1308 /** @type {?} */
1309 AddFormSchemaAction.prototype.payload;
1310 }
1311 var GetFormSchemaAction = /** @class */ (function () {
1312 function GetFormSchemaAction(payload) {
1313 this.payload = payload;
1314 this.type = FormsListActionTypes.GET_FORM_SCHEMA;
1315 }
1316 return GetFormSchemaAction;
1317 }());
1318 if (false) {
1319 /** @type {?} */
1320 GetFormSchemaAction.prototype.type;
1321 /** @type {?} */
1322 GetFormSchemaAction.prototype.payload;
1323 }
1324 var FormSchemaFechedAction = /** @class */ (function () {
1325 function FormSchemaFechedAction(payload) {
1326 this.payload = payload;
1327 this.type = FormsListActionTypes.FORM_SCHEMA_FETCHED;
1328 }
1329 return FormSchemaFechedAction;
1330 }());
1331 if (false) {
1332 /** @type {?} */
1333 FormSchemaFechedAction.prototype.type;
1334 /** @type {?} */
1335 FormSchemaFechedAction.prototype.payload;
1336 }
1337
1338 /**
1339 * @fileoverview added by tsickle
1340 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1341 */
1342 var DateFormInputControlComponent = /** @class */ (function () {
1343 function DateFormInputControlComponent() {
1344 }
1345 DateFormInputControlComponent.decorators = [
1346 { type: core.Component, args: [{
1347 selector: "ngs-form-control-date",
1348 template: "<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> -->",
1349 styles: [":host{display:block}.mat-form-field{width:100%}"]
1350 }] }
1351 ];
1352 /** @nocollapse */
1353 DateFormInputControlComponent.ctorParameters = function () { return []; };
1354 return DateFormInputControlComponent;
1355 }());
1356 if (false) {
1357 /** @type {?} */
1358 DateFormInputControlComponent.prototype.config;
1359 /** @type {?} */
1360 DateFormInputControlComponent.prototype.group;
1361 }
1362
1363 /**
1364 * @fileoverview added by tsickle
1365 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1366 */
1367 var FileFormInputControlComponent = /** @class */ (function () {
1368 function FileFormInputControlComponent() {
1369 }
1370 FileFormInputControlComponent.decorators = [
1371 { type: core.Component, args: [{
1372 selector: "ngs-form-control-file",
1373 template: "<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> -->",
1374 styles: [":host{display:block}.mat-form-field{width:100%}"]
1375 }] }
1376 ];
1377 /** @nocollapse */
1378 FileFormInputControlComponent.ctorParameters = function () { return []; };
1379 return FileFormInputControlComponent;
1380 }());
1381 if (false) {
1382 /** @type {?} */
1383 FileFormInputControlComponent.prototype.config;
1384 /** @type {?} */
1385 FileFormInputControlComponent.prototype.group;
1386 }
1387
1388 /**
1389 * @fileoverview added by tsickle
1390 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1391 */
1392 var FormCaptchaService = /** @class */ (function () {
1393 function FormCaptchaService(http, store, configurationService) {
1394 this.http = http;
1395 this.store = store;
1396 this.configurationService = configurationService;
1397 }
1398 /**
1399 * @return {?}
1400 */
1401 FormCaptchaService.prototype.getCaptcha = /**
1402 * @return {?}
1403 */
1404 function () {
1405 var _this = this;
1406 return this.configurationService.config$.pipe(operators.filter((/**
1407 * @param {?} captcha
1408 * @return {?}
1409 */
1410 function (captcha) { return captcha.endpoints.captchaUrl != ""; })), operators.take(1), operators.switchMap((/**
1411 * @param {?} captcha
1412 * @return {?}
1413 */
1414 function (captcha) {
1415 return _this.http.get(captcha.env.server + captcha.endpoints.captchaUrl);
1416 })), operators.map((/**
1417 * @param {?} response
1418 * @return {?}
1419 */
1420 function (response) { return response.Result; })));
1421 };
1422 /**
1423 * @return {?}
1424 */
1425 FormCaptchaService.prototype.sendCaptcha = /**
1426 * @return {?}
1427 */
1428 function () {
1429 var _this = this;
1430 return this.configurationService.config$.pipe(operators.filter((/**
1431 * @param {?} config
1432 * @return {?}
1433 */
1434 function (config) { return config.endpoints.getList != ""; })), operators.switchMap((/**
1435 * @param {?} config
1436 * @return {?}
1437 */
1438 function (config) { return _this.http.get(config.env.server + config.endpoints.getList); })), operators.map((/**
1439 * @param {?} response
1440 * @return {?}
1441 */
1442 function (response) { return response.Result; })));
1443 };
1444 FormCaptchaService.decorators = [
1445 { type: core.Injectable, args: [{
1446 providedIn: "root"
1447 },] }
1448 ];
1449 /** @nocollapse */
1450 FormCaptchaService.ctorParameters = function () { return [
1451 { type: http.HttpClient },
1452 { type: store.Store },
1453 { type: FormConfigurationService }
1454 ]; };
1455 /** @nocollapse */ FormCaptchaService.ngInjectableDef = core.ɵɵdefineInjectable({ factory: function FormCaptchaService_Factory() { return new FormCaptchaService(core.ɵɵinject(http.HttpClient), core.ɵɵinject(store.Store), core.ɵɵinject(FormConfigurationService)); }, token: FormCaptchaService, providedIn: "root" });
1456 return FormCaptchaService;
1457 }());
1458 if (false) {
1459 /**
1460 * @type {?}
1461 * @private
1462 */
1463 FormCaptchaService.prototype.http;
1464 /**
1465 * @type {?}
1466 * @private
1467 */
1468 FormCaptchaService.prototype.store;
1469 /**
1470 * @type {?}
1471 * @private
1472 */
1473 FormCaptchaService.prototype.configurationService;
1474 }
1475
1476 /**
1477 * @fileoverview added by tsickle
1478 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1479 */
1480 var CaptchaModel = /** @class */ (function () {
1481 function CaptchaModel(_a) {
1482 var _b = _a === void 0 ? {} : _a, captchaImg = _b.captchaImg, captchaCode = _b.captchaCode;
1483 this.captchaImg = captchaImg + "?" + Math.random();
1484 this.captchaCode = captchaCode || "";
1485 }
1486 return CaptchaModel;
1487 }());
1488 if (false) {
1489 /** @type {?} */
1490 CaptchaModel.prototype.captchaImg;
1491 /** @type {?} */
1492 CaptchaModel.prototype.captchaCode;
1493 }
1494 var UpsertCaptchaApiModel;
1495 (function (UpsertCaptchaApiModel) {
1496 var Request = /** @class */ (function () {
1497 function Request(initValue) {
1498 var _this = this;
1499 if (initValue === void 0) { initValue = {}; }
1500 Object.keys(initValue).forEach((/**
1501 * @param {?} key
1502 * @return {?}
1503 */
1504 function (key) { return (_this[key] = initValue[key]); }));
1505 }
1506 /**
1507 * @return {?}
1508 */
1509 Request.prototype.getRequestBody = /**
1510 * @return {?}
1511 */
1512 function () {
1513 return this.Captcha.captchaCode;
1514 };
1515 return Request;
1516 }());
1517 UpsertCaptchaApiModel.Request = Request;
1518 if (false) {
1519 /** @type {?} */
1520 Request.prototype.Captcha;
1521 }
1522 var Response = /** @class */ (function () {
1523 function Response() {
1524 }
1525 return Response;
1526 }());
1527 UpsertCaptchaApiModel.Response = Response;
1528 if (false) {
1529 /** @type {?} */
1530 Response.prototype.Result;
1531 }
1532 })(UpsertCaptchaApiModel || (UpsertCaptchaApiModel = {}));
1533
1534 /**
1535 * @fileoverview added by tsickle
1536 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1537 */
1538 var FormCaptchaComponent = /** @class */ (function () {
1539 function FormCaptchaComponent(service, store, configurationService) {
1540 // this.captcha = new CaptchaModel({
1541 // captchaImg: "http://172.22.34.28:8001/api/authentication/captcha"
1542 // });
1543 this.service = service;
1544 this.store = store;
1545 this.configurationService = configurationService;
1546 this._captcha_generate();
1547 }
1548 /**
1549 * @return {?}
1550 */
1551 FormCaptchaComponent.prototype.ngOnInit = /**
1552 * @return {?}
1553 */
1554 function () {
1555 var _this = this;
1556 this.store.select((/**
1557 * @param {?} s
1558 * @return {?}
1559 */
1560 function (s) { return s.authentication.captcha.captcha; })).subscribe((/**
1561 * @param {?} e
1562 * @return {?}
1563 */
1564 function (e) { return _this.refresh(); }));
1565 };
1566 /**
1567 * @return {?}
1568 */
1569 FormCaptchaComponent.prototype.refresh = /**
1570 * @return {?}
1571 */
1572 function () {
1573 this.captcha.captchaImg = this._captcha_generate() + ("?" + Math.random());
1574 };
1575 /**
1576 * @return {?}
1577 */
1578 FormCaptchaComponent.prototype._captcha_generate = /**
1579 * @return {?}
1580 */
1581 function () {
1582 var _this = this;
1583 this.configurationService.config$.pipe(operators.map((/**
1584 * @param {?} config
1585 * @return {?}
1586 */
1587 function (config) { return config.env.server + config.endpoints.captchaUrl; }))).subscribe((/**
1588 * @param {?} captcha
1589 * @return {?}
1590 */
1591 function (captcha) {
1592 _this.captcha = new CaptchaModel({
1593 captchaImg: captcha
1594 });
1595 }));
1596 };
1597 FormCaptchaComponent.decorators = [
1598 { type: core.Component, args: [{
1599 selector: "lib-form-captcha",
1600 template: "<div fxLayout=\"row wrap\" fxLayoutAlign=\"start center\">\r\n <img [src]=\"captcha.captchaImg\" />\r\n\r\n <button type=\"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>",
1601 styles: ["img{border:1px solid #e4e4e4}"]
1602 }] }
1603 ];
1604 /** @nocollapse */
1605 FormCaptchaComponent.ctorParameters = function () { return [
1606 { type: FormCaptchaService },
1607 { type: store.Store },
1608 { type: FormConfigurationService }
1609 ]; };
1610 return FormCaptchaComponent;
1611 }());
1612 if (false) {
1613 /** @type {?} */
1614 FormCaptchaComponent.prototype.config;
1615 /** @type {?} */
1616 FormCaptchaComponent.prototype.group;
1617 /** @type {?} */
1618 FormCaptchaComponent.prototype.captcha;
1619 /** @type {?} */
1620 FormCaptchaComponent.prototype.captchaSrc;
1621 /**
1622 * @type {?}
1623 * @private
1624 */
1625 FormCaptchaComponent.prototype.service;
1626 /**
1627 * @type {?}
1628 * @private
1629 */
1630 FormCaptchaComponent.prototype.store;
1631 /**
1632 * @type {?}
1633 * @private
1634 */
1635 FormCaptchaComponent.prototype.configurationService;
1636 }
1637
1638 /**
1639 * @fileoverview added by tsickle
1640 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1641 */
1642
1643 /**
1644 * @fileoverview added by tsickle
1645 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1646 */
1647 var FormViewComponent = /** @class */ (function () {
1648 function FormViewComponent(service, compiler, resolver, store) {
1649 var _this = this;
1650 this.service = service;
1651 this.compiler = compiler;
1652 this.resolver = resolver;
1653 this.store = store;
1654 this.unsubscribe = new rxjs.Subject();
1655 this.accept = new core.EventEmitter();
1656 this.cancel = new core.EventEmitter();
1657 this.card = false;
1658 this.formGroupCreated = false;
1659 this.schema$ = new BehaviorSubject.BehaviorSubject(undefined);
1660 this.schema$.pipe(operators.takeUntil(this.unsubscribe)).subscribe((/**
1661 * @param {?} schema
1662 * @return {?}
1663 */
1664 function (schema) {
1665 if (!schema)
1666 return;
1667 _this.formGroup = (/** @type {?} */ (_this.createFrom(schema.form)));
1668 if (!schema.form.name)
1669 return;
1670 _this.formGroupCreated = true;
1671 }));
1672 }
1673 Object.defineProperty(FormViewComponent.prototype, "id", {
1674 set: /**
1675 * @param {?} id
1676 * @return {?}
1677 */
1678 function (id) {
1679 var _this = this;
1680 if (!this.local)
1681 this.store.dispatch(new GetFormSchemaAction(id));
1682 this.service
1683 .selectFormById(id)
1684 .pipe(operators.takeUntil(this.unsubscribe))
1685 .subscribe((/**
1686 * @param {?} schema
1687 * @return {?}
1688 */
1689 function (schema) { return _this.schema$.next(schema); }));
1690 },
1691 enumerable: true,
1692 configurable: true
1693 });
1694 Object.defineProperty(FormViewComponent.prototype, "schema", {
1695 set: /**
1696 * @param {?} schema
1697 * @return {?}
1698 */
1699 function (schema) {
1700 this.schema$.next(schema);
1701 },
1702 enumerable: true,
1703 configurable: true
1704 });
1705 /**
1706 * @return {?}
1707 */
1708 FormViewComponent.prototype.ngOnDestroy = /**
1709 * @return {?}
1710 */
1711 function () {
1712 this.unsubscribe.next();
1713 this.unsubscribe.complete();
1714 };
1715 /**
1716 * @param {?} schema
1717 * @return {?}
1718 */
1719 FormViewComponent.prototype.generate = /**
1720 * @param {?} schema
1721 * @return {?}
1722 */
1723 function (schema) {
1724 this.schema$.next(schema);
1725 };
1726 /**
1727 * @param {?} data
1728 * @param {?=} parentPath
1729 * @return {?}
1730 */
1731 FormViewComponent.prototype.createFrom = /**
1732 * @param {?} data
1733 * @param {?=} parentPath
1734 * @return {?}
1735 */
1736 function (data, parentPath) {
1737 var _this = this;
1738 if (parentPath === void 0) { parentPath = ""; }
1739 if (data.type == "control") {
1740 /** @type {?} */
1741 var formGroupPath = void 0;
1742 if (data.parentType == "array") {
1743 // parentPath = `${parentPath}.controls[${(data as FieldConfig).name}]`;
1744 }
1745 else if (data.parentType == "group") {
1746 formGroupPath = parentPath;
1747 parentPath = parentPath + ".controls." + ((/** @type {?} */ (data))).name;
1748 }
1749 /** @type {?} */
1750 var validators = [];
1751 if (data.validator.required && data.validator.required.active) {
1752 validators.push(forms.Validators.required);
1753 }
1754 if (data.validator.minlength && data.validator.minlength.active) {
1755 validators.push(forms.Validators.minLength(data.validator.minlength.value));
1756 }
1757 if (data.validator.email && data.validator.email.active) {
1758 validators.push(forms.Validators.email);
1759 }
1760 /** @type {?} */
1761 var ctr = new forms.FormControl(data.value, validators);
1762 ((/** @type {?} */ (ctr))).schema = data;
1763 ((/** @type {?} */ (ctr))).schema.path = parentPath;
1764 ((/** @type {?} */ (ctr))).schema.formGroupPath = formGroupPath;
1765 return ctr;
1766 }
1767 else if (data.type == "group") {
1768 /** @type {?} */
1769 var formGroup_1 = new forms.FormGroup({});
1770 if (data.parentType == undefined) {
1771 parentPath = ((/** @type {?} */ (data))).name;
1772 }
1773 else if (data.parentType == "array") {
1774 parentPath = parentPath + ".controls[" + ((/** @type {?} */ (data))).name + "]";
1775 }
1776 else if (data.parentType == "group") {
1777 parentPath = parentPath + ".controls." + ((/** @type {?} */ (data))).name;
1778 }
1779 ((/** @type {?} */ (formGroup_1))).schema = data;
1780 ((/** @type {?} */ (formGroup_1))).schema.path = parentPath;
1781 data.fields.forEach((/**
1782 * @param {?} item
1783 * @return {?}
1784 */
1785 function (item) {
1786 item.parentType = "group";
1787 formGroup_1.addControl(item.name, _this.createFrom(item, parentPath));
1788 }));
1789 return formGroup_1;
1790 }
1791 else {
1792 /** @type {?} */
1793 var formArray_1 = new forms.FormArray([]);
1794 parentPath =
1795 parentPath == "" ? ((/** @type {?} */ (data))).name : parentPath + ".controls." + ((/** @type {?} */ (data))).name;
1796 ((/** @type {?} */ (formArray_1))).schema = data;
1797 ((/** @type {?} */ (formArray_1))).schema.path = parentPath;
1798 data.fields.forEach((/**
1799 * @param {?} item
1800 * @param {?} idx
1801 * @return {?}
1802 */
1803 function (item, idx) {
1804 item.parentType = "array";
1805 item.name = idx.toString();
1806 formArray_1.controls.push(_this.createFrom(item, parentPath));
1807 }));
1808 return formArray_1;
1809 }
1810 };
1811 /**
1812 * @return {?}
1813 */
1814 FormViewComponent.prototype.accepted = /**
1815 * @return {?}
1816 */
1817 function () {
1818 this.accept.emit(this.formGroup);
1819 };
1820 /**
1821 * @return {?}
1822 */
1823 FormViewComponent.prototype.canceled = /**
1824 * @return {?}
1825 */
1826 function () {
1827 this.cancel.emit(this.formGroup);
1828 };
1829 FormViewComponent.decorators = [
1830 { type: core.Component, args: [{
1831 selector: "ngs-form-view",
1832 template: "<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>",
1833 styles: [""]
1834 }] }
1835 ];
1836 /** @nocollapse */
1837 FormViewComponent.ctorParameters = function () { return [
1838 { type: FormService },
1839 { type: core.Compiler },
1840 { type: core.ComponentFactoryResolver },
1841 { type: store.Store }
1842 ]; };
1843 FormViewComponent.propDecorators = {
1844 accept: [{ type: core.Output }],
1845 cancel: [{ type: core.Output }],
1846 local: [{ type: core.Input }],
1847 card: [{ type: core.Input }],
1848 id: [{ type: core.Input }],
1849 schema: [{ type: core.Input }]
1850 };
1851 return FormViewComponent;
1852 }());
1853 if (false) {
1854 /** @type {?} */
1855 FormViewComponent.prototype.unsubscribe;
1856 /** @type {?} */
1857 FormViewComponent.prototype.accept;
1858 /** @type {?} */
1859 FormViewComponent.prototype.cancel;
1860 /** @type {?} */
1861 FormViewComponent.prototype.local;
1862 /** @type {?} */
1863 FormViewComponent.prototype.card;
1864 /** @type {?} */
1865 FormViewComponent.prototype._id;
1866 /** @type {?} */
1867 FormViewComponent.prototype.formGroup;
1868 /** @type {?} */
1869 FormViewComponent.prototype.formGroupCreated;
1870 /** @type {?} */
1871 FormViewComponent.prototype.schema$;
1872 /**
1873 * @type {?}
1874 * @private
1875 */
1876 FormViewComponent.prototype.service;
1877 /**
1878 * @type {?}
1879 * @private
1880 */
1881 FormViewComponent.prototype.compiler;
1882 /**
1883 * @type {?}
1884 * @private
1885 */
1886 FormViewComponent.prototype.resolver;
1887 /**
1888 * @type {?}
1889 * @private
1890 */
1891 FormViewComponent.prototype.store;
1892 }
1893 /** @type {?} */
1894 var components = {
1895 checkbox: CheckboxComponent,
1896 text: TextComponent,
1897 password: TextComponent,
1898 date: DateFormInputControlComponent,
1899 file: FileFormInputControlComponent,
1900 table: TableComponent,
1901 color: ColorComponent,
1902 email: EmailComponent,
1903 captcha: FormCaptchaComponent,
1904 select: SelectComponent
1905 };
1906 var DynamicFieldDirective = /** @class */ (function () {
1907 function DynamicFieldDirective(resolver, container) {
1908 this.resolver = resolver;
1909 this.container = container;
1910 }
1911 /**
1912 * @return {?}
1913 */
1914 DynamicFieldDirective.prototype.ngOnChanges = /**
1915 * @return {?}
1916 */
1917 function () {
1918 if (this.component) {
1919 this.component.instance.config = this.config;
1920 this.component.instance.group = this.group;
1921 }
1922 };
1923 /**
1924 * @return {?}
1925 */
1926 DynamicFieldDirective.prototype.ngOnInit = /**
1927 * @return {?}
1928 */
1929 function () {
1930 if (this.config.inputType == undefined)
1931 return;
1932 if (!components[this.config.inputType]) {
1933 /** @type {?} */
1934 var supportedTypes = Object.keys(components).join(", ");
1935 throw new Error("Trying to use an unsupported type (" + this.config.inputType + ").\n\t\t Supported types: " + supportedTypes);
1936 }
1937 /** @type {?} */
1938 var component = this.resolver.resolveComponentFactory(components[this.config.inputType]);
1939 this.component = this.container.createComponent(component);
1940 this.component.instance.config = this.config;
1941 this.component.instance.group = this.group;
1942 };
1943 DynamicFieldDirective.decorators = [
1944 { type: core.Directive, args: [{
1945 selector: "[dynamicField]"
1946 },] }
1947 ];
1948 /** @nocollapse */
1949 DynamicFieldDirective.ctorParameters = function () { return [
1950 { type: core.ComponentFactoryResolver },
1951 { type: core.ViewContainerRef }
1952 ]; };
1953 DynamicFieldDirective.propDecorators = {
1954 config: [{ type: core.Input }],
1955 group: [{ type: core.Input }]
1956 };
1957 return DynamicFieldDirective;
1958 }());
1959 if (false) {
1960 /** @type {?} */
1961 DynamicFieldDirective.prototype.config;
1962 /** @type {?} */
1963 DynamicFieldDirective.prototype.group;
1964 /** @type {?} */
1965 DynamicFieldDirective.prototype.component;
1966 /**
1967 * @type {?}
1968 * @private
1969 */
1970 DynamicFieldDirective.prototype.resolver;
1971 /**
1972 * @type {?}
1973 * @private
1974 */
1975 DynamicFieldDirective.prototype.container;
1976 }
1977
1978 /**
1979 * @fileoverview added by tsickle
1980 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
1981 */
1982 /**
1983 * @record
1984 */
1985 function State() { }
1986 if (false) {
1987 /** @type {?} */
1988 State.prototype.status;
1989 /** @type {?} */
1990 State.prototype.data;
1991 }
1992 var ɵ0 = [];
1993 /** @type {?} */
1994 var initialState = {
1995 status: "pristine",
1996 data: ɵ0
1997 };
1998 /**
1999 * @param {?=} state
2000 * @param {?=} action
2001 * @return {?}
2002 */
2003 function reducer(state, action) {
2004 if (state === void 0) { state = initialState; }
2005 switch (action.type) {
2006 case FormsListActionTypes.FORMS_LIST: {
2007 return __assign({}, state, { status: "dirty" });
2008 }
2009 case FormsListActionTypes.FORMS_LIST_START: {
2010 return __assign({}, state, { status: "pending" });
2011 }
2012 case FormsListActionTypes.FORMS_LIST_SUCCEED: {
2013 return __assign({}, state, { data: action.payload, status: "succeed" });
2014 }
2015 case FormsListActionTypes.FORMS_LIST_FAILED: {
2016 return __assign({}, state, { status: "failed" });
2017 }
2018 case FormsListActionTypes.FORM_SCHEMA_UPDATE: {
2019 /** @type {?} */
2020 var data = state.data.concat();
2021 /** @type {?} */
2022 var entityIdx = state.data.findIndex((/**
2023 * @param {?} form
2024 * @return {?}
2025 */
2026 function (form) { return form._id == action.payload._id; }));
2027 if (entityIdx > -1) {
2028 data[entityIdx] = Object.assign({}, data[entityIdx], action.payload);
2029 }
2030 else {
2031 data.push(action.payload);
2032 }
2033 return __assign({}, state, { data: data });
2034 }
2035 case FormsListActionTypes.ADD_FORM_SCHEMA: {
2036 /** @type {?} */
2037 var data = state.data.concat();
2038 /** @type {?} */
2039 var entityIdx = state.data.findIndex((/**
2040 * @param {?} form
2041 * @return {?}
2042 */
2043 function (form) { return form._id == action.payload._id; }));
2044 if (entityIdx > -1) {
2045 data[entityIdx] = Object.assign({}, data[entityIdx], action.payload);
2046 }
2047 else {
2048 data.push(action.payload);
2049 }
2050 return __assign({}, state, { data: data });
2051 }
2052 case FormsListActionTypes.FORM_SCHEMA_FETCHED: {
2053 /** @type {?} */
2054 var data = state.data.concat();
2055 /** @type {?} */
2056 var entityIdx = state.data.findIndex((/**
2057 * @param {?} form
2058 * @return {?}
2059 */
2060 function (form) { return form._id == action.payload._id; }));
2061 if (entityIdx > -1) {
2062 data[entityIdx] = Object.assign({}, data[entityIdx], action.payload);
2063 }
2064 else {
2065 data.push(action.payload);
2066 }
2067 return __assign({}, state, { data: data });
2068 }
2069 default: {
2070 return state;
2071 }
2072 }
2073 }
2074 /** @type {?} */
2075 var getStatus = (/**
2076 * @param {?} state
2077 * @return {?}
2078 */
2079 function (state) { return state.status; });
2080
2081 /**
2082 * @fileoverview added by tsickle
2083 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2084 */
2085 /**
2086 * @record
2087 */
2088 function FormState() { }
2089 if (false) {
2090 /** @type {?} */
2091 FormState.prototype.list;
2092 }
2093 /** @type {?} */
2094 var FormReducers = {
2095 list: reducer
2096 };
2097 /**
2098 * @record
2099 */
2100 function MainContainerState() { }
2101 if (false) {
2102 /** @type {?} */
2103 MainContainerState.prototype.form;
2104 }
2105
2106 /**
2107 * @fileoverview added by tsickle
2108 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2109 */
2110 var FormGroupComponent = /** @class */ (function () {
2111 function FormGroupComponent() {
2112 this.noHeader = false;
2113 this.changes = new core.EventEmitter();
2114 this.delete = new core.EventEmitter();
2115 }
2116 /**
2117 * @return {?}
2118 */
2119 FormGroupComponent.prototype.changed = /**
2120 * @return {?}
2121 */
2122 function () {
2123 this.changes.emit();
2124 };
2125 /**
2126 * @param {?} root
2127 * @return {?}
2128 */
2129 FormGroupComponent.prototype.addFormGroup = /**
2130 * @param {?} root
2131 * @return {?}
2132 */
2133 function (root) {
2134 /** @type {?} */
2135 var group = new FieldConfig("group");
2136 group.fields = [];
2137 root.fields.push(group);
2138 this.schema.id = this.schema.id + 1;
2139 return group;
2140 };
2141 /**
2142 * @param {?} root
2143 * @return {?}
2144 */
2145 FormGroupComponent.prototype.addFormArray = /**
2146 * @param {?} root
2147 * @return {?}
2148 */
2149 function (root) {
2150 /** @type {?} */
2151 var array = new FieldConfig("array");
2152 array.fields = [];
2153 root.fields.push(array);
2154 return array;
2155 };
2156 /**
2157 * @param {?} root
2158 * @return {?}
2159 */
2160 FormGroupComponent.prototype.addFormControl = /**
2161 * @param {?} root
2162 * @return {?}
2163 */
2164 function (root) {
2165 /** @type {?} */
2166 var control = new FieldConfig("control");
2167 root.fields.push(control);
2168 return control;
2169 };
2170 /**
2171 * @param {?} idx
2172 * @return {?}
2173 */
2174 FormGroupComponent.prototype.deleteFormGroup = /**
2175 * @param {?} idx
2176 * @return {?}
2177 */
2178 function (idx) {
2179 this.schema.fields.splice(idx, 1);
2180 };
2181 FormGroupComponent.decorators = [
2182 { type: core.Component, args: [{
2183 selector: "app-form-group",
2184 template: "<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=\"\u0639\u0646\u0648\u0627\u0646\">\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>"
2185 }] }
2186 ];
2187 /** @nocollapse */
2188 FormGroupComponent.ctorParameters = function () { return []; };
2189 FormGroupComponent.propDecorators = {
2190 schema: [{ type: core.Input }],
2191 noHeader: [{ type: core.Input }],
2192 changes: [{ type: core.Output }],
2193 delete: [{ type: core.Output }]
2194 };
2195 return FormGroupComponent;
2196 }());
2197 if (false) {
2198 /** @type {?} */
2199 FormGroupComponent.prototype.schema;
2200 /** @type {?} */
2201 FormGroupComponent.prototype.noHeader;
2202 /** @type {?} */
2203 FormGroupComponent.prototype.changes;
2204 /** @type {?} */
2205 FormGroupComponent.prototype.delete;
2206 }
2207
2208 /**
2209 * @fileoverview added by tsickle
2210 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2211 */
2212 var FormArrayComponent = /** @class */ (function () {
2213 function FormArrayComponent() {
2214 this.changes = new core.EventEmitter();
2215 }
2216 /**
2217 * @return {?}
2218 */
2219 FormArrayComponent.prototype.changed = /**
2220 * @return {?}
2221 */
2222 function () {
2223 this.changes.emit();
2224 };
2225 /**
2226 * @param {?} root
2227 * @return {?}
2228 */
2229 FormArrayComponent.prototype.addFormGroup = /**
2230 * @param {?} root
2231 * @return {?}
2232 */
2233 function (root) {
2234 /** @type {?} */
2235 var group = new FieldConfig("group");
2236 group.fields = [];
2237 root.fields.push(group);
2238 return group;
2239 };
2240 /**
2241 * @param {?} root
2242 * @return {?}
2243 */
2244 FormArrayComponent.prototype.addFormArray = /**
2245 * @param {?} root
2246 * @return {?}
2247 */
2248 function (root) {
2249 /** @type {?} */
2250 var array = new FieldConfig("array");
2251 array.fields = [];
2252 root.fields.push(array);
2253 return array;
2254 };
2255 /**
2256 * @param {?} root
2257 * @return {?}
2258 */
2259 FormArrayComponent.prototype.addFormControl = /**
2260 * @param {?} root
2261 * @return {?}
2262 */
2263 function (root) {
2264 /** @type {?} */
2265 var control = new FieldConfig("control");
2266 root.fields.push(control);
2267 return control;
2268 };
2269 FormArrayComponent.decorators = [
2270 { type: core.Component, args: [{
2271 selector: "app-form-array",
2272 template: "<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>"
2273 }] }
2274 ];
2275 /** @nocollapse */
2276 FormArrayComponent.ctorParameters = function () { return []; };
2277 FormArrayComponent.propDecorators = {
2278 schema: [{ type: core.Input }],
2279 changes: [{ type: core.Output }]
2280 };
2281 return FormArrayComponent;
2282 }());
2283 if (false) {
2284 /** @type {?} */
2285 FormArrayComponent.prototype.schema;
2286 /** @type {?} */
2287 FormArrayComponent.prototype.changes;
2288 }
2289
2290 /**
2291 * @fileoverview added by tsickle
2292 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2293 */
2294 var FormControlComponent = /** @class */ (function () {
2295 function FormControlComponent() {
2296 this.changes = new core.EventEmitter();
2297 this.delete = new core.EventEmitter();
2298 this.width = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
2299 this.options = new forms.FormArray([
2300 new forms.FormGroup({
2301 key: new forms.FormControl(),
2302 value: new forms.FormControl()
2303 })
2304 ]);
2305 this.tableOptions = new forms.FormGroup({
2306 dataEndpoint: new forms.FormControl("")
2307 });
2308 }
2309 /**
2310 * @return {?}
2311 */
2312 FormControlComponent.prototype.changed = /**
2313 * @return {?}
2314 */
2315 function () {
2316 if ([this.schema.name, this.schema.title, this.schema.inputType].some((/**
2317 * @param {?} item
2318 * @return {?}
2319 */
2320 function (item) { return !item; })))
2321 return true;
2322 if (this.schema.inputType == "table") {
2323 this.schema.options = this.tableOptions.value;
2324 }
2325 else if (this.schema.inputType == "select") {
2326 this.schema.options = this.options.value;
2327 }
2328 this.changes.emit();
2329 };
2330 /**
2331 * @return {?}
2332 */
2333 FormControlComponent.prototype.addOption = /**
2334 * @return {?}
2335 */
2336 function () {
2337 this.options.push(new forms.FormGroup({
2338 key: new forms.FormControl(),
2339 value: new forms.FormControl()
2340 }));
2341 };
2342 /**
2343 * @param {?} i
2344 * @return {?}
2345 */
2346 FormControlComponent.prototype.removeOption = /**
2347 * @param {?} i
2348 * @return {?}
2349 */
2350 function (i) {
2351 this.options.controls.splice(i, 1);
2352 };
2353 /**
2354 * @return {?}
2355 */
2356 FormControlComponent.prototype.insertOptions = /**
2357 * @return {?}
2358 */
2359 function () {
2360 this.schema.options = this.options.value;
2361 };
2362 FormControlComponent.decorators = [
2363 { type: core.Component, args: [{
2364 selector: "app-form-control",
2365 template: "<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\">\u0627\u062C\u0628\u0627\u0631\u06CC</mat-slide-toggle>\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" [(ngModel)]=\"schema.validator.required.message\" placeholder=\"\u067E\u06CC\u063A\u0627\u0645\" />\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\">\u0627\u06CC\u0645\u06CC\u0644</mat-slide-toggle>\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" [(ngModel)]=\"schema.validator.email.message\" placeholder=\"\u067E\u06CC\u063A\u0627\u0645\" />\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\">\u062D\u062F\u0627\u0642\u0644 \u062A\u0639\u062F\u0627\u062F \u06A9\u0627\u0631\u0627\u06A9\u062A\u0631</mat-slide-toggle>\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" [(ngModel)]=\"schema.validator.minlength.message\" placeholder=\"\u067E\u06CC\u063A\u0627\u0645\" />\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input matInput (change)=\"changed()\" [(ngModel)]=\"schema.validator.minlength.value\" placeholder=\"\u062A\u0639\u062F\u0627\u062F \u062D\u062F\u0627\u0642\u0644 \u06A9\u0627\u0631\u0627\u06A9\u062A\u0631\" />\r\n </mat-form-field>\r\n </mat-card>\r\n </div>\r\n</mat-expansion-panel>"
2366 }] }
2367 ];
2368 /** @nocollapse */
2369 FormControlComponent.ctorParameters = function () { return []; };
2370 FormControlComponent.propDecorators = {
2371 schema: [{ type: core.Input }],
2372 changes: [{ type: core.Output }],
2373 delete: [{ type: core.Output }]
2374 };
2375 return FormControlComponent;
2376 }());
2377 if (false) {
2378 /** @type {?} */
2379 FormControlComponent.prototype.schema;
2380 /** @type {?} */
2381 FormControlComponent.prototype.changes;
2382 /** @type {?} */
2383 FormControlComponent.prototype.delete;
2384 /** @type {?} */
2385 FormControlComponent.prototype.width;
2386 /** @type {?} */
2387 FormControlComponent.prototype.options;
2388 /** @type {?} */
2389 FormControlComponent.prototype.tableOptions;
2390 }
2391
2392 /**
2393 * @fileoverview added by tsickle
2394 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2395 */
2396 /** @enum {string} */
2397 var EditFormActionTypes = {
2398 EDIT_FORM: "[FORM][EDIT] EDIT_FORM",
2399 EDIT_FORM_START: "[FORM][EDIT] EDIT_FORM_START",
2400 EDIT_FORM_SUCCEED: "[FORM][EDIT] EDIT_FORM_SUCCEED",
2401 EDIT_FORM_FAILED: "[FORM][EDIT] EDIT_FORM_FAILED",
2402 };
2403 var EditFormAction = /** @class */ (function () {
2404 function EditFormAction(payload) {
2405 this.payload = payload;
2406 this.type = EditFormActionTypes.EDIT_FORM;
2407 }
2408 return EditFormAction;
2409 }());
2410 if (false) {
2411 /** @type {?} */
2412 EditFormAction.prototype.type;
2413 /** @type {?} */
2414 EditFormAction.prototype.payload;
2415 }
2416 var EditFormStartAction = /** @class */ (function () {
2417 function EditFormStartAction(payload) {
2418 this.payload = payload;
2419 this.type = EditFormActionTypes.EDIT_FORM_START;
2420 }
2421 return EditFormStartAction;
2422 }());
2423 if (false) {
2424 /** @type {?} */
2425 EditFormStartAction.prototype.type;
2426 /** @type {?} */
2427 EditFormStartAction.prototype.payload;
2428 }
2429 var EditFormSucceedAction = /** @class */ (function () {
2430 function EditFormSucceedAction(payload) {
2431 this.payload = payload;
2432 this.type = EditFormActionTypes.EDIT_FORM_SUCCEED;
2433 }
2434 return EditFormSucceedAction;
2435 }());
2436 if (false) {
2437 /** @type {?} */
2438 EditFormSucceedAction.prototype.type;
2439 /** @type {?} */
2440 EditFormSucceedAction.prototype.payload;
2441 }
2442 var EditFormFailedAction = /** @class */ (function () {
2443 function EditFormFailedAction() {
2444 this.type = EditFormActionTypes.EDIT_FORM_FAILED;
2445 }
2446 return EditFormFailedAction;
2447 }());
2448 if (false) {
2449 /** @type {?} */
2450 EditFormFailedAction.prototype.type;
2451 }
2452
2453 /**
2454 * @fileoverview added by tsickle
2455 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2456 */
2457 /** @enum {string} */
2458 var AddFormActionTypes = {
2459 ADD_FORM: "[FORM][ADD] ADD_FORM_PROFILE",
2460 ADD_FORM_START: "[FORM][ADD] ADD_FORM_START",
2461 ADD_FORM_SUCCEED: "[FORM][ADD] ADD_FORM_SUCCEED",
2462 ADD_FORM_FAILED: "[FORM][ADD] ADD_FORM_FAILED",
2463 };
2464 var AddFormAction = /** @class */ (function () {
2465 function AddFormAction(payload) {
2466 this.payload = payload;
2467 this.type = AddFormActionTypes.ADD_FORM;
2468 }
2469 return AddFormAction;
2470 }());
2471 if (false) {
2472 /** @type {?} */
2473 AddFormAction.prototype.type;
2474 /** @type {?} */
2475 AddFormAction.prototype.payload;
2476 }
2477 var AddFormStartAction = /** @class */ (function () {
2478 function AddFormStartAction(payload) {
2479 this.payload = payload;
2480 this.type = AddFormActionTypes.ADD_FORM_START;
2481 }
2482 return AddFormStartAction;
2483 }());
2484 if (false) {
2485 /** @type {?} */
2486 AddFormStartAction.prototype.type;
2487 /** @type {?} */
2488 AddFormStartAction.prototype.payload;
2489 }
2490 var AddFormSucceedAction = /** @class */ (function () {
2491 function AddFormSucceedAction() {
2492 this.type = AddFormActionTypes.ADD_FORM_SUCCEED;
2493 }
2494 return AddFormSucceedAction;
2495 }());
2496 if (false) {
2497 /** @type {?} */
2498 AddFormSucceedAction.prototype.type;
2499 }
2500 var AddFormFailedAction = /** @class */ (function () {
2501 function AddFormFailedAction() {
2502 this.type = AddFormActionTypes.ADD_FORM_FAILED;
2503 }
2504 return AddFormFailedAction;
2505 }());
2506 if (false) {
2507 /** @type {?} */
2508 AddFormFailedAction.prototype.type;
2509 }
2510
2511 /**
2512 * @fileoverview added by tsickle
2513 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2514 */
2515 var AddFormContainerComponent = /** @class */ (function () {
2516 function AddFormContainerComponent(store, service) {
2517 this.store = store;
2518 this.service = service;
2519 }
2520 /**
2521 * @return {?}
2522 */
2523 AddFormContainerComponent.prototype.ngOnInit = /**
2524 * @return {?}
2525 */
2526 function () {
2527 this.schema = new FormSchemaModel();
2528 this.schema.init();
2529 this.store.dispatch(new AddFormSchemaAction(this.schema));
2530 };
2531 /**
2532 * @param {?} form
2533 * @return {?}
2534 */
2535 AddFormContainerComponent.prototype.add = /**
2536 * @param {?} form
2537 * @return {?}
2538 */
2539 function (form) {
2540 this.store.dispatch(new AddFormAction(form));
2541 };
2542 /**
2543 * @param {?} form
2544 * @return {?}
2545 */
2546 AddFormContainerComponent.prototype.update_schema = /**
2547 * @param {?} form
2548 * @return {?}
2549 */
2550 function (form) {
2551 this.store.dispatch(new UpdateFormSchemaAction(form));
2552 };
2553 AddFormContainerComponent.decorators = [
2554 { type: core.Component, args: [{
2555 template: "<ngs-form-add \n\t\t\t\t\t[schema]=\"schema\" \n\t\t\t\t\t(changes)=\"update_schema($event)\" \n\t\t\t\t\t(submited)=add($event)\n\t\t\t\t></ngs-form-add>"
2556 }] }
2557 ];
2558 /** @nocollapse */
2559 AddFormContainerComponent.ctorParameters = function () { return [
2560 { type: store.Store },
2561 { type: FormService }
2562 ]; };
2563 return AddFormContainerComponent;
2564 }());
2565 if (false) {
2566 /** @type {?} */
2567 AddFormContainerComponent.prototype.schema;
2568 /** @type {?} */
2569 AddFormContainerComponent.prototype.store;
2570 /** @type {?} */
2571 AddFormContainerComponent.prototype.service;
2572 }
2573
2574 /**
2575 * @fileoverview added by tsickle
2576 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2577 */
2578
2579 /**
2580 * @fileoverview added by tsickle
2581 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2582 */
2583 var EditFormContainerComponent = /** @class */ (function (_super) {
2584 __extends(EditFormContainerComponent, _super);
2585 function EditFormContainerComponent(service, route, store) {
2586 var _this = _super.call(this, store, service) || this;
2587 _this.service = service;
2588 _this.route = route;
2589 _this.store = store;
2590 _this.formGroup = EditFormApiModel.Request.formGroup;
2591 return _this;
2592 }
2593 /**
2594 * @return {?}
2595 */
2596 EditFormContainerComponent.prototype.ngOnInit = /**
2597 * @return {?}
2598 */
2599 function () {
2600 var _this = this;
2601 this.route.params
2602 .map((/**
2603 * @param {?} params
2604 * @return {?}
2605 */
2606 function (params) { return params["_id"]; }))
2607 .subscribe((/**
2608 * @param {?} id
2609 * @return {?}
2610 */
2611 function (id) { return _this.store.dispatch(new GetFormSchemaAction(id)); }));
2612 this.route.params
2613 .map((/**
2614 * @param {?} params
2615 * @return {?}
2616 */
2617 function (params) { return params["_id"]; }))
2618 .switchMap((/**
2619 * @param {?} id
2620 * @return {?}
2621 */
2622 function (id) { return _this.service.selectFormById(id); }))
2623 .filter((/**
2624 * @param {?} data
2625 * @return {?}
2626 */
2627 function (data) { return data != null; }))
2628 .take(1)
2629 .subscribe((/**
2630 * @param {?} formSchema
2631 * @return {?}
2632 */
2633 function (formSchema) {
2634 _this.schema = formSchema;
2635 _this.formGroup.patchValue(formSchema);
2636 }));
2637 };
2638 /**
2639 * @param {?} data
2640 * @return {?}
2641 */
2642 EditFormContainerComponent.prototype.update = /**
2643 * @param {?} data
2644 * @return {?}
2645 */
2646 function (data) {
2647 this.store.dispatch(new EditFormAction(data));
2648 };
2649 EditFormContainerComponent.decorators = [
2650 { type: core.Component, args: [{
2651 template: "<edit-form\n\t\t\t\t\t[formGroup]=\"formGroup\"\n\t\t\t\t\t[schema]=\"schema\"\n\t\t\t\t\t(changes)=\"update_schema($event)\"\n\t\t\t\t\t(submited)=\"update($event)\">\n\t\t\t\t</edit-form>"
2652 }] }
2653 ];
2654 /** @nocollapse */
2655 EditFormContainerComponent.ctorParameters = function () { return [
2656 { type: FormService },
2657 { type: router.ActivatedRoute },
2658 { type: store.Store }
2659 ]; };
2660 return EditFormContainerComponent;
2661 }(AddFormContainerComponent));
2662 if (false) {
2663 /** @type {?} */
2664 EditFormContainerComponent.prototype.formGroup;
2665 /** @type {?} */
2666 EditFormContainerComponent.prototype.service;
2667 /**
2668 * @type {?}
2669 * @private
2670 */
2671 EditFormContainerComponent.prototype.route;
2672 /** @type {?} */
2673 EditFormContainerComponent.prototype.store;
2674 }
2675
2676 /**
2677 * @fileoverview added by tsickle
2678 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2679 */
2680 var AddFormComponent = /** @class */ (function () {
2681 function AddFormComponent() {
2682 this.formGroup = AddFormApiModel.Request.formGroup;
2683 this.submited = new core.EventEmitter();
2684 this.changes = new core.EventEmitter();
2685 }
2686 /**
2687 * @return {?}
2688 */
2689 AddFormComponent.prototype.emit = /**
2690 * @return {?}
2691 */
2692 function () {
2693 this.formGroup.patchValue({ form: this.schema.form });
2694 this.submited.emit(this.formGroup.value);
2695 };
2696 /**
2697 * @return {?}
2698 */
2699 AddFormComponent.prototype.changed = /**
2700 * @return {?}
2701 */
2702 function () {
2703 this.formGroup.patchValue({ form: this.schema.form });
2704 this.changes.emit(this.formGroup.value);
2705 };
2706 /**
2707 * @param {?} $event
2708 * @return {?}
2709 */
2710 AddFormComponent.prototype.changeOrder = /**
2711 * @param {?} $event
2712 * @return {?}
2713 */
2714 function ($event) { };
2715 /**
2716 * @param {?} root
2717 * @return {?}
2718 */
2719 AddFormComponent.prototype.addFormGroup = /**
2720 * @param {?} root
2721 * @return {?}
2722 */
2723 function (root) {
2724 /** @type {?} */
2725 var group = new FieldConfig("group");
2726 group.fields = [];
2727 root.fields.push(group);
2728 return group;
2729 };
2730 /**
2731 * @param {?} root
2732 * @return {?}
2733 */
2734 AddFormComponent.prototype.addFormArray = /**
2735 * @param {?} root
2736 * @return {?}
2737 */
2738 function (root) {
2739 /** @type {?} */
2740 var array = new FieldConfig("array");
2741 array.fields = [];
2742 root.fields.push(array);
2743 return array;
2744 };
2745 /**
2746 * @param {?} root
2747 * @return {?}
2748 */
2749 AddFormComponent.prototype.addFormControl = /**
2750 * @param {?} root
2751 * @return {?}
2752 */
2753 function (root) {
2754 /** @type {?} */
2755 var control = new FieldConfig("control");
2756 root.fields.push(control);
2757 return control;
2758 };
2759 AddFormComponent.decorators = [
2760 { type: core.Component, args: [{
2761 selector: "ngs-form-add",
2762 template: "<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>\u0627\u06CC\u062C\u0627\u062F \u0641\u0631\u0645 \u062C\u062F\u06CC\u062F</mat-card-title>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <input type=\"text\" matInput (change)=\"changed()\" placeholder=\"\u0646\u0627\u0645 \u0641\u0631\u0645\" 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)\">\u0627\u06CC\u062C\u0627\u062F \u0641\u0631\u0645</button> -->\r\n <button mat-raised-button color=\"primary\" (click)=\"emit()\" type=\"submit\">\u062B\u0628\u062A</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\">\u0646\u0645\u0627\u06CC\u0634 \u062A\u0627\u06CC\u06CC\u062F</mat-slide-toggle>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"changed()\" matInput placeholder=\"\u0645\u062A\u0646 \u062A\u0627\u06CC\u06CC\u062F\" 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\">\u0646\u0645\u0627\u06CC\u0634 \u0627\u0646\u0635\u0631\u0627\u0641</mat-slide-toggle>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"changed()\" matInput placeholder=\"\u0645\u062A\u0646 \u0627\u0646\u0635\u0631\u0627\u0641\" 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>"
2763 }] }
2764 ];
2765 AddFormComponent.propDecorators = {
2766 schema: [{ type: core.Input }],
2767 formGroup: [{ type: core.Input }],
2768 submited: [{ type: core.Output }],
2769 changes: [{ type: core.Output }]
2770 };
2771 return AddFormComponent;
2772 }());
2773 if (false) {
2774 /** @type {?} */
2775 AddFormComponent.prototype.schema;
2776 /** @type {?} */
2777 AddFormComponent.prototype.formGroup;
2778 /** @type {?} */
2779 AddFormComponent.prototype.submited;
2780 /** @type {?} */
2781 AddFormComponent.prototype.changes;
2782 }
2783
2784 /**
2785 * @fileoverview added by tsickle
2786 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2787 */
2788
2789 /**
2790 * @fileoverview added by tsickle
2791 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2792 */
2793 var EditFormComponent = /** @class */ (function (_super) {
2794 __extends(EditFormComponent, _super);
2795 function EditFormComponent() {
2796 return _super !== null && _super.apply(this, arguments) || this;
2797 }
2798 /**
2799 * @return {?}
2800 */
2801 EditFormComponent.prototype.emit = /**
2802 * @return {?}
2803 */
2804 function () {
2805 if (!this.formGroup.valid)
2806 return;
2807 return this.submited.emit(this.formGroup.value);
2808 };
2809 EditFormComponent.decorators = [
2810 { type: core.Component, args: [{
2811 selector: "edit-form",
2812 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>\u0627\u06CC\u062C\u0627\u062F \u0641\u0631\u0645 \u062C\u062F\u06CC\u062F</mat-card-title>\r\n <mat-card-content>\r\n <mat-form-field>\r\n <input type=\"text\" matInput (change)=\"changed()\" placeholder=\"\u0646\u0627\u0645 \u0641\u0631\u0645\" 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\">\u0646\u0645\u0627\u06CC\u0634 \u062A\u0627\u06CC\u06CC\u062F</mat-slide-toggle>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"changed()\" matInput placeholder=\"\u0645\u062A\u0646 \u062A\u0627\u06CC\u06CC\u062F\" 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\">\u0646\u0645\u0627\u06CC\u0634 \u0627\u0646\u0635\u0631\u0627\u0641</mat-slide-toggle>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"changed()\" matInput placeholder=\"\u0645\u062A\u0646 \u0627\u0646\u0635\u0631\u0627\u0641\" 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)\">\u0627\u06CC\u062C\u0627\u062F \u0641\u0631\u0645</button> -->\r\n <button mat-raised-button color=\"primary\" (click)=\"emit()\" type=\"submit\">\u062B\u0628\u062A</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>",
2813 styles: [".form-buttons,.schema-form{padding:25px 10px}"]
2814 }] }
2815 ];
2816 EditFormComponent.propDecorators = {
2817 schema: [{ type: core.Input }]
2818 };
2819 return EditFormComponent;
2820 }(AddFormComponent));
2821 if (false) {
2822 /** @type {?} */
2823 EditFormComponent.prototype.schema;
2824 }
2825
2826 /**
2827 * @fileoverview added by tsickle
2828 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2829 */
2830 var FormListContainerComponent = /** @class */ (function () {
2831 function FormListContainerComponent(store) {
2832 this.store = store;
2833 this.data$ = this.store.select((/**
2834 * @param {?} state
2835 * @return {?}
2836 */
2837 function (state) { return state.form.list.data; }));
2838 }
2839 /**
2840 * @return {?}
2841 */
2842 FormListContainerComponent.prototype.ngOnInit = /**
2843 * @return {?}
2844 */
2845 function () {
2846 this.store.dispatch(new FormsListAction());
2847 };
2848 FormListContainerComponent.decorators = [
2849 { type: core.Component, args: [{
2850 template: "<form-list\n\t\t\t\t\t[data]=\"data$\">\n\t\t\t\t</form-list>"
2851 }] }
2852 ];
2853 /** @nocollapse */
2854 FormListContainerComponent.ctorParameters = function () { return [
2855 { type: store.Store }
2856 ]; };
2857 return FormListContainerComponent;
2858 }());
2859 if (false) {
2860 /** @type {?} */
2861 FormListContainerComponent.prototype.data$;
2862 /** @type {?} */
2863 FormListContainerComponent.prototype.store;
2864 }
2865
2866 /**
2867 * @fileoverview added by tsickle
2868 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2869 */
2870 var FormListComponent = /** @class */ (function () {
2871 function FormListComponent() {
2872 }
2873 FormListComponent.decorators = [
2874 { type: core.Component, args: [{
2875 selector: "form-list",
2876 template: "<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>\u0645\u062F\u06CC\u0631\u06CC\u062A \u0641\u0631\u0645 \u0647\u0627</span>\r\n </mat-card-title>\r\n <mat-card-subtitle fxLayout=\"row\" fxLayoutAlign=\"space-between center\">\r\n <span>\r\n \u0634\u0627\u0645\u0644 \u062A\u0645\u0627\u0645\u06CC \u062F\u0631\u062E\u0648\u0627\u0633\u062A\u200C\u0647\u0627 \u0627\u0632 \u0642\u0628\u06CC\u0644 \u062F\u0627\u0626\u0631\u06CC\u060C \u062C\u0645\u0639\u200C\u0622\u0648\u0631\u06CC \u0648 ...\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>",
2877 styles: ["button.link{padding:25px 15px;margin:.5%;box-sizing:border-box}button mat-icon{font-size:34px;width:34px;height:34px}"]
2878 }] }
2879 ];
2880 FormListComponent.propDecorators = {
2881 data$: [{ type: core.Input, args: ["data",] }]
2882 };
2883 return FormListComponent;
2884 }());
2885 if (false) {
2886 /** @type {?} */
2887 FormListComponent.prototype.data$;
2888 }
2889
2890 /**
2891 * @fileoverview added by tsickle
2892 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2893 */
2894 var MainContainerComponent = /** @class */ (function () {
2895 function MainContainerComponent(route, store) {
2896 this.route = route;
2897 this.store = store;
2898 }
2899 MainContainerComponent.decorators = [
2900 { type: core.Component, args: [{
2901 template: "<router-outlet></router-outlet>"
2902 }] }
2903 ];
2904 /** @nocollapse */
2905 MainContainerComponent.ctorParameters = function () { return [
2906 { type: router.ActivatedRoute },
2907 { type: store.Store }
2908 ]; };
2909 return MainContainerComponent;
2910 }());
2911 if (false) {
2912 /**
2913 * @type {?}
2914 * @private
2915 */
2916 MainContainerComponent.prototype.route;
2917 /**
2918 * @type {?}
2919 * @private
2920 */
2921 MainContainerComponent.prototype.store;
2922 }
2923
2924 /**
2925 * @fileoverview added by tsickle
2926 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
2927 */
2928 var AddFormEffects = /** @class */ (function () {
2929 function AddFormEffects(actions$, router, service) {
2930 var _this = this;
2931 this.actions$ = actions$;
2932 this.router = router;
2933 this.service = service;
2934 this.AddForm$ = this.actions$.pipe(effects.ofType(AddFormActionTypes.ADD_FORM), operators.map((/**
2935 * @param {?} action
2936 * @return {?}
2937 */
2938 function (action) { return action.payload; })), operators.map((/**
2939 * @param {?} data
2940 * @return {?}
2941 */
2942 function (data) { return new AddFormStartAction(data); })));
2943 this.AddFormStart$ = this.actions$.pipe(effects.ofType(AddFormActionTypes.ADD_FORM_START), operators.map((/**
2944 * @param {?} action
2945 * @return {?}
2946 */
2947 function (action) { return action.payload; })), operators.switchMap((/**
2948 * @param {?} data
2949 * @return {?}
2950 */
2951 function (data) { return _this.service.add(data); })), operators.map((/**
2952 * @param {?} res
2953 * @return {?}
2954 */
2955 function (res) { return new AddFormSucceedAction(); })), operators.catchError((/**
2956 * @return {?}
2957 */
2958 function () { return of.of(new AddFormFailedAction()); })));
2959 }
2960 AddFormEffects.decorators = [
2961 { type: core.Injectable }
2962 ];
2963 /** @nocollapse */
2964 AddFormEffects.ctorParameters = function () { return [
2965 { type: effects.Actions },
2966 { type: router.Router },
2967 { type: FormService }
2968 ]; };
2969 __decorate([
2970 effects.Effect(),
2971 __metadata("design:type", Object)
2972 ], AddFormEffects.prototype, "AddForm$", void 0);
2973 __decorate([
2974 effects.Effect(),
2975 __metadata("design:type", Object)
2976 ], AddFormEffects.prototype, "AddFormStart$", void 0);
2977 return AddFormEffects;
2978 }());
2979 if (false) {
2980 /** @type {?} */
2981 AddFormEffects.prototype.AddForm$;
2982 /** @type {?} */
2983 AddFormEffects.prototype.AddFormStart$;
2984 /**
2985 * @type {?}
2986 * @private
2987 */
2988 AddFormEffects.prototype.actions$;
2989 /**
2990 * @type {?}
2991 * @private
2992 */
2993 AddFormEffects.prototype.router;
2994 /**
2995 * @type {?}
2996 * @private
2997 */
2998 AddFormEffects.prototype.service;
2999 }
3000
3001 /**
3002 * @fileoverview added by tsickle
3003 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3004 */
3005
3006 /**
3007 * @fileoverview added by tsickle
3008 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3009 */
3010
3011 /**
3012 * @fileoverview added by tsickle
3013 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3014 */
3015 var FormsListEffects = /** @class */ (function () {
3016 function FormsListEffects(actions$, router, service) {
3017 var _this = this;
3018 this.actions$ = actions$;
3019 this.router = router;
3020 this.service = service;
3021 this.EditProfileRequest$ = this.actions$.pipe(effects.ofType(FormsListActionTypes.FORMS_LIST), operators.map((/**
3022 * @param {?} data
3023 * @return {?}
3024 */
3025 function (data) { return new FormsListStartAction(); })));
3026 this.GetForm$ = this.actions$.pipe(effects.ofType(FormsListActionTypes.GET_FORM_SCHEMA), operators.map((/**
3027 * @param {?} action
3028 * @return {?}
3029 */
3030 function (action) { return action.payload; })), operators.switchMap((/**
3031 * @param {?} id
3032 * @return {?}
3033 */
3034 function (id) { return _this.service.get(id); })), operators.map((/**
3035 * @param {?} formSchema
3036 * @return {?}
3037 */
3038 function (formSchema) { return new FormSchemaFechedAction(formSchema); })));
3039 this.get_forms_list$ = this.actions$.pipe(effects.ofType(FormsListActionTypes.FORMS_LIST_START), operators.switchMap((/**
3040 * @param {?} data
3041 * @return {?}
3042 */
3043 function (data) { return _this.service.getList(); })), operators.map((/**
3044 * @param {?} res
3045 * @return {?}
3046 */
3047 function (res) { return new FormsListSucceedAction(res); })), operators.catchError((/**
3048 * @return {?}
3049 */
3050 function () { return of.of(new FormsListFailedAction()); })));
3051 }
3052 FormsListEffects.decorators = [
3053 { type: core.Injectable }
3054 ];
3055 /** @nocollapse */
3056 FormsListEffects.ctorParameters = function () { return [
3057 { type: effects.Actions },
3058 { type: router.Router },
3059 { type: FormService }
3060 ]; };
3061 __decorate([
3062 effects.Effect(),
3063 __metadata("design:type", Object)
3064 ], FormsListEffects.prototype, "EditProfileRequest$", void 0);
3065 __decorate([
3066 effects.Effect(),
3067 __metadata("design:type", Object)
3068 ], FormsListEffects.prototype, "GetForm$", void 0);
3069 __decorate([
3070 effects.Effect(),
3071 __metadata("design:type", Object)
3072 ], FormsListEffects.prototype, "get_forms_list$", void 0);
3073 return FormsListEffects;
3074 }());
3075 if (false) {
3076 /** @type {?} */
3077 FormsListEffects.prototype.EditProfileRequest$;
3078 /** @type {?} */
3079 FormsListEffects.prototype.GetForm$;
3080 /** @type {?} */
3081 FormsListEffects.prototype.get_forms_list$;
3082 /**
3083 * @type {?}
3084 * @private
3085 */
3086 FormsListEffects.prototype.actions$;
3087 /**
3088 * @type {?}
3089 * @private
3090 */
3091 FormsListEffects.prototype.router;
3092 /**
3093 * @type {?}
3094 * @private
3095 */
3096 FormsListEffects.prototype.service;
3097 }
3098
3099 /**
3100 * @fileoverview added by tsickle
3101 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3102 */
3103
3104 /**
3105 * @fileoverview added by tsickle
3106 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3107 */
3108 var EditFormEffects = /** @class */ (function () {
3109 function EditFormEffects(actions$, router, service) {
3110 var _this = this;
3111 this.actions$ = actions$;
3112 this.router = router;
3113 this.service = service;
3114 this.EditForm$ = this.actions$.pipe(effects.ofType(EditFormActionTypes.EDIT_FORM), operators.map((/**
3115 * @param {?} action
3116 * @return {?}
3117 */
3118 function (action) { return action.payload; })), operators.map((/**
3119 * @param {?} data
3120 * @return {?}
3121 */
3122 function (data) { return new EditFormStartAction(data); })));
3123 this.EditFormStart$ = this.actions$.pipe(effects.ofType(EditFormActionTypes.EDIT_FORM_START), operators.map((/**
3124 * @param {?} action
3125 * @return {?}
3126 */
3127 function (action) { return action.payload; })), operators.switchMap((/**
3128 * @param {?} data
3129 * @return {?}
3130 */
3131 function (data) { return _this.service.update(data); })), operators.map((/**
3132 * @param {?} formSchema
3133 * @return {?}
3134 */
3135 function (formSchema) { return new EditFormSucceedAction(formSchema); })), operators.catchError((/**
3136 * @return {?}
3137 */
3138 function () { return of.of(new EditFormFailedAction()); })));
3139 this.UpdateFormsListStart$ = this.actions$.pipe(effects.ofType(EditFormActionTypes.EDIT_FORM_SUCCEED), operators.map((/**
3140 * @param {?} action
3141 * @return {?}
3142 */
3143 function (action) { return action.payload; })), operators.map((/**
3144 * @param {?} formSchema
3145 * @return {?}
3146 */
3147 function (formSchema) { return new UpdateFormSchemaAction(formSchema); })));
3148 }
3149 EditFormEffects.decorators = [
3150 { type: core.Injectable }
3151 ];
3152 /** @nocollapse */
3153 EditFormEffects.ctorParameters = function () { return [
3154 { type: effects.Actions },
3155 { type: router.Router },
3156 { type: FormService }
3157 ]; };
3158 __decorate([
3159 effects.Effect(),
3160 __metadata("design:type", Object)
3161 ], EditFormEffects.prototype, "EditForm$", void 0);
3162 __decorate([
3163 effects.Effect(),
3164 __metadata("design:type", Object)
3165 ], EditFormEffects.prototype, "EditFormStart$", void 0);
3166 __decorate([
3167 effects.Effect(),
3168 __metadata("design:type", Object)
3169 ], EditFormEffects.prototype, "UpdateFormsListStart$", void 0);
3170 return EditFormEffects;
3171 }());
3172 if (false) {
3173 /** @type {?} */
3174 EditFormEffects.prototype.EditForm$;
3175 /** @type {?} */
3176 EditFormEffects.prototype.EditFormStart$;
3177 /** @type {?} */
3178 EditFormEffects.prototype.UpdateFormsListStart$;
3179 /**
3180 * @type {?}
3181 * @private
3182 */
3183 EditFormEffects.prototype.actions$;
3184 /**
3185 * @type {?}
3186 * @private
3187 */
3188 EditFormEffects.prototype.router;
3189 /**
3190 * @type {?}
3191 * @private
3192 */
3193 EditFormEffects.prototype.service;
3194 }
3195
3196 /**
3197 * @fileoverview added by tsickle
3198 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3199 */
3200 /** @type {?} */
3201 var routes = [
3202 {
3203 path: "form",
3204 component: MainContainerComponent,
3205 children: [
3206 {
3207 path: "add",
3208 component: AddFormContainerComponent
3209 },
3210 {
3211 path: "edit/:_id",
3212 component: EditFormContainerComponent
3213 },
3214 {
3215 path: "",
3216 component: FormListContainerComponent
3217 }
3218 ]
3219 }
3220 ];
3221 /** @type {?} */
3222 var RoutingModule = router.RouterModule.forChild(routes);
3223
3224 /**
3225 * @fileoverview added by tsickle
3226 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3227 */
3228 /** @enum {string} */
3229 var CaptchaActionTypes = {
3230 GET_CAPTCHA: "[CAPTCHA][GET] GET_CAPTCHA",
3231 GET_CAPTCHA_START: "[CAPTCHA][GET] GET_CAPTCHA_START",
3232 GET_CAPTCHA_SUCCEED: "[CAPTCHA][GET] GET_CAPTCHA_SUCCEED",
3233 GET_CAPTCHA_FAILED: "[CAPTCHA][GET] GET_CAPTCHA_FAILED",
3234 };
3235 var GetCaptchaAction = /** @class */ (function () {
3236 function GetCaptchaAction() {
3237 this.type = CaptchaActionTypes.GET_CAPTCHA;
3238 // constructor(public payload: CaptchaModel) { }
3239 }
3240 return GetCaptchaAction;
3241 }());
3242 if (false) {
3243 /** @type {?} */
3244 GetCaptchaAction.prototype.type;
3245 }
3246 var GetCaptchaStartAction = /** @class */ (function () {
3247 function GetCaptchaStartAction(payload) {
3248 this.payload = payload;
3249 this.type = CaptchaActionTypes.GET_CAPTCHA_START;
3250 }
3251 return GetCaptchaStartAction;
3252 }());
3253 if (false) {
3254 /** @type {?} */
3255 GetCaptchaStartAction.prototype.type;
3256 /** @type {?} */
3257 GetCaptchaStartAction.prototype.payload;
3258 }
3259 var GetCaptchaSucceedAction = /** @class */ (function () {
3260 function GetCaptchaSucceedAction() {
3261 this.type = CaptchaActionTypes.GET_CAPTCHA_SUCCEED;
3262 }
3263 return GetCaptchaSucceedAction;
3264 }());
3265 if (false) {
3266 /** @type {?} */
3267 GetCaptchaSucceedAction.prototype.type;
3268 }
3269 var GetCaptchaFailedAction = /** @class */ (function () {
3270 function GetCaptchaFailedAction() {
3271 this.type = CaptchaActionTypes.GET_CAPTCHA_FAILED;
3272 }
3273 return GetCaptchaFailedAction;
3274 }());
3275 if (false) {
3276 /** @type {?} */
3277 GetCaptchaFailedAction.prototype.type;
3278 }
3279
3280 /**
3281 * @fileoverview added by tsickle
3282 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3283 */
3284 var CaptchaEffects = /** @class */ (function () {
3285 function CaptchaEffects(actions$, router, service) {
3286 var _this = this;
3287 this.actions$ = actions$;
3288 this.router = router;
3289 this.service = service;
3290 this.GetCaptcha$ = this.actions$.pipe(effects.ofType(CaptchaActionTypes.GET_CAPTCHA), operators.map((/**
3291 * @param {?} action
3292 * @return {?}
3293 */
3294 function (action) { return action.payload; })), operators.map((/**
3295 * @param {?} data
3296 * @return {?}
3297 */
3298 function (data) { return new GetCaptchaStartAction(data); })));
3299 this.AddFormStart$ = this.actions$.pipe(effects.ofType(CaptchaActionTypes.GET_CAPTCHA_START), operators.map((/**
3300 * @param {?} action
3301 * @return {?}
3302 */
3303 function (action) { return action.payload; })), operators.switchMap((/**
3304 * @param {?} data
3305 * @return {?}
3306 */
3307 function (data) { return _this.service.getCaptcha(); })), operators.map((/**
3308 * @param {?} res
3309 * @return {?}
3310 */
3311 function (res) { return new GetCaptchaSucceedAction(); })), operators.catchError((/**
3312 * @return {?}
3313 */
3314 function () { return of.of(new GetCaptchaFailedAction()); })));
3315 }
3316 CaptchaEffects.decorators = [
3317 { type: core.Injectable }
3318 ];
3319 /** @nocollapse */
3320 CaptchaEffects.ctorParameters = function () { return [
3321 { type: effects.Actions },
3322 { type: router.Router },
3323 { type: FormCaptchaService }
3324 ]; };
3325 __decorate([
3326 effects.Effect(),
3327 __metadata("design:type", Object)
3328 ], CaptchaEffects.prototype, "GetCaptcha$", void 0);
3329 __decorate([
3330 effects.Effect(),
3331 __metadata("design:type", Object)
3332 ], CaptchaEffects.prototype, "AddFormStart$", void 0);
3333 return CaptchaEffects;
3334 }());
3335 if (false) {
3336 /** @type {?} */
3337 CaptchaEffects.prototype.GetCaptcha$;
3338 /** @type {?} */
3339 CaptchaEffects.prototype.AddFormStart$;
3340 /**
3341 * @type {?}
3342 * @private
3343 */
3344 CaptchaEffects.prototype.actions$;
3345 /**
3346 * @type {?}
3347 * @private
3348 */
3349 CaptchaEffects.prototype.router;
3350 /**
3351 * @type {?}
3352 * @private
3353 */
3354 CaptchaEffects.prototype.service;
3355 }
3356
3357 /**
3358 * @fileoverview added by tsickle
3359 * @suppress {checkTypes,constantProperty,extraRequire,missingOverride,missingReturn,unusedPrivateMembers,uselessCode} checked by tsc
3360 */
3361 var NgsFormModule = /** @class */ (function () {
3362 function NgsFormModule() {
3363 }
3364 /**
3365 * @param {?=} config
3366 * @return {?}
3367 */
3368 NgsFormModule.forRoot = /**
3369 * @param {?=} config
3370 * @return {?}
3371 */
3372 function (config) {
3373 return {
3374 ngModule: RootNgsFormModule,
3375 providers: [{ provide: MODULE_CONFIG_TOKEN, useValue: config }, FormConfigurationService]
3376 };
3377 };
3378 NgsFormModule.decorators = [
3379 { type: core.NgModule, args: [{
3380 imports: [
3381 http.HttpClientModule,
3382 forms.FormsModule,
3383 router.RouterModule,
3384 common.CommonModule,
3385 material.MatExpansionModule,
3386 material.MatSnackBarModule,
3387 material.MatIconModule,
3388 material.MatDatepickerModule,
3389 material.MatButtonModule,
3390 material.MatCardModule,
3391 material.MatCheckboxModule,
3392 material.MatTableModule,
3393 material.MatSelectModule,
3394 material.MatInputModule,
3395 material.MatFormFieldModule,
3396 material.MatTabsModule,
3397 material.MatDividerModule,
3398 flexLayout.FlexLayoutModule,
3399 material.MatRadioModule,
3400 material.MatSlideToggleModule,
3401 forms.ReactiveFormsModule
3402 ],
3403 declarations: [
3404 EditFormContainerComponent,
3405 EditFormComponent,
3406 FormListContainerComponent,
3407 FormListComponent,
3408 AddFormContainerComponent,
3409 MainContainerComponent,
3410 AddFormComponent,
3411 FormGroupComponent,
3412 FormArrayComponent,
3413 FormControlComponent,
3414 FormViewComponent,
3415 DynamicFieldDirective,
3416 SelectComponent,
3417 CheckboxComponent,
3418 EmailComponent,
3419 ColorComponent,
3420 DateFormInputControlComponent,
3421 FileFormInputControlComponent,
3422 TextComponent,
3423 NumberComponent,
3424 TableComponent,
3425 FormCaptchaComponent
3426 // NgsFormSelectorComponent
3427 ],
3428 entryComponents: [
3429 SelectComponent,
3430 CheckboxComponent,
3431 EmailComponent,
3432 ColorComponent,
3433 DateFormInputControlComponent,
3434 FileFormInputControlComponent,
3435 TextComponent,
3436 NumberComponent,
3437 TableComponent,
3438 FormCaptchaComponent
3439 ],
3440 exports: [FormViewComponent]
3441 // exports: [ FormViewComponent, NgsFormSelectorComponent ]
3442 },] }
3443 ];
3444 return NgsFormModule;
3445 }());
3446 var RootNgsFormModule = /** @class */ (function () {
3447 function RootNgsFormModule() {
3448 ((/** @type {?} */ (window))).___starter = ((/** @type {?} */ (window))).___starter || {};
3449 ((/** @type {?} */ (window))).___starter.form = "8.0.11";
3450 }
3451 RootNgsFormModule.decorators = [
3452 { type: core.NgModule, args: [{
3453 imports: [
3454 NgsFormModule,
3455 store.StoreModule.forFeature("form", FormReducers),
3456 effects.EffectsModule.forFeature([AddFormEffects, EditFormEffects, FormsListEffects, CaptchaEffects]),
3457 RoutingModule
3458 ],
3459 exports: [NgsFormModule]
3460 },] }
3461 ];
3462 /** @nocollapse */
3463 RootNgsFormModule.ctorParameters = function () { return []; };
3464 return RootNgsFormModule;
3465 }());
3466
3467 exports.DynamicFieldDirective = DynamicFieldDirective;
3468 exports.FormService = FormService;
3469 exports.FormViewComponent = FormViewComponent;
3470 exports.NgsFormModule = NgsFormModule;
3471 exports.RootNgsFormModule = RootNgsFormModule;
3472 exports.ɵa = MODULE_CONFIG_TOKEN;
3473 exports.ɵb = FormReducers;
3474 exports.ɵba = FormCaptchaComponent;
3475 exports.ɵbb = FormCaptchaService;
3476 exports.ɵbc = reducer;
3477 exports.ɵbd = AddFormEffects;
3478 exports.ɵbe = EditFormEffects;
3479 exports.ɵbf = FormsListEffects;
3480 exports.ɵbg = CaptchaEffects;
3481 exports.ɵbh = RoutingModule;
3482 exports.ɵd = FormConfigurationService;
3483 exports.ɵf = EditFormContainerComponent;
3484 exports.ɵg = AddFormContainerComponent;
3485 exports.ɵh = EditFormComponent;
3486 exports.ɵi = AddFormComponent;
3487 exports.ɵj = FormListContainerComponent;
3488 exports.ɵk = FormListComponent;
3489 exports.ɵl = AddFormContainerComponent;
3490 exports.ɵm = MainContainerComponent;
3491 exports.ɵn = AddFormComponent;
3492 exports.ɵo = FormGroupComponent;
3493 exports.ɵp = FormArrayComponent;
3494 exports.ɵq = FormControlComponent;
3495 exports.ɵr = SelectComponent;
3496 exports.ɵs = CheckboxComponent;
3497 exports.ɵt = EmailComponent;
3498 exports.ɵu = ColorComponent;
3499 exports.ɵv = DateFormInputControlComponent;
3500 exports.ɵw = FileFormInputControlComponent;
3501 exports.ɵx = TextComponent;
3502 exports.ɵy = NumberComponent;
3503 exports.ɵz = TableComponent;
3504
3505 Object.defineProperty(exports, '__esModule', { value: true });
3506
3507}));
3508//# sourceMappingURL=soushians-form.umd.js.map