dash-button-web 0.0.24 → 0.0.25

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 +11790 -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 +213 -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 +11785 -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 +11 -1
  29. package/dist/types/components.d.ts +83 -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-DQuL1Twl.js +1 -0
  34. package/dist/web-compnont/p-NLvZO6-E.js +3 -0
  35. package/dist/web-compnont/p-ce35027b.entry.js +2 -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,58 @@ 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
+ // Accordion: at most one of the two sections is collapsed at a time.
32
+ // Collapsing one always leaves the other expanded.
33
+ collapsedModuleSection = null;
34
+ gridLocalListEl;
35
+ listLocalScrollEl;
36
+ toggleGlobalModules = () => {
37
+ this.collapsedModuleSection = this.collapsedModuleSection === 'global' ? null : 'global';
38
+ };
39
+ toggleLocalModules = () => {
40
+ this.collapsedModuleSection = this.collapsedModuleSection === 'local' ? null : 'local';
41
+ };
42
+ // The dropdown only becomes visible via CSS :hover (no JS "opened" event),
43
+ // and componentDidRender's measurement can run while it's still
44
+ // display:none — offsetHeight is always 0 for a hidden subtree, so that
45
+ // first measurement can permanently stick maxHeight at 0px. Re-measuring
46
+ // on mouseenter (when the dropdown is guaranteed visible) fixes it.
47
+ handleDropdownMouseEnter = () => {
48
+ this.capToRowPeek(this.gridLocalListEl, 2.5);
49
+ this.capToRowPeek(this.listLocalScrollEl, 2.5);
50
+ };
45
51
  componentDidRender() {
46
52
  this.capToRowPeek(this.gridLocalListEl, 2.5);
47
53
  this.capToRowPeek(this.listLocalScrollEl, 2.5);
48
54
  }
55
+ componentDidLoad() {
56
+ document.addEventListener('click', this.handleNotificationLinkClick, true);
57
+ }
49
58
  // Caps a container to `rows` times its first item's rendered height, so
50
59
  // Local Modules always shows a partial next row as a "scroll for more"
51
60
  // cue instead of a clean cut. Measured off the real item (icon size,
@@ -62,19 +71,35 @@ export class DashButtonComponent {
62
71
  }
63
72
  container.style.maxHeight = `${firstItem.offsetHeight * rows}px`;
64
73
  }
74
+ disconnectedCallback() {
75
+ document.removeEventListener('click', this.handleNotificationLinkClick, true);
76
+ }
77
+ // Fix notification home icon click not opening a new tab
78
+ // (workaround for ice-notification-component shadow DOM click bug)
79
+ handleNotificationLinkClick = (event) => {
80
+ const path = event.composedPath();
81
+ const insideNotification = path.some((node) => node.tagName === 'NOTIFICATION-COMPONENT');
82
+ if (!insideNotification)
83
+ return;
84
+ const anchor = path.find((node) => node.tagName === 'A' && node.target === '_blank');
85
+ if (!anchor || !anchor.href)
86
+ return;
87
+ event.preventDefault();
88
+ event.stopPropagation();
89
+ window.open(anchor.href, '_blank', 'noopener');
90
+ };
65
91
  async componentWillLoad() {
66
- var _a, _b, _c, _d;
67
92
  // Fetch config from API
68
93
  this.config = await configService.fetchConfig(this.portalApiUrl);
69
94
  console.log(this.config);
70
95
  if (!this.config)
71
96
  return; // prevent Keycloak init if fetch failed
72
97
  // 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) {
98
+ if (this.config?.loading?.isLoading) {
74
99
  this.isLoading = true;
75
100
  setTimeout(() => {
76
101
  this.isLoading = false;
77
- }, (_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.loading) === null || _d === void 0 ? void 0 : _d.duration);
102
+ }, this.config?.loading?.duration);
78
103
  }
79
104
  // Initialize Keycloak
80
105
  this.keycloak = new Keycloak({
@@ -105,39 +130,39 @@ export class DashButtonComponent {
105
130
  checkLoginIframe: false,
106
131
  silentCheckSsoRedirectUri: this.silentCheckSso ? this.silentCheckSsoRedirectUri : '',
107
132
  }).then((res) => {
108
- var _a, _b, _c;
109
133
  if (res) {
110
134
  this.isAuth = true;
111
135
  localStorage.setItem("keycloak", JSON.stringify(this.keycloak));
112
136
  // 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;
137
+ document.cookie = this.config.cookieName + "=" + JSON.parse(localStorage.getItem('keycloak') ?? '{}').token;
114
138
  // Set userName
115
- this.givenUserName = JSON.parse((_b = localStorage.getItem('keycloak')) !== null && _b !== void 0 ? _b : '{}').idTokenParsed.preferred_username;
139
+ this.givenUserName = JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.preferred_username;
116
140
  // Set user avatar
117
- this.avatarSvg = toSvg(JSON.parse((_c = localStorage.getItem('keycloak')) !== null && _c !== void 0 ? _c : '{}').idTokenParsed.sub, 40);
141
+ this.avatarSvg = toSvg(JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.sub, 40);
118
142
  }
119
143
  });
120
144
  }
121
145
  async loadOrganizationUrlAndLinks() {
122
- var _a, _b, _c;
123
146
  // Read org URL safely
124
147
  try {
125
148
  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;
149
+ this.organizationUrl = kc?.idTokenParsed?.organizationUrl || null;
127
150
  }
128
- catch (_d) {
151
+ catch {
129
152
  this.organizationUrl = null;
130
153
  }
131
154
  // If no organization, do nothing
132
155
  if (!this.organizationUrl)
133
156
  return;
134
157
  // 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))
158
+ if (!this.config?.menu?.local)
136
159
  return;
137
160
  // Only load when custom menu is NOT enabled
138
161
  if (!this.config.menu.local.enableCustomLocalMenu) {
139
162
  try {
140
163
  this.localMenuLinks = await menuService.getMenuLinks(this.organizationUrl);
164
+ console.log("======");
165
+ console.log(this.localMenuLinks);
141
166
  }
142
167
  catch (e) {
143
168
  console.error("Failed to load local menu", e);
@@ -149,26 +174,25 @@ export class DashButtonComponent {
149
174
  // Then, check the token's organization URL
150
175
  // Finally, check against dashbutton configuration: allowedGlobalDomain and whitelistedUrls
151
176
  validateAppAccessByUrl() {
152
- var _a, _b, _c, _d, _e, _f;
153
177
  const normalizeUrl = (url) => url.replace(/\/+$/, '');
154
178
  const currentUrl = normalizeUrl(window.location.href);
155
179
  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) || '';
180
+ const globalLinks = this.config?.menu?.global?.links || [];
181
+ const allowedGlobalDomain = this.config?.allowedGlobalDomain || '';
182
+ const whitelistedUrls = this.config?.whitelistedUrls || '';
159
183
  // First, check global links
160
184
  const matchGlobal = globalLinks.some(link => {
161
185
  try {
162
186
  const linkOrigin = normalizeUrl(new URL(link.url).origin);
163
187
  return currentOrigin === linkOrigin;
164
188
  }
165
- catch (_a) {
189
+ catch {
166
190
  return false;
167
191
  }
168
192
  });
169
193
  // 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;
194
+ const tokenParsed = this.keycloak?.tokenParsed;
195
+ const allowedOrg = tokenParsed?.organizationUrl;
172
196
  const matchOrganization = allowedOrg && currentUrl.includes(normalizeUrl(allowedOrg));
173
197
  // Check allowedGlobalDomain (single domain)
174
198
  const matchAllowedDomain = allowedGlobalDomain &&
@@ -197,55 +221,99 @@ export class DashButtonComponent {
197
221
  // Normalizes the "Modules" list so grid view and list view can render it
198
222
  // with the exact same markup/classes used for the global "Applications" links.
199
223
  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) => ({
224
+ const useCustom = this.config?.menu?.local?.enableCustomLocalMenu;
225
+ const links = useCustom
226
+ ? (this.config?.menu?.local?.links || []).map(item => ({
227
+ name: item.name,
228
+ url: item.url,
229
+ icon: item.icon,
230
+ disabled: !item.url,
231
+ }))
232
+ : (this.localMenuLinks || []).map(item => ({
204
233
  name: item.name,
205
234
  url: item.url,
206
235
  icon: item.icon,
207
236
  disabled: !item.url,
208
237
  }));
209
- }
210
- return (this.localMenuLinks || []).map((item) => ({
211
- name: item.name,
212
- url: item.url,
213
- icon: undefined,
214
- disabled: !item.url,
215
- }));
238
+ return links.sort((a, b) => a.name.localeCompare(b.name, undefined, { sensitivity: 'base' }));
239
+ }
240
+ isContainerizationModule(item) {
241
+ const name = (item.name || '')
242
+ .trim()
243
+ .toLowerCase()
244
+ .replace(/[\s_-]+/g, '');
245
+ return /^(containerization|containerisation)(module)?$/.test(name);
246
+ }
247
+ get containerizationModule() {
248
+ return this.moduleLinks.find(item => this.isContainerizationModule(item));
216
249
  }
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" }))));
250
+ get visibleModuleLinks() {
251
+ return this.moduleLinks.filter(item => !this.isContainerizationModule(item));
252
+ }
253
+ renderSectionLabel(icon, label, count, collapsed, onToggle, shortcut) {
254
+ 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) => {
255
+ event.stopPropagation();
256
+ if (shortcut.disabled)
257
+ event.preventDefault();
258
+ } }, h("i", { class: "fa-solid fa-server" }))), h("span", { class: "menu-section-chevron-btn" +
259
+ (collapsed ? " menu-section-chevron-btn-collapsed" : "") }, h("i", { class: "fa-solid fa-chevron-down" })))));
260
+ }
261
+ renderNotificationComponent() {
262
+ const token = this.keycloak?.idTokenParsed;
263
+ const owner = token?.preferred_username || token?.sub || '';
264
+ const organizationUrl = String(token?.organizationUrl || '').trim();
265
+ if (!owner || !organizationUrl)
266
+ return null;
267
+ let orgHost;
268
+ try {
269
+ const url = /^https?:\/\//i.test(organizationUrl)
270
+ ? organizationUrl
271
+ : `https://${organizationUrl}`;
272
+ orgHost = new URL(url).hostname;
273
+ }
274
+ catch {
275
+ return null;
276
+ }
277
+ return (h("notification-component", { owner: owner, "max-records": 10, "display-type": "icon", "notification-url": `https://notifications.${orgHost}/notifications-api`, "socket-connect": true, "socket-url": `wss://repository.${orgHost}/socket`, "list-url": `https://notifications.${orgHost}/notifications` }));
219
278
  }
220
279
  render() {
221
- return h("div", { key: '27f25b1f44d080a82d28ec01a9d75660948e2fa7' }, h("div", { key: '4992a52ef58625c1cb1591c783eef3c58be50bff' }, (() => {
222
- var _a, _b, _c, _d, _e, _f, _g, _h;
280
+ return h("div", { key: 'f4302fb8824c5bc6df03aaff56eacbc9cf764767' }, h("div", { key: 'cd8204369b6489a41e85fdbc18b7fb859f11446b' }, (() => {
223
281
  // GLOBAL LOADING SPINNER
224
282
  if (this.isLoading) {
225
283
  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
284
  }
227
285
  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")))));
286
+ 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
287
  }
230
288
  if (this.isAuth && this.showPostLoginText) {
231
289
  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
290
  }
233
291
  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 ?
292
+ return (h("div", { class: "profile-actions", style: { display: "inline-flex", alignItems: "center", gap: "15px" } }, this.showNotification &&
293
+ this.notificationPosition === 'left' &&
294
+ 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
295
  h("img", { class: "profile-image", src: "https://s-damith.github.io/test-avatar/images/e24da9c5-0b1f-46fa-82cd-7c711c77b5c7.png" })
236
296
  :
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 => {
297
+ 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
298
  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)))))))))) : (
299
+ }))), 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 => {
300
+ const isImageUrl = item.icon && /^https?:\/\//i.test(item.icon);
301
+ const iconClass = item.icon && !isImageUrl
302
+ ? item.icon
303
+ : "fa-solid fa-cube";
304
+ 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)));
305
+ }))))))) : (
240
306
  // List View
241
307
  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
308
  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)))))))))))));
309
+ })), 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 &&
310
+ this.notificationPosition === 'right' &&
311
+ this.renderNotificationComponent())));
244
312
  }
245
313
  else {
246
314
  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
315
  }
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,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" }), 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) ?
316
+ })()), h("div", { key: '34bb14b2332370430752853150d0dec2643c5b85', id: "appPermissionErrorModal", class: "modal" }, h("div", { key: '4d0d68d78c1958d60712a79b780cb18e7c3e4b81', class: "modal-content" }, h("img", { key: 'd8a50635f3c14f424763525469df6d7d88524413', src: "data:image/png;base64,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" }), h("h2", { key: '0f064131a4fe8a22968e8447efdbfb2877f45508', class: "green-text margin-b" }, "You don't have permission to access this application."), h("h3", { key: '2bc49be7296bb8f0410a689eb468a42f6e523c9c', class: "green-text" }, "Please contact the administration."), (this.config.defaultLink.url && this.showUnauthorizedModal) ?
249
317
  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
318
  : h("div", null))));
251
319
  }
@@ -277,8 +345,10 @@ export class DashButtonComponent {
277
345
  "tags": [],
278
346
  "text": ""
279
347
  },
280
- "attribute": "show-post-login-text",
348
+ "getter": false,
349
+ "setter": false,
281
350
  "reflect": false,
351
+ "attribute": "show-post-login-text",
282
352
  "defaultValue": "false"
283
353
  },
284
354
  "silentCheckSso": {
@@ -295,8 +365,10 @@ export class DashButtonComponent {
295
365
  "tags": [],
296
366
  "text": ""
297
367
  },
298
- "attribute": "silent-check-sso",
368
+ "getter": false,
369
+ "setter": false,
299
370
  "reflect": false,
371
+ "attribute": "silent-check-sso",
300
372
  "defaultValue": "false"
301
373
  },
302
374
  "redirectUri": {
@@ -313,8 +385,10 @@ export class DashButtonComponent {
313
385
  "tags": [],
314
386
  "text": ""
315
387
  },
316
- "attribute": "redirect-uri",
317
- "reflect": false
388
+ "getter": false,
389
+ "setter": false,
390
+ "reflect": false,
391
+ "attribute": "redirect-uri"
318
392
  },
319
393
  "authMethod": {
320
394
  "type": "string",
@@ -330,8 +404,10 @@ export class DashButtonComponent {
330
404
  "tags": [],
331
405
  "text": ""
332
406
  },
333
- "attribute": "auth-method",
407
+ "getter": false,
408
+ "setter": false,
334
409
  "reflect": false,
410
+ "attribute": "auth-method",
335
411
  "defaultValue": "\"check-sso\""
336
412
  },
337
413
  "portalApiUrl": {
@@ -348,8 +424,10 @@ export class DashButtonComponent {
348
424
  "tags": [],
349
425
  "text": ""
350
426
  },
351
- "attribute": "portal-api-url",
427
+ "getter": false,
428
+ "setter": false,
352
429
  "reflect": false,
430
+ "attribute": "portal-api-url",
353
431
  "defaultValue": "\"\""
354
432
  },
355
433
  "plmUrl": {
@@ -366,8 +444,10 @@ export class DashButtonComponent {
366
444
  "tags": [],
367
445
  "text": ""
368
446
  },
369
- "attribute": "plm-url",
447
+ "getter": false,
448
+ "setter": false,
370
449
  "reflect": false,
450
+ "attribute": "plm-url",
371
451
  "defaultValue": "\"https://productlicensemanager-zdzw.cloud.zdzw-project.com\""
372
452
  },
373
453
  "showUnauthorizedModal": {
@@ -384,8 +464,10 @@ export class DashButtonComponent {
384
464
  "tags": [],
385
465
  "text": ""
386
466
  },
387
- "attribute": "show-unauthorized-modal",
467
+ "getter": false,
468
+ "setter": false,
388
469
  "reflect": false,
470
+ "attribute": "show-unauthorized-modal",
389
471
  "defaultValue": "false"
390
472
  },
391
473
  "primaryColor": {
@@ -402,8 +484,10 @@ export class DashButtonComponent {
402
484
  "tags": [],
403
485
  "text": ""
404
486
  },
405
- "attribute": "primary-color",
487
+ "getter": false,
488
+ "setter": false,
406
489
  "reflect": false,
490
+ "attribute": "primary-color",
407
491
  "defaultValue": "\"\""
408
492
  },
409
493
  "accentColor": {
@@ -420,9 +504,51 @@ export class DashButtonComponent {
420
504
  "tags": [],
421
505
  "text": ""
422
506
  },
423
- "attribute": "accent-color",
507
+ "getter": false,
508
+ "setter": false,
424
509
  "reflect": false,
510
+ "attribute": "accent-color",
425
511
  "defaultValue": "\"\""
512
+ },
513
+ "showNotification": {
514
+ "type": "boolean",
515
+ "mutable": false,
516
+ "complexType": {
517
+ "original": "boolean",
518
+ "resolved": "boolean",
519
+ "references": {}
520
+ },
521
+ "required": false,
522
+ "optional": false,
523
+ "docs": {
524
+ "tags": [],
525
+ "text": ""
526
+ },
527
+ "getter": false,
528
+ "setter": false,
529
+ "reflect": false,
530
+ "attribute": "show-notification",
531
+ "defaultValue": "true"
532
+ },
533
+ "notificationPosition": {
534
+ "type": "string",
535
+ "mutable": false,
536
+ "complexType": {
537
+ "original": "'left' | 'right'",
538
+ "resolved": "\"left\" | \"right\"",
539
+ "references": {}
540
+ },
541
+ "required": false,
542
+ "optional": false,
543
+ "docs": {
544
+ "tags": [],
545
+ "text": ""
546
+ },
547
+ "getter": false,
548
+ "setter": false,
549
+ "reflect": false,
550
+ "attribute": "notification-position",
551
+ "defaultValue": "'left'"
426
552
  }
427
553
  };
428
554
  }
@@ -444,4 +570,3 @@ export class DashButtonComponent {
444
570
  }
445
571
  static get elementRef() { return "el"; }
446
572
  }
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