@uxland/primary-shell 7.35.1 → 7.35.2
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-Bz7NzBsL.js → component-C0H3AM4N.js} +2 -2
- package/dist/{component-Bz7NzBsL.js.map → component-C0H3AM4N.js.map} +1 -1
- package/dist/{index-umjRq-RK.js → index-CI2A4nGX.js} +14 -6
- package/dist/index-CI2A4nGX.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/UI/internal-views/common-nav-menu.d.ts +1 -1
- package/dist/primary/shell/src/api/notification-service/notification.service-impl.d.ts +2 -0
- package/dist/primary/shell/src/handle-plugins.d.ts +1 -1
- package/package.json +1 -1
- package/src/api/notification-service/notification-service-impl.test.ts +27 -0
- package/src/api/notification-service/notification.service-impl.ts +29 -5
- package/dist/index-umjRq-RK.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-CI2A4nGX.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-C0H3AM4N.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-C0H3AM4N.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;"}
|
|
@@ -6990,12 +6990,20 @@ const l$v = (J) => {
|
|
|
6990
6990
|
};
|
|
6991
6991
|
class PrimariaNotificationService {
|
|
6992
6992
|
}
|
|
6993
|
+
const CONTAINER_ID = "primaria-toast-container";
|
|
6993
6994
|
class PrimariaNotificationServiceImpl extends PrimariaNotificationService {
|
|
6995
|
+
getOrCreateContainer() {
|
|
6996
|
+
let W = document.getElementById(CONTAINER_ID);
|
|
6997
|
+
return W || (W = document.createElement("div"), W.id = CONTAINER_ID, W.style.cssText = "position:fixed;bottom:var(--dss-spacing-xxs,8px);left:var(--dss-spacing-xxs,8px);display:flex;flex-direction:column-reverse;gap:var(--dss-spacing-xs,4px);z-index:999;pointer-events:none;", document.body.appendChild(W)), W;
|
|
6998
|
+
}
|
|
6999
|
+
removeContainerIfEmpty(W) {
|
|
7000
|
+
W.childElementCount === 0 && W.remove();
|
|
7001
|
+
}
|
|
6994
7002
|
notify(W, X, te = 3e3) {
|
|
6995
|
-
const re = document.createElement("dss-toast");
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
7003
|
+
const re = this.getOrCreateContainer(), oe = document.createElement("dss-toast");
|
|
7004
|
+
oe.setAttribute("isshow", "true"), oe.setAttribute("state", X), oe.setAttribute("position", "bottom-left"), oe.setAttribute("text", W), oe.setAttribute("hasicon", "true"), oe.setAttribute("duration", te.toString()), oe.style.position = "relative", oe.style.bottom = "auto", oe.style.left = "auto", oe.style.pointerEvents = "auto", re.appendChild(oe), setTimeout(() => {
|
|
7005
|
+
oe.setAttribute("isshow", "false"), setTimeout(() => {
|
|
7006
|
+
oe.remove(), this.removeContainerIfEmpty(re);
|
|
6999
7007
|
}, 300);
|
|
7000
7008
|
}, te);
|
|
7001
7009
|
}
|
|
@@ -9664,7 +9672,7 @@ class ImportDataManagerImpl {
|
|
|
9664
9672
|
async import(W) {
|
|
9665
9673
|
this.currentImporterId = W, this.selectedItems = {}, this.pluginTexts = {};
|
|
9666
9674
|
try {
|
|
9667
|
-
const { ImportDataManagerModal: X } = await import("./component-
|
|
9675
|
+
const { ImportDataManagerModal: X } = await import("./component-C0H3AM4N.js"), { confirmed: te } = await this.interactionService.confirm(
|
|
9668
9676
|
void 0,
|
|
9669
9677
|
{ component: X },
|
|
9670
9678
|
{
|
|
@@ -51645,4 +51653,4 @@ export {
|
|
|
51645
51653
|
l as x,
|
|
51646
51654
|
PrimariaInteractionService as y
|
|
51647
51655
|
};
|
|
51648
|
-
//# sourceMappingURL=index-
|
|
51656
|
+
//# sourceMappingURL=index-CI2A4nGX.js.map
|