UNPKG

55.1 kBJavaScriptView Raw
1import { Observable } from 'rxjs';
2import { BehaviorSubject } from 'rxjs/BehaviorSubject';
3import { CommonModule } from '@angular/common';
4import { HttpClient, HttpClientModule } from '@angular/common/http';
5import { FlexLayoutModule } from '@angular/flex-layout';
6import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
7import { MatIconModule, MatButtonModule, MatCardModule, MatSnackBarModule, MatSidenavModule, MatExpansionModule, MatSelectModule, MatFormFieldModule, MatListModule, MatMenuModule, MatRadioModule, MatInputModule, MatToolbarModule, MatDatepickerModule, MatProgressBarModule, MatSlideToggleModule } from '@angular/material';
8import { FormGroup, FormControl, Validators, FormArray, FormBuilder, FormsModule, ReactiveFormsModule } from '@angular/forms';
9import { createSelector, createFeatureSelector, Store, StoreModule } from '@ngrx/store';
10import { __decorate, __metadata, __assign } from 'tslib';
11import { InjectionToken, Injectable, Inject, Component, Output, EventEmitter, Input, Injector, ViewChild, ComponentFactoryResolver, ViewContainerRef, ReflectiveInjector, NgModule, defineInjectable, inject } from '@angular/core';
12import { Actions, Effect, EffectsModule } from '@ngrx/effects';
13import { of } from 'rxjs/observable/of';
14import { take, map, catchError, filter, switchMap } from 'rxjs/operators';
15import { ActivatedRoute, RouterModule } from '@angular/router';
16
17/**
18 * @fileoverview added by tsickle
19 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
20 */
21/**
22 * @template T
23 */
24var /**
25 * @template T
26 */
27ConfigModel = /** @class */ (function () {
28 function ConfigModel() {
29 }
30 return ConfigModel;
31}());
32
33/**
34 * @fileoverview added by tsickle
35 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
36 */
37var GetConfigsApiModel;
38(function (GetConfigsApiModel) {
39 var Request = /** @class */ (function () {
40 function Request(initValue) {
41 if (initValue === void 0) { initValue = /** @type {?} */ ({}); }
42 var _this = this;
43 Object.keys(initValue).forEach(function (key) { return ((/** @type {?} */ (_this))[key] = (/** @type {?} */ (initValue))[key]); });
44 }
45 /**
46 * @return {?}
47 */
48 Request.prototype.getRequestBody = /**
49 * @return {?}
50 */
51 function () {
52 return {};
53 };
54 return Request;
55 }());
56 GetConfigsApiModel.Request = Request;
57 var Response = /** @class */ (function () {
58 function Response() {
59 }
60 return Response;
61 }());
62 GetConfigsApiModel.Response = Response;
63})(GetConfigsApiModel || (GetConfigsApiModel = {}));
64
65/**
66 * @fileoverview added by tsickle
67 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
68 */
69var EditConfigApiModel;
70(function (EditConfigApiModel) {
71 var Request = /** @class */ (function () {
72 function Request(initValue) {
73 if (initValue === void 0) { initValue = /** @type {?} */ ({}); }
74 var _this = this;
75 Object.keys(initValue).forEach(function (key) { return ((/** @type {?} */ (_this))[key] = (/** @type {?} */ (initValue))[key]); });
76 }
77 /**
78 * @return {?}
79 */
80 Request.prototype.getRequestBody = /**
81 * @return {?}
82 */
83 function () {
84 return {
85 Name: this.Name,
86 Config: this.Config
87 };
88 };
89 Object.defineProperty(Request, "formGroup", {
90 get: /**
91 * @return {?}
92 */
93 function () {
94 return new FormGroup({
95 Name: new FormControl("", [Validators.required]),
96 Config: new FormGroup({})
97 });
98 },
99 enumerable: true,
100 configurable: true
101 });
102 return Request;
103 }());
104 EditConfigApiModel.Request = Request;
105 var Response = /** @class */ (function () {
106 function Response() {
107 }
108 return Response;
109 }());
110 EditConfigApiModel.Response = Response;
111})(EditConfigApiModel || (EditConfigApiModel = {}));
112
113/**
114 * @fileoverview added by tsickle
115 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
116 */
117
118/**
119 * @fileoverview added by tsickle
120 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
121 */
122/** @type {?} */
123var MODULE_DEFAULT_CONFIG = {
124 env: {
125 production: false,
126 frontend_server: "config/module/front_end/did/not/set"
127 }
128};
129/** @type {?} */
130var MODULE_CONFIG_TOKEN = new InjectionToken("UserModuleConfig");
131
132/**
133 * @fileoverview added by tsickle
134 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
135 */
136/** @enum {string} */
137var ConfigActionTypes = {
138 GET_CONFIGS: "[CONFIG] get config",
139 CONFIG_LOADED_SUCCEED: "[CONFIG] load config succeed",
140 UPDATE_CONFIG: "[CONFIG] update config",
141 CONFIG_LOADED_FAILED: "[CONFIG] load config failed",
142};
143var GetConfigAction = /** @class */ (function () {
144 function GetConfigAction() {
145 this.type = ConfigActionTypes.GET_CONFIGS;
146 }
147 return GetConfigAction;
148}());
149var ConfigLoadedSucceedAction = /** @class */ (function () {
150 function ConfigLoadedSucceedAction(payload) {
151 this.payload = payload;
152 this.type = ConfigActionTypes.CONFIG_LOADED_SUCCEED;
153 }
154 return ConfigLoadedSucceedAction;
155}());
156var ConfigLoadedFailedAction = /** @class */ (function () {
157 function ConfigLoadedFailedAction() {
158 this.type = ConfigActionTypes.CONFIG_LOADED_FAILED;
159 }
160 return ConfigLoadedFailedAction;
161}());
162
163/**
164 * @fileoverview added by tsickle
165 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
166 */
167var ɵ0 = [];
168/** @type {?} */
169var initialState = {
170 data: ɵ0
171};
172/**
173 * @param {?=} state
174 * @param {?=} action
175 * @return {?}
176 */
177function Reducer(state, action) {
178 if (state === void 0) { state = initialState; }
179 switch (action.type) {
180 case ConfigActionTypes.CONFIG_LOADED_SUCCEED:
181 return __assign({}, state, { data: action.payload });
182 case ConfigActionTypes.UPDATE_CONFIG:
183 return __assign({}, state, { data: state.data.map(function (config) {
184 if (config._id == action.payload._id)
185 config.Config = action.payload.Config;
186 return config;
187 }) });
188 default:
189 return state;
190 }
191}
192/** @type {?} */
193var getConfigs = function (state) { return state.data; };
194/** @type {?} */
195var getAppConfig = function (state) { return state.data.find(function (config) { return config.Name == "app_config"; }); };
196/** @type {?} */
197var getAuthenticationModuleConfig = function (state) {
198 return state.data.find(function (config) { return config.Name == "authentication_module_config"; });
199};
200/** @type {?} */
201var getUserModuleConfig = function (state) { return state.data.find(function (config) { return config.Name == "user_module_config"; }); };
202/** @type {?} */
203var getConfigModuleConfig = function (state) { return (state.data.find(function (config) { return config.Name == "config_module_config"; })); };
204/** @type {?} */
205var getFormModuleConfig = function (state) { return (state.data.find(function (config) { return config.Name == "form_module_config"; })); };
206/** @type {?} */
207var getSocketModuleConfig = function (state) { return (state.data.find(function (config) { return config.Name == "socket_module_config"; })); };
208
209/**
210 * @fileoverview added by tsickle
211 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
212 */
213/** @type {?} */
214var ConfigReducers = {
215 list: Reducer
216};
217/** @type {?} */
218var selectConfigState = createFeatureSelector("config");
219/** @type {?} */
220var getConfigListState = createSelector(selectConfigState, function (state) { return state.list; });
221/** @type {?} */
222var getConfigs$1 = createSelector(getConfigListState, getConfigs);
223/** @type {?} */
224var getAppConfig$1 = createSelector(getConfigListState, getAppConfig);
225/** @type {?} */
226var getAuthenticationModuleConfig$1 = createSelector(getConfigListState, getAuthenticationModuleConfig);
227/** @type {?} */
228var getUserModuleConfig$1 = createSelector(getConfigListState, getUserModuleConfig);
229/** @type {?} */
230var getConfigModuleConfig$1 = createSelector(getConfigListState, getConfigModuleConfig);
231/** @type {?} */
232var getFormModuleConfig$1 = createSelector(getConfigListState, getFormModuleConfig);
233/** @type {?} */
234var getSocketModuleConfig$1 = createSelector(getConfigListState, getSocketModuleConfig);
235
236/**
237 * @fileoverview added by tsickle
238 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
239 */
240
241/**
242 * @fileoverview added by tsickle
243 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
244 */
245var ConfigurationService = /** @class */ (function () {
246 function ConfigurationService(configFile, store) {
247 var _this = this;
248 this.store = store;
249 this.config$ = new BehaviorSubject(this._config);
250 this._config = Object.assign({}, MODULE_DEFAULT_CONFIG, configFile);
251 this.config$.next(this._config);
252 this.store.select(getConfigModuleConfig$1).subscribe(function (configConfig) {
253 if (!configConfig)
254 return;
255 _this._config = Object.assign({}, _this._config, configConfig.Config);
256 _this.config$.next(_this._config);
257 });
258 }
259 Object.defineProperty(ConfigurationService.prototype, "config", {
260 get: /**
261 * @return {?}
262 */
263 function () {
264 return this._config;
265 },
266 enumerable: true,
267 configurable: true
268 });
269 ConfigurationService.decorators = [
270 { type: Injectable, args: [{
271 providedIn: "root"
272 },] }
273 ];
274 /** @nocollapse */
275 ConfigurationService.ctorParameters = function () { return [
276 { type: undefined, decorators: [{ type: Inject, args: [MODULE_CONFIG_TOKEN,] }] },
277 { type: Store }
278 ]; };
279 /** @nocollapse */ ConfigurationService.ngInjectableDef = defineInjectable({ factory: function ConfigurationService_Factory() { return new ConfigurationService(inject(MODULE_CONFIG_TOKEN), inject(Store)); }, token: ConfigurationService, providedIn: "root" });
280 return ConfigurationService;
281}());
282
283/**
284 * @fileoverview added by tsickle
285 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
286 */
287var ConfigService = /** @class */ (function () {
288 function ConfigService(http, store, configurationService) {
289 var _this = this;
290 this.http = http;
291 this.store = store;
292 this.configurationService = configurationService;
293 setTimeout(function () {
294 _this.store.dispatch(new GetConfigAction());
295 }, 999);
296 }
297 /**
298 * @return {?}
299 */
300 ConfigService.prototype.getConfigs = /**
301 * @return {?}
302 */
303 function () {
304 return this.http
305 .get(this.configurationService.config.env.frontend_server + "/api/config")
306 .pipe(take(1), map(function (response) { return response.Result; }), catchError(function (err) { return Observable.throw(err); }));
307 };
308 /**
309 * @param {?} name
310 * @return {?}
311 */
312 ConfigService.prototype.getConfigByName = /**
313 * @param {?} name
314 * @return {?}
315 */
316 function (name) {
317 return this.http.get(this.configurationService.config.env.frontend_server + "/api/config/" + name).pipe(map(function (response) { return response; }), catchError(function (err) {
318 return Observable.throw(err);
319 }));
320 };
321 /**
322 * @param {?} body
323 * @return {?}
324 */
325 ConfigService.prototype.editConfig = /**
326 * @param {?} body
327 * @return {?}
328 */
329 function (body) {
330 /** @type {?} */
331 var model = new EditConfigApiModel.Request(body);
332 return this.http
333 .put(this.configurationService.config.env.frontend_server + "/api/config/" + model.Name, model.getRequestBody())
334 .pipe(map(function (response) { return response; }), catchError(function (err) {
335 return Observable.throw(err);
336 }));
337 };
338 /**
339 * @return {?}
340 */
341 ConfigService.prototype.getLayoutConfigs = /**
342 * @return {?}
343 */
344 function () {
345 return this.http.get(this.configurationService.config.env.frontend_server + "/api/layout-config").pipe(map(function (response) { return response; }), catchError(function (err) {
346 return Observable.throw(err);
347 }));
348 };
349 ConfigService.decorators = [
350 { type: Injectable, args: [{
351 providedIn: "root"
352 },] }
353 ];
354 /** @nocollapse */
355 ConfigService.ctorParameters = function () { return [
356 { type: HttpClient },
357 { type: Store },
358 { type: ConfigurationService }
359 ]; };
360 /** @nocollapse */ ConfigService.ngInjectableDef = defineInjectable({ factory: function ConfigService_Factory() { return new ConfigService(inject(HttpClient), inject(Store), inject(ConfigurationService)); }, token: ConfigService, providedIn: "root" });
361 return ConfigService;
362}());
363
364/**
365 * @fileoverview added by tsickle
366 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
367 */
368var ConfigsComponent = /** @class */ (function () {
369 function ConfigsComponent(store) {
370 this.store = store;
371 this.configs = this.store.select(getConfigs$1);
372 }
373 ConfigsComponent.decorators = [
374 { type: Component, args: [{
375 selector: "configs",
376 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>settings_input_component</mat-icon>\r\n <span>\u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u0633\u0627\u0645\u0627\u0646\u0647 \u0648 \u0645\u0627\u0698\u0648\u0644 \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=\"18\" fxFlex.lg=\"23.5\" fxFlex.md=\"31\" fxFlex.sm=\"48\" fxFlex.xs=\"100\" class='link'\r\n mat-raised-button [routerLink]=\"['edit' , config.Name]\" *ngFor=\"let config of (configs | async)\">\r\n <div fxLayout='column' fxLayoutAlign='center center'>\r\n <mat-icon color='primary'>settings</mat-icon>\r\n <h3 class='title'>{{config.Name}}</h3>\r\n </div>\r\n </button>\r\n\r\n </div>\r\n\r\n </mat-card>\r\n </div>\r\n</div>",
377 styles: [":host{width:100%}.config-box{margin:15px}button.link{padding:25px 15px;margin:.5%;box-sizing:border-box}button mat-icon{font-size:34px;width:34px;height:34px}"]
378 }] }
379 ];
380 /** @nocollapse */
381 ConfigsComponent.ctorParameters = function () { return [
382 { type: Store }
383 ]; };
384 return ConfigsComponent;
385}());
386
387/**
388 * @fileoverview added by tsickle
389 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
390 */
391var AuthenticationModuleConfigComponent = /** @class */ (function () {
392 function AuthenticationModuleConfigComponent(injector) {
393 this.injector = injector;
394 this.formGroup = new FormGroup({
395 endpoints: new FormGroup({
396 signIn: new FormControl("", [Validators.required]),
397 signOut: new FormControl("", [Validators.required]),
398 whoAmI: new FormControl("", [Validators.required]),
399 captchaUrl: new FormControl("", [Validators.required])
400 }),
401 forms: new FormGroup({
402 signIn: new FormControl("", [Validators.required])
403 })
404 });
405 this.configChanged = new EventEmitter();
406 this.configFormGroup = this.injector.get("configFormGroup");
407 }
408 Object.defineProperty(AuthenticationModuleConfigComponent.prototype, "configFormGroup", {
409 set: /**
410 * @param {?} configFormGroup
411 * @return {?}
412 */
413 function (configFormGroup) {
414 var _this = this;
415 this.formGroup.patchValue(configFormGroup.value);
416 configFormGroup.valueChanges.subscribe(function (data) {
417 _this.formGroup.patchValue(data);
418 });
419 },
420 enumerable: true,
421 configurable: true
422 });
423 /**
424 * @param {?} formId
425 * @param {?} formName
426 * @return {?}
427 */
428 AuthenticationModuleConfigComponent.prototype.setFormId = /**
429 * @param {?} formId
430 * @param {?} formName
431 * @return {?}
432 */
433 function (formId, formName) {
434 var _a;
435 this.formGroup.patchValue((_a = {}, _a[formName] = formId, _a));
436 };
437 AuthenticationModuleConfigComponent.decorators = [
438 { type: Component, args: [{
439 selector: "config-authentication-module-config",
440 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>settings_input_component</mat-icon>\r\n <span>\u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u0645\u0627\u0698\u0648\u0644 \u0627\u062D\u0631\u0627\u0632 \u0647\u0648\u06CC\u062A</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>\r\n\r\n <h2>Endpoints</h2>\r\n <div [formGroup]=\"formGroup.controls.endpoints\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"sign in\"\r\n formControlName=\"signIn\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"sign out\"\r\n formControlName=\"signOut\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"who am i\"\r\n formControlName=\"whoAmI\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"captcha url\"\r\n formControlName=\"captchaUrl\">\r\n </mat-form-field>\r\n </div>\r\n <h2>Forms</h2>\r\n <div [formGroup]=\"formGroup.controls.forms\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"SignIn Forms\"\r\n formControlName=\"signIn\">\r\n </mat-form-field>\r\n <!-- <ngs-form-selector (select)=\"setFormId($event,'signIn')\"></ngs-form-selector> -->\r\n </div>\r\n </div>\r\n </mat-card>\r\n </div>\r\n</div>"
441 }] }
442 ];
443 /** @nocollapse */
444 AuthenticationModuleConfigComponent.ctorParameters = function () { return [
445 { type: Injector }
446 ]; };
447 AuthenticationModuleConfigComponent.propDecorators = {
448 configFormGroup: [{ type: Input }],
449 configChanged: [{ type: Output }]
450 };
451 return AuthenticationModuleConfigComponent;
452}());
453
454/**
455 * @fileoverview added by tsickle
456 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
457 */
458var ConfigAppConfigComponent = /** @class */ (function () {
459 function ConfigAppConfigComponent(injector) {
460 this.injector = injector;
461 this.formGroup = new FormGroup({ AppTitle: new FormControl("", [Validators.required]) });
462 this.configChanged = new EventEmitter();
463 this.configFormGroup = this.injector.get("configFormGroup");
464 }
465 Object.defineProperty(ConfigAppConfigComponent.prototype, "configFormGroup", {
466 set: /**
467 * @param {?} configFormGroup
468 * @return {?}
469 */
470 function (configFormGroup) {
471 var _this = this;
472 this.formGroup.patchValue(configFormGroup.value);
473 configFormGroup.valueChanges.subscribe(function (data) {
474 _this.formGroup.patchValue(data);
475 });
476 },
477 enumerable: true,
478 configurable: true
479 });
480 ConfigAppConfigComponent.decorators = [
481 { type: Component, args: [{
482 selector: "config-app-config",
483 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>settings_input_component</mat-icon>\r\n <span>\u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u0633\u0627\u0645\u0627\u0646\u0647</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 <div [formGroup]=\"formGroup\">\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"\u0646\u0627\u0645 \u067E\u0631\u0648\u0698\u0647\"\r\n formControlName=\"AppTitle\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n\r\n </mat-card>\r\n </div>\r\n</div>"
484 }] }
485 ];
486 /** @nocollapse */
487 ConfigAppConfigComponent.ctorParameters = function () { return [
488 { type: Injector }
489 ]; };
490 ConfigAppConfigComponent.propDecorators = {
491 configFormGroup: [{ type: Input }],
492 configChanged: [{ type: Output }]
493 };
494 return ConfigAppConfigComponent;
495}());
496
497/**
498 * @fileoverview added by tsickle
499 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
500 */
501var UserModuleConfigComponent = /** @class */ (function () {
502 function UserModuleConfigComponent(injector) {
503 this.injector = injector;
504 this.formGroup = new FormGroup({
505 endpoints: new FormGroup({
506 changePassword: new FormControl("", [Validators.required]),
507 editProfile: new FormControl("", [Validators.required]),
508 getUserInfo: new FormControl("", [Validators.required]),
509 whoAmI: new FormControl("", [Validators.required])
510 }),
511 forms: new FormGroup({
512 profile_edit: new FormControl("", [Validators.required])
513 }),
514 dashboardLinks: new FormArray([])
515 });
516 this.configChanged = new EventEmitter();
517 this.configFormGroup = this.injector.get("configFormGroup");
518 }
519 Object.defineProperty(UserModuleConfigComponent.prototype, "configFormGroup", {
520 get: /**
521 * @return {?}
522 */
523 function () {
524 return this._configFormGroup;
525 },
526 set: /**
527 * @param {?} configFormGroup
528 * @return {?}
529 */
530 function (configFormGroup) {
531 var _this = this;
532 this._configFormGroup = configFormGroup;
533 (/** @type {?} */ (configFormGroup.controls["dashboardLinks"])).controls.forEach(function (control) {
534 (/** @type {?} */ (_this.formGroup.controls["dashboardLinks"])).push(new FormGroup({
535 route: new FormControl("", [Validators.required]),
536 icon: new FormControl("", [Validators.required]),
537 title: new FormControl("", [Validators.required])
538 }));
539 });
540 this.formGroup.patchValue(configFormGroup.value);
541 configFormGroup.valueChanges.subscribe(function (data) {
542 _this.formGroup.patchValue(data);
543 });
544 },
545 enumerable: true,
546 configurable: true
547 });
548 /**
549 * @return {?}
550 */
551 UserModuleConfigComponent.prototype.addMenu = /**
552 * @return {?}
553 */
554 function () {
555 /** @type {?} */
556 var menuItem = new FormGroup({
557 route: new FormControl("", [Validators.required]),
558 icon: new FormControl("", [Validators.required]),
559 title: new FormControl("", [Validators.required])
560 });
561 (/** @type {?} */ (this.formGroup.get("dashboardLinks"))).push(menuItem);
562 (/** @type {?} */ (this.configFormGroup.get("dashboardLinks"))).push(menuItem);
563 };
564 UserModuleConfigComponent.decorators = [
565 { type: Component, args: [{
566 selector: "config-user-module-config",
567 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=\"\" class=\"with-sticky-action\">\r\n <h2>Endpoints</h2>\r\n <div [formGroup]=\"formGroup.get('endpoints')\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"change password\"\r\n formControlName=\"changePassword\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"edit profile\"\r\n formControlName=\"editProfile\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"get user info\"\r\n formControlName=\"getUserInfo\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"Who Am I\"\r\n formControlName=\"whoAmI\">\r\n </mat-form-field>\r\n </div>\r\n <h2>Forms</h2>\r\n <div [formGroup]=\"formGroup.get('forms')\" fxLayout=\"column\">\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"profile edit\"\r\n formControlName=\"profile_edit\">\r\n </mat-form-field>\r\n <!-- <ngs-form-selector (select)=\"setFormId($event,'signIn')\"></ngs-form-selector> -->\r\n </div>\r\n\r\n\r\n <h2 fxFlex=\"100\">\r\n Dashobard Links\r\n <button mat-icon-button color=\"primary\" (click)=\"addMenu()\">\r\n <mat-icon aria-label=\"icon-button icon\">add</mat-icon>\r\n </button>\r\n </h2>\r\n <div fxFlex=\"100\" *ngFor=\"let item of $any(formGroup.get('dashboardLinks')).controls\">\r\n <div [formGroup]=\"item\">\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"route\"\r\n formControlName=\"route\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"icon\"\r\n formControlName=\"icon\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" (change)=\"configChanged.emit(formGroup.value)\" matInput placeholder=\"title\"\r\n formControlName=\"title\">\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </mat-card>\r\n </div>\r\n</div>"
568 }] }
569 ];
570 /** @nocollapse */
571 UserModuleConfigComponent.ctorParameters = function () { return [
572 { type: Injector }
573 ]; };
574 UserModuleConfigComponent.propDecorators = {
575 configFormGroup: [{ type: Input }],
576 configChanged: [{ type: Output }]
577 };
578 return UserModuleConfigComponent;
579}());
580
581/**
582 * @fileoverview added by tsickle
583 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
584 */
585var LayoutModuleConfigComponent = /** @class */ (function () {
586 function LayoutModuleConfigComponent(injector, store) {
587 this.injector = injector;
588 this.store = store;
589 this.configChanged = new EventEmitter();
590 this.formGroup = new FormGroup({
591 layoutMode: new FormControl("", [Validators.required]),
592 showLeftNavBar: new FormControl("", [Validators.required]),
593 mainSideNavMode: new FormControl("", [Validators.required]),
594 showMainSidenav: new FormControl("", [Validators.required]),
595 stickyLeftNavBar: new FormControl("", [Validators.required]),
596 showSecondSideNav: new FormControl("", [Validators.required]),
597 secondSideNavMode: new FormControl("", [Validators.required]),
598 menuItems: new FormArray([])
599 });
600 this.sideNavModes = ["over", "push", "side"];
601 this.layoutModes = ["with-margin", "without-margin", "default"];
602 this.configFormGroup = this.injector.get("configFormGroup");
603 this.roleItems$ = this.store
604 .select(getAppConfig$1)
605 .pipe(filter(function (config) { return config != null; }), map(function (appconfig) { return appconfig.Config.Roles; }));
606 // this.configChanged.
607 // this.formGroup.valueChanges.subscribe(value => {
608 // debugger;
609 // this.configChanged.emit(value);
610 // });
611 }
612 Object.defineProperty(LayoutModuleConfigComponent.prototype, "configFormGroup", {
613 get: /**
614 * @return {?}
615 */
616 function () {
617 return this._configFormGroup;
618 },
619 set: /**
620 * @param {?} configFormGroup
621 * @return {?}
622 */
623 function (configFormGroup) {
624 var _this = this;
625 this._configFormGroup = configFormGroup;
626 (/** @type {?} */ (configFormGroup.controls["menuItems"])).controls.forEach(function (control) {
627 (/** @type {?} */ (_this.formGroup.controls["menuItems"])).push(new FormGroup({
628 route: new FormControl("", [Validators.required]),
629 icon: new FormControl("", [Validators.required]),
630 // roles: new FormArray(control.value.roles.map((i) => new FormControl("Admin"))),
631 roles: new FormControl(),
632 title: new FormControl("", [Validators.required])
633 }));
634 });
635 this.formGroup.patchValue(configFormGroup.value);
636 configFormGroup.valueChanges.subscribe(function (data) { return _this.formGroup.patchValue(data); });
637 },
638 enumerable: true,
639 configurable: true
640 });
641 /**
642 * @return {?}
643 */
644 LayoutModuleConfigComponent.prototype.addMenu = /**
645 * @return {?}
646 */
647 function () {
648 /** @type {?} */
649 var menuItem = new FormGroup({
650 route: new FormControl("", [Validators.required]),
651 icon: new FormControl("", [Validators.required]),
652 roles: new FormControl(),
653 title: new FormControl("", [Validators.required])
654 });
655 (/** @type {?} */ (this.formGroup.get("menuItems"))).push(menuItem);
656 (/** @type {?} */ (this.configFormGroup.get("menuItems"))).push(menuItem);
657 };
658 /**
659 * @param {?} item
660 * @return {?}
661 */
662 LayoutModuleConfigComponent.prototype.removeMenu = /**
663 * @param {?} item
664 * @return {?}
665 */
666 function (item) {
667 debugger;
668 /** @type {?} */
669 var index = (/** @type {?} */ (this.formGroup.get("menuItems"))).controls.indexOf(item);
670 (/** @type {?} */ (this.formGroup.get("menuItems"))).removeAt(index);
671 };
672 LayoutModuleConfigComponent.decorators = [
673 { type: Component, args: [{
674 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>settings_input_component</mat-icon>\r\n <span>\u062A\u0646\u0638\u06CC\u0645\u0627\u062A \u0645\u0627\u0698\u0648\u0644 Layout</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 <div fxLayout=\"row wrap\" fxLayoutAlign=\"center\" fxLayoutGap=\"25px\">\r\n <mat-card fxFlex=\"20\" fxFlexLayout=\"row\">\r\n <div [formGroup]=\"formGroup\">\r\n <mat-form-field>\r\n <mat-select placeholder=\"layout mode\" formControlName=\"layoutMode\">\r\n <mat-option *ngFor=\"let item of layoutModes\" [value]=\"item\">{{item}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <mat-slide-toggle formControlName=\"showLeftNavBar\">show left navbar</mat-slide-toggle>\r\n <mat-form-field>\r\n <mat-select placeholder=\"main side nav mode\" formControlName=\"mainSideNavMode\">\r\n <mat-option *ngFor=\"let item of sideNavModes\" [value]=\"item\">{{item}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n <mat-slide-toggle formControlName=\"showMainSidenav\">show main side nav</mat-slide-toggle>\r\n <mat-slide-toggle formControlName=\"stickyLeftNavBar\">sticky left navbar</mat-slide-toggle>\r\n <mat-slide-toggle formControlName=\"showSecondSideNav\">show second side nav</mat-slide-toggle>\r\n <mat-form-field>\r\n <mat-select placeholder=\"second side nav mode\" formControlName=\"secondSideNavMode\">\r\n <mat-option *ngFor=\"let item of sideNavModes\" [value]=\"item\">{{item}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </mat-card>\r\n\r\n <mat-card fxFlex fxLayout=\"column\">\r\n <h2 fxFlex>\r\n Menu Items\r\n <button mat-icon-button color=\"primary\" (click)=\"addMenu()\">\r\n <mat-icon aria-label=\"icon-button icon\">add</mat-icon>\r\n </button>\r\n </h2>\r\n <div fxFlex=\"nogrow\" *ngFor=\"let item of $any(formGroup).get('menuItems').controls\">\r\n <div [formGroup]=\"item\" fxLayout=\"row\" fxLayoutGap=\"25px\">\r\n <button mat-icon-button (click)=\"removeMenu(item)\">\r\n <mat-icon>delete</mat-icon>\r\n </button>\r\n <mat-form-field>\r\n <input type=\"text\" matInput placeholder=\"route\" formControlName=\"route\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" matInput placeholder=\"icon\" formControlName=\"icon\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <input type=\"text\" matInput placeholder=\"title\" formControlName=\"title\">\r\n </mat-form-field>\r\n <mat-form-field>\r\n <mat-select placeholder=\"roles\" formControlName=\"roles\" multiple>\r\n <mat-option *ngFor=\"let role of roleItems$ | async\" [value]=\"role\">{{role}}</mat-option>\r\n </mat-select>\r\n </mat-form-field>\r\n </div>\r\n </div>\r\n </mat-card>\r\n </div>\r\n </mat-card>\r\n </div>\r\n</div>"
675 }] }
676 ];
677 /** @nocollapse */
678 LayoutModuleConfigComponent.ctorParameters = function () { return [
679 { type: Injector },
680 { type: Store }
681 ]; };
682 LayoutModuleConfigComponent.propDecorators = {
683 configChanged: [{ type: Output, args: ["configChanged",] }],
684 configFormGroup: [{ type: Input }]
685 };
686 return LayoutModuleConfigComponent;
687}());
688
689/**
690 * @fileoverview added by tsickle
691 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
692 */
693var DynamicConfigComponentSelectorComponent = /** @class */ (function () {
694 function DynamicConfigComponentSelectorComponent(resolver) {
695 this.resolver = resolver;
696 this.typeMapToDiagram = {
697 authentication_module_config: AuthenticationModuleConfigComponent,
698 app_config: ConfigAppConfigComponent,
699 user_module_config: UserModuleConfigComponent,
700 layout_config: LayoutModuleConfigComponent
701 };
702 this.configChanged = new EventEmitter();
703 this.currentComponent = null;
704 }
705 Object.defineProperty(DynamicConfigComponentSelectorComponent.prototype, "config", {
706 get: /**
707 * @return {?}
708 */
709 function () {
710 if (!this.currentComponent)
711 return {};
712 return this.currentComponent.instance.formGroup.value;
713 },
714 enumerable: true,
715 configurable: true
716 });
717 Object.defineProperty(DynamicConfigComponentSelectorComponent.prototype, "data", {
718 set: /**
719 * @param {?} data
720 * @return {?}
721 */
722 function (data) {
723 if (!data || Object.keys(data).length == 0)
724 return;
725 if (!(data.type in this.typeMapToDiagram)) {
726 if (this.currentComponent)
727 this.currentComponent.destroy();
728 return;
729 }
730 /** @type {?} */
731 var _component = this.typeMapToDiagram[data.type];
732 /** @type {?} */
733 var inputProviders = Object.keys(data.inputs).map(function (inputName) {
734 return { provide: inputName, useValue: (/** @type {?} */ (data.inputs))[inputName] };
735 });
736 /** @type {?} */
737 var resolvedInputs = ReflectiveInjector.resolve(inputProviders);
738 /** @type {?} */
739 var injector = ReflectiveInjector.fromResolvedProviders(resolvedInputs, this.dynamicComponentContainer.parentInjector);
740 /** @type {?} */
741 var factory = this.resolver.resolveComponentFactory(_component);
742 /** @type {?} */
743 var component = factory.create(injector);
744 // (<any>component.instance).configChanged.add.subscribe((data: any) => {
745 // this.configChanged.emit(data);
746 // });
747 this.dynamicComponentContainer.insert(component.hostView);
748 if (this.currentComponent) {
749 this.currentComponent.destroy();
750 }
751 this.currentComponent = component;
752 },
753 enumerable: true,
754 configurable: true
755 });
756 /**
757 * @return {?}
758 */
759 DynamicConfigComponentSelectorComponent.prototype.ngAfterViewInit = /**
760 * @return {?}
761 */
762 function () { };
763 DynamicConfigComponentSelectorComponent.decorators = [
764 { type: Component, args: [{
765 selector: "dynamic-config-component-selector",
766 template: "<div #dynamicComponentContainer></div>",
767 entryComponents: [
768 AuthenticationModuleConfigComponent,
769 ConfigAppConfigComponent,
770 UserModuleConfigComponent,
771 LayoutModuleConfigComponent
772 ],
773 styles: [":host{width:100%}.diagram-box{margin:15px}.diagram-box .c3{direction:ltr}"]
774 }] }
775 ];
776 /** @nocollapse */
777 DynamicConfigComponentSelectorComponent.ctorParameters = function () { return [
778 { type: ComponentFactoryResolver }
779 ]; };
780 DynamicConfigComponentSelectorComponent.propDecorators = {
781 dynamicComponentContainer: [{ type: ViewChild, args: ["dynamicComponentContainer", { read: ViewContainerRef },] }],
782 configChanged: [{ type: Output }],
783 data: [{ type: Input }]
784 };
785 return DynamicConfigComponentSelectorComponent;
786}());
787
788/**
789 * @fileoverview added by tsickle
790 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
791 */
792
793/**
794 * @fileoverview added by tsickle
795 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
796 */
797var ConfigEditComponent = /** @class */ (function () {
798 function ConfigEditComponent(configService, formBuilder, route) {
799 var _this = this;
800 this.configService = configService;
801 this.formBuilder = formBuilder;
802 this.route = route;
803 this.formGroup = EditConfigApiModel.Request.formGroup;
804 this.route.params.subscribe(function (params) {
805 /** @type {?} */
806 var configName = params["name"];
807 _this.configService.getConfigByName(configName).subscribe(function (data) {
808 debugger;
809 _this.partialConfigModel = {
810 type: data.Result.Name,
811 inputs: {
812 configFormGroup: /** @type {?} */ (_this.formGroup.controls["Config"])
813 }
814 };
815 _this.formGroup.patchValue({
816 _id: data.Result._id,
817 Name: data.Result.Name
818 });
819 Object.keys(data.Result.Config).forEach(function (key) {
820 _this.addControl(/** @type {?} */ (_this.formGroup.controls["Config"]), key, data.Result.Config[key]);
821 });
822 });
823 });
824 }
825 /**
826 * @param {?} formGroup
827 * @param {?} key
828 * @param {?} value
829 * @return {?}
830 */
831 ConfigEditComponent.prototype.addControl = /**
832 * @param {?} formGroup
833 * @param {?} key
834 * @param {?} value
835 * @return {?}
836 */
837 function (formGroup, key, value) {
838 if (value instanceof Array) {
839 formGroup.addControl(key, this.formBuilder.array(value));
840 }
841 else if (value instanceof Object) {
842 formGroup.addControl(key, this.formBuilder.group(value));
843 }
844 else {
845 formGroup.addControl(key, new FormControl(value));
846 }
847 };
848 /**
849 * @return {?}
850 */
851 ConfigEditComponent.prototype.ngOnInit = /**
852 * @return {?}
853 */
854 function () { };
855 /**
856 * @param {?} event
857 * @return {?}
858 */
859 ConfigEditComponent.prototype.configChanged = /**
860 * @param {?} event
861 * @return {?}
862 */
863 function (event) {
864 console.log("-");
865 };
866 /**
867 * @return {?}
868 */
869 ConfigEditComponent.prototype.edit = /**
870 * @return {?}
871 */
872 function () {
873 this.formGroup.controls["Config"].patchValue(this.dynConfig.config);
874 if (!this.formGroup.valid)
875 return;
876 this.configService.editConfig(this.formGroup.value).subscribe(function (config) { });
877 };
878 ConfigEditComponent.decorators = [
879 { type: Component, args: [{
880 selector: "config-config-edit",
881 template: "<form [formGroup]=\"formGroup\" (ngSubmit)=\"edit()\" fxLayout=\"column\">\r\n <dynamic-config-component-selector #dynConfig (configChanged)=\"configChanged($event)\" [data]=\"partialConfigModel\"></dynamic-config-component-selector>\r\n <button mat-fab type=\"submit\" mat-raised-button color=\"primary\" (click)=\"edit\">\r\n <mat-icon>done</mat-icon>\r\n </button>\r\n <!-- <button type=\"button\" routerLink=\"/configs\" mat-raised-button>\u0628\u0627\u0632\u06AF\u0634\u062A</button> -->\r\n</form>",
882 styles: [""]
883 }] }
884 ];
885 /** @nocollapse */
886 ConfigEditComponent.ctorParameters = function () { return [
887 { type: ConfigService },
888 { type: FormBuilder },
889 { type: ActivatedRoute }
890 ]; };
891 ConfigEditComponent.propDecorators = {
892 dynConfig: [{ type: ViewChild, args: ["dynConfig",] }]
893 };
894 return ConfigEditComponent;
895}());
896
897/**
898 * @fileoverview added by tsickle
899 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
900 */
901var ConfigModuleContainerComponent = /** @class */ (function () {
902 function ConfigModuleContainerComponent() {
903 }
904 /**
905 * @return {?}
906 */
907 ConfigModuleContainerComponent.prototype.ngOnInit = /**
908 * @return {?}
909 */
910 function () { };
911 ConfigModuleContainerComponent.decorators = [
912 { type: Component, args: [{
913 selector: "config-module-container",
914 template: "<div fxLayoutAlign=\"\" fxflex=\"100\" fxLayout=\"column\">\r\n <router-outlet></router-outlet>\r\n</div>\r\n"
915 }] }
916 ];
917 /** @nocollapse */
918 ConfigModuleContainerComponent.ctorParameters = function () { return []; };
919 return ConfigModuleContainerComponent;
920}());
921
922/**
923 * @fileoverview added by tsickle
924 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
925 */
926var LoadConfigEffects = /** @class */ (function () {
927 function LoadConfigEffects(actions$, configService) {
928 var _this = this;
929 this.actions$ = actions$;
930 this.configService = configService;
931 this.getConfigs$ = this.actions$
932 .ofType(ConfigActionTypes.GET_CONFIGS)
933 .pipe(map(function (action) { return action.payload; }), switchMap(function (data) { return _this.configService.getConfigs(); }), map(function (configs) { return new ConfigLoadedSucceedAction(configs); }), catchError(function () { return of(new ConfigLoadedFailedAction()); }));
934 }
935 LoadConfigEffects.decorators = [
936 { type: Injectable }
937 ];
938 /** @nocollapse */
939 LoadConfigEffects.ctorParameters = function () { return [
940 { type: Actions },
941 { type: ConfigService }
942 ]; };
943 __decorate([
944 Effect(),
945 __metadata("design:type", Object)
946 ], LoadConfigEffects.prototype, "getConfigs$", void 0);
947 return LoadConfigEffects;
948}());
949
950/**
951 * @fileoverview added by tsickle
952 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
953 */
954/** @type {?} */
955var routes = [
956 {
957 path: "configs",
958 component: ConfigModuleContainerComponent,
959 children: [
960 {
961 path: "",
962 component: ConfigsComponent
963 },
964 {
965 path: "edit/:name",
966 component: ConfigEditComponent
967 }
968 ]
969 }
970];
971/** @type {?} */
972var RoutingModule = RouterModule.forChild(routes);
973
974/**
975 * @fileoverview added by tsickle
976 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
977 */
978var NgsConfigModule = /** @class */ (function () {
979 function NgsConfigModule() {
980 }
981 /**
982 * @param {?} config
983 * @return {?}
984 */
985 NgsConfigModule.forRoot = /**
986 * @param {?} config
987 * @return {?}
988 */
989 function (config) {
990 return {
991 ngModule: RootNgsConfigModule,
992 providers: [{ provide: MODULE_CONFIG_TOKEN, useValue: config }]
993 };
994 };
995 NgsConfigModule.decorators = [
996 { type: NgModule, args: [{
997 imports: [
998 CommonModule,
999 RouterModule,
1000 FormsModule,
1001 ReactiveFormsModule,
1002 HttpClientModule,
1003 FlexLayoutModule,
1004 MatIconModule,
1005 MatButtonModule,
1006 MatCardModule,
1007 MatSnackBarModule,
1008 MatSidenavModule,
1009 MatExpansionModule,
1010 MatSelectModule,
1011 MatFormFieldModule,
1012 MatListModule,
1013 MatMenuModule,
1014 MatRadioModule,
1015 MatInputModule,
1016 MatSlideToggleModule,
1017 MatToolbarModule,
1018 MatDatepickerModule,
1019 MatProgressBarModule,
1020 BrowserAnimationsModule
1021 ],
1022 declarations: [
1023 ConfigsComponent,
1024 ConfigEditComponent,
1025 ConfigAppConfigComponent,
1026 UserModuleConfigComponent,
1027 LayoutModuleConfigComponent,
1028 ConfigModuleContainerComponent,
1029 AuthenticationModuleConfigComponent,
1030 DynamicConfigComponentSelectorComponent
1031 ],
1032 providers: []
1033 },] }
1034 ];
1035 return NgsConfigModule;
1036}());
1037var RootNgsConfigModule = /** @class */ (function () {
1038 function RootNgsConfigModule() {
1039 }
1040 RootNgsConfigModule.decorators = [
1041 { type: NgModule, args: [{
1042 imports: [
1043 NgsConfigModule,
1044 StoreModule.forFeature("config", ConfigReducers),
1045 EffectsModule.forFeature([LoadConfigEffects]),
1046 RoutingModule
1047 ],
1048 exports: [NgsConfigModule]
1049 },] }
1050 ];
1051 return RootNgsConfigModule;
1052}());
1053
1054/**
1055 * @fileoverview added by tsickle
1056 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1057 */
1058
1059/**
1060 * @fileoverview added by tsickle
1061 * @suppress {checkTypes,extraRequire,uselessCode} checked by tsc
1062 */
1063
1064export { ConfigService, ConfigModel, GetConfigsApiModel, EditConfigApiModel, MODULE_DEFAULT_CONFIG, MODULE_CONFIG_TOKEN, ConfigReducers, selectConfigState, getConfigListState, getConfigs$1 as getConfigs, getAppConfig$1 as getAppConfig, getAuthenticationModuleConfig$1 as getAuthenticationModuleConfig, getUserModuleConfig$1 as getUserModuleConfig, getConfigModuleConfig$1 as getConfigModuleConfig, getFormModuleConfig$1 as getFormModuleConfig, getSocketModuleConfig$1 as getSocketModuleConfig, NgsConfigModule, RootNgsConfigModule, RoutingModule as ɵu, ConfigAppConfigComponent as ɵn, AuthenticationModuleConfigComponent as ɵr, LayoutModuleConfigComponent as ɵp, UserModuleConfigComponent as ɵo, LoadConfigEffects as ɵt, Reducer as ɵa, getAppConfig as ɵc, getAuthenticationModuleConfig as ɵd, getConfigModuleConfig as ɵf, getConfigs as ɵb, getFormModuleConfig as ɵg, getSocketModuleConfig as ɵh, getUserModuleConfig as ɵe, ConfigurationService as ɵk, ConfigEditComponent as ɵm, ConfigModuleContainerComponent as ɵq, ConfigsComponent as ɵl, DynamicConfigComponentSelectorComponent as ɵs };
1065
1066//# sourceMappingURL=soushians-config.js.map
\No newline at end of file