monkey-front-core 0.0.294 → 0.0.296

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/esm2020/lib/core/interfaces/index.mjs +10 -9
  2. package/esm2020/lib/core/interfaces/monkeyecx-config.mjs +1 -1
  3. package/esm2020/lib/core/interfaces/monkeyecx-storage.mjs +2 -0
  4. package/esm2020/lib/core/services/config/monkeyecx-config.service.mjs +9 -10
  5. package/esm2020/lib/core/services/config/monkeyecx-gtm-config.service.mjs +51 -0
  6. package/esm2020/lib/store/actions/index.mjs +2 -0
  7. package/esm2020/lib/store/actions/monkeyecx-storage.actions.mjs +8 -0
  8. package/esm2020/lib/store/index.mjs +3 -0
  9. package/esm2020/lib/store/reducers/index.mjs +3 -0
  10. package/esm2020/lib/store/reducers/monkeyecx-seeder.reducer.mjs +18 -0
  11. package/esm2020/lib/store/reducers/monkeyecx-storage.reducer.mjs +40 -0
  12. package/esm2020/public-api.mjs +2 -1
  13. package/fesm2015/monkey-front-core.mjs +148 -62
  14. package/fesm2015/monkey-front-core.mjs.map +1 -1
  15. package/fesm2020/monkey-front-core.mjs +158 -62
  16. package/fesm2020/monkey-front-core.mjs.map +1 -1
  17. package/lib/core/interfaces/index.d.ts +9 -8
  18. package/lib/core/interfaces/monkeyecx-config.d.ts +2 -2
  19. package/lib/core/interfaces/monkeyecx-storage.d.ts +38 -0
  20. package/lib/core/services/config/monkeyecx-config.service.d.ts +10 -10
  21. package/lib/core/services/config/monkeyecx-gtm-config.service.d.ts +9 -0
  22. package/lib/store/actions/index.d.ts +1 -0
  23. package/lib/store/actions/monkeyecx-storage.actions.d.ts +23 -0
  24. package/lib/store/index.d.ts +2 -0
  25. package/lib/store/reducers/index.d.ts +2 -0
  26. package/lib/store/reducers/monkeyecx-seeder.reducer.d.ts +2 -0
  27. package/lib/store/reducers/monkeyecx-storage.reducer.d.ts +13 -0
  28. package/monkey-front-core-0.0.296.tgz +0 -0
  29. package/package.json +7 -3
  30. package/public-api.d.ts +1 -0
  31. package/esm2020/lib/core/services/config/monkeyecx-ga-config.service.mjs +0 -57
  32. package/lib/core/services/config/monkeyecx-ga-config.service.d.ts +0 -10
  33. package/monkey-front-core-0.0.294.tgz +0 -0
@@ -13,17 +13,19 @@ import { throwError, BehaviorSubject, Subscription, interval, concat, of, Subjec
13
13
  import * as i1$3 from '@angular/common/http';
14
14
  import { HttpParams, HttpErrorResponse, HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
15
15
  import * as i2$1 from '@angular/platform-browser';
16
- import * as i1$4 from '@angular/router';
16
+ import * as i2$2 from '@angular/router';
17
17
  import { NavigationStart, NavigationEnd, NavigationError, NavigationCancel } from '@angular/router';
18
18
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
19
19
  import { TemplatePortal } from '@angular/cdk/portal';
20
- import * as i1$5 from '@angular/cdk/overlay';
20
+ import * as i1$4 from '@angular/cdk/overlay';
21
21
  import { OverlayModule } from '@angular/cdk/overlay';
22
22
  import { __awaiter, __decorate } from 'tslib';
23
23
  import { datadogRum } from '@datadog/browser-rum';
24
- import * as i1$6 from '@angular/service-worker';
24
+ import * as i1$5 from '@angular/service-worker';
25
25
  import { ServiceWorkerModule } from '@angular/service-worker';
26
26
  import { initialize } from 'launchdarkly-js-client-sdk';
27
+ import { createAction, props, createReducer, on } from '@ngrx/store';
28
+ import { createEntityAdapter } from '@ngrx/entity';
27
29
 
28
30
  class AlertsComponent {
29
31
  constructor(modalService) {
@@ -1639,14 +1641,14 @@ class MonkeyEcxProgressBarService {
1639
1641
  return ((_a = this.visible) === null || _a === void 0 ? void 0 : _a.asObservable()) || null;
1640
1642
  }
1641
1643
  }
1642
- MonkeyEcxProgressBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxProgressBarService, deps: [{ token: i1$4.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1644
+ MonkeyEcxProgressBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxProgressBarService, deps: [{ token: i2$2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
1643
1645
  MonkeyEcxProgressBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxProgressBarService, providedIn: 'root' });
1644
1646
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxProgressBarService, decorators: [{
1645
1647
  type: Injectable,
1646
1648
  args: [{
1647
1649
  providedIn: 'root'
1648
1650
  }]
1649
- }], ctorParameters: function () { return [{ type: i1$4.Router }]; } });
1651
+ }], ctorParameters: function () { return [{ type: i2$2.Router }]; } });
1650
1652
 
1651
1653
  class MonkeyEcxProgressBarComponent {
1652
1654
  constructor(progressBarService) {
@@ -2407,7 +2409,7 @@ class MonkeyEcxPopoverDirective {
2407
2409
  this.eventsSubs.unsubscribe();
2408
2410
  }
2409
2411
  }
2410
- MonkeyEcxPopoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxPopoverDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i1$5.Overlay }, { token: i1$5.OverlayPositionBuilder }, { token: i1$4.Router }, { token: POPOVER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2412
+ MonkeyEcxPopoverDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxPopoverDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.NgZone }, { token: i0.ViewContainerRef }, { token: i0.ChangeDetectorRef }, { token: i1$4.Overlay }, { token: i1$4.OverlayPositionBuilder }, { token: i2$2.Router }, { token: POPOVER_OPTIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
2411
2413
  MonkeyEcxPopoverDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.1.1", type: MonkeyEcxPopoverDirective, selector: "[monkeyecxPopover]", inputs: { popover: ["monkeyecxPopover", "popover"], closed: ["monkeyecxPopoverClosed", "closed"], target: ["monkeyecxPopoverTarget", "target"], minwidth: ["monkeyecxPopoverMinwidth", "minwidth"], backdrop: ["monkeyecxPopoverBackdrop", "backdrop"], watch: ["monkeyecxPopoverWatch", "watch"], dir: ["monkeyecxPopoverDir", "dir"], contextmenu: ["monkeyecxPopoverContextmenu", "contextmenu"], height: ["monkeyecxPopoverHeight", "height"] }, ngImport: i0 });
2412
2414
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxPopoverDirective, decorators: [{
2413
2415
  type: Directive,
@@ -2415,7 +2417,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
2415
2417
  selector: '[monkeyecxPopover]'
2416
2418
  }]
2417
2419
  }], ctorParameters: function () {
2418
- return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }, { type: i1$5.Overlay }, { type: i1$5.OverlayPositionBuilder }, { type: i1$4.Router }, { type: undefined, decorators: [{
2420
+ return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i0.ElementRef }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: i0.ChangeDetectorRef }, { type: i1$4.Overlay }, { type: i1$4.OverlayPositionBuilder }, { type: i2$2.Router }, { type: undefined, decorators: [{
2419
2421
  type: Inject,
2420
2422
  args: [POPOVER_OPTIONS]
2421
2423
  }, {
@@ -3130,14 +3132,14 @@ class MonkeyEcxServiceWorkerConfigService {
3130
3132
  this.verify();
3131
3133
  }
3132
3134
  }
3133
- MonkeyEcxServiceWorkerConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxServiceWorkerConfigService, deps: [{ token: i0.ApplicationRef }, { token: i1$6.SwUpdate }, { token: i1.MonkeyStyleGuideModalService }], target: i0.ɵɵFactoryTarget.Injectable });
3135
+ MonkeyEcxServiceWorkerConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxServiceWorkerConfigService, deps: [{ token: i0.ApplicationRef }, { token: i1$5.SwUpdate }, { token: i1.MonkeyStyleGuideModalService }], target: i0.ɵɵFactoryTarget.Injectable });
3134
3136
  MonkeyEcxServiceWorkerConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxServiceWorkerConfigService, providedIn: 'root' });
3135
3137
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxServiceWorkerConfigService, decorators: [{
3136
3138
  type: Injectable,
3137
3139
  args: [{
3138
3140
  providedIn: 'root'
3139
3141
  }]
3140
- }], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i1$6.SwUpdate }, { type: i1.MonkeyStyleGuideModalService }]; } });
3142
+ }], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i1$5.SwUpdate }, { type: i1.MonkeyStyleGuideModalService }]; } });
3141
3143
 
3142
3144
  /* eslint-disable no-console */
3143
3145
  class MonkeyEcxSecurityConsoleConfigService extends MonkeyEcxCommonsService {
@@ -3200,14 +3202,14 @@ class MonkeyEcxMaintenanceConfigService {
3200
3202
  this.handleValidation(config);
3201
3203
  }
3202
3204
  }
3203
- MonkeyEcxMaintenanceConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxMaintenanceConfigService, deps: [{ token: i1.MonkeyStyleGuideModalService }, { token: i1$4.Router }], target: i0.ɵɵFactoryTarget.Injectable });
3205
+ MonkeyEcxMaintenanceConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxMaintenanceConfigService, deps: [{ token: i1.MonkeyStyleGuideModalService }, { token: i2$2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
3204
3206
  MonkeyEcxMaintenanceConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxMaintenanceConfigService, providedIn: 'root' });
3205
3207
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxMaintenanceConfigService, decorators: [{
3206
3208
  type: Injectable,
3207
3209
  args: [{
3208
3210
  providedIn: 'root'
3209
3211
  }]
3210
- }], ctorParameters: function () { return [{ type: i1.MonkeyStyleGuideModalService }, { type: i1$4.Router }]; } });
3212
+ }], ctorParameters: function () { return [{ type: i1.MonkeyStyleGuideModalService }, { type: i2$2.Router }]; } });
3211
3213
 
3212
3214
  class MonkeyEcxFeatureToggleService {
3213
3215
  constructor() {
@@ -3283,58 +3285,54 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
3283
3285
  }]
3284
3286
  }], ctorParameters: function () { return []; } });
3285
3287
 
3286
- /* eslint-disable prefer-rest-params */
3287
- class MonkeyEcxGAConfigService {
3288
- constructor(rt) {
3289
- this.rt = rt;
3288
+ /* eslint-disable no-console */
3289
+ class MonkeyEcxGTMConfigService {
3290
+ constructor() {
3290
3291
  // not to do
3291
3292
  }
3292
- apply(params, environment) {
3293
- const { ga } = params;
3294
- const { enabled, key } = ga || { enabled: false, key: '' };
3295
- if (enabled && environment.environment !== 'dev') {
3296
- const action = () => {
3297
- window.dataLayer = window.dataLayer || [];
3298
- window.gtag =
3299
- window.gtag ||
3300
- function gtag() {
3301
- window.dataLayer.push(arguments);
3302
- };
3303
- window.gtag('js', new Date());
3304
- window.gtag('config', key);
3305
- };
3306
- const pageChangeAction = () => {
3307
- this.rt.events.subscribe((event) => {
3308
- if (event instanceof NavigationEnd) {
3309
- window.gtag('set', 'page_path', event.url);
3310
- window.gtag('event', 'page_view');
3311
- }
3312
- });
3313
- };
3293
+ handleCode(key) {
3294
+ try {
3295
+ window.dataLayer = window.dataLayer || [];
3296
+ window.dataLayer.push({
3297
+ 'gtm.start': new Date().getTime(),
3298
+ event: 'gtm.js'
3299
+ });
3314
3300
  const head = document.querySelector('head');
3315
3301
  const script = document.createElement('script');
3316
3302
  script.async = true;
3317
- script.id = 'ga-settings';
3318
- script.src = `//www.googletagmanager.com/gtag/js?id=${key}`;
3319
- script.onload = () => {
3320
- action();
3321
- pageChangeAction();
3322
- };
3323
- script.onerror = () => {
3324
- head === null || head === void 0 ? void 0 : head.removeChild(script);
3325
- };
3303
+ script.src = `https://www.googletagmanager.com/gtm.js?id=GTM-${key}`;
3326
3304
  head === null || head === void 0 ? void 0 : head.appendChild(script);
3305
+ const body = document.querySelector('body');
3306
+ const noscript = document.createElement('noscript');
3307
+ const iframe = document.createElement('iframe');
3308
+ iframe.src = `https://www.googletagmanager.com/ns.html?id=GTM-${key}`;
3309
+ iframe.height = '0';
3310
+ iframe.width = '0';
3311
+ iframe.style.display = 'none';
3312
+ iframe.style.visibility = 'hidden';
3313
+ noscript.appendChild(iframe);
3314
+ body === null || body === void 0 ? void 0 : body.appendChild(noscript);
3315
+ }
3316
+ catch (e) {
3317
+ console.error('GTM Configuration Error!');
3318
+ }
3319
+ }
3320
+ apply(params, environment) {
3321
+ const { gtm } = params;
3322
+ const { enabled, key } = gtm || { enabled: false, key: '' };
3323
+ if (enabled && environment.environment !== 'dev') {
3324
+ this.handleCode(key);
3327
3325
  }
3328
3326
  }
3329
3327
  }
3330
- MonkeyEcxGAConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGAConfigService, deps: [{ token: i1$4.Router }], target: i0.ɵɵFactoryTarget.Injectable });
3331
- MonkeyEcxGAConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGAConfigService, providedIn: 'root' });
3332
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGAConfigService, decorators: [{
3328
+ MonkeyEcxGTMConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGTMConfigService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
3329
+ MonkeyEcxGTMConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGTMConfigService, providedIn: 'root' });
3330
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxGTMConfigService, decorators: [{
3333
3331
  type: Injectable,
3334
3332
  args: [{
3335
3333
  providedIn: 'root'
3336
3334
  }]
3337
- }], ctorParameters: function () { return [{ type: i1$4.Router }]; } });
3335
+ }], ctorParameters: function () { return []; } });
3338
3336
 
3339
3337
  const moment = moment_;
3340
3338
  class MonkeyEcxAlertsConfigService {
@@ -3372,7 +3370,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
3372
3370
  }], ctorParameters: function () { return [{ type: i1.MonkeyStyleGuideModalFixedService }]; } });
3373
3371
 
3374
3372
  class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
3375
- constructor(monkeyecxService, monkeyecxi18nConfigService, monkeyecxLogsConfigService, monkeyStyleGuideSettingsService, monkeyecxServiceWorkerConfigService, monkeyecxSecurityConsoleConfigService, monkeyecxMaintenanceConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyGAConfigService, monkeyEcxAlertsConfigService) {
3373
+ constructor(monkeyecxService, monkeyecxi18nConfigService, monkeyecxLogsConfigService, monkeyStyleGuideSettingsService, monkeyecxServiceWorkerConfigService, monkeyecxSecurityConsoleConfigService, monkeyecxMaintenanceConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyGTMConfigService, monkeyEcxAlertsConfigService) {
3376
3374
  super(monkeyecxService);
3377
3375
  this.monkeyecxi18nConfigService = monkeyecxi18nConfigService;
3378
3376
  this.monkeyecxLogsConfigService = monkeyecxLogsConfigService;
@@ -3382,7 +3380,7 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
3382
3380
  this.monkeyecxMaintenanceConfigService = monkeyecxMaintenanceConfigService;
3383
3381
  this.monkeyecxErrorConfigService = monkeyecxErrorConfigService;
3384
3382
  this.monkeyEcxFeatureToggleService = monkeyEcxFeatureToggleService;
3385
- this.monkeyGAConfigService = monkeyGAConfigService;
3383
+ this.monkeyGTMConfigService = monkeyGTMConfigService;
3386
3384
  this.monkeyEcxAlertsConfigService = monkeyEcxAlertsConfigService;
3387
3385
  this.configSubject$ = new BehaviorSubject({});
3388
3386
  this.configBootstrapSubject$ = new BehaviorSubject({});
@@ -3398,13 +3396,13 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
3398
3396
  }
3399
3397
  getWhiteLabelSettings(monkeyecxCode, configBootstrap, callback, environment, identifyCode) {
3400
3398
  var _a;
3401
- const { monkeyecxService, monkeyecxi18nConfigService, configSubject$, monkeyStyleGuideSettingsService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyGAConfigService, monkeyEcxAlertsConfigService, internalValidations } = this;
3399
+ const { monkeyecxService, monkeyecxi18nConfigService, configSubject$, monkeyStyleGuideSettingsService, monkeyecxLogsConfigService, monkeyecxErrorConfigService, monkeyEcxFeatureToggleService, monkeyGTMConfigService, monkeyEcxAlertsConfigService, internalValidations } = this;
3402
3400
  const url = `${environment.urlAssets}/${monkeyecxCode.toLowerCase()}`;
3403
3401
  (_a = monkeyecxService === null || monkeyecxService === void 0 ? void 0 : monkeyecxService.get(`${url}/white-label.json`)) === null || _a === void 0 ? void 0 : _a.subscribe((config) => {
3404
3402
  monkeyecxi18nConfigService.apply(config, environment);
3405
3403
  monkeyecxLogsConfigService.apply(config, configBootstrap, environment, identifyCode);
3406
3404
  monkeyEcxFeatureToggleService.apply(configSubject$, environment);
3407
- monkeyGAConfigService.apply(config, environment);
3405
+ monkeyGTMConfigService.apply(config, environment);
3408
3406
  monkeyEcxAlertsConfigService.apply(config);
3409
3407
  monkeyStyleGuideSettingsService.bootstrap(`${url}/monkey-style-guide-settings.json`, internalValidations.bind(this, configBootstrap, callback, environment));
3410
3408
  configSubject$.next(config);
@@ -3443,7 +3441,7 @@ class MonkeyEcxConfigService extends MonkeyEcxCommonsService {
3443
3441
  return this.configBootstrapSubject$.asObservable();
3444
3442
  }
3445
3443
  }
3446
- MonkeyEcxConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxConfigService, deps: [{ token: MonkeyEcxService }, { token: MonkeyEcxi18nConfigService }, { token: MonkeyEcxLogsConfigService }, { token: i1.MonkeyStyleGuideSettingsService }, { token: MonkeyEcxServiceWorkerConfigService }, { token: MonkeyEcxSecurityConsoleConfigService }, { token: MonkeyEcxMaintenanceConfigService }, { token: MonkeyEcxErrorConfigService }, { token: MonkeyEcxFeatureToggleService }, { token: MonkeyEcxGAConfigService }, { token: MonkeyEcxAlertsConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
3444
+ MonkeyEcxConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxConfigService, deps: [{ token: MonkeyEcxService }, { token: MonkeyEcxi18nConfigService }, { token: MonkeyEcxLogsConfigService }, { token: i1.MonkeyStyleGuideSettingsService }, { token: MonkeyEcxServiceWorkerConfigService }, { token: MonkeyEcxSecurityConsoleConfigService }, { token: MonkeyEcxMaintenanceConfigService }, { token: MonkeyEcxErrorConfigService }, { token: MonkeyEcxFeatureToggleService }, { token: MonkeyEcxGTMConfigService }, { token: MonkeyEcxAlertsConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
3447
3445
  MonkeyEcxConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxConfigService, providedIn: 'root' });
3448
3446
  __decorate([
3449
3447
  MonkeyEcxCoreService({
@@ -3460,7 +3458,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
3460
3458
  args: [{
3461
3459
  providedIn: 'root'
3462
3460
  }]
3463
- }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxi18nConfigService }, { type: MonkeyEcxLogsConfigService }, { type: i1.MonkeyStyleGuideSettingsService }, { type: MonkeyEcxServiceWorkerConfigService }, { type: MonkeyEcxSecurityConsoleConfigService }, { type: MonkeyEcxMaintenanceConfigService }, { type: MonkeyEcxErrorConfigService }, { type: MonkeyEcxFeatureToggleService }, { type: MonkeyEcxGAConfigService }, { type: MonkeyEcxAlertsConfigService }]; }, propDecorators: { init: [] } });
3461
+ }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxi18nConfigService }, { type: MonkeyEcxLogsConfigService }, { type: i1.MonkeyStyleGuideSettingsService }, { type: MonkeyEcxServiceWorkerConfigService }, { type: MonkeyEcxSecurityConsoleConfigService }, { type: MonkeyEcxMaintenanceConfigService }, { type: MonkeyEcxErrorConfigService }, { type: MonkeyEcxFeatureToggleService }, { type: MonkeyEcxGTMConfigService }, { type: MonkeyEcxAlertsConfigService }]; }, propDecorators: { init: [] } });
3464
3462
 
3465
3463
  class MonkeyEcxTokenStorageService {
3466
3464
  constructor(monkeyecxConfigService) {
@@ -4170,14 +4168,14 @@ class MonkeyEcxHttpErrorHandlingService extends MonkeyEcxCommonsService {
4170
4168
  }
4171
4169
  }
4172
4170
  }
4173
- MonkeyEcxHttpErrorHandlingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpErrorHandlingService, deps: [{ token: MonkeyEcxService }, { token: MonkeyEcxTokenStorageService }, { token: MonkeyEcxAuthenticationService }, { token: i1$4.Router }, { token: i1.MonkeyStyleGuideSnackbarService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
4171
+ MonkeyEcxHttpErrorHandlingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpErrorHandlingService, deps: [{ token: MonkeyEcxService }, { token: MonkeyEcxTokenStorageService }, { token: MonkeyEcxAuthenticationService }, { token: i2$2.Router }, { token: i1.MonkeyStyleGuideSnackbarService }, { token: i1$1.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
4174
4172
  MonkeyEcxHttpErrorHandlingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpErrorHandlingService, providedIn: 'root' });
4175
4173
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxHttpErrorHandlingService, decorators: [{
4176
4174
  type: Injectable,
4177
4175
  args: [{
4178
4176
  providedIn: 'root'
4179
4177
  }]
4180
- }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxTokenStorageService }, { type: MonkeyEcxAuthenticationService }, { type: i1$4.Router }, { type: i1.MonkeyStyleGuideSnackbarService }, { type: i1$1.TranslateService }]; } });
4178
+ }], ctorParameters: function () { return [{ type: MonkeyEcxService }, { type: MonkeyEcxTokenStorageService }, { type: MonkeyEcxAuthenticationService }, { type: i2$2.Router }, { type: i1.MonkeyStyleGuideSnackbarService }, { type: i1$1.TranslateService }]; } });
4181
4179
 
4182
4180
  class MonkeyEcxOthersErrorsHandlingService {
4183
4181
  constructor(modalService) {
@@ -4684,14 +4682,14 @@ class MonkeyEcxDiscoveryParamsService {
4684
4682
  return found;
4685
4683
  }
4686
4684
  }
4687
- MonkeyEcxDiscoveryParamsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxDiscoveryParamsService, deps: [{ token: i1$4.Router }], target: i0.ɵɵFactoryTarget.Injectable });
4685
+ MonkeyEcxDiscoveryParamsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxDiscoveryParamsService, deps: [{ token: i2$2.Router }], target: i0.ɵɵFactoryTarget.Injectable });
4688
4686
  MonkeyEcxDiscoveryParamsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxDiscoveryParamsService, providedIn: 'root' });
4689
4687
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyEcxDiscoveryParamsService, decorators: [{
4690
4688
  type: Injectable,
4691
4689
  args: [{
4692
4690
  providedIn: 'root'
4693
4691
  }]
4694
- }], ctorParameters: function () { return [{ type: i1$4.Router }]; } });
4692
+ }], ctorParameters: function () { return [{ type: i2$2.Router }]; } });
4695
4693
 
4696
4694
  class MonkeyEcxRequestScheduleService {
4697
4695
  constructor(monkeyecxService, monkeyLoggedHandlingService) {
@@ -5324,7 +5322,7 @@ class MonkeyFrontCoreModule {
5324
5322
  }
5325
5323
  MonkeyFrontCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyFrontCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5326
5324
  MonkeyFrontCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.1.1", ngImport: i0, type: MonkeyFrontCoreModule, imports: [CommonModule,
5327
- HttpClientModule, i1$1.TranslateModule, MonkeyEcxConfigModule, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxErrorHandlingModule, MonkeyStyleGuideModule, i1$6.ServiceWorkerModule, ClosedToMaintenanceModule,
5325
+ HttpClientModule, i1$1.TranslateModule, MonkeyEcxConfigModule, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxErrorHandlingModule, MonkeyStyleGuideModule, i1$5.ServiceWorkerModule, ClosedToMaintenanceModule,
5328
5326
  VersionChangedModule,
5329
5327
  AlertsModule,
5330
5328
  CurrencyConfigModule] });
@@ -5371,6 +5369,94 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
5371
5369
  }]
5372
5370
  }] });
5373
5371
 
5372
+ const clear = createAction('[MECX Core Storage] Clear All');
5373
+ const create = createAction('[MECX Core Storage] Create', props());
5374
+ const updateControl = createAction('[MECX Core Storage] Update Control', props());
5375
+ const updateOne = createAction('[MECX Core Storage] Update One', props());
5376
+ const deleteOne = createAction('[MECX Core Storage] Delete One', props());
5377
+
5378
+ var monkeyecxStorage_actions = /*#__PURE__*/Object.freeze({
5379
+ __proto__: null,
5380
+ clear: clear,
5381
+ create: create,
5382
+ updateControl: updateControl,
5383
+ updateOne: updateOne,
5384
+ deleteOne: deleteOne
5385
+ });
5386
+
5387
+ var index$1 = /*#__PURE__*/Object.freeze({
5388
+ __proto__: null,
5389
+ monkeyecxStorage: monkeyecxStorage_actions
5390
+ });
5391
+
5392
+ const hydrationMetaReducer = (reducer) => {
5393
+ return (state, action) => {
5394
+ /* if (action.type === INIT || action.type === UPDATE) {
5395
+ const storageValue = localStorage.getItem('state');
5396
+ if (storageValue) {
5397
+ try {
5398
+ return JSON.parse(storageValue);
5399
+ } catch {
5400
+ localStorage.removeItem('state');
5401
+ }
5402
+ }
5403
+ } */
5404
+ const nextState = reducer(state, action);
5405
+ localStorage.setItem('state', JSON.stringify(nextState));
5406
+ return nextState;
5407
+ };
5408
+ };
5409
+
5410
+ var monkeyecxSeeder_reducer = /*#__PURE__*/Object.freeze({
5411
+ __proto__: null,
5412
+ hydrationMetaReducer: hydrationMetaReducer
5413
+ });
5414
+
5415
+ const featureKey = 'mecx-core-storage';
5416
+ const adapter = createEntityAdapter({
5417
+ selectId: (item) => {
5418
+ return item.username;
5419
+ }
5420
+ });
5421
+ const initialState = adapter.getInitialState({
5422
+ control: {
5423
+ isLoading: false
5424
+ },
5425
+ error: null
5426
+ });
5427
+ const reducer = createReducer(initialState, on(clear, (state) => {
5428
+ return adapter.removeAll(state);
5429
+ }), on(create, (state, action) => {
5430
+ return adapter.upsertMany(action.data, Object.assign({}, state));
5431
+ }), on(updateControl, (state, action) => {
5432
+ return Object.assign(Object.assign({}, state), { control: Object.assign(Object.assign({}, state.control), action.data) });
5433
+ }), on(updateOne, (state, action) => {
5434
+ const { username } = action.data;
5435
+ return adapter.upsertOne(Object.assign(Object.assign({}, action.data), { username }), Object.assign({}, state));
5436
+ }), on(deleteOne, (state, action) => {
5437
+ const { username } = action.data;
5438
+ return adapter.removeOne(username, state);
5439
+ }));
5440
+ const { selectAll, selectEntities, selectIds, selectTotal } = adapter.getSelectors();
5441
+
5442
+ var monkeyecxStorage_reducer = /*#__PURE__*/Object.freeze({
5443
+ __proto__: null,
5444
+ featureKey: featureKey,
5445
+ adapter: adapter,
5446
+ initialState: initialState,
5447
+ reducer: reducer,
5448
+ selectAll: selectAll,
5449
+ selectEntities: selectEntities,
5450
+ selectIds: selectIds,
5451
+ selectTotal: selectTotal
5452
+ });
5453
+
5454
+ var index = /*#__PURE__*/Object.freeze({
5455
+ __proto__: null,
5456
+ fromMonkeyecxSeeder: monkeyecxSeeder_reducer,
5457
+ fromMonkeyecxStorage: monkeyecxStorage_reducer
5458
+ });
5459
+
5374
5460
  /*
5375
5461
  * Public API Surface of monkey-front-core
5376
5462
  */
@@ -5379,5 +5465,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.1.1", ngImpor
5379
5465
  * Generated bundle index. Do not edit.
5380
5466
  */
5381
5467
 
5382
- export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
5468
+ export { AlertsComponent, AlertsModule, ClosedToMaintenanceComponent, ClosedToMaintenanceModule, CurrencyConfigComponent, CurrencyConfigModule, decoratorsUtils as DecoratorsUtils, Link, MonkeyEcxAlertsService, MonkeyEcxAuthGuard, MonkeyEcxAuthGuardCompany, MonkeyEcxAuthGuardLogin, MonkeyEcxAuthenticationService, MonkeyEcxBlobSecurePipe, MonkeyEcxCommonsService, MonkeyEcxConfigModule, MonkeyEcxConfigService, MonkeyEcxCookieStorageService, MonkeyEcxCoreCharts, MonkeyEcxCoreClearDecorators, MonkeyEcxCoreLog, MonkeyEcxCoreService, MonkeyEcxCoreServiceConstructor, MonkeyEcxCoreServicePaged, MonkeyEcxCoreServiceQueue, MonkeyEcxCurrencyConfigService, MonkeyEcxDirectivesModule, MonkeyEcxDiscoveryParamsService, MonkeyEcxDisplayFirstNamePipe, MonkeyEcxDisplayInitialsPipe, MonkeyEcxDragDropDirective, MonkeyEcxErrorConfigService, MonkeyEcxErrorHandlingModule, MonkeyEcxErrorHandlingService, MonkeyEcxFeatureByProgramDirective, MonkeyEcxFeatureDirective, MonkeyEcxFeatureToggleService, MonkeyEcxFormatAddressPipe, MonkeyEcxFormatBeaufityJSONPipe, MonkeyEcxFormatCurrency, MonkeyEcxFormatCurrencyPipe, MonkeyEcxFormatDateGroupPipe, MonkeyEcxFormatDateTimelapsePipe, MonkeyEcxFormatDateUnixTimelapsePipe, MonkeyEcxFormatDocumentPipe, MonkeyEcxFormatDocumentTypePipe, MonkeyEcxFormatNumberPipe, MonkeyEcxFormatPhonePipe, MonkeyEcxFormatSizePipe, MonkeyEcxFormatTaxPipe, MonkeyEcxFormatUpper, MonkeyEcxFormatValue, MonkeyEcxFormatZipCodePipe, MonkeyEcxHandlingService, MonkeyEcxHttpConfigErrorInterceptor, MonkeyEcxHttpConfigHeaderInterceptor, MonkeyEcxHttpConfigInterceptorModule, MonkeyEcxHttpConfigLoadingInProgressInterceptor, MonkeyEcxHttpConfigQueueInterceptor, MonkeyEcxHttpErrorHandlingService, MonkeyEcxLoggedHandlingService, MonkeyEcxLogsConfigService, MonkeyEcxMaintenanceConfigService, MonkeyEcxModel, MonkeyEcxOnlyAlphaNumericDirective, MonkeyEcxOnlyNumbersDirective, MonkeyEcxOthersErrorsHandlingService, MonkeyEcxPaginationService, MonkeyEcxPipesModule, MonkeyEcxPopoverDirective, MonkeyEcxPopoverOptionsDirective, MonkeyEcxProgressBarComponent, MonkeyEcxProgressBarModule, MonkeyEcxProgressBarService, MonkeyEcxRequestDownloadHandlingService, MonkeyEcxRequestDownloadedHandlingService, MonkeyEcxRequestPagedHandling, MonkeyEcxRequestQueueHandlingService, MonkeyEcxRequestQueueModalHandlingService, MonkeyEcxRequestScheduleService, MonkeyEcxSecurityConsoleConfigService, MonkeyEcxSecurityDirective, MonkeyEcxService, MonkeyEcxServiceDownload, MonkeyEcxServiceUpload, MonkeyEcxServiceWorkerConfigService, MonkeyEcxSpecificationSearch, MonkeyEcxTextTruncatePipe, MonkeyEcxTokenStorageService, MonkeyEcxTooltipDirective, MonkeyEcxTruncateQtdPipe, MonkeyEcxUtils, MonkeyEcxi18nConfigService, MonkeyFrontCoreModule, OpSearch, POPOVER_OPTIONS, statics as Statics, validateUtils as ValidateUtils, Validators, VersionChangedComponent, VersionChangedModule, index$1 as actions, comboValidator, dateRangeValidator, dateStartEndValidator, dateValidator, documentValidator, emailValidator, passwordConfirmValidator, index as reducers, registerValidator, trueValidator, urlValidator, valueGreaterThanZero, zipCodeValidator };
5383
5469
  //# sourceMappingURL=monkey-front-core.mjs.map