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.
Files changed (117) hide show
  1. package/README.md +2 -2
  2. package/boot/config/config.sample.json +19 -0
  3. package/boot/config/index.d.ts +2 -0
  4. package/boot/config/src/app.configs.d.ts +13 -0
  5. package/boot/{host/src/services/custom-manifest.d.ts → config/src/custom-remote.d.ts} +2 -2
  6. package/boot/host/index.d.ts +0 -1
  7. package/boot/host/src/bootstrap.d.ts +2 -2
  8. package/boot/host/src/services/microFrontEnd.service.d.ts +1 -1
  9. package/boot/mfe/index.d.ts +1 -1
  10. package/boot/mfe/src/app.component.d.ts +2 -0
  11. package/boot/mfe/src/appComponentLoader.d.ts +1 -0
  12. package/boot/mfe/src/bootstrap.d.ts +5 -2
  13. package/boot/mfe/src/loadStyles.d.ts +3 -0
  14. package/esm2022/boot/config/aril-boot-config.mjs +5 -0
  15. package/esm2022/boot/config/index.mjs +3 -0
  16. package/esm2022/boot/config/src/app.configs.mjs +19 -0
  17. package/esm2022/boot/config/src/custom-remote.mjs +2 -0
  18. package/esm2022/boot/host/index.mjs +1 -2
  19. package/esm2022/boot/host/src/bootstrap.mjs +14 -12
  20. package/esm2022/boot/host/src/services/microFrontEnd.service.mjs +1 -1
  21. package/esm2022/boot/mfe/index.mjs +2 -2
  22. package/esm2022/boot/mfe/src/app.component.mjs +10 -3
  23. package/esm2022/boot/mfe/src/appComponentLoader.mjs +5 -0
  24. package/esm2022/boot/mfe/src/bootstrap.mjs +24 -33
  25. package/esm2022/boot/mfe/src/loadStyles.mjs +16 -0
  26. package/esm2022/http/index.mjs +2 -1
  27. package/esm2022/http/lib/enums.mjs +3 -1
  28. package/esm2022/http/src/httpClient.mjs +6 -4
  29. package/esm2022/http/src/serviceBase.mjs +12 -43
  30. package/esm2022/http/src/serviceMockBase.mjs +5 -0
  31. package/esm2022/http/src/serviceRequest.mjs +26 -0
  32. package/esm2022/http/src/serviceStateMethods.mjs +97 -3
  33. package/esm2022/i18n/index.mjs +2 -2
  34. package/esm2022/i18n/src/folder-name-token.mjs +3 -0
  35. package/esm2022/i18n/src/loader.mjs +3 -3
  36. package/esm2022/i18n/src/provideScope.mjs +2 -2
  37. package/esm2022/keycloak/index.mjs +2 -1
  38. package/esm2022/keycloak/src/auth.guard.mjs +39 -0
  39. package/esm2022/keycloak/src/keycloak.manager.mjs +21 -2
  40. package/esm2022/public-api.mjs +1 -2
  41. package/esm2022/theme/layout/app/profileSidebar/app.profilesidebar.component.mjs +8 -5
  42. package/esm2022/theme/layout/app/topbar/app.topbar.component.mjs +3 -3
  43. package/esm2022/theme/layout/service/app.layout.service.mjs +1 -1
  44. package/esm2022/theme/layout/service/app.menu.service.mjs +3 -1
  45. package/esm2022/ui/button/src/button.component.mjs +1 -1
  46. package/esm2022/ui/lib/src/input/common-input-validators.service.mjs +1 -1
  47. package/esm2022/util/block/aril-util-block.mjs +5 -0
  48. package/esm2022/util/block/index.mjs +2 -0
  49. package/esm2022/util/block/src/block.mjs +64 -0
  50. package/esm2022/util/custom_pages/src/notFound.component.mjs +53 -110
  51. package/esm2022/util/pub-sub/src/pub-sub.service.mjs +2 -3
  52. package/fesm2022/{aril-boot-mfe-app.component-zro0FnKY.mjs → aril-app.component-pGPjpk8x.mjs} +14 -7
  53. package/fesm2022/aril-app.component-pGPjpk8x.mjs.map +1 -0
  54. package/fesm2022/aril-boot-config.mjs +26 -0
  55. package/fesm2022/aril-boot-config.mjs.map +1 -0
  56. package/fesm2022/aril-boot-host.mjs +14 -13
  57. package/fesm2022/aril-boot-host.mjs.map +1 -1
  58. package/fesm2022/{aril-app.component-sZDpvJDM.mjs → aril-boot-mfe-app.component-h5TW-GVW.mjs} +13 -6
  59. package/fesm2022/aril-boot-mfe-app.component-h5TW-GVW.mjs.map +1 -0
  60. package/fesm2022/aril-boot-mfe-aril-boot-mfe-7ZwVVddO.mjs +92 -0
  61. package/fesm2022/aril-boot-mfe-aril-boot-mfe-7ZwVVddO.mjs.map +1 -0
  62. package/fesm2022/aril-boot-mfe.mjs +13 -81
  63. package/fesm2022/aril-boot-mfe.mjs.map +1 -1
  64. package/fesm2022/aril-http.mjs +140 -45
  65. package/fesm2022/aril-http.mjs.map +1 -1
  66. package/fesm2022/aril-i18n.mjs +3 -3
  67. package/fesm2022/aril-i18n.mjs.map +1 -1
  68. package/fesm2022/aril-keycloak.mjs +58 -3
  69. package/fesm2022/aril-keycloak.mjs.map +1 -1
  70. package/fesm2022/aril-theme-layout.mjs +11 -7
  71. package/fesm2022/aril-theme-layout.mjs.map +1 -1
  72. package/fesm2022/aril-ui-button.mjs.map +1 -1
  73. package/fesm2022/aril-ui-lib.mjs.map +1 -1
  74. package/fesm2022/aril-util-block.mjs +71 -0
  75. package/fesm2022/aril-util-block.mjs.map +1 -0
  76. package/fesm2022/aril-util-custom_pages.mjs +52 -109
  77. package/fesm2022/aril-util-custom_pages.mjs.map +1 -1
  78. package/fesm2022/aril-util-pub-sub.mjs +1 -2
  79. package/fesm2022/aril-util-pub-sub.mjs.map +1 -1
  80. package/fesm2022/aril.mjs +215 -16
  81. package/fesm2022/aril.mjs.map +1 -1
  82. package/http/index.d.ts +1 -0
  83. package/http/lib/enums.d.ts +4 -2
  84. package/http/src/httpClient.d.ts +2 -4
  85. package/http/src/serviceBase.d.ts +4 -2
  86. package/http/src/serviceMockBase.d.ts +6 -0
  87. package/http/src/serviceRequest.d.ts +4 -0
  88. package/http/src/serviceStateMethods.d.ts +11 -2
  89. package/i18n/index.d.ts +1 -1
  90. package/i18n/src/folder-name-token.d.ts +2 -0
  91. package/i18n/src/provideScope.d.ts +0 -4
  92. package/keycloak/index.d.ts +1 -0
  93. package/keycloak/src/auth.guard.d.ts +11 -0
  94. package/keycloak/src/keycloak.manager.d.ts +1 -0
  95. package/package.json +13 -1
  96. package/public-api.d.ts +0 -1
  97. package/scripts/util/blockui.min.js +7 -0
  98. package/styles/util/blockui.css +56 -0
  99. package/theme/layout/app/profileSidebar/app.profilesidebar.component.d.ts +3 -0
  100. package/theme/layout/app/profileSidebar/app.profilesidebar.component.html +151 -152
  101. package/theme/layout/app/profileSidebar/app.profilesidebar.component.ts +31 -24
  102. package/theme/layout/app/topbar/app.topbar.component.html +45 -45
  103. package/theme/layout/app/topbar/app.topbar.component.ts +32 -32
  104. package/theme/layout/service/app.layout.service.ts +178 -178
  105. package/theme/layout/service/app.menu.service.ts +2 -0
  106. package/ui/button/src/button.component.d.ts +1 -1
  107. package/ui/lib/src/input/common-input-validators.service.d.ts +2 -1
  108. package/util/block/index.d.ts +1 -0
  109. package/util/block/src/block.d.ts +28 -0
  110. package/util/pub-sub/src/pub-sub.service.d.ts +1 -2
  111. package/esm2022/boot/host/src/services/custom-manifest.mjs +0 -2
  112. package/esm2022/i18n/src/file-url-token.mjs +0 -3
  113. package/fesm2022/aril-app.component-sZDpvJDM.mjs.map +0 -1
  114. package/fesm2022/aril-aril-D__IXMsf.mjs +0 -207
  115. package/fesm2022/aril-aril-D__IXMsf.mjs.map +0 -1
  116. package/fesm2022/aril-boot-mfe-app.component-zro0FnKY.mjs.map +0 -1
  117. package/i18n/src/file-url-token.d.ts +0 -2
@@ -1,178 +1,178 @@
1
- import { Injectable, effect, signal } from '@angular/core';
2
-
3
- import { Subject } from 'rxjs';
4
-
5
- export type MenuMode = 'static' | 'overlay' | 'horizontal' | 'slim' | 'slim-plus' | 'reveal' | 'drawer';
6
-
7
- export type ColorScheme = 'light' | 'dark' | 'dim';
8
-
9
- export type MenuColorScheme = 'colorScheme' | 'primaryColor' | 'transparent';
10
-
11
- export interface AppConfig {
12
- inputStyle: string;
13
- colorScheme: ColorScheme;
14
- theme: string;
15
- ripple: boolean;
16
- menuMode: MenuMode;
17
- scale: number;
18
- menuTheme: MenuColorScheme;
19
- }
20
-
21
- interface LayoutState {
22
- staticMenuDesktopInactive: boolean;
23
- overlayMenuActive: boolean;
24
- profileSidebarVisible: boolean;
25
- configSidebarVisible: boolean;
26
- staticMenuMobileActive: boolean;
27
- menuHoverActive: boolean;
28
- sidebarActive: boolean;
29
- anchored: boolean;
30
- }
31
-
32
- @Injectable({
33
- providedIn: 'root'
34
- })
35
- export class LayoutService {
36
- _config: AppConfig = {
37
- ripple: false,
38
- inputStyle: 'outlined',
39
- menuMode: 'horizontal',
40
- colorScheme: 'light',
41
- theme: 'indigo',
42
- scale: 12,
43
- menuTheme: 'colorScheme'
44
- };
45
-
46
- // TODO: Set User Config
47
- config = signal<AppConfig>(this._config);
48
-
49
- state: LayoutState = {
50
- staticMenuDesktopInactive: false,
51
- overlayMenuActive: false,
52
- profileSidebarVisible: false,
53
- configSidebarVisible: false,
54
- staticMenuMobileActive: false,
55
- menuHoverActive: false,
56
- sidebarActive: false,
57
- anchored: false
58
- };
59
-
60
- private configUpdate = new Subject<AppConfig>();
61
-
62
- private overlayOpen = new Subject<any>();
63
-
64
- configUpdate$ = this.configUpdate.asObservable();
65
-
66
- overlayOpen$ = this.overlayOpen.asObservable();
67
-
68
- constructor() {
69
- effect(() => {
70
- const config = this.config();
71
- if (this.updateStyle(config)) {
72
- this.changeTheme();
73
- }
74
- this.changeScale(config.scale);
75
- this.onConfigUpdate();
76
- });
77
- }
78
-
79
- updateStyle(config: AppConfig) {
80
- return config.theme !== this._config.theme || config.colorScheme !== this._config.colorScheme;
81
- }
82
-
83
- onMenuToggle() {
84
- if (this.isOverlay()) {
85
- this.state.overlayMenuActive = !this.state.overlayMenuActive;
86
-
87
- if (this.state.overlayMenuActive) {
88
- this.overlayOpen.next(null);
89
- }
90
- }
91
-
92
- if (this.isDesktop()) {
93
- this.state.staticMenuDesktopInactive = !this.state.staticMenuDesktopInactive;
94
- } else {
95
- this.state.staticMenuMobileActive = !this.state.staticMenuMobileActive;
96
-
97
- if (this.state.staticMenuMobileActive) {
98
- this.overlayOpen.next(null);
99
- }
100
- }
101
- }
102
-
103
- onOverlaySubmenuOpen() {
104
- this.overlayOpen.next(null);
105
- }
106
-
107
- showProfileSidebar() {
108
- this.state.profileSidebarVisible = true;
109
- }
110
-
111
- showConfigSidebar() {
112
- this.state.configSidebarVisible = true;
113
- }
114
-
115
- isOverlay() {
116
- return this.config().menuMode === 'overlay';
117
- }
118
-
119
- isDesktop() {
120
- return window.innerWidth > 991;
121
- }
122
-
123
- isSlim() {
124
- return this.config().menuMode === 'slim';
125
- }
126
-
127
- isSlimPlus() {
128
- return this.config().menuMode === 'slim-plus';
129
- }
130
-
131
- isHorizontal() {
132
- return this.config().menuMode === 'horizontal';
133
- }
134
-
135
- isMobile() {
136
- return !this.isDesktop();
137
- }
138
-
139
- onConfigUpdate() {
140
- this._config = { ...this.config() };
141
- this.configUpdate.next(this.config());
142
- }
143
-
144
- changeTheme() {
145
- const config = this.config();
146
- const themeLink = <HTMLLinkElement>document.getElementById('theme-link');
147
- const themeLinkHref = themeLink.getAttribute('href')!;
148
- const newHref = themeLinkHref
149
- .split('/')
150
- .map((el) =>
151
- el == this._config.theme ? (el = config.theme)
152
- : el == `theme-${this._config.colorScheme}` ? (el = `theme-${config.colorScheme}`)
153
- : el
154
- )
155
- .join('/');
156
-
157
- this.replaceThemeLink(newHref);
158
- }
159
-
160
- replaceThemeLink(href: string) {
161
- const id = 'theme-link';
162
- let themeLink = <HTMLLinkElement>document.getElementById(id);
163
- const cloneLinkElement = <HTMLLinkElement>themeLink.cloneNode(true);
164
-
165
- cloneLinkElement.setAttribute('href', href);
166
- cloneLinkElement.setAttribute('id', id + '-clone');
167
-
168
- themeLink.parentNode!.insertBefore(cloneLinkElement, themeLink.nextSibling);
169
- cloneLinkElement.addEventListener('load', () => {
170
- themeLink.remove();
171
- cloneLinkElement.setAttribute('id', id);
172
- });
173
- }
174
-
175
- changeScale(value: number) {
176
- document.documentElement.style.fontSize = `${value}px`;
177
- }
178
- }
1
+ import { Injectable, effect, signal } from '@angular/core';
2
+
3
+ import { Subject } from 'rxjs';
4
+
5
+ export type MenuMode = 'static' | 'overlay' | 'horizontal' | 'slim' | 'slim-plus' | 'reveal' | 'drawer';
6
+
7
+ export type ColorScheme = 'light' | 'dark' | 'dim';
8
+
9
+ export type MenuColorScheme = 'colorScheme' | 'primaryColor' | 'transparent';
10
+
11
+ export interface AppConfig {
12
+ inputStyle: string;
13
+ colorScheme: ColorScheme;
14
+ theme: string;
15
+ ripple: boolean;
16
+ menuMode: MenuMode;
17
+ scale: number;
18
+ menuTheme: MenuColorScheme;
19
+ }
20
+
21
+ interface LayoutState {
22
+ staticMenuDesktopInactive: boolean;
23
+ overlayMenuActive: boolean;
24
+ profileSidebarVisible: boolean;
25
+ configSidebarVisible: boolean;
26
+ staticMenuMobileActive: boolean;
27
+ menuHoverActive: boolean;
28
+ sidebarActive: boolean;
29
+ anchored: boolean;
30
+ }
31
+
32
+ @Injectable({
33
+ providedIn: 'root'
34
+ })
35
+ export class LayoutService {
36
+ _config: AppConfig = {
37
+ ripple: false,
38
+ inputStyle: 'outlined',
39
+ menuMode: 'horizontal',
40
+ colorScheme: 'light',
41
+ theme: 'indigo',
42
+ scale: 12,
43
+ menuTheme: 'colorScheme'
44
+ };
45
+
46
+ // TODO: Set User Config
47
+ config = signal<AppConfig>(this._config);
48
+
49
+ state: LayoutState = {
50
+ staticMenuDesktopInactive: false,
51
+ overlayMenuActive: false,
52
+ profileSidebarVisible: false,
53
+ configSidebarVisible: false,
54
+ staticMenuMobileActive: false,
55
+ menuHoverActive: false,
56
+ sidebarActive: false,
57
+ anchored: false
58
+ };
59
+
60
+ private configUpdate = new Subject<AppConfig>();
61
+
62
+ private overlayOpen = new Subject<any>();
63
+
64
+ configUpdate$ = this.configUpdate.asObservable();
65
+
66
+ overlayOpen$ = this.overlayOpen.asObservable();
67
+
68
+ constructor() {
69
+ effect(() => {
70
+ const config = this.config();
71
+ if (this.updateStyle(config)) {
72
+ this.changeTheme();
73
+ }
74
+ this.changeScale(config.scale);
75
+ this.onConfigUpdate();
76
+ });
77
+ }
78
+
79
+ updateStyle(config: AppConfig) {
80
+ return config.theme !== this._config.theme || config.colorScheme !== this._config.colorScheme;
81
+ }
82
+
83
+ onMenuToggle() {
84
+ if (this.isOverlay()) {
85
+ this.state.overlayMenuActive = !this.state.overlayMenuActive;
86
+
87
+ if (this.state.overlayMenuActive) {
88
+ this.overlayOpen.next(null);
89
+ }
90
+ }
91
+
92
+ if (this.isDesktop()) {
93
+ this.state.staticMenuDesktopInactive = !this.state.staticMenuDesktopInactive;
94
+ } else {
95
+ this.state.staticMenuMobileActive = !this.state.staticMenuMobileActive;
96
+
97
+ if (this.state.staticMenuMobileActive) {
98
+ this.overlayOpen.next(null);
99
+ }
100
+ }
101
+ }
102
+
103
+ onOverlaySubmenuOpen() {
104
+ this.overlayOpen.next(null);
105
+ }
106
+
107
+ showProfileSidebar() {
108
+ this.state.profileSidebarVisible = true;
109
+ }
110
+
111
+ showConfigSidebar() {
112
+ this.state.configSidebarVisible = true;
113
+ }
114
+
115
+ isOverlay() {
116
+ return this.config().menuMode === 'overlay';
117
+ }
118
+
119
+ isDesktop() {
120
+ return window.innerWidth > 991;
121
+ }
122
+
123
+ isSlim() {
124
+ return this.config().menuMode === 'slim';
125
+ }
126
+
127
+ isSlimPlus() {
128
+ return this.config().menuMode === 'slim-plus';
129
+ }
130
+
131
+ isHorizontal() {
132
+ return this.config().menuMode === 'horizontal';
133
+ }
134
+
135
+ isMobile() {
136
+ return !this.isDesktop();
137
+ }
138
+
139
+ onConfigUpdate() {
140
+ this._config = { ...this.config() };
141
+ this.configUpdate.next(this.config());
142
+ }
143
+
144
+ changeTheme() {
145
+ const config = this.config();
146
+ const themeLink = <HTMLLinkElement>document.getElementById('theme-link');
147
+ const themeLinkHref = themeLink.getAttribute('href')!;
148
+ const newHref = themeLinkHref
149
+ .split('/')
150
+ .map((el) =>
151
+ el == this._config.theme ? (el = config.theme)
152
+ : el == `theme-${this._config.colorScheme}` ? (el = `theme-${config.colorScheme}`)
153
+ : el
154
+ )
155
+ .join('/');
156
+
157
+ this.replaceThemeLink(newHref);
158
+ }
159
+
160
+ replaceThemeLink(href: string) {
161
+ const id = 'theme-link';
162
+ let themeLink = <HTMLLinkElement>document.getElementById(id);
163
+ const cloneLinkElement = <HTMLLinkElement>themeLink.cloneNode(true);
164
+
165
+ cloneLinkElement.setAttribute('href', href);
166
+ cloneLinkElement.setAttribute('id', id + '-clone');
167
+
168
+ themeLink.parentNode!.insertBefore(cloneLinkElement, themeLink.nextSibling);
169
+ cloneLinkElement.addEventListener('load', () => {
170
+ themeLink.remove();
171
+ cloneLinkElement.setAttribute('id', id);
172
+ });
173
+ }
174
+
175
+ changeScale(value: number) {
176
+ document.documentElement.style.fontSize = `${value}px`;
177
+ }
178
+ }
@@ -25,6 +25,7 @@ export class AppMenuService {
25
25
 
26
26
  public menuItems = computed(() => {
27
27
  const config = this.menuConfig();
28
+ config.items.unshift({ label: 'Home', icon: 'pi pi-fw pi-home', routerLink: '' });
28
29
 
29
30
  if (config.prefix) return config.items.map((item) => this.addPrefix(item, config.prefix));
30
31
  else return config.items;
@@ -32,6 +33,7 @@ export class AppMenuService {
32
33
 
33
34
  public subMenuItems = computed(() => {
34
35
  const config = this.subMenuConfig();
36
+ config.items.unshift({ label: `${config.prefix?.toUpperCase()} Home`, icon: 'pi pi-fw pi-home', routerLink: '' });
35
37
 
36
38
  if (config.prefix) return config.items.map((item) => this.addPrefix(item, config.prefix));
37
39
  else return config.items;
@@ -2,7 +2,7 @@ import { EventEmitter } from '@angular/core';
2
2
  import { PrimeIcon } from 'aril/ui/lib';
3
3
  import * as i0 from "@angular/core";
4
4
  type Size = 'sm' | 'md' | 'lg';
5
- export type Colors = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger';
5
+ type Colors = 'primary' | 'secondary' | 'success' | 'info' | 'warning' | 'help' | 'danger';
6
6
  export declare class ButtonComponent {
7
7
  label: import("@angular/core").InputSignal<string | undefined, string | undefined>;
8
8
  loading: import("@angular/core").InputSignal<boolean, boolean>;
@@ -1,7 +1,7 @@
1
1
  import { ValidatorFn } from '@angular/forms';
2
2
  import 'aril/util/primitive-extensions';
3
3
  import * as i0 from "@angular/core";
4
- export type DateRangeFormat = 'minute' | 'hour' | 'day' | 'month' | 'year';
4
+ type DateRangeFormat = 'minute' | 'hour' | 'day' | 'month' | 'year';
5
5
  export declare class CommonInputValidatorsService {
6
6
  /**
7
7
  * @param sdCtrlName - name of the start date form control
@@ -17,3 +17,4 @@ export declare class CommonInputValidatorsService {
17
17
  static ɵfac: i0.ɵɵFactoryDeclaration<CommonInputValidatorsService, never>;
18
18
  static ɵprov: i0.ɵɵInjectableDeclaration<CommonInputValidatorsService>;
19
19
  }
20
+ export {};
@@ -0,0 +1 @@
1
+ export * from './src/block';
@@ -0,0 +1,28 @@
1
+ import { AfterViewInit, ElementRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ declare const KTBlockUI: any;
4
+ interface BlockOptions {
5
+ zIndex?: number;
6
+ overlayClass?: string;
7
+ message?: string;
8
+ }
9
+ export declare class Block implements AfterViewInit {
10
+ private element;
11
+ constructor(element: ElementRef);
12
+ arilBlock: import("@angular/core").InputSignal<boolean, boolean>;
13
+ blockOptions: import("@angular/core").InputSignal<BlockOptions, BlockOptions>;
14
+ blockUI: typeof KTBlockUI;
15
+ target: import("@angular/core").WritableSignal<HTMLElement>;
16
+ ngAfterViewInit(): void;
17
+ getTarget(element: ElementRef): HTMLElement;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<Block, never>;
19
+ static ɵdir: i0.ɵɵDirectiveDeclaration<Block, "[arilBlock]", never, { "arilBlock": { "alias": "arilBlock"; "required": true; "isSignal": true; }; "blockOptions": { "alias": "blockOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
20
+ }
21
+ export declare class BlockPage {
22
+ constructor();
23
+ arilBlockPage: import("@angular/core").InputSignal<boolean, boolean>;
24
+ blockOptions: import("@angular/core").InputSignal<BlockOptions, BlockOptions>;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<BlockPage, never>;
26
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BlockPage, "[arilBlockPage]", never, { "arilBlockPage": { "alias": "arilBlockPage"; "required": true; "isSignal": true; }; "blockOptions": { "alias": "blockOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
27
+ }
28
+ export {};
@@ -6,8 +6,7 @@ type CustomEvent = {
6
6
  custom?: any;
7
7
  };
8
8
  };
9
- export declare const PubSubEvents: {
10
- popstate: string;
9
+ declare const PubSubEvents: {
11
10
  navigateBetweenApps: string;
12
11
  navigateInApps: string;
13
12
  };
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3VzdG9tLW1hbmlmZXN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXJpbC9ib290L2hvc3Qvc3JjL3NlcnZpY2VzL2N1c3RvbS1tYW5pZmVzdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUmVtb3RlQ29uZmlnIH0gZnJvbSAnQGFuZ3VsYXItYXJjaGl0ZWN0cy9tb2R1bGUtZmVkZXJhdGlvbic7XG5cbmV4cG9ydCB0eXBlIEN1c3RvbVJlbW90ZUNvbmZpZyA9IFJlbW90ZUNvbmZpZyAmIHtcblx0cmVtb3RlTmFtZTogc3RyaW5nO1xuXHRleHBvc2VkTW9kdWxlOiBzdHJpbmc7XG5cdGVsZW1lbnROYW1lOiBzdHJpbmc7XG5cdHNoYWRvd0RvbVBhc3NpdmU6IGJvb2xlYW47XG5cdHN0eWxlVXJsczogc3RyaW5nW107XG5cdC8vIHJvdXRlOiBzdHJpbmc7XG5cdC8vIGRpc3BsYXlOYW1lOiBzdHJpbmc7XG59O1xuIl19
@@ -1,3 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- export const i18nRootFileUrl = new InjectionToken('BaseUrl');
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsZS11cmwtdG9rZW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9hcmlsL2kxOG4vc3JjL2ZpbGUtdXJsLXRva2VuLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFL0MsTUFBTSxDQUFDLE1BQU0sZUFBZSxHQUFHLElBQUksY0FBYyxDQUFTLFNBQVMsQ0FBQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgSW5qZWN0aW9uVG9rZW4gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuZXhwb3J0IGNvbnN0IGkxOG5Sb290RmlsZVVybCA9IG5ldyBJbmplY3Rpb25Ub2tlbjxzdHJpbmc+KCdCYXNlVXJsJyk7XG4iXX0=
@@ -1 +0,0 @@
1
- {"version":3,"file":"aril-app.component-sZDpvJDM.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, connectRouter } 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(router: Router, pubSubService: PubSubService, appMenuService: AppMenuService) {\n\t\tconnectRouter(router);\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"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;MAsBa,YAAY,CAAA;AACxB,IAAA,WAAA,CAAY,MAAc,EAAE,aAA4B,EAAE,cAA8B,EAAA;AAgBxF,QAAA,IAAA,CAAA,SAAS,GAAS,UAAW,CAAC,SAAS,CAAC;QAfvC,aAAa,CAAC,MAAM,CAAC,CAAC;AAEhB,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;8GAfW,YAAY,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAA,EAAA,CAAA,MAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,aAAA,EAAA,EAAA,EAAA,KAAA,EAAA,EAAA,CAAA,cAAA,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;;;;;"}
@@ -1,207 +0,0 @@
1
- import { provideHttpClient, withInterceptors } from '@angular/common/http';
2
- import * as i0 from '@angular/core';
3
- import { inject, Renderer2, ElementRef, Component, ViewEncapsulation, ViewChild, NgZone, importProvidersFrom, APP_INITIALIZER, Injectable } from '@angular/core';
4
- import { bootstrapApplication, createApplication } from '@angular/platform-browser';
5
- import { provideAnimations } from '@angular/platform-browser/animations';
6
- import { MessageService, ConfirmationService } from 'primeng/api';
7
- import { KeycloakAngularModule } from 'keycloak-angular';
8
- import { API_TOKEN } from 'aril/http';
9
- import { i18nModule, i18nRootFileUrl } from 'aril/i18n';
10
- import { authInterceptor, KeycloakManager } from 'aril/keycloak';
11
- import * as i1 from '@angular/router';
12
- import { RouterOutlet } from '@angular/router';
13
- import { WebComponentWrapper, ModuleFederationToolsModule, startsWith } from '@angular-architects/module-federation-tools';
14
- import { AppLayoutComponent, AppMenuService } from 'aril/theme/layout';
15
- import * as i2 from 'aril/util/pub-sub';
16
- import { createCustomElement } from '@angular/elements';
17
- import { StyleLoaderService } from 'aril/util/loaders';
18
-
19
- class ShadowDOMWrapperComponent extends WebComponentWrapper {
20
- constructor() {
21
- super(...arguments);
22
- this.renderer = inject(Renderer2);
23
- }
24
- ngOnInit() {
25
- const shadowRoot = this.vc.nativeElement.parentNode;
26
- const styleUrls = this['route'].snapshot.data.styleUrls || [];
27
- // Inject styles into the Shadow DOM
28
- styleUrls.forEach((url) => {
29
- const link = this.renderer.createElement('link');
30
- link.setAttribute('rel', 'stylesheet');
31
- link.setAttribute('type', 'text/css');
32
- link.setAttribute('href', url);
33
- this.renderer.appendChild(shadowRoot, link);
34
- });
35
- }
36
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ShadowDOMWrapperComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
37
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: ShadowDOMWrapperComponent, isStandalone: true, selector: "ng-component", viewQueries: [{ propertyName: "vc", first: true, predicate: ["vc"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, ngImport: i0, template: '<div #vc></div>', isInline: true, encapsulation: i0.ViewEncapsulation.ShadowDom }); }
38
- }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: ShadowDOMWrapperComponent, decorators: [{
40
- type: Component,
41
- args: [{
42
- standalone: true,
43
- template: '<div #vc></div>',
44
- encapsulation: ViewEncapsulation.ShadowDom
45
- }]
46
- }], propDecorators: { vc: [{
47
- type: ViewChild,
48
- args: ['vc', { read: ElementRef, static: true }]
49
- }] } });
50
-
51
- /* eslint-disable @typescript-eslint/no-explicit-any */
52
- class AppComponent {
53
- constructor(router, pubSubService) {
54
- globalThis.ngZone = inject(NgZone);
55
- globalThis.isMFEMode = true;
56
- pubSubService.subscribe('navigateBetweenApps', (data) => {
57
- router.navigateByUrl(data.path);
58
- pubSubService.publish({
59
- name: 'navigateInApps',
60
- data: data
61
- });
62
- });
63
- }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppComponent, deps: [{ token: i1.Router }, { token: i2.PubSubService }], target: i0.ɵɵFactoryTarget.Component }); }
65
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.1.2", type: AppComponent, isStandalone: true, selector: "aril-root", ngImport: i0, template: ` <app-layout></app-layout> `, isInline: true, dependencies: [{ kind: "ngmodule", type: ModuleFederationToolsModule }, { kind: "component", type: AppLayoutComponent, selector: "app-layout" }] }); }
66
- }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: AppComponent, decorators: [{
68
- type: Component,
69
- args: [{
70
- standalone: true,
71
- selector: 'aril-root',
72
- template: ` <app-layout></app-layout> `,
73
- imports: [RouterOutlet, ModuleFederationToolsModule, ShadowDOMWrapperComponent, AppLayoutComponent]
74
- }]
75
- }], ctorParameters: () => [{ type: i1.Router }, { type: i2.PubSubService }] });
76
-
77
- const boot$1 = (routerProvider, pluginInitializer, options, apiURL = '') => {
78
- const appConfig = {
79
- providers: [
80
- provideAnimations(),
81
- provideHttpClient(withInterceptors([authInterceptor])),
82
- routerProvider,
83
- importProvidersFrom(i18nModule, KeycloakAngularModule),
84
- MessageService,
85
- ConfirmationService,
86
- pluginInitializer,
87
- {
88
- provide: APP_INITIALIZER,
89
- useFactory: (keycloak) => keycloak.init(options),
90
- multi: true,
91
- deps: [KeycloakManager]
92
- },
93
- {
94
- provide: API_TOKEN,
95
- useValue: apiURL
96
- },
97
- {
98
- provide: i18nRootFileUrl,
99
- useValue: 'host'
100
- }
101
- ]
102
- };
103
- bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));
104
- };
105
-
106
- class MicroFrontendService {
107
- constructor() {
108
- this.appMenuService = inject(AppMenuService);
109
- }
110
- buildRoutes(plugins) {
111
- const mfeRoutes = plugins.map((config) => ({
112
- matcher: startsWith(config.remoteName),
113
- component: config.shadowDomPassive ? WebComponentWrapper : ShadowDOMWrapperComponent,
114
- data: config
115
- }));
116
- return mfeRoutes;
117
- }
118
- setMenuItems(plugins) {
119
- const menuItems = plugins.map((config) => {
120
- return {
121
- label: config.remoteName,
122
- icon: 'pi pi-fw pi-bars',
123
- routerLink: config.remoteName
124
- };
125
- });
126
- this.appMenuService.menuConfig.set({ items: menuItems });
127
- }
128
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: MicroFrontendService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
129
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: MicroFrontendService, providedIn: 'root' }); }
130
- }
131
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.2", ngImport: i0, type: MicroFrontendService, decorators: [{
132
- type: Injectable,
133
- args: [{ providedIn: 'root' }]
134
- }] });
135
-
136
- var appName;
137
- var menuItems = [];
138
- const appComponentLoader = async () => {
139
- const { AppComponent } = await import('./aril-app.component-sZDpvJDM.mjs');
140
- return AppComponent;
141
- };
142
- function loadStylesheets(styleLoaderService) {
143
- const styles = [
144
- 'layout.css',
145
- 'ui.common.css',
146
- 'preloading.css',
147
- 'theme.light.indigo.css',
148
- `assets/${appName}/styles/primeng.min.css`,
149
- `assets/${appName}/styles/primeflex/primeflex.min.css`,
150
- `assets/${appName}/styles/primeicons/primeicons.css`,
151
- `assets/${appName}/styles/dx.fluent.saas.light.css`
152
- ];
153
- if (globalThis.isMFEMode)
154
- return () => Promise.resolve();
155
- return () => styleLoaderService.load(styles);
156
- }
157
- const boot = (_appName, _routerProvider, _menuItems, _options, _apiURL = '') => {
158
- appName = _appName;
159
- menuItems = _menuItems;
160
- const appConfig = {
161
- providers: [
162
- provideAnimations(),
163
- provideHttpClient(withInterceptors([authInterceptor])),
164
- _routerProvider,
165
- importProvidersFrom(i18nModule, KeycloakAngularModule),
166
- MessageService,
167
- ConfirmationService,
168
- globalThis.ngZone ? { provide: NgZone, useValue: globalThis.ngZone } : [],
169
- {
170
- provide: APP_INITIALIZER,
171
- useFactory: (keycloak) => keycloak.init(_options),
172
- multi: true,
173
- deps: [KeycloakManager]
174
- },
175
- {
176
- provide: APP_INITIALIZER,
177
- useFactory: loadStylesheets,
178
- multi: true,
179
- deps: [StyleLoaderService]
180
- },
181
- {
182
- provide: API_TOKEN,
183
- useValue: _apiURL
184
- // useValue: isDevMode() ? 'http://thor.edas1.com/crm/v1' : _appName + '/v1'
185
- },
186
- {
187
- provide: i18nRootFileUrl,
188
- useValue: _appName
189
- }
190
- ]
191
- };
192
- createApplication(appConfig).then((appRef) => {
193
- appComponentLoader().then((AppComponent) => {
194
- const app = createCustomElement(AppComponent, { injector: appRef.injector });
195
- customElements.define(`app-${appName}`, app);
196
- });
197
- });
198
- };
199
-
200
- const aril = 'ARiL-UI-LIB';
201
-
202
- /**
203
- * Generated bundle index. Do not edit.
204
- */
205
-
206
- export { appName as a, aril as b, menuItems as m };
207
- //# sourceMappingURL=aril-aril-D__IXMsf.mjs.map