@uxland/primary-shell 7.47.5 → 7.48.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-C6IdTseU.js → component-DvhXFXbi.js} +13 -12
- package/dist/component-DvhXFXbi.js.map +1 -0
- package/dist/{index-C2OnQp-I.js → index-Pwqfd9a_.js} +61 -52
- package/dist/index-Pwqfd9a_.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +43 -52
- package/dist/index.umd.cjs.map +1 -1
- package/dist/{plugin-C6qd-VVE.js → plugin-GzwtrpSe.js} +517 -537
- package/dist/{plugin-C6qd-VVE.js.map → plugin-GzwtrpSe.js.map} +1 -1
- package/dist/primary/shell/src/api/region-manager/region-manager.d.ts +1 -1
- package/dist/primary/shell/src/disposer.d.ts +1 -1
- package/dist/primary/shell/src/features/bootstrapper.d.ts +1 -1
- package/package.json +1 -1
- package/src/UI/components/primaria-shell/primaria-shell.ts +3 -1
- package/src/api/import-data-manager/component/styles.css +6 -11
- package/src/api/import-data-manager/component/template.ts +1 -0
- package/src/api/region-manager/region-manager.ts +3 -3
- package/src/disposer.ts +2 -2
- package/src/features/bootstrapper.ts +2 -2
- package/src/features/exit/handler.ts +1 -1
- package/dist/component-C6IdTseU.js.map +0 -1
- package/dist/index-C2OnQp-I.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s, u as d, k as
|
|
2
|
-
const v = ".container{background-color:#fff;display:flex;flex-direction:column;min-width:500px;width:95vw;height:95vh;border-radius:var(--dss-radius-sm);overflow:hidden}.content{display:grid;flex:1;min-height:0;grid-template-columns:
|
|
1
|
+
import { s, u as d, k as c, h as p, r as g, b as m, t as h } from "./index-Pwqfd9a_.js";
|
|
2
|
+
const v = ".container{background-color:#fff;display:flex;flex-direction:column;min-width:500px;width:95vw;height:95vh;border-radius:var(--dss-radius-sm);overflow:hidden}.content{display:grid;flex:1;min-height:0;grid-template-columns:50% 50%;gap:16px;padding:16px}.content>primaria-region{width:100%;height:100%;min-height:0}.content primaria-region>div{width:100%;height:100%;border:1px solid var(--color-neutral-200);border-radius:8px;padding:16px;box-sizing:border-box}.content>primaria-region[name=import-data-region]>div{overflow-y:auto}.content>primaria-region[name=import-data-activity-history-region]>div{display:flex;flex-direction:column;gap:16px;overflow-y:auto}.content>primaria-region[name=import-data-activity-history-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)}", u = (r) => c`
|
|
3
3
|
<div class="container">
|
|
4
4
|
<div class="content">
|
|
5
5
|
<primaria-region name="${s.regionManager.regions.shell.importDataActivityHistory}"></primaria-region>
|
|
@@ -9,15 +9,16 @@ const v = ".container{background-color:#fff;display:flex;flex-direction:column;m
|
|
|
9
9
|
<dss-button
|
|
10
10
|
label="${d("importDataManager.actions.cancel")}"
|
|
11
11
|
@click="${() => {
|
|
12
|
-
|
|
12
|
+
r.cancel();
|
|
13
13
|
}}"
|
|
14
14
|
size="md"
|
|
15
15
|
variant="secondary"
|
|
16
16
|
></dss-button>
|
|
17
17
|
<dss-button
|
|
18
|
+
icon="add_circle"
|
|
18
19
|
label="${d("importDataManager.actions.import")}"
|
|
19
20
|
@click="${() => {
|
|
20
|
-
|
|
21
|
+
r._accept();
|
|
21
22
|
}}"
|
|
22
23
|
size="md"
|
|
23
24
|
variant="primary"
|
|
@@ -25,10 +26,10 @@ const v = ".container{background-color:#fff;display:flex;flex-direction:column;m
|
|
|
25
26
|
</div>
|
|
26
27
|
</div>
|
|
27
28
|
`;
|
|
28
|
-
var
|
|
29
|
-
for (var
|
|
30
|
-
(o =
|
|
31
|
-
return
|
|
29
|
+
var f = Object.getOwnPropertyDescriptor, x = (r, e, l, n) => {
|
|
30
|
+
for (var i = n > 1 ? void 0 : n ? f(e, l) : e, a = r.length - 1, o; a >= 0; a--)
|
|
31
|
+
(o = r[a]) && (i = o(i) || i);
|
|
32
|
+
return i;
|
|
32
33
|
};
|
|
33
34
|
let t = class extends p {
|
|
34
35
|
constructor() {
|
|
@@ -37,11 +38,11 @@ let t = class extends p {
|
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
40
|
render() {
|
|
40
|
-
return
|
|
41
|
+
return c`${u(this)}`;
|
|
41
42
|
}
|
|
42
43
|
};
|
|
43
|
-
t.styles =
|
|
44
|
-
${
|
|
44
|
+
t.styles = m`
|
|
45
|
+
${g(v)}
|
|
45
46
|
`;
|
|
46
47
|
t = x([
|
|
47
48
|
h("import-data-manager-modal")
|
|
@@ -49,4 +50,4 @@ t = x([
|
|
|
49
50
|
export {
|
|
50
51
|
t as ImportDataManagerModal
|
|
51
52
|
};
|
|
52
|
-
//# sourceMappingURL=component-
|
|
53
|
+
//# sourceMappingURL=component-DvhXFXbi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-DvhXFXbi.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=\"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","shellApi","translate","ImportDataManagerModal","LitElement","css","unsafeCSS","styles","__decorateClass","customElement"],"mappings":";67BAKaA,IAAW,CAACC,MAChBC;AAAAA;AAAAA;AAAAA,iCAGwBC,EAAS,cAAc,QAAQ,MAAM,yBAAyB;AAAA,iCAC9DA,EAAS,cAAc,QAAQ,MAAM,UAAU;AAAA;AAAA;AAAA;AAAA,mBAI7DC,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAH,EAAM,OAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAMQG,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAH,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;ACnBJ,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;"}
|
|
@@ -1485,7 +1485,7 @@ let o$13 = class extends l$w {
|
|
|
1485
1485
|
this.host[this.selectedProperty] === W.viewKey && (this.host[this.selectedProperty] = null, await super.deactivateView(W));
|
|
1486
1486
|
}
|
|
1487
1487
|
};
|
|
1488
|
-
const d$
|
|
1488
|
+
const d$y = (X, W) => new o$12(W), a$w = (X, W) => {
|
|
1489
1489
|
if (X = typeof X == "function" ? X() : X, !X) throw new Error(W);
|
|
1490
1490
|
}, o$11 = (X) => typeof HTMLElement == "object" ? X instanceof HTMLElement : X && typeof X == "object" && X != null && X.nodeType === 1 && typeof X.nodeName == "string", f$t = (X) => {
|
|
1491
1491
|
if (!X.htmlTag && !X.element && !X.factory) throw new Error("One of properties htmlTag, factory or element must be set");
|
|
@@ -1494,7 +1494,7 @@ const d$z = (X, W) => new o$12(W), a$w = (X, W) => {
|
|
|
1494
1494
|
let oe;
|
|
1495
1495
|
return X.element ? oe = X.element : X.factory ? oe = await X.factory() : X.htmlTag && (X.htmlUrl && await import(X.htmlUrl), oe = window.document.createElement(X.htmlTag)), oe.view = X, oe.region = W, oe.viewKey = te, oe;
|
|
1496
1496
|
};
|
|
1497
|
-
let y$
|
|
1497
|
+
let y$l = class {
|
|
1498
1498
|
constructor(W, te, oe, ne, re) {
|
|
1499
1499
|
this.name = W, this.regionManager = te, this.host = oe, this.adapter = ne, this.definition = re, this.views = {}, this.activeViews = [], this.components = /* @__PURE__ */ new WeakMap(), this.host.uxlRegion = this;
|
|
1500
1500
|
}
|
|
@@ -1572,7 +1572,7 @@ let y$k = class {
|
|
|
1572
1572
|
}
|
|
1573
1573
|
};
|
|
1574
1574
|
const e$X = "default", r$N = "dynamic";
|
|
1575
|
-
let y$
|
|
1575
|
+
let y$k = class {
|
|
1576
1576
|
constructor() {
|
|
1577
1577
|
this.adapterRegistry = /* @__PURE__ */ new Map(), this.adapterRegistry.set(r$N, []);
|
|
1578
1578
|
}
|
|
@@ -1595,7 +1595,7 @@ let y$j = class {
|
|
|
1595
1595
|
this.adapterRegistry.set(e$X, W);
|
|
1596
1596
|
}
|
|
1597
1597
|
};
|
|
1598
|
-
const p$g = new y$
|
|
1598
|
+
const p$g = new y$k(), o$10 = "__uxl_regions__", s$H = (X) => (W, te) => {
|
|
1599
1599
|
W.constructor[o$10] = { ...W.constructor[o$10], [te]: X };
|
|
1600
1600
|
}, p$f = (X, W, te) => {
|
|
1601
1601
|
const oe = te.getAdapterFactory(W);
|
|
@@ -1606,7 +1606,7 @@ const p$g = new y$j(), o$10 = "__uxl_regions__", s$H = (X) => (W, te) => {
|
|
|
1606
1606
|
if (ne) {
|
|
1607
1607
|
const re = X.adapterFactory ? X.adapterFactory(X, ne) : p$f(X, ne, oe);
|
|
1608
1608
|
a$w(re, "No region adapter found for the host");
|
|
1609
|
-
const de = X.scoped ? te.createRegionManager() : te, ce = new y$
|
|
1609
|
+
const de = X.scoped ? te.createRegionManager() : te, ce = new y$l(X.name, de, ne, re, X);
|
|
1610
1610
|
return de.add(X.name, ce), ce;
|
|
1611
1611
|
} else console.warn(`region host with id ${X.targetId} not found for region named ${X.name}`);
|
|
1612
1612
|
};
|
|
@@ -1651,7 +1651,7 @@ function r$M(X, W) {
|
|
|
1651
1651
|
}
|
|
1652
1652
|
return !1;
|
|
1653
1653
|
}
|
|
1654
|
-
function d$
|
|
1654
|
+
function d$x(X) {
|
|
1655
1655
|
return (W) => {
|
|
1656
1656
|
if (r$M(X, W)) return W;
|
|
1657
1657
|
const te = X(W);
|
|
@@ -1705,7 +1705,7 @@ const r$L = (X) => new n$D(typeof X == "string" ? X : X + "", void 0, s$G), i$R
|
|
|
1705
1705
|
* Copyright 2017 Google LLC
|
|
1706
1706
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1707
1707
|
*/
|
|
1708
|
-
const { is: i$Q, defineProperty: e$V, getOwnPropertyDescriptor: r$K, getOwnPropertyNames: h$p, getOwnPropertySymbols: o$_, getPrototypeOf: n$C } = Object, a$v = globalThis, c$q = a$v.trustedTypes, l$v = c$q ? c$q.emptyScript : "", p$e = a$v.reactiveElementPolyfillSupport, d$
|
|
1708
|
+
const { is: i$Q, defineProperty: e$V, getOwnPropertyDescriptor: r$K, getOwnPropertyNames: h$p, getOwnPropertySymbols: o$_, getPrototypeOf: n$C } = Object, a$v = globalThis, c$q = a$v.trustedTypes, l$v = c$q ? c$q.emptyScript : "", p$e = a$v.reactiveElementPolyfillSupport, d$w = (X, W) => X, u$u = { toAttribute(X, W) {
|
|
1709
1709
|
switch (W) {
|
|
1710
1710
|
case Boolean:
|
|
1711
1711
|
X = X ? l$v : null;
|
|
@@ -1733,7 +1733,7 @@ const { is: i$Q, defineProperty: e$V, getOwnPropertyDescriptor: r$K, getOwnPrope
|
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
1735
|
return te;
|
|
1736
|
-
} }, f$r = (X, W) => !i$Q(X, W), y$
|
|
1736
|
+
} }, f$r = (X, W) => !i$Q(X, W), y$j = { attribute: !0, type: String, converter: u$u, reflect: !1, hasChanged: f$r };
|
|
1737
1737
|
Symbol.metadata ??= Symbol("metadata"), a$v.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
1738
1738
|
let b$m = class extends HTMLElement {
|
|
1739
1739
|
static addInitializer(W) {
|
|
@@ -1742,7 +1742,7 @@ let b$m = class extends HTMLElement {
|
|
|
1742
1742
|
static get observedAttributes() {
|
|
1743
1743
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
1744
1744
|
}
|
|
1745
|
-
static createProperty(W, te = y$
|
|
1745
|
+
static createProperty(W, te = y$j) {
|
|
1746
1746
|
if (te.state && (te.attribute = !1), this._$Ei(), this.elementProperties.set(W, te), !te.noAccessor) {
|
|
1747
1747
|
const oe = Symbol(), ne = this.getPropertyDescriptor(W, oe, te);
|
|
1748
1748
|
ne !== void 0 && e$V(this.prototype, W, ne);
|
|
@@ -1762,16 +1762,16 @@ let b$m = class extends HTMLElement {
|
|
|
1762
1762
|
}, configurable: !0, enumerable: !0 };
|
|
1763
1763
|
}
|
|
1764
1764
|
static getPropertyOptions(W) {
|
|
1765
|
-
return this.elementProperties.get(W) ?? y$
|
|
1765
|
+
return this.elementProperties.get(W) ?? y$j;
|
|
1766
1766
|
}
|
|
1767
1767
|
static _$Ei() {
|
|
1768
|
-
if (this.hasOwnProperty(d$
|
|
1768
|
+
if (this.hasOwnProperty(d$w("elementProperties"))) return;
|
|
1769
1769
|
const W = n$C(this);
|
|
1770
1770
|
W.finalize(), W.l !== void 0 && (this.l = [...W.l]), this.elementProperties = new Map(W.elementProperties);
|
|
1771
1771
|
}
|
|
1772
1772
|
static finalize() {
|
|
1773
|
-
if (this.hasOwnProperty(d$
|
|
1774
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$
|
|
1773
|
+
if (this.hasOwnProperty(d$w("finalized"))) return;
|
|
1774
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$w("properties"))) {
|
|
1775
1775
|
const te = this.properties, oe = [...h$p(te), ...o$_(te)];
|
|
1776
1776
|
for (const ne of oe) this.createProperty(ne, te[ne]);
|
|
1777
1777
|
}
|
|
@@ -1912,7 +1912,7 @@ let b$m = class extends HTMLElement {
|
|
|
1912
1912
|
firstUpdated(W) {
|
|
1913
1913
|
}
|
|
1914
1914
|
};
|
|
1915
|
-
b$m.elementStyles = [], b$m.shadowRootOptions = { mode: "open" }, b$m[d$
|
|
1915
|
+
b$m.elementStyles = [], b$m.shadowRootOptions = { mode: "open" }, b$m[d$w("elementProperties")] = /* @__PURE__ */ new Map(), b$m[d$w("finalized")] = /* @__PURE__ */ new Map(), p$e?.({ ReactiveElement: b$m }), (a$v.reactiveElementVersions ??= []).push("2.0.4");
|
|
1916
1916
|
/**
|
|
1917
1917
|
* @license
|
|
1918
1918
|
* Copyright 2017 Google LLC
|
|
@@ -2175,7 +2175,7 @@ f$p?.({ LitElement: h$n });
|
|
|
2175
2175
|
var defaultTo = /* @__PURE__ */ _curry2(function(W, te) {
|
|
2176
2176
|
return te == null || te !== te ? W : te;
|
|
2177
2177
|
});
|
|
2178
|
-
const u$t = (X, W) => W.constructor._classProperties ? W.constructor._classProperties.get(X).hasChanged : void 0, a$u = pipe(u$t, defaultTo(f$r)), l$u = d$
|
|
2178
|
+
const u$t = (X, W) => W.constructor._classProperties ? W.constructor._classProperties.get(X).hasChanged : void 0, a$u = pipe(u$t, defaultTo(f$r)), l$u = d$x((X) => {
|
|
2179
2179
|
class W extends X {
|
|
2180
2180
|
requestUpdate(oe, ne) {
|
|
2181
2181
|
const re = super.requestUpdate ? super.requestUpdate(oe, ne) : Promise.resolve(null);
|
|
@@ -2305,7 +2305,7 @@ const v$o = new w$7(), u$s = (X) => (W) => pipe(prop(W.key), isNil)(X), q$3 = (X
|
|
|
2305
2305
|
}).catch(always(void 0)), L$7 = (X) => pipe(keys, map((W) => ({ key: W, definition: X[W] })))(X), l$t = (X) => X.constructor[o$10] || {}, H$3 = (X, W, te) => {
|
|
2306
2306
|
const oe = u$s(X), ne = q$3(X), re = T$4(X), de = w$6(X, W, te);
|
|
2307
2307
|
return (ce) => cond([[oe, de], [ne, re], [T$5, always(Promise.resolve(void 0))]])(ce);
|
|
2308
|
-
}, j$2 = (X, W) => d$
|
|
2308
|
+
}, j$2 = (X, W) => d$x((te) => {
|
|
2309
2309
|
class oe extends te {
|
|
2310
2310
|
constructor(...re) {
|
|
2311
2311
|
super(), this.enqueuer = new i$S(this.runRegionCreation.bind(this));
|
|
@@ -2426,7 +2426,7 @@ var l$s = Object.defineProperty, s$F = (X, W, te, oe) => {
|
|
|
2426
2426
|
for (var ne = void 0, re = X.length - 1, de; re >= 0; re--) (de = X[re]) && (ne = de(W, te, ne) || ne);
|
|
2427
2427
|
return ne && l$s(W, te, ne), ne;
|
|
2428
2428
|
};
|
|
2429
|
-
const d$
|
|
2429
|
+
const d$v = d$x((X) => {
|
|
2430
2430
|
class W extends l$u(X) {
|
|
2431
2431
|
activeChanged(oe, ne) {
|
|
2432
2432
|
}
|
|
@@ -2436,10 +2436,10 @@ const d$w = d$y((X) => {
|
|
|
2436
2436
|
return s$F([n$A({ type: Boolean })], W.prototype, "active"), s$F([n$A()], W.prototype, "regionContext"), W;
|
|
2437
2437
|
});
|
|
2438
2438
|
function k$6(X) {
|
|
2439
|
-
return d$
|
|
2439
|
+
return d$v(X);
|
|
2440
2440
|
}
|
|
2441
|
-
const
|
|
2442
|
-
let
|
|
2441
|
+
const f$o = (X) => j$2(X, p$g);
|
|
2442
|
+
let c$o = class {
|
|
2443
2443
|
constructor() {
|
|
2444
2444
|
this.viewsByRegion = {}, this.regions = {};
|
|
2445
2445
|
}
|
|
@@ -2478,9 +2478,7 @@ let l$r = class {
|
|
|
2478
2478
|
if (oe) {
|
|
2479
2479
|
const ne = oe.host, re = te.host;
|
|
2480
2480
|
if (ne && re && ne === re)
|
|
2481
|
-
throw ne.uxlRegion = oe, new Error(
|
|
2482
|
-
`RegionManager.add: region "${W}" already exists for the same host (idempotent rejection)`
|
|
2483
|
-
);
|
|
2481
|
+
throw ne.uxlRegion = oe, new Error(`RegionManager.add: region "${W}" already exists for the same host (idempotent rejection)`);
|
|
2484
2482
|
const de = ne;
|
|
2485
2483
|
if (de)
|
|
2486
2484
|
for (; de.firstChild; )
|
|
@@ -2516,36 +2514,47 @@ let l$r = class {
|
|
|
2516
2514
|
getRegisteredViews(W) {
|
|
2517
2515
|
return this._viewRegistry.getRegisteredViews(W);
|
|
2518
2516
|
}
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2517
|
+
/**
|
|
2518
|
+
* Treu totes les vistes de totes les regions.
|
|
2519
|
+
*
|
|
2520
|
+
* Espera cada `removeView`: son asincrons, i qui crida `clear()` normalment ho fa perque vol
|
|
2521
|
+
* que les vistes estiguin desmuntades abans de continuar. Amb un `forEach` sense esperar,
|
|
2522
|
+
* `clear()` resolia abans que cap component s'hagues desmuntat, i els cleanups dels seus
|
|
2523
|
+
* `useEffect` corrien despres del que hi hagues al darrere.
|
|
2524
|
+
*/
|
|
2525
|
+
async clear() {
|
|
2526
|
+
for (const W of Object.values(this._viewRegistry.regions)) {
|
|
2527
|
+
const te = W?.[0];
|
|
2528
|
+
if (te)
|
|
2529
|
+
for (const oe of Object.keys(te.views))
|
|
2530
|
+
await te.removeView(oe);
|
|
2531
|
+
}
|
|
2532
|
+
return this;
|
|
2523
2533
|
}
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
), this._regions = {}, this;
|
|
2534
|
+
/** Igual que `clear()`, pero a mes treu les regions. Espera el desmuntatge abans de fer-ho. */
|
|
2535
|
+
async destroy() {
|
|
2536
|
+
return await this.clear(), Object.values(this._viewRegistry.regions).forEach((W) => this.remove(W[0])), this._regions = {}, this;
|
|
2528
2537
|
}
|
|
2529
2538
|
createRegionManager() {
|
|
2530
2539
|
return new Ai(this._viewRegistry);
|
|
2531
2540
|
}
|
|
2532
2541
|
}, w$5 = class extends g$o {
|
|
2533
2542
|
constructor(W) {
|
|
2534
|
-
const te = new
|
|
2543
|
+
const te = new c$o();
|
|
2535
2544
|
super(te), this._name = W;
|
|
2536
2545
|
}
|
|
2537
|
-
clear() {
|
|
2538
|
-
return super.clear(), this._viewRegistry.clear(), this;
|
|
2546
|
+
async clear() {
|
|
2547
|
+
return await super.clear(), this._viewRegistry.clear(), this;
|
|
2539
2548
|
}
|
|
2540
|
-
destroy() {
|
|
2541
|
-
return super.destroy(), this._viewRegistry.destroy(), this;
|
|
2549
|
+
async destroy() {
|
|
2550
|
+
return await super.destroy(), this._viewRegistry.destroy(), this;
|
|
2542
2551
|
}
|
|
2543
2552
|
};
|
|
2544
|
-
const
|
|
2553
|
+
const v$n = (X) => new w$5(X), l$r = (X) => X.importer(), R$5 = async (X, W, te) => {
|
|
2545
2554
|
try {
|
|
2546
|
-
const oe = await
|
|
2555
|
+
const oe = await l$r(X), ne = W(X);
|
|
2547
2556
|
return await te(ne, oe), {
|
|
2548
|
-
dispose: () =>
|
|
2557
|
+
dispose: () => y$i(ne, oe),
|
|
2549
2558
|
importedPlugin: oe,
|
|
2550
2559
|
apiInstance: ne
|
|
2551
2560
|
};
|
|
@@ -2554,7 +2563,7 @@ const f$o = (X) => new w$5(X), c$o = (X) => X.importer(), R$5 = async (X, W, te)
|
|
|
2554
2563
|
}
|
|
2555
2564
|
}, u$r = async (X, W) => {
|
|
2556
2565
|
await W.initialize(X);
|
|
2557
|
-
},
|
|
2566
|
+
}, y$i = (X, W) => W.dispose(X), p$d = async (X, W) => {
|
|
2558
2567
|
if (!X?.length) throw new Error("No plugins to bootstrap");
|
|
2559
2568
|
return (await Promise.allSettled(X.map((te) => R$5(te, W, u$r)))).map((te) => te.status === "fulfilled" ? te.value : null);
|
|
2560
2569
|
}, primariaShellId = "primaria-shell", BROKER_EVENTS = {
|
|
@@ -8906,8 +8915,8 @@ class RegionManagerProxy {
|
|
|
8906
8915
|
await this.regionManager.unregisterViewFromRegion(W, oe);
|
|
8907
8916
|
}
|
|
8908
8917
|
}
|
|
8909
|
-
_destroy() {
|
|
8910
|
-
this.regionManager.destroy();
|
|
8918
|
+
async _destroy() {
|
|
8919
|
+
await this.regionManager.destroy();
|
|
8911
8920
|
}
|
|
8912
8921
|
}
|
|
8913
8922
|
const createRegionManagerProxy = (X, W, te) => new RegionManagerProxy(X, W, te);
|
|
@@ -8969,7 +8978,7 @@ class ImportDataManagerImpl {
|
|
|
8969
8978
|
async import(W, te) {
|
|
8970
8979
|
this.currentImporterId = W, this.currentImportParams = te, this.selectedItems = {}, this.pluginTexts = {};
|
|
8971
8980
|
try {
|
|
8972
|
-
const { ImportDataManagerModal: oe } = await import("./component-
|
|
8981
|
+
const { ImportDataManagerModal: oe } = await import("./component-DvhXFXbi.js"), { confirmed: ne } = await this.interactionService.confirm(
|
|
8973
8982
|
void 0,
|
|
8974
8983
|
{ component: oe },
|
|
8975
8984
|
{
|
|
@@ -9032,7 +9041,7 @@ class PrimariaContextManagerImpl {
|
|
|
9032
9041
|
}
|
|
9033
9042
|
}
|
|
9034
9043
|
let contextManager$1;
|
|
9035
|
-
const createContextManager = () => contextManager$1 || (contextManager$1 = new PrimariaContextManagerImpl(), contextManager$1), broker = createBroker(), regionManager =
|
|
9044
|
+
const createContextManager = () => contextManager$1 || (contextManager$1 = new PrimariaContextManagerImpl(), contextManager$1), broker = createBroker(), regionManager = v$n("primaria"), PrimariaRegionHost = f$o(regionManager), tokenManager = createTokenManager(broker), userManager = createUserManager(tokenManager), activityMonitor = createActivityMonitor(), sessionRefreshTimer = createSessionRefreshTimer(tokenManager, activityMonitor), globalStateManager = createGlobalStateManager(broker), contextManager = createContextManager(), pluginBusyManager = new PluginBusyManagerImpl(), exitGuardManager = new ExitGuardManagerImpl(), quickActionBusyManager = new QuickActionBusyManagerImpl(broker), interactionService = new ParimariaInteractionServiceImpl(), notificationService = new PrimariaNotificationServiceImpl(), ecapEventManager = createEcapEventManager(globalStateManager), pdfViewerManager = createPdfViewerManager(broker, notificationService), importDataManager = new ImportDataManagerImpl(interactionService), primariaApiFactory = (X) => {
|
|
9036
9045
|
const W = createRegionManagerProxy(X, regionManager, broker);
|
|
9037
9046
|
return {
|
|
9038
9047
|
pluginInfo: X,
|
|
@@ -9072,7 +9081,7 @@ const createContextManager = () => contextManager$1 || (contextManager$1 = new P
|
|
|
9072
9081
|
let bootstrappedPlugins = [];
|
|
9073
9082
|
const CORE_FIRST_ID = "activity-history", bundledActivityHistory = {
|
|
9074
9083
|
pluginId: CORE_FIRST_ID,
|
|
9075
|
-
importer: () => import("./plugin-
|
|
9084
|
+
importer: () => import("./plugin-GzwtrpSe.js")
|
|
9076
9085
|
}, bootstrapPlugins = async (X, W) => {
|
|
9077
9086
|
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(
|
|
9078
9087
|
re,
|
|
@@ -9110,7 +9119,7 @@ let ExitShellHandler = class {
|
|
|
9110
9119
|
// S'intenta executar un dispose normal
|
|
9111
9120
|
this.timeout(1e4)
|
|
9112
9121
|
// Si passen 5s, es segueix amb l'execució
|
|
9113
|
-
]), disposeShell(), this.emitClose(W);
|
|
9122
|
+
]), await disposeShell(), this.emitClose(W);
|
|
9114
9123
|
} catch {
|
|
9115
9124
|
this.api.notificationService.error(translate("errors.exit")), this.emitClose(W);
|
|
9116
9125
|
}
|
|
@@ -9230,10 +9239,10 @@ const useGetUserInfo = (X) => {
|
|
|
9230
9239
|
request?.dispose(), unregisterDep(GetUserInfoBackendAdapter);
|
|
9231
9240
|
}, useFeatures = (X) => {
|
|
9232
9241
|
container.bind(TYPES.primaryApi).toConstantValue(X), useGetUserInfo(X), useExitShell(X), X.broker.send(new GetUserInfo());
|
|
9233
|
-
}, disposeFeatures = (X) => {
|
|
9234
|
-
disposeGetUserInfo(), disposeExitShell(), container.unbindAll(), X.regionManager._destroy(), X.broker._clear();
|
|
9235
|
-
}, disposeShell = () => {
|
|
9236
|
-
disposeFeatures(shellApi), shellApi.interactionService.dispose(), sessionRefreshTimer.stop(), activityMonitor.stop();
|
|
9242
|
+
}, disposeFeatures = async (X) => {
|
|
9243
|
+
disposeGetUserInfo(), disposeExitShell(), container.unbindAll(), await X.regionManager._destroy(), X.broker._clear();
|
|
9244
|
+
}, disposeShell = async () => {
|
|
9245
|
+
await disposeFeatures(shellApi), shellApi.interactionService.dispose(), sessionRefreshTimer.stop(), activityMonitor.stop();
|
|
9237
9246
|
}, raiseCloseEvent = () => {
|
|
9238
9247
|
shellApi.ecapEventManager.publish("CLOSE_FORM", "", {});
|
|
9239
9248
|
}, raiseCustomCloseEvent = (X) => {
|
|
@@ -45512,7 +45521,7 @@ const commonNavMenuItems = [
|
|
|
45512
45521
|
}, useUI = () => {
|
|
45513
45522
|
p$g.registerAdapterFactory(
|
|
45514
45523
|
"primaria-content-switcher",
|
|
45515
|
-
d$
|
|
45524
|
+
d$y
|
|
45516
45525
|
), useSharedUI(), useComponents(), useInternalViews();
|
|
45517
45526
|
}, initializeShell = (X, W) => {
|
|
45518
45527
|
W && shellApi.contextManager.initializeContext(W), activityMonitor.start(), sessionRefreshTimer.start(), useLocalization(shellApi), useUI(), useFeatures(shellApi);
|
|
@@ -45590,4 +45599,4 @@ export {
|
|
|
45590
45599
|
createEcapEventManager as y,
|
|
45591
45600
|
ExitShell as z
|
|
45592
45601
|
};
|
|
45593
|
-
//# sourceMappingURL=index-
|
|
45602
|
+
//# sourceMappingURL=index-Pwqfd9a_.js.map
|