@uxland/primary-shell 7.49.1 → 7.50.0
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-ftY27Sve.js → component-BI9HXATX.js} +2 -2
- package/dist/{component-ftY27Sve.js.map → component-BI9HXATX.js.map} +1 -1
- package/dist/{index-BjHmySvD.js → index-D9hfKjLi.js} +28 -5
- package/dist/index-D9hfKjLi.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +5 -5
- package/dist/index.umd.cjs.map +1 -1
- package/dist/{plugin-DS8LOzZZ.js → plugin-BPpYe_wT.js} +183 -154
- package/dist/{plugin-DS8LOzZZ.js.map → plugin-BPpYe_wT.js.map} +1 -1
- package/dist/primary/shell/src/api/region-manager/region-manager.d.ts +6 -0
- package/dist/primary/shell/src/index.d.ts +1 -0
- package/package.json +2 -2
- package/src/api/region-manager/region-manager.test.ts +53 -0
- package/src/api/region-manager/region-manager.ts +33 -0
- package/src/index.ts +4 -1
- package/dist/index-BjHmySvD.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s as i, u as l, k as d, h as g, r as p, b as m, t as h } from "./index-
|
|
1
|
+
import { s as i, u as l, k as d, h as g, r as p, b as m, t as h } from "./index-D9hfKjLi.js";
|
|
2
2
|
const u = ".container{background-color:#fff;display:flex;flex-direction:column;min-width:500px;width:95vw;height:95vh;border-radius:var(--dss-radius-sm);overflow:hidden}.header{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;color:#000;padding:var(--dss-spacing-sm)}.header__title{grid-column:2;text-align:center}.header__close{grid-column:3;justify-self:end}.content{display:grid;flex:1;min-height:0;grid-template-columns:50% 50%;padding:16px}.content>primaria-region{width:100%;height:100%;min-height:0}.content primaria-region>div{width:100%;height:100%;border-radius:8px;padding:0 16px;box-sizing:border-box}.content>primaria-region>div{display:flex;flex-direction:column;gap:16px;overflow-y:auto}.content>primaria-region>div>*{flex-shrink:0}.footer{display:flex;flex-direction:row;align-items:center;background:#fff;justify-content:center;gap:12px;height:56px;border-top:1px solid var(--color-neutral-100);padding:var(--dss-spacing-sm)}", v = (a) => d`
|
|
3
3
|
<div class="container">
|
|
4
4
|
<div class="header">
|
|
@@ -65,4 +65,4 @@ t = x([
|
|
|
65
65
|
export {
|
|
66
66
|
t as ImportDataManagerModal
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=component-
|
|
68
|
+
//# sourceMappingURL=component-BI9HXATX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-BI9HXATX.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 { shellApi } from \"../../api\";\nimport { ImportDataManagerModal } from \"./component\";\n\nexport const template = (props: ImportDataManagerModal) => {\n return html`\n <div class=\"container\">\n <div class=\"header\">\n <dss-typography class=\"header__title\" tag=\"h2\" variant=\"headline-4\">\n ${translate(\"importDataManager.title\")}\n </dss-typography>\n <dss-icon-button\n class=\"header__close\"\n icon=\"close\"\n size=\"lg\"\n variant=\"neutral\"\n label=\"${translate(\"importDataManager.actions.close\")}\"\n @onClick=\"${() => {\n props.cancel();\n }}\"\n ></dss-icon-button>\n </div>\n <div class=\"content\">\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importDataActivityHistory}\"></primaria-region>\n <primaria-region name=\"${shellApi.regionManager.regions.shell.importData}\"></primaria-region>\n </div>\n <div class=\"footer\">\n <dss-button\n label=\"${translate(\"importDataManager.actions.cancel\")}\"\n @click=\"${() => {\n props.cancel();\n }}\"\n size=\"md\"\n variant=\"secondary\"\n ></dss-button>\n <dss-button\n icon=\"add_circle\"\n label=\"${translate(\"importDataManager.actions.import\")}\"\n @click=\"${() => {\n props._accept();\n }}\"\n size=\"md\"\n variant=\"primary\"\n ></dss-button>\n </div>\n </div>\n `;\n};\n","import { LitElement, css, html, unsafeCSS } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport { ConfirmationContentProps } from \"../../interaction-service\";\nimport styles from \"./styles.css?inline\";\nimport { template } from \"./template\";\n\n@customElement(\"import-data-manager-modal\")\nexport class ImportDataManagerModal extends LitElement implements ConfirmationContentProps<undefined, undefined> {\n data: undefined;\n setResult: (result: undefined) => void;\n setIsValid: (isValid: boolean) => void;\n confirm: () => void;\n // Injectat pel servei d'interacció igual que la resta; faltava des que es va afegir a la\n // interfície.\n confirmResult: (result: undefined) => void;\n cancel: () => void;\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","shellApi","ImportDataManagerModal","LitElement","css","unsafeCSS","styles","__decorateClass","customElement"],"mappings":";m8BAKaA,IAAW,CAACC,MAChBC;AAAAA;AAAAA;AAAAA;AAAAA,YAIGC,EAAU,yBAAyB,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAO7BA,EAAU,iCAAiC,CAAC;AAAA,sBACzC,MAAM;AAChB,EAAAF,EAAM,OAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA,iCAIsBG,EAAS,cAAc,QAAQ,MAAM,yBAAyB;AAAA,iCAC9DA,EAAS,cAAc,QAAQ,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,mBAI7DD,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAF,EAAM,OAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAMQE,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAF,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AClCJ,IAAMI,IAAN,cAAqCC,EAAqE;AAAA,EAA1G,cAAA;AAAA,UAAA,GAAA,SAAA,GAkBL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AArBaK,EAcJ,SAASE;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAfVJ,IAANK,EAAA;AAAA,EADNC,EAAc,2BAA2B;AAAA,GAC7BN,CAAA;"}
|
|
@@ -8878,6 +8878,29 @@ class RegionManagerProxy {
|
|
|
8878
8878
|
getCurrentMainViewActive() {
|
|
8879
8879
|
return this.regionManager.getRegion(this.regions.shell.main).currentActiveViews[0]?.id;
|
|
8880
8880
|
}
|
|
8881
|
+
/**
|
|
8882
|
+
* Totes les vistes registrades a la region main, amb el plugin que les ha registrat.
|
|
8883
|
+
*
|
|
8884
|
+
* Va pel registry del regionManager i no per `getRegion(main).currentViews`, i és a
|
|
8885
|
+
* propòsit: el registry s'omple en registrar la vista, mentre que `currentViews` només
|
|
8886
|
+
* té les que s'han afegit a un host de regió ja muntat —i `getRegion` retorna
|
|
8887
|
+
* `undefined` si la regió encara no hi és—, així que cridar-ho des de l'`initialize()`
|
|
8888
|
+
* d'un plugin donaria una llista incompleta o petaria.
|
|
8889
|
+
*
|
|
8890
|
+
* Les claus del registry són `pluginId::viewId`. El `viewId` es llegeix de la
|
|
8891
|
+
* definició, que és qui en manda; de la clau només se'n treu el prefix del plugin, que
|
|
8892
|
+
* pot no ser-hi si la vista l'ha registrada un plugin de tercers directament contra el
|
|
8893
|
+
* regionManager, sense passar per aquest proxy.
|
|
8894
|
+
*/
|
|
8895
|
+
getRegisteredMainViews() {
|
|
8896
|
+
return this.regionManager.getRegisteredViews(this.regions.shell.main).map(({ key: W, view: te }) => {
|
|
8897
|
+
const oe = W.indexOf("::"), ne = oe !== -1;
|
|
8898
|
+
return {
|
|
8899
|
+
pluginId: ne ? W.slice(0, oe) : "",
|
|
8900
|
+
viewId: te.id ?? (ne ? W.slice(oe + 2) : W)
|
|
8901
|
+
};
|
|
8902
|
+
});
|
|
8903
|
+
}
|
|
8881
8904
|
/**
|
|
8882
8905
|
* Activates a view if it is marked as default and the region currently has no active views.
|
|
8883
8906
|
*
|
|
@@ -8979,7 +9002,7 @@ class ImportDataManagerImpl {
|
|
|
8979
9002
|
async import(W, te) {
|
|
8980
9003
|
this.currentImporterId = W, this.currentImportParams = te, this.selectedItems = {}, this.pluginTexts = {};
|
|
8981
9004
|
try {
|
|
8982
|
-
const { ImportDataManagerModal: oe } = await import("./component-
|
|
9005
|
+
const { ImportDataManagerModal: oe } = await import("./component-BI9HXATX.js"), { confirmed: ne } = await this.interactionService.confirm(
|
|
8983
9006
|
void 0,
|
|
8984
9007
|
{ component: oe },
|
|
8985
9008
|
{
|
|
@@ -9082,7 +9105,7 @@ const createContextManager = () => contextManager$1 || (contextManager$1 = new P
|
|
|
9082
9105
|
let bootstrappedPlugins = [];
|
|
9083
9106
|
const CORE_FIRST_ID = "activity-history", bundledActivityHistory = {
|
|
9084
9107
|
pluginId: CORE_FIRST_ID,
|
|
9085
|
-
importer: () => import("./plugin-
|
|
9108
|
+
importer: () => import("./plugin-BPpYe_wT.js")
|
|
9086
9109
|
}, bootstrapPlugins = async (X, W) => {
|
|
9087
9110
|
const te = X ?? [], oe = te.filter((ue) => ue.pluginId === CORE_FIRST_ID), ne = te.filter((ue) => ue.pluginId !== CORE_FIRST_ID), re = oe.length ? oe : [bundledActivityHistory], de = await p$d(
|
|
9088
9111
|
re,
|
|
@@ -45550,8 +45573,8 @@ customElements.define("ux-react-web-component", i);
|
|
|
45550
45573
|
const l = (X, W, te) => (oe = {}) => Promise.resolve(new i(X, W, oe, te));
|
|
45551
45574
|
if (typeof document < "u") {
|
|
45552
45575
|
const X = document.createElement("style");
|
|
45553
|
-
X.textContent = fontsCSS
|
|
45554
|
-
|
|
45576
|
+
X.textContent = `${fontsCSS}
|
|
45577
|
+
${dssCSS}`, document.head.appendChild(X);
|
|
45555
45578
|
}
|
|
45556
45579
|
export {
|
|
45557
45580
|
initializeShell as A,
|
|
@@ -45600,4 +45623,4 @@ export {
|
|
|
45600
45623
|
createEcapEventManager as y,
|
|
45601
45624
|
ExitShell as z
|
|
45602
45625
|
};
|
|
45603
|
-
//# sourceMappingURL=index-
|
|
45626
|
+
//# sourceMappingURL=index-D9hfKjLi.js.map
|