dash-button-web 0.0.24 → 0.0.26

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 (78) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  2. package/dist/cjs/dash-button_4.cjs.entry.js +11825 -0
  3. package/dist/cjs/index-CyJNVLIY.js +1623 -0
  4. package/dist/cjs/index.cjs.js +0 -2
  5. package/dist/cjs/loader.cjs.js +5 -7
  6. package/dist/cjs/web-compnont.cjs.js +15 -15
  7. package/dist/collection/collection-manifest.json +13 -3
  8. package/dist/collection/components/my-component/dash-button.css +58 -0
  9. package/dist/collection/components/my-component/dash-button.js +267 -88
  10. package/dist/collection/index.js +0 -1
  11. package/dist/collection/services/config.js +3 -5
  12. package/dist/collection/services/menu.js +4 -5
  13. package/dist/components/dash-button.js +1 -4310
  14. package/dist/components/index.d.ts +2 -0
  15. package/dist/components/index.js +1 -3
  16. package/dist/components/loading-component.js +1 -0
  17. package/dist/components/loading-component2.js +1 -0
  18. package/dist/components/notification-component.js +1 -0
  19. package/dist/components/notification-component2.js +1 -0
  20. package/dist/components/notification-table.js +1 -0
  21. package/dist/components/notification-table2.js +2 -0
  22. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  23. package/dist/esm/dash-button_4.entry.js +11820 -0
  24. package/dist/esm/index-NLvZO6-E.js +1615 -0
  25. package/dist/esm/index.js +0 -2
  26. package/dist/esm/loader.js +6 -6
  27. package/dist/esm/web-compnont.js +15 -14
  28. package/dist/types/components/my-component/dash-button.d.ts +12 -1
  29. package/dist/types/components.d.ts +86 -2
  30. package/dist/types/services/menu.d.ts +2 -0
  31. package/dist/types/stencil-public-runtime.d.ts +268 -70
  32. package/dist/web-compnont/index.esm.js +0 -2
  33. package/dist/web-compnont/p-9e0fb47e.entry.js +2 -0
  34. package/dist/web-compnont/p-DQuL1Twl.js +1 -0
  35. package/dist/web-compnont/p-NLvZO6-E.js +3 -0
  36. package/dist/web-compnont/web-compnont.esm.js +1 -2
  37. package/loader/cdn.js +1 -3
  38. package/loader/index.cjs.js +1 -3
  39. package/loader/index.d.ts +4 -1
  40. package/loader/index.es2017.js +1 -3
  41. package/loader/index.js +1 -3
  42. package/package.json +3 -2
  43. package/dist/cjs/dash-button.cjs.entry.js +0 -4274
  44. package/dist/cjs/dash-button.cjs.entry.js.map +0 -1
  45. package/dist/cjs/index-bc7ebbee.js +0 -1817
  46. package/dist/cjs/index-bc7ebbee.js.map +0 -1
  47. package/dist/cjs/index.cjs.js.map +0 -1
  48. package/dist/cjs/loader.cjs.js.map +0 -1
  49. package/dist/cjs/web-compnont.cjs.js.map +0 -1
  50. package/dist/collection/components/my-component/dash-button.e2e.js +0 -26
  51. package/dist/collection/components/my-component/dash-button.e2e.js.map +0 -1
  52. package/dist/collection/components/my-component/dash-button.js.map +0 -1
  53. package/dist/collection/components/my-component/dash-button.spec.js +0 -35
  54. package/dist/collection/components/my-component/dash-button.spec.js.map +0 -1
  55. package/dist/collection/index.js.map +0 -1
  56. package/dist/collection/services/config.js.map +0 -1
  57. package/dist/collection/services/menu.js.map +0 -1
  58. package/dist/components/dash-button.js.map +0 -1
  59. package/dist/components/index.js.map +0 -1
  60. package/dist/esm/dash-button.entry.js +0 -4270
  61. package/dist/esm/dash-button.entry.js.map +0 -1
  62. package/dist/esm/index-51aa24d3.js +0 -1790
  63. package/dist/esm/index-51aa24d3.js.map +0 -1
  64. package/dist/esm/index.js.map +0 -1
  65. package/dist/esm/loader.js.map +0 -1
  66. package/dist/esm/polyfills/core-js.js +0 -11
  67. package/dist/esm/polyfills/dom.js +0 -79
  68. package/dist/esm/polyfills/es5-html-element.js +0 -1
  69. package/dist/esm/polyfills/index.js +0 -34
  70. package/dist/esm/polyfills/system.js +0 -6
  71. package/dist/esm/web-compnont.js.map +0 -1
  72. package/dist/web-compnont/index.esm.js.map +0 -1
  73. package/dist/web-compnont/p-06623215.js +0 -3
  74. package/dist/web-compnont/p-06623215.js.map +0 -1
  75. package/dist/web-compnont/p-55f91c48.entry.js +0 -10
  76. package/dist/web-compnont/p-55f91c48.entry.js.map +0 -1
  77. package/dist/web-compnont/web-compnont.esm.js.map +0 -1
  78. package/loader/package.json +0 -11
@@ -3,49 +3,59 @@ import Keycloak from "keycloak-js";
3
3
  import { toSvg } from "jdenticon";
4
4
  import { configService } from "../../services/config";
5
5
  import { menuService } from "../../services/menu";
6
+ import "ice-notification-component";
6
7
  export class DashButtonComponent {
7
- constructor() {
8
- this.toggleGlobalModules = () => {
9
- this.collapsedModuleSection = this.collapsedModuleSection === 'global' ? null : 'global';
10
- };
11
- this.toggleLocalModules = () => {
12
- this.collapsedModuleSection = this.collapsedModuleSection === 'local' ? null : 'local';
13
- };
14
- // The dropdown only becomes visible via CSS :hover (no JS "opened" event),
15
- // and componentDidRender's measurement can run while it's still
16
- // display:none — offsetHeight is always 0 for a hidden subtree, so that
17
- // first measurement can permanently stick maxHeight at 0px. Re-measuring
18
- // on mouseenter (when the dropdown is guaranteed visible) fixes it.
19
- this.handleDropdownMouseEnter = () => {
20
- this.capToRowPeek(this.gridLocalListEl, 2.5);
21
- this.capToRowPeek(this.listLocalScrollEl, 2.5);
22
- };
23
- this.showPostLoginText = false;
24
- this.silentCheckSso = false;
25
- this.redirectUri = undefined;
26
- this.authMethod = "check-sso";
27
- this.portalApiUrl = "";
28
- this.plmUrl = "https://productlicensemanager-zdzw.cloud.zdzw-project.com";
29
- this.showUnauthorizedModal = false;
30
- this.primaryColor = "";
31
- this.accentColor = "";
32
- this.keycloak = null;
33
- this.isAuth = false;
34
- this.givenUserName = "";
35
- this.silentCheckSsoRedirectUri = window.location.origin + '/assets/verificar-sso.html';
36
- this.appList = [];
37
- this.avatarSvg = toSvg("init-avatar", 40);
38
- this.isLoading = false;
39
- this.config = undefined;
40
- this.localMenuLinks = undefined;
41
- this.organizationUrl = undefined;
42
- this.isRestricted = false;
43
- this.collapsedModuleSection = null;
44
- }
8
+ el;
9
+ showPostLoginText = false;
10
+ silentCheckSso = false;
11
+ redirectUri;
12
+ authMethod = "check-sso";
13
+ portalApiUrl = "";
14
+ plmUrl = "https://productlicensemanager-zdzw.cloud.zdzw-project.com";
15
+ showUnauthorizedModal = false;
16
+ primaryColor = "";
17
+ accentColor = "";
18
+ keycloak = null;
19
+ isAuth = false;
20
+ givenUserName = "";
21
+ silentCheckSsoRedirectUri = window.location.origin + '/assets/verificar-sso.html';
22
+ appList = [];
23
+ avatarSvg = toSvg("init-avatar", 40);
24
+ isLoading = false;
25
+ config;
26
+ localMenuLinks;
27
+ organizationUrl;
28
+ isRestricted = false;
29
+ showNotification = true;
30
+ notificationPosition = 'left';
31
+ notificationDomain;
32
+ // Accordion: at most one of the two sections is collapsed at a time.
33
+ // Collapsing one always leaves the other expanded.
34
+ collapsedModuleSection = null;
35
+ gridLocalListEl;
36
+ listLocalScrollEl;
37
+ toggleGlobalModules = () => {
38
+ this.collapsedModuleSection = this.collapsedModuleSection === 'global' ? null : 'global';
39
+ };
40
+ toggleLocalModules = () => {
41
+ this.collapsedModuleSection = this.collapsedModuleSection === 'local' ? null : 'local';
42
+ };
43
+ // The dropdown only becomes visible via CSS :hover (no JS "opened" event),
44
+ // and componentDidRender's measurement can run while it's still
45
+ // display:none — offsetHeight is always 0 for a hidden subtree, so that
46
+ // first measurement can permanently stick maxHeight at 0px. Re-measuring
47
+ // on mouseenter (when the dropdown is guaranteed visible) fixes it.
48
+ handleDropdownMouseEnter = () => {
49
+ this.capToRowPeek(this.gridLocalListEl, 2.5);
50
+ this.capToRowPeek(this.listLocalScrollEl, 2.5);
51
+ };
45
52
  componentDidRender() {
46
53
  this.capToRowPeek(this.gridLocalListEl, 2.5);
47
54
  this.capToRowPeek(this.listLocalScrollEl, 2.5);
48
55
  }
56
+ componentDidLoad() {
57
+ document.addEventListener('click', this.handleNotificationLinkClick, true);
58
+ }
49
59
  // Caps a container to `rows` times its first item's rendered height, so
50
60
  // Local Modules always shows a partial next row as a "scroll for more"
51
61
  // cue instead of a clean cut. Measured off the real item (icon size,
@@ -62,19 +72,35 @@ export class DashButtonComponent {
62
72
  }
63
73
  container.style.maxHeight = `${firstItem.offsetHeight * rows}px`;
64
74
  }
75
+ disconnectedCallback() {
76
+ document.removeEventListener('click', this.handleNotificationLinkClick, true);
77
+ }
78
+ // Fix notification home icon click not opening a new tab
79
+ // (workaround for ice-notification-component shadow DOM click bug)
80
+ handleNotificationLinkClick = (event) => {
81
+ const path = event.composedPath();
82
+ const insideNotification = path.some((node) => node.tagName === 'NOTIFICATION-COMPONENT');
83
+ if (!insideNotification)
84
+ return;
85
+ const anchor = path.find((node) => node.tagName === 'A' && node.target === '_blank');
86
+ if (!anchor || !anchor.href)
87
+ return;
88
+ event.preventDefault();
89
+ event.stopPropagation();
90
+ window.open(anchor.href, '_blank', 'noopener');
91
+ };
65
92
  async componentWillLoad() {
66
- var _a, _b, _c, _d;
67
93
  // Fetch config from API
68
94
  this.config = await configService.fetchConfig(this.portalApiUrl);
69
95
  console.log(this.config);
70
96
  if (!this.config)
71
97
  return; // prevent Keycloak init if fetch failed
72
98
  // render will show spinner
73
- if ((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.loading) === null || _b === void 0 ? void 0 : _b.isLoading) {
99
+ if (this.config?.loading?.isLoading) {
74
100
  this.isLoading = true;
75
101
  setTimeout(() => {
76
102
  this.isLoading = false;
77
- }, (_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.loading) === null || _d === void 0 ? void 0 : _d.duration);
103
+ }, this.config?.loading?.duration);
78
104
  }
79
105
  // Initialize Keycloak
80
106
  this.keycloak = new Keycloak({
@@ -105,39 +131,39 @@ export class DashButtonComponent {
105
131
  checkLoginIframe: false,
106
132
  silentCheckSsoRedirectUri: this.silentCheckSso ? this.silentCheckSsoRedirectUri : '',
107
133
  }).then((res) => {
108
- var _a, _b, _c;
109
134
  if (res) {
110
135
  this.isAuth = true;
111
136
  localStorage.setItem("keycloak", JSON.stringify(this.keycloak));
112
137
  // document.cookie = "DASH_BTN=" + JSON.parse(localStorage.getItem('keycloak')).token;
113
- document.cookie = this.config.cookieName + "=" + JSON.parse((_a = localStorage.getItem('keycloak')) !== null && _a !== void 0 ? _a : '{}').token;
138
+ document.cookie = this.config.cookieName + "=" + JSON.parse(localStorage.getItem('keycloak') ?? '{}').token;
114
139
  // Set userName
115
- this.givenUserName = JSON.parse((_b = localStorage.getItem('keycloak')) !== null && _b !== void 0 ? _b : '{}').idTokenParsed.preferred_username;
140
+ this.givenUserName = JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.preferred_username;
116
141
  // Set user avatar
117
- this.avatarSvg = toSvg(JSON.parse((_c = localStorage.getItem('keycloak')) !== null && _c !== void 0 ? _c : '{}').idTokenParsed.sub, 40);
142
+ this.avatarSvg = toSvg(JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.sub, 40);
118
143
  }
119
144
  });
120
145
  }
121
146
  async loadOrganizationUrlAndLinks() {
122
- var _a, _b, _c;
123
147
  // Read org URL safely
124
148
  try {
125
149
  const kc = JSON.parse(localStorage.getItem("keycloak") || "{}");
126
- this.organizationUrl = ((_a = kc === null || kc === void 0 ? void 0 : kc.idTokenParsed) === null || _a === void 0 ? void 0 : _a.organizationUrl) || null;
150
+ this.organizationUrl = kc?.idTokenParsed?.organizationUrl || null;
127
151
  }
128
- catch (_d) {
152
+ catch {
129
153
  this.organizationUrl = null;
130
154
  }
131
155
  // If no organization, do nothing
132
156
  if (!this.organizationUrl)
133
157
  return;
134
158
  // If config or menu not ready, skip
135
- if (!((_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.menu) === null || _c === void 0 ? void 0 : _c.local))
159
+ if (!this.config?.menu?.local)
136
160
  return;
137
161
  // Only load when custom menu is NOT enabled
138
162
  if (!this.config.menu.local.enableCustomLocalMenu) {
139
163
  try {
140
164
  this.localMenuLinks = await menuService.getMenuLinks(this.organizationUrl);
165
+ console.log("======");
166
+ console.log(this.localMenuLinks);
141
167
  }
142
168
  catch (e) {
143
169
  console.error("Failed to load local menu", e);
@@ -149,26 +175,25 @@ export class DashButtonComponent {
149
175
  // Then, check the token's organization URL
150
176
  // Finally, check against dashbutton configuration: allowedGlobalDomain and whitelistedUrls
151
177
  validateAppAccessByUrl() {
152
- var _a, _b, _c, _d, _e, _f;
153
178
  const normalizeUrl = (url) => url.replace(/\/+$/, '');
154
179
  const currentUrl = normalizeUrl(window.location.href);
155
180
  const currentOrigin = normalizeUrl(window.location.origin);
156
- const globalLinks = ((_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.menu) === null || _b === void 0 ? void 0 : _b.global) === null || _c === void 0 ? void 0 : _c.links) || [];
157
- const allowedGlobalDomain = ((_d = this.config) === null || _d === void 0 ? void 0 : _d.allowedGlobalDomain) || '';
158
- const whitelistedUrls = ((_e = this.config) === null || _e === void 0 ? void 0 : _e.whitelistedUrls) || '';
181
+ const globalLinks = this.config?.menu?.global?.links || [];
182
+ const allowedGlobalDomain = this.config?.allowedGlobalDomain || '';
183
+ const whitelistedUrls = this.config?.whitelistedUrls || '';
159
184
  // First, check global links
160
185
  const matchGlobal = globalLinks.some(link => {
161
186
  try {
162
187
  const linkOrigin = normalizeUrl(new URL(link.url).origin);
163
188
  return currentOrigin === linkOrigin;
164
189
  }
165
- catch (_a) {
190
+ catch {
166
191
  return false;
167
192
  }
168
193
  });
169
194
  // Then check the token organization URL
170
- const tokenParsed = (_f = this.keycloak) === null || _f === void 0 ? void 0 : _f.tokenParsed;
171
- const allowedOrg = tokenParsed === null || tokenParsed === void 0 ? void 0 : tokenParsed.organizationUrl;
195
+ const tokenParsed = this.keycloak?.tokenParsed;
196
+ const allowedOrg = tokenParsed?.organizationUrl;
172
197
  const matchOrganization = allowedOrg && currentUrl.includes(normalizeUrl(allowedOrg));
173
198
  // Check allowedGlobalDomain (single domain)
174
199
  const matchAllowedDomain = allowedGlobalDomain &&
@@ -197,55 +222,133 @@ export class DashButtonComponent {
197
222
  // Normalizes the "Modules" list so grid view and list view can render it
198
223
  // with the exact same markup/classes used for the global "Applications" links.
199
224
  get moduleLinks() {
200
- var _a, _b, _c, _d, _e, _f;
201
- const useCustom = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.menu) === null || _b === void 0 ? void 0 : _b.local) === null || _c === void 0 ? void 0 : _c.enableCustomLocalMenu;
202
- if (useCustom) {
203
- return (((_f = (_e = (_d = this.config) === null || _d === void 0 ? void 0 : _d.menu) === null || _e === void 0 ? void 0 : _e.local) === null || _f === void 0 ? void 0 : _f.links) || []).map((item) => ({
225
+ const useCustom = this.config?.menu?.local?.enableCustomLocalMenu;
226
+ const links = useCustom
227
+ ? (this.config?.menu?.local?.links || []).map(item => ({
228
+ name: item.name,
229
+ url: item.url,
230
+ icon: item.icon,
231
+ disabled: !item.url,
232
+ }))
233
+ : (this.localMenuLinks || []).map(item => ({
204
234
  name: item.name,
205
235
  url: item.url,
206
236
  icon: item.icon,
207
237
  disabled: !item.url,
208
238
  }));
209
- }
210
- return (this.localMenuLinks || []).map((item) => ({
211
- name: item.name,
212
- url: item.url,
213
- icon: undefined,
214
- disabled: !item.url,
215
- }));
239
+ return links.sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: 'base' }));
216
240
  }
217
- renderSectionLabel(icon, label, count, collapsed, onToggle) {
218
- return (h("div", { class: "menu-section-header", onClick: onToggle }, h("div", { class: "menu-section-header-left" }, h("span", { class: "menu-section-icon" }, h("i", { class: icon })), h("span", { class: "menu-section-title" }, label), h("span", { class: "menu-section-count" }, count)), h("span", { class: "menu-section-chevron-btn" + (collapsed ? " menu-section-chevron-btn-collapsed" : "") }, h("i", { class: "fa-solid fa-chevron-down" }))));
241
+ isContainerizationModule(item) {
242
+ const name = (item.name || '')
243
+ .trim()
244
+ .toLowerCase()
245
+ .replace(/[\s_-]+/g, '');
246
+ return /^(containerization|containerisation)(module)?$/.test(name);
219
247
  }
248
+ get containerizationModule() {
249
+ return this.moduleLinks.find(item => this.isContainerizationModule(item));
250
+ }
251
+ get visibleModuleLinks() {
252
+ return this.moduleLinks.filter(item => !this.isContainerizationModule(item));
253
+ }
254
+ renderSectionLabel(icon, label, count, collapsed, onToggle, shortcut) {
255
+ return (h("div", { class: "menu-section-header", onClick: onToggle }, h("div", { class: "menu-section-header-left" }, h("span", { class: "menu-section-icon" }, h("i", { class: icon })), h("span", { class: "menu-section-title" }, label), h("span", { class: "menu-section-count" }, count)), h("div", { class: "menu-section-header-actions" }, shortcut && (h("a", { class: "footer-icon-btn footer-icon-btn-portal local-module-shortcut", href: shortcut.disabled ? undefined : shortcut.url, target: shortcut.disabled ? undefined : "_blank", rel: shortcut.disabled ? undefined : "noopener noreferrer", "aria-label": shortcut.name, "aria-disabled": shortcut.disabled ? "true" : undefined, tabIndex: shortcut.disabled ? -1 : undefined, "data-tooltip": shortcut.name, onClick: (event) => {
256
+ event.stopPropagation();
257
+ if (shortcut.disabled)
258
+ event.preventDefault();
259
+ } }, h("i", { class: "fa-solid fa-server" }))), h("span", { class: "menu-section-chevron-btn" +
260
+ (collapsed ? " menu-section-chevron-btn-collapsed" : "") }, h("i", { class: "fa-solid fa-chevron-down" })))));
261
+ }
262
+ renderNotificationComponent() {
263
+ const token = this.keycloak?.idTokenParsed;
264
+ const owner = token?.preferred_username || token?.sub || '';
265
+ if (!owner)
266
+ return null;
267
+ const notificationBaseUrl = this.notificationDomain
268
+ ? this.notificationDomain.trim().replace(/\/$/, '')
269
+ : (() => {
270
+ const organizationUrl = String(token?.organizationUrl || '').trim();
271
+ if (!organizationUrl)
272
+ return '';
273
+ try {
274
+ const url = /^https?:\/\//i.test(organizationUrl)
275
+ ? organizationUrl
276
+ : `https://${organizationUrl}`;
277
+ const orgHost = new URL(url).hostname;
278
+ return `https://notificationsbackend.${orgHost}`;
279
+ }
280
+ catch {
281
+ return '';
282
+ }
283
+ })();
284
+ if (!notificationBaseUrl)
285
+ return null;
286
+ return (h("notification-component", { owner: owner, "max-records": 10, "display-type": "icon", "notification-url": `${notificationBaseUrl}/notifications-api`, "socket-connect": true, "socket-url": `${notificationBaseUrl.replace(/^https:/, 'wss:').replace(/^http:/, 'ws:')}/socket`, "list-url": `${notificationBaseUrl}/notifications` }));
287
+ }
288
+ // renderNotificationComponent() {
289
+ // const token = this.keycloak?.idTokenParsed;
290
+ // const owner = token?.preferred_username || token?.sub || '';
291
+ // const organizationUrl = String(token?.organizationUrl || '').trim();
292
+ // if (!owner || !organizationUrl) return null;
293
+ // let orgHost: string;
294
+ // try {
295
+ // const url = /^https?:\/\//i.test(organizationUrl)
296
+ // ? organizationUrl
297
+ // : `https://${organizationUrl}`;
298
+ // orgHost = new URL(url).hostname;
299
+ // } catch {
300
+ // return null;
301
+ // }
302
+ // return (
303
+ // <notification-component
304
+ // owner={owner}
305
+ // max-records={10}
306
+ // display-type="icon"
307
+ // notification-url={`https://notifications.${orgHost}/notifications-api`}
308
+ // socket-connect={true}
309
+ // socket-url={`wss://repository.${orgHost}/socket`}
310
+ // list-url={`https://notifications.${orgHost}/notifications`}
311
+ // />
312
+ // );
313
+ // }
220
314
  render() {
221
- return h("div", { key: '27f25b1f44d080a82d28ec01a9d75660948e2fa7' }, h("div", { key: '4992a52ef58625c1cb1591c783eef3c58be50bff' }, (() => {
222
- var _a, _b, _c, _d, _e, _f, _g, _h;
315
+ return h("div", { key: 'ae55a1cf0256024f40f0b64d2e41e06abe59ab40' }, h("div", { key: '9d4920dcbdcfcedaec3e12298bbd67c162f244d4' }, (() => {
223
316
  // GLOBAL LOADING SPINNER
224
317
  if (this.isLoading) {
225
318
  return (h("a", { id: "login-btn", class: "button button-link" }, h("div", { class: "lds-ring" }, h("div", null), h("div", null), h("div", null), h("div", null))));
226
319
  }
227
320
  if (this.isRestricted) {
228
- return (h("div", { class: "restricted-overlay" }, h("div", { class: "restricted-card" }, h("div", { class: "restricted-icon" }, h("i", { class: "fa-solid fa-shield-halved" })), h("h2", null, "Access Restricted"), h("p", { class: "restricted-message" }, "You do not have permission to access this application. Please contact your administrator if you believe this is an error."), ((_d = (_c = (_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.menu) === null || _b === void 0 ? void 0 : _b.global) === null || _c === void 0 ? void 0 : _c.links) === null || _d === void 0 ? void 0 : _d.length) > 0 && (h("div", { class: "restricted-links" }, h("h4", null, "Publicly Available Modules"), h("div", { class: "link-grid" }, this.config.menu.global.links.map(item => (h("a", { href: item.url, target: "_blank", class: "restricted-link" }, h("i", { class: item.icon }), h("span", null, item.name))))))), h("div", { class: "restricted-actions" }, ((_f = (_e = this.config) === null || _e === void 0 ? void 0 : _e.defaultLink) === null || _f === void 0 ? void 0 : _f.url) && (h("a", { href: this.config.defaultLink.url, target: "_blank", class: "btn-primary" }, "Go to Portal")), h("button", { class: "btn-danger", onClick: this.logout.bind(this) }, "Logout")))));
321
+ return (h("div", { class: "restricted-overlay" }, h("div", { class: "restricted-card" }, h("div", { class: "restricted-icon" }, h("i", { class: "fa-solid fa-shield-halved" })), h("h2", null, "Access Restricted"), h("p", { class: "restricted-message" }, "You do not have permission to access this application. Please contact your administrator if you believe this is an error."), this.config?.menu?.global?.links?.length > 0 && (h("div", { class: "restricted-links" }, h("h4", null, "Publicly Available Modules"), h("div", { class: "link-grid" }, this.config.menu.global.links.map(item => (h("a", { href: item.url, target: "_blank", class: "restricted-link" }, h("i", { class: item.icon }), h("span", null, item.name))))))), h("div", { class: "restricted-actions" }, this.config?.defaultLink?.url && (h("a", { href: this.config.defaultLink.url, target: "_blank", class: "btn-primary" }, "Go to Portal")), h("button", { class: "btn-danger", onClick: this.logout.bind(this) }, "Logout")))));
229
322
  }
230
323
  if (this.isAuth && this.showPostLoginText) {
231
324
  return (h("a", { style: { background: this.primaryColor != undefined ? this.primaryColor : "" }, href: this.redirectUri, id: "login-btn", class: "button button-link" }, h("span", { style: { color: this.accentColor != undefined ? this.accentColor : "" }, class: "button-text button-text-full-width" }, "Go to Dashboard")));
232
325
  }
233
326
  else if (this.isAuth) {
234
- return (h("div", { class: "profile-actions", style: { display: "inline-flex", alignItems: "center", gap: "15px" } }, h("div", { id: "profile-btn", class: "dropdown", onMouseEnter: this.handleDropdownMouseEnter }, h("button", { style: { background: this.primaryColor != undefined ? this.primaryColor : "" }, type: "button", class: "button" }, h("span", { class: "button-profile" }, JSON.parse((_g = localStorage.getItem('keycloak')) !== null && _g !== void 0 ? _g : '{}').idTokenParsed.imageUrl ?
327
+ return (h("div", { class: "profile-actions", style: { display: "inline-flex", alignItems: "center", gap: "15px" } }, this.showNotification &&
328
+ this.notificationPosition === 'left' &&
329
+ this.renderNotificationComponent(), h("div", { id: "profile-btn", class: "dropdown", onMouseEnter: this.handleDropdownMouseEnter }, h("button", { style: { background: this.primaryColor != undefined ? this.primaryColor : "" }, type: "button", class: "button" }, h("span", { class: "button-profile" }, JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.imageUrl ?
235
330
  h("img", { class: "profile-image", src: "https://s-damith.github.io/test-avatar/images/e24da9c5-0b1f-46fa-82cd-7c711c77b5c7.png" })
236
331
  :
237
- h("div", { innerHTML: this.avatarSvg })), h("span", { style: { color: this.accentColor != undefined ? this.accentColor : "" }, id: "given-name", class: "button-text" }, this.givenUserName), h("div", { class: "button-icon" }, (this.config.menuViewType == "grid") ? h("i", { class: "fa-solid fa-grip-vertical" }) : h("i", { class: "fa-solid fa-bars" }))), h("div", { class: "dropdown-content" }, h("div", { class: "dropdown-user-profile" }, h("div", { class: "user-profile-info" }, h("div", { class: "username" }, "@", this.givenUserName), h("div", { class: "first-last-name" }, JSON.parse((_h = localStorage.getItem('keycloak')) !== null && _h !== void 0 ? _h : '{}').idTokenParsed.name)), h("div", { class: "user-profile-actions" }, h("a", { href: this.config.defaultLink.url, target: "_blank", rel: "noopener noreferrer", class: "footer-icon-btn footer-icon-btn-portal", "aria-label": this.config.defaultLink.name || "Portal", "data-tooltip": this.config.defaultLink.name || "Portal" }, h("i", { class: "fa-solid fa-globe" })), h("button", { type: "button", onClick: this.logout.bind(this), class: "footer-icon-btn footer-icon-btn-logout", "aria-label": "Logout", "data-tooltip": "Logout" }, h("i", { class: "fa-solid fa-right-from-bracket" })))), (this.config.menuViewType == "grid") ? (h("div", null, this.moduleLinks.length > 0 && this.renderSectionLabel("fa-solid fa-earth-americas", "Global Modules", this.config.menu.global.links.length, (this.collapsedModuleSection === 'global'), this.toggleGlobalModules), (this.moduleLinks.length === 0 || this.collapsedModuleSection !== 'global') && (h("div", { class: "grid-view-menu" }, this.config.menu.global.links.map(item => {
332
+ h("div", { innerHTML: this.avatarSvg })), h("span", { style: { color: this.accentColor != undefined ? this.accentColor : "" }, id: "given-name", class: "button-text" }, this.givenUserName), h("div", { class: "button-icon" }, (this.config.menuViewType == "grid") ? h("i", { class: "fa-solid fa-grip-vertical" }) : h("i", { class: "fa-solid fa-bars" }))), h("div", { class: "dropdown-content" }, h("div", { class: "dropdown-user-profile" }, h("div", { class: "user-profile-info" }, h("div", { class: "username" }, "@", this.givenUserName), h("div", { class: "first-last-name" }, JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.name)), h("div", { class: "user-profile-actions" }, h("a", { href: this.config.defaultLink.url, target: "_blank", rel: "noopener noreferrer", class: "footer-icon-btn footer-icon-btn-portal", "aria-label": this.config.defaultLink.name || "Portal", "data-tooltip": this.config.defaultLink.name || "Portal" }, h("i", { class: "fa-solid fa-globe" })), h("button", { type: "button", onClick: this.logout.bind(this), class: "footer-icon-btn footer-icon-btn-logout", "aria-label": "Logout", "data-tooltip": "Logout" }, h("i", { class: "fa-solid fa-right-from-bracket" })))), (this.config.menuViewType == "grid") ? (h("div", null, this.moduleLinks.length > 0 && this.renderSectionLabel("fa-solid fa-earth-americas", "Global Modules", this.config.menu.global.links.length, (this.collapsedModuleSection === 'global'), this.toggleGlobalModules), (this.moduleLinks.length === 0 || this.collapsedModuleSection !== 'global') && (h("div", { class: "grid-view-menu" }, this.config.menu.global.links.map(item => {
238
333
  return (h("a", { href: item.url, target: '_blank', rel: "noopener noreferrer", class: "grid-view-link" }, h("i", { class: item.icon + " fa-2x" }), h("div", { class: "grid-view-link-text" }, item.name)));
239
- }))), this.moduleLinks.length > 0 && (h("div", { style: { display: "contents" } }, h("hr", { class: "solid" }), this.renderSectionLabel("fa-solid fa-building", "Local Modules", this.moduleLinks.length, (this.collapsedModuleSection === 'local'), this.toggleLocalModules), !(this.collapsedModuleSection === 'local') && (h("div", { class: "grid-view-menu", ref: (el) => this.gridLocalListEl = el }, this.moduleLinks.map(item => (h("a", { class: "grid-view-link" + (item.disabled ? " grid-view-link-disabled" : ""), href: item.disabled ? undefined : item.url, target: item.disabled ? undefined : "_blank", rel: item.disabled ? undefined : "noopener noreferrer", onClick: item.disabled ? (e) => e.preventDefault() : undefined }, h("i", { class: (item.icon || "fa-solid fa-cube") + " fa-2x" }), h("div", { class: "grid-view-link-text" }, item.name)))))))))) : (
334
+ }))), this.moduleLinks.length > 0 && (h("div", { style: { display: "contents" } }, h("hr", { class: "solid" }), this.renderSectionLabel("fa-solid fa-building", "Local Modules", this.visibleModuleLinks.length, this.collapsedModuleSection === 'local', this.toggleLocalModules, this.containerizationModule), !(this.collapsedModuleSection === 'local') && (h("div", { class: "grid-view-menu", ref: (el) => this.gridLocalListEl = el }, this.visibleModuleLinks.map(item => {
335
+ const isImageUrl = item.icon && /^https?:\/\//i.test(item.icon);
336
+ const iconClass = item.icon && !isImageUrl
337
+ ? item.icon
338
+ : "fa-solid fa-cube";
339
+ return (h("a", { class: "grid-view-link" + (item.disabled ? " grid-view-link-disabled" : ""), href: item.disabled ? undefined : item.url, target: item.disabled ? undefined : "_blank", rel: item.disabled ? undefined : "noopener noreferrer", onClick: item.disabled ? (e) => e.preventDefault() : undefined }, isImageUrl ? (h("img", { src: item.icon, alt: item.name, class: "grid-view-link-image" })) : (h("i", { class: iconClass + " fa-2x" })), h("div", { class: "grid-view-link-text" }, item.name)));
340
+ }))))))) : (
240
341
  // List View
241
342
  h("div", { class: "dropdown-content-link" }, this.moduleLinks.length > 0 && this.renderSectionLabel("fa-solid fa-earth-americas", "Global Modules", this.config.menu.global.links.length, (this.collapsedModuleSection === 'global'), this.toggleGlobalModules), (this.moduleLinks.length === 0 || this.collapsedModuleSection !== 'global') && (this.config.menu.global.links.map(item => {
242
343
  return (h("a", { href: item.url, target: '_blank', rel: "noopener noreferrer", id: "applications-btn" }, h("i", { class: item.icon + " menu-bar-icons" }), item.name));
243
- })), this.moduleLinks.length > 0 && (h("div", { style: { display: "contents" } }, this.renderSectionLabel("fa-solid fa-building", "Local Modules", this.moduleLinks.length, (this.collapsedModuleSection === 'local'), this.toggleLocalModules), !(this.collapsedModuleSection === 'local') && (h("div", { class: "local-modules-scroll", ref: (el) => this.listLocalScrollEl = el }, this.moduleLinks.map(item => (h("a", { id: "applications-btn", class: item.disabled ? "applications-btn-disabled" : undefined, href: item.disabled ? undefined : item.url, target: item.disabled ? undefined : "_blank", rel: item.disabled ? undefined : "noopener noreferrer", onClick: item.disabled ? (e) => e.preventDefault() : undefined }, h("i", { class: (item.icon || "fa-solid fa-cube") + " menu-bar-icons" }), item.name)))))))))))));
344
+ })), this.moduleLinks.length > 0 && (h("div", { style: { display: "contents" } }, this.renderSectionLabel("fa-solid fa-building", "Local Modules", this.moduleLinks.length, (this.collapsedModuleSection === 'local'), this.toggleLocalModules), !(this.collapsedModuleSection === 'local') && (h("div", { class: "local-modules-scroll", ref: (el) => this.listLocalScrollEl = el }, this.moduleLinks.map(item => (h("a", { id: "applications-btn", class: item.disabled ? "applications-btn-disabled" : undefined, href: item.disabled ? undefined : item.url, target: item.disabled ? undefined : "_blank", rel: item.disabled ? undefined : "noopener noreferrer", onClick: item.disabled ? (e) => e.preventDefault() : undefined }, h("i", { class: (item.icon || "fa-solid fa-cube") + " menu-bar-icons" }), item.name)))))))))), this.showNotification &&
345
+ this.notificationPosition === 'right' &&
346
+ this.renderNotificationComponent())));
244
347
  }
245
348
  else {
246
349
  return (h("button", { style: { background: this.primaryColor != undefined ? this.primaryColor : "" }, onClick: this.login.bind(this), id: "login-btn", type: "button", class: "button" }, h("span", { style: { color: this.accentColor != undefined ? this.accentColor : "" }, class: "button-text" }, "Login")));
247
350
  }
248
- })()), h("div", { key: 'ad2e0ae280f95f24057cb411f8c64f5949e8893b', id: "appPermissionErrorModal", class: "modal" }, h("div", { key: '04faf5f2d30538b5e85c339ca683a8c8559b486a', class: "modal-content" }, h("img", { key: '0e8063f377451a39718e83554e9fb74dae603b5f', src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGD0lEQVR4nO2cbU8TWRTH/W5WEAmF4nNiieFFoeBjYhQUWzUWYkpbDfGFCR9CoolvQF9aWgG3kMCG8LACC1ikuCuUh7bH/M/MmW131S2ZqTDjPcmkdub2tvPj3HP/55yJR44oU6ZMmTJlyg7YOsL9pI7+shkogGFzDqMAhhVAOsiQozwwrACS8sCwfXd+tYTDCiApDwwf/FJUSzisAJKjNhFlPzYF0KQpgCZNATRpCqBJUwBNmgJo0hRAk6YAmjQF0KkAs4uLtPz8OU2HQpRqaaFkQwPFq6v5SHo8fA7XVgYGKLu0dGC/81ABLORylB4cpInLl+nt0aP7OiauXKH00BAV8vlfE2AmkaCxpiYDSKK6mqaammjx+nX6FAzS348e0VYkwgf+jXO4Nun18lj53PuLF2kjmfx1AOa3t2mmt9cAkDxxghauXaPN3l7KxmJlHRgLmKNutzHPTCTCczsa4G4mQ6nWVr7h4WPHaL6trQTc+r17NOf30/iZMzTmdtNwVRWPA2Scm/H56FMgQNlolMfDO/9ob+cxmDPl99PuxoYzAe5mMrzcxOvWAALgolFauXmTxurry45/gPvnjRsG+LW7d3lOWdKVhHggAPPb24bnvW9ooL96evjGP4dC9NvJkwaY0fPnaa6vjzLJJG19+ED5bJY/u5NOUyYep/lnz2jk3Ll/4p/Hw/B4ru5unls8Mb+z4xyAM3rMg5cIvHRXFyVqavg8oKy+elXWjooxqy9f0luXy5gTm4xAFE+cjcWcATCTSGgxr6rKWLaAF9fj1u+BAOW2tsqeL7+7S5OdnRq8mhpaf/CA5xSI8EiJiRsjI/YGWMjlDKmCDUOWrXje3NOnRIWCaXh45biqL+f59nYjHlqtE38qwPTgoLHMeLeNRo2YB8+zEp7ExK1olI+Rujo+t/b6tX0BTugZBnQebha7rcQ8K5Ytw9O9WWKi7M7QiZKx2BJgdnHRyDDE+0SqYMOwEt7k7dvaxqJLHHwXvpMzFpeLtpeX7QdwZWCAbwjpmYhkkSrlxqVy4WEc4q1IHBbbsRhNXrjA71devLAfwOlQiH88lhJuBhkGbxx9fZbDE4NO5LTO5+OxCB14P93dbT+AKZ9P84ZgkG8GqRjeQ9ZUAh4MYhvXxs+e5fHwRBbWra32A5j0ePjHf9H1mST+2YWFisCDba+u8vV3tbWGNuT3jY32AxjXS06QFLgZKUH9aPct7O3RVFfXf+BlHj6kZG2tBq+j47tpGs5LoYKrNpGI9v74cfsDHNazg+/dvFl4sNzmprHz2x5g8l9LWMTuzsePli7bYkMBgqVMfb39l3CqpeXbm0g8XhF439xEgkGjOmN7GTOjA4XU2Be8zs6y4MFmnzzRpJLfXypjenrsK6Qnvd4SSQGxCyFtNbxiIb1+/74mpL1e+wrp7NISp1ElqZwuZZB2WQkPZqRyevz7Eg5zCc22qVxxMUGWMRL94sTfKnjYfd+dPq15261bpcWEq1fJvuWsoSEt/3W7tRZlNMolJylxWQEPJTGRP6lTpwz5YpSz3ryxcUE1nzcaSeieFTeArIKH3Fq8GSX9koJqc7O9C6owNL0lO5CKsZTfzS7bqTt3+LPxornxKu2Cz6Oj5IymUkTLCOB54iWAKOIaMRE7JXbS/zOMwYYhMQ9/gOLOnPxBZh8/dlhb06+Vs9B6FIi4cYmJInGgEyGIkbHgc8idkWHgHHRecVsTMU/mwuuY3tYcv3TJWW1NGJrdJY113WtkdxaJU84BqSK7rRFXdc/Dd+w5rbFeDHG8rc2IiQj2UmwQsY1iKFIxlKSg46AjARfnkGGISOZHO6JRnkNiHjzPsY92iGFZoultLNu6OtZs+3m4CCIZnxGpIjGvUsv2UAEUQ9NblrSUoNDDQP4KT+TH2/QWJT/eFgjwNaRnnGHI4x3NzRXZbQ89QBg0GsQ2Wo+SnZR1uFycYbBI3kdv2XEAiw35KqQMGkDoYaCeaDzi29jIuziuYYyVua1jANrFFECTpgCaNAXQpCmAJk0BNGkKoElTACsNUB39ZTFQAMMW/78xypQpU6ZMmbIjP9e+AkAlsBlIjsPOAAAAAElFTkSuQmCC" }), h("h2", { key: '2073a6ee6e216778036b4637c80fb2c96361cbaf', class: "green-text margin-b" }, "You don't have permission to access this application."), h("h3", { key: 'd90e387ecf3aa39ff096b21e7e4b80e9234513e3', class: "green-text" }, "Please contact the administration."), (this.config.defaultLink.url && this.showUnauthorizedModal) ?
351
+ })()), h("div", { key: '264f79472b783f8a509542e4c6ff9e9ff0898e97', id: "appPermissionErrorModal", class: "modal" }, h("div", { key: '072b848701fc7c67f27099461935eb1530bab487', class: "modal-content" }, h("img", { key: '5a782dc7248a56f1e0db4858fc5594ffe2dcd504', src: "data:image/png;base64,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" }), h("h2", { key: '5b01ba68a75b1de739cea31965ff996d3d49ffbe', class: "green-text margin-b" }, "You don't have permission to access this application."), h("h3", { key: '8346afb362260f5f07dd4050c1fc200b158be8da', class: "green-text" }, "Please contact the administration."), (this.config.defaultLink.url && this.showUnauthorizedModal) ?
249
352
  h("div", null, h("h4", { class: "gray-text" }, "You will be automatically redirected to the portal."), h("div", { id: "countdown" }, h("div", { id: "countdown-number" }), h("svg", null, h("circle", { r: "18", cx: "20", cy: "20" }))))
250
353
  : h("div", null))));
251
354
  }
@@ -277,8 +380,10 @@ export class DashButtonComponent {
277
380
  "tags": [],
278
381
  "text": ""
279
382
  },
280
- "attribute": "show-post-login-text",
383
+ "getter": false,
384
+ "setter": false,
281
385
  "reflect": false,
386
+ "attribute": "show-post-login-text",
282
387
  "defaultValue": "false"
283
388
  },
284
389
  "silentCheckSso": {
@@ -295,8 +400,10 @@ export class DashButtonComponent {
295
400
  "tags": [],
296
401
  "text": ""
297
402
  },
298
- "attribute": "silent-check-sso",
403
+ "getter": false,
404
+ "setter": false,
299
405
  "reflect": false,
406
+ "attribute": "silent-check-sso",
300
407
  "defaultValue": "false"
301
408
  },
302
409
  "redirectUri": {
@@ -313,8 +420,10 @@ export class DashButtonComponent {
313
420
  "tags": [],
314
421
  "text": ""
315
422
  },
316
- "attribute": "redirect-uri",
317
- "reflect": false
423
+ "getter": false,
424
+ "setter": false,
425
+ "reflect": false,
426
+ "attribute": "redirect-uri"
318
427
  },
319
428
  "authMethod": {
320
429
  "type": "string",
@@ -330,8 +439,10 @@ export class DashButtonComponent {
330
439
  "tags": [],
331
440
  "text": ""
332
441
  },
333
- "attribute": "auth-method",
442
+ "getter": false,
443
+ "setter": false,
334
444
  "reflect": false,
445
+ "attribute": "auth-method",
335
446
  "defaultValue": "\"check-sso\""
336
447
  },
337
448
  "portalApiUrl": {
@@ -348,8 +459,10 @@ export class DashButtonComponent {
348
459
  "tags": [],
349
460
  "text": ""
350
461
  },
351
- "attribute": "portal-api-url",
462
+ "getter": false,
463
+ "setter": false,
352
464
  "reflect": false,
465
+ "attribute": "portal-api-url",
353
466
  "defaultValue": "\"\""
354
467
  },
355
468
  "plmUrl": {
@@ -366,8 +479,10 @@ export class DashButtonComponent {
366
479
  "tags": [],
367
480
  "text": ""
368
481
  },
369
- "attribute": "plm-url",
482
+ "getter": false,
483
+ "setter": false,
370
484
  "reflect": false,
485
+ "attribute": "plm-url",
371
486
  "defaultValue": "\"https://productlicensemanager-zdzw.cloud.zdzw-project.com\""
372
487
  },
373
488
  "showUnauthorizedModal": {
@@ -384,8 +499,10 @@ export class DashButtonComponent {
384
499
  "tags": [],
385
500
  "text": ""
386
501
  },
387
- "attribute": "show-unauthorized-modal",
502
+ "getter": false,
503
+ "setter": false,
388
504
  "reflect": false,
505
+ "attribute": "show-unauthorized-modal",
389
506
  "defaultValue": "false"
390
507
  },
391
508
  "primaryColor": {
@@ -402,8 +519,10 @@ export class DashButtonComponent {
402
519
  "tags": [],
403
520
  "text": ""
404
521
  },
405
- "attribute": "primary-color",
522
+ "getter": false,
523
+ "setter": false,
406
524
  "reflect": false,
525
+ "attribute": "primary-color",
407
526
  "defaultValue": "\"\""
408
527
  },
409
528
  "accentColor": {
@@ -420,9 +539,70 @@ export class DashButtonComponent {
420
539
  "tags": [],
421
540
  "text": ""
422
541
  },
423
- "attribute": "accent-color",
542
+ "getter": false,
543
+ "setter": false,
424
544
  "reflect": false,
545
+ "attribute": "accent-color",
425
546
  "defaultValue": "\"\""
547
+ },
548
+ "showNotification": {
549
+ "type": "boolean",
550
+ "mutable": false,
551
+ "complexType": {
552
+ "original": "boolean",
553
+ "resolved": "boolean",
554
+ "references": {}
555
+ },
556
+ "required": false,
557
+ "optional": false,
558
+ "docs": {
559
+ "tags": [],
560
+ "text": ""
561
+ },
562
+ "getter": false,
563
+ "setter": false,
564
+ "reflect": false,
565
+ "attribute": "show-notification",
566
+ "defaultValue": "true"
567
+ },
568
+ "notificationPosition": {
569
+ "type": "string",
570
+ "mutable": false,
571
+ "complexType": {
572
+ "original": "'left' | 'right'",
573
+ "resolved": "\"left\" | \"right\"",
574
+ "references": {}
575
+ },
576
+ "required": false,
577
+ "optional": false,
578
+ "docs": {
579
+ "tags": [],
580
+ "text": ""
581
+ },
582
+ "getter": false,
583
+ "setter": false,
584
+ "reflect": false,
585
+ "attribute": "notification-position",
586
+ "defaultValue": "'left'"
587
+ },
588
+ "notificationDomain": {
589
+ "type": "string",
590
+ "mutable": false,
591
+ "complexType": {
592
+ "original": "string",
593
+ "resolved": "string",
594
+ "references": {}
595
+ },
596
+ "required": false,
597
+ "optional": true,
598
+ "docs": {
599
+ "tags": [],
600
+ "text": ""
601
+ },
602
+ "getter": false,
603
+ "setter": false,
604
+ "reflect": false,
605
+ "attribute": "notification-domain"
426
606
  }
427
607
  };
428
608
  }
@@ -444,4 +624,3 @@ export class DashButtonComponent {
444
624
  }
445
625
  static get elementRef() { return "el"; }
446
626
  }
447
- //# sourceMappingURL=dash-button.js.map
@@ -1,2 +1 @@
1
1
  export * from './components';
2
- //# sourceMappingURL=index.js.map
@@ -27,9 +27,8 @@ const DEFAULT_CONFIG = {
27
27
  };
28
28
  // Fetch config from API
29
29
  class ConfigService {
30
- constructor() {
31
- this._config = DEFAULT_CONFIG;
32
- }
30
+ static instance;
31
+ _config = DEFAULT_CONFIG;
33
32
  static getInstance() {
34
33
  if (!ConfigService.instance) {
35
34
  ConfigService.instance = new ConfigService();
@@ -42,7 +41,7 @@ class ConfigService {
42
41
  if (!res.ok)
43
42
  throw new Error('Failed to fetch config');
44
43
  const data = await res.json();
45
- this._config = Object.assign(Object.assign({}, DEFAULT_CONFIG), data); // Merge API data with defaults
44
+ this._config = { ...DEFAULT_CONFIG, ...data }; // Merge API data with defaults
46
45
  }
47
46
  catch (e) {
48
47
  console.warn('Using default config due to API failure', e);
@@ -58,4 +57,3 @@ class ConfigService {
58
57
  }
59
58
  }
60
59
  export const configService = ConfigService.getInstance();
61
- //# sourceMappingURL=config.js.map
@@ -43,7 +43,7 @@ class MenuService {
43
43
  throw new Error('API error');
44
44
  return await res.json();
45
45
  }
46
- catch (_a) {
46
+ catch {
47
47
  return { data: [], total: 0, page: 1, perPage: 0, totalPages: 0 };
48
48
  }
49
49
  }
@@ -63,17 +63,16 @@ class MenuService {
63
63
  urlObj.hostname = `containerisationbackend.${urlObj.hostname}`;
64
64
  const { data } = await this.getMenuConfig(`${urlObj.origin}/developer/charts/installed`);
65
65
  return data.map(d => {
66
- var _a, _b, _c;
67
- const frontendUrlPrefix = (_a = d.metadata) === null || _a === void 0 ? void 0 : _a.frontendUrlPrefix;
66
+ const frontendUrlPrefix = d.metadata?.frontendUrlPrefix;
68
67
  const rootDomain = getRootDomain(BASE_URL);
69
68
  const generatedUrl = `${getUrlProtocol(BASE_URL)}${frontendUrlPrefix}.${rootDomain}`;
70
69
  return {
71
70
  name: d.installChartName,
72
71
  url: frontendUrlPrefix ? generatedUrl : "",
73
- category: (_c = (_b = d.metadata) === null || _b === void 0 ? void 0 : _b.category) !== null && _c !== void 0 ? _c : "",
72
+ category: d.metadata?.category ?? "",
73
+ icon: d.metadata?.icon ?? "",
74
74
  };
75
75
  });
76
76
  }
77
77
  }
78
78
  export const menuService = new MenuService();
79
- //# sourceMappingURL=menu.js.map