dash-button-web 0.0.23-beta.6 → 0.0.24

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 (77) hide show
  1. package/dist/cjs/dash-button.cjs.entry.js +4274 -0
  2. package/dist/cjs/dash-button.cjs.entry.js.map +1 -0
  3. package/dist/cjs/index-bc7ebbee.js +1817 -0
  4. package/dist/cjs/index-bc7ebbee.js.map +1 -0
  5. package/dist/cjs/index.cjs.js +2 -0
  6. package/dist/cjs/index.cjs.js.map +1 -0
  7. package/dist/cjs/loader.cjs.js +7 -5
  8. package/dist/cjs/loader.cjs.js.map +1 -0
  9. package/dist/cjs/web-compnont.cjs.js +15 -15
  10. package/dist/cjs/web-compnont.cjs.js.map +1 -0
  11. package/dist/collection/collection-manifest.json +3 -13
  12. package/dist/collection/components/my-component/dash-button.css +224 -0
  13. package/dist/collection/components/my-component/dash-button.e2e.js +26 -0
  14. package/dist/collection/components/my-component/dash-button.e2e.js.map +1 -0
  15. package/dist/collection/components/my-component/dash-button.js +117 -162
  16. package/dist/collection/components/my-component/dash-button.js.map +1 -0
  17. package/dist/collection/components/my-component/dash-button.spec.js +35 -0
  18. package/dist/collection/components/my-component/dash-button.spec.js.map +1 -0
  19. package/dist/collection/index.js +1 -0
  20. package/dist/collection/index.js.map +1 -0
  21. package/dist/collection/services/config.js +5 -3
  22. package/dist/collection/services/config.js.map +1 -0
  23. package/dist/collection/services/menu.js +5 -3
  24. package/dist/collection/services/menu.js.map +1 -0
  25. package/dist/components/dash-button.js +4310 -1
  26. package/dist/components/dash-button.js.map +1 -0
  27. package/dist/components/index.d.ts +0 -2
  28. package/dist/components/index.js +3 -1
  29. package/dist/components/index.js.map +1 -0
  30. package/dist/esm/dash-button.entry.js +4270 -0
  31. package/dist/esm/dash-button.entry.js.map +1 -0
  32. package/dist/esm/index-51aa24d3.js +1790 -0
  33. package/dist/esm/index-51aa24d3.js.map +1 -0
  34. package/dist/esm/index.js +2 -0
  35. package/dist/esm/index.js.map +1 -0
  36. package/dist/esm/loader.js +6 -6
  37. package/dist/esm/loader.js.map +1 -0
  38. package/dist/esm/polyfills/core-js.js +11 -0
  39. package/dist/esm/polyfills/dom.js +79 -0
  40. package/dist/esm/polyfills/es5-html-element.js +1 -0
  41. package/dist/esm/polyfills/index.js +34 -0
  42. package/dist/esm/polyfills/system.js +6 -0
  43. package/dist/esm/web-compnont.js +14 -15
  44. package/dist/esm/web-compnont.js.map +1 -0
  45. package/dist/types/components/my-component/dash-button.d.ts +17 -9
  46. package/dist/types/components.d.ts +2 -83
  47. package/dist/types/stencil-public-runtime.d.ts +70 -268
  48. package/dist/web-compnont/index.esm.js +2 -0
  49. package/dist/web-compnont/index.esm.js.map +1 -0
  50. package/dist/web-compnont/p-06623215.js +3 -0
  51. package/dist/web-compnont/p-06623215.js.map +1 -0
  52. package/dist/web-compnont/p-55f91c48.entry.js +10 -0
  53. package/dist/web-compnont/p-55f91c48.entry.js.map +1 -0
  54. package/dist/web-compnont/web-compnont.esm.js +2 -1
  55. package/dist/web-compnont/web-compnont.esm.js.map +1 -0
  56. package/loader/cdn.js +3 -1
  57. package/loader/index.cjs.js +3 -1
  58. package/loader/index.d.ts +1 -4
  59. package/loader/index.es2017.js +3 -1
  60. package/loader/index.js +3 -1
  61. package/loader/package.json +11 -0
  62. package/package.json +2 -3
  63. package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
  64. package/dist/cjs/dash-button_4.cjs.entry.js +0 -10867
  65. package/dist/cjs/index-DcvBej9f.js +0 -1625
  66. package/dist/components/loading-component.js +0 -1
  67. package/dist/components/loading-component2.js +0 -1
  68. package/dist/components/notification-component.js +0 -1
  69. package/dist/components/notification-component2.js +0 -1
  70. package/dist/components/notification-table.js +0 -1
  71. package/dist/components/notification-table2.js +0 -2
  72. package/dist/esm/app-globals-DQuL1Twl.js +0 -3
  73. package/dist/esm/dash-button_4.entry.js +0 -10862
  74. package/dist/esm/index-p0GxQx6x.js +0 -1617
  75. package/dist/web-compnont/p-99f4c836.entry.js +0 -3
  76. package/dist/web-compnont/p-DQuL1Twl.js +0 -1
  77. package/dist/web-compnont/p-p0GxQx6x.js +0 -3
@@ -3,63 +3,78 @@ 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";
7
6
  export class DashButtonComponent {
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
- showNotification = true;
19
- notificationPosition = "left";
20
- keycloak = null;
21
- isAuth = false;
22
- givenUserName = "";
23
- silentCheckSsoRedirectUri = window.location.origin + '/assets/verificar-sso.html';
24
- appList = [];
25
- avatarSvg = toSvg("init-avatar", 40);
26
- isLoading = false;
27
- config;
28
- localMenuLinks;
29
- organizationUrl;
30
- isRestricted = false;
31
- componentDidLoad() {
32
- document.addEventListener('click', this.handleNotificationLinkClick, true);
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;
33
44
  }
34
- disconnectedCallback() {
35
- document.removeEventListener('click', this.handleNotificationLinkClick, true);
45
+ componentDidRender() {
46
+ this.capToRowPeek(this.gridLocalListEl, 2.5);
47
+ this.capToRowPeek(this.listLocalScrollEl, 2.5);
36
48
  }
37
- // Fix notification home icon click not opening a new tab
38
- // (workaround for ice-notification-component shadow DOM click bug)
39
- handleNotificationLinkClick = (event) => {
40
- const path = event.composedPath();
41
- const insideNotification = path.some((node) => node.tagName === 'NOTIFICATION-COMPONENT');
42
- if (!insideNotification)
49
+ // Caps a container to `rows` times its first item's rendered height, so
50
+ // Local Modules always shows a partial next row as a "scroll for more"
51
+ // cue instead of a clean cut. Measured off the real item (icon size,
52
+ // padding, etc. all vary) rather than a guessed pixel value; harmless
53
+ // to always set since max-height only constrains when content is
54
+ // actually taller than that.
55
+ capToRowPeek(container, rows) {
56
+ if (!container)
43
57
  return;
44
- const anchor = path.find((node) => node.tagName === 'A' && node.target === '_blank');
45
- if (!anchor || !anchor.href)
58
+ const firstItem = container.firstElementChild;
59
+ if (!firstItem) {
60
+ container.style.maxHeight = '';
46
61
  return;
47
- event.preventDefault();
48
- event.stopPropagation();
49
- window.open(anchor.href, '_blank', 'noopener');
50
- };
62
+ }
63
+ container.style.maxHeight = `${firstItem.offsetHeight * rows}px`;
64
+ }
51
65
  async componentWillLoad() {
66
+ var _a, _b, _c, _d;
52
67
  // Fetch config from API
53
68
  this.config = await configService.fetchConfig(this.portalApiUrl);
54
69
  console.log(this.config);
55
70
  if (!this.config)
56
71
  return; // prevent Keycloak init if fetch failed
57
72
  // render will show spinner
58
- if (this.config?.loading?.isLoading) {
73
+ if ((_b = (_a = this.config) === null || _a === void 0 ? void 0 : _a.loading) === null || _b === void 0 ? void 0 : _b.isLoading) {
59
74
  this.isLoading = true;
60
75
  setTimeout(() => {
61
76
  this.isLoading = false;
62
- }, this.config?.loading?.duration);
77
+ }, (_d = (_c = this.config) === null || _c === void 0 ? void 0 : _c.loading) === null || _d === void 0 ? void 0 : _d.duration);
63
78
  }
64
79
  // Initialize Keycloak
65
80
  this.keycloak = new Keycloak({
@@ -90,32 +105,34 @@ export class DashButtonComponent {
90
105
  checkLoginIframe: false,
91
106
  silentCheckSsoRedirectUri: this.silentCheckSso ? this.silentCheckSsoRedirectUri : '',
92
107
  }).then((res) => {
108
+ var _a, _b, _c;
93
109
  if (res) {
94
110
  this.isAuth = true;
95
111
  localStorage.setItem("keycloak", JSON.stringify(this.keycloak));
96
112
  // document.cookie = "DASH_BTN=" + JSON.parse(localStorage.getItem('keycloak')).token;
97
- document.cookie = this.config.cookieName + "=" + JSON.parse(localStorage.getItem('keycloak') ?? '{}').token;
113
+ document.cookie = this.config.cookieName + "=" + JSON.parse((_a = localStorage.getItem('keycloak')) !== null && _a !== void 0 ? _a : '{}').token;
98
114
  // Set userName
99
- this.givenUserName = JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.preferred_username;
115
+ this.givenUserName = JSON.parse((_b = localStorage.getItem('keycloak')) !== null && _b !== void 0 ? _b : '{}').idTokenParsed.preferred_username;
100
116
  // Set user avatar
101
- this.avatarSvg = toSvg(JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.sub, 40);
117
+ this.avatarSvg = toSvg(JSON.parse((_c = localStorage.getItem('keycloak')) !== null && _c !== void 0 ? _c : '{}').idTokenParsed.sub, 40);
102
118
  }
103
119
  });
104
120
  }
105
121
  async loadOrganizationUrlAndLinks() {
122
+ var _a, _b, _c;
106
123
  // Read org URL safely
107
124
  try {
108
125
  const kc = JSON.parse(localStorage.getItem("keycloak") || "{}");
109
- this.organizationUrl = kc?.idTokenParsed?.organizationUrl || null;
126
+ this.organizationUrl = ((_a = kc === null || kc === void 0 ? void 0 : kc.idTokenParsed) === null || _a === void 0 ? void 0 : _a.organizationUrl) || null;
110
127
  }
111
- catch {
128
+ catch (_d) {
112
129
  this.organizationUrl = null;
113
130
  }
114
131
  // If no organization, do nothing
115
132
  if (!this.organizationUrl)
116
133
  return;
117
134
  // If config or menu not ready, skip
118
- if (!this.config?.menu?.local)
135
+ if (!((_c = (_b = this.config) === null || _b === void 0 ? void 0 : _b.menu) === null || _c === void 0 ? void 0 : _c.local))
119
136
  return;
120
137
  // Only load when custom menu is NOT enabled
121
138
  if (!this.config.menu.local.enableCustomLocalMenu) {
@@ -132,25 +149,26 @@ export class DashButtonComponent {
132
149
  // Then, check the token's organization URL
133
150
  // Finally, check against dashbutton configuration: allowedGlobalDomain and whitelistedUrls
134
151
  validateAppAccessByUrl() {
152
+ var _a, _b, _c, _d, _e, _f;
135
153
  const normalizeUrl = (url) => url.replace(/\/+$/, '');
136
154
  const currentUrl = normalizeUrl(window.location.href);
137
155
  const currentOrigin = normalizeUrl(window.location.origin);
138
- const globalLinks = this.config?.menu?.global?.links || [];
139
- const allowedGlobalDomain = this.config?.allowedGlobalDomain || '';
140
- const whitelistedUrls = this.config?.whitelistedUrls || '';
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) || '';
141
159
  // First, check global links
142
160
  const matchGlobal = globalLinks.some(link => {
143
161
  try {
144
162
  const linkOrigin = normalizeUrl(new URL(link.url).origin);
145
163
  return currentOrigin === linkOrigin;
146
164
  }
147
- catch {
165
+ catch (_a) {
148
166
  return false;
149
167
  }
150
168
  });
151
169
  // Then check the token organization URL
152
- const tokenParsed = this.keycloak?.tokenParsed;
153
- const allowedOrg = tokenParsed?.organizationUrl;
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;
154
172
  const matchOrganization = allowedOrg && currentUrl.includes(normalizeUrl(allowedOrg));
155
173
  // Check allowedGlobalDomain (single domain)
156
174
  const matchAllowedDomain = allowedGlobalDomain &&
@@ -176,65 +194,58 @@ export class DashButtonComponent {
176
194
  document.cookie = this.config.cookieName + "=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;";
177
195
  this.keycloak.logout();
178
196
  }
179
- showModal() {
180
- const appModal = this.el.shadowRoot.querySelector('#appListModal');
181
- appModal.style.display = "block";
182
- }
183
- closeModal() {
184
- const appModal = this.el.shadowRoot.querySelector('#appListModal');
185
- appModal.style.display = "none";
197
+ // Normalizes the "Modules" list so grid view and list view can render it
198
+ // with the exact same markup/classes used for the global "Applications" links.
199
+ 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) => ({
204
+ name: item.name,
205
+ url: item.url,
206
+ icon: item.icon,
207
+ disabled: !item.url,
208
+ }));
209
+ }
210
+ return (this.localMenuLinks || []).map((item) => ({
211
+ name: item.name,
212
+ url: item.url,
213
+ icon: undefined,
214
+ disabled: !item.url,
215
+ }));
186
216
  }
187
- renderNotificationComponent() {
188
- const token = this.keycloak?.idTokenParsed;
189
- const owner = token?.preferred_username || token?.sub || '';
190
- const orgUrlRaw = token?.organizationUrl || '';
191
- const orgHost = orgUrlRaw
192
- ? new URL(orgUrlRaw.startsWith('http') ? orgUrlRaw : `https://${orgUrlRaw}`).hostname
193
- : '';
194
- return orgHost && owner ? (h("notification-component", { owner: owner, "max-records": 10, "display-type": "icon", "notification-url": `https://notificationsbackend.${orgHost}/notifications-api`, "socket-connect": true, "socket-url": `wss://repository.${orgHost}/socket`, "list-url": `https://notificationsfrontend.${orgHost}/notifications` })) : null;
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" }))));
195
219
  }
196
220
  render() {
197
- return h("div", { key: 'f5bc7f809a7988ae492e4f554ac2c3cbaf51ae54' }, h("div", { key: '91a71e53fae4d0aac6f42b8cc127bba7856d34f2' }, (() => {
221
+ return h("div", { key: '27f25b1f44d080a82d28ec01a9d75660948e2fa7' }, h("div", { key: '4992a52ef58625c1cb1591c783eef3c58be50bff' }, (() => {
222
+ var _a, _b, _c, _d, _e, _f, _g, _h;
198
223
  // GLOBAL LOADING SPINNER
199
224
  if (this.isLoading) {
200
225
  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))));
201
226
  }
202
227
  if (this.isRestricted) {
203
- 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")))));
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")))));
204
229
  }
205
230
  if (this.isAuth && this.showPostLoginText) {
206
231
  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")));
207
232
  }
208
233
  else if (this.isAuth) {
209
- return (h("div", { class: "profile-actions", style: { display: "inline-flex", alignItems: "center", gap: "15px" } }, this.showNotification &&
210
- this.notificationPosition !== "right" &&
211
- this.renderNotificationComponent(), h("div", { id: "profile-btn", class: "dropdown" }, 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 ?
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 ?
212
235
  h("img", { class: "profile-image", src: "https://s-damith.github.io/test-avatar/images/e24da9c5-0b1f-46fa-82cd-7c711c77b5c7.png" })
213
236
  :
214
- 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: "username" }, "@", this.givenUserName), h("div", { class: "first-last-name" }, JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.name)), (this.config.menuViewType == "grid") ? (h("div", null, h("div", { class: "grid-view-menu" }, this.config.menu.global.links.map(item => {
215
- return (h("a", { href: item.url, target: '_blank', class: "grid-view-link" }, h("i", { class: item.icon + " fa-2x" }), h("div", { class: "grid-view-link-text" }, item.name)));
216
- })), this.config.menu.global.links.length != 0 && h("hr", { class: "solid" }), h("div", { class: "grid-view-menu", style: this.config.menu.global.links.length === 0
217
- ? { marginBottom: '12px' }
218
- : undefined }, h("a", { onClick: this.showModal.bind(this), class: "grid-view-link" }, h("i", { class: "fa-regular fa-window-restore fa-2x" }), h("div", { class: "grid-view-link-text" }, "Modules")), h("a", { href: this.config.defaultLink.url, target: '_blank', class: "grid-view-link" }, h("i", { class: "fa-solid fa-globe fa-2x" }), h("div", { class: "grid-view-link-text" }, this.config.defaultLink.name)), h("a", { onClick: this.logout.bind(this), class: "grid-view-link" }, h("i", { class: "fa-solid fa-right-from-bracket fa-2x" }), h("div", { class: "grid-view-link-text" }, "Logout"))))) : (
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 => {
238
+ 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)))))))))) : (
219
240
  // List View
220
- h("div", { class: "dropdown-content-link" }, this.config.menu.global.links.map(item => {
221
- return (h("a", { href: item.url, target: '_blank', id: "applications-btn" }, h("i", { class: item.icon + " menu-bar-icons" }), item.name));
222
- }), h("a", { onClick: this.showModal.bind(this), id: "applications-btn" }, h("i", { class: "fa-regular fa-window-restore menu-bar-icons" }), "Modules"), h("a", { href: this.config.defaultLink.url, target: '_blank', id: "applications-btn" }, h("i", { class: "fa-solid fa-globe menu-bar-icons" }), this.config.defaultLink.name), h("a", { onClick: this.logout.bind(this), id: "logout-btn" }, h("i", { class: "fa-solid fa-right-from-bracket menu-bar-icons" }), "Logout"))))), this.showNotification &&
223
- this.notificationPosition === "right" &&
224
- this.renderNotificationComponent()));
241
+ 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
+ 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)))))))))))));
225
244
  }
226
245
  else {
227
246
  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")));
228
247
  }
229
- })()), h("div", { key: '43ed6628a3a331eb0a2a6589af68de46b39b2484', id: "appListModal", class: "modal" }, h("div", { key: 'fda8190cb36b80833dee5bad2fa5f6f58246fa3a', class: "modal-content" }, h("span", { key: '405ad01f892270af7f027f9d0ea1f33114d5dffa', onClick: this.closeModal.bind(this), class: "close" }, "\u00D7"), h("div", { key: 'a59c160924e8432ec26a4f059e9bb6165ac28873', class: "box" }, h("input", { key: '557562735ec2605b4a732050831f92f9acdd32d1', type: "radio", class: "tab-toggle", name: "tab-toggle", id: "tab1", checked: true }), h("ul", { key: '51d4b63e0bf8f827a67ae9c72f304fd79c901bf3', class: "tab-list" }, h("li", { key: '296f04a48a97bdaca35a0703d564b8c8ac33344f', class: "tab-item" }, h("label", { key: 'a5a5c7d534337dafea73b2db9d866fd67e5ba4f6', class: "tab-trigger", htmlFor: "tab1" }, h("i", { key: '26439234e19ff6f13687a1a35982cf8a411861b4', class: "fa-solid fa-table-list menu-bar-icons" }), " ", this.config.menu.local.name))), h("div", { key: 'a3b69844c6ff8874d4d147c4fa7089c3601588fe', class: "tab-container" }, h("div", { key: '5d335f27ffb5c89b19bb1b823f121b3c11e1702e', class: "tab-content" }, h("div", { key: 'e16606bfbc686408b0776a3867c1a1c4e3e17366', class: "modal-body" }, !this.config?.menu?.local?.enableCustomLocalMenu ? (
230
- // <div>{this.localMenuLinks}</div>
231
- this.localMenuLinks?.map((app, index) => {
232
- const isDisabled = !app.url;
233
- return (h("a", { key: index, class: "external-app-link", href: isDisabled ? undefined : app.url, target: isDisabled ? undefined : "_blank", rel: isDisabled ? undefined : "noopener noreferrer", onClick: isDisabled ? (e) => e.preventDefault() : undefined }, h("div", { class: "modal-app" }, h("div", null, app.name))));
234
- })) : (this.config.menu.local.links?.map((app, index) => (h("a", { key: index, class: "external-app-link", target: "_blank", rel: "noopener noreferrer", href: app.url }, h("div", { class: "modal-app" }, h("div", null, app.name)))))), !this.organizationUrl ? (h("div", null, h("h3", { class: "gray-text" }, "Organization Domain URL not set"), h("p", { class: "gray-text" }, "Please set your Organization Domain URL on the Portal profile page."))) : (((!this.config?.menu?.local?.enableCustomLocalMenu &&
235
- (this.localMenuLinks?.length ?? 0) === 0) ||
236
- (this.config?.menu?.local?.enableCustomLocalMenu &&
237
- (this.config?.menu?.local?.links?.length ?? 0) === 0)) && (h("div", null, h("h3", { class: "gray-text" }, "No installed ", this.config?.menu?.local?.name || "menu", " found."), h("p", { class: "gray-text" }, "Please contact administration.")))))))))), h("div", { key: '0fd9b00f1e72779794917f55f467f85da6e6ec1f', id: "appPermissionErrorModal", class: "modal" }, h("div", { key: '152ed2647de2c69e933832a959a7a23a3fc1e7ef', class: "modal-content" }, h("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TFQAMMW/78xypQpU6ZMmbIjP9e+AkAlsBlIjsPOAAAAAElFTkSuQmCC" }), h("h2", { key: 'bb7beb439a3c315e5db9f07b18c5a6b06cc44f2e', class: "green-text margin-b" }, "You don't have permission to access this application."), h("h3", { key: '28c0d3e0fe347389deaeba2de0fb1a48215fb63f', class: "green-text" }, "Please contact the administration."), (this.config.defaultLink.url && this.showUnauthorizedModal) ?
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+LW7d3lOWdKVhHggAPPb24bnvW9ooL96evjGP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8idkWHgHHRecVsTMU/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) ?
238
249
  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" }))))
239
250
  : h("div", null))));
240
251
  }
@@ -266,10 +277,8 @@ export class DashButtonComponent {
266
277
  "tags": [],
267
278
  "text": ""
268
279
  },
269
- "getter": false,
270
- "setter": false,
271
- "reflect": false,
272
280
  "attribute": "show-post-login-text",
281
+ "reflect": false,
273
282
  "defaultValue": "false"
274
283
  },
275
284
  "silentCheckSso": {
@@ -286,10 +295,8 @@ export class DashButtonComponent {
286
295
  "tags": [],
287
296
  "text": ""
288
297
  },
289
- "getter": false,
290
- "setter": false,
291
- "reflect": false,
292
298
  "attribute": "silent-check-sso",
299
+ "reflect": false,
293
300
  "defaultValue": "false"
294
301
  },
295
302
  "redirectUri": {
@@ -306,10 +313,8 @@ export class DashButtonComponent {
306
313
  "tags": [],
307
314
  "text": ""
308
315
  },
309
- "getter": false,
310
- "setter": false,
311
- "reflect": false,
312
- "attribute": "redirect-uri"
316
+ "attribute": "redirect-uri",
317
+ "reflect": false
313
318
  },
314
319
  "authMethod": {
315
320
  "type": "string",
@@ -325,10 +330,8 @@ export class DashButtonComponent {
325
330
  "tags": [],
326
331
  "text": ""
327
332
  },
328
- "getter": false,
329
- "setter": false,
330
- "reflect": false,
331
333
  "attribute": "auth-method",
334
+ "reflect": false,
332
335
  "defaultValue": "\"check-sso\""
333
336
  },
334
337
  "portalApiUrl": {
@@ -345,10 +348,8 @@ export class DashButtonComponent {
345
348
  "tags": [],
346
349
  "text": ""
347
350
  },
348
- "getter": false,
349
- "setter": false,
350
- "reflect": false,
351
351
  "attribute": "portal-api-url",
352
+ "reflect": false,
352
353
  "defaultValue": "\"\""
353
354
  },
354
355
  "plmUrl": {
@@ -365,10 +366,8 @@ export class DashButtonComponent {
365
366
  "tags": [],
366
367
  "text": ""
367
368
  },
368
- "getter": false,
369
- "setter": false,
370
- "reflect": false,
371
369
  "attribute": "plm-url",
370
+ "reflect": false,
372
371
  "defaultValue": "\"https://productlicensemanager-zdzw.cloud.zdzw-project.com\""
373
372
  },
374
373
  "showUnauthorizedModal": {
@@ -385,10 +384,8 @@ export class DashButtonComponent {
385
384
  "tags": [],
386
385
  "text": ""
387
386
  },
388
- "getter": false,
389
- "setter": false,
390
- "reflect": false,
391
387
  "attribute": "show-unauthorized-modal",
388
+ "reflect": false,
392
389
  "defaultValue": "false"
393
390
  },
394
391
  "primaryColor": {
@@ -405,10 +402,8 @@ export class DashButtonComponent {
405
402
  "tags": [],
406
403
  "text": ""
407
404
  },
408
- "getter": false,
409
- "setter": false,
410
- "reflect": false,
411
405
  "attribute": "primary-color",
406
+ "reflect": false,
412
407
  "defaultValue": "\"\""
413
408
  },
414
409
  "accentColor": {
@@ -425,51 +420,9 @@ export class DashButtonComponent {
425
420
  "tags": [],
426
421
  "text": ""
427
422
  },
428
- "getter": false,
429
- "setter": false,
430
- "reflect": false,
431
423
  "attribute": "accent-color",
432
- "defaultValue": "\"\""
433
- },
434
- "showNotification": {
435
- "type": "boolean",
436
- "mutable": false,
437
- "complexType": {
438
- "original": "boolean",
439
- "resolved": "boolean",
440
- "references": {}
441
- },
442
- "required": false,
443
- "optional": false,
444
- "docs": {
445
- "tags": [],
446
- "text": ""
447
- },
448
- "getter": false,
449
- "setter": false,
450
- "reflect": false,
451
- "attribute": "show-notification",
452
- "defaultValue": "true"
453
- },
454
- "notificationPosition": {
455
- "type": "string",
456
- "mutable": false,
457
- "complexType": {
458
- "original": "\"left\" | \"right\"",
459
- "resolved": "\"left\" | \"right\"",
460
- "references": {}
461
- },
462
- "required": false,
463
- "optional": false,
464
- "docs": {
465
- "tags": [],
466
- "text": ""
467
- },
468
- "getter": false,
469
- "setter": false,
470
424
  "reflect": false,
471
- "attribute": "notification-position",
472
- "defaultValue": "\"left\""
425
+ "defaultValue": "\"\""
473
426
  }
474
427
  };
475
428
  }
@@ -485,8 +438,10 @@ export class DashButtonComponent {
485
438
  "config": {},
486
439
  "localMenuLinks": {},
487
440
  "organizationUrl": {},
488
- "isRestricted": {}
441
+ "isRestricted": {},
442
+ "collapsedModuleSection": {}
489
443
  };
490
444
  }
491
445
  static get elementRef() { return "el"; }
492
446
  }
447
+ //# sourceMappingURL=dash-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dash-button.js","sourceRoot":"","sources":["../../../src/components/my-component/dash-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACnE,OAAO,QAAQ,MAAM,aAAa,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAClC,OAAO,EAAa,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAY,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAc5D,MAAM,OAAO,mBAAmB;;QAy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oBAC/pE,2DAAI,KAAK,EAAC,qBAAqB,4DAA2D;oBAC1F,2DAAI,KAAK,EAAC,YAAY,yCAAwC;oBAE3D,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,GAAG,IAAI,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC;wBAC1D;4BACE,UAAI,KAAK,EAAC,WAAW,0DAAyD;4BAC5E,WAAK,EAAE,EAAC,WAAW;gCACnB,WAAK,EAAE,EAAC,kBAAkB,GAAO;gCACjC;oCACE,cAAQ,CAAC,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,GAAU,CACpC,CACF,CACF;wBACR,CAAC,CAAC,cAAW,CAEb,CACF,CAEF,CAAC;IACP,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Prop, State, h, Element } from '@stencil/core';\nimport Keycloak from \"keycloak-js\";\nimport { toSvg } from \"jdenticon\";\nimport { AppConfig, configService } from '../../services/config';\nimport { MenuLink, menuService } from '../../services/menu';\n\ninterface ModuleLinkItem {\n name: string;\n url?: string;\n icon?: string;\n disabled: boolean;\n}\n\n@Component({\n tag: 'dash-button',\n styleUrl: 'dash-button.css',\n shadow: true,\n})\nexport class DashButtonComponent {\n\n @Element() el:any;\n\n @Prop() showPostLoginText: boolean = false;\n @Prop() silentCheckSso: boolean = false;\n @Prop() redirectUri!: string;\n @Prop() authMethod: string = \"check-sso\";\n\n @Prop() portalApiUrl: string = \"\";\n @Prop() plmUrl: string = \"https://productlicensemanager-zdzw.cloud.zdzw-project.com\";\n @Prop() showUnauthorizedModal: boolean = false;\n\n @Prop() primaryColor: string = \"\";\n @Prop() accentColor: string = \"\";\n\n @State() keycloak: any = null;\n\n @State() isAuth = false;\n @State() givenUserName: string = \"\";\n @State() silentCheckSsoRedirectUri: string = window.location.origin + '/assets/verificar-sso.html';\n\n @State() appList = []\n \n @State() avatarSvg = toSvg(\"init-avatar\", 40);\n\n @State() isLoading: boolean = false;\n @State() config!: AppConfig;\n\n @State() localMenuLinks!: MenuLink[];\n @State() organizationUrl: any;\n\n @State() isRestricted: boolean = false;\n\n // Accordion: at most one of the two sections is collapsed at a time.\n // Collapsing one always leaves the other expanded.\n @State() collapsedModuleSection: 'global' | 'local' | null = null;\n\n private gridLocalListEl?: HTMLElement;\n private listLocalScrollEl?: HTMLElement;\n\n toggleGlobalModules = () => {\n this.collapsedModuleSection = this.collapsedModuleSection === 'global' ? null : 'global';\n };\n\n toggleLocalModules = () => {\n this.collapsedModuleSection = this.collapsedModuleSection === 'local' ? null : 'local';\n };\n\n // The dropdown only becomes visible via CSS :hover (no JS \"opened\" event),\n // and componentDidRender's measurement can run while it's still\n // display:none — offsetHeight is always 0 for a hidden subtree, so that\n // first measurement can permanently stick maxHeight at 0px. Re-measuring\n // on mouseenter (when the dropdown is guaranteed visible) fixes it.\n handleDropdownMouseEnter = () => {\n this.capToRowPeek(this.gridLocalListEl, 2.5);\n this.capToRowPeek(this.listLocalScrollEl, 2.5);\n };\n\n componentDidRender() {\n this.capToRowPeek(this.gridLocalListEl, 2.5);\n this.capToRowPeek(this.listLocalScrollEl, 2.5);\n }\n\n // Caps a container to `rows` times its first item's rendered height, so\n // Local Modules always shows a partial next row as a \"scroll for more\"\n // cue instead of a clean cut. Measured off the real item (icon size,\n // padding, etc. all vary) rather than a guessed pixel value; harmless\n // to always set since max-height only constrains when content is\n // actually taller than that.\n private capToRowPeek(container: HTMLElement | undefined, rows: number) {\n if (!container) return;\n\n const firstItem = container.firstElementChild as HTMLElement | null;\n if (!firstItem) {\n container.style.maxHeight = '';\n return;\n }\n container.style.maxHeight = `${firstItem.offsetHeight * rows}px`;\n }\n\n async componentWillLoad() {\n // Fetch config from API\n this.config = await configService.fetchConfig(this.portalApiUrl);\n console.log(this.config)\n\n if (!this.config) return; // prevent Keycloak init if fetch failed\n\n // render will show spinner\n if(this.config?.loading?.isLoading) {\n this.isLoading = true;\n setTimeout(() => {\n this.isLoading = false;\n }, this.config?.loading?.duration);\n }\n\n // Initialize Keycloak\n this.keycloak = new Keycloak({\n url: this.config.keycloak.url,\n realm: this.config.keycloak.realm,\n clientId: this.config.keycloak.clientId\n });\n\n //\n // Init Keycloak\n //\n this.initKeycloak().then(() => {\n // Check if the user is authenticated\n if(this.isAuth) {\n // Get organization URL and load local menu items\n // If the user has not set an organization URL, they can configure it in the Portal profile page\n this.loadOrganizationUrlAndLinks();\n \n // Validate user access permission for the application. \n // If unauthorized, display the restricted access modal.\n this.validateAppAccessByUrl()\n\n }\n })\n }\n\n async initKeycloak() {\n // Remove the initiation time permission localstorage object\n localStorage.removeItem(\"ZDZW_app_permission\");\n\n await this.keycloak.init(\n {\n onLoad: this.authMethod,\n checkLoginIframe: false,\n silentCheckSsoRedirectUri: this.silentCheckSso ? this.silentCheckSsoRedirectUri : '',\n }).then((res:any) => {\n if(res) {\n this.isAuth = true\n localStorage.setItem(\"keycloak\", JSON.stringify(this.keycloak));\n // document.cookie = \"DASH_BTN=\" + JSON.parse(localStorage.getItem('keycloak')).token;\n document.cookie = this.config.cookieName +\"=\" + JSON.parse(localStorage.getItem('keycloak')?? '{}').token;\n\n // Set userName\n this.givenUserName = JSON.parse(localStorage.getItem('keycloak')?? '{}').idTokenParsed.preferred_username\n\n // Set user avatar\n this.avatarSvg = toSvg(JSON.parse(localStorage.getItem('keycloak')?? '{}').idTokenParsed.sub, 40);\n }\n });\n }\n\n async loadOrganizationUrlAndLinks() {\n // Read org URL safely\n try {\n const kc = JSON.parse(localStorage.getItem(\"keycloak\") || \"{}\");\n this.organizationUrl = kc?.idTokenParsed?.organizationUrl || null;\n } catch {\n this.organizationUrl = null;\n }\n\n // If no organization, do nothing\n if (!this.organizationUrl) return;\n\n // If config or menu not ready, skip\n if (!this.config?.menu?.local) return;\n\n // Only load when custom menu is NOT enabled\n if (!this.config.menu.local.enableCustomLocalMenu) {\n try {\n this.localMenuLinks = await menuService.getMenuLinks(\n this.organizationUrl\n );\n } catch (e) {\n console.error(\"Failed to load local menu\", e);\n this.localMenuLinks = [];\n }\n }\n }\n\n // First, check global links\n // Then, check the token's organization URL\n // Finally, check against dashbutton configuration: allowedGlobalDomain and whitelistedUrls\n validateAppAccessByUrl() {\n\n const normalizeUrl = (url: string) => url.replace(/\\/+$/, '');\n\n const currentUrl = normalizeUrl(window.location.href);\n const currentOrigin = normalizeUrl(window.location.origin);\n\n const globalLinks = this.config?.menu?.global?.links || [];\n const allowedGlobalDomain = this.config?.allowedGlobalDomain || '';\n const whitelistedUrls = this.config?.whitelistedUrls || '';\n\n // First, check global links\n const matchGlobal = globalLinks.some(link => {\n try {\n const linkOrigin = normalizeUrl(new URL(link.url).origin);\n return currentOrigin === linkOrigin;\n } catch {\n return false;\n }\n });\n\n // Then check the token organization URL\n const tokenParsed = this.keycloak?.tokenParsed;\n const allowedOrg = tokenParsed?.organizationUrl;\n const matchOrganization =\n allowedOrg && currentUrl.includes(normalizeUrl(allowedOrg));\n\n // Check allowedGlobalDomain (single domain)\n const matchAllowedDomain =\n allowedGlobalDomain &&\n currentOrigin.includes(normalizeUrl(allowedGlobalDomain));\n\n // Check whitelistedUrls (comma-separated string)\n const whitelistedArray = whitelistedUrls\n ? whitelistedUrls.split(',').map(url => normalizeUrl(url.trim()))\n : [];\n\n const matchWhitelisted = whitelistedArray.some(url =>\n currentUrl.includes(url)\n );\n\n // Final validation\n const isAllowed =\n matchGlobal ||\n matchOrganization ||\n matchAllowedDomain ||\n matchWhitelisted;\n\n this.isRestricted = !isAllowed;\n }\n\n login() { \n this.keycloak.login() \n }\n\n logout() {\n localStorage.removeItem(\"keycloak\");\n // document.cookie = \"DASH_BTN=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;\";\n document.cookie = this.config.cookieName + \"=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/;\";\n this.keycloak.logout() \n } \n\n // Normalizes the \"Modules\" list so grid view and list view can render it\n // with the exact same markup/classes used for the global \"Applications\" links.\n get moduleLinks(): ModuleLinkItem[] {\n const useCustom = this.config?.menu?.local?.enableCustomLocalMenu;\n\n if (useCustom) {\n return (this.config?.menu?.local?.links || []).map((item) => ({\n name: item.name,\n url: item.url,\n icon: item.icon,\n disabled: !item.url,\n }));\n }\n\n return (this.localMenuLinks || []).map((item) => ({\n name: item.name,\n url: item.url,\n icon: undefined,\n disabled: !item.url,\n }));\n }\n\n renderSectionLabel(icon: string, label: string, count: number, collapsed: boolean, onToggle: () => void) {\n return (\n <div class=\"menu-section-header\" onClick={onToggle}>\n <div class=\"menu-section-header-left\">\n <span class=\"menu-section-icon\"><i class={icon}></i></span>\n <span class=\"menu-section-title\">{label}</span>\n <span class=\"menu-section-count\">{count}</span>\n </div>\n <span class={\"menu-section-chevron-btn\" + (collapsed ? \" menu-section-chevron-btn-collapsed\" : \"\")}>\n <i class=\"fa-solid fa-chevron-down\"></i>\n </span>\n </div>\n );\n }\n\n render() {\n return <div>\n <div>\n {\n (() => {\n // GLOBAL LOADING SPINNER\n if (this.isLoading) {\n return (\n <a id=\"login-btn\" class=\"button button-link\">\n <div class=\"lds-ring\"><div></div><div></div><div></div><div></div></div>\n </a>\n );\n }\n\n if (this.isRestricted) {\n return (\n <div class=\"restricted-overlay\">\n <div class=\"restricted-card\">\n\n <div class=\"restricted-icon\">\n <i class=\"fa-solid fa-shield-halved\"></i>\n </div>\n\n <h2>Access Restricted</h2>\n <p class=\"restricted-message\">\n You do not have permission to access this application.\n Please contact your administrator if you believe this is an error.\n </p>\n\n {/* Global Applications */}\n {this.config?.menu?.global?.links?.length > 0 && (\n <div class=\"restricted-links\">\n <h4>Publicly Available Modules</h4>\n <div class=\"link-grid\">\n {this.config.menu.global.links.map(item => (\n <a href={item.url} target=\"_blank\" class=\"restricted-link\">\n <i class={item.icon}></i>\n <span>{item.name}</span>\n </a>\n ))}\n </div>\n </div>\n )}\n\n {/* Actions */}\n <div class=\"restricted-actions\">\n {this.config?.defaultLink?.url && (\n <a\n href={this.config.defaultLink.url}\n target=\"_blank\"\n class=\"btn-primary\">\n Go to Portal\n </a>\n )}\n <button class=\"btn-danger\" onClick={this.logout.bind(this)}>\n Logout\n </button>\n </div>\n\n </div>\n </div>\n );\n }\n\n if(this.isAuth && this.showPostLoginText) { \n return (\n <a style={{background: this.primaryColor != undefined? this.primaryColor : \"\"}} href={this.redirectUri} id=\"login-btn\" class=\"button button-link\">\n <span style={{color: this.accentColor != undefined? this.accentColor : \"\"}} class=\"button-text button-text-full-width\">Go to Dashboard</span>\n </a>\n )\n } else if (this.isAuth) {\n return (\n\n <div class=\"profile-actions\" style={{display: \"inline-flex\", alignItems: \"center\", gap: \"15px\"}}>\n\n <div id=\"profile-btn\" class=\"dropdown\" onMouseEnter={this.handleDropdownMouseEnter}>\n <button style={{background: this.primaryColor != undefined? this.primaryColor : \"\"}} type=\"button\" class=\"button\">\n <span class=\"button-profile\">\n {JSON.parse(localStorage.getItem('keycloak') ?? '{}').idTokenParsed.imageUrl ?\n <img class=\"profile-image\" src=\"https://s-damith.github.io/test-avatar/images/e24da9c5-0b1f-46fa-82cd-7c711c77b5c7.png\"/>\n :\n <div innerHTML={this.avatarSvg}/>\n }\n </span>\n <span style={{color: this.accentColor != undefined? this.accentColor : \"\"}} id=\"given-name\" class=\"button-text\">{this.givenUserName}</span>\n <div class=\"button-icon\">\n {(this.config.menuViewType == \"grid\") ? <i class=\"fa-solid fa-grip-vertical\"></i> : <i class=\"fa-solid fa-bars\"></i>}\n </div>\n </button>\n <div class=\"dropdown-content\">\n <div class=\"dropdown-user-profile\">\n <div class=\"user-profile-info\">\n <div class=\"username\">@{this.givenUserName}</div>\n <div class=\"first-last-name\">{JSON.parse(localStorage.getItem('keycloak')?? '{}').idTokenParsed.name}</div>\n </div>\n <div class=\"user-profile-actions\">\n <a\n href={this.config.defaultLink.url}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n class=\"footer-icon-btn footer-icon-btn-portal\"\n aria-label={this.config.defaultLink.name || \"Portal\"}\n data-tooltip={this.config.defaultLink.name || \"Portal\"}\n >\n <i class=\"fa-solid fa-globe\"></i>\n </a>\n <button type=\"button\" onClick={this.logout.bind(this)} class=\"footer-icon-btn footer-icon-btn-logout\" aria-label=\"Logout\" data-tooltip=\"Logout\">\n <i class=\"fa-solid fa-right-from-bracket\"></i>\n </button>\n </div>\n </div>\n\n\n { (this.config.menuViewType == \"grid\") ? (\n <div>\n {/* Top section: global Applications. The collapse header only\n makes sense when there's a second section (Local Modules) to\n collapse against — with none, just show the items plainly. */}\n {this.moduleLinks.length > 0 && this.renderSectionLabel(\"fa-solid fa-earth-americas\", \"Global Modules\", this.config.menu.global.links.length, (this.collapsedModuleSection === 'global'), this.toggleGlobalModules)}\n {(this.moduleLinks.length === 0 || this.collapsedModuleSection !== 'global') && (\n <div class=\"grid-view-menu\">\n {\n this.config.menu.global.links.map(item => {\n return (\n <a href={item.url} target='_blank' rel=\"noopener noreferrer\" class=\"grid-view-link\">\n <i class={item.icon + \" fa-2x\"}></i>\n <div class=\"grid-view-link-text\">{item.name}</div>\n </a>\n )\n })\n }\n </div>\n )}\n\n {/* Bottom section: Modules, same grid-view-link styling as Applications.\n Hidden entirely (no message) when there are none. display:contents means\n this wrapper contributes no box of its own, so hr/label/grid behave as\n flat siblings of the Applications block above (no Stencil Fragment\n dependency needed). */}\n {this.moduleLinks.length > 0 && (\n <div style={{ display: \"contents\" }}>\n <hr class=\"solid\"></hr>\n {this.renderSectionLabel(\"fa-solid fa-building\", \"Local Modules\", this.moduleLinks.length, (this.collapsedModuleSection === 'local'), this.toggleLocalModules)}\n {!(this.collapsedModuleSection === 'local') && (\n <div class=\"grid-view-menu\" ref={(el) => this.gridLocalListEl = el}>\n {\n this.moduleLinks.map(item => (\n <a\n class={\"grid-view-link\" + (item.disabled ? \" grid-view-link-disabled\" : \"\")}\n href={item.disabled ? undefined : item.url}\n target={item.disabled ? undefined : \"_blank\"}\n rel={item.disabled ? undefined : \"noopener noreferrer\"}\n onClick={item.disabled ? (e: Event) => e.preventDefault() : undefined}\n >\n <i class={(item.icon || \"fa-solid fa-cube\") + \" fa-2x\"}></i>\n <div class=\"grid-view-link-text\">{item.name}</div>\n </a>\n ))\n }\n </div>\n )}\n </div>\n )}\n\n </div>\n ) : (\n\n // List View\n <div class=\"dropdown-content-link\">\n {this.moduleLinks.length > 0 && this.renderSectionLabel(\"fa-solid fa-earth-americas\", \"Global Modules\", this.config.menu.global.links.length, (this.collapsedModuleSection === 'global'), this.toggleGlobalModules)}\n {(this.moduleLinks.length === 0 || this.collapsedModuleSection !== 'global') && (\n this.config.menu.global.links.map(item => {\n return (\n <a href={item.url} target='_blank' rel=\"noopener noreferrer\" id=\"applications-btn\">\n <i class={item.icon + \" menu-bar-icons\"}></i>\n {item.name}\n </a>\n )\n })\n )}\n\n {this.moduleLinks.length > 0 && (\n <div style={{ display: \"contents\" }}>\n {this.renderSectionLabel(\"fa-solid fa-building\", \"Local Modules\", this.moduleLinks.length, (this.collapsedModuleSection === 'local'), this.toggleLocalModules)}\n {!(this.collapsedModuleSection === 'local') && (\n <div class=\"local-modules-scroll\" ref={(el) => this.listLocalScrollEl = el}>\n {\n this.moduleLinks.map(item => (\n <a\n id=\"applications-btn\"\n class={item.disabled ? \"applications-btn-disabled\" : undefined}\n href={item.disabled ? undefined : item.url}\n target={item.disabled ? undefined : \"_blank\"}\n rel={item.disabled ? undefined : \"noopener noreferrer\"}\n onClick={item.disabled ? (e: Event) => e.preventDefault() : undefined}\n >\n <i class={(item.icon || \"fa-solid fa-cube\") + \" menu-bar-icons\"}></i>{item.name}\n </a>\n ))\n }\n </div>\n )}\n </div>\n )}\n </div>\n\n )}\n </div>\n </div>\n </div>\n )\n } else {\n return (\n <button style={{background: this.primaryColor != undefined? this.primaryColor : \"\"}} onClick={this.login.bind(this)} id=\"login-btn\" type=\"button\" class=\"button\">\n <span style={{color: this.accentColor != undefined? this.accentColor : \"\"}} class=\"button-text\">Login</span>\n </button>\n )\n }\n })() \n } \n </div>\n\n <div id=\"appPermissionErrorModal\" class=\"modal\">\n <div class=\"modal-content\">\n <img 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+7S5OdnRq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UoNDDQP4KT+TH2/QWJT/eFgjwNaRnnGHI4x3NzRXZbQ89QBg0GsQ2Wo+SnZR1uFycYbBI3kdv2XEAiw35KqQMGkDoYaCeaDzi29jIuziuYYyVua1jANrFFECTpgCaNAXQpCmAJk0BNGkKoElTACsNUB39ZTFQAMMW/78xypQpU6ZMmbIjP9e+AkAlsBlIjsPOAAAAAElFTkSuQmCC\"/>\n <h2 class=\"green-text margin-b\">You don't have permission to access this application.</h2>\n <h3 class=\"green-text\">Please contact the administration.</h3>\n \n {(this.config.defaultLink.url && this.showUnauthorizedModal) ? \n <div>\n <h4 class=\"gray-text\">You will be automatically redirected to the portal.</h4>\n <div id=\"countdown\">\n <div id=\"countdown-number\"></div>\n <svg>\n <circle r=\"18\" cx=\"20\" cy=\"20\"></circle>\n </svg>\n </div>\n </div>\n : <div></div>\n }\n </div>\n </div>\n\n </div>;\n }\n}\n"]}