@uxland/primary-shell 7.24.0 → 7.26.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-DT2_qIuh.js → component-DAfsWaZG.js} +2 -2
- package/dist/{component-DT2_qIuh.js.map → component-DAfsWaZG.js.map} +1 -1
- package/dist/{index-DrsrlStl.js → index-wb2eijet.js} +22 -10
- package/dist/index-wb2eijet.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +7 -5
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/index-DrsrlStl.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-wb2eijet.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-DAfsWaZG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-DAfsWaZG.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;"}
|
|
@@ -9787,7 +9787,7 @@ class ImportDataManagerImpl {
|
|
|
9787
9787
|
async import(W) {
|
|
9788
9788
|
this.currentImporterId = W, this.selectedItems = {}, this.pluginTexts = {};
|
|
9789
9789
|
try {
|
|
9790
|
-
const { ImportDataManagerModal: X } = await import("./component-
|
|
9790
|
+
const { ImportDataManagerModal: X } = await import("./component-DAfsWaZG.js"), { confirmed: te } = await this.interactionService.confirm(
|
|
9791
9791
|
void 0,
|
|
9792
9792
|
{ component: X },
|
|
9793
9793
|
{
|
|
@@ -11386,6 +11386,8 @@ BaseHandler = __decorateClass$u([
|
|
|
11386
11386
|
__decorateParam$5(1, inject(TYPES.primaryApi))
|
|
11387
11387
|
], BaseHandler);
|
|
11388
11388
|
const { addBusyHistoryItem, removeBusyHistoryItem } = activityHistoryCollectionsSlice.actions, { addErrorHistoryItem, removeErrorHistoryItem } = activityHistoryCollectionsSlice.actions, validateAddAsyncCommand = (J, W) => {
|
|
11389
|
+
if (!J.filters)
|
|
11390
|
+
throw new Error("filters is required");
|
|
11389
11391
|
if (J.entityId !== J.filters.id)
|
|
11390
11392
|
throw new Error("entityId and filters.id must be the same");
|
|
11391
11393
|
if (!J.filters.title)
|
|
@@ -11396,7 +11398,7 @@ const { addBusyHistoryItem, removeBusyHistoryItem } = activityHistoryCollections
|
|
|
11396
11398
|
throw new Error("componentFactory is required");
|
|
11397
11399
|
if (!J.errorMessage)
|
|
11398
11400
|
throw new Error("errorMessage is required for failure asyncDataProviders");
|
|
11399
|
-
if (
|
|
11401
|
+
if (W == null)
|
|
11400
11402
|
throw new Error("items is required");
|
|
11401
11403
|
if (!Array.isArray(W))
|
|
11402
11404
|
throw new Error("items must be an array");
|
|
@@ -11415,7 +11417,7 @@ class InjectAsyncHistoryItemsHandler extends BaseHandler {
|
|
|
11415
11417
|
filters: W.filters
|
|
11416
11418
|
});
|
|
11417
11419
|
} catch (X) {
|
|
11418
|
-
this.store.dispatch(
|
|
11420
|
+
console.error(X.message), this.store.dispatch(
|
|
11419
11421
|
addErrorHistoryItem({
|
|
11420
11422
|
entityId: W.entityId,
|
|
11421
11423
|
message: W.errorMessage || X.message,
|
|
@@ -11599,19 +11601,21 @@ class AddHistoryItemsHandler extends BaseHandler {
|
|
|
11599
11601
|
const X = validateAndFilterBasicItems(W.items), te = this.filterDuplicateItems(X, W.entityId);
|
|
11600
11602
|
if (!this.store.getState().activityHistoryFilters?.filters?.find((ne) => ne.id === W.entityId) && !W.filters)
|
|
11601
11603
|
throw new Error(translate("error.filterNotInitialized"));
|
|
11602
|
-
te.length > 0 &&
|
|
11604
|
+
te.length > 0 && handleAddUpFilter(te, this.store), this.store.dispatch(
|
|
11603
11605
|
addActivityHistoryItems({
|
|
11604
11606
|
id: W.entityId,
|
|
11605
11607
|
items: te,
|
|
11606
11608
|
componentFactory: W.componentFactory,
|
|
11607
11609
|
searchPredicate: W.searchPredicate
|
|
11608
11610
|
})
|
|
11609
|
-
), W.filters && this.api.broker.send(new AddCustomFiltersCommand(W.filters))
|
|
11611
|
+
), W.filters && this.api.broker.send(new AddCustomFiltersCommand(W.filters));
|
|
11610
11612
|
} catch (X) {
|
|
11611
11613
|
this.api.notificationService.error(X.message);
|
|
11612
11614
|
}
|
|
11613
11615
|
}
|
|
11614
11616
|
filterDuplicateItems(W, X) {
|
|
11617
|
+
if (W.length === 0)
|
|
11618
|
+
return [];
|
|
11615
11619
|
const te = this.store.getState(), re = W.filter(
|
|
11616
11620
|
(oe) => !existItemInCollection(te.activityHistoryCollections?.collections, X, oe.id)
|
|
11617
11621
|
);
|
|
@@ -12074,6 +12078,9 @@ const activityHistoryCollectionsSelector = (J) => J.activityHistoryCollections.c
|
|
|
12074
12078
|
}))
|
|
12075
12079
|
};
|
|
12076
12080
|
})
|
|
12081
|
+
), customFilterGroupsWithOptionsAvailableSelector = createSelector(
|
|
12082
|
+
customFilterGroupsWithOptionsSelector,
|
|
12083
|
+
(J) => J.filter((W) => !W.filters || W.filters.length === 0 ? !1 : W.filters.some((X) => X.singleOption ? !0 : X.options && X.options.length > 0))
|
|
12077
12084
|
), activityHistoryGroupedItems = createSelector(
|
|
12078
12085
|
activityHistoryMappedItems,
|
|
12079
12086
|
activityHistorySearchStringSelector,
|
|
@@ -12113,7 +12120,7 @@ class SetUpFiltersCommand {
|
|
|
12113
12120
|
this.payload = W;
|
|
12114
12121
|
}
|
|
12115
12122
|
}
|
|
12116
|
-
const styles$i = ".filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,189);width:56px;height:100%;box-sizing:border-box;display:flex;flex-direction:column}.filters-sidebar dss-icon-button{align-self:center}.filters-sidebar[expanded]{width:296px}.filters-sidebar[expanded] .filters-sidebar-opened{display:flex;align-items:center;justify-content:space-between;padding-inline:8px;color:var(--color-neutral-900);font-weight:700;font-size:16px;line-height:24px}.filter-container{display:flex;flex-direction:column;padding:16px 8px 8px;overflow:auto}.filter-container .filter{padding:8px 0;border-bottom:1px solid var(--color-neutral-200)}.filter-group{display:flex;flex-direction:column;padding-top:12px;gap:var(--dss-spacing-xs)}.filter-group
|
|
12123
|
+
const styles$i = ".filters-sidebar{padding:8px 4px;border-right:1px solid rgb(189,189,189);width:56px;height:100%;box-sizing:border-box;display:flex;flex-direction:column}.filters-sidebar dss-icon-button{align-self:center}.filters-sidebar[expanded]{width:296px}.filters-sidebar[expanded] .filters-sidebar-opened{display:flex;align-items:center;justify-content:space-between;padding-inline:8px;color:var(--color-neutral-900);font-weight:700;font-size:16px;line-height:24px}.filter-container{display:flex;flex-direction:column;padding:16px 8px 8px;overflow:auto}.filter-container .filter{padding:8px 0;border-bottom:1px solid var(--color-neutral-200)}.filter-group{display:flex;flex-direction:column;padding-top:12px;gap:var(--dss-spacing-xs);padding-bottom:12px;border-bottom:1px solid var(--color-neutral-200)}.filter-group:last-of-type{border:none}.custom-subfilters-container{display:flex;flex-direction:column;padding-left:16px;gap:12px}.custom-subfilters-container .custom-filter-content{display:flex;flex-direction:column;gap:8px}";
|
|
12117
12124
|
/**
|
|
12118
12125
|
* @license
|
|
12119
12126
|
* Copyright 2021 Google LLC
|
|
@@ -12166,7 +12173,12 @@ const filterTemplates = {
|
|
|
12166
12173
|
<input slot="input" id="switch-${W.id}" aria-label=${W.title} type="checkbox">
|
|
12167
12174
|
<label slot="label" for="switch-${W.id}">${W.title}</label>
|
|
12168
12175
|
</dss-input-switch>
|
|
12169
|
-
|
|
12176
|
+
<div class="custom-subfilters-container">
|
|
12177
|
+
${W?.filters && Qt(
|
|
12178
|
+
W.filters,
|
|
12179
|
+
(X) => customFilterTemplate(X, J, W)
|
|
12180
|
+
)}
|
|
12181
|
+
</div>
|
|
12170
12182
|
</div> `
|
|
12171
12183
|
)}
|
|
12172
12184
|
</div> ` : ke$1`<dss-icon-button @click=${() => J._toggleFilters()} size="md" variant="primary" icon="keyboard_double_arrow_right"></dss-icon-button>`}
|
|
@@ -12198,7 +12210,7 @@ const filterTemplates = {
|
|
|
12198
12210
|
!!J.options?.length,
|
|
12199
12211
|
() => ke$1`
|
|
12200
12212
|
<primaria-accordion isOpen>
|
|
12201
|
-
<
|
|
12213
|
+
<dss-typography slot="title" tag="p" variant="body-3" fontweight="regular">${J.title}</dss-typography>
|
|
12202
12214
|
<div class="custom-filter-content" slot="content">
|
|
12203
12215
|
${J.options.map(
|
|
12204
12216
|
(te) => getFilterTemplate(J, W._onChangeCustomFilterValue.bind(W), X, te)
|
|
@@ -12263,7 +12275,7 @@ __decorateClass$r([
|
|
|
12263
12275
|
connectedProperty(activityHistoryCommonFiltersSelector)
|
|
12264
12276
|
], ActivityHistoryFilters.prototype, "commonFilters", 2);
|
|
12265
12277
|
__decorateClass$r([
|
|
12266
|
-
connectedProperty(
|
|
12278
|
+
connectedProperty(customFilterGroupsWithOptionsAvailableSelector)
|
|
12267
12279
|
], ActivityHistoryFilters.prototype, "customFilterGroups", 2);
|
|
12268
12280
|
__decorateClass$r([
|
|
12269
12281
|
connectedProperty(diagnosticFilterSelector)
|
|
@@ -48919,4 +48931,4 @@ export {
|
|
|
48919
48931
|
l as x,
|
|
48920
48932
|
PrimariaInteractionService as y
|
|
48921
48933
|
};
|
|
48922
|
-
//# sourceMappingURL=index-
|
|
48934
|
+
//# sourceMappingURL=index-wb2eijet.js.map
|