dash-button-web 0.0.19-beta.0 → 0.0.20
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/dash-button.cjs.entry.js +16 -3
- package/dist/cjs/dash-button.cjs.entry.js.map +1 -1
- package/dist/collection/components/my-component/dash-button.js +2 -2
- package/dist/collection/components/my-component/dash-button.js.map +1 -1
- package/dist/collection/services/menu.js +14 -1
- package/dist/collection/services/menu.js.map +1 -1
- package/dist/components/dash-button.js +16 -3
- package/dist/components/dash-button.js.map +1 -1
- package/dist/esm/dash-button.entry.js +16 -3
- package/dist/esm/dash-button.entry.js.map +1 -1
- package/dist/types/services/menu.d.ts +1 -0
- package/dist/web-compnont/{p-63d22b03.entry.js → p-94d91144.entry.js} +3 -3
- package/dist/web-compnont/p-94d91144.entry.js.map +1 -0
- package/dist/web-compnont/web-compnont.esm.js +1 -1
- package/package.json +1 -1
- package/dist/web-compnont/p-63d22b03.entry.js.map +0 -1
|
@@ -3969,8 +3969,21 @@ class MenuService {
|
|
|
3969
3969
|
return { data: [], total: 0, page: 1, perPage: 0, totalPages: 0 };
|
|
3970
3970
|
}
|
|
3971
3971
|
}
|
|
3972
|
+
setDefaultProtocol(url) {
|
|
3973
|
+
// If protocol already exists (http:// or https://), keep it
|
|
3974
|
+
if (/^https?:\/\//i.test(url)) {
|
|
3975
|
+
return url;
|
|
3976
|
+
}
|
|
3977
|
+
// Otherwise default to https
|
|
3978
|
+
return `https://${url}`;
|
|
3979
|
+
}
|
|
3972
3980
|
async getMenuLinks(BASE_URL) {
|
|
3973
|
-
const
|
|
3981
|
+
const normalizedBaseUrl = this.setDefaultProtocol(BASE_URL);
|
|
3982
|
+
// Create a URL object from normalizedBaseUrl
|
|
3983
|
+
const urlObj = new URL(normalizedBaseUrl);
|
|
3984
|
+
// Add the 'containerisationbackend' subdomain
|
|
3985
|
+
urlObj.hostname = `containerisationbackend.${urlObj.hostname}`;
|
|
3986
|
+
const { data } = await this.getMenuConfig(`${urlObj.origin}/developer/charts/installed`);
|
|
3974
3987
|
return data.map(d => {
|
|
3975
3988
|
var _a, _b, _c;
|
|
3976
3989
|
const frontendUrlPrefix = (_a = d.metadata) === null || _a === void 0 ? void 0 : _a.frontendUrlPrefix;
|
|
@@ -4187,10 +4200,10 @@ const DashButtonComponent = class {
|
|
|
4187
4200
|
(_d = this.localMenuLinks) === null || _d === void 0 ? void 0 : _d.map((app, index$1) => {
|
|
4188
4201
|
const isDisabled = !app.url;
|
|
4189
4202
|
return (index.h("a", { key: index$1, class: "external-app-link", href: isDisabled ? undefined : app.url, target: isDisabled ? undefined : "_blank", rel: isDisabled ? undefined : "noopener noreferrer", onClick: isDisabled ? (e) => e.preventDefault() : undefined }, index.h("div", { class: "modal-app" }, index.h("div", null, app.name))));
|
|
4190
|
-
})) : ((_e = this.config.menu.local.links) === null || _e === void 0 ? void 0 : _e.map((app, index$1) => (index.h("a", { key: index$1, class: "external-app-link", target: "_blank", rel: "noopener noreferrer", href: app.url }, index.h("div", { class: "modal-app" }, index.h("div", null, app.name)))))), !this.organizationUrl ? (index.h("div", null, index.h("h3", { class: "gray-text" }, "Organization URL not set"), index.h("p", { class: "gray-text" }, "Please set your
|
|
4203
|
+
})) : ((_e = this.config.menu.local.links) === null || _e === void 0 ? void 0 : _e.map((app, index$1) => (index.h("a", { key: index$1, class: "external-app-link", target: "_blank", rel: "noopener noreferrer", href: app.url }, index.h("div", { class: "modal-app" }, index.h("div", null, app.name)))))), !this.organizationUrl ? (index.h("div", null, index.h("h3", { class: "gray-text" }, "Organization Domain URL not set"), index.h("p", { class: "gray-text" }, "Please set your Organization Domain URL on the Portal profile page."))) : (((!((_h = (_g = (_f = this.config) === null || _f === void 0 ? void 0 : _f.menu) === null || _g === void 0 ? void 0 : _g.local) === null || _h === void 0 ? void 0 : _h.enableCustomLocalMenu) &&
|
|
4191
4204
|
((_k = (_j = this.localMenuLinks) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0) === 0) ||
|
|
4192
4205
|
(((_o = (_m = (_l = this.config) === null || _l === void 0 ? void 0 : _l.menu) === null || _m === void 0 ? void 0 : _m.local) === null || _o === void 0 ? void 0 : _o.enableCustomLocalMenu) &&
|
|
4193
|
-
((_t = (_s = (_r = (_q = (_p = this.config) === null || _p === void 0 ? void 0 : _p.menu) === null || _q === void 0 ? void 0 : _q.local) === null || _r === void 0 ? void 0 : _r.links) === null || _s === void 0 ? void 0 : _s.length) !== null && _t !== void 0 ? _t : 0) === 0)) && (index.h("div", null, index.h("h3", { class: "gray-text" }, "No installed ", ((_w = (_v = (_u = this.config) === null || _u === void 0 ? void 0 : _u.menu) === null || _v === void 0 ? void 0 : _v.local) === null || _w === void 0 ? void 0 : _w.name) || "menu", " found."), index.h("p", { class: "gray-text" }, "Please contact administration.")))))))))), index.h("div", { key: '
|
|
4206
|
+
((_t = (_s = (_r = (_q = (_p = this.config) === null || _p === void 0 ? void 0 : _p.menu) === null || _q === void 0 ? void 0 : _q.local) === null || _r === void 0 ? void 0 : _r.links) === null || _s === void 0 ? void 0 : _s.length) !== null && _t !== void 0 ? _t : 0) === 0)) && (index.h("div", null, index.h("h3", { class: "gray-text" }, "No installed ", ((_w = (_v = (_u = this.config) === null || _u === void 0 ? void 0 : _u.menu) === null || _v === void 0 ? void 0 : _v.local) === null || _w === void 0 ? void 0 : _w.name) || "menu", " found."), index.h("p", { class: "gray-text" }, "Please contact administration.")))))))))), index.h("div", { key: 'bc918fe3c8375d9a8499a00ab74854fbc96c4a7b', id: "appPermissionErrorModal", class: "modal" }, index.h("div", { key: '14c4bfaebe75ec0084e011984aea29aa75de4b7a', class: "modal-content" }, index.h("img", { key: 'abf9124d8a86a9197cb97e0e97c7be97b376bc2f', src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGD0lEQVR4nO2cbU8TWRTH/W5WEAmF4nNiieFFoeB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qRjeQ9ZUAh4MYhvXxs+e5fHwRBbWra32A5j0ePjHf9H1mST+2YWFisCDba+u8vV3tbWGNuT3jY32AxjXS06QFLgZKUH9aPct7O3RVFfXf+BlHj6kZG2tBq+j47tpGs5LoYKrNpGI9v74cfsDHNazg+/dvFl4sNzmprHz2x5g8l9LWMTuzsePli7bYkMBgqVMfb39l3CqpeXbm0g8XhF439xEgkGjOmN7GTOjA4XU2Be8zs6y4MFmnzzRpJLfXypjenrsK6Qnvd4SSQGxCyFtNbxiIb1+/74mpL1e+wrp7NISp1ElqZwuZZB2WQkPZqRyevz7Eg5zCc22qVxxMUGWMRL94sTfKnjYfd+dPq15261bpcWEq1fJvuWsoSEt/3W7tRZlNMolJylxWQEPJTGRP6lTpwz5YpSz3ryxcUE1nzcaSeieFTeArIKH3Fq8GSX9koJqc7O9C6owNL0lO5CKsZTfzS7bqTt3+LPxornxKu2Cz6Oj5IymUkTLCOB54iWAKOIaMRE7JXbS/zOMwYYhMQ9/gOLOnPxBZh8/dlhb06+Vs9B6FIi4cYmJInGgEyGIkbHgc8idkWHgHHRecVsTMU/mwuuY3tYcv3TJWW1NGJrdJY113WtkdxaJU84BqSK7rRFXdc/Dd+w5rbFeDHG8rc2IiQj2UmwQsY1iKFIxlKSg46AjARfnkGGISOZHO6JRnkNiHjzPsY92iGFZoultLNu6OtZs+3m4CCIZnxGpIjGvUsv2UAEUQ9NblrSUoNDDQP4KT+TH2/QWJT/eFgjwNaRnnGHI4x3NzRXZbQ89QBg0GsQ2Wo+SnZR1uFycYbBI3kdv2XEAiw35KqQMGkDoYaCeaDzi29jIuziuYYyVua1jANrFFECTpgCaNAXQpCmAJk0BNGkKoElTACsNUB39ZTFQAMMW/78xypQpU6ZMmbIjP9e+AkAlsBlIjsPOAAAAAElFTkSuQmCC" }), index.h("h2", { key: '48d754de32892cda7fb3411093a0253b993b6708', class: "green-text margin-b" }, "You don't have permission to access this application."), index.h("h3", { key: 'bff059c29a6c94aabe00b75820a8446481777b52', class: "green-text" }, "Please contact the administration."), (this.config.defaultLink.url && this.showUnauthorizedModal) ?
|
|
4194
4207
|
index.h("div", null, index.h("h4", { class: "gray-text" }, "You will be automatically redirected to the portal."), index.h("div", { id: "countdown" }, index.h("div", { id: "countdown-number" }), index.h("svg", null, index.h("circle", { r: "18", cx: "20", cy: "20" }))))
|
|
4195
4208
|
: index.h("div", null))));
|
|
4196
4209
|
}
|