@eui/tools 6.21.124 → 6.21.126
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.
- package/.version.properties +1 -1
- package/CHANGELOG.md +18 -0
- package/package.json +1 -1
- package/scripts/csdr/init/resources/17.x/yarn.lock +18166 -0
- package/scripts/csdr/init/resources/18.x/resolutions.json +2 -1
- package/scripts/csdr/init/resources/18.x/{yarn.lock.old → yarn.lock} +5086 -4702
- package/scripts/csdr/init/resources/19.x/yarn.lock +15686 -0
- package/scripts/csdr/install/common.js +1 -1
- package/scripts/csdr/init/remotes/10.x/base/angular.json +0 -89
- package/scripts/csdr/init/remotes/10.x/base/browserslist +0 -6
- package/scripts/csdr/init/remotes/10.x/base/package.json_TO_REPLACE +0 -14
- package/scripts/csdr/init/remotes/10.x/base/tsconfig.app.json +0 -20
- package/scripts/csdr/init/remotes/10.x/full/common/app/eui-components.ts +0 -11
- package/scripts/csdr/init/remotes/10.x/full/common/app/fallback.component.ts +0 -11
- package/scripts/csdr/init/remotes/10.x/full/common/app/module.component.ts +0 -98
- package/scripts/csdr/init/remotes/10.x/full/common/app/module.ts +0 -97
- package/scripts/csdr/init/remotes/10.x/full/common/app/reducers/custom-route-serializer.ts +0 -28
- package/scripts/csdr/init/remotes/10.x/full/common/app/reducers/index.ts +0 -51
- package/scripts/csdr/init/remotes/10.x/full/common/app/routing.module.ts +0 -34
- package/scripts/csdr/init/remotes/10.x/full/common/assets/.gitkeep +0 -0
- package/scripts/csdr/init/remotes/10.x/full/common/config/global.ts +0 -115
- package/scripts/csdr/init/remotes/10.x/full/common/config/index.ts +0 -10
- package/scripts/csdr/init/remotes/10.x/full/common/config/modules.ts +0 -3
- package/scripts/csdr/init/remotes/10.x/full/common/environments/environment.prod.ts +0 -3
- package/scripts/csdr/init/remotes/10.x/full/common/environments/environment.ts +0 -3
- package/scripts/csdr/init/remotes/10.x/full/common/favicon.ico +0 -0
- package/scripts/csdr/init/remotes/10.x/full/common/index.html +0 -10
- package/scripts/csdr/init/remotes/10.x/full/common/main.ts +0 -11
- package/scripts/csdr/init/remotes/10.x/full/common/polyfills.ts +0 -87
- package/scripts/csdr/init/remotes/10.x/full/common/test.ts +0 -20
- package/scripts/csdr/init/remotes/10.x/full/options/all-locales/config/global.ts +0 -119
- package/scripts/csdr/init/remotes/10.x/full/options/definitions/dynatrace.json +0 -4
- package/scripts/csdr/init/remotes/10.x/full/options/definitions/participant.json +0 -3
- package/scripts/csdr/init/remotes/10.x/full/options/definitions/user-reducers.json +0 -3
- package/scripts/csdr/init/remotes/10.x/full/options/definitions/zipkin.json +0 -5
- package/scripts/csdr/init/remotes/10.x/full/options/participant/app/module.component.ts +0 -101
- package/scripts/csdr/init/remotes/10.x/full/options/participant/app/routing.module.ts +0 -26
- package/scripts/csdr/init/remotes/10.x/full/options/participant/config/index.ts +0 -10
- package/scripts/csdr/init/remotes/10.x/full/options/user-reducers/app/reducers/index.ts +0 -75
- package/scripts/csdr/init/remotes/15.x/base/angular.json +0 -87
- package/scripts/csdr/init/remotes/15.x/base/browserslist +0 -6
- package/scripts/csdr/init/remotes/15.x/base/package.json_TO_REPLACE +0 -10
- package/scripts/csdr/init/remotes/15.x/base/tsconfig.app.json +0 -24
- package/scripts/csdr/init/remotes/15.x/base/yarn.lock.old +0 -14091
- package/scripts/csdr/init/remotes/15.x/full/common/app/eui-components.ts +0 -9
- package/scripts/csdr/init/remotes/15.x/full/common/app/fallback.component.ts +0 -11
- package/scripts/csdr/init/remotes/15.x/full/common/app/module.component.ts +0 -98
- package/scripts/csdr/init/remotes/15.x/full/common/app/module.ts +0 -100
- package/scripts/csdr/init/remotes/15.x/full/common/app/reducers/custom-route-serializer.ts +0 -28
- package/scripts/csdr/init/remotes/15.x/full/common/app/reducers/index.ts +0 -51
- package/scripts/csdr/init/remotes/15.x/full/common/app/routing.module.ts +0 -34
- package/scripts/csdr/init/remotes/15.x/full/common/assets/.gitkeep +0 -0
- package/scripts/csdr/init/remotes/15.x/full/common/config/global.ts +0 -118
- package/scripts/csdr/init/remotes/15.x/full/common/config/index.ts +0 -10
- package/scripts/csdr/init/remotes/15.x/full/common/config/modules.ts +0 -3
- package/scripts/csdr/init/remotes/15.x/full/common/environments/environment.prod.ts +0 -3
- package/scripts/csdr/init/remotes/15.x/full/common/environments/environment.ts +0 -3
- package/scripts/csdr/init/remotes/15.x/full/common/favicon.ico +0 -0
- package/scripts/csdr/init/remotes/15.x/full/common/index.html +0 -10
- package/scripts/csdr/init/remotes/15.x/full/common/main.ts +0 -11
- package/scripts/csdr/init/remotes/15.x/full/common/polyfills.ts +0 -88
- package/scripts/csdr/init/remotes/15.x/full/common/test.ts +0 -20
- package/scripts/csdr/init/remotes/15.x/full/options/ag-grid/main.ts +0 -17
- package/scripts/csdr/init/remotes/15.x/full/options/all-locales/config/global.ts +0 -122
- package/scripts/csdr/init/remotes/15.x/full/options/definitions/dynamic-forms.json +0 -4
- package/scripts/csdr/init/remotes/15.x/full/options/definitions/dynatrace.json +0 -4
- package/scripts/csdr/init/remotes/15.x/full/options/definitions/participant.json +0 -3
- package/scripts/csdr/init/remotes/15.x/full/options/definitions/user-reducers.json +0 -3
- package/scripts/csdr/init/remotes/15.x/full/options/definitions/zipkin.json +0 -5
- package/scripts/csdr/init/remotes/15.x/full/options/participant/app/module.component.ts +0 -101
- package/scripts/csdr/init/remotes/15.x/full/options/participant/app/routing.module.ts +0 -26
- package/scripts/csdr/init/remotes/15.x/full/options/participant/config/index.ts +0 -10
- package/scripts/csdr/init/remotes/15.x/full/options/user-reducers/app/reducers/index.ts +0 -75
- package/scripts/csdr/init/resources/15.x/browserslistrc +0 -6
- package/scripts/csdr/init/resources/15.x/resolutions.json +0 -11
- package/scripts/csdr/init/resources/15.x/yarn.lock.old +0 -14091
- package/scripts/csdr/init/resources/17.x/yarn.lock.old +0 -13395
- package/scripts/csdr/init/resources/nodejs-10.x/resolutions.json +0 -17
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
import { registerLocaleData } from '@angular/common';
|
|
2
|
-
import { GlobalConfig, I18nConfig, LocaleServiceConfig } from '@eui/core';
|
|
3
|
-
|
|
4
|
-
import localeBg from '@angular/common/locales/bg';
|
|
5
|
-
import localeBgExtra from '@angular/common/locales/extra/bg';
|
|
6
|
-
import localeEs from '@angular/common/locales/es';
|
|
7
|
-
import localeEsExtra from '@angular/common/locales/extra/es';
|
|
8
|
-
import localeCs from '@angular/common/locales/cs';
|
|
9
|
-
import localeCsExtra from '@angular/common/locales/extra/cs';
|
|
10
|
-
import localeDa from '@angular/common/locales/da';
|
|
11
|
-
import localeDaExtra from '@angular/common/locales/extra/da';
|
|
12
|
-
import localeDe from '@angular/common/locales/de';
|
|
13
|
-
import localeDeExtra from '@angular/common/locales/extra/de';
|
|
14
|
-
import localeEt from '@angular/common/locales/et';
|
|
15
|
-
import localeEtExtra from '@angular/common/locales/extra/et';
|
|
16
|
-
import localeEl from '@angular/common/locales/el';
|
|
17
|
-
import localeElExtra from '@angular/common/locales/extra/el';
|
|
18
|
-
import localeEn from '@angular/common/locales/en';
|
|
19
|
-
import localeEnExtra from '@angular/common/locales/extra/en';
|
|
20
|
-
import localeFr from '@angular/common/locales/fr';
|
|
21
|
-
import localeFrExtra from '@angular/common/locales/extra/fr';
|
|
22
|
-
import localeGa from '@angular/common/locales/ga';
|
|
23
|
-
import localeGaExtra from '@angular/common/locales/extra/ga';
|
|
24
|
-
import localeHr from '@angular/common/locales/hr';
|
|
25
|
-
import localeHrExtra from '@angular/common/locales/extra/hr';
|
|
26
|
-
import localeIt from '@angular/common/locales/it';
|
|
27
|
-
import localeItExtra from '@angular/common/locales/extra/it';
|
|
28
|
-
import localeLv from '@angular/common/locales/lv';
|
|
29
|
-
import localeLvExtra from '@angular/common/locales/extra/lv';
|
|
30
|
-
import localeLt from '@angular/common/locales/lt';
|
|
31
|
-
import localeLtExtra from '@angular/common/locales/extra/lt';
|
|
32
|
-
import localeHu from '@angular/common/locales/hu';
|
|
33
|
-
import localeHuExtra from '@angular/common/locales/extra/hu';
|
|
34
|
-
import localeMt from '@angular/common/locales/mt';
|
|
35
|
-
import localeMtExtra from '@angular/common/locales/extra/mt';
|
|
36
|
-
import localeNl from '@angular/common/locales/nl';
|
|
37
|
-
import localeNlExtra from '@angular/common/locales/extra/nl';
|
|
38
|
-
import localePl from '@angular/common/locales/pl';
|
|
39
|
-
import localePlExtra from '@angular/common/locales/extra/pl';
|
|
40
|
-
import localePt from '@angular/common/locales/pt';
|
|
41
|
-
import localePtExtra from '@angular/common/locales/extra/pt';
|
|
42
|
-
import localeRo from '@angular/common/locales/ro';
|
|
43
|
-
import localeRoExtra from '@angular/common/locales/extra/ro';
|
|
44
|
-
import localeSk from '@angular/common/locales/sk';
|
|
45
|
-
import localeSkExtra from '@angular/common/locales/extra/sk';
|
|
46
|
-
import localeSl from '@angular/common/locales/sl';
|
|
47
|
-
import localeSlExtra from '@angular/common/locales/extra/sl';
|
|
48
|
-
import localeFi from '@angular/common/locales/fi';
|
|
49
|
-
import localeFiExtra from '@angular/common/locales/extra/fi';
|
|
50
|
-
import localeSv from '@angular/common/locales/sv';
|
|
51
|
-
import localeSvExtra from '@angular/common/locales/extra/sv';
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* import and register locales (currently MWP uses only French and English)
|
|
55
|
-
*/
|
|
56
|
-
registerLocaleData(localeBg, 'bg', localeBgExtra);
|
|
57
|
-
registerLocaleData(localeEs, 'es', localeEsExtra);
|
|
58
|
-
registerLocaleData(localeCs, 'cs', localeCsExtra);
|
|
59
|
-
registerLocaleData(localeDa, 'da', localeDaExtra);
|
|
60
|
-
registerLocaleData(localeDe, 'de', localeDeExtra);
|
|
61
|
-
registerLocaleData(localeEt, 'et', localeEtExtra);
|
|
62
|
-
registerLocaleData(localeEl, 'el', localeElExtra);
|
|
63
|
-
registerLocaleData(localeEn, 'en', localeEnExtra);
|
|
64
|
-
registerLocaleData(localeFr, 'fr', localeFrExtra);
|
|
65
|
-
registerLocaleData(localeGa, 'ga', localeGaExtra);
|
|
66
|
-
registerLocaleData(localeHr, 'hr', localeHrExtra);
|
|
67
|
-
registerLocaleData(localeIt, 'it', localeItExtra);
|
|
68
|
-
registerLocaleData(localeLv, 'lv', localeLvExtra);
|
|
69
|
-
registerLocaleData(localeLt, 'lt', localeLtExtra);
|
|
70
|
-
registerLocaleData(localeHu, 'hu', localeHuExtra);
|
|
71
|
-
registerLocaleData(localeMt, 'mt', localeMtExtra);
|
|
72
|
-
registerLocaleData(localeNl, 'nl', localeNlExtra);
|
|
73
|
-
registerLocaleData(localePl, 'pl', localePlExtra);
|
|
74
|
-
registerLocaleData(localePt, 'pt', localePtExtra);
|
|
75
|
-
registerLocaleData(localeRo, 'ro', localeRoExtra);
|
|
76
|
-
registerLocaleData(localeSk, 'sk', localeSkExtra);
|
|
77
|
-
registerLocaleData(localeSl, 'sl', localeSlExtra);
|
|
78
|
-
registerLocaleData(localeFi, 'fi', localeFiExtra);
|
|
79
|
-
registerLocaleData(localeSv, 'sv', localeSvExtra);
|
|
80
|
-
|
|
81
|
-
const languages = ['bg', 'es', 'cs', 'da', 'de', 'et', 'el', 'en', 'fr', 'ga', 'hr', 'it', 'lv', 'lt', 'hu', 'mt', 'nl', 'pl',
|
|
82
|
-
'pt', 'ro', 'sk', 'sl', 'fi', 'sv'];
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Internationalization Configuration
|
|
86
|
-
*/
|
|
87
|
-
const i18nConfig: I18nConfig = {
|
|
88
|
-
i18nLoader: {
|
|
89
|
-
i18nFolders: ['elements/@remote.name@/bundles/assets/i18n-compiled'],
|
|
90
|
-
},
|
|
91
|
-
i18nService: {
|
|
92
|
-
languages: languages,
|
|
93
|
-
defaultLanguage: 'en',
|
|
94
|
-
},
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Locale Configuration
|
|
99
|
-
*/
|
|
100
|
-
const localeConfig: LocaleServiceConfig = {
|
|
101
|
-
id: 'en',
|
|
102
|
-
available: languages,
|
|
103
|
-
bindWithTranslate: true,
|
|
104
|
-
affectGlobalLocale: true,
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Global Configuration
|
|
109
|
-
*/
|
|
110
|
-
export const GLOBAL: GlobalConfig = {
|
|
111
|
-
/* URL that needs to be used in the appRouting of the MWP */
|
|
112
|
-
baseUrl: '@base.url@',
|
|
113
|
-
/* Element tag name that needs to be unique - make sure it doesn't collide with any other MWP element */
|
|
114
|
-
elementName: '@element.name@',
|
|
115
|
-
/* in case you are using NgRx give it a unique name (mostly for debugging) */
|
|
116
|
-
storeName: '@store.name@',
|
|
117
|
-
i18n: i18nConfig,
|
|
118
|
-
locale: localeConfig,
|
|
119
|
-
eui: {
|
|
120
|
-
assetsBaseUrl: 'assets/elements/@remote.name@/bundles/assets',
|
|
121
|
-
},
|
|
122
|
-
};
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { Component, OnInit, Inject, ElementRef, OnDestroy } from '@angular/core';
|
|
2
|
-
|
|
3
|
-
import { Subscription } from 'rxjs';
|
|
4
|
-
import { first } from 'rxjs/operators';
|
|
5
|
-
|
|
6
|
-
import { CONFIG_TOKEN } from '@eui/core';
|
|
7
|
-
import { ElementSetupService, ElementLifeCycleService } from '@csdr/integration/element';
|
|
8
|
-
|
|
9
|
-
enum ElementStatus {
|
|
10
|
-
Loading = 'loading',
|
|
11
|
-
Loaded = 'loaded',
|
|
12
|
-
Error = 'error',
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@Component({
|
|
16
|
-
template: `
|
|
17
|
-
<eui-block-content *ngIf="moduleStatus === ElementStatus.Loading" [isBlocked]="true">
|
|
18
|
-
<div style="height: 100%"></div>
|
|
19
|
-
</eui-block-content>
|
|
20
|
-
<ng-container *ngIf="moduleStatus === ElementStatus.Loaded">
|
|
21
|
-
<!-- BLOCK_CONTAINER_PLACEHOLDER -->
|
|
22
|
-
</ng-container>
|
|
23
|
-
<ng-container *ngIf="moduleStatus === ElementStatus.Error">
|
|
24
|
-
<div class="error-container">
|
|
25
|
-
<div>
|
|
26
|
-
<h1>Translations or user data for this module failed to load.</h1>
|
|
27
|
-
<p>Do you want to try again?</p>
|
|
28
|
-
<button euiButton euiPrimary (click)="loadData()">
|
|
29
|
-
<span euiLabel>{{ "global.RELOAD" | translate }}</span>
|
|
30
|
-
</button>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
</ng-container>
|
|
34
|
-
`,
|
|
35
|
-
styles: [`
|
|
36
|
-
.error-container {
|
|
37
|
-
width: 50vw;
|
|
38
|
-
height: 50vh;
|
|
39
|
-
position: absolute;
|
|
40
|
-
top: 50%;
|
|
41
|
-
left: 50%;
|
|
42
|
-
transform: translate(-50%, -50%);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.error-container div {
|
|
46
|
-
text-align: center
|
|
47
|
-
}
|
|
48
|
-
`],
|
|
49
|
-
})
|
|
50
|
-
export class ModuleComponent implements OnInit, OnDestroy {
|
|
51
|
-
ElementStatus = ElementStatus;
|
|
52
|
-
moduleStatus: ElementStatus;
|
|
53
|
-
|
|
54
|
-
block: any;
|
|
55
|
-
|
|
56
|
-
private initSubscription: Subscription;
|
|
57
|
-
|
|
58
|
-
constructor(private elRef: ElementRef,
|
|
59
|
-
@Inject(CONFIG_TOKEN) public config: any,
|
|
60
|
-
private elementLifeCycleService: ElementLifeCycleService,
|
|
61
|
-
private elementSetupService: ElementSetupService) {
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
ngOnInit() {
|
|
65
|
-
this.block = this.elRef.nativeElement.block;
|
|
66
|
-
const elementData = this.elementLifeCycleService.getElementData(this.elRef);
|
|
67
|
-
this.elementLifeCycleService.setup(elementData);
|
|
68
|
-
this.loadData();
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
ngOnDestroy(): void {
|
|
72
|
-
this.initSubscription?.unsubscribe();
|
|
73
|
-
this.elementLifeCycleService.cleanup();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
private loadData() {
|
|
77
|
-
this.setStatus(ElementStatus.Loading);
|
|
78
|
-
try {
|
|
79
|
-
this.initSubscription?.unsubscribe();
|
|
80
|
-
|
|
81
|
-
this.initSubscription = this.elementSetupService
|
|
82
|
-
.init()
|
|
83
|
-
.pipe(first())
|
|
84
|
-
.subscribe((loadStatus: { success: boolean, error?: string }) => {
|
|
85
|
-
if (!loadStatus.success) {
|
|
86
|
-
this.setStatus(ElementStatus.Error);
|
|
87
|
-
console.error(`[ELEMENT: ${this.config.global.elementName}] `, loadStatus.error);
|
|
88
|
-
} else {
|
|
89
|
-
this.setStatus(ElementStatus.Loaded);
|
|
90
|
-
}
|
|
91
|
-
});
|
|
92
|
-
} catch (e) {
|
|
93
|
-
console.log(e);
|
|
94
|
-
this.setStatus(ElementStatus.Error);
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
private setStatus(status: ElementStatus) {
|
|
99
|
-
this.moduleStatus = status;
|
|
100
|
-
}
|
|
101
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { RouterModule, Routes } from '@angular/router';
|
|
3
|
-
|
|
4
|
-
import { ELEMENT_ROUTES_TOKEN } from '@csdr/integration/element';
|
|
5
|
-
|
|
6
|
-
import { appConfig } from '../config/index'; // tslint:disable-line
|
|
7
|
-
import { FallbackComponent } from './fallback.component'; // tslint:disable-line
|
|
8
|
-
import { ModuleComponent } from './module.component';
|
|
9
|
-
|
|
10
|
-
const elementRoutes: Routes = [
|
|
11
|
-
{ path: '**', component: ModuleComponent },
|
|
12
|
-
];
|
|
13
|
-
|
|
14
|
-
@NgModule({
|
|
15
|
-
imports: [
|
|
16
|
-
RouterModule.forRoot(elementRoutes),
|
|
17
|
-
],
|
|
18
|
-
providers: [
|
|
19
|
-
{ provide: ELEMENT_ROUTES_TOKEN, useValue: elementRoutes },
|
|
20
|
-
],
|
|
21
|
-
exports: [
|
|
22
|
-
RouterModule,
|
|
23
|
-
],
|
|
24
|
-
})
|
|
25
|
-
export class RoutingModule {
|
|
26
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { GLOBAL } from './global';
|
|
2
|
-
import { MODULES } from './modules';
|
|
3
|
-
|
|
4
|
-
import { EuiAppConfig } from '@eui/core';
|
|
5
|
-
import { configMapping } from '@csdr/integration/element';
|
|
6
|
-
|
|
7
|
-
export const appConfig: EuiAppConfig = configMapping({
|
|
8
|
-
global: GLOBAL,
|
|
9
|
-
modules: MODULES,
|
|
10
|
-
});
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { ActionReducer, ActionReducerMap, MetaReducer, INIT, RuntimeChecks } from '@ngrx/store';
|
|
3
|
-
import * as fromRouter from '@ngrx/router-store';
|
|
4
|
-
import { storeFreeze } from 'ngrx-store-freeze';
|
|
5
|
-
|
|
6
|
-
import { reducers as coreReducers, CoreState, localStorageSync } from '@eui/core';
|
|
7
|
-
import { ElementStorageService } from '@csdr/core';
|
|
8
|
-
|
|
9
|
-
import { environment } from '../../environments/environment';
|
|
10
|
-
|
|
11
|
-
export interface AppState extends CoreState {
|
|
12
|
-
router: fromRouter.RouterReducerState<any>;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
// -----------------
|
|
16
|
-
// ------------ AOT
|
|
17
|
-
export const TOKEN = new InjectionToken<any>('AppReducers');
|
|
18
|
-
|
|
19
|
-
export function getReducers(): ActionReducerMap<AppState, any> {
|
|
20
|
-
return {
|
|
21
|
-
router: fromRouter.routerReducer,
|
|
22
|
-
...coreReducers,
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export const reducerProvider = [
|
|
27
|
-
{ provide: TOKEN, useFactory: getReducers },
|
|
28
|
-
];
|
|
29
|
-
|
|
30
|
-
// console.log all actions
|
|
31
|
-
export function logger(reducer: ActionReducer<AppState>): ActionReducer<AppState> {
|
|
32
|
-
return (state, action) => {
|
|
33
|
-
const result = reducer(state, action);
|
|
34
|
-
console.groupCollapsed(action.type);
|
|
35
|
-
console.log('prev state', state);
|
|
36
|
-
console.log('action', action);
|
|
37
|
-
console.log('next state', result);
|
|
38
|
-
console.groupEnd();
|
|
39
|
-
|
|
40
|
-
return result;
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export function hydrationFactory(config: any, elementStorage: ElementStorageService): MetaReducer<AppState> {
|
|
45
|
-
return (reducer: ActionReducer<AppState>): ActionReducer<any> => {
|
|
46
|
-
return (state, action) => {
|
|
47
|
-
const key = `NgRx store: ${config.global.elementName}`;
|
|
48
|
-
if (action.type === INIT && elementStorage.hasData(key)) {
|
|
49
|
-
const cachedState = elementStorage.getData(key);
|
|
50
|
-
const nextStateFromCache = reducer(cachedState as AppState, action);
|
|
51
|
-
elementStorage.setData(key, nextStateFromCache);
|
|
52
|
-
return nextStateFromCache;
|
|
53
|
-
}
|
|
54
|
-
const nextState = reducer(state, action);
|
|
55
|
-
elementStorage.setData(key, nextState);
|
|
56
|
-
return nextState;
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export function metaReducers(config: any, elementStorage: ElementStorageService): MetaReducer<AppState>[] {
|
|
62
|
-
if (!environment.production) {
|
|
63
|
-
return [logger, localStorageSync, storeFreeze, hydrationFactory(config, elementStorage)];
|
|
64
|
-
}
|
|
65
|
-
return [localStorageSync, hydrationFactory(config, elementStorage)];
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export const runtimeChecks: RuntimeChecks = {
|
|
69
|
-
strictStateSerializability: false,
|
|
70
|
-
strictActionSerializability: false,
|
|
71
|
-
strictStateImmutability: false,
|
|
72
|
-
strictActionImmutability: false,
|
|
73
|
-
strictActionWithinNgZone: false,
|
|
74
|
-
strictActionTypeUniqueness: false,
|
|
75
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"cacheable-request": ">=10.2.7 <12.0.0",
|
|
3
|
-
"fast-xml-parser": ">=4.2.4",
|
|
4
|
-
"get-stream": "6.0.1",
|
|
5
|
-
"socket.io": ">=4.7.2",
|
|
6
|
-
"crypto-js": ">=4.2.0",
|
|
7
|
-
"@babel/traverse": ">=7.23.2",
|
|
8
|
-
"undici": "6.21.3",
|
|
9
|
-
"minimatch": "3.1.2",
|
|
10
|
-
"cheerio": "1.1.0"
|
|
11
|
-
}
|