dash-button-web 0.0.25 → 0.0.26
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 +49 -14
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/web-compnont.cjs.js +1 -1
- package/dist/collection/components/my-component/dash-button.js +68 -14
- package/dist/components/dash-button.js +1 -1
- package/dist/esm/dash-button_4.entry.js +49 -14
- package/dist/esm/loader.js +1 -1
- package/dist/esm/web-compnont.js +1 -1
- package/dist/types/components/my-component/dash-button.d.ts +1 -0
- package/dist/types/components.d.ts +3 -0
- package/dist/web-compnont/{p-ce35027b.entry.js → p-9e0fb47e.entry.js} +1 -1
- package/dist/web-compnont/web-compnont.esm.js +1 -1
- package/package.json +1 -1
|
@@ -4084,6 +4084,7 @@ const DashButtonComponent = class {
|
|
|
4084
4084
|
isRestricted = false;
|
|
4085
4085
|
showNotification = true;
|
|
4086
4086
|
notificationPosition = 'left';
|
|
4087
|
+
notificationDomain;
|
|
4087
4088
|
// Accordion: at most one of the two sections is collapsed at a time.
|
|
4088
4089
|
// Collapsing one always leaves the other expanded.
|
|
4089
4090
|
collapsedModuleSection = null;
|
|
@@ -4317,23 +4318,57 @@ const DashButtonComponent = class {
|
|
|
4317
4318
|
renderNotificationComponent() {
|
|
4318
4319
|
const token = this.keycloak?.idTokenParsed;
|
|
4319
4320
|
const owner = token?.preferred_username || token?.sub || '';
|
|
4320
|
-
|
|
4321
|
-
if (!owner || !organizationUrl)
|
|
4321
|
+
if (!owner)
|
|
4322
4322
|
return null;
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4323
|
+
const notificationBaseUrl = this.notificationDomain
|
|
4324
|
+
? this.notificationDomain.trim().replace(/\/$/, '')
|
|
4325
|
+
: (() => {
|
|
4326
|
+
const organizationUrl = String(token?.organizationUrl || '').trim();
|
|
4327
|
+
if (!organizationUrl)
|
|
4328
|
+
return '';
|
|
4329
|
+
try {
|
|
4330
|
+
const url = /^https?:\/\//i.test(organizationUrl)
|
|
4331
|
+
? organizationUrl
|
|
4332
|
+
: `https://${organizationUrl}`;
|
|
4333
|
+
const orgHost = new URL(url).hostname;
|
|
4334
|
+
return `https://notificationsbackend.${orgHost}`;
|
|
4335
|
+
}
|
|
4336
|
+
catch {
|
|
4337
|
+
return '';
|
|
4338
|
+
}
|
|
4339
|
+
})();
|
|
4340
|
+
if (!notificationBaseUrl)
|
|
4331
4341
|
return null;
|
|
4332
|
-
}
|
|
4333
|
-
return (h("notification-component", { owner: owner, "max-records": 10, "display-type": "icon", "notification-url": `https://notifications.${orgHost}/notifications-api`, "socket-connect": true, "socket-url": `wss://repository.${orgHost}/socket`, "list-url": `https://notifications.${orgHost}/notifications` }));
|
|
4342
|
+
return (h("notification-component", { owner: owner, "max-records": 10, "display-type": "icon", "notification-url": `${notificationBaseUrl}/notifications-api`, "socket-connect": true, "socket-url": `${notificationBaseUrl.replace(/^https:/, 'wss:').replace(/^http:/, 'ws:')}/socket`, "list-url": `${notificationBaseUrl}/notifications` }));
|
|
4334
4343
|
}
|
|
4344
|
+
// renderNotificationComponent() {
|
|
4345
|
+
// const token = this.keycloak?.idTokenParsed;
|
|
4346
|
+
// const owner = token?.preferred_username || token?.sub || '';
|
|
4347
|
+
// const organizationUrl = String(token?.organizationUrl || '').trim();
|
|
4348
|
+
// if (!owner || !organizationUrl) return null;
|
|
4349
|
+
// let orgHost: string;
|
|
4350
|
+
// try {
|
|
4351
|
+
// const url = /^https?:\/\//i.test(organizationUrl)
|
|
4352
|
+
// ? organizationUrl
|
|
4353
|
+
// : `https://${organizationUrl}`;
|
|
4354
|
+
// orgHost = new URL(url).hostname;
|
|
4355
|
+
// } catch {
|
|
4356
|
+
// return null;
|
|
4357
|
+
// }
|
|
4358
|
+
// return (
|
|
4359
|
+
// <notification-component
|
|
4360
|
+
// owner={owner}
|
|
4361
|
+
// max-records={10}
|
|
4362
|
+
// display-type="icon"
|
|
4363
|
+
// notification-url={`https://notifications.${orgHost}/notifications-api`}
|
|
4364
|
+
// socket-connect={true}
|
|
4365
|
+
// socket-url={`wss://repository.${orgHost}/socket`}
|
|
4366
|
+
// list-url={`https://notifications.${orgHost}/notifications`}
|
|
4367
|
+
// />
|
|
4368
|
+
// );
|
|
4369
|
+
// }
|
|
4335
4370
|
render() {
|
|
4336
|
-
return h("div", { key: '
|
|
4371
|
+
return h("div", { key: 'ae55a1cf0256024f40f0b64d2e41e06abe59ab40' }, h("div", { key: '9d4920dcbdcfcedaec3e12298bbd67c162f244d4' }, (() => {
|
|
4337
4372
|
// GLOBAL LOADING SPINNER
|
|
4338
4373
|
if (this.isLoading) {
|
|
4339
4374
|
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))));
|
|
@@ -4369,7 +4404,7 @@ const DashButtonComponent = class {
|
|
|
4369
4404
|
else {
|
|
4370
4405
|
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")));
|
|
4371
4406
|
}
|
|
4372
|
-
})()), h("div", { key: '
|
|
4407
|
+
})()), h("div", { key: '264f79472b783f8a509542e4c6ff9e9ff0898e97', id: "appPermissionErrorModal", class: "modal" }, h("div", { key: '072b848701fc7c67f27099461935eb1530bab487', class: "modal-content" }, h("img", { key: '5a782dc7248a56f1e0db4858fc5594ffe2dcd504', src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGD0lEQVR4nO2cbU8TWRTH/W5WEAmF4nNiieFFoeBjYhQUWzUWYkpbDfGFCR9CoolvQF9aWgG3kMCG8LACC1ikuCuU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2YWFisCDba+u8vV3tbWGNuT3jY32AxjXS06QFLgZKUH9aPct7O3RVFfXf+BlHj6kZG2tBq+j47tpGs5LoYKrNpGI9v74cfsDHNazg+/dvFl4sNzmprHz2x5g8l9LWMTuzsePli7bYkMBgqVMfb39l3CqpeXbm0g8XhF439xEgkGjOmN7GTOjA4XU2Be8zs6y4MFmnzzRpJLfXypjenrsK6Qnvd4SSQGxCyFtNbxiIb1+/74mpL1e+wrp7NISp1ElqZwuZZB2WQkPZqRyevz7Eg5zCc22qVxxMUGWMRL94sTfKnjYfd+dPq15261bpcWEq1fJvuWsoSEt/3W7tRZlNMolJylxWQEPJTGRP6lTpwz5YpSz3ryxcUE1nzcaSeieFTeArIKH3Fq8GSX9koJqc7O9C6owNL0lO5CKsZTfzS7bqTt3+LPxornxKu2Cz6Oj5IymUkTLCOB54iWAKOIaMRE7JXbS/zOMwYYhMQ9/gOLOnPxBZh8/dlhb06+Vs9B6FIi4cYmJInGgEyGIkbHgc8idkWHgHHRecVsTMU/mwuuY3tYcv3TJWW1NGJrdJY113WtkdxaJU84BqSK7rRFXdc/Dd+w5rbFeDHG8rc2IiQj2UmwQsY1iKFIxlKSg46AjARfnkGGISOZHO6JRnkNiHjzPsY92iGFZoultLNu6OtZs+3m4CCIZnxGpIjGvUsv2UAEUQ9NblrSUoNDDQP4KT+TH2/QWJT/eFgjwNaRnnGHI4x3NzRXZbQ89QBg0GsQ2Wo+SnZR1uFycYbBI3kdv2XEAiw35KqQMGkDoYaCeaDzi29jIuziuYYyVua1jANrFFECTpgCaNAXQpCmAJk0BNGkKoElTACsNUB39ZTFQAMMW/78xypQpU6ZMmbIjP9e+AkAlsBlIjsPOAAAAAElFTkSuQmCC" }), h("h2", { key: '5b01ba68a75b1de739cea31965ff996d3d49ffbe', class: "green-text margin-b" }, "You don't have permission to access this application."), h("h3", { key: '8346afb362260f5f07dd4050c1fc200b158be8da', class: "green-text" }, "Please contact the administration."), (this.config.defaultLink.url && this.showUnauthorizedModal) ?
|
|
4373
4408
|
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" }))))
|
|
4374
4409
|
: h("div", null))));
|
|
4375
4410
|
}
|
package/dist/esm/loader.js
CHANGED
|
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-DQuL1Twl.js';
|
|
|
5
5
|
const defineCustomElements = async (win, options) => {
|
|
6
6
|
if (typeof window === 'undefined') return undefined;
|
|
7
7
|
await globalScripts();
|
|
8
|
-
return bootstrapLazy([["dash-button_4",[[513,"dash-button",{"showPostLoginText":[4,"show-post-login-text"],"silentCheckSso":[4,"silent-check-sso"],"redirectUri":[1,"redirect-uri"],"authMethod":[1,"auth-method"],"portalApiUrl":[1,"portal-api-url"],"plmUrl":[1,"plm-url"],"showUnauthorizedModal":[4,"show-unauthorized-modal"],"primaryColor":[1,"primary-color"],"accentColor":[1,"accent-color"],"showNotification":[4,"show-notification"],"notificationPosition":[1,"notification-position"],"keycloak":[32],"isAuth":[32],"givenUserName":[32],"silentCheckSsoRedirectUri":[32],"appList":[32],"avatarSvg":[32],"isLoading":[32],"config":[32],"localMenuLinks":[32],"organizationUrl":[32],"isRestricted":[32],"collapsedModuleSection":[32]}],[513,"notification-component",{"owner":[1],"applicationId":[1,"application-id"],"maxRecords":[2,"max-records"],"listUrl":[1,"list-url"],"displayType":[1,"display-type"],"notificationUrl":[1,"notification-url"],"socketConnect":[4,"socket-connect"],"socketUrl":[1,"socket-url"],"showModal":[32]},null,{"showModal":[{"ownerChanged":0}]}],[513,"notification-table",{"owner":[1],"applicationId":[1,"application-id"],"maxRecords":[2,"max-records"],"listUrl":[1,"list-url"],"displayType":[1,"display-type"],"notificationUrl":[1,"notification-url"],"socketConnect":[4,"socket-connect"],"socketUrl":[1,"socket-url"],"showTable":[32],"loading":[32],"loadingNew":[32],"newCount":[32],"notificationList":[32],"markingRead":[32],"pageNumber":[32],"totalRecords":[32],"notificationType":[32],"search":[32],"searching":[32],"showSearchBar":[32],"categoryList":[32],"statusList":[32],"timeoutId":[32],"cancelRequest":[32],"cancelCountRequest":[32]},null,{"owner":[{"ownerChanged":0}]}],[513,"loading-component",{"show":[4],"size":[1]}]]]], options);
|
|
8
|
+
return bootstrapLazy([["dash-button_4",[[513,"dash-button",{"showPostLoginText":[4,"show-post-login-text"],"silentCheckSso":[4,"silent-check-sso"],"redirectUri":[1,"redirect-uri"],"authMethod":[1,"auth-method"],"portalApiUrl":[1,"portal-api-url"],"plmUrl":[1,"plm-url"],"showUnauthorizedModal":[4,"show-unauthorized-modal"],"primaryColor":[1,"primary-color"],"accentColor":[1,"accent-color"],"showNotification":[4,"show-notification"],"notificationPosition":[1,"notification-position"],"notificationDomain":[1,"notification-domain"],"keycloak":[32],"isAuth":[32],"givenUserName":[32],"silentCheckSsoRedirectUri":[32],"appList":[32],"avatarSvg":[32],"isLoading":[32],"config":[32],"localMenuLinks":[32],"organizationUrl":[32],"isRestricted":[32],"collapsedModuleSection":[32]}],[513,"notification-component",{"owner":[1],"applicationId":[1,"application-id"],"maxRecords":[2,"max-records"],"listUrl":[1,"list-url"],"displayType":[1,"display-type"],"notificationUrl":[1,"notification-url"],"socketConnect":[4,"socket-connect"],"socketUrl":[1,"socket-url"],"showModal":[32]},null,{"showModal":[{"ownerChanged":0}]}],[513,"notification-table",{"owner":[1],"applicationId":[1,"application-id"],"maxRecords":[2,"max-records"],"listUrl":[1,"list-url"],"displayType":[1,"display-type"],"notificationUrl":[1,"notification-url"],"socketConnect":[4,"socket-connect"],"socketUrl":[1,"socket-url"],"showTable":[32],"loading":[32],"loadingNew":[32],"newCount":[32],"notificationList":[32],"markingRead":[32],"pageNumber":[32],"totalRecords":[32],"notificationType":[32],"search":[32],"searching":[32],"showSearchBar":[32],"categoryList":[32],"statusList":[32],"timeoutId":[32],"cancelRequest":[32],"cancelCountRequest":[32]},null,{"owner":[{"ownerChanged":0}]}],[513,"loading-component",{"show":[4],"size":[1]}]]]], options);
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export { defineCustomElements };
|
package/dist/esm/web-compnont.js
CHANGED
|
@@ -17,5 +17,5 @@ var patchBrowser = () => {
|
|
|
17
17
|
|
|
18
18
|
patchBrowser().then(async (options) => {
|
|
19
19
|
await globalScripts();
|
|
20
|
-
return bootstrapLazy([["dash-button_4",[[513,"dash-button",{"showPostLoginText":[4,"show-post-login-text"],"silentCheckSso":[4,"silent-check-sso"],"redirectUri":[1,"redirect-uri"],"authMethod":[1,"auth-method"],"portalApiUrl":[1,"portal-api-url"],"plmUrl":[1,"plm-url"],"showUnauthorizedModal":[4,"show-unauthorized-modal"],"primaryColor":[1,"primary-color"],"accentColor":[1,"accent-color"],"showNotification":[4,"show-notification"],"notificationPosition":[1,"notification-position"],"keycloak":[32],"isAuth":[32],"givenUserName":[32],"silentCheckSsoRedirectUri":[32],"appList":[32],"avatarSvg":[32],"isLoading":[32],"config":[32],"localMenuLinks":[32],"organizationUrl":[32],"isRestricted":[32],"collapsedModuleSection":[32]}],[513,"notification-component",{"owner":[1],"applicationId":[1,"application-id"],"maxRecords":[2,"max-records"],"listUrl":[1,"list-url"],"displayType":[1,"display-type"],"notificationUrl":[1,"notification-url"],"socketConnect":[4,"socket-connect"],"socketUrl":[1,"socket-url"],"showModal":[32]},null,{"showModal":[{"ownerChanged":0}]}],[513,"notification-table",{"owner":[1],"applicationId":[1,"application-id"],"maxRecords":[2,"max-records"],"listUrl":[1,"list-url"],"displayType":[1,"display-type"],"notificationUrl":[1,"notification-url"],"socketConnect":[4,"socket-connect"],"socketUrl":[1,"socket-url"],"showTable":[32],"loading":[32],"loadingNew":[32],"newCount":[32],"notificationList":[32],"markingRead":[32],"pageNumber":[32],"totalRecords":[32],"notificationType":[32],"search":[32],"searching":[32],"showSearchBar":[32],"categoryList":[32],"statusList":[32],"timeoutId":[32],"cancelRequest":[32],"cancelCountRequest":[32]},null,{"owner":[{"ownerChanged":0}]}],[513,"loading-component",{"show":[4],"size":[1]}]]]], options);
|
|
20
|
+
return bootstrapLazy([["dash-button_4",[[513,"dash-button",{"showPostLoginText":[4,"show-post-login-text"],"silentCheckSso":[4,"silent-check-sso"],"redirectUri":[1,"redirect-uri"],"authMethod":[1,"auth-method"],"portalApiUrl":[1,"portal-api-url"],"plmUrl":[1,"plm-url"],"showUnauthorizedModal":[4,"show-unauthorized-modal"],"primaryColor":[1,"primary-color"],"accentColor":[1,"accent-color"],"showNotification":[4,"show-notification"],"notificationPosition":[1,"notification-position"],"notificationDomain":[1,"notification-domain"],"keycloak":[32],"isAuth":[32],"givenUserName":[32],"silentCheckSsoRedirectUri":[32],"appList":[32],"avatarSvg":[32],"isLoading":[32],"config":[32],"localMenuLinks":[32],"organizationUrl":[32],"isRestricted":[32],"collapsedModuleSection":[32]}],[513,"notification-component",{"owner":[1],"applicationId":[1,"application-id"],"maxRecords":[2,"max-records"],"listUrl":[1,"list-url"],"displayType":[1,"display-type"],"notificationUrl":[1,"notification-url"],"socketConnect":[4,"socket-connect"],"socketUrl":[1,"socket-url"],"showModal":[32]},null,{"showModal":[{"ownerChanged":0}]}],[513,"notification-table",{"owner":[1],"applicationId":[1,"application-id"],"maxRecords":[2,"max-records"],"listUrl":[1,"list-url"],"displayType":[1,"display-type"],"notificationUrl":[1,"notification-url"],"socketConnect":[4,"socket-connect"],"socketUrl":[1,"socket-url"],"showTable":[32],"loading":[32],"loadingNew":[32],"newCount":[32],"notificationList":[32],"markingRead":[32],"pageNumber":[32],"totalRecords":[32],"notificationType":[32],"search":[32],"searching":[32],"showSearchBar":[32],"categoryList":[32],"statusList":[32],"timeoutId":[32],"cancelRequest":[32],"cancelCountRequest":[32]},null,{"owner":[{"ownerChanged":0}]}],[513,"loading-component",{"show":[4],"size":[1]}]]]], options);
|
|
21
21
|
});
|
|
@@ -31,6 +31,7 @@ export declare class DashButtonComponent {
|
|
|
31
31
|
isRestricted: boolean;
|
|
32
32
|
showNotification: boolean;
|
|
33
33
|
notificationPosition: 'left' | 'right';
|
|
34
|
+
notificationDomain?: string;
|
|
34
35
|
collapsedModuleSection: 'global' | 'local' | null;
|
|
35
36
|
private gridLocalListEl?;
|
|
36
37
|
private listLocalScrollEl?;
|
|
@@ -15,6 +15,7 @@ export namespace Components {
|
|
|
15
15
|
* @default "check-sso"
|
|
16
16
|
*/
|
|
17
17
|
"authMethod": string;
|
|
18
|
+
"notificationDomain"?: string;
|
|
18
19
|
/**
|
|
19
20
|
* @default 'left'
|
|
20
21
|
*/
|
|
@@ -73,6 +74,7 @@ declare namespace LocalJSX {
|
|
|
73
74
|
* @default "check-sso"
|
|
74
75
|
*/
|
|
75
76
|
"authMethod"?: string;
|
|
77
|
+
"notificationDomain"?: string;
|
|
76
78
|
/**
|
|
77
79
|
* @default 'left'
|
|
78
80
|
*/
|
|
@@ -120,6 +122,7 @@ declare namespace LocalJSX {
|
|
|
120
122
|
"accentColor": string;
|
|
121
123
|
"showNotification": boolean;
|
|
122
124
|
"notificationPosition": 'left' | 'right';
|
|
125
|
+
"notificationDomain": string;
|
|
123
126
|
}
|
|
124
127
|
|
|
125
128
|
interface IntrinsicElements {
|