dash-button-web 0.0.12 → 0.0.13
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 +9 -7
- package/dist/cjs/dash-button.cjs.entry.js.map +1 -1
- package/dist/cjs/{index-065225eb.js → index-ad267eeb.js} +26 -1
- package/dist/cjs/index-ad267eeb.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/web-compnont.cjs.js +2 -2
- package/dist/collection/components/my-component/dash-button.js +44 -6
- package/dist/collection/components/my-component/dash-button.js.map +1 -1
- package/dist/components/dash-button.js +10 -6
- package/dist/components/dash-button.js.map +1 -1
- package/dist/esm/dash-button.entry.js +9 -7
- package/dist/esm/dash-button.entry.js.map +1 -1
- package/dist/esm/{index-2b1034cf.js → index-46149754.js} +26 -1
- package/dist/esm/index-46149754.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/web-compnont.js +3 -3
- package/dist/types/components/my-component/dash-button.d.ts +2 -0
- package/dist/types/components.d.ts +4 -0
- package/dist/web-compnont/{p-ed06c47d.entry.js → p-0816eafe.entry.js} +3 -3
- package/dist/web-compnont/p-0816eafe.entry.js.map +1 -0
- package/dist/web-compnont/p-db53c3e9.js +3 -0
- package/dist/web-compnont/p-db53c3e9.js.map +1 -0
- package/dist/web-compnont/web-compnont.esm.js +1 -1
- package/dist/web-compnont/web-compnont.esm.js.map +1 -1
- package/package.json +1 -1
- package/readme.md +13 -1
- package/dist/cjs/index-065225eb.js.map +0 -1
- package/dist/esm/index-2b1034cf.js.map +0 -1
- package/dist/web-compnont/p-bdb5725e.js +0 -3
- package/dist/web-compnont/p-bdb5725e.js.map +0 -1
- package/dist/web-compnont/p-ed06c47d.entry.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-ad267eeb.js');
|
|
6
6
|
|
|
7
7
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
8
8
|
|
|
@@ -3895,6 +3895,8 @@ const DashButtonComponent = class {
|
|
|
3895
3895
|
this.usageTrackingUrl = "https://usage-tracking-ui-zdzw.cloud.zdzw-project.com";
|
|
3896
3896
|
this.showUnauthorizedModal = false;
|
|
3897
3897
|
this.postTextDelayDuration = undefined;
|
|
3898
|
+
this.primaryColor = "";
|
|
3899
|
+
this.accentColor = "";
|
|
3898
3900
|
this.keycloak = new Keycloak({
|
|
3899
3901
|
url: this.keycloakUri,
|
|
3900
3902
|
realm: this.realm,
|
|
@@ -4019,25 +4021,25 @@ const DashButtonComponent = class {
|
|
|
4019
4021
|
appModal.style.display = "none";
|
|
4020
4022
|
}
|
|
4021
4023
|
render() {
|
|
4022
|
-
return index.h("div", { key: '
|
|
4024
|
+
return index.h("div", { key: '8451f0ebb8dc515f8ad6c5ca6dedbf4799c251ae' }, index.h("div", { key: 'a692626bea0cc06ce19d306573bd99f176edcb6b' }, (() => {
|
|
4023
4025
|
if (this.isAuth && this.showPostLoginText) {
|
|
4024
4026
|
// User set post-text-delay-duration for displaying loading spinner
|
|
4025
4027
|
if (this.showPostLoginLoadingSpinner) {
|
|
4026
4028
|
return (index.h("a", { id: "login-btn", class: "button button-link" }, index.h("div", { class: "lds-ring" }, index.h("div", null), index.h("div", null), index.h("div", null), index.h("div", null))));
|
|
4027
4029
|
}
|
|
4028
4030
|
else {
|
|
4029
|
-
return (index.h("a", { href: this.redirectUri, id: "login-btn", class: "button button-link" }, index.h("span", { class: "button-text button-text-full-width" }, "Go to Dashboard")));
|
|
4031
|
+
return (index.h("a", { style: { background: this.primaryColor != undefined ? this.primaryColor : "" }, href: this.redirectUri, id: "login-btn", class: "button button-link" }, index.h("span", { style: { color: this.accentColor != undefined ? this.accentColor : "" }, class: "button-text button-text-full-width" }, "Go to Dashboard")));
|
|
4030
4032
|
}
|
|
4031
4033
|
}
|
|
4032
4034
|
else if (this.isAuth) {
|
|
4033
|
-
return (index.h("div", { id: "profile-btn", class: "dropdown" }, index.h("button", { type: "button", class: "button" }, index.h("span", { class: "button-profile" }, index.h("div", { innerHTML: this.avatarSvg })), index.h("span", { id: "given-name", class: "button-text" }, this.givenUserName), index.h("div", { class: "button-icon" }, index.h("span", { class: "gg-menu-grid-r" }))), index.h("div", { class: "dropdown-content" }, index.h("div", { class: "dropdown-user-profile" }, index.h("div", { class: "username" }, "@", this.givenUserName), index.h("div", { class: "first-last-name" }, JSON.parse(localStorage.getItem('keycloak')).idTokenParsed.name)), index.h("a", { onClick: this.showModal.bind(this), id: "applications-btn" }, index.h("i", { class: "menu-bar-icons gg-microsoft" }), "Applications"), index.h("a", { href: this.portalUrl, target: '_blank', id: "applications-btn" }, index.h("i", { class: "menu-bar-icons gg-ereader" }), "Portal"), index.h("a", { href: this.marketplaceUrl, target: '_blank', id: "applications-btn" }, index.h("i", { class: "menu-bar-icons gg-display-flex" }), "Marketplace"), index.h("a", { href: this.usageTrackingUrl, target: '_blank', id: "applications-btn" }, index.h("i", { class: "menu-bar-icons gg-align-bottom" }), "Usage Tracking"), index.h("a", { onClick: this.logout.bind(this), id: "logout-btn" }, index.h("i", { class: "menu-bar-icons gg-log-out" }), "Logout"))));
|
|
4035
|
+
return (index.h("div", { id: "profile-btn", class: "dropdown" }, index.h("button", { style: { background: this.primaryColor != undefined ? this.primaryColor : "" }, type: "button", class: "button" }, index.h("span", { class: "button-profile" }, index.h("div", { innerHTML: this.avatarSvg })), index.h("span", { style: { color: this.accentColor != undefined ? this.accentColor : "" }, id: "given-name", class: "button-text" }, this.givenUserName), index.h("div", { class: "button-icon" }, index.h("span", { class: "gg-menu-grid-r" }))), index.h("div", { class: "dropdown-content" }, index.h("div", { class: "dropdown-user-profile" }, index.h("div", { class: "username" }, "@", this.givenUserName), index.h("div", { class: "first-last-name" }, JSON.parse(localStorage.getItem('keycloak')).idTokenParsed.name)), index.h("a", { onClick: this.showModal.bind(this), id: "applications-btn" }, index.h("i", { style: { color: this.primaryColor != undefined ? this.primaryColor : "" }, class: "menu-bar-icons gg-microsoft" }), "Applications"), index.h("a", { href: this.portalUrl, target: '_blank', id: "applications-btn" }, index.h("i", { style: { color: this.primaryColor != undefined ? this.primaryColor : "" }, class: "menu-bar-icons gg-ereader" }), "Portal"), index.h("a", { href: this.marketplaceUrl, target: '_blank', id: "applications-btn" }, index.h("i", { style: { color: this.primaryColor != undefined ? this.primaryColor : "" }, class: "menu-bar-icons gg-display-flex" }), "Marketplace"), index.h("a", { href: this.usageTrackingUrl, target: '_blank', id: "applications-btn" }, index.h("i", { style: { color: this.primaryColor != undefined ? this.primaryColor : "" }, class: "menu-bar-icons gg-align-bottom" }), "Usage Tracking"), index.h("a", { onClick: this.logout.bind(this), id: "logout-btn" }, index.h("i", { style: { color: this.primaryColor != undefined ? this.primaryColor : "" }, class: "menu-bar-icons gg-log-out" }), "Logout"))));
|
|
4034
4036
|
}
|
|
4035
4037
|
else {
|
|
4036
|
-
return (index.h("button", { onClick: this.login.bind(this), id: "login-btn", type: "button", class: "button" }, index.h("span", { class: "button-text" }, "Login")));
|
|
4038
|
+
return (index.h("button", { style: { background: this.primaryColor != undefined ? this.primaryColor : "" }, onClick: this.login.bind(this), id: "login-btn", type: "button", class: "button" }, index.h("span", { style: { color: this.accentColor != undefined ? this.accentColor : "" }, class: "button-text" }, "Login")));
|
|
4037
4039
|
}
|
|
4038
|
-
})()), index.h("div", { key: '
|
|
4040
|
+
})()), index.h("div", { key: 'e1dda02d64589c23ad34f960d06f513d58561d89', id: "appListModal", class: "modal" }, index.h("div", { key: 'a87345411f0eae5d56c7d52d4e6ac08009d627be', class: "modal-content" }, index.h("span", { key: '8523744cf95ec9a2144be6b1bb03002989d1801a', onClick: this.closeModal.bind(this), class: "close" }, "\u00D7"), index.h("h3", { key: 'ff6cd4a2f5f461fd049f026c2653044f4e7935c4' }, "Applications"), index.h("div", { key: 'f5fd583072b547677a197e8471b09103a8fba631', class: "modal-body" }, this.appList.length > 0 ? this.appList.map(app => {
|
|
4039
4041
|
return (index.h("a", { class: "external-app-link", target: '_blank', href: "https://" + app.shortname + "-zdzw" + this.portalUrl.replace(/(^\w+:|^)\/\//, '').replace('portal-frontend-zdzw', '') }, index.h("div", { class: "modal-app" }, index.h("div", null, app.name))));
|
|
4040
|
-
}) : index.h("div", null, index.h("h3", { class: "gray-text" }, "Not installed application found."), " ", index.h("p", { class: "gray-text" }, "Please contact administration."))))), index.h("div", { key: '
|
|
4042
|
+
}) : index.h("div", null, index.h("h3", { class: "gray-text" }, "Not installed application found."), " ", index.h("p", { class: "gray-text" }, "Please contact administration."))))), index.h("div", { key: '8dde166aebc15a7e33d4c1073e0c4d1c97774284', id: "appPermissionErrorModal", class: "modal" }, index.h("div", { key: '34f20d3951e5b1cbfc5e457f1eb5782cc490e432', class: "modal-content" }, index.h("img", { key: '6fe23bcf521cd8ab5288d0c82c63669562acace3', src: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAYAAACOEfKtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGD0lEQVR4nO2cbU8TWRTH/W5WEAmF4nNiieFFoeBjYhQUWzUWYkpbDfGFCR9CoolvQF9aWgG3kMCG8LACC1ikuCuUh7bH/M/MmW131S2ZqTDjPcmkdub2tvPj3HP/55yJR44oU6ZMmTJlyg7YOsL9pI7+shkogGFzDqMAhhVAOsiQozwwrACS8sCwfXd+tYTDCiApDwwf/FJUSzisAJKjNhFlPzYF0KQpgCZNATRpCqBJUwBNmgJo0hRAk6YAmjQF0KkAs4uLtPz8OU2HQpRqaaFkQwPFq6v5SHo8fA7XVgYGKLu0dGC/81ABLORylB4cpInLl+nt0aP7OiauXKH00BAV8vlfE2AmkaCxpiYDSKK6mqaammjx+nX6FAzS348e0VYkwgf+jXO4Nun18lj53PuLF2kj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vuWsoSEt/3W7tRZlNMolJylxWQEPJTGRP6lTpwz5YpSz3ryxcUE1nzcaSeieFTeArIKH3Fq8GSX9koJqc7O9C6owNL0lO5CKsZTfzS7bqTt3+LPxornxKu2Cz6Oj5IymUkTLCOB54iWAKOIaMRE7JXbS/zOMwYYhMQ9/gOLOnPxBZh8/dlhb06+Vs9B6FIi4cYmJInGgEyGIkbHgc8idkWHgHHRecVsTMU/mwuuY3tYcv3TJWW1NGJrdJY113WtkdxaJU84BqSK7rRFXdc/Dd+w5rbFeDHG8rc2IiQj2UmwQsY1iKFIxlKSg46AjARfnkGGISOZHO6JRnkNiHjzPsY92iGFZoultLNu6OtZs+3m4CCIZnxGpIjGvUsv2UAEUQ9NblrSUoNDDQP4KT+TH2/QWJT/eFgjwNaRnnGHI4x3NzRXZbQ89QBg0GsQ2Wo+SnZR1uFycYbBI3kdv2XEAiw35KqQMGkDoYaCeaDzi29jIuziuYYyVua1jANrFFECTpgCaNAXQpCmAJk0BNGkKoElTACsNUB39ZTFQAMMW/78xypQpU6ZMmbIjP9e+AkAlsBlIjsPOAAAAAElFTkSuQmCC" }), index.h("h2", { key: '307e89e5e88655aaa9788c13f738c9361cab0903', class: "green-text margin-b" }, "You don't have permission to access this application."), index.h("h3", { key: '1be6f7dd8e590d99b8933ba770c16b386779d77b', class: "green-text" }, "Please contact the administration."), (this.portalUrl && this.showUnauthorizedModal) ?
|
|
4041
4043
|
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" }))))
|
|
4042
4044
|
: index.h("div", null))));
|
|
4043
4045
|
}
|