dash-button-web 0.0.23-beta.4 → 0.0.23-beta.6
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_4.cjs.entry.js +24 -4
- package/dist/collection/components/my-component/dash-button.js +24 -4
- package/dist/components/dash-button.js +1 -1
- package/dist/esm/dash-button_4.entry.js +24 -4
- package/dist/types/components/my-component/dash-button.d.ts +3 -0
- package/dist/web-compnont/{p-4944d054.entry.js → p-99f4c836.entry.js} +1 -1
- package/dist/web-compnont/web-compnont.esm.js +1 -1
- package/package.json +1 -1
|
@@ -4083,6 +4083,26 @@ const DashButtonComponent = class {
|
|
|
4083
4083
|
localMenuLinks;
|
|
4084
4084
|
organizationUrl;
|
|
4085
4085
|
isRestricted = false;
|
|
4086
|
+
componentDidLoad() {
|
|
4087
|
+
document.addEventListener('click', this.handleNotificationLinkClick, true);
|
|
4088
|
+
}
|
|
4089
|
+
disconnectedCallback() {
|
|
4090
|
+
document.removeEventListener('click', this.handleNotificationLinkClick, true);
|
|
4091
|
+
}
|
|
4092
|
+
// Fix notification home icon click not opening a new tab
|
|
4093
|
+
// (workaround for ice-notification-component shadow DOM click bug)
|
|
4094
|
+
handleNotificationLinkClick = (event) => {
|
|
4095
|
+
const path = event.composedPath();
|
|
4096
|
+
const insideNotification = path.some((node) => node.tagName === 'NOTIFICATION-COMPONENT');
|
|
4097
|
+
if (!insideNotification)
|
|
4098
|
+
return;
|
|
4099
|
+
const anchor = path.find((node) => node.tagName === 'A' && node.target === '_blank');
|
|
4100
|
+
if (!anchor || !anchor.href)
|
|
4101
|
+
return;
|
|
4102
|
+
event.preventDefault();
|
|
4103
|
+
event.stopPropagation();
|
|
4104
|
+
window.open(anchor.href, '_blank', 'noopener');
|
|
4105
|
+
};
|
|
4086
4106
|
async componentWillLoad() {
|
|
4087
4107
|
// Fetch config from API
|
|
4088
4108
|
this.config = await configService.fetchConfig(this.portalApiUrl);
|
|
@@ -4226,10 +4246,10 @@ const DashButtonComponent = class {
|
|
|
4226
4246
|
const orgHost = orgUrlRaw
|
|
4227
4247
|
? new URL(orgUrlRaw.startsWith('http') ? orgUrlRaw : `https://${orgUrlRaw}`).hostname
|
|
4228
4248
|
: '';
|
|
4229
|
-
return orgHost && owner ? (h("notification-component", { owner: owner, "max-records": 10, "display-type": "icon", "notification-url": `https://
|
|
4249
|
+
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;
|
|
4230
4250
|
}
|
|
4231
4251
|
render() {
|
|
4232
|
-
return h("div", { key: '
|
|
4252
|
+
return h("div", { key: 'f5bc7f809a7988ae492e4f554ac2c3cbaf51ae54' }, h("div", { key: '91a71e53fae4d0aac6f42b8cc127bba7856d34f2' }, (() => {
|
|
4233
4253
|
// GLOBAL LOADING SPINNER
|
|
4234
4254
|
if (this.isLoading) {
|
|
4235
4255
|
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))));
|
|
@@ -4261,7 +4281,7 @@ const DashButtonComponent = class {
|
|
|
4261
4281
|
else {
|
|
4262
4282
|
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")));
|
|
4263
4283
|
}
|
|
4264
|
-
})()), h("div", { key: '
|
|
4284
|
+
})()), 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 ? (
|
|
4265
4285
|
// <div>{this.localMenuLinks}</div>
|
|
4266
4286
|
this.localMenuLinks?.map((app, index) => {
|
|
4267
4287
|
const isDisabled = !app.url;
|
|
@@ -4269,7 +4289,7 @@ const DashButtonComponent = class {
|
|
|
4269
4289
|
})) : (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 &&
|
|
4270
4290
|
(this.localMenuLinks?.length ?? 0) === 0) ||
|
|
4271
4291
|
(this.config?.menu?.local?.enableCustomLocalMenu &&
|
|
4272
|
-
(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: '
|
|
4292
|
+
(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("img", { key: 'd9348ded56515517b422d56e98dd664a7b4a8bdb', 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/lnz2jk3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SK7rRFXdc/Dd+w5rbFeDHG8rc2IiQj2UmwQsY1iKFIxlKSg46AjARfnkGGISOZHO6JRnkNiHjzPsY92iGFZoultLNu6OtZs+3m4CCIZnxGpIjGvUsv2UAEUQ9NblrSUoNDDQP4KT+TH2/QWJT/eFgjwNaRnnGHI4x3NzRXZbQ89QBg0GsQ2Wo+SnZR1uFycYbBI3kdv2XEAiw35KqQMGkDoYaCeaDzi29jIuziuYYyVua1jANrFFECTpgCaNAXQpCmAJk0BNGkKoElTACsNUB39ZTFQAMMW/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) ?
|
|
4273
4293
|
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" }))))
|
|
4274
4294
|
: h("div", null))));
|
|
4275
4295
|
}
|
|
@@ -25,6 +25,9 @@ export declare class DashButtonComponent {
|
|
|
25
25
|
localMenuLinks: MenuLink[];
|
|
26
26
|
organizationUrl: any;
|
|
27
27
|
isRestricted: boolean;
|
|
28
|
+
componentDidLoad(): void;
|
|
29
|
+
disconnectedCallback(): void;
|
|
30
|
+
handleNotificationLinkClick: (event: MouseEvent) => void;
|
|
28
31
|
componentWillLoad(): Promise<void>;
|
|
29
32
|
initKeycloak(): Promise<void>;
|
|
30
33
|
loadOrganizationUrlAndLinks(): Promise<void>;
|