@uxland/primary-shell 7.43.4 → 7.43.5
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-C1o_AT_S.js → component-ClU2-sev.js} +2 -2
- package/dist/{component-C1o_AT_S.js.map → component-ClU2-sev.js.map} +1 -1
- package/dist/{index-8_KLfK7r.js → index-Z7V9O2zV.js} +27 -24
- package/dist/{index-8_KLfK7r.js.map → index-Z7V9O2zV.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/package.json +2 -2
- package/src/api/region-manager/region-manager.ts +10 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { s, t as d, k as l, h as p, r as m, i as g, a as h } from "./index-
|
|
1
|
+
import { s, t as d, k as l, h as p, r as m, i as g, a as h } from "./index-Z7V9O2zV.js";
|
|
2
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:1fr 1fr;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:hidden}.content>primaria-region[name=import-data-activity-history-region]>div>*{flex-shrink:0}.content>primaria-region[name=import-data-activity-history-region]>div>*:last-child{flex:1;min-height:0}.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)}", f = (i) => l`
|
|
3
3
|
<div class="container">
|
|
4
4
|
<div class="content">
|
|
@@ -49,4 +49,4 @@ t = x([
|
|
|
49
49
|
export {
|
|
50
50
|
t as ImportDataManagerModal
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=component-
|
|
52
|
+
//# sourceMappingURL=component-ClU2-sev.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-ClU2-sev.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 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 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":";kiCAKaA,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,mBAKQG,EAAU,kCAAkC,CAAC;AAAA,oBAC5C,MAAM;AACd,EAAAH,EAAM,QAAA;AACR,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;AClBJ,IAAMI,IAAN,cAAqCC,EAAqE;AAAA,EAA1G,cAAA;AAAA,UAAA,GAAA,SAAA,GAeL,KAAA,UAAU,MAAM;AACd,WAAK,QAAA;AAAA,IACP;AAAA,EAAA;AAAA,EAVA,SAAS;AACP,WAAOJ,IAAOF,EAAS,IAAI,CAAC;AAAA,EAC9B;AASF;AAlBaK,EAWJ,SAASE;AAAAA,MACZC,EAAUC,CAAM,CAAC;AAAA;AAZVJ,IAANK,EAAA;AAAA,EADNC,EAAc,2BAA2B;AAAA,GAC7BN,CAAA;"}
|
|
@@ -2984,8 +2984,8 @@ function o$_(J) {
|
|
|
2984
2984
|
} });
|
|
2985
2985
|
};
|
|
2986
2986
|
}
|
|
2987
|
-
const
|
|
2988
|
-
let
|
|
2987
|
+
const v$k = (J) => j$2(J, p$g);
|
|
2988
|
+
let l$u = class {
|
|
2989
2989
|
constructor() {
|
|
2990
2990
|
this.viewsByRegion = {}, this.regions = {};
|
|
2991
2991
|
}
|
|
@@ -3048,13 +3048,16 @@ let c$q = class {
|
|
|
3048
3048
|
throw new Error(`Couldn't find a region with name: ${W}`);
|
|
3049
3049
|
return re.addView(X, te), this;
|
|
3050
3050
|
}
|
|
3051
|
-
registerViewWithRegion(W, X, te) {
|
|
3052
|
-
return this._viewRegistry.registerView(W, X, te),
|
|
3053
|
-
|
|
3054
|
-
|
|
3051
|
+
async registerViewWithRegion(W, X, te) {
|
|
3052
|
+
return this._viewRegistry.registerView(W, X, te), await Promise.allSettled(
|
|
3053
|
+
this._viewRegistry.getRegionsByName(W).map((re) => {
|
|
3054
|
+
if (!re.containsView(X))
|
|
3055
|
+
return re.addView(X, te);
|
|
3056
|
+
})
|
|
3057
|
+
), this;
|
|
3055
3058
|
}
|
|
3056
|
-
unregisterViewFromRegion(W, X) {
|
|
3057
|
-
return this._viewRegistry.unregisterView(W, X), this._viewRegistry.getRegionsByName(W).
|
|
3059
|
+
async unregisterViewFromRegion(W, X) {
|
|
3060
|
+
return this._viewRegistry.unregisterView(W, X), await Promise.allSettled(this._viewRegistry.getRegionsByName(W).map((te) => te.removeView(X))), this;
|
|
3058
3061
|
}
|
|
3059
3062
|
getRegisteredViews(W) {
|
|
3060
3063
|
return this._viewRegistry.getRegisteredViews(W);
|
|
@@ -3074,7 +3077,7 @@ let c$q = class {
|
|
|
3074
3077
|
}
|
|
3075
3078
|
}, w$3 = class extends g$n {
|
|
3076
3079
|
constructor(W) {
|
|
3077
|
-
const X = new
|
|
3080
|
+
const X = new l$u();
|
|
3078
3081
|
super(X), this._name = W;
|
|
3079
3082
|
}
|
|
3080
3083
|
clear() {
|
|
@@ -3084,9 +3087,9 @@ let c$q = class {
|
|
|
3084
3087
|
return super.destroy(), this._viewRegistry.destroy(), this;
|
|
3085
3088
|
}
|
|
3086
3089
|
};
|
|
3087
|
-
const
|
|
3090
|
+
const f$p = (J) => new w$3(J), c$q = (J) => J.importer(), R$4 = async (J, W, X) => {
|
|
3088
3091
|
try {
|
|
3089
|
-
const te = await
|
|
3092
|
+
const te = await c$q(J), re = W(J);
|
|
3090
3093
|
return await X(re, te), {
|
|
3091
3094
|
dispose: () => d$u(re, te),
|
|
3092
3095
|
importedPlugin: te,
|
|
@@ -9661,9 +9664,9 @@ class RegionManagerProxy {
|
|
|
9661
9664
|
* @param {HarmonixViewDefinition} view - The view definition to be registered.
|
|
9662
9665
|
* @return {Promise<void>} A promise that resolves when the view is successfully registered.
|
|
9663
9666
|
*/
|
|
9664
|
-
registerView(W, X) {
|
|
9667
|
+
async registerView(W, X) {
|
|
9665
9668
|
const te = `${this.pluginInfo.pluginId}::${X.id}`;
|
|
9666
|
-
|
|
9669
|
+
await this.regionManager.registerViewWithRegion(W, te, X), this.activateIfDefault(W, te, X);
|
|
9667
9670
|
}
|
|
9668
9671
|
/**
|
|
9669
9672
|
* Removes a view from a specific region.
|
|
@@ -9672,8 +9675,8 @@ class RegionManagerProxy {
|
|
|
9672
9675
|
* @param {string} viewId - The ID of the view to be removed.
|
|
9673
9676
|
* @return {Promise<void>} A promise that resolves when the view is successfully removed.
|
|
9674
9677
|
*/
|
|
9675
|
-
removeView(W, X) {
|
|
9676
|
-
|
|
9678
|
+
async removeView(W, X) {
|
|
9679
|
+
await this.regionManager.unregisterViewFromRegion(W, `${this.pluginInfo.pluginId}::${X}`);
|
|
9677
9680
|
}
|
|
9678
9681
|
/**
|
|
9679
9682
|
* Activates a view in a specific region.
|
|
@@ -9726,14 +9729,14 @@ class RegionManagerProxy {
|
|
|
9726
9729
|
const re = this.regionManager.getRegion(W).currentActiveViews.some((oe) => oe.id === X);
|
|
9727
9730
|
return Promise.resolve(re);
|
|
9728
9731
|
}
|
|
9729
|
-
registerQuickAction(W) {
|
|
9730
|
-
|
|
9732
|
+
async registerQuickAction(W) {
|
|
9733
|
+
await this.regionManager.registerViewWithRegion(this.regions.shell.quickActions, `${this.pluginInfo.pluginId}::${W.id}`, W);
|
|
9731
9734
|
}
|
|
9732
|
-
registerNavigationMenu(W) {
|
|
9733
|
-
|
|
9735
|
+
async registerNavigationMenu(W) {
|
|
9736
|
+
await this.regionManager.registerViewWithRegion(this.regions.shell.navigationMenu, `${this.pluginInfo.pluginId}::${W.id}`, W);
|
|
9734
9737
|
}
|
|
9735
|
-
registerMainView(W) {
|
|
9736
|
-
|
|
9738
|
+
async registerMainView(W) {
|
|
9739
|
+
await this.regionManager.registerViewWithRegion(this.regions.shell.main, `${this.pluginInfo.pluginId}::${W.id}`, W);
|
|
9737
9740
|
}
|
|
9738
9741
|
activateMainView(W) {
|
|
9739
9742
|
return this.regionManager.getRegion(this.regions.shell.main).activate(`${this.pluginInfo.pluginId}::${W}`), this._notifyMainViewChanged(W), Promise.resolve();
|
|
@@ -9836,7 +9839,7 @@ class ImportDataManagerImpl {
|
|
|
9836
9839
|
async import(W, X) {
|
|
9837
9840
|
this.currentImporterId = W, this.currentImportParams = X, this.selectedItems = {}, this.pluginTexts = {};
|
|
9838
9841
|
try {
|
|
9839
|
-
const { ImportDataManagerModal: te } = await import("./component-
|
|
9842
|
+
const { ImportDataManagerModal: te } = await import("./component-ClU2-sev.js"), { confirmed: re } = await this.interactionService.confirm(
|
|
9840
9843
|
void 0,
|
|
9841
9844
|
{ component: te },
|
|
9842
9845
|
{
|
|
@@ -9897,7 +9900,7 @@ class PrimariaContextManagerImpl {
|
|
|
9897
9900
|
}
|
|
9898
9901
|
}
|
|
9899
9902
|
let contextManager$1;
|
|
9900
|
-
const createContextManager = () => contextManager$1 || (contextManager$1 = new PrimariaContextManagerImpl(), contextManager$1), broker$1 = createBroker(), regionManager =
|
|
9903
|
+
const createContextManager = () => contextManager$1 || (contextManager$1 = new PrimariaContextManagerImpl(), contextManager$1), broker$1 = createBroker(), regionManager = f$p("primaria"), PrimariaRegionHost = v$k(regionManager), tokenManager = createTokenManager(broker$1), userManager = createUserManager(tokenManager), activityMonitor = createActivityMonitor(), sessionRefreshTimer = createSessionRefreshTimer(tokenManager, activityMonitor), globalStateManager = createGlobalStateManager(broker$1), contextManager = createContextManager(), pluginBusyManager = new PluginBusyManagerImpl(), exitGuardManager = new ExitGuardManagerImpl(), quickActionBusyManager = new QuickActionBusyManagerImpl(broker$1), interactionService = new ParimariaInteractionServiceImpl(), notificationService = new PrimariaNotificationServiceImpl(), ecapEventManager = createEcapEventManager(globalStateManager), pdfViewerManager = createPdfViewerManager(broker$1, notificationService), importDataManager = new ImportDataManagerImpl(interactionService), primariaApiFactory = (J) => {
|
|
9901
9904
|
const W = createRegionManagerProxy(J, regionManager, broker$1);
|
|
9902
9905
|
return {
|
|
9903
9906
|
pluginInfo: J,
|
|
@@ -53426,4 +53429,4 @@ export {
|
|
|
53426
53429
|
primariaApiFactory as y,
|
|
53427
53430
|
PrimariaContentSwitcher as z
|
|
53428
53431
|
};
|
|
53429
|
-
//# sourceMappingURL=index-
|
|
53432
|
+
//# sourceMappingURL=index-Z7V9O2zV.js.map
|