dash-button-web 0.0.23-beta.2 → 0.0.23-beta.4

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 (49) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  2. package/dist/cjs/dash-button_4.cjs.entry.js +10847 -0
  3. package/dist/cjs/{index-BfwSK14n.js → index-DcvBej9f.js} +122 -4
  4. package/dist/cjs/loader.cjs.js +3 -3
  5. package/dist/cjs/web-compnont.cjs.js +3 -3
  6. package/dist/collection/collection-manifest.json +11 -3
  7. package/dist/collection/components/my-component/dash-button.js +76 -87
  8. package/dist/collection/services/config.js +3 -4
  9. package/dist/collection/services/menu.js +3 -4
  10. package/dist/components/dash-button.js +1 -1
  11. package/dist/components/index.js +1 -1
  12. package/dist/components/loading-component.js +1 -0
  13. package/dist/components/loading-component2.js +1 -0
  14. package/dist/components/notification-component.js +1 -0
  15. package/dist/components/notification-component2.js +1 -0
  16. package/dist/components/notification-table.js +1 -0
  17. package/dist/components/notification-table2.js +2 -0
  18. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  19. package/dist/esm/dash-button_4.entry.js +10842 -0
  20. package/dist/esm/{index-6_Ga3Eox.js → index-p0GxQx6x.js} +122 -4
  21. package/dist/esm/loader.js +4 -4
  22. package/dist/esm/web-compnont.js +4 -4
  23. package/dist/types/components/my-component/dash-button.d.ts +2 -1
  24. package/dist/types/components.d.ts +9 -0
  25. package/dist/web-compnont/p-4944d054.entry.js +3 -0
  26. package/dist/web-compnont/p-p0GxQx6x.js +3 -0
  27. package/dist/web-compnont/web-compnont.esm.js +1 -1
  28. package/package.json +1 -1
  29. package/dist/cjs/app-globals-cd54EKuF.js +0 -15
  30. package/dist/cjs/dash-button.cjs.entry.js +0 -4314
  31. package/dist/collection/assets/ice-notification-component/ice-notification-component.esm.js +0 -1
  32. package/dist/collection/assets/ice-notification-component/index.esm.js +0 -1
  33. package/dist/collection/assets/ice-notification-component/p-CYEcl3gx.js +0 -2
  34. package/dist/collection/assets/ice-notification-component/p-Cd2FMJAb.js +0 -1
  35. package/dist/collection/assets/ice-notification-component/p-cf3fb8a3.entry.js +0 -2
  36. package/dist/collection/global/app.js +0 -7
  37. package/dist/esm/app-globals-B2hgy9FG.js +0 -13
  38. package/dist/esm/dash-button.entry.js +0 -4312
  39. package/dist/types/global/app.d.ts +0 -2
  40. package/dist/web-compnont/assets/ice-notification-component/ice-notification-component.esm.js +0 -1
  41. package/dist/web-compnont/assets/ice-notification-component/index.esm.js +0 -1
  42. package/dist/web-compnont/assets/ice-notification-component/p-CYEcl3gx.js +0 -2
  43. package/dist/web-compnont/assets/ice-notification-component/p-Cd2FMJAb.js +0 -1
  44. package/dist/web-compnont/assets/ice-notification-component/p-DQuL1Twl.js +0 -1
  45. package/dist/web-compnont/assets/ice-notification-component/p-cf3fb8a3.entry.js +0 -2
  46. package/dist/web-compnont/p-6_Ga3Eox.js +0 -3
  47. package/dist/web-compnont/p-7de50cbc.entry.js +0 -1
  48. package/dist/web-compnont/p-DiU1T8CW.js +0 -1
  49. /package/dist/{collection/assets/ice-notification-component → web-compnont}/p-DQuL1Twl.js +0 -0
@@ -27,9 +27,8 @@ const DEFAULT_CONFIG = {
27
27
  };
28
28
  // Fetch config from API
29
29
  class ConfigService {
30
- constructor() {
31
- this._config = DEFAULT_CONFIG;
32
- }
30
+ static instance;
31
+ _config = DEFAULT_CONFIG;
33
32
  static getInstance() {
34
33
  if (!ConfigService.instance) {
35
34
  ConfigService.instance = new ConfigService();
@@ -42,7 +41,7 @@ class ConfigService {
42
41
  if (!res.ok)
43
42
  throw new Error('Failed to fetch config');
44
43
  const data = await res.json();
45
- this._config = Object.assign(Object.assign({}, DEFAULT_CONFIG), data); // Merge API data with defaults
44
+ this._config = { ...DEFAULT_CONFIG, ...data }; // Merge API data with defaults
46
45
  }
47
46
  catch (e) {
48
47
  console.warn('Using default config due to API failure', e);
@@ -43,7 +43,7 @@ class MenuService {
43
43
  throw new Error('API error');
44
44
  return await res.json();
45
45
  }
46
- catch (_a) {
46
+ catch {
47
47
  return { data: [], total: 0, page: 1, perPage: 0, totalPages: 0 };
48
48
  }
49
49
  }
@@ -63,14 +63,13 @@ class MenuService {
63
63
  urlObj.hostname = `containerisationbackend.${urlObj.hostname}`;
64
64
  const { data } = await this.getMenuConfig(`${urlObj.origin}/developer/charts/installed`);
65
65
  return data.map(d => {
66
- var _a, _b, _c;
67
- const frontendUrlPrefix = (_a = d.metadata) === null || _a === void 0 ? void 0 : _a.frontendUrlPrefix;
66
+ const frontendUrlPrefix = d.metadata?.frontendUrlPrefix;
68
67
  const rootDomain = getRootDomain(BASE_URL);
69
68
  const generatedUrl = `${getUrlProtocol(BASE_URL)}${frontendUrlPrefix}.${rootDomain}`;
70
69
  return {
71
70
  name: d.installChartName,
72
71
  url: frontendUrlPrefix ? generatedUrl : "",
73
- category: (_c = (_b = d.metadata) === null || _b === void 0 ? void 0 : _b.category) !== null && _c !== void 0 ? _c : "",
72
+ category: d.metadata?.category ?? "",
74
73
  };
75
74
  });
76
75
  }