@uxland/primary-shell 7.36.2 → 7.36.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/{component-DcOxAUm8.js → component-D-tzX5fM.js} +2 -2
- package/dist/{component-DcOxAUm8.js.map → component-D-tzX5fM.js.map} +1 -1
- package/dist/{index-DRzDb9o9.js → index-BW5Gm1nm.js} +32 -28
- package/dist/index-BW5Gm1nm.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +3 -3
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/api/user-manager/user-manager.d.ts +3 -0
- package/package.json +1 -1
- package/src/api/interaction-service/modal-styles.css +1 -1
- package/src/api/user-manager/user-manager.ts +20 -27
- package/dist/index-DRzDb9o9.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as d, k as l, P as p, h as g, r as m, i as v, s as h, a as f, b as u } from "./index-
|
|
1
|
+
import { t as d, k as l, P as p, h as g, r as m, i as v, s as h, a as f, b as u } from "./index-BW5Gm1nm.js";
|
|
2
2
|
const x = ".container{background-color:#fff;display:flex;flex-direction:column;min-width:500px;width:90vw;height:90vh;border-radius:var(--dss-radius-sm);overflow:hidden}.content{display:grid;height:100%;min-height:1px;grid-template-columns:1fr 1fr;grid-auto-rows:1fr;gap:16px;padding:16px;overflow-y:auto;max-height:calc(90vh - 120px)}.content>*{border:1px solid var(--color-neutral-200);border-radius:8px;padding:16px;background-color:var(--color-neutral-50);min-height:200px}.footer{display:flex;flex-direction:row;align-items:center;background:#fff;justify-content:end;gap:12px;height:56px;border-top:1px solid var(--color-neutral-100);padding:var(--dss-spacing-sm)}", b = (r) => l`
|
|
3
3
|
<div class="container">
|
|
4
4
|
<!-- <div class="header">
|
|
@@ -44,4 +44,4 @@ i = c([
|
|
|
44
44
|
export {
|
|
45
45
|
i as ImportDataManagerModal
|
|
46
46
|
};
|
|
47
|
-
//# sourceMappingURL=component-
|
|
47
|
+
//# sourceMappingURL=component-D-tzX5fM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-D-tzX5fM.js","sources":["../src/api/import-data-manager/component/template.ts","../src/api/import-data-manager/component/component.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { translate } from \"../../../locales\";\nimport { ImportDataManagerModal } from \"./component\";\n\nexport const template = (props: ImportDataManagerModal) => {\n return html`\n <div class=\"container\">\n <!-- <div class=\"header\">\n <div class=\"title\">\n <div>${translate(\"importDataManager.title\")}</div>\n </div> \n </div> -->\n <div class=\"content\" id=\"import-data-region\"></div>\n <div class=\"footer\">\n <dss-button label=\"${translate(\"importDataManager.actions.cancel\")}\" @click=\"${() => {\n props.cancel();\n }}\" size=\"md\" variant=\"secondary\"></dss-button>\n <dss-button label=\"${translate(\"importDataManager.actions.import\")}\" @click=\"${() => {\n props._accept();\n }}\" size=\"md\" variant=\"primary\"></dss-button>\n </div>\n </div>\n `;\n};\n","import { IRegion, region } from \"@uxland/regions\";\nimport { LitElement, css, html, unsafeCSS } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport styles from \"./styles.css?inline\";\nimport { template } from \"./template\";\nimport { ConfirmationContentProps } from \"../../interaction-service\";\nimport { PrimariaRegionHost, shellApi } from \"../../api\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal\n extends PrimariaRegionHost(LitElement)\n implements ConfirmationContentProps<undefined, undefined>\n{\n data: undefined;\n setResult: (result: undefined) => void;\n setIsValid: (isValid: boolean) => void;\n confirm: () => void;\n cancel: () => void;\n\n @region({ targetId: \"import-data-region\", name: shellApi.regionManager.regions.shell.importData })\n importDataRegion: IRegion | undefined;\n\n render() {\n return html`${template(this)}`;\n }\n\n static styles = css`\n ${unsafeCSS(styles)}\n `;\n\n _accept = () => {\n this.confirm();\n };\n}\n"],"names":["template","props","html","translate","ImportDataManagerModal","PrimariaRegionHost","LitElement","css","unsafeCSS","styles","__decorateClass","region","shellApi","customElement"],"mappings":";gqBAIaA,IAAW,CAACC,MAChBC;AAAAA;AAAAA;AAAAA;AAAAA,iBAIQC,EAAU,yBAAyB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,yBAK5BA,EAAU,kCAAkC,CAAC,aAAa,MAAM;AACjF,EAAAF,EAAM,OAAA;AACR,CAAC;AAAA,2BACoBE,EAAU,kCAAkC,CAAC,aAAa,MAAM;AACnF,EAAAF,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;;;;;;ACVA,IAAMG,IAAN,cACGC,EAAmBC,CAAU,EAEvC;AAAA,EAHO,cAAA;AAAA,UAAA,GAAA,SAAA,GAqBL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AAxBaI,EAiBJ,SAASG;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAPrBC,EAAA;AAAA,EADCC,EAAO,EAAE,UAAU,sBAAsB,MAAMC,EAAS,cAAc,QAAQ,MAAM,WAAA,CAAY;AAAA,GAVtFR,EAWX,WAAA,oBAAA,CAAA;AAXWA,IAANM,EAAA;AAAA,EADNG,EAAc,2BAA2B;AAAA,GAC7BT,CAAA;"}
|
|
@@ -2926,7 +2926,7 @@ function o$Y(J) {
|
|
|
2926
2926
|
};
|
|
2927
2927
|
}
|
|
2928
2928
|
const v$m = (J) => j$3(J, p$h);
|
|
2929
|
-
let
|
|
2929
|
+
let w$5 = class {
|
|
2930
2930
|
constructor() {
|
|
2931
2931
|
this.viewsByRegion = {}, this.regions = {};
|
|
2932
2932
|
}
|
|
@@ -2962,7 +2962,14 @@ let c$p = class {
|
|
|
2962
2962
|
}
|
|
2963
2963
|
add(W, X) {
|
|
2964
2964
|
const te = this.getRegion(W);
|
|
2965
|
-
|
|
2965
|
+
if (te) {
|
|
2966
|
+
const re = te.host;
|
|
2967
|
+
if (re)
|
|
2968
|
+
for (; re.firstChild; )
|
|
2969
|
+
re.removeChild(re.firstChild);
|
|
2970
|
+
this.remove(te), delete this._viewRegistry.viewsByRegion[W];
|
|
2971
|
+
}
|
|
2972
|
+
return this._regions[W] = X, this._viewRegistry.registerRegion(W, X), this;
|
|
2966
2973
|
}
|
|
2967
2974
|
getRegion(W) {
|
|
2968
2975
|
return this._regions[W];
|
|
@@ -3001,9 +3008,9 @@ let c$p = class {
|
|
|
3001
3008
|
createRegionManager() {
|
|
3002
3009
|
return new Ti(this._viewRegistry);
|
|
3003
3010
|
}
|
|
3004
|
-
},
|
|
3011
|
+
}, c$p = class extends n$x {
|
|
3005
3012
|
constructor(W) {
|
|
3006
|
-
const X = new
|
|
3013
|
+
const X = new w$5();
|
|
3007
3014
|
super(X), this._name = W;
|
|
3008
3015
|
}
|
|
3009
3016
|
clear() {
|
|
@@ -3013,7 +3020,7 @@ let c$p = class {
|
|
|
3013
3020
|
return super.destroy(), this._viewRegistry.destroy(), this;
|
|
3014
3021
|
}
|
|
3015
3022
|
};
|
|
3016
|
-
const f$r = (J) => new
|
|
3023
|
+
const f$r = (J) => new c$p(J), l$w = (J) => J.importer(), R$3 = async (J, W, X) => {
|
|
3017
3024
|
try {
|
|
3018
3025
|
const te = await l$w(J), re = W(J);
|
|
3019
3026
|
return await X(re, te), {
|
|
@@ -5425,7 +5432,7 @@ const ConfirmationMessage = ({ data: J }) => /* @__PURE__ */ jsxRuntimeExports.j
|
|
|
5425
5432
|
align-items: center;
|
|
5426
5433
|
justify-content: center;
|
|
5427
5434
|
position: fixed;
|
|
5428
|
-
z-index:
|
|
5435
|
+
z-index: 998;
|
|
5429
5436
|
left: 0;
|
|
5430
5437
|
top: 0;
|
|
5431
5438
|
width: 100%;
|
|
@@ -9640,26 +9647,23 @@ let tokenManager$1;
|
|
|
9640
9647
|
const createTokenManager = () => tokenManager$1 || (tokenManager$1 = new TokenManagerImpl(), tokenManager$1);
|
|
9641
9648
|
class UserManagerImpl {
|
|
9642
9649
|
constructor(W) {
|
|
9643
|
-
this.tokenManager = W, this.getRole = () => {
|
|
9644
|
-
const X = this.
|
|
9645
|
-
if (X)
|
|
9646
|
-
|
|
9647
|
-
|
|
9648
|
-
|
|
9649
|
-
|
|
9650
|
-
|
|
9651
|
-
|
|
9652
|
-
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
return;
|
|
9661
|
-
}
|
|
9662
|
-
};
|
|
9650
|
+
this.tokenManager = W, this.getRole = () => this.getAccessInfo()?.role_type, this.isUserRoleAdministrative = () => this.getRole() === "ADM", this.getFullName = () => {
|
|
9651
|
+
const X = this.getAccessInfo();
|
|
9652
|
+
if (!X) return;
|
|
9653
|
+
const te = X.trace_user_given_name, re = X.trace_user_family_name;
|
|
9654
|
+
if (!(!te && !re))
|
|
9655
|
+
return [re, te].filter(Boolean).join(" ");
|
|
9656
|
+
}, this.getSector = () => this.getAccessInfo()?.module_code;
|
|
9657
|
+
}
|
|
9658
|
+
getAccessInfo() {
|
|
9659
|
+
const W = this.tokenManager.getToken();
|
|
9660
|
+
if (W)
|
|
9661
|
+
try {
|
|
9662
|
+
return jwtDecode(W).access_info;
|
|
9663
|
+
} catch (X) {
|
|
9664
|
+
console.error("Error decoding JWT token:", X);
|
|
9665
|
+
return;
|
|
9666
|
+
}
|
|
9663
9667
|
}
|
|
9664
9668
|
}
|
|
9665
9669
|
let userManager$1;
|
|
@@ -9671,7 +9675,7 @@ class ImportDataManagerImpl {
|
|
|
9671
9675
|
async import(W) {
|
|
9672
9676
|
this.currentImporterId = W, this.selectedItems = {}, this.pluginTexts = {};
|
|
9673
9677
|
try {
|
|
9674
|
-
const { ImportDataManagerModal: X } = await import("./component-
|
|
9678
|
+
const { ImportDataManagerModal: X } = await import("./component-D-tzX5fM.js"), { confirmed: te } = await this.interactionService.confirm(
|
|
9675
9679
|
void 0,
|
|
9676
9680
|
{ component: X },
|
|
9677
9681
|
{
|
|
@@ -51779,4 +51783,4 @@ export {
|
|
|
51779
51783
|
l as y,
|
|
51780
51784
|
PrimariaInteractionService as z
|
|
51781
51785
|
};
|
|
51782
|
-
//# sourceMappingURL=index-
|
|
51786
|
+
//# sourceMappingURL=index-BW5Gm1nm.js.map
|