@valtimo/bootstrap 10.8.0 → 11.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.
- package/esm2022/lib/bootstrap.module.mjs +61 -0
- package/{fesm2020 → fesm2022}/valtimo-bootstrap.mjs +19 -16
- package/{fesm2020 → fesm2022}/valtimo-bootstrap.mjs.map +1 -1
- package/package.json +8 -14
- package/esm2020/lib/bootstrap.module.mjs +0 -61
- package/fesm2015/valtimo-bootstrap.mjs +0 -119
- package/fesm2015/valtimo-bootstrap.mjs.map +0 -1
- /package/{esm2020 → esm2022}/lib/init.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/valtimo-bootstrap.mjs +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2015-2023 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
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
25
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: BootstrapModule }); }
|
|
26
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BootstrapModule, providers: [
|
|
27
|
+
{
|
|
28
|
+
provide: APP_INITIALIZER,
|
|
29
|
+
useFactory: initialize,
|
|
30
|
+
multi: true,
|
|
31
|
+
deps: [INITIALIZERS, NGXLogger],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
provide: INITIALIZERS,
|
|
35
|
+
useFactory: initializerFactory,
|
|
36
|
+
deps: [ConfigService, Injector, NGXLogger, TranslateService],
|
|
37
|
+
},
|
|
38
|
+
] }); }
|
|
39
|
+
}
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", 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,eyJ2ZXJzaW9uIj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cnk6IGluaXRpYWxpemVyRmFjdG9yeSxcbiAgICAgIGRlcHM6IFtDb25maWdTZXJ2aWNlLCBJbmplY3RvciwgTkdYTG9nZ2VyLCBUcmFuc2xhdGVTZXJ2aWNlXSxcbiAgICB9LFxuICBdLFxuICBleHBvcnRzOiBbXSxcbn0pXG5leHBvcnQgY2xhc3MgQm9vdHN0cmFwTW9kdWxlIHt9XG4iXX0=
|
|
@@ -71,23 +71,23 @@ function initializerFactory(configService, injector, logger, translateService) {
|
|
|
71
71
|
* limitations under the License.
|
|
72
72
|
*/
|
|
73
73
|
class BootstrapModule {
|
|
74
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
75
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: BootstrapModule }); }
|
|
76
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BootstrapModule, providers: [
|
|
77
|
+
{
|
|
78
|
+
provide: APP_INITIALIZER,
|
|
79
|
+
useFactory: initialize,
|
|
80
|
+
multi: true,
|
|
81
|
+
deps: [INITIALIZERS, NGXLogger],
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
provide: INITIALIZERS,
|
|
85
|
+
useFactory: initializerFactory,
|
|
86
|
+
deps: [ConfigService, Injector, NGXLogger, TranslateService],
|
|
87
|
+
},
|
|
88
|
+
] }); }
|
|
74
89
|
}
|
|
75
|
-
|
|
76
|
-
BootstrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: BootstrapModule });
|
|
77
|
-
BootstrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", 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
|
-
] });
|
|
90
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BootstrapModule, decorators: [{
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BootstrapModule, decorators: [{
|
|
91
91
|
type: NgModule,
|
|
92
92
|
args: [{
|
|
93
93
|
declarations: [],
|
|
@@ -124,6 +124,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
124
124
|
* See the License for the specific language governing permissions and
|
|
125
125
|
* limitations under the License.
|
|
126
126
|
*/
|
|
127
|
+
/*
|
|
128
|
+
* Public API Surface of bootstrap
|
|
129
|
+
*/
|
|
127
130
|
|
|
128
131
|
/**
|
|
129
132
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +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-2023 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, configService));\n return initializersArray;\n}\n","/*\n * Copyright 2015-2023 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-2023 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,aAAa,CAAC,YAAY,CAAC,OAAO,CAAC,WAAW,IAAG;QAC/C,iBAAiB,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC,CAAC;AAChD,KAAC,CAAC,CAAC;IAEH,iBAAiB,CAAC,IAAI,CAAC,eAAe,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAC1D,IAAA,iBAAiB,CAAC,IAAI,CAAC,kBAAkB,CAAC,gBAAgB,EAAE,MAAM,EAAE,aAAa,CAAC,CAAC,CAAC;AACpF,IAAA,OAAO,iBAAiB,CAAC;AAC3B;;ACnEA;;;;;;;;;;;;;;AAcG;MA2BU,eAAe,CAAA
|
|
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-2023 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, configService));\n return initializersArray;\n}\n","/*\n * Copyright 2015-2023 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-2023 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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Y;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;AAEH;;AAEG;;AClBH;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@valtimo/bootstrap",
|
|
3
3
|
"license": "EUPL-1.2",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "11.1.0",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@angular/common": "^
|
|
7
|
-
"@angular/core": "^
|
|
6
|
+
"@angular/common": "^16.2.0",
|
|
7
|
+
"@angular/core": "^16.2.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"tslib": "
|
|
10
|
+
"tslib": "2.6.2"
|
|
11
11
|
},
|
|
12
|
-
"module": "
|
|
13
|
-
"es2020": "fesm2020/valtimo-bootstrap.mjs",
|
|
14
|
-
"esm2020": "esm2020/valtimo-bootstrap.mjs",
|
|
15
|
-
"fesm2020": "fesm2020/valtimo-bootstrap.mjs",
|
|
16
|
-
"fesm2015": "fesm2015/valtimo-bootstrap.mjs",
|
|
12
|
+
"module": "fesm2022/valtimo-bootstrap.mjs",
|
|
17
13
|
"typings": "index.d.ts",
|
|
18
14
|
"exports": {
|
|
19
15
|
"./package.json": {
|
|
@@ -21,11 +17,9 @@
|
|
|
21
17
|
},
|
|
22
18
|
".": {
|
|
23
19
|
"types": "./index.d.ts",
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"node": "./fesm2015/valtimo-bootstrap.mjs",
|
|
28
|
-
"default": "./fesm2020/valtimo-bootstrap.mjs"
|
|
20
|
+
"esm2022": "./esm2022/valtimo-bootstrap.mjs",
|
|
21
|
+
"esm": "./esm2022/valtimo-bootstrap.mjs",
|
|
22
|
+
"default": "./fesm2022/valtimo-bootstrap.mjs"
|
|
29
23
|
}
|
|
30
24
|
},
|
|
31
25
|
"sideEffects": false
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Copyright 2015-2023 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: "14.3.0", ngImport: i0, type: BootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
26
|
-
BootstrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: BootstrapModule });
|
|
27
|
-
BootstrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", 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
|
-
] });
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYm9vdHN0cmFwLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vYm9vdHN0cmFwL3NyYy9saWIvYm9vdHN0cmFwLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBQyxlQUFlLEVBQUUsUUFBUSx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} 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, configService));
|
|
41
|
-
return initializersArray;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
/*
|
|
45
|
-
* Copyright 2015-2023 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: "14.3.0", ngImport: i0, type: BootstrapModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
62
|
-
BootstrapModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: BootstrapModule });
|
|
63
|
-
BootstrapModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", 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
|
-
] });
|
|
76
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", 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-2023 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
|
|
@@ -1 +0,0 @@
|
|
|
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-2023 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, configService));\n return initializersArray;\n}\n","/*\n * Copyright 2015-2023 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-2023 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,CA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