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.
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/dash-button_4.cjs.entry.js +10847 -0
- package/dist/cjs/{index-BfwSK14n.js → index-DcvBej9f.js} +122 -4
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/web-compnont.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +11 -3
- package/dist/collection/components/my-component/dash-button.js +76 -87
- package/dist/collection/services/config.js +3 -4
- package/dist/collection/services/menu.js +3 -4
- package/dist/components/dash-button.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/loading-component.js +1 -0
- package/dist/components/loading-component2.js +1 -0
- package/dist/components/notification-component.js +1 -0
- package/dist/components/notification-component2.js +1 -0
- package/dist/components/notification-table.js +1 -0
- package/dist/components/notification-table2.js +2 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/dash-button_4.entry.js +10842 -0
- package/dist/esm/{index-6_Ga3Eox.js → index-p0GxQx6x.js} +122 -4
- package/dist/esm/loader.js +4 -4
- package/dist/esm/web-compnont.js +4 -4
- package/dist/types/components/my-component/dash-button.d.ts +2 -1
- package/dist/types/components.d.ts +9 -0
- package/dist/web-compnont/p-4944d054.entry.js +3 -0
- package/dist/web-compnont/p-p0GxQx6x.js +3 -0
- package/dist/web-compnont/web-compnont.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/app-globals-cd54EKuF.js +0 -15
- package/dist/cjs/dash-button.cjs.entry.js +0 -4314
- package/dist/collection/assets/ice-notification-component/ice-notification-component.esm.js +0 -1
- package/dist/collection/assets/ice-notification-component/index.esm.js +0 -1
- package/dist/collection/assets/ice-notification-component/p-CYEcl3gx.js +0 -2
- package/dist/collection/assets/ice-notification-component/p-Cd2FMJAb.js +0 -1
- package/dist/collection/assets/ice-notification-component/p-cf3fb8a3.entry.js +0 -2
- package/dist/collection/global/app.js +0 -7
- package/dist/esm/app-globals-B2hgy9FG.js +0 -13
- package/dist/esm/dash-button.entry.js +0 -4312
- package/dist/types/global/app.d.ts +0 -2
- package/dist/web-compnont/assets/ice-notification-component/ice-notification-component.esm.js +0 -1
- package/dist/web-compnont/assets/ice-notification-component/index.esm.js +0 -1
- package/dist/web-compnont/assets/ice-notification-component/p-CYEcl3gx.js +0 -2
- package/dist/web-compnont/assets/ice-notification-component/p-Cd2FMJAb.js +0 -1
- package/dist/web-compnont/assets/ice-notification-component/p-DQuL1Twl.js +0 -1
- package/dist/web-compnont/assets/ice-notification-component/p-cf3fb8a3.entry.js +0 -2
- package/dist/web-compnont/p-6_Ga3Eox.js +0 -3
- package/dist/web-compnont/p-7de50cbc.entry.js +0 -1
- package/dist/web-compnont/p-DiU1T8CW.js +0 -1
- /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
|
-
|
|
31
|
-
|
|
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 =
|
|
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
|
|
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
|
-
|
|
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:
|
|
72
|
+
category: d.metadata?.category ?? "",
|
|
74
73
|
};
|
|
75
74
|
});
|
|
76
75
|
}
|