aril 0.0.26 → 0.0.28
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/README.md +2 -2
- package/boot/config/config.sample.json +19 -0
- package/boot/config/index.d.ts +2 -0
- package/boot/config/src/app.configs.d.ts +13 -0
- package/boot/{host/src/services/custom-manifest.d.ts → config/src/custom-remote.d.ts} +2 -2
- package/boot/host/index.d.ts +0 -1
- package/boot/host/src/bootstrap.d.ts +2 -2
- package/boot/host/src/services/microFrontEnd.service.d.ts +1 -1
- package/boot/mfe/index.d.ts +1 -1
- package/boot/mfe/src/app.component.d.ts +2 -0
- package/boot/mfe/src/appComponentLoader.d.ts +1 -0
- package/boot/mfe/src/bootstrap.d.ts +5 -2
- package/boot/mfe/src/loadStyles.d.ts +3 -0
- package/esm2022/boot/config/aril-boot-config.mjs +5 -0
- package/esm2022/boot/config/index.mjs +3 -0
- package/esm2022/boot/config/src/app.configs.mjs +19 -0
- package/esm2022/boot/config/src/custom-remote.mjs +2 -0
- package/esm2022/boot/host/index.mjs +1 -2
- package/esm2022/boot/host/src/bootstrap.mjs +14 -12
- package/esm2022/boot/host/src/services/microFrontEnd.service.mjs +1 -1
- package/esm2022/boot/mfe/index.mjs +2 -2
- package/esm2022/boot/mfe/src/app.component.mjs +10 -3
- package/esm2022/boot/mfe/src/appComponentLoader.mjs +5 -0
- package/esm2022/boot/mfe/src/bootstrap.mjs +24 -33
- package/esm2022/boot/mfe/src/loadStyles.mjs +16 -0
- package/esm2022/http/index.mjs +2 -1
- package/esm2022/http/lib/enums.mjs +3 -1
- package/esm2022/http/src/httpClient.mjs +6 -4
- package/esm2022/http/src/serviceBase.mjs +12 -43
- package/esm2022/http/src/serviceMockBase.mjs +5 -0
- package/esm2022/http/src/serviceRequest.mjs +26 -0
- package/esm2022/http/src/serviceStateMethods.mjs +97 -3
- package/esm2022/i18n/index.mjs +2 -2
- package/esm2022/i18n/src/folder-name-token.mjs +3 -0
- package/esm2022/i18n/src/loader.mjs +3 -3
- package/esm2022/i18n/src/provideScope.mjs +2 -2
- package/esm2022/keycloak/index.mjs +2 -1
- package/esm2022/keycloak/src/auth.guard.mjs +39 -0
- package/esm2022/keycloak/src/keycloak.manager.mjs +21 -2
- package/esm2022/public-api.mjs +1 -2
- package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +8 -5
- package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +3 -3
- package/esm2022/theme/layout/service/app.layout.service.mjs +1 -1
- package/esm2022/theme/layout/service/app.menu.service.mjs +3 -1
- package/esm2022/ui/button/src/button.component.mjs +1 -1
- package/esm2022/ui/lib/src/input/common-input-validators.service.mjs +1 -1
- package/esm2022/util/block/aril-util-block.mjs +5 -0
- package/esm2022/util/block/index.mjs +2 -0
- package/esm2022/util/block/src/block.mjs +64 -0
- package/esm2022/util/custom_pages/src/notFound.component.mjs +53 -110
- package/esm2022/util/pub-sub/src/pub-sub.service.mjs +2 -3
- package/fesm2022/{aril-boot-mfe-app.component-zro0FnKY.mjs → aril-app.component-pGPjpk8x.mjs} +14 -7
- package/fesm2022/aril-app.component-pGPjpk8x.mjs.map +1 -0
- package/fesm2022/aril-boot-config.mjs +26 -0
- package/fesm2022/aril-boot-config.mjs.map +1 -0
- package/fesm2022/aril-boot-host.mjs +14 -13
- package/fesm2022/aril-boot-host.mjs.map +1 -1
- package/fesm2022/{aril-app.component-sZDpvJDM.mjs → aril-boot-mfe-app.component-h5TW-GVW.mjs} +13 -6
- package/fesm2022/aril-boot-mfe-app.component-h5TW-GVW.mjs.map +1 -0
- package/fesm2022/aril-boot-mfe-aril-boot-mfe-7ZwVVddO.mjs +92 -0
- package/fesm2022/aril-boot-mfe-aril-boot-mfe-7ZwVVddO.mjs.map +1 -0
- package/fesm2022/aril-boot-mfe.mjs +13 -81
- package/fesm2022/aril-boot-mfe.mjs.map +1 -1
- package/fesm2022/aril-http.mjs +140 -45
- package/fesm2022/aril-http.mjs.map +1 -1
- package/fesm2022/aril-i18n.mjs +3 -3
- package/fesm2022/aril-i18n.mjs.map +1 -1
- package/fesm2022/aril-keycloak.mjs +58 -3
- package/fesm2022/aril-keycloak.mjs.map +1 -1
- package/fesm2022/aril-theme-layout.mjs +11 -7
- package/fesm2022/aril-theme-layout.mjs.map +1 -1
- package/fesm2022/aril-ui-button.mjs.map +1 -1
- package/fesm2022/aril-ui-lib.mjs.map +1 -1
- package/fesm2022/aril-util-block.mjs +71 -0
- package/fesm2022/aril-util-block.mjs.map +1 -0
- package/fesm2022/aril-util-custom_pages.mjs +52 -109
- package/fesm2022/aril-util-custom_pages.mjs.map +1 -1
- package/fesm2022/aril-util-pub-sub.mjs +1 -2
- package/fesm2022/aril-util-pub-sub.mjs.map +1 -1
- package/fesm2022/aril.mjs +215 -16
- package/fesm2022/aril.mjs.map +1 -1
- package/http/index.d.ts +1 -0
- package/http/lib/enums.d.ts +4 -2
- package/http/src/httpClient.d.ts +2 -4
- package/http/src/serviceBase.d.ts +4 -2
- package/http/src/serviceMockBase.d.ts +6 -0
- package/http/src/serviceRequest.d.ts +4 -0
- package/http/src/serviceStateMethods.d.ts +11 -2
- package/i18n/index.d.ts +1 -1
- package/i18n/src/folder-name-token.d.ts +2 -0
- package/i18n/src/provideScope.d.ts +0 -4
- package/keycloak/index.d.ts +1 -0
- package/keycloak/src/auth.guard.d.ts +11 -0
- package/keycloak/src/keycloak.manager.d.ts +1 -0
- package/package.json +13 -1
- package/public-api.d.ts +0 -1
- package/scripts/util/blockui.min.js +7 -0
- package/styles/util/blockui.css +56 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.d.ts +3 -0
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.html +151 -152
- package/theme/layout/app/profileSidebar/app.profilesidebar.component.ts +31 -24
- package/theme/layout/app/topbar/app.topbar.component.html +45 -45
- package/theme/layout/app/topbar/app.topbar.component.ts +32 -32
- package/theme/layout/service/app.layout.service.ts +178 -178
- package/theme/layout/service/app.menu.service.ts +2 -0
- package/ui/button/src/button.component.d.ts +1 -1
- package/ui/lib/src/input/common-input-validators.service.d.ts +2 -1
- package/util/block/index.d.ts +1 -0
- package/util/block/src/block.d.ts +28 -0
- package/util/pub-sub/src/pub-sub.service.d.ts +1 -2
- package/esm2022/boot/host/src/services/custom-manifest.mjs +0 -2
- package/esm2022/i18n/src/file-url-token.mjs +0 -3
- package/fesm2022/aril-app.component-sZDpvJDM.mjs.map +0 -1
- package/fesm2022/aril-aril-D__IXMsf.mjs +0 -207
- package/fesm2022/aril-aril-D__IXMsf.mjs.map +0 -1
- package/fesm2022/aril-boot-mfe-app.component-zro0FnKY.mjs.map +0 -1
- package/i18n/src/file-url-token.d.ts +0 -2
|
@@ -1,122 +1,65 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
|
+
import { RouterModule } from '@angular/router';
|
|
3
|
+
import { ButtonModule } from 'primeng/button';
|
|
2
4
|
import * as i0 from "@angular/core";
|
|
5
|
+
import * as i1 from "primeng/button";
|
|
6
|
+
import * as i2 from "@angular/router";
|
|
3
7
|
export class NotFoundComponent {
|
|
4
8
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: NotFoundComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: NotFoundComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
6
|
-
<
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<span class="text-900 lg:text-xl font-medium mb-0 block">Frequently Asked Questions</span>
|
|
30
|
-
<span class="text-600 lg:text-xl">Ultricies mi quis hendrerit dolor.</span>
|
|
31
|
-
</span>
|
|
32
|
-
</a>
|
|
33
|
-
<a routerLink="/" class="w-full flex align-items-center py-5 border-300 border-bottom-1">
|
|
34
|
-
<span
|
|
35
|
-
class="flex justify-content-center align-items-center bg-orange-400 border-round"
|
|
36
|
-
style="height: 3.5rem; width: 3.5rem">
|
|
37
|
-
<i class="pi pi-fw pi-question-circle text-50 text-2xl"></i>
|
|
38
|
-
</span>
|
|
39
|
-
<span class="ml-4 flex flex-column">
|
|
40
|
-
<span class="text-900 lg:text-xl font-medium mb-0">Solution Center</span>
|
|
41
|
-
<span class="text-600 lg:text-xl">Phasellus faucibus scelerisque eleifend.</span>
|
|
42
|
-
</span>
|
|
43
|
-
</a>
|
|
44
|
-
<a routerLink="/" class="w-full flex align-items-center mb-5 py-5 border-300 border-bottom-1">
|
|
45
|
-
<span
|
|
46
|
-
class="flex justify-content-center align-items-center bg-indigo-400 border-round"
|
|
47
|
-
style="height: 3.5rem; width: 3.5rem">
|
|
48
|
-
<i class="pi pi-fw pi-unlock text-50 text-2xl"></i>
|
|
49
|
-
</span>
|
|
50
|
-
<span class="ml-4 flex flex-column">
|
|
51
|
-
<span class="text-900 lg:text-xl font-medium mb-0">Permission Manager</span>
|
|
52
|
-
<span class="text-600 lg:text-xl">Accumsan in nisl nisi scelerisque</span>
|
|
53
|
-
</span>
|
|
54
|
-
</a>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</div>
|
|
58
|
-
</div>
|
|
59
|
-
`, isInline: true }); }
|
|
9
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: NotFoundComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
10
|
+
<svg
|
|
11
|
+
viewBox="0 0 960 540"
|
|
12
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
13
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
14
|
+
version="1.1"
|
|
15
|
+
class="min-h-screen min-w-screen fixed left-0"
|
|
16
|
+
style="bottom:-10rem"
|
|
17
|
+
preserveAspectRatio="none">
|
|
18
|
+
<rect x="0" y="0" width="960" height="540" fill="var(--surface-ground)"></rect>
|
|
19
|
+
<path
|
|
20
|
+
d="M0 331L26.7 321C53.3 311 106.7 291 160 291C213.3 291 266.7 311 320 329.5C373.3 348 426.7 365 480 373.2C533.3 381.3 586.7 380.7 640 373.8C693.3 367 746.7 354 800 341.2C853.3 328.3 906.7 315.7 933.3 309.3L960 303L960 541L933.3 541C906.7 541 853.3 541 800 541C746.7 541 693.3 541 640 541C586.7 541 533.3 541 480 541C426.7 541 373.3 541 320 541C266.7 541 213.3 541 160 541C106.7 541 53.3 541 26.7 541L0 541Z"
|
|
21
|
+
fill="var(--primary-color)"
|
|
22
|
+
stroke-linecap="round"
|
|
23
|
+
stroke-linejoin="miter"></path>
|
|
24
|
+
</svg>
|
|
25
|
+
<div class="px-5 min-h-screen flex justify-content-center align-items-center">
|
|
26
|
+
<div class="z-1 text-center">
|
|
27
|
+
<div class="text-900 font-bold text-8xl mb-4">Oops!</div>
|
|
28
|
+
<p class="line-height-3 mt-0 mb-5 text-700 text-xl font-medium">Sayfa Bulunamadı</p>
|
|
29
|
+
<p-button routerLink="/" styleClass="p-button-dark font-medium p-button-raised">Anasayfaya Git</p-button>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "size", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] }); }
|
|
60
33
|
}
|
|
61
34
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: NotFoundComponent, decorators: [{
|
|
62
35
|
type: Component,
|
|
63
36
|
args: [{
|
|
64
37
|
standalone: true,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
">
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
<span class="text-900 lg:text-xl font-medium mb-0 block">Frequently Asked Questions</span>
|
|
90
|
-
<span class="text-600 lg:text-xl">Ultricies mi quis hendrerit dolor.</span>
|
|
91
|
-
</span>
|
|
92
|
-
</a>
|
|
93
|
-
<a routerLink="/" class="w-full flex align-items-center py-5 border-300 border-bottom-1">
|
|
94
|
-
<span
|
|
95
|
-
class="flex justify-content-center align-items-center bg-orange-400 border-round"
|
|
96
|
-
style="height: 3.5rem; width: 3.5rem">
|
|
97
|
-
<i class="pi pi-fw pi-question-circle text-50 text-2xl"></i>
|
|
98
|
-
</span>
|
|
99
|
-
<span class="ml-4 flex flex-column">
|
|
100
|
-
<span class="text-900 lg:text-xl font-medium mb-0">Solution Center</span>
|
|
101
|
-
<span class="text-600 lg:text-xl">Phasellus faucibus scelerisque eleifend.</span>
|
|
102
|
-
</span>
|
|
103
|
-
</a>
|
|
104
|
-
<a routerLink="/" class="w-full flex align-items-center mb-5 py-5 border-300 border-bottom-1">
|
|
105
|
-
<span
|
|
106
|
-
class="flex justify-content-center align-items-center bg-indigo-400 border-round"
|
|
107
|
-
style="height: 3.5rem; width: 3.5rem">
|
|
108
|
-
<i class="pi pi-fw pi-unlock text-50 text-2xl"></i>
|
|
109
|
-
</span>
|
|
110
|
-
<span class="ml-4 flex flex-column">
|
|
111
|
-
<span class="text-900 lg:text-xl font-medium mb-0">Permission Manager</span>
|
|
112
|
-
<span class="text-600 lg:text-xl">Accumsan in nisl nisi scelerisque</span>
|
|
113
|
-
</span>
|
|
114
|
-
</a>
|
|
115
|
-
</div>
|
|
116
|
-
</div>
|
|
117
|
-
</div>
|
|
118
|
-
</div>
|
|
38
|
+
imports: [ButtonModule, RouterModule],
|
|
39
|
+
template: `
|
|
40
|
+
<svg
|
|
41
|
+
viewBox="0 0 960 540"
|
|
42
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
43
|
+
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
44
|
+
version="1.1"
|
|
45
|
+
class="min-h-screen min-w-screen fixed left-0"
|
|
46
|
+
style="bottom:-10rem"
|
|
47
|
+
preserveAspectRatio="none">
|
|
48
|
+
<rect x="0" y="0" width="960" height="540" fill="var(--surface-ground)"></rect>
|
|
49
|
+
<path
|
|
50
|
+
d="M0 331L26.7 321C53.3 311 106.7 291 160 291C213.3 291 266.7 311 320 329.5C373.3 348 426.7 365 480 373.2C533.3 381.3 586.7 380.7 640 373.8C693.3 367 746.7 354 800 341.2C853.3 328.3 906.7 315.7 933.3 309.3L960 303L960 541L933.3 541C906.7 541 853.3 541 800 541C746.7 541 693.3 541 640 541C586.7 541 533.3 541 480 541C426.7 541 373.3 541 320 541C266.7 541 213.3 541 160 541C106.7 541 53.3 541 26.7 541L0 541Z"
|
|
51
|
+
fill="var(--primary-color)"
|
|
52
|
+
stroke-linecap="round"
|
|
53
|
+
stroke-linejoin="miter"></path>
|
|
54
|
+
</svg>
|
|
55
|
+
<div class="px-5 min-h-screen flex justify-content-center align-items-center">
|
|
56
|
+
<div class="z-1 text-center">
|
|
57
|
+
<div class="text-900 font-bold text-8xl mb-4">Oops!</div>
|
|
58
|
+
<p class="line-height-3 mt-0 mb-5 text-700 text-xl font-medium">Sayfa Bulunamadı</p>
|
|
59
|
+
<p-button routerLink="/" styleClass="p-button-dark font-medium p-button-raised">Anasayfaya Git</p-button>
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
119
62
|
`
|
|
120
63
|
}]
|
|
121
64
|
}] });
|
|
122
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
65
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90Rm91bmQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXJpbC91dGlsL2N1c3RvbV9wYWdlcy9zcmMvbm90Rm91bmQuY29tcG9uZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDMUMsT0FBTyxFQUFVLFlBQVksRUFBRSxNQUFNLGlCQUFpQixDQUFDO0FBRXZELE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSxnQkFBZ0IsQ0FBQzs7OztBQThCOUMsTUFBTSxPQUFPLGlCQUFpQjs4R0FBakIsaUJBQWlCO2tHQUFqQixpQkFBaUIsd0VBekJuQjs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7RUF1QlQsMkRBeEJTLFlBQVksb1dBQUUsWUFBWTs7MkZBMEJ4QixpQkFBaUI7a0JBNUI3QixTQUFTO21CQUFDO29CQUNWLFVBQVUsRUFBRSxJQUFJO29CQUNoQixPQUFPLEVBQUUsQ0FBQyxZQUFZLEVBQUUsWUFBWSxDQUFDO29CQUNyQyxRQUFRLEVBQUU7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0VBdUJUO2lCQUNEIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgQ29tcG9uZW50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ZGl1bSBwLWJ1dHRvbi1yYWlzZWRcIj5BbmFzYXlmYXlhIEdpdDwvcC1idXR0b24+XHJcblx0XHRcdDwvZGl2PlxyXG5cdFx0PC9kaXY+XHJcblx0YFxyXG59KVxyXG5leHBvcnQgY2xhc3MgTm90Rm91bmRDb21wb25lbnQge31cclxuIl19
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
2
2
|
import { Injectable } from '@angular/core';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
|
|
5
|
-
popstate: 'popstate',
|
|
4
|
+
const PubSubEvents = {
|
|
6
5
|
navigateBetweenApps: 'navigateBetweenApps',
|
|
7
6
|
navigateInApps: 'navigateInApps'
|
|
8
7
|
};
|
|
@@ -27,4 +26,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
27
26
|
providedIn: 'root'
|
|
28
27
|
}]
|
|
29
28
|
}] });
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
29
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHViLXN1Yi5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXJpbC91dGlsL3B1Yi1zdWIvc3JjL3B1Yi1zdWIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx1REFBdUQ7QUFDdkQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQzs7QUFVM0MsTUFBTSxZQUFZLEdBQUc7SUFDcEIsbUJBQW1CLEVBQUUscUJBQXFCO0lBQzFDLGNBQWMsRUFBRSxnQkFBZ0I7Q0FDaEMsQ0FBQztBQUtGLE1BQU0sT0FBTyxhQUFhO0lBQ3pCLE9BQU8sQ0FBQyxDQUFjO1F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wcHMnXG59O1xuXG5ASW5qZWN0YWJsZSh7XG5cdHByb3ZpZGVkSW46ICdyb290J1xufSlcbmV4cG9ydCBjbGFzcyBQdWJTdWJTZXJ2aWNlIHtcblx0cHVibGlzaChlOiBDdXN0b21FdmVudCkge1xuXHRcdGRpc3BhdGNoRXZlbnQobmV3IEN1c3RvbUV2ZW50KGUubmFtZSwgeyBkZXRhaWw6IGUuZGF0YSB9KSk7XG5cdH1cblxuXHRzdWJzY3JpYmUoZXZlbnROYW1lOiBrZXlvZiB0eXBlb2YgUHViU3ViRXZlbnRzLCBsaXN0ZW5lcjogKGRhdGE6IGFueSkgPT4gdm9pZCkge1xuXHRcdGFkZEV2ZW50TGlzdGVuZXIoZXZlbnROYW1lLCAoZXZlbnQ6IGFueSkgPT4ge1xuXHRcdFx0bGlzdGVuZXIoZXZlbnQuZGV0YWlsKTtcblx0XHR9KTtcblx0fVxuXG5cdHVuU3Vic2NyaWJlKGV2ZW50TmFtZToga2V5b2YgdHlwZW9mIFB1YlN1YkV2ZW50cywgbGlzdGVuZXI6ICgpID0+IHZvaWQpIHtcblx0XHRyZW1vdmVFdmVudExpc3RlbmVyKGV2ZW50TmFtZSwgbGlzdGVuZXIpO1xuXHR9XG59XG4iXX0=
|
package/fesm2022/{aril-boot-mfe-app.component-zro0FnKY.mjs → aril-app.component-pGPjpk8x.mjs}
RENAMED
|
@@ -2,27 +2,28 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/router';
|
|
4
4
|
import { RouterOutlet } from '@angular/router';
|
|
5
|
-
import {
|
|
5
|
+
import { ModuleFederationToolsModule } from '@angular-architects/module-federation-tools';
|
|
6
6
|
import * as i3 from 'aril/theme/layout';
|
|
7
7
|
import { AppLayoutComponent, MFELayoutComponent } from 'aril/theme/layout';
|
|
8
|
-
import { appName, menuItems } from './aril
|
|
8
|
+
import { a as appName, m as menuItems } from './aril.mjs';
|
|
9
9
|
import * as i2 from 'aril/util/pub-sub';
|
|
10
10
|
import '@angular/common/http';
|
|
11
|
-
import '@angular/elements';
|
|
12
11
|
import '@angular/platform-browser';
|
|
13
12
|
import '@angular/platform-browser/animations';
|
|
14
13
|
import 'primeng/api';
|
|
15
|
-
import '
|
|
16
|
-
import 'aril/http';
|
|
14
|
+
import 'aril/boot/config';
|
|
17
15
|
import 'aril/i18n';
|
|
18
16
|
import 'aril/keycloak';
|
|
17
|
+
import '@angular/elements';
|
|
18
|
+
import 'keycloak-angular';
|
|
19
19
|
import 'aril/util/loaders';
|
|
20
20
|
|
|
21
21
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
22
22
|
class AppComponent {
|
|
23
23
|
constructor(router, pubSubService, appMenuService) {
|
|
24
|
+
this.router = router;
|
|
24
25
|
this.isMFEMode = globalThis.isMFEMode;
|
|
25
|
-
connectRouter(
|
|
26
|
+
this.connectRouter();
|
|
26
27
|
globalThis.activeMF = appName;
|
|
27
28
|
pubSubService.subscribe('navigateInApps', (data) => {
|
|
28
29
|
if (data.path.startsWith(appName, 1))
|
|
@@ -35,6 +36,12 @@ class AppComponent {
|
|
|
35
36
|
appMenuService.menuConfig.set({ items: structuredClone(menuItems), prefix: appName });
|
|
36
37
|
}
|
|
37
38
|
}
|
|
39
|
+
connectRouter() {
|
|
40
|
+
this.router.initialNavigation();
|
|
41
|
+
window.addEventListener('popstate', () => {
|
|
42
|
+
this.router.initialNavigation();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
38
45
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppComponent, deps: [{ token: i1.Router }, { token: i2.PubSubService }, { token: i3.AppMenuService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
46
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: AppComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
40
47
|
@if (isMFEMode) {
|
|
@@ -60,4 +67,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
60
67
|
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.PubSubService }, { type: i3.AppMenuService }] });
|
|
61
68
|
|
|
62
69
|
export { AppComponent };
|
|
63
|
-
//# sourceMappingURL=aril-
|
|
70
|
+
//# sourceMappingURL=aril-app.component-pGPjpk8x.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-app.component-pGPjpk8x.mjs","sources":["../../projects/aril/boot/mfe/src/app.component.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Component } from '@angular/core';\nimport { Router, RouterOutlet } from '@angular/router';\n\nimport { ModuleFederationToolsModule } from '@angular-architects/module-federation-tools';\n\nimport { AppLayoutComponent, AppMenuService, MFELayoutComponent } from 'aril/theme/layout';\nimport { PubSubService } from 'aril/util/pub-sub';\n\nimport { appName, menuItems } from './bootstrap';\n\n@Component({\n\tstandalone: true,\n\ttemplate: `\n\t\t@if (isMFEMode) {\n\t\t\t<mfe-layout></mfe-layout>\n\t\t} @else {\n\t\t\t<app-layout></app-layout>\n\t\t}\n\t`,\n\timports: [RouterOutlet, ModuleFederationToolsModule, AppLayoutComponent, MFELayoutComponent]\n})\nexport class AppComponent {\n\tconstructor(\n\t\tprivate router: Router,\n\t\tpubSubService: PubSubService,\n\t\tappMenuService: AppMenuService\n\t) {\n\t\tthis.connectRouter();\n\n\t\t(<any>globalThis).activeMF = appName;\n\n\t\tpubSubService.subscribe('navigateInApps', (data: any) => {\n\t\t\tif (data.path.startsWith(appName, 1)) router.navigateByUrl(data.path);\n\t\t});\n\n\t\tif (this.isMFEMode) {\n\t\t\tappMenuService.subMenuConfig.set({ items: structuredClone(menuItems), prefix: appName });\n\t\t} else {\n\t\t\tappMenuService.menuConfig.set({ items: structuredClone(menuItems), prefix: appName });\n\t\t}\n\t}\n\n\tisMFEMode = (<any>globalThis).isMFEMode;\n\n\tconnectRouter() {\n\t\tthis.router.initialNavigation();\n\n\t\twindow.addEventListener('popstate', () => {\n\t\t\tthis.router.initialNavigation();\n\t\t});\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;MAsBa,YAAY,CAAA;AACxB,IAAA,WAAA,CACS,MAAc,EACtB,aAA4B,EAC5B,cAA8B,EAAA;QAFtB,IAAM,CAAA,MAAA,GAAN,MAAM,CAAQ;AAmBvB,QAAA,IAAA,CAAA,SAAS,GAAS,UAAW,CAAC,SAAS,CAAC;QAfvC,IAAI,CAAC,aAAa,EAAE,CAAC;AAEf,QAAA,UAAW,CAAC,QAAQ,GAAG,OAAO,CAAC;QAErC,aAAa,CAAC,SAAS,CAAC,gBAAgB,EAAE,CAAC,IAAS,KAAI;YACvD,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC,CAAC;AAAE,gBAAA,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACvE,SAAC,CAAC,CAAC;AAEH,QAAA,IAAI,IAAI,CAAC,SAAS,EAAE;AACnB,YAAA,cAAc,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;SACzF;aAAM;AACN,YAAA,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,eAAe,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;SACtF;KACD;IAID,aAAa,GAAA;AACZ,QAAA,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;AAEhC,QAAA,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAE,MAAK;AACxC,YAAA,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,CAAC;AACjC,SAAC,CAAC,CAAC;KACH;8GA7BW,YA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
constructor() {
|
|
6
|
+
this.api = '';
|
|
7
|
+
this.apps = [];
|
|
8
|
+
this.plugins = {};
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
const APP_CONFIGS = new AppConfigs();
|
|
12
|
+
function loadAppConfigs(httpClient) {
|
|
13
|
+
return () => httpClient.get(isDevMode() ? './assets/config.local.json' : './assets/config.json').pipe(tap((config) => {
|
|
14
|
+
Object.assign(APP_CONFIGS, { ...config });
|
|
15
|
+
}), catchError((err) => {
|
|
16
|
+
console.log('Error loading APP_CONFIGS', err);
|
|
17
|
+
return of(APP_CONFIGS);
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Generated bundle index. Do not edit.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
export { APP_CONFIGS, loadAppConfigs };
|
|
26
|
+
//# sourceMappingURL=aril-boot-config.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-boot-config.mjs","sources":["../../projects/aril/boot/config/src/app.configs.ts","../../projects/aril/boot/config/aril-boot-config.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\r\nimport { isDevMode } from '@angular/core';\r\n\r\nimport { Observable, catchError, of, tap } from 'rxjs';\r\n\r\nimport { CustomRemoteConfig } from './custom-remote';\r\n\r\nclass AppConfigs {\r\n\tapi: string = '';\r\n\tapps: CustomRemoteConfig[] = [];\r\n\tplugins: { [key: string]: CustomRemoteConfig } = {};\r\n}\r\n\r\nexport const APP_CONFIGS = new AppConfigs();\r\n\r\nexport function loadAppConfigs(httpClient: HttpClient): () => Observable<AppConfigs> {\r\n\treturn () =>\r\n\t\thttpClient.get<AppConfigs>(isDevMode() ? './assets/config.local.json' : './assets/config.json').pipe(\r\n\t\t\ttap((config) => {\r\n\t\t\t\tObject.assign(APP_CONFIGS, { ...config });\r\n\t\t\t}),\r\n\t\t\tcatchError((err) => {\r\n\t\t\t\tconsole.log('Error loading APP_CONFIGS', err);\r\n\t\t\t\treturn of(APP_CONFIGS);\r\n\t\t\t})\r\n\t\t);\r\n}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAOA,MAAM,UAAU,CAAA;AAAhB,IAAA,WAAA,GAAA;QACC,IAAG,CAAA,GAAA,GAAW,EAAE,CAAC;QACjB,IAAI,CAAA,IAAA,GAAyB,EAAE,CAAC;QAChC,IAAO,CAAA,OAAA,GAA0C,EAAE,CAAC;KACpD;AAAA,CAAA;AAEY,MAAA,WAAW,GAAG,IAAI,UAAU,GAAG;AAEtC,SAAU,cAAc,CAAC,UAAsB,EAAA;IACpD,OAAO,MACN,UAAU,CAAC,GAAG,CAAa,SAAS,EAAE,GAAG,4BAA4B,GAAG,sBAAsB,CAAC,CAAC,IAAI,CACnG,GAAG,CAAC,CAAC,MAAM,KAAI;QACd,MAAM,CAAC,MAAM,CAAC,WAAW,EAAE,EAAE,GAAG,MAAM,EAAE,CAAC,CAAC;AAC3C,KAAC,CAAC,EACF,UAAU,CAAC,CAAC,GAAG,KAAI;AAClB,QAAA,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,GAAG,CAAC,CAAC;AAC9C,QAAA,OAAO,EAAE,CAAC,WAAW,CAAC,CAAC;KACvB,CAAC,CACF,CAAC;AACJ;;AC1BA;;AAEG;;;;"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { provideHttpClient, withInterceptors } from '@angular/common/http';
|
|
1
|
+
import { provideHttpClient, withInterceptors, HttpClient } from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
3
|
import { inject, Renderer2, ElementRef, Component, ViewEncapsulation, ViewChild, NgZone, importProvidersFrom, APP_INITIALIZER, Injectable } from '@angular/core';
|
|
4
4
|
import { bootstrapApplication } from '@angular/platform-browser';
|
|
5
5
|
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
6
|
+
import * as i1 from '@angular/router';
|
|
7
|
+
import { RouterOutlet, provideRouter, withComponentInputBinding, withHashLocation } from '@angular/router';
|
|
6
8
|
import { MessageService, ConfirmationService } from 'primeng/api';
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { i18nModule, i18nRootFileUrl } from 'aril/i18n';
|
|
9
|
+
import { loadAppConfigs } from 'aril/boot/config';
|
|
10
|
+
import { i18nModule, i18nFolderName } from 'aril/i18n';
|
|
10
11
|
import { authInterceptor, KeycloakManager } from 'aril/keycloak';
|
|
11
|
-
import * as i1 from '@angular/router';
|
|
12
|
-
import { RouterOutlet } from '@angular/router';
|
|
13
12
|
import { WebComponentWrapper, ModuleFederationToolsModule, startsWith } from '@angular-architects/module-federation-tools';
|
|
14
13
|
import { AppLayoutComponent, AppMenuService } from 'aril/theme/layout';
|
|
15
14
|
import * as i2 from 'aril/util/pub-sub';
|
|
@@ -72,28 +71,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
72
71
|
}]
|
|
73
72
|
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.PubSubService }] });
|
|
74
73
|
|
|
75
|
-
const boot = (
|
|
74
|
+
const boot = (routes, pluginInitializer, keycloakConfig) => {
|
|
76
75
|
const appConfig = {
|
|
77
76
|
providers: [
|
|
78
77
|
provideAnimations(),
|
|
79
78
|
provideHttpClient(withInterceptors([authInterceptor])),
|
|
80
|
-
|
|
81
|
-
importProvidersFrom(i18nModule
|
|
79
|
+
provideRouter(routes, withComponentInputBinding(), withHashLocation()),
|
|
80
|
+
importProvidersFrom(i18nModule),
|
|
82
81
|
MessageService,
|
|
83
82
|
ConfirmationService,
|
|
84
83
|
pluginInitializer,
|
|
85
84
|
{
|
|
86
85
|
provide: APP_INITIALIZER,
|
|
87
|
-
useFactory: (keycloak) => keycloak.init(
|
|
86
|
+
useFactory: (keycloak) => keycloak.init(keycloakConfig),
|
|
88
87
|
multi: true,
|
|
89
88
|
deps: [KeycloakManager]
|
|
90
89
|
},
|
|
91
90
|
{
|
|
92
|
-
provide:
|
|
93
|
-
|
|
91
|
+
provide: APP_INITIALIZER,
|
|
92
|
+
useFactory: loadAppConfigs,
|
|
93
|
+
multi: true,
|
|
94
|
+
deps: [HttpClient]
|
|
94
95
|
},
|
|
95
96
|
{
|
|
96
|
-
provide:
|
|
97
|
+
provide: i18nFolderName,
|
|
97
98
|
useValue: 'host'
|
|
98
99
|
}
|
|
99
100
|
]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aril-boot-host.mjs","sources":["../../projects/aril/boot/host/src/services/showdowDOMWrapper.ts","../../projects/aril/boot/host/src/app.component.ts","../../projects/aril/boot/host/src/bootstrap.ts","../../projects/aril/boot/host/src/services/microFrontEnd.service.ts","../../projects/aril/boot/host/aril-boot-host.ts"],"sourcesContent":["import { Component, ElementRef, OnInit, Renderer2, ViewChild, ViewEncapsulation, inject } from '@angular/core';\n\nimport { WebComponentWrapper } from '@angular-architects/module-federation-tools';\n\n@Component({\n\tstandalone: true,\n\ttemplate: '<div #vc></div>',\n\tencapsulation: ViewEncapsulation.ShadowDom\n})\nexport class ShadowDOMWrapperComponent extends WebComponentWrapper implements OnInit {\n\t@ViewChild('vc', { read: ElementRef, static: true }) override vc!: ElementRef;\n\n\tprivate renderer = inject(Renderer2);\n\n\tngOnInit(): void {\n\t\tconst shadowRoot = this.vc.nativeElement.parentNode;\n\t\tconst styleUrls = this['route'].snapshot.data.styleUrls || [];\n\n\t\t// Inject styles into the Shadow DOM\n\t\tstyleUrls.forEach((url: string) => {\n\t\t\tconst link = this.renderer.createElement('link');\n\t\t\tlink.setAttribute('rel', 'stylesheet');\n\t\t\tlink.setAttribute('type', 'text/css');\n\t\t\tlink.setAttribute('href', url);\n\t\t\tthis.renderer.appendChild(shadowRoot, link);\n\t\t});\n\t}\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Component, NgZone, inject } from '@angular/core';\nimport { Router, RouterOutlet } from '@angular/router';\n\nimport { ModuleFederationToolsModule } from '@angular-architects/module-federation-tools';\n\nimport { AppLayoutComponent } from 'aril/theme/layout';\nimport { PubSubService } from 'aril/util/pub-sub';\n\nimport { ShadowDOMWrapperComponent } from './services/showdowDOMWrapper';\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-root',\n\ttemplate: ` <app-layout></app-layout> `,\n\timports: [RouterOutlet, ModuleFederationToolsModule, ShadowDOMWrapperComponent, AppLayoutComponent]\n})\nexport class AppComponent {\n\tconstructor(router: Router, pubSubService: PubSubService) {\n\t\t(<any>globalThis).ngZone = inject(NgZone);\n\t\t(<any>globalThis).isMFEMode = true;\n\n\t\tpubSubService.subscribe('navigateBetweenApps', (data: any) => {\n\t\t\trouter.navigateByUrl(data.path);\n\t\t\tpubSubService.publish({\n\t\t\t\tname: 'navigateInApps',\n\t\t\t\tdata: data\n\t\t\t});\n\t\t});\n\t}\n}\n","import { provideHttpClient, withInterceptors } from '@angular/common/http';\nimport { APP_INITIALIZER, ApplicationConfig, EnvironmentProviders, importProvidersFrom } from '@angular/core';\nimport { bootstrapApplication } from '@angular/platform-browser';\nimport { provideAnimations } from '@angular/platform-browser/animations';\n\nimport { ConfirmationService, MessageService } from 'primeng/api';\n\nimport { KeycloakAngularModule, KeycloakOptions } from 'keycloak-angular';\n\nimport { API_TOKEN } from 'aril/http';\nimport { i18nModule, i18nRootFileUrl } from 'aril/i18n';\nimport { KeycloakManager, authInterceptor } from 'aril/keycloak';\n\nimport { AppComponent } from './app.component';\nimport { PluginInitializer } from './services/plugin-init.token';\n\nexport const boot = (\n\trouterProvider: EnvironmentProviders,\n\tpluginInitializer: PluginInitializer,\n\toptions: KeycloakOptions,\n\tapiURL: string = ''\n) => {\n\tconst appConfig: ApplicationConfig = {\n\t\tproviders: [\n\t\t\tprovideAnimations(),\n\t\t\tprovideHttpClient(withInterceptors([authInterceptor])),\n\t\t\trouterProvider,\n\t\t\timportProvidersFrom(i18nModule, KeycloakAngularModule),\n\t\t\tMessageService,\n\t\t\tConfirmationService,\n\t\t\tpluginInitializer,\n\t\t\t{\n\t\t\t\tprovide: APP_INITIALIZER,\n\t\t\t\tuseFactory: (keycloak: KeycloakManager) => keycloak.init(options),\n\t\t\t\tmulti: true,\n\t\t\t\tdeps: [KeycloakManager]\n\t\t\t},\n\t\t\t{\n\t\t\t\tprovide: API_TOKEN,\n\t\t\t\tuseValue: apiURL\n\t\t\t},\n\t\t\t{\n\t\t\t\tprovide: i18nRootFileUrl,\n\t\t\t\tuseValue: 'host'\n\t\t\t}\n\t\t]\n\t};\n\n\tbootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));\n};\n","import { Injectable, inject } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nimport { MenuItem } from 'primeng/api';\n\nimport {\n\tWebComponentWrapper,\n\tWebComponentWrapperOptions,\n\tstartsWith\n} from '@angular-architects/module-federation-tools';\n\nimport { AppMenuService } from 'aril/theme/layout';\n\nimport { CustomRemoteConfig } from './custom-manifest';\nimport { ShadowDOMWrapperComponent } from './showdowDOMWrapper';\n\n@Injectable({ providedIn: 'root' })\nexport class MicroFrontendService {\n\tprivate appMenuService = inject(AppMenuService);\n\n\tbuildRoutes(plugins: CustomRemoteConfig[]): Routes {\n\t\tconst mfeRoutes: Routes = plugins.map((config) => ({\n\t\t\tmatcher: startsWith(config.remoteName),\n\t\t\tcomponent: config.shadowDomPassive ? WebComponentWrapper : ShadowDOMWrapperComponent,\n\t\t\tdata: config as WebComponentWrapperOptions\n\t\t}));\n\n\t\treturn mfeRoutes;\n\t}\n\n\tsetMenuItems(plugins: CustomRemoteConfig[]): void {\n\t\tconst menuItems: MenuItem[] = plugins.map((config) => {\n\t\t\treturn {\n\t\t\t\tlabel: config.remoteName,\n\t\t\t\ticon: 'pi pi-fw pi-bars',\n\t\t\t\trouterLink: config.remoteName\n\t\t\t};\n\t\t});\n\n\t\tthis.appMenuService.menuConfig.set({ items: menuItems });\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index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AAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;AChBlC;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"aril-boot-host.mjs","sources":["../../projects/aril/boot/host/src/services/showdowDOMWrapper.ts","../../projects/aril/boot/host/src/app.component.ts","../../projects/aril/boot/host/src/bootstrap.ts","../../projects/aril/boot/host/src/services/microFrontEnd.service.ts","../../projects/aril/boot/host/aril-boot-host.ts"],"sourcesContent":["import { Component, ElementRef, OnInit, Renderer2, ViewChild, ViewEncapsulation, inject } from '@angular/core';\n\nimport { WebComponentWrapper } from '@angular-architects/module-federation-tools';\n\n@Component({\n\tstandalone: true,\n\ttemplate: '<div #vc></div>',\n\tencapsulation: ViewEncapsulation.ShadowDom\n})\nexport class ShadowDOMWrapperComponent extends WebComponentWrapper implements OnInit {\n\t@ViewChild('vc', { read: ElementRef, static: true }) override vc!: ElementRef;\n\n\tprivate renderer = inject(Renderer2);\n\n\tngOnInit(): void {\n\t\tconst shadowRoot = this.vc.nativeElement.parentNode;\n\t\tconst styleUrls = this['route'].snapshot.data.styleUrls || [];\n\n\t\t// Inject styles into the Shadow DOM\n\t\tstyleUrls.forEach((url: string) => {\n\t\t\tconst link = this.renderer.createElement('link');\n\t\t\tlink.setAttribute('rel', 'stylesheet');\n\t\t\tlink.setAttribute('type', 'text/css');\n\t\t\tlink.setAttribute('href', url);\n\t\t\tthis.renderer.appendChild(shadowRoot, link);\n\t\t});\n\t}\n}\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Component, NgZone, inject } from '@angular/core';\nimport { Router, RouterOutlet } from '@angular/router';\n\nimport { ModuleFederationToolsModule } from '@angular-architects/module-federation-tools';\n\nimport { AppLayoutComponent } from 'aril/theme/layout';\nimport { PubSubService } from 'aril/util/pub-sub';\n\nimport { ShadowDOMWrapperComponent } from './services/showdowDOMWrapper';\n\n@Component({\n\tstandalone: true,\n\tselector: 'aril-root',\n\ttemplate: ` <app-layout></app-layout> `,\n\timports: [RouterOutlet, ModuleFederationToolsModule, ShadowDOMWrapperComponent, AppLayoutComponent]\n})\nexport class AppComponent {\n\tconstructor(router: Router, pubSubService: PubSubService) {\n\t\t(<any>globalThis).ngZone = inject(NgZone);\n\t\t(<any>globalThis).isMFEMode = true;\n\n\t\tpubSubService.subscribe('navigateBetweenApps', (data: any) => {\n\t\t\trouter.navigateByUrl(data.path);\n\t\t\tpubSubService.publish({\n\t\t\t\tname: 'navigateInApps',\n\t\t\t\tdata: data\n\t\t\t});\n\t\t});\n\t}\n}\n","import { HttpClient, provideHttpClient, withInterceptors } from '@angular/common/http';\r\nimport { APP_INITIALIZER, ApplicationConfig, importProvidersFrom } from '@angular/core';\r\nimport { bootstrapApplication } from '@angular/platform-browser';\r\nimport { provideAnimations } from '@angular/platform-browser/animations';\r\nimport { Routes, provideRouter, withComponentInputBinding, withHashLocation } from '@angular/router';\r\n\r\nimport { ConfirmationService, MessageService } from 'primeng/api';\r\n\r\nimport { KeycloakAngularModule, KeycloakOptions } from 'keycloak-angular';\r\n\r\nimport { loadAppConfigs } from 'aril/boot/config';\r\nimport { i18nFolderName, i18nModule } from 'aril/i18n';\r\nimport { KeycloakManager, authInterceptor } from 'aril/keycloak';\r\n\r\nimport { AppComponent } from './app.component';\r\nimport { PluginInitializer } from './services/plugin-init.token';\r\n\r\nexport const boot = (routes: Routes, pluginInitializer: PluginInitializer, keycloakConfig: KeycloakOptions) => {\r\n\tconst appConfig: ApplicationConfig = {\r\n\t\tproviders: [\r\n\t\t\tprovideAnimations(),\r\n\t\t\tprovideHttpClient(withInterceptors([authInterceptor])),\r\n\t\t\tprovideRouter(routes, withComponentInputBinding(), withHashLocation()),\r\n\t\t\timportProvidersFrom(i18nModule),\r\n\t\t\tMessageService,\r\n\t\t\tConfirmationService,\r\n\t\t\tpluginInitializer,\r\n\t\t\t{\r\n\t\t\t\tprovide: APP_INITIALIZER,\r\n\t\t\t\tuseFactory: (keycloak: KeycloakManager) => keycloak.init(keycloakConfig),\r\n\t\t\t\tmulti: true,\r\n\t\t\t\tdeps: [KeycloakManager]\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tprovide: APP_INITIALIZER,\r\n\t\t\t\tuseFactory: loadAppConfigs,\r\n\t\t\t\tmulti: true,\r\n\t\t\t\tdeps: [HttpClient]\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tprovide: i18nFolderName,\r\n\t\t\t\tuseValue: 'host'\r\n\t\t\t}\r\n\t\t]\r\n\t};\r\n\r\n\tbootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));\r\n};\r\n","import { Injectable, inject } from '@angular/core';\nimport { Routes } from '@angular/router';\n\nimport { MenuItem } from 'primeng/api';\n\nimport {\n\tWebComponentWrapper,\n\tWebComponentWrapperOptions,\n\tstartsWith\n} from '@angular-architects/module-federation-tools';\n\nimport { CustomRemoteConfig } from 'aril/boot/config';\nimport { AppMenuService } from 'aril/theme/layout';\n\nimport { ShadowDOMWrapperComponent } from './showdowDOMWrapper';\n\n@Injectable({ providedIn: 'root' })\nexport class MicroFrontendService {\n\tprivate appMenuService = inject(AppMenuService);\n\n\tbuildRoutes(plugins: CustomRemoteConfig[]): Routes {\n\t\tconst mfeRoutes: Routes = plugins.map((config) => ({\n\t\t\tmatcher: startsWith(config.remoteName),\n\t\t\tcomponent: config.shadowDomPassive ? WebComponentWrapper : ShadowDOMWrapperComponent,\n\t\t\tdata: config as WebComponentWrapperOptions\n\t\t}));\n\n\t\treturn mfeRoutes;\n\t}\n\n\tsetMenuItems(plugins: CustomRemoteConfig[]): void {\n\t\tconst menuItems: MenuItem[] = plugins.map((config) => {\n\t\t\treturn {\n\t\t\t\tlabel: config.remoteName,\n\t\t\t\ticon: 'pi pi-fw pi-bars',\n\t\t\t\trouterLink: config.remoteName\n\t\t\t};\n\t\t});\n\n\t\tthis.appMenuService.menuConfig.set({ items: menuItems });\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AASM,MAAO,yBAA0B,SAAQ,mBAAmB,CAAA;AALlE,IAAA,WAAA,GAAA;;AAQS,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC,CAAC;AAerC,KAAA;IAbA,QAAQ,GAAA;QACP,MAAM,UAAU,GAAG,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,UAAU,CAAC;AACpD,QAAA,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC;;AAG9D,QAAA,SAAS,CAAC,OAAO,CAAC,CAAC,GAAW,KAAI;YACjC,MAAM,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;AACjD,YAAA,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,YAAY,CAAC,CAAC;AACvC,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;AACtC,YAAA,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YAC/B,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;AAC7C,SAAC,CAAC,CAAC;KACH;8GAjBW,yBAAyB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;kGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,WAAA,EAAA,CAAA,EAAA,YAAA,EAAA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C;AACH,SAAC,CAAC,CAAC;AAEH,QAAA,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;KACzD;8GAvBW,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA,EAAA;AAApB,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cADP,MAAM,EAAA,CAAA,CAAA,EAAA;;2FACnB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADhC,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE,CAAA;;;AChBlC;;AAEG;;;;"}
|
package/fesm2022/{aril-app.component-sZDpvJDM.mjs → aril-boot-mfe-app.component-h5TW-GVW.mjs}
RENAMED
|
@@ -2,27 +2,28 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/router';
|
|
4
4
|
import { RouterOutlet } from '@angular/router';
|
|
5
|
-
import {
|
|
5
|
+
import { ModuleFederationToolsModule } from '@angular-architects/module-federation-tools';
|
|
6
6
|
import * as i3 from 'aril/theme/layout';
|
|
7
7
|
import { AppLayoutComponent, MFELayoutComponent } from 'aril/theme/layout';
|
|
8
|
-
import { a as appName, m as menuItems } from './aril-aril-
|
|
8
|
+
import { a as appName, m as menuItems } from './aril-boot-mfe-aril-boot-mfe-7ZwVVddO.mjs';
|
|
9
9
|
import * as i2 from 'aril/util/pub-sub';
|
|
10
10
|
import '@angular/common/http';
|
|
11
|
+
import '@angular/elements';
|
|
11
12
|
import '@angular/platform-browser';
|
|
12
13
|
import '@angular/platform-browser/animations';
|
|
13
14
|
import 'primeng/api';
|
|
14
15
|
import 'keycloak-angular';
|
|
15
|
-
import 'aril/
|
|
16
|
+
import 'aril/boot/config';
|
|
16
17
|
import 'aril/i18n';
|
|
17
18
|
import 'aril/keycloak';
|
|
18
|
-
import '@angular/elements';
|
|
19
19
|
import 'aril/util/loaders';
|
|
20
20
|
|
|
21
21
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
22
22
|
class AppComponent {
|
|
23
23
|
constructor(router, pubSubService, appMenuService) {
|
|
24
|
+
this.router = router;
|
|
24
25
|
this.isMFEMode = globalThis.isMFEMode;
|
|
25
|
-
connectRouter(
|
|
26
|
+
this.connectRouter();
|
|
26
27
|
globalThis.activeMF = appName;
|
|
27
28
|
pubSubService.subscribe('navigateInApps', (data) => {
|
|
28
29
|
if (data.path.startsWith(appName, 1))
|
|
@@ -35,6 +36,12 @@ class AppComponent {
|
|
|
35
36
|
appMenuService.menuConfig.set({ items: structuredClone(menuItems), prefix: appName });
|
|
36
37
|
}
|
|
37
38
|
}
|
|
39
|
+
connectRouter() {
|
|
40
|
+
this.router.initialNavigation();
|
|
41
|
+
window.addEventListener('popstate', () => {
|
|
42
|
+
this.router.initialNavigation();
|
|
43
|
+
});
|
|
44
|
+
}
|
|
38
45
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppComponent, deps: [{ token: i1.Router }, { token: i2.PubSubService }, { token: i3.AppMenuService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
39
46
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.1.2", type: AppComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: `
|
|
40
47
|
@if (isMFEMode) {
|
|
@@ -60,4 +67,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImpor
|
|
|
60
67
|
}], ctorParameters: () => [{ type: i1.Router }, { type: i2.PubSubService }, { type: i3.AppMenuService }] });
|
|
61
68
|
|
|
62
69
|
export { AppComponent };
|
|
63
|
-
//# sourceMappingURL=aril-app.component-
|
|
70
|
+
//# sourceMappingURL=aril-boot-mfe-app.component-h5TW-GVW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-boot-mfe-app.component-h5TW-GVW.mjs","sources":["../../projects/aril/boot/mfe/src/app.component.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport { Component } from '@angular/core';\nimport { Router, RouterOutlet } from '@angular/router';\n\nimport { ModuleFederationToolsModule } from '@angular-architects/module-federation-tools';\n\nimport { AppLayoutComponent, AppMenuService, MFELayoutComponent } from 'aril/theme/layout';\nimport { PubSubService } from 'aril/util/pub-sub';\n\nimport { appName, menuItems } from './bootstrap';\n\n@Component({\n\tstandalone: true,\n\ttemplate: `\n\t\t@if (isMFEMode) {\n\t\t\t<mfe-layout></mfe-layout>\n\t\t} @else {\n\t\t\t<app-layout></app-layout>\n\t\t}\n\t`,\n\timports: [RouterOutlet, ModuleFederationToolsModule, AppLayoutComponent, MFELayoutComponent]\n})\nexport class AppComponent {\n\tconstructor(\n\t\tprivate router: Router,\n\t\tpubSubService: PubSubService,\n\t\tappMenuService: AppMenuService\n\t) {\n\t\tthis.connectRouter();\n\n\t\t(<any>globalThis).activeMF = appName;\n\n\t\tpubSubService.subscribe('navigateInApps', (data: any) => {\n\t\t\tif (data.path.startsWith(appName, 1)) router.navigateByUrl(data.path);\n\t\t});\n\n\t\tif (this.isMFEMode) {\n\t\t\tappMenuService.subMenuConfig.set({ items: structuredClone(menuItems), prefix: appName });\n\t\t} else {\n\t\t\tappMenuService.menuConfig.set({ items: structuredClone(menuItems), prefix: appName });\n\t\t}\n\t}\n\n\tisMFEMode = (<any>globalThis).isMFEMode;\n\n\tconnectRouter() {\n\t\tthis.router.initialNavigation();\n\n\t\twindow.addEventListener('popstate', () => {\n\t\t\tthis.router.initialNavigation();\n\t\t});\n\t}\n}\n"],"names":[],"mappings":";;;;;;;;;;;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A,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA,EAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAY,EATd,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;AAMT,CAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EACuB,2BAA2B,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,kBAAkB,EAAA,QAAA,EAAA,YAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAE/E,YAAY,EAAA,UAAA,EAAA,CAAA;kBAXxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,CAAA;;;;;;AAMT,CAAA,CAAA;oBACD,OAAO,EAAE,CAAC,YAAY,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,kBAAkB,CAAC;AAC5F,iBAAA,CAAA;;;;;"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { provideHttpClient, withInterceptors, HttpClient } from '@angular/common/http';
|
|
2
|
+
import { importProvidersFrom, NgZone, APP_INITIALIZER } from '@angular/core';
|
|
3
|
+
import { createCustomElement } from '@angular/elements';
|
|
4
|
+
import { createApplication } from '@angular/platform-browser';
|
|
5
|
+
import { provideAnimations } from '@angular/platform-browser/animations';
|
|
6
|
+
import { provideRouter, withComponentInputBinding, withHashLocation } from '@angular/router';
|
|
7
|
+
import { MessageService, ConfirmationService } from 'primeng/api';
|
|
8
|
+
import { KeycloakAngularModule } from 'keycloak-angular';
|
|
9
|
+
import { loadAppConfigs } from 'aril/boot/config';
|
|
10
|
+
import { i18nModule, i18nFolderName } from 'aril/i18n';
|
|
11
|
+
import { authInterceptor, KeycloakManager } from 'aril/keycloak';
|
|
12
|
+
import { StyleLoaderService } from 'aril/util/loaders';
|
|
13
|
+
|
|
14
|
+
const appComponentLoader = async () => {
|
|
15
|
+
const { AppComponent } = await import('./aril-boot-mfe-app.component-h5TW-GVW.mjs');
|
|
16
|
+
return AppComponent;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
function loadStylesheets(styleLoaderService, appName) {
|
|
20
|
+
const styles = [
|
|
21
|
+
'layout.css',
|
|
22
|
+
'ui.common.css',
|
|
23
|
+
'preloading.css',
|
|
24
|
+
'primeng.min.css',
|
|
25
|
+
'theme.light.indigo.css',
|
|
26
|
+
'dx.fluent.saas.light.css',
|
|
27
|
+
`assets/${appName}/styles/primeflex/primeflex.min.css`,
|
|
28
|
+
`assets/${appName}/styles/primeicons/primeicons.css`
|
|
29
|
+
];
|
|
30
|
+
if (globalThis.isMFEMode)
|
|
31
|
+
return () => Promise.resolve();
|
|
32
|
+
return () => styleLoaderService.load(styles);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
var appName;
|
|
36
|
+
var menuItems = [];
|
|
37
|
+
const boot = (_appName, _routes, _menuItems, _keycloakOptions, _federatedComponents) => {
|
|
38
|
+
appName = _appName;
|
|
39
|
+
menuItems = _menuItems;
|
|
40
|
+
const appBootConfig = {
|
|
41
|
+
providers: [
|
|
42
|
+
provideAnimations(),
|
|
43
|
+
provideHttpClient(withInterceptors([authInterceptor])),
|
|
44
|
+
provideRouter(_routes, withComponentInputBinding(), withHashLocation()),
|
|
45
|
+
importProvidersFrom(i18nModule, KeycloakAngularModule),
|
|
46
|
+
MessageService,
|
|
47
|
+
ConfirmationService,
|
|
48
|
+
globalThis.ngZone ? { provide: NgZone, useValue: globalThis.ngZone } : [],
|
|
49
|
+
{
|
|
50
|
+
provide: APP_INITIALIZER,
|
|
51
|
+
useFactory: (keycloak) => keycloak.init(_keycloakOptions),
|
|
52
|
+
multi: true,
|
|
53
|
+
deps: [KeycloakManager]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
provide: APP_INITIALIZER,
|
|
57
|
+
useFactory: loadStylesheets,
|
|
58
|
+
multi: true,
|
|
59
|
+
deps: [StyleLoaderService, i18nFolderName]
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
provide: APP_INITIALIZER,
|
|
63
|
+
useFactory: loadAppConfigs,
|
|
64
|
+
multi: true,
|
|
65
|
+
deps: [HttpClient]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
provide: i18nFolderName,
|
|
69
|
+
useValue: _appName
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
};
|
|
73
|
+
createApplication(appBootConfig).then((appRef) => {
|
|
74
|
+
appComponentLoader().then((AppComponent) => {
|
|
75
|
+
const app = createCustomElement(AppComponent, { injector: appRef.injector });
|
|
76
|
+
customElements.define(`app-${appName}`, app);
|
|
77
|
+
if (_federatedComponents) {
|
|
78
|
+
Object.entries(_federatedComponents).forEach(([selector, component]) => {
|
|
79
|
+
const fdc = createCustomElement(component, { injector: appRef.injector });
|
|
80
|
+
customElements.define(selector, fdc);
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
});
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Generated bundle index. Do not edit.
|
|
89
|
+
*/
|
|
90
|
+
|
|
91
|
+
export { appName as a, boot as b, menuItems as m };
|
|
92
|
+
//# sourceMappingURL=aril-boot-mfe-aril-boot-mfe-7ZwVVddO.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"aril-boot-mfe-aril-boot-mfe-7ZwVVddO.mjs","sources":["../../projects/aril/boot/mfe/src/appComponentLoader.ts","../../projects/aril/boot/mfe/src/loadStyles.ts","../../projects/aril/boot/mfe/src/bootstrap.ts","../../projects/aril/boot/mfe/aril-boot-mfe.ts"],"sourcesContent":["export const appComponentLoader = async () => {\r\n\tconst { AppComponent } = await import('./app.component');\r\n\treturn AppComponent;\r\n};","import { APIs } from 'aril/http';\r\nimport { StyleLoaderService } from 'aril/util/loaders';\r\n\r\nexport function loadStylesheets(styleLoaderService: StyleLoaderService, appName: APIs): () => Promise<any> {\r\n\tconst styles = [\r\n\t\t'layout.css',\r\n\t\t'ui.common.css',\r\n\t\t'preloading.css',\r\n\t\t'primeng.min.css',\r\n\t\t'theme.light.indigo.css',\r\n\t\t'dx.fluent.saas.light.css',\r\n\t\t`assets/${appName}/styles/primeflex/primeflex.min.css`,\r\n\t\t`assets/${appName}/styles/primeicons/primeicons.css`\r\n\t];\r\n\r\n\tif ((<any>globalThis).isMFEMode) return () => Promise.resolve();\r\n\r\n\treturn () => styleLoaderService.load(styles);\r\n}\r\n","import { HttpClient, provideHttpClient, withInterceptors } from '@angular/common/http';\r\nimport { APP_INITIALIZER, ApplicationConfig, NgZone, Type, importProvidersFrom } from '@angular/core';\r\nimport { createCustomElement } from '@angular/elements';\r\nimport { createApplication } from '@angular/platform-browser';\r\nimport { provideAnimations } from '@angular/platform-browser/animations';\r\nimport { Routes, provideRouter, withComponentInputBinding, withHashLocation } from '@angular/router';\r\n\r\nimport { ConfirmationService, MenuItem, MessageService } from 'primeng/api';\r\n\r\nimport { KeycloakAngularModule, KeycloakOptions } from 'keycloak-angular';\r\n\r\nimport { loadAppConfigs } from 'aril/boot/config';\r\nimport { APIs } from 'aril/http';\r\nimport { i18nFolderName, i18nModule } from 'aril/i18n';\r\nimport { KeycloakManager, authInterceptor } from 'aril/keycloak';\r\nimport { StyleLoaderService } from 'aril/util/loaders';\r\n\r\nimport { appComponentLoader } from './appComponentLoader';\r\nimport { loadStylesheets } from './loadStyles';\r\n\r\nexport var appName: APIs | undefined;\r\nexport var menuItems: MenuItem[] = [];\r\n\r\nexport const boot = (\r\n\t_appName: APIs | undefined,\r\n\t_routes: Routes,\r\n\t_menuItems: MenuItem[],\r\n\t_keycloakOptions: KeycloakOptions,\r\n\t_federatedComponents?: { [selector: string]: Type<any> }\r\n) => {\r\n\tappName = _appName;\r\n\tmenuItems = _menuItems;\r\n\r\n\tconst appBootConfig: ApplicationConfig = {\r\n\t\tproviders: [\r\n\t\t\tprovideAnimations(),\r\n\t\t\tprovideHttpClient(withInterceptors([authInterceptor])),\r\n\t\t\tprovideRouter(_routes, withComponentInputBinding(), withHashLocation()),\r\n\t\t\timportProvidersFrom(i18nModule, KeycloakAngularModule),\r\n\t\t\tMessageService,\r\n\t\t\tConfirmationService,\r\n\t\t\t(<any>globalThis).ngZone ? { provide: NgZone, useValue: (<any>globalThis).ngZone } : [],\r\n\t\t\t{\r\n\t\t\t\tprovide: APP_INITIALIZER,\r\n\t\t\t\tuseFactory: (keycloak: KeycloakManager) => keycloak.init(_keycloakOptions),\r\n\t\t\t\tmulti: true,\r\n\t\t\t\tdeps: [KeycloakManager]\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tprovide: APP_INITIALIZER,\r\n\t\t\t\tuseFactory: loadStylesheets,\r\n\t\t\t\tmulti: true,\r\n\t\t\t\tdeps: [StyleLoaderService, i18nFolderName]\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tprovide: APP_INITIALIZER,\r\n\t\t\t\tuseFactory: loadAppConfigs,\r\n\t\t\t\tmulti: true,\r\n\t\t\t\tdeps: [HttpClient]\r\n\t\t\t},\r\n\t\t\t{\r\n\t\t\t\tprovide: i18nFolderName,\r\n\t\t\t\tuseValue: _appName\r\n\t\t\t}\r\n\t\t]\r\n\t};\r\n\r\n\tcreateApplication(appBootConfig).then((appRef) => {\r\n\t\tappComponentLoader().then((AppComponent) => {\r\n\t\t\tconst app = createCustomElement(AppComponent, { injector: appRef.injector });\r\n\t\t\tcustomElements.define(`app-${appName}`, app);\r\n\r\n\t\t\tif (_federatedComponents) {\r\n\t\t\t\tObject.entries(_federatedComponents).forEach(([selector, component]) => {\r\n\t\t\t\t\tconst fdc = createCustomElement(component, { injector: appRef.injector });\r\n\t\t\t\t\tcustomElements.define(selector, fdc);\r\n\t\t\t\t});\r\n\t\t\t}\r\n\t\t});\r\n\t});\r\n};\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAO,MAAM,kBAAkB,GAAG,YAAW;IAC5C,MAAM,EAAE,YAAY,EAAE,GAAG,MAAM,OAAO,4CAAiB,CAAC,CAAC;AACzD,IAAA,OAAO,YAAY,CAAC;AACrB,CAAC;;ACAe,SAAA,eAAe,CAAC,kBAAsC,EAAE,OAAa,EAAA;AACpF,IAAA,MAAM,MAAM,GAAG;QACd,YAAY;QACZ,eAAe;QACf,gBAAgB;QAChB,iBAAiB;QACjB,wBAAwB;QACxB,0BAA0B;AAC1B,QAAA,CAAA,OAAA,EAAU,OAAO,CAAqC,mCAAA,CAAA;AACtD,QAAA,CAAA,OAAA,EAAU,OAAO,CAAmC,iCAAA,CAAA;KACpD,CAAC;IAEF,IAAU,UAAW,CAAC,SAAS;AAAE,QAAA,OAAO,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;IAEhE,OAAO,MAAM,kBAAkB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC9C;;ACEW,IAAA,QAA0B;AAC9B,IAAI,SAAS,GAAe,GAAG;AAE/B,MAAM,IAAI,GAAG,CACnB,QAA0B,EAC1B,OAAe,EACf,UAAsB,EACtB,gBAAiC,EACjC,oBAAwD,KACrD;IACH,OAAO,GAAG,QAAQ,CAAC;IACnB,SAAS,GAAG,UAAU,CAAC;AAEvB,IAAA,MAAM,aAAa,GAAsB;AACxC,QAAA,SAAS,EAAE;AACV,YAAA,iBAAiB,EAAE;AACnB,YAAA,iBAAiB,CAAC,gBAAgB,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