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
@@ -1 +0,0 @@
1
- {"file":"index.cjs.js","mappings":";;","names":[],"sources":[],"sourcesContent":[],"version":3}
@@ -1 +0,0 @@
1
- {"file":"loader.cjs.js","mappings":";;;;;;AAGY,MAAC,oBAAoB,GAAG,CAAC,GAAG,EAAE,OAAO,KAAK;AACtD,EAAE,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,OAAO,SAAS,CAAC;AAEtD,EAAE,OAAOA,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D;;;;;","names":["bootstrapLazy"],"sources":["@lazy-external-entrypoint?app-data=conditional"],"sourcesContent":["export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\nexport const defineCustomElements = (win, options) => {\n if (typeof window === 'undefined') return undefined;\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n};\n"],"version":3}
@@ -1 +0,0 @@
1
- {"file":"web-compnont.cjs.js","mappings":";;;;;;AAAA;AACA;AACA;AAGA,MAAM,YAAY,GAAG,MAAM;AAa3B,IAAI,MAAM,UAAU,GAAG,8MAAe,CAAC;AACvC,IAAI,MAAM,IAAI,GAAiE,EAAE,CAAC;AAClF,IAAI,IAAI,UAAU,KAAK,EAAE,EAAE;AAC3B,QAAQ,IAAI,CAAC,YAAY,GAAG,IAAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC,IAAI,CAAC;AAC1D,KAAK;AACL,IAAI,OAAOA,oBAAc,CAAC,IAAI,CAAC,CAAC;AAChC,CAAC;;ACpBD,YAAY,EAAE,CAAC,IAAI,CAAC,OAAO,IAAI;AAE/B,EAAE,OAAOC,mBAAa,CAAC,4BAA4B,EAAE,OAAO,CAAC,CAAC;AAC9D,CAAC,CAAC;;;;","names":["promiseResolve","bootstrapLazy"],"sources":["node_modules/@stencil/core/internal/client/patch-browser.js","@lazy-browser-entrypoint?app-data=conditional"],"sourcesContent":["/*\n Stencil Client Patch Browser v4.12.0 | MIT Licensed | https://stenciljs.com\n */\nimport { BUILD, NAMESPACE } from '@stencil/core/internal/app-data';\nimport { consoleDevInfo, doc, promiseResolve, H } from '@stencil/core';\nconst patchBrowser = () => {\n // NOTE!! This fn cannot use async/await!\n if (BUILD.isDev && !BUILD.isTesting) {\n consoleDevInfo('Running in development mode.');\n }\n if (BUILD.cloneNodeFix) {\n // opted-in to polyfill cloneNode() for slot polyfilled components\n patchCloneNodeFix(H.prototype);\n }\n const scriptElm = BUILD.scriptDataOpts\n ? Array.from(doc.querySelectorAll('script')).find((s) => new RegExp(`\\/${NAMESPACE}(\\\\.esm)?\\\\.js($|\\\\?|#)`).test(s.src) ||\n s.getAttribute('data-stencil-namespace') === NAMESPACE)\n : null;\n const importMeta = import.meta.url;\n const opts = BUILD.scriptDataOpts ? (scriptElm || {})['data-opts'] || {} : {};\n if (importMeta !== '') {\n opts.resourcesUrl = new URL('.', importMeta).href;\n }\n return promiseResolve(opts);\n};\nconst patchCloneNodeFix = (HTMLElementPrototype) => {\n const nativeCloneNodeFn = HTMLElementPrototype.cloneNode;\n HTMLElementPrototype.cloneNode = function (deep) {\n if (this.nodeName === 'TEMPLATE') {\n return nativeCloneNodeFn.call(this, deep);\n }\n const clonedNode = nativeCloneNodeFn.call(this, false);\n const srcChildNodes = this.childNodes;\n if (deep) {\n for (let i = 0; i < srcChildNodes.length; i++) {\n // Node.ATTRIBUTE_NODE === 2, and checking because IE11\n if (srcChildNodes[i].nodeType !== 2) {\n clonedNode.appendChild(srcChildNodes[i].cloneNode(true));\n }\n }\n }\n return clonedNode;\n };\n};\nexport { patchBrowser };\n","export { setNonce } from '@stencil/core';\nimport { bootstrapLazy } from '@stencil/core';\nimport { patchBrowser } from '@stencil/core/internal/client/patch-browser';\nimport { globalScripts } from '@stencil/core/internal/app-globals';\npatchBrowser().then(options => {\n globalScripts();\n return bootstrapLazy([/*!__STENCIL_LAZY_DATA__*/], options);\n});\n"],"version":3}
@@ -1,26 +0,0 @@
1
- import { newE2EPage } from "@stencil/core/testing";
2
- describe('dash-button', () => {
3
- it('renders', async () => {
4
- const page = await newE2EPage();
5
- await page.setContent('<dash-button></dash-button>');
6
- const element = await page.find('dash-button');
7
- expect(element).toHaveClass('hydrated');
8
- });
9
- it('renders changes to the name data', async () => {
10
- const page = await newE2EPage();
11
- await page.setContent('<dash-button></dash-button>');
12
- const component = await page.find('dash-button');
13
- const element = await page.find('dash-button >>> div');
14
- expect(element.textContent).toEqual(`Hello, World! I'm `);
15
- component.setProperty('first', 'James');
16
- await page.waitForChanges();
17
- expect(element.textContent).toEqual(`Hello, World! I'm James`);
18
- component.setProperty('last', 'Quincy');
19
- await page.waitForChanges();
20
- expect(element.textContent).toEqual(`Hello, World! I'm James Quincy`);
21
- component.setProperty('middle', 'Earl');
22
- await page.waitForChanges();
23
- expect(element.textContent).toEqual(`Hello, World! I'm James Earl Quincy`);
24
- });
25
- });
26
- //# sourceMappingURL=dash-button.e2e.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dash-button.e2e.js","sourceRoot":"","sources":["../../../src/components/my-component/dash-button.e2e.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAEhC,MAAM,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;QACrD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QAC/C,MAAM,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAChD,MAAM,IAAI,GAAG,MAAM,UAAU,EAAE,CAAC;QAEhC,MAAM,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;QACrD,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACjD,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;QACvD,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAE1D,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,yBAAyB,CAAC,CAAC;QAE/D,SAAS,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;QACxC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;QAEtE,SAAS,CAAC,WAAW,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACxC,MAAM,IAAI,CAAC,cAAc,EAAE,CAAC;QAC5B,MAAM,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,qCAAqC,CAAC,CAAC;IAC7E,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newE2EPage } from '@stencil/core/testing';\n\ndescribe('dash-button', () => {\n it('renders', async () => {\n const page = await newE2EPage();\n\n await page.setContent('<dash-button></dash-button>');\n const element = await page.find('dash-button');\n expect(element).toHaveClass('hydrated');\n });\n\n it('renders changes to the name data', async () => {\n const page = await newE2EPage();\n\n await page.setContent('<dash-button></dash-button>');\n const component = await page.find('dash-button');\n const element = await page.find('dash-button >>> div');\n expect(element.textContent).toEqual(`Hello, World! I'm `);\n\n component.setProperty('first', 'James');\n await page.waitForChanges();\n expect(element.textContent).toEqual(`Hello, World! I'm James`);\n\n component.setProperty('last', 'Quincy');\n await page.waitForChanges();\n expect(element.textContent).toEqual(`Hello, World! I'm James Quincy`);\n\n component.setProperty('middle', 'Earl');\n await page.waitForChanges();\n expect(element.textContent).toEqual(`Hello, World! I'm James Earl Quincy`);\n });\n});\n"]}
@@ -1 +0,0 @@
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;;QAyC9B,wBAAmB,GAAG,GAAG,EAAE;YACzB,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC;QAC3F,CAAC,CAAC;QAEF,uBAAkB,GAAG,GAAG,EAAE;YACxB,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,sBAAsB,KAAK,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC;QACzF,CAAC,CAAC;QAEF,2EAA2E;QAC3E,gEAAgE;QAChE,wEAAwE;QACxE,yEAAyE;QACzE,oEAAoE;QACpE,6BAAwB,GAAG,GAAG,EAAE;YAC9B,IAAI,CAAC,YAAY,CAAC,IAAI,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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/55yJR44oU6ZMmTJlyg7YOs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Hj6kZG2tBq+j47tpGs5LoYKrNpGI9v74cfsDHNazg+/dvFl4sNzmprHz2x5g8l9LWMTuzsePli7bYkMBgqVMfb39l3CqpeXbm0g8XhF439xEgkGjOmN7GTOjA4XU2Be8zs6y4MFmnzzRpJLfXypjenrsK6Qnvd4SSQGxCyFtNbxiIb1+/74mpL1e+wrp7NISp1ElqZwuZZB2WQkPZqRyevz7Eg5zCc22qVxxMUGWMRL94sTfKnjYfd+dPq15261bpcWEq1fJvuWsoSEt/3W7tRZlNMolJylxWQEPJTGRP6lTpwz5YpSz3ryxcUE1nzcaSeieFTeArIKH3Fq8GSX9koJqc7O9C6owNL0lO5CKsZTfzS7bqTt3+LPxornxKu2Cz6Oj5IymUkTLCOB54iWAKOIaMRE7JXbS/zOMwYYhMQ9/gOLOnPxBZh8/dlhb06+Vs9B6FIi4cYmJInGgEyGIkbHgc8idkWHgHHRecVsTMU/mwuuY3tYcv3TJWW1NGJrdJY113WtkdxaJU84BqSK7rRFXdc/Dd+w5rbFeDHG8rc2IiQj2UmwQsY1iKFIxlKSg46AjARfnkGGISOZHO6JRnkNiHjzPsY92iGFZoultLNu6OtZs+3m4CCIZnxGpIjGvUsv2UAEUQ9NblrSUoNDDQP4KT+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"]}
@@ -1,35 +0,0 @@
1
- import { newSpecPage } from "@stencil/core/testing";
2
- import { DashButtonComponent } from "./dash-button";
3
- describe('dash-button', () => {
4
- it('renders', async () => {
5
- const { root } = await newSpecPage({
6
- components: [DashButtonComponent],
7
- html: '<dash-button></dash-button>',
8
- });
9
- expect(root).toEqualHtml(`
10
- <dash-button>
11
- <mock:shadow-root>
12
- <div>
13
- Hello, World! I'm
14
- </div>
15
- </mock:shadow-root>
16
- </dash-button>
17
- `);
18
- });
19
- it('renders with values', async () => {
20
- const { root } = await newSpecPage({
21
- components: [DashButtonComponent],
22
- html: `<dash-button first="Stencil" last="'Don't call me a framework' JS"></dash-button>`,
23
- });
24
- expect(root).toEqualHtml(`
25
- <dash-button first="Stencil" last="'Don't call me a framework' JS">
26
- <mock:shadow-root>
27
- <div>
28
- Hello, World! I'm Stencil 'Don't call me a framework' JS
29
- </div>
30
- </mock:shadow-root>
31
- </dash-button>
32
- `);
33
- });
34
- });
35
- //# sourceMappingURL=dash-button.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dash-button.spec.js","sourceRoot":"","sources":["../../../src/components/my-component/dash-button.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEpD,QAAQ,CAAC,aAAa,EAAE,GAAG,EAAE;IAC3B,EAAE,CAAC,SAAS,EAAE,KAAK,IAAI,EAAE;QACvB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,UAAU,EAAE,CAAC,mBAAmB,CAAC;YACjC,IAAI,EAAE,6BAA6B;SACpC,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;KAQxB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,qBAAqB,EAAE,KAAK,IAAI,EAAE;QACnC,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,WAAW,CAAC;YACjC,UAAU,EAAE,CAAC,mBAAmB,CAAC;YACjC,IAAI,EAAE,mFAAmF;SAC1F,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC;;;;;;;;KAQxB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC","sourcesContent":["import { newSpecPage } from '@stencil/core/testing';\nimport { DashButtonComponent } from './dash-button';\n\ndescribe('dash-button', () => {\n it('renders', async () => {\n const { root } = await newSpecPage({\n components: [DashButtonComponent],\n html: '<dash-button></dash-button>',\n });\n expect(root).toEqualHtml(`\n <dash-button>\n <mock:shadow-root>\n <div>\n Hello, World! I'm\n </div>\n </mock:shadow-root>\n </dash-button>\n `);\n });\n\n it('renders with values', async () => {\n const { root } = await newSpecPage({\n components: [DashButtonComponent],\n html: `<dash-button first=\"Stencil\" last=\"'Don't call me a framework' JS\"></dash-button>`,\n });\n expect(root).toEqualHtml(`\n <dash-button first=\"Stencil\" last=\"'Don't call me a framework' JS\">\n <mock:shadow-root>\n <div>\n Hello, World! I'm Stencil 'Don't call me a framework' JS\n </div>\n </mock:shadow-root>\n </dash-button>\n `);\n });\n});\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC","sourcesContent":["export * from './components';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/services/config.ts"],"names":[],"mappings":"AA6CA,MAAM,cAAc,GAAc;IAChC,QAAQ,EAAE;QACR,GAAG,EAAE,mCAAmC;QACxC,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,SAAS;KACpB;IACD,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,iCA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;;OAEG;IACH,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACtB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC","sourcesContent":["export interface KeycloakConfig {\n url: string;\n realm: string;\n clientId: string;\n}\n\nexport interface LinkItem {\n name: string;\n url: string;\n icon?: string;\n}\n\nexport interface MenuSection {\n name: string;\n links: LinkItem[];\n}\n\nexport interface LocalMenuSection {\n name: string;\n enableCustomLocalMenu: boolean;\n links: LinkItem[];\n}\n\nexport interface MenuConfig {\n global: MenuSection;\n local: LocalMenuSection;\n}\n\nexport interface LoadingConfig {\n isLoading: boolean;\n duration: number; // in milliseconds\n}\n\nexport interface AppConfig {\n keycloak: KeycloakConfig;\n defaultLink: LinkItem;\n menuViewType: string;\n cookieName: string;\n menu: MenuConfig;\n loading?: LoadingConfig;\n allowedGlobalDomain: string;\n whitelistedUrls: string;\n}\n\n\nconst DEFAULT_CONFIG: AppConfig = {\n keycloak: {\n url: 'https://keycloak.ds2.icelab.cloud',\n realm: 'ds2',\n clientId: 'dashbtn'\n },\n defaultLink: { name: 'Portal', url: 'https://portal.ds2.icelab.cloud' },\n menuViewType: 'grid',\n cookieName: 'ZDZW_cookie',\n menu: {\n global: {\n name: 'Applications',\n links: []\n },\n local: {\n name: 'Applications',\n enableCustomLocalMenu: true,\n links: []\n }\n },\n loading: {\n isLoading: true,\n duration: 800\n },\n allowedGlobalDomain: '',\n whitelistedUrls: ''\n};\n\n// Fetch config from API\nclass ConfigService {\n private static instance: ConfigService;\n private _config: AppConfig = DEFAULT_CONFIG;\n\n static getInstance() {\n if (!ConfigService.instance) {\n ConfigService.instance = new ConfigService();\n }\n return ConfigService.instance;\n }\n\n async fetchConfig(portalApiUrl: string) {\n try {\n const res = await fetch(portalApiUrl + '/developer/dashbuttons/config');\n if (!res.ok) throw new Error('Failed to fetch config');\n const data = await res.json();\n this._config = { ...DEFAULT_CONFIG, ...data }; // Merge API data with defaults\n } catch (e) {\n console.warn('Using default config due to API failure', e);\n this._config = DEFAULT_CONFIG; // fallback to defaults\n }\n\n return this._config;\n }\n\n /**\n * Return cached config without calling API\n */\n get config() {\n return this._config;\n }\n}\n\nexport const configService = ConfigService.getInstance();"]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/services/menu.ts"],"names":[],"mappings":"AAyBA,yDAAyD;AACzD,yCAAyC;AACzC,uGAAuG;AACvG,qCAAqC;AACrC,mDAAmD;AACnD,yCAAyC;AAEzC,sCAAsC;AACtC,4DAA4D;AAE5D,sCAAsC;AACtC,mFAAmF;AAEnF,6CAA6C;AAC7C,8CAA8C;AAC9C,KAAK;AAEL,MAAM,aAAa,GAAG,CAAC,SAAiB,EAAU,EAAE;IAClD,MAAM,GAAG,GAAG,SAAS,CAAC,UAAU,CAAC,MAAM,CAAC;QACtC,CAAC,CAAC,IAAI,GAAG,CAAC,SAAS,CAAC;QACpB,CAAC,CAAC,IAAI,GAAG,CAAC,WAAW,SAAS,EAAE,CAAC,CAAC;IAEpC,MAAM,QAAQ,GAAG,GAAG,CAAC,QAAQ,CAAC;IAC9B,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAElC,+BAA+B;IAC/B,IAAI,QAAQ,KAAK,WAAW;QAAE,OAAO,QAAQ,GAAG,IAAI,CAAC;IAErD,+BAA+B;IAC/B,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC;QAAE,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;IAE5E,qBAAqB;IACrB,OAAO,QAAQ,GAAG,IAAI,CAAC;AACzB,CAAC,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QAE1C,8CAA8C;QAC9C,MAAM,CAAC,QAAQ,GAAG,2BAA2B,MAAM,CAAC,QAAQ,EAAE,CAAC;QAE/D,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,MAAM,6BAA6B,CAAC,CAAC;QAEzF,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;;YAChB,MAAM,iBAAiB,GAAG,MAAA,CAAC,CAAC,QAAQ,0CAAE,iBAAiB,CAAC;YAExD,MAAM,UAAU,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAC;YAC3C,MAAM,YAAY,GAAG,GAAG,cAAc,CAAC,QAAQ,CAAC,GAAG,iBAAiB,IAAI,UAAU,EAAE,CAAC;YAErF,OAAO;gBACL,IAAI,EAAE,CAAC,CAAC,gBAAgB;gBACxB,GAAG,EAAE,iBAAiB,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE;gBAC1C,QAAQ,EAAE,MAAA,MAAA,CAAC,CAAC,QAAQ,0CAAE,QAAQ,mCAAI,EAAE;aACrC,CAAC;QACN,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC","sourcesContent":["export interface InstalledChartMetadata {\n category?: string;\n frontendUrlPrefix?: string;\n}\n\nexport interface InstalledChart {\n id: number;\n installChartName: string;\n metadata: InstalledChartMetadata;\n}\n\nexport interface PaginatedInstalledChartsResponse {\n data: InstalledChart[];\n total: number;\n page: number;\n perPage: number;\n totalPages: number;\n}\n\nexport interface MenuLink {\n name: string;\n url: string;\n category?: string;\n}\n\n// const getRootDomain = (hostOrUrl: string): string => {\n// // Ensure we can parse it with URL\n// const url = hostOrUrl.startsWith(\"http\") ? new URL(hostOrUrl) : new URL(`https://${hostOrUrl}`);\n// const hostname = url.hostname;\n// const port = url.port ? `:${url.port}` : \"\";\n// const parts = hostname.split(\".\");\n\n// // localhost → return with port\n// if (hostname === \"localhost\") return hostname + port;\n\n// // sslip.io → keep last 3 parts\n// if (hostname.endsWith(\".sslip.io\")) return parts.slice(-5).join(\".\") + port;\n\n// // Normal domains → remove first label\n// return parts.slice(1).join(\".\") + port;\n// };\n\nconst getRootDomain = (hostOrUrl: string): string => {\n const url = hostOrUrl.startsWith(\"http\")\n ? new URL(hostOrUrl)\n : new URL(`https://${hostOrUrl}`);\n\n const hostname = url.hostname;\n const port = url.port ? `:${url.port}` : \"\";\n const parts = hostname.split(\".\");\n\n // localhost → return with port\n if (hostname === \"localhost\") return hostname + port;\n\n // sslip.io → keep last 3 parts\n if (hostname.endsWith(\".sslip.io\")) return parts.slice(-5).join(\".\") + port;\n\n // Keep full hostname\n return hostname + port;\n};\n\n\nconst getUrlProtocol = (url: string, defaultProtocol = \"https://\"): string => {\n if (!url) return defaultProtocol;\n\n const trimmed = url.trim();\n\n // Match protocol (http:// or https://)\n const match = trimmed.match(/^(https?:\\/\\/)/i);\n return match ? match[1] : defaultProtocol;\n};\n\nclass MenuService {\n\n async getMenuConfig(url): Promise<PaginatedInstalledChartsResponse> {\n try {\n const res = await fetch(url);\n if (!res.ok) throw new Error('API error');\n return await res.json();\n } catch {\n return { data: [], total: 0, page: 1, perPage: 0, totalPages: 0 };\n }\n }\n\n private setDefaultProtocol(url: string): string {\n // If protocol already exists (http:// or https://), keep it\n if (/^https?:\\/\\//i.test(url)) {\n return url;\n }\n\n // Otherwise default to https\n return `https://${url}`;\n }\n\n async getMenuLinks(BASE_URL): Promise<MenuLink[]> {\n const normalizedBaseUrl = this.setDefaultProtocol(BASE_URL);\n // Create a URL object from normalizedBaseUrl\n const urlObj = new URL(normalizedBaseUrl);\n\n // Add the 'containerisationbackend' subdomain\n urlObj.hostname = `containerisationbackend.${urlObj.hostname}`;\n \n const { data } = await this.getMenuConfig(`${urlObj.origin}/developer/charts/installed`);\n\n return data.map(d => {\n const frontendUrlPrefix = d.metadata?.frontendUrlPrefix;\n\n const rootDomain = getRootDomain(BASE_URL);\n const generatedUrl = `${getUrlProtocol(BASE_URL)}${frontendUrlPrefix}.${rootDomain}`;\n \n return {\n name: d.installChartName,\n url: frontendUrlPrefix ? generatedUrl : \"\",\n category: d.metadata?.category ?? \"\",\n };\n });\n }\n}\n\nexport const menuService = new MenuService();"]}