@uxland/primary-shell 7.38.0 → 7.38.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-BnGIF_Io.js → component-CbmKzb7Q.js} +2 -2
- package/dist/{component-BnGIF_Io.js.map → component-CbmKzb7Q.js.map} +1 -1
- package/dist/{index-CqHIFgjZ.js → index-C4OkWbYs.js} +25 -7
- package/dist/{index-CqHIFgjZ.js.map → index-C4OkWbYs.js.map} +1 -1
- 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/UI/shared-components/primaria-region/primaria-region.d.ts +7 -0
- package/dist/primary/shell/src/api/ecap-event-manager/typings.d.ts +1 -1
- package/package.json +1 -1
- package/src/UI/shared-components/primaria-region/primaria-region.ts +17 -4
- package/src/api/ecap-event-manager/ecap-event-manager.ts +1 -1
- package/src/api/ecap-event-manager/typings.ts +1 -1
- package/src/api/region-manager/region-manager.ts +24 -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-C4OkWbYs.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-CbmKzb7Q.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-CbmKzb7Q.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;"}
|
|
@@ -3500,7 +3500,7 @@ class EcapEventManagerImpl {
|
|
|
3500
3500
|
}
|
|
3501
3501
|
publish(W, J, te) {
|
|
3502
3502
|
const re = this.createEcapEvent(W, J, te ?? {});
|
|
3503
|
-
EVENTS_WITH_DIAGNOSTICS.includes(W) && (re.
|
|
3503
|
+
EVENTS_WITH_DIAGNOSTICS.includes(W) && (re.DIAGNOSTICS = this.globalStateManager.getData(LAST_WORKED_DIAGNOSTICS_KEY) ?? []), this.raiseEcapEvent(re);
|
|
3504
3504
|
}
|
|
3505
3505
|
createEcapEvent(W, J, te) {
|
|
3506
3506
|
return {
|
|
@@ -9567,7 +9567,8 @@ class RegionManagerProxy {
|
|
|
9567
9567
|
* @return {Promise<void>} A promise that resolves when the view is successfully registered.
|
|
9568
9568
|
*/
|
|
9569
9569
|
registerView(W, J) {
|
|
9570
|
-
|
|
9570
|
+
const te = `${this.pluginInfo.pluginId}::${J.id}`;
|
|
9571
|
+
return this.regionManager.registerViewWithRegion(W, te, J), this.activateIfDefault(W, te, J), Promise.resolve();
|
|
9571
9572
|
}
|
|
9572
9573
|
/**
|
|
9573
9574
|
* Removes a view from a specific region.
|
|
@@ -9645,6 +9646,20 @@ class RegionManagerProxy {
|
|
|
9645
9646
|
getCurrentMainViewActive() {
|
|
9646
9647
|
return this.regionManager.getRegion(this.regions.shell.main).currentActiveViews[0]?.id;
|
|
9647
9648
|
}
|
|
9649
|
+
/**
|
|
9650
|
+
* Activates a view if it is marked as default and the region currently has no active views.
|
|
9651
|
+
*
|
|
9652
|
+
* @param {string} regionName - The name of the region to activate the view in.
|
|
9653
|
+
* @param {string} key - The key of the view to activate.
|
|
9654
|
+
* @param {HarmonixViewDefinition} view - The view to activate.
|
|
9655
|
+
* @return {void}
|
|
9656
|
+
*/
|
|
9657
|
+
activateIfDefault(W, J, te) {
|
|
9658
|
+
if (!te.isDefault) return;
|
|
9659
|
+
const re = this.regionManager.getRegion(W);
|
|
9660
|
+
if (!re || typeof re.activate != "function") return;
|
|
9661
|
+
re.currentActiveViews?.length > 0 || re.activate(J);
|
|
9662
|
+
}
|
|
9648
9663
|
_notifyMainViewChanged(W) {
|
|
9649
9664
|
this.broker.publish(BROKER_EVENTS.shell.mainViewChanged, { viewId: W });
|
|
9650
9665
|
}
|
|
@@ -9710,7 +9725,7 @@ class ImportDataManagerImpl {
|
|
|
9710
9725
|
async import(W) {
|
|
9711
9726
|
this.currentImporterId = W, this.selectedItems = {}, this.pluginTexts = {};
|
|
9712
9727
|
try {
|
|
9713
|
-
const { ImportDataManagerModal: J } = await import("./component-
|
|
9728
|
+
const { ImportDataManagerModal: J } = await import("./component-CbmKzb7Q.js"), { confirmed: te } = await this.interactionService.confirm(
|
|
9714
9729
|
void 0,
|
|
9715
9730
|
{ component: J },
|
|
9716
9731
|
{
|
|
@@ -51098,7 +51113,7 @@ var __defProp$2 = Object.defineProperty, __decorateClass$2 = (X, W, J, te) => {
|
|
|
51098
51113
|
};
|
|
51099
51114
|
class PrimariaRegion extends PrimariaRegionHost(h$p) {
|
|
51100
51115
|
constructor() {
|
|
51101
|
-
super(), this.name = "", this._instanceConstructor = Object.create(this.constructor), Object.defineProperty(this, "constructor", {
|
|
51116
|
+
super(), this.name = "", this.mode = "multi", this._instanceConstructor = Object.create(this.constructor), Object.defineProperty(this, "constructor", {
|
|
51102
51117
|
get: () => this._instanceConstructor,
|
|
51103
51118
|
configurable: !0
|
|
51104
51119
|
});
|
|
@@ -51124,8 +51139,8 @@ class PrimariaRegion extends PrimariaRegionHost(h$p) {
|
|
|
51124
51139
|
*/
|
|
51125
51140
|
connectedCallback() {
|
|
51126
51141
|
if (h$p.prototype.connectedCallback.call(this), this.name) {
|
|
51127
|
-
const W = `${this.name}-container`, J = document.createElement("div");
|
|
51128
|
-
J.id = W, J.style.cssText = "width: 100%; height: 100%; min-height: 1px", this.appendChild(J), this._instanceConstructor[o$17] = {
|
|
51142
|
+
const W = `${this.name}-container`, J = this.mode === "single" ? document.createElement("primaria-content-switcher") : document.createElement("div");
|
|
51143
|
+
J.id = W, this.mode !== "single" && (J.style.cssText = "width: 100%; height: 100%; min-height: 1px"), this.appendChild(J), this._instanceConstructor[o$17] = {
|
|
51129
51144
|
...this._instanceConstructor[o$17],
|
|
51130
51145
|
region: { targetId: W, name: this.name }
|
|
51131
51146
|
}, this.create && this.create();
|
|
@@ -51157,6 +51172,9 @@ class PrimariaRegion extends PrimariaRegionHost(h$p) {
|
|
|
51157
51172
|
__decorateClass$2([
|
|
51158
51173
|
n$y({ type: String })
|
|
51159
51174
|
], PrimariaRegion.prototype, "name");
|
|
51175
|
+
__decorateClass$2([
|
|
51176
|
+
n$y({ type: String })
|
|
51177
|
+
], PrimariaRegion.prototype, "mode");
|
|
51160
51178
|
const useSharedUI = () => {
|
|
51161
51179
|
t$w("primaria-content-switcher")(PrimariaContentSwitcher), t$w("primaria-nav-item")(PrimariaNavItem), t$w("primaria-rich-text-editor")(PrimariaRichTextEditor), t$w("primaria-nav-tree-menu")(PrimariaNavTreeMenu), t$w("primaria-character-limit-badge")(PrimariaCharacterLimitBadge), t$w("primaria-region")(PrimariaRegion);
|
|
51162
51180
|
}, registerPdfViewerNavItem = () => {
|
|
@@ -51944,4 +51962,4 @@ export {
|
|
|
51944
51962
|
l as y,
|
|
51945
51963
|
PrimariaInteractionService as z
|
|
51946
51964
|
};
|
|
51947
|
-
//# sourceMappingURL=index-
|
|
51965
|
+
//# sourceMappingURL=index-C4OkWbYs.js.map
|