@valtimo/bootstrap 4.22.0 → 5.1.0

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.
@@ -0,0 +1,61 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { APP_INITIALIZER, Injector, NgModule } from '@angular/core';
17
+ import { NGXLogger } from 'ngx-logger';
18
+ import { initialize, initializerFactory } from './init';
19
+ import { ConfigService } from '@valtimo/config';
20
+ import { TranslateService } from '@ngx-translate/core';
21
+ import { INITIALIZERS } from '@valtimo/config';
22
+ import * as i0 from "@angular/core";
23
+ export class BootstrapModule {
24
+ }
25
+ BootstrapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
26
+ BootstrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule });
27
+ BootstrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule, providers: [
28
+ {
29
+ provide: APP_INITIALIZER,
30
+ useFactory: initialize,
31
+ multi: true,
32
+ deps: [INITIALIZERS, NGXLogger],
33
+ },
34
+ {
35
+ provide: INITIALIZERS,
36
+ useFactory: initializerFactory,
37
+ deps: [ConfigService, Injector, NGXLogger, TranslateService],
38
+ },
39
+ ], imports: [[]] });
40
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule, decorators: [{
41
+ type: NgModule,
42
+ args: [{
43
+ declarations: [],
44
+ imports: [],
45
+ providers: [
46
+ {
47
+ provide: APP_INITIALIZER,
48
+ useFactory: initialize,
49
+ multi: true,
50
+ deps: [INITIALIZERS, NGXLogger],
51
+ },
52
+ {
53
+ provide: INITIALIZERS,
54
+ useFactory: initializerFactory,
55
+ deps: [ConfigService, Injector, NGXLogger, TranslateService],
56
+ },
57
+ ],
58
+ exports: [],
59
+ }]
60
+ }] });
61
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vYm9vdHN0cmFwL3NyYy9saWIvYm9vdHN0cmFwLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBQyxlQUFlLEVBQUUsUUFBUSxFQUFFLFFBQVEsRUFBQyxNQUFNLGVBQWUsQ0FBQztBQUNsRSxPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sWUFBWSxDQUFDO0FBQ3JDLE9BQU8sRUFBQyxVQUFVLEVBQUUsa0JBQWtCLEVBQUMsTUFBTSxRQUFRLENBQUM7QUFDdEQsT0FBTyxFQUFDLGFBQWEsRUFBQyxNQUFNLGlCQUFpQixDQUFDO0FBQzlDLE9BQU8sRUFBQyxnQkFBZ0IsRUFBQyxNQUFNLHFCQUFxQixDQUFDO0FBQ3JELE9BQU8sRUFBQyxZQUFZLEVBQUMsTUFBTSxpQkFBaUIsQ0FBQzs7QUFvQjdDLE1BQU0sT0FBTyxlQUFlOzs0R0FBZixlQUFlOz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bHRpbW8vY29uZmlnJztcblxuQE5nTW9kdWxlKHtcbiAgZGVjbGFyYXRpb25zOiBbXSxcbiAgaW1wb3J0czogW10sXG4gIHByb3ZpZGVyczogW1xuICAgIHtcbiAgICAgIHByb3ZpZGU6IEFQUF9JTklUSUFMSVpFUixcbiAgICAgIHVzZUZhY3Rvcnk6IGluaXRpYWxpemUsXG4gICAgICBtdWx0aTogdHJ1ZSxcbiAgICAgIGRlcHM6IFtJTklUSUFMSVpFUlMsIE5HWExvZ2dlcl0sXG4gICAgfSxcbiAgICB7XG4gICAgICBwcm92aWRlOiBJTklUSUFMSVpFUlMsXG4gICAgICB1c2VGYWN0b3J5OiBpbml0aWFsaXplckZhY3RvcnksXG4gICAgICBkZXBzOiBbQ29uZmlnU2VydmljZSwgSW5qZWN0b3IsIE5HWExvZ2dlciwgVHJhbnNsYXRlU2VydmljZV0sXG4gICAgfSxcbiAgXSxcbiAgZXhwb3J0czogW10sXG59KVxuZXhwb3J0IGNsYXNzIEJvb3RzdHJhcE1vZHVsZSB7fVxuIl19
@@ -0,0 +1,51 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { accountInitializer } from '@valtimo/account';
17
+ import { menuInitializer } from '@valtimo/components';
18
+ export function initialize(
19
+ // eslint-disable-next-line @typescript-eslint/ban-types
20
+ initializers, logger) {
21
+ return () => new Promise(async (resolve, reject) => {
22
+ logger.debug('Initializing application');
23
+ try {
24
+ logger.debug('Running', initializers.length);
25
+ for (const [index, initializer] of initializers.entries()) {
26
+ logger.debug('Executing app initializer:', index, initializer.name);
27
+ await initializer();
28
+ logger.debug('Executed app initializer:', index, initializer.name);
29
+ }
30
+ logger.debug('Application initialized');
31
+ resolve();
32
+ }
33
+ catch (err) {
34
+ reject(err);
35
+ }
36
+ });
37
+ }
38
+ export function initializerFactory(configService, injector, logger, translateService) {
39
+ logger.debug('Provided app initializers ', configService.initializers);
40
+ const initializersArray = [];
41
+ // Auth-initializer
42
+ initializersArray.push(configService.config.authentication.initializer(injector));
43
+ // Use environment config initializers to be used in app startup.
44
+ configService.initializers.forEach(initializer => {
45
+ initializersArray.push(initializer(injector));
46
+ });
47
+ initializersArray.push(menuInitializer(injector, logger));
48
+ initializersArray.push(accountInitializer(translateService, logger));
49
+ return initializersArray;
50
+ }
51
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5pdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vYm9vdHN0cmFwL3NyYy9saWIvaW5pdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUlILE9BQU8sRUFBQyxrQkFBa0IsRUFBQyxNQUFNLGtCQUFrQixDQUFDO0FBR3BELE9BQU8sRUFBQyxlQUFlLEVBQUMsTUFBTSxxQkFBcUIsQ0FBQztBQUVwRCxNQUFNLFVBQVUsVUFBVTtBQUN4Qix3REFBd0Q7QUFDeEQsWUFBZ0MsRUFDaEMsTUFBaUI7SUFFakIsT0FBTyxHQUFpQixFQUFFLENBQ3hCLElBQUksT0FBTyxDQUFPLEtBQUssRUFBRSxPQUFPLEVBQUUsTUFBTSxFQUFFLEVBQUU7UUFDMUMsTUFBTSxDQUFDLEtBQUssQ0FBQywwQkFBMEIsQ0FBQyxDQUFDO1FBQ3pDLElBQUk7W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ZCBpbiBhcHAgc3RhcnR1cC5cbiAgY29uZmlnU2VydmljZS5pbml0aWFsaXplcnMuZm9yRWFjaChpbml0aWFsaXplciA9PiB7XG4gICAgaW5pdGlhbGl6ZXJzQXJyYXkucHVzaChpbml0aWFsaXplcihpbmplY3RvcikpO1xuICB9KTtcblxuICBpbml0aWFsaXplcnNBcnJheS5wdXNoKG1lbnVJbml0aWFsaXplcihpbmplY3RvciwgbG9nZ2VyKSk7XG4gIGluaXRpYWxpemVyc0FycmF5LnB1c2goYWNjb3VudEluaXRpYWxpemVyKHRyYW5zbGF0ZVNlcnZpY2UsIGxvZ2dlcikpO1xuICByZXR1cm4gaW5pdGlhbGl6ZXJzQXJyYXk7XG59XG4iXX0=
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /*
17
+ * Public API Surface of bootstrap
18
+ */
19
+ export * from './lib/bootstrap.module';
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vYm9vdHN0cmFwL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7Ozs7OztHQWNHO0FBRUg7O0dBRUc7QUFFSCxjQUFjLHdCQUF3QixDQ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 //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdGltby1ib290c3RyYXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy92YWx0aW1vL2Jvb3RzdHJhcC9zcmMvdmFsdGltby1ib290c3RyYXAudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
@@ -0,0 +1,119 @@
1
+ import * as i0 from '@angular/core';
2
+ import { APP_INITIALIZER, Injector, NgModule } from '@angular/core';
3
+ import { NGXLogger } from 'ngx-logger';
4
+ import { __awaiter } from 'tslib';
5
+ import { accountInitializer } from '@valtimo/account';
6
+ import { menuInitializer } from '@valtimo/components';
7
+ import { INITIALIZERS, ConfigService } from '@valtimo/config';
8
+ import { TranslateService } from '@ngx-translate/core';
9
+
10
+ function initialize(
11
+ // eslint-disable-next-line @typescript-eslint/ban-types
12
+ initializers, logger) {
13
+ return () => new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
14
+ logger.debug('Initializing application');
15
+ try {
16
+ logger.debug('Running', initializers.length);
17
+ for (const [index, initializer] of initializers.entries()) {
18
+ logger.debug('Executing app initializer:', index, initializer.name);
19
+ yield initializer();
20
+ logger.debug('Executed app initializer:', index, initializer.name);
21
+ }
22
+ logger.debug('Application initialized');
23
+ resolve();
24
+ }
25
+ catch (err) {
26
+ reject(err);
27
+ }
28
+ }));
29
+ }
30
+ function initializerFactory(configService, injector, logger, translateService) {
31
+ logger.debug('Provided app initializers ', configService.initializers);
32
+ const initializersArray = [];
33
+ // Auth-initializer
34
+ initializersArray.push(configService.config.authentication.initializer(injector));
35
+ // Use environment config initializers to be used in app startup.
36
+ configService.initializers.forEach(initializer => {
37
+ initializersArray.push(initializer(injector));
38
+ });
39
+ initializersArray.push(menuInitializer(injector, logger));
40
+ initializersArray.push(accountInitializer(translateService, logger));
41
+ return initializersArray;
42
+ }
43
+
44
+ /*
45
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
46
+ *
47
+ * Licensed under EUPL, Version 1.2 (the "License");
48
+ * you may not use this file except in compliance with the License.
49
+ * You may obtain a copy of the License at
50
+ *
51
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
52
+ *
53
+ * Unless required by applicable law or agreed to in writing, software
54
+ * distributed under the License is distributed on an "AS IS" basis,
55
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
56
+ * See the License for the specific language governing permissions and
57
+ * limitations under the License.
58
+ */
59
+ class BootstrapModule {
60
+ }
61
+ BootstrapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
62
+ BootstrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule });
63
+ BootstrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule, providers: [
64
+ {
65
+ provide: APP_INITIALIZER,
66
+ useFactory: initialize,
67
+ multi: true,
68
+ deps: [INITIALIZERS, NGXLogger],
69
+ },
70
+ {
71
+ provide: INITIALIZERS,
72
+ useFactory: initializerFactory,
73
+ deps: [ConfigService, Injector, NGXLogger, TranslateService],
74
+ },
75
+ ], imports: [[]] });
76
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule, decorators: [{
77
+ type: NgModule,
78
+ args: [{
79
+ declarations: [],
80
+ imports: [],
81
+ providers: [
82
+ {
83
+ provide: APP_INITIALIZER,
84
+ useFactory: initialize,
85
+ multi: true,
86
+ deps: [INITIALIZERS, NGXLogger],
87
+ },
88
+ {
89
+ provide: INITIALIZERS,
90
+ useFactory: initializerFactory,
91
+ deps: [ConfigService, Injector, NGXLogger, TranslateService],
92
+ },
93
+ ],
94
+ exports: [],
95
+ }]
96
+ }] });
97
+
98
+ /*
99
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
100
+ *
101
+ * Licensed under EUPL, Version 1.2 (the "License");
102
+ * you may not use this file except in compliance with the License.
103
+ * You may obtain a copy of the License at
104
+ *
105
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
106
+ *
107
+ * Unless required by applicable law or agreed to in writing, software
108
+ * distributed under the License is distributed on an "AS IS" basis,
109
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
110
+ * See the License for the specific language governing permissions and
111
+ * limitations under the License.
112
+ */
113
+
114
+ /**
115
+ * Generated bundle index. Do not edit.
116
+ */
117
+
118
+ export { BootstrapModule };
119
+ //# sourceMappingURL=valtimo-bootstrap.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-bootstrap.mjs","sources":["../../../../projects/valtimo/bootstrap/src/lib/init.ts","../../../../projects/valtimo/bootstrap/src/lib/bootstrap.module.ts","../../../../projects/valtimo/bootstrap/src/public-api.ts","../../../../projects/valtimo/bootstrap/src/valtimo-bootstrap.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NGXLogger} from 'ngx-logger';\nimport {TranslateService} from '@ngx-translate/core';\nimport {accountInitializer} from '@valtimo/account';\nimport {Injector} from '@angular/core';\nimport {ConfigService} from '@valtimo/config';\nimport {menuInitializer} from '@valtimo/components';\n\nexport function initialize(\n // eslint-disable-next-line @typescript-eslint/ban-types\n initializers: (() => Function)[],\n logger: NGXLogger\n): () => Promise<any> {\n return (): Promise<any> =>\n new Promise<void>(async (resolve, reject) => {\n logger.debug('Initializing application');\n try {\n logger.debug('Running', initializers.length);\n for (const [index, initializer] of initializers.entries()) {\n logger.debug('Executing app initializer:', index, initializer.name);\n await initializer();\n logger.debug('Executed app initializer:', index, initializer.name);\n }\n logger.debug('Application initialized');\n resolve();\n } catch (err) {\n reject(err);\n }\n });\n}\n\nexport function initializerFactory(\n configService: ConfigService,\n injector: Injector,\n logger: NGXLogger,\n translateService: TranslateService\n) {\n logger.debug('Provided app initializers ', configService.initializers);\n\n const initializersArray = [];\n\n // Auth-initializer\n initializersArray.push(configService.config.authentication.initializer(injector));\n\n // Use environment config initializers to be used in app startup.\n configService.initializers.forEach(initializer => {\n initializersArray.push(initializer(injector));\n });\n\n initializersArray.push(menuInitializer(injector, logger));\n initializersArray.push(accountInitializer(translateService, logger));\n return initializersArray;\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {APP_INITIALIZER, Injector, NgModule} from '@angular/core';\nimport {NGXLogger} from 'ngx-logger';\nimport {initialize, initializerFactory} from './init';\nimport {ConfigService} from '@valtimo/config';\nimport {TranslateService} from '@ngx-translate/core';\nimport {INITIALIZERS} from '@valtimo/config';\n\n@NgModule({\n declarations: [],\n imports: [],\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: initialize,\n multi: true,\n deps: [INITIALIZERS, NGXLogger],\n },\n {\n provide: INITIALIZERS,\n useFactory: initializerFactory,\n deps: [ConfigService, Injector, NGXLogger, TranslateService],\n },\n ],\n exports: [],\n})\nexport class BootstrapModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of bootstrap\n */\n\nexport * from './lib/bootstrap.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;SAuBgB,UAAU;AACxB;AACA,YAAgC,EAChC,MAAiB,EAAA;IAEjB,OAAO,MACL,IAAI,OAAO,CAAO,CAAO,OAAO,EAAE,MAAM,KAAI,SAAA,CAAA,IAAA,EAAA,KAAA,CAAA,EAAA,KAAA,CAAA,EAAA,aAAA;AAC1C,QAAA,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QACzC,IAAI;YACF,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;YAC7C,KAAK,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE;gBACzD,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;gBACpE,MAAM,WAAW,EAAE,CAAC;gBACpB,MAAM,CAAC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AA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EAff,SAAA,EAAA;AACT,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;AACxB,YAAA,UAAU,EAAE,UAAU;AACtB,YAAA,KAAK,EAAE,IAAI;AACX,YAAA,IAAI,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC;AAChC,SAAA;AACD,QAAA;AACE,YAAA,OAAO,EAAE,YAAY;AACrB,YAAA,UAAU,EAAE,kBAAkB;YAC9B,IAAI,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,CAAC;AAC7D,SAAA;AACF,KAAA,EAAA,OAAA,EAAA,CAbQ,EAAE,CAAA,EAAA,CAAA,CAAA;2FAgBA,eAAe,EAAA,UAAA,EAAA,CAAA;kBAlB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE,EAAE;AACX,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,UAAU,EAAE,UAAU;AACtB,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,IAAI,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC;AAChC,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,YAAY;AACrB,4BAAA,UAAU,EAAE,kBAAkB;4BAC9B,IAAI,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,CAAC;AAC7D,yBAAA;AACF,qBAAA;AACD,oBAAA,OAAO,EAAE,EAAE;iBACZ,CAAA;;;ACxCD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
- import { NgModule, APP_INITIALIZER, Injector } from '@angular/core';
1
+ import * as i0 from '@angular/core';
2
+ import { APP_INITIALIZER, Injector, NgModule } from '@angular/core';
2
3
  import { NGXLogger } from 'ngx-logger';
3
- import { __awaiter } from 'tslib';
4
4
  import { accountInitializer } from '@valtimo/account';
5
5
  import { menuInitializer } from '@valtimo/components';
6
6
  import { INITIALIZERS, ConfigService } from '@valtimo/config';
@@ -21,25 +21,25 @@ import { TranslateService } from '@ngx-translate/core';
21
21
  * See the License for the specific language governing permissions and
22
22
  * limitations under the License.
23
23
  */
24
- function initialize(initializers, logger) {
25
- return () => {
26
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
27
- logger.debug('Initializing application');
28
- try {
29
- logger.debug('Running', initializers.length);
30
- for (const [index, initializer] of initializers.entries()) {
31
- logger.debug('Executing app initializer:', index, initializer.name);
32
- yield initializer();
33
- logger.debug('Executed app initializer:', index, initializer.name);
34
- }
35
- logger.debug('Application initialized');
36
- resolve();
24
+ function initialize(
25
+ // eslint-disable-next-line @typescript-eslint/ban-types
26
+ initializers, logger) {
27
+ return () => new Promise(async (resolve, reject) => {
28
+ logger.debug('Initializing application');
29
+ try {
30
+ logger.debug('Running', initializers.length);
31
+ for (const [index, initializer] of initializers.entries()) {
32
+ logger.debug('Executing app initializer:', index, initializer.name);
33
+ await initializer();
34
+ logger.debug('Executed app initializer:', index, initializer.name);
37
35
  }
38
- catch (err) {
39
- reject(err);
40
- }
41
- }));
42
- };
36
+ logger.debug('Application initialized');
37
+ resolve();
38
+ }
39
+ catch (err) {
40
+ reject(err);
41
+ }
42
+ });
43
43
  }
44
44
  function initializerFactory(configService, injector, logger, translateService) {
45
45
  logger.debug('Provided app initializers ', configService.initializers);
@@ -70,29 +70,44 @@ function initializerFactory(configService, injector, logger, translateService) {
70
70
  * See the License for the specific language governing permissions and
71
71
  * limitations under the License.
72
72
  */
73
- const ɵ0 = initialize, ɵ1 = initializerFactory;
74
73
  class BootstrapModule {
75
74
  }
76
- BootstrapModule.decorators = [
77
- { type: NgModule, args: [{
78
- declarations: [],
79
- imports: [],
80
- providers: [
81
- {
82
- provide: APP_INITIALIZER,
83
- useFactory: ɵ0,
84
- multi: true,
85
- deps: [INITIALIZERS, NGXLogger],
86
- },
87
- {
88
- provide: INITIALIZERS,
89
- useFactory: ɵ1,
90
- deps: [ConfigService, Injector, NGXLogger, TranslateService],
91
- },
92
- ],
93
- exports: [],
94
- },] }
95
- ];
75
+ BootstrapModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
76
+ BootstrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule });
77
+ BootstrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule, providers: [
78
+ {
79
+ provide: APP_INITIALIZER,
80
+ useFactory: initialize,
81
+ multi: true,
82
+ deps: [INITIALIZERS, NGXLogger],
83
+ },
84
+ {
85
+ provide: INITIALIZERS,
86
+ useFactory: initializerFactory,
87
+ deps: [ConfigService, Injector, NGXLogger, TranslateService],
88
+ },
89
+ ], imports: [[]] });
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.9", ngImport: i0, type: BootstrapModule, decorators: [{
91
+ type: NgModule,
92
+ args: [{
93
+ declarations: [],
94
+ imports: [],
95
+ providers: [
96
+ {
97
+ provide: APP_INITIALIZER,
98
+ useFactory: initialize,
99
+ multi: true,
100
+ deps: [INITIALIZERS, NGXLogger],
101
+ },
102
+ {
103
+ provide: INITIALIZERS,
104
+ useFactory: initializerFactory,
105
+ deps: [ConfigService, Injector, NGXLogger, TranslateService],
106
+ },
107
+ ],
108
+ exports: [],
109
+ }]
110
+ }] });
96
111
 
97
112
  /*
98
113
  * Copyright 2015-2020 Ritense BV, the Netherlands.
@@ -114,5 +129,5 @@ BootstrapModule.decorators = [
114
129
  * Generated bundle index. Do not edit.
115
130
  */
116
131
 
117
- export { BootstrapModule, ɵ0, ɵ1, initialize as ɵa, initializerFactory as ɵb };
118
- //# sourceMappingURL=valtimo-bootstrap.js.map
132
+ export { BootstrapModule };
133
+ //# sourceMappingURL=valtimo-bootstrap.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-bootstrap.mjs","sources":["../../../../projects/valtimo/bootstrap/src/lib/init.ts","../../../../projects/valtimo/bootstrap/src/lib/bootstrap.module.ts","../../../../projects/valtimo/bootstrap/src/public-api.ts","../../../../projects/valtimo/bootstrap/src/valtimo-bootstrap.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NGXLogger} from 'ngx-logger';\nimport {TranslateService} from '@ngx-translate/core';\nimport {accountInitializer} from '@valtimo/account';\nimport {Injector} from '@angular/core';\nimport {ConfigService} from '@valtimo/config';\nimport {menuInitializer} from '@valtimo/components';\n\nexport function initialize(\n // eslint-disable-next-line @typescript-eslint/ban-types\n initializers: (() => Function)[],\n logger: NGXLogger\n): () => Promise<any> {\n return (): Promise<any> =>\n new Promise<void>(async (resolve, reject) => {\n logger.debug('Initializing application');\n try {\n logger.debug('Running', initializers.length);\n for (const [index, initializer] of initializers.entries()) {\n logger.debug('Executing app initializer:', index, initializer.name);\n await initializer();\n logger.debug('Executed app initializer:', index, initializer.name);\n }\n logger.debug('Application initialized');\n resolve();\n } catch (err) {\n reject(err);\n }\n });\n}\n\nexport function initializerFactory(\n configService: ConfigService,\n injector: Injector,\n logger: NGXLogger,\n translateService: TranslateService\n) {\n logger.debug('Provided app initializers ', configService.initializers);\n\n const initializersArray = [];\n\n // Auth-initializer\n initializersArray.push(configService.config.authentication.initializer(injector));\n\n // Use environment config initializers to be used in app startup.\n configService.initializers.forEach(initializer => {\n initializersArray.push(initializer(injector));\n });\n\n initializersArray.push(menuInitializer(injector, logger));\n initializersArray.push(accountInitializer(translateService, logger));\n return initializersArray;\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {APP_INITIALIZER, Injector, NgModule} from '@angular/core';\nimport {NGXLogger} from 'ngx-logger';\nimport {initialize, initializerFactory} from './init';\nimport {ConfigService} from '@valtimo/config';\nimport {TranslateService} from '@ngx-translate/core';\nimport {INITIALIZERS} from '@valtimo/config';\n\n@NgModule({\n declarations: [],\n imports: [],\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: initialize,\n multi: true,\n deps: [INITIALIZERS, NGXLogger],\n },\n {\n provide: INITIALIZERS,\n useFactory: initializerFactory,\n deps: [ConfigService, Injector, NGXLogger, TranslateService],\n },\n ],\n exports: [],\n})\nexport class BootstrapModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of bootstrap\n */\n\nexport * from './lib/bootstrap.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;SASa,UAAU;AACxB;AACA,YAAgC,EAChC,MAAiB,EAAA;AAEjB,IAAA,OAAO,MACL,IAAI,OAAO,CAAO,OAAO,OAAO,EAAE,MAAM,KAAI;AAC1C,QAAA,MAAM,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;QACzC,IAAI;YACF,MAAM,CAAC,KAAK,CAAC,SAAS,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;YAC7C,KAAK,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,IAAI,YAAY,CAAC,OAAO,EAAE,EAAE;gBACzD,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;gBACpE,MAAM,WAAW,EAAE,CAAC;gBACpB,MAAM,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,EAAE,WAAW,CAAC,IAAI,CAAC,CAAC;AACpE,aAAA;AACD,YAAA,MAAM,CAAC,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACxC,YAAA,OAAO,EAAE,CAAC;AACX,SAAA;AAAC,QAAA,OAAO,GAAG,EAAE;YACZ,MAAM,CAAC,GAAG,CAAC,CAAC;AACb,SAAA;AACH,KAAC,CAAC,CAAC;AACP,CAAC;AAEK,SAAU,kBAAkB,CAChC,aAA4B,EAC5B,QAAkB,EAClB,MAAiB,EACjB,gBAAkC,EAAA;IAElC,MAAM,CAAC,KAAK,CAAC,4BAA4B,EAAE,aAAa,CAAC,YAAY,CAAC,CAAC;IAEvE,MAAM,iBAAiB,GAAG,EAAE,CAAC;;AAG7B,IAAA,iBAAiB,CAAC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;;AAGlF,IAAA,aA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AAE,EAAE;AACX,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,eAAe;AACxB,4BAAA,UAAU,EAAE,UAAU;AACtB,4BAAA,KAAK,EAAE,IAAI;AACX,4BAAA,IAAI,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC;AAChC,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,YAAY;AACrB,4BAAA,UAAU,EAAE,kBAAkB;4BAC9B,IAAI,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,SAAS,EAAE,gBAAgB,CAAC;AAC7D,yBAAA;AACF,qBAAA;AACD,oBAAA,OAAO,EAAE,EAAE;AACZ,iBAAA,CAAA;;;ACxCD;;;;;;;;;;;;;;AAcG;;ACdH;;AAEG;;;;"}
@@ -1,2 +1,7 @@
1
+ import * as i0 from "@angular/core";
1
2
  export declare class BootstrapModule {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<BootstrapModule, never>;
4
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BootstrapModule, never, never, never>;
5
+ static ɵinj: i0.ɵɵInjectorDeclaration<BootstrapModule>;
2
6
  }
7
+ //# sourceMappingURL=bootstrap.module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bootstrap.module.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/bootstrap/src/lib/bootstrap.module.ts"],"names":[],"mappings":";AAuBA,qBAkBa,eAAe;yCAAf,eAAe;0CAAf,eAAe;0CAAf,eAAe;CAAG"}
package/lib/init.d.ts CHANGED
@@ -4,3 +4,4 @@ import { Injector } from '@angular/core';
4
4
  import { ConfigService } from '@valtimo/config';
5
5
  export declare function initialize(initializers: (() => Function)[], logger: NGXLogger): () => Promise<any>;
6
6
  export declare function initializerFactory(configService: ConfigService, injector: Injector, logger: NGXLogger, translateService: TranslateService): any[];
7
+ //# sourceMappingURL=init.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../../projects/valtimo/bootstrap/src/lib/init.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAC,SAAS,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,EAAC,gBAAgB,EAAC,MAAM,qBAAqB,CAAC;AAErD,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AACvC,OAAO,EAAC,aAAa,EAAC,MAAM,iBAAiB,CAAC;AAG9C,wBAAgB,UAAU,CAExB,YAAY,EAAE,CAAC,MAAM,QAAQ,CAAC,EAAE,EAChC,MAAM,EAAE,SAAS,GAChB,MAAM,OAAO,CAAC,GAAG,CAAC,CAiBpB;AAED,wBAAgB,kBAAkB,CAChC,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,EAClB,MAAM,EAAE,SAAS,EACjB,gBAAgB,EAAE,gBAAgB,SAiBnC"}
package/package.json CHANGED
@@ -1,20 +1,32 @@
1
1
  {
2
2
  "name": "@valtimo/bootstrap",
3
3
  "license": "EUPL-1.2",
4
- "version": "4.22.0",
4
+ "version": "5.1.0",
5
5
  "peerDependencies": {
6
- "@angular/common": "^10.0.11",
7
- "@angular/core": "^10.0.11"
6
+ "@angular/common": "^13.2.3",
7
+ "@angular/core": "^13.2.3"
8
8
  },
9
9
  "dependencies": {
10
10
  "tslib": "^2.0.0"
11
11
  },
12
- "main": "bundles/valtimo-bootstrap.umd.js",
13
- "module": "fesm2015/valtimo-bootstrap.js",
14
- "es2015": "fesm2015/valtimo-bootstrap.js",
15
- "esm2015": "esm2015/valtimo-bootstrap.js",
16
- "fesm2015": "fesm2015/valtimo-bootstrap.js",
12
+ "module": "fesm2015/valtimo-bootstrap.mjs",
13
+ "es2020": "fesm2020/valtimo-bootstrap.mjs",
14
+ "esm2020": "esm2020/valtimo-bootstrap.mjs",
15
+ "fesm2020": "fesm2020/valtimo-bootstrap.mjs",
16
+ "fesm2015": "fesm2015/valtimo-bootstrap.mjs",
17
17
  "typings": "valtimo-bootstrap.d.ts",
18
- "metadata": "valtimo-bootstrap.metadata.json",
18
+ "exports": {
19
+ "./package.json": {
20
+ "default": "./package.json"
21
+ },
22
+ ".": {
23
+ "types": "./valtimo-bootstrap.d.ts",
24
+ "esm2020": "./esm2020/valtimo-bootstrap.mjs",
25
+ "es2020": "./fesm2020/valtimo-bootstrap.mjs",
26
+ "es2015": "./fesm2015/valtimo-bootstrap.mjs",
27
+ "node": "./fesm2015/valtimo-bootstrap.mjs",
28
+ "default": "./fesm2020/valtimo-bootstrap.mjs"
29
+ }
30
+ },
19
31
  "sideEffects": false
20
- }
32
+ }
package/public-api.d.ts CHANGED
@@ -1 +1,2 @@
1
1
  export * from './lib/bootstrap.module';
2
+ //# sourceMappingURL=public-api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/bootstrap/src/public-api.ts"],"names":[],"mappings":"AAoBA,cAAc,wBAAwB,CAAC"}
@@ -1,5 +1,6 @@
1
1
  /**
2
2
  * Generated bundle index. Do not edit.
3
3
  */
4
+ /// <amd-module name="@valtimo/bootstrap" />
4
5
  export * from './public-api';
5
- export { initialize as ɵa, initializerFactory as ɵb } from './lib/init';
6
+ //# sourceMappingURL=valtimo-bootstrap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-bootstrap.d.ts","sourceRoot":"","sources":["../../../projects/valtimo/bootstrap/src/valtimo-bootstrap.ts"],"names":[],"mappings":"AAAA;;GAEG;;AAEH,cAAc,cAAc,CAAC"}