@uxland/primary-shell 7.29.6 → 7.29.12
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-DIEgkBBL.js → component-ArjwXoXT.js} +2 -2
- package/dist/{component-DIEgkBBL.js.map → component-ArjwXoXT.js.map} +1 -1
- package/dist/{index-CBLcIQsk.js → index-CRH7Fdpk.js} +153 -139
- package/dist/index-CRH7Fdpk.js.map +1 -0
- package/dist/index.js +16 -17
- package/dist/index.umd.cjs +48 -49
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu.d.ts +1 -1
- package/dist/primary/shell/src/api/broker/broker-events.d.ts +10 -0
- package/dist/primary/shell/src/index.d.ts +0 -1
- package/package.json +2 -2
- package/src/UI/components/clinical-pathways-action-menu/styles.css +4 -0
- package/src/UI/components/communication-action-menu/styles.css +4 -0
- package/src/UI/components/navigation-tooltip/tooltip-manager.ts +3 -3
- package/src/UI/components/primaria-shell/primaria-shell.ts +10 -10
- package/src/UI/shared-components/primaria-nav-item/primaria-nav-item.ts +2 -2
- package/src/UI/shared-components/primaria-nav-item/styles.css +4 -0
- package/src/UI/shared-components/primaria-nav-item/template.ts +3 -4
- package/src/UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu.ts +6 -5
- package/src/UI/shared-components/primaria-nav-tree-menu/template.ts +35 -39
- package/src/api/broker/broker-events.ts +10 -0
- package/src/api/http-client/http-client.test.ts +6 -6
- package/src/api/http-client/http-client.ts +3 -3
- package/src/api/quick-action-busy-manager/quick-action-busy-manager.test.ts +3 -3
- package/src/api/quick-action-busy-manager/quick-action-busy-manager.ts +2 -2
- package/src/api/region-manager/region-manager.test.ts +3 -3
- package/src/api/region-manager/region-manager.ts +2 -2
- package/src/features/visit/finalize-visit/component/template.ts +2 -2
- package/src/index.ts +0 -1
- package/dist/index-CBLcIQsk.js.map +0 -1
- package/dist/primary/shell/src/events.d.ts +0 -9
- package/src/events.ts +0 -9
|
@@ -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-CRH7Fdpk.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-ArjwXoXT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-ArjwXoXT.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;"}
|
|
@@ -3370,7 +3370,17 @@ const BROKER_EVENTS = {
|
|
|
3370
3370
|
injectAsyncHistoryItemsRequest: "inject_async_history_items_request",
|
|
3371
3371
|
addHistoryItemRequest: "add_history_item_request",
|
|
3372
3372
|
addHistoryItemsRequest: "add_history_items_request",
|
|
3373
|
-
updateHistoryItemRequest: "update_history_item_request"
|
|
3373
|
+
updateHistoryItemRequest: "update_history_item_request",
|
|
3374
|
+
removeHistoryItemRequest: "remove_history_item_request"
|
|
3375
|
+
},
|
|
3376
|
+
shell: {
|
|
3377
|
+
appCrashed: "appCrashed",
|
|
3378
|
+
mainViewChanged: "mainViewChanged",
|
|
3379
|
+
refreshTokenFailed: "refreshTokenFailed",
|
|
3380
|
+
mpidHeaderInvalid: "mpidHeaderInvalid",
|
|
3381
|
+
quickActionBusyChanged: "quickActionBusyChanged",
|
|
3382
|
+
scrollToNavItemRequested: "scrollToNavItemRequested",
|
|
3383
|
+
scrollToNavItemCompleted: "scrollToNavItemCompleted"
|
|
3374
3384
|
}
|
|
3375
3385
|
}, disposableFactory = (J) => ({
|
|
3376
3386
|
dispose: () => {
|
|
@@ -5271,15 +5281,7 @@ const {
|
|
|
5271
5281
|
formToJSON,
|
|
5272
5282
|
getAdapter,
|
|
5273
5283
|
mergeConfig: mergeConfig$1
|
|
5274
|
-
} = axios
|
|
5275
|
-
appCrashed: "appCrashed",
|
|
5276
|
-
mainViewChanged: "mainViewChanged",
|
|
5277
|
-
refreshTokenFailed: "refreshTokenFailed",
|
|
5278
|
-
mpidHeaderInvalid: "mpidHeaderInvalid",
|
|
5279
|
-
quickActionBusyChanged: "quickActionBusyChanged",
|
|
5280
|
-
scrollToNavItemRequested: "scrollToNavItemRequested",
|
|
5281
|
-
scrollToNavItemCompleted: "scrollToNavItemCompleted"
|
|
5282
|
-
};
|
|
5284
|
+
} = axios;
|
|
5283
5285
|
class InvalidTokenError extends Error {
|
|
5284
5286
|
}
|
|
5285
5287
|
InvalidTokenError.prototype.name = "InvalidTokenError";
|
|
@@ -5353,7 +5355,7 @@ const validateMpidHeader = (J, W) => {
|
|
|
5353
5355
|
try {
|
|
5354
5356
|
return X && validateMpidHeader(re, J), re;
|
|
5355
5357
|
} catch (oe) {
|
|
5356
|
-
return oe instanceof InvalidMpidHeaderError && W.publish(
|
|
5358
|
+
return oe instanceof InvalidMpidHeaderError && W.publish(BROKER_EVENTS.shell.mpidHeaderInvalid, {
|
|
5357
5359
|
request: re.config
|
|
5358
5360
|
}), Promise.reject(oe);
|
|
5359
5361
|
}
|
|
@@ -5366,7 +5368,7 @@ const validateMpidHeader = (J, W) => {
|
|
|
5366
5368
|
const ne = await J.refreshToken();
|
|
5367
5369
|
return oe.headers.Authorization = `Bearer ${ne}`, te(oe);
|
|
5368
5370
|
} catch (ne) {
|
|
5369
|
-
return console.error("Error refreshing token:", ne), W.publish(
|
|
5371
|
+
return console.error("Error refreshing token:", ne), W.publish(BROKER_EVENTS.shell.refreshTokenFailed, {
|
|
5370
5372
|
request: oe
|
|
5371
5373
|
}), Promise.reject(re);
|
|
5372
5374
|
}
|
|
@@ -9439,12 +9441,12 @@ const renderNavigationTooltip = (J, W) => {
|
|
|
9439
9441
|
}, 2500);
|
|
9440
9442
|
}, scrollToNavItem = (J) => new Promise((W) => {
|
|
9441
9443
|
const X = shellApi.broker.subscribe(
|
|
9442
|
-
|
|
9444
|
+
BROKER_EVENTS.shell.scrollToNavItemCompleted,
|
|
9443
9445
|
(te) => {
|
|
9444
9446
|
X.dispose(), W(te);
|
|
9445
9447
|
}
|
|
9446
9448
|
);
|
|
9447
|
-
shellApi.broker.publish(
|
|
9449
|
+
shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemRequested, J), setTimeout(() => {
|
|
9448
9450
|
X.dispose(), W({ scrollTop: 0, containerTop: 0, itemIndex: -1, itemAbsoluteY: window.innerHeight / 2 });
|
|
9449
9451
|
}, 1e3);
|
|
9450
9452
|
}), showNavItemTooltip = async (J, W) => {
|
|
@@ -9540,7 +9542,7 @@ class QuickActionBusyManagerImpl {
|
|
|
9540
9542
|
}
|
|
9541
9543
|
emitBusyChanged() {
|
|
9542
9544
|
const W = this.isBusy();
|
|
9543
|
-
this.broker.publish(
|
|
9545
|
+
this.broker.publish(BROKER_EVENTS.shell.quickActionBusyChanged, { busy: W });
|
|
9544
9546
|
}
|
|
9545
9547
|
}
|
|
9546
9548
|
const shellRegions = {
|
|
@@ -9657,7 +9659,7 @@ class RegionManagerProxy {
|
|
|
9657
9659
|
return this.regionManager.getRegion(this.regions.shell.main).currentActiveViews[0]?.id;
|
|
9658
9660
|
}
|
|
9659
9661
|
_notifyMainViewChanged(W) {
|
|
9660
|
-
this.broker.publish(
|
|
9662
|
+
this.broker.publish(BROKER_EVENTS.shell.mainViewChanged, { viewId: W });
|
|
9661
9663
|
}
|
|
9662
9664
|
_destroy() {
|
|
9663
9665
|
this.regionManager.destroy();
|
|
@@ -9721,7 +9723,7 @@ class ImportDataManagerImpl {
|
|
|
9721
9723
|
async import(W) {
|
|
9722
9724
|
this.currentImporterId = W, this.selectedItems = {}, this.pluginTexts = {};
|
|
9723
9725
|
try {
|
|
9724
|
-
const { ImportDataManagerModal: X } = await import("./component-
|
|
9726
|
+
const { ImportDataManagerModal: X } = await import("./component-ArjwXoXT.js"), { confirmed: te } = await this.interactionService.confirm(
|
|
9725
9727
|
void 0,
|
|
9726
9728
|
{ component: X },
|
|
9727
9729
|
{
|
|
@@ -11791,6 +11793,26 @@ class CustomFilterSpec extends Spec {
|
|
|
11791
11793
|
return W.type === X.id;
|
|
11792
11794
|
}
|
|
11793
11795
|
}
|
|
11796
|
+
class DiagnosticCodeSpec extends Spec {
|
|
11797
|
+
constructor(W) {
|
|
11798
|
+
super(), this.diagnosticCodes = this.extractAllCodes(W);
|
|
11799
|
+
}
|
|
11800
|
+
extractAllCodes(W) {
|
|
11801
|
+
const X = /* @__PURE__ */ new Set();
|
|
11802
|
+
for (const te of W) {
|
|
11803
|
+
if (te.codi && X.add(te.codi), te.evolucions && Array.isArray(te.evolucions))
|
|
11804
|
+
for (const re of te.evolucions)
|
|
11805
|
+
re.codi && X.add(re.codi);
|
|
11806
|
+
if (te.relacions && Array.isArray(te.relacions))
|
|
11807
|
+
for (const re of te.relacions)
|
|
11808
|
+
re.codi && X.add(re.codi);
|
|
11809
|
+
}
|
|
11810
|
+
return Array.from(X);
|
|
11811
|
+
}
|
|
11812
|
+
isSatisfiedBy(W) {
|
|
11813
|
+
return this.diagnosticCodes?.length ? (W.diagnostics ?? []).some((te) => this.diagnosticCodes.includes(te.codi)) : !0;
|
|
11814
|
+
}
|
|
11815
|
+
}
|
|
11794
11816
|
const normalizeStringToNFD = (J) => J == null ? "" : String(J).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLocaleLowerCase(), propContainsString = (J, W) => {
|
|
11795
11817
|
const X = normalizeStringToNFD(J), te = normalizeStringToNFD(W);
|
|
11796
11818
|
return X.toString().toLowerCase().indexOf(te) !== -1 || X.toString().indexOf(te) !== -1;
|
|
@@ -11828,6 +11850,17 @@ class ComposedTypeSpec extends Spec {
|
|
|
11828
11850
|
return X.length === 0 ? !0 : X.reduce((re, oe) => re.or(new TypeSpec(oe)), new FalseSpec()).isSatisfiedBy(W);
|
|
11829
11851
|
}
|
|
11830
11852
|
}
|
|
11853
|
+
class UpFilterSpec extends Spec {
|
|
11854
|
+
constructor(W) {
|
|
11855
|
+
super(), this.upIds = W;
|
|
11856
|
+
}
|
|
11857
|
+
isSatisfiedBy(W) {
|
|
11858
|
+
if (!this.upIds?.length)
|
|
11859
|
+
return !0;
|
|
11860
|
+
const X = W.up ?? null;
|
|
11861
|
+
return this.upIds.some((te) => X.id === te);
|
|
11862
|
+
}
|
|
11863
|
+
}
|
|
11831
11864
|
const activityHistoryFiltersSelector = (J) => J.activityHistoryFilters.filters, activityHistoryCommonFiltersSelector = createSelector(
|
|
11832
11865
|
activityHistoryFiltersSelector,
|
|
11833
11866
|
(J) => J.find(isCommonFilterGroup)?.filters || []
|
|
@@ -11856,7 +11889,22 @@ createSelector(
|
|
|
11856
11889
|
filters: oe.filter((ne) => ne.enabledValues?.length)
|
|
11857
11890
|
})).filter((W) => W.filters.length > 0)
|
|
11858
11891
|
);
|
|
11859
|
-
const
|
|
11892
|
+
const diagnosticFilterSelector = createSelector(
|
|
11893
|
+
activityHistoryFiltersSelector,
|
|
11894
|
+
(J) => J.find(isDiagnosticFilter)
|
|
11895
|
+
), diagnosticFilterEnabledValuesSelector = createSelector(
|
|
11896
|
+
diagnosticFilterSelector,
|
|
11897
|
+
(J) => J?.enabledValues || []
|
|
11898
|
+
), areDiagnosticFiltersActive = createSelector(
|
|
11899
|
+
diagnosticFilterEnabledValuesSelector,
|
|
11900
|
+
(J) => !!J.length
|
|
11901
|
+
), upFilterSelector = createSelector(
|
|
11902
|
+
activityHistoryFiltersSelector,
|
|
11903
|
+
(J) => J.find(isUpFilter)
|
|
11904
|
+
), upFilterEnabledValuesSelector = createSelector(
|
|
11905
|
+
upFilterSelector,
|
|
11906
|
+
(J) => J?.enabledValues || []
|
|
11907
|
+
), areUpFiltersActive = createSelector(upFilterEnabledValuesSelector, (J) => !!J.length), areSameDiagnostics = (J, W) => {
|
|
11860
11908
|
if (J.length !== W.length)
|
|
11861
11909
|
return !1;
|
|
11862
11910
|
const X = J.map((re) => re.codi).sort(), te = W.map((re) => re.codi).sort();
|
|
@@ -11941,55 +11989,7 @@ const groupActivityHistoryItems = (J) => {
|
|
|
11941
11989
|
}), J.sort(
|
|
11942
11990
|
(oe, ne) => re(ne).getTime() - re(oe).getTime()
|
|
11943
11991
|
);
|
|
11944
|
-
}, activityHistorySearchStringSelector = (J) => J.activityHistoryFilters.searchString,
|
|
11945
|
-
activityHistoryFiltersSelector,
|
|
11946
|
-
(J) => J.find(isDiagnosticFilter)
|
|
11947
|
-
), diagnosticFilterEnabledValuesSelector = createSelector(
|
|
11948
|
-
diagnosticFilterSelector,
|
|
11949
|
-
(J) => J?.enabledValues || []
|
|
11950
|
-
), areDiagnosticFiltersActive = createSelector(
|
|
11951
|
-
diagnosticFilterEnabledValuesSelector,
|
|
11952
|
-
(J) => !!J.length
|
|
11953
|
-
);
|
|
11954
|
-
class DiagnosticCodeSpec extends Spec {
|
|
11955
|
-
constructor(W) {
|
|
11956
|
-
super(), this.diagnosticCodes = this.extractAllCodes(W);
|
|
11957
|
-
}
|
|
11958
|
-
extractAllCodes(W) {
|
|
11959
|
-
const X = /* @__PURE__ */ new Set();
|
|
11960
|
-
for (const te of W) {
|
|
11961
|
-
if (te.codi && X.add(te.codi), te.evolucions && Array.isArray(te.evolucions))
|
|
11962
|
-
for (const re of te.evolucions)
|
|
11963
|
-
re.codi && X.add(re.codi);
|
|
11964
|
-
if (te.relacions && Array.isArray(te.relacions))
|
|
11965
|
-
for (const re of te.relacions)
|
|
11966
|
-
re.codi && X.add(re.codi);
|
|
11967
|
-
}
|
|
11968
|
-
return Array.from(X);
|
|
11969
|
-
}
|
|
11970
|
-
isSatisfiedBy(W) {
|
|
11971
|
-
return this.diagnosticCodes?.length ? (W.diagnostics ?? []).some((te) => this.diagnosticCodes.includes(te.codi)) : !0;
|
|
11972
|
-
}
|
|
11973
|
-
}
|
|
11974
|
-
const upFilterSelector = createSelector(
|
|
11975
|
-
activityHistoryFiltersSelector,
|
|
11976
|
-
(J) => J.find(isUpFilter)
|
|
11977
|
-
), upFilterEnabledValuesSelector = createSelector(
|
|
11978
|
-
upFilterSelector,
|
|
11979
|
-
(J) => J?.enabledValues || []
|
|
11980
|
-
), areUpFiltersActive = createSelector(upFilterEnabledValuesSelector, (J) => !!J.length);
|
|
11981
|
-
class UpFilterSpec extends Spec {
|
|
11982
|
-
constructor(W) {
|
|
11983
|
-
super(), this.upIds = W;
|
|
11984
|
-
}
|
|
11985
|
-
isSatisfiedBy(W) {
|
|
11986
|
-
if (!this.upIds?.length)
|
|
11987
|
-
return !0;
|
|
11988
|
-
const X = W.up ?? null;
|
|
11989
|
-
return this.upIds.some((te) => X.id === te);
|
|
11990
|
-
}
|
|
11991
|
-
}
|
|
11992
|
-
const activityHistoryCollectionsSelector = (J) => J.activityHistoryCollections.collections, mapItemsWithMetadata = (J, W, X, te) => J.map(
|
|
11992
|
+
}, activityHistorySearchStringSelector = (J) => J.activityHistoryFilters.searchString, activityHistoryCollectionsSelector = (J) => J.activityHistoryCollections.collections, mapItemsWithMetadata = (J, W, X, te) => J.map(
|
|
11993
11993
|
(re) => ({
|
|
11994
11994
|
...re,
|
|
11995
11995
|
searchPredicate: te,
|
|
@@ -11999,19 +11999,25 @@ const activityHistoryCollectionsSelector = (J) => J.activityHistoryCollections.c
|
|
|
11999
11999
|
), activityHistoryMappedItems = createSelector(
|
|
12000
12000
|
activityHistoryCollectionsSelector,
|
|
12001
12001
|
(J) => Object.values(J).flatMap((W) => mapItemsWithMetadata(W.items, W.componentFactory, W.id, W.searchPredicate))
|
|
12002
|
-
)
|
|
12002
|
+
);
|
|
12003
|
+
createSelector(
|
|
12004
|
+
activityHistoryCustomFilterGroupsSelector,
|
|
12005
|
+
activityHistoryCollectionsSelector,
|
|
12006
|
+
(J, W) => J.filter((X) => {
|
|
12007
|
+
const te = W[X.id];
|
|
12008
|
+
return te?.items && te.items.length > 0;
|
|
12009
|
+
})
|
|
12010
|
+
);
|
|
12011
|
+
const customFilterGroupsWithOptionsSelector = createSelector(
|
|
12003
12012
|
activityHistoryCustomFilterGroupsSelector,
|
|
12004
12013
|
activityHistoryCollectionsSelector,
|
|
12005
|
-
(J, W) => J.
|
|
12006
|
-
const
|
|
12007
|
-
return oe?.items && oe.items.length > 0;
|
|
12008
|
-
}).map((re) => {
|
|
12009
|
-
const oe = W[re.id];
|
|
12014
|
+
(J, W) => J.map((te) => {
|
|
12015
|
+
const re = W[te.id];
|
|
12010
12016
|
return {
|
|
12011
|
-
...
|
|
12012
|
-
filters:
|
|
12013
|
-
...
|
|
12014
|
-
options: (
|
|
12017
|
+
...te,
|
|
12018
|
+
filters: te.filters.map((oe) => ({
|
|
12019
|
+
...oe,
|
|
12020
|
+
options: (oe.singleOption ? [] : re?.items && getUniqueObjects(re.items, oe.propPathValue, oe.propsPathDescription, oe.title)) || []
|
|
12015
12021
|
}))
|
|
12016
12022
|
};
|
|
12017
12023
|
})
|
|
@@ -15384,14 +15390,21 @@ class VirtualScroller {
|
|
|
15384
15390
|
this._updateVisibleRange(), (Math.abs(oe.start - this._visibleRange.start) > 0 || Math.abs(oe.end - this._visibleRange.end) > 0) && te(this.getState());
|
|
15385
15391
|
};
|
|
15386
15392
|
return W.addEventListener("scroll", re), this._resizeObserver = new ResizeObserver(() => {
|
|
15387
|
-
|
|
15393
|
+
const oe = W.clientHeight;
|
|
15394
|
+
oe > 0 && (this._viewportHeight = oe, this._updateVisibleRange(), te(this.getState()));
|
|
15388
15395
|
}), this._resizeObserver.observe(W), () => {
|
|
15389
15396
|
W.removeEventListener("scroll", re), this._resizeObserver?.disconnect(), this._scrollTimeout && clearTimeout(this._scrollTimeout);
|
|
15390
15397
|
};
|
|
15391
15398
|
}
|
|
15392
15399
|
// Update items (when data changes)
|
|
15393
|
-
updateItems(W) {
|
|
15394
|
-
this._options.items
|
|
15400
|
+
updateItems(W, X) {
|
|
15401
|
+
this._options.items.length;
|
|
15402
|
+
const te = W.length > 0;
|
|
15403
|
+
this._options.items = W, this._initializeHeights(), this._content && (this._content.style.height = this._totalHeight + "px"), this._updateVisibleRange(), te && this._viewport && requestAnimationFrame(() => {
|
|
15404
|
+
if (!this._viewport) return;
|
|
15405
|
+
const re = this._viewport.clientHeight;
|
|
15406
|
+
re > 0 && re !== this._viewportHeight && (this._viewportHeight = re, this._updateVisibleRange(), X && X(this.getState()));
|
|
15407
|
+
});
|
|
15395
15408
|
}
|
|
15396
15409
|
// Measure actual heights of rendered items
|
|
15397
15410
|
_measureActualHeights() {
|
|
@@ -15414,7 +15427,8 @@ class VirtualScroller {
|
|
|
15414
15427
|
}
|
|
15415
15428
|
// Calculate visible range based on scroll position
|
|
15416
15429
|
_updateVisibleRange() {
|
|
15417
|
-
if (!this._options.items.length || this._viewportHeight === 0)
|
|
15430
|
+
if (!this._options.items.length || this._viewportHeight === 0)
|
|
15431
|
+
return;
|
|
15418
15432
|
const W = Math.floor(this._viewportHeight * (this._options.bufferSize / 100)), X = Math.max(0, this._scrollTop - W), te = this._scrollTop + this._viewportHeight + W;
|
|
15419
15433
|
let re = 0, oe = this._options.items.length - 1;
|
|
15420
15434
|
for (let ne = 0; ne < this._options.items.length; ne++)
|
|
@@ -15489,7 +15503,7 @@ let ActivityHistoryTimeline = class extends h$p {
|
|
|
15489
15503
|
super.disconnectedCallback(), this._cleanupVirtualScroller?.(), this._noDataMessageTimer && clearTimeout(this._noDataMessageTimer);
|
|
15490
15504
|
}
|
|
15491
15505
|
async updated(J) {
|
|
15492
|
-
J.has("historyGroups") && this.historyGroups?.length && (await this.prepareComponents(this.historyGroups), this._updateVirtualScroller()), this._viewport && this._content && !this._virtualScroller && setTimeout(() => this._setupVirtualScroller(), 0);
|
|
15506
|
+
J.has("historyGroups") && this.historyGroups?.length && (await this.prepareComponents(this.historyGroups), this._updateVirtualScroller()), this._viewport && this._content && !this._virtualScroller && setTimeout(() => this._setupVirtualScroller(), 0), this._viewport && this._virtualScroller && this._viewport !== this._lastViewportElement && (this._cleanupVirtualScroller?.(), this._virtualScroller = void 0, setTimeout(() => this._setupVirtualScroller(), 0)), this._viewport && (this._lastViewportElement = this._viewport);
|
|
15493
15507
|
}
|
|
15494
15508
|
async prepareComponents(J) {
|
|
15495
15509
|
for (const W of J) {
|
|
@@ -15541,7 +15555,9 @@ let ActivityHistoryTimeline = class extends h$p {
|
|
|
15541
15555
|
}), this._virtualScrollerState = this._virtualScroller.getState());
|
|
15542
15556
|
}
|
|
15543
15557
|
_updateVirtualScroller() {
|
|
15544
|
-
!this._virtualScroller || !this.historyGroups?.length || (this._virtualScroller.updateItems(this.historyGroups
|
|
15558
|
+
!this._virtualScroller || !this.historyGroups?.length || (this._virtualScroller.updateItems(this.historyGroups, (J) => {
|
|
15559
|
+
this._virtualScrollerState = J, this.requestUpdate();
|
|
15560
|
+
}), this._virtualScrollerState = this._virtualScroller.getState());
|
|
15545
15561
|
}
|
|
15546
15562
|
// Getters for template (maintaining original API)
|
|
15547
15563
|
get _visibleItems() {
|
|
@@ -16371,8 +16387,8 @@ FinalizeVisitHandler = __decorateClass$e([
|
|
|
16371
16387
|
class FinalizeVisit {
|
|
16372
16388
|
}
|
|
16373
16389
|
const template$b = (J) => ke$1`
|
|
16374
|
-
|
|
16375
|
-
`;
|
|
16390
|
+
<dss-button @click=${J.finalizeVisitHandler} variant="subtle" size="md" icon="door_front" label=${translate$1("actions.finalizeVisit")}></dss-button>
|
|
16391
|
+
`;
|
|
16376
16392
|
class FinalizeVisitButton extends h$p {
|
|
16377
16393
|
render() {
|
|
16378
16394
|
return ke$1`${template$b(this)}`;
|
|
@@ -39954,23 +39970,23 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
|
|
|
39954
39970
|
}
|
|
39955
39971
|
_subscribeEvents() {
|
|
39956
39972
|
this.subscriptions.push(
|
|
39957
|
-
shellApi.broker.subscribe(
|
|
39973
|
+
shellApi.broker.subscribe(BROKER_EVENTS.shell.appCrashed, (W) => {
|
|
39958
39974
|
this._handleError(W);
|
|
39959
39975
|
})
|
|
39960
39976
|
), this.subscriptions.push(
|
|
39961
|
-
shellApi.broker.subscribe(
|
|
39977
|
+
shellApi.broker.subscribe(BROKER_EVENTS.shell.refreshTokenFailed, (W) => {
|
|
39962
39978
|
this._handleError({ message: translate$1("errors.session") });
|
|
39963
39979
|
})
|
|
39964
39980
|
), this.subscriptions.push(
|
|
39965
|
-
shellApi.broker.subscribe(
|
|
39981
|
+
shellApi.broker.subscribe(BROKER_EVENTS.shell.mpidHeaderInvalid, (W) => {
|
|
39966
39982
|
this._handleError({ message: translate$1("errors.invalidPatient") });
|
|
39967
39983
|
})
|
|
39968
39984
|
), this.subscriptions.push(
|
|
39969
|
-
shellApi.broker.subscribe(
|
|
39985
|
+
shellApi.broker.subscribe(BROKER_EVENTS.shell.quickActionBusyChanged, (W) => {
|
|
39970
39986
|
this.quickActionBusy = W.busy;
|
|
39971
39987
|
})
|
|
39972
39988
|
), this.subscriptions.push(
|
|
39973
|
-
shellApi.broker.subscribe(
|
|
39989
|
+
shellApi.broker.subscribe(BROKER_EVENTS.shell.scrollToNavItemRequested, (W) => {
|
|
39974
39990
|
this._scrollToNavItem(W);
|
|
39975
39991
|
})
|
|
39976
39992
|
);
|
|
@@ -39984,7 +40000,7 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
|
|
|
39984
40000
|
async _scrollToNavItem(W) {
|
|
39985
40001
|
const te = (await shellApi.regionManager.getRegion(shellApi.regionManager.regions.shell.navigationMenu)).currentActiveViews, re = W.includes("::") ? W.split("::")[1] : W;
|
|
39986
40002
|
if (!te.find((be) => be.id === re)) {
|
|
39987
|
-
shellApi.broker.publish(
|
|
40003
|
+
shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemCompleted, {
|
|
39988
40004
|
scrollTop: 0,
|
|
39989
40005
|
containerTop: 0,
|
|
39990
40006
|
itemIndex: -1
|
|
@@ -39996,7 +40012,7 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
|
|
|
39996
40012
|
return ge.localeCompare(ve);
|
|
39997
40013
|
}).findIndex((be) => be.id === re);
|
|
39998
40014
|
if (de === -1) {
|
|
39999
|
-
shellApi.broker.publish(
|
|
40015
|
+
shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemCompleted, {
|
|
40000
40016
|
scrollTop: 0,
|
|
40001
40017
|
containerTop: 0,
|
|
40002
40018
|
itemIndex: -1
|
|
@@ -40005,7 +40021,7 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
|
|
|
40005
40021
|
}
|
|
40006
40022
|
const ce = this.shadowRoot?.querySelector("#menu-region-container");
|
|
40007
40023
|
if (!ce) {
|
|
40008
|
-
shellApi.broker.publish(
|
|
40024
|
+
shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemCompleted, {
|
|
40009
40025
|
scrollTop: 0,
|
|
40010
40026
|
containerTop: 0,
|
|
40011
40027
|
itemIndex: de
|
|
@@ -40026,7 +40042,7 @@ const Us = class Us extends PrimariaRegionHost(h$p) {
|
|
|
40026
40042
|
itemIndex: de,
|
|
40027
40043
|
itemAbsoluteY: ge
|
|
40028
40044
|
};
|
|
40029
|
-
shellApi.broker.publish(
|
|
40045
|
+
shellApi.broker.publish(BROKER_EVENTS.shell.scrollToNavItemCompleted, ve);
|
|
40030
40046
|
}, 300);
|
|
40031
40047
|
}
|
|
40032
40048
|
};
|
|
@@ -40322,7 +40338,7 @@ const template$6 = (J) => ke$1`
|
|
|
40322
40338
|
</dss-action-menu>
|
|
40323
40339
|
${J.showText ? ke$1`<dss-icon icon="chevron_right" size="md"></dss-icon>` : D$7}
|
|
40324
40340
|
</div>
|
|
40325
|
-
`, styles$6 = ".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white;outline-offset:-2px}";
|
|
40341
|
+
`, styles$6 = ".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white;outline-offset:-2px}dss-tooltip{pointer-events:none}";
|
|
40326
40342
|
var __defProp$8 = Object.defineProperty, __decorateClass$8 = (J, W, X, te) => {
|
|
40327
40343
|
for (var re = void 0, oe = J.length - 1, ne; oe >= 0; oe--)
|
|
40328
40344
|
(ne = J[oe]) && (re = ne(W, X, re) || re);
|
|
@@ -40378,7 +40394,7 @@ const template$5 = (J) => ke$1`
|
|
|
40378
40394
|
</dss-action-menu>
|
|
40379
40395
|
${J.showText ? ke$1`<dss-icon icon="chevron_right" size="md"></dss-icon>` : D$7}
|
|
40380
40396
|
</div>
|
|
40381
|
-
`, styles$5 = ".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white;outline-offset:-2px}";
|
|
40397
|
+
`, styles$5 = ".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white;outline-offset:-2px}dss-tooltip{pointer-events:none}";
|
|
40382
40398
|
var __defProp$7 = Object.defineProperty, __decorateClass$7 = (J, W, X, te) => {
|
|
40383
40399
|
for (var re = void 0, oe = J.length - 1, ne; oe >= 0; oe--)
|
|
40384
40400
|
(ne = J[oe]) && (re = ne(W, X, re) || re);
|
|
@@ -40504,13 +40520,12 @@ __decorateClass$6([
|
|
|
40504
40520
|
__decorateClass$6([
|
|
40505
40521
|
n$B()
|
|
40506
40522
|
], PrimariaContentSwitcher.prototype, "animation");
|
|
40507
|
-
const styles$3 = ".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white;outline-offset:-2px}", template$3 = (J) => ke$1`
|
|
40508
|
-
<div
|
|
40509
|
-
class=${Rt({ item: !0, active: J.isActive })}
|
|
40510
|
-
@click=${J.config.callbackFn}
|
|
40523
|
+
const styles$3 = ".item{display:flex;cursor:pointer;border-radius:8px;padding:8px;justify-content:center;transition:background-color .3s ease}.item[expanded]{justify-content:space-between}.item:hover{background-color:var(--color-primary-900);color:#fff}.item .icon-label{display:flex;gap:8px;transition:background-color .3s}.item.active{outline:2px solid white;outline-offset:-2px}dss-tooltip{pointer-events:none}", template$3 = (J) => ke$1`
|
|
40524
|
+
<div
|
|
40525
|
+
class=${Rt({ item: !0, active: J.isActive })}
|
|
40511
40526
|
?expanded=${J.showText}
|
|
40512
40527
|
>
|
|
40513
|
-
<div class="icon-label">
|
|
40528
|
+
<div class="icon-label" @click=${J.config.callbackFn}>
|
|
40514
40529
|
<dss-icon icon=${J.config.icon} size="md" ?fill=${J.config.fill} style=${J.config.rotateIcon ? "transform: rotate(180deg);" : ""}></dss-icon>
|
|
40515
40530
|
${J.showText ? ke$1`<span>${J.config.label}</span>` : ""}
|
|
40516
40531
|
</div>
|
|
@@ -40549,7 +40564,7 @@ const Qs = class Qs extends k$a(h$p) {
|
|
|
40549
40564
|
}).observe(W);
|
|
40550
40565
|
}
|
|
40551
40566
|
_subscribeEvents() {
|
|
40552
|
-
const W = shellApi.broker.subscribe(
|
|
40567
|
+
const W = shellApi.broker.subscribe(BROKER_EVENTS.shell.mainViewChanged, (X) => {
|
|
40553
40568
|
this.isActive = X.viewId === this.view?.id;
|
|
40554
40569
|
});
|
|
40555
40570
|
this.subscriptions.push(W);
|
|
@@ -40581,40 +40596,40 @@ const styles$2 = ".wrapper{display:flex;flex-direction:column;gap:8px}.menu-acti
|
|
|
40581
40596
|
<div class="wrapper">
|
|
40582
40597
|
<primaria-nav-item
|
|
40583
40598
|
.config=${J.primariaNavItemConfig}
|
|
40584
|
-
@click=${J.handleItemClick}
|
|
40585
40599
|
class="${Rt({ "menu-active": J.showActionMenu })}"
|
|
40586
40600
|
></primaria-nav-item>
|
|
40587
|
-
|
|
40588
|
-
|
|
40589
|
-
|
|
40601
|
+
<dss-action-menu
|
|
40602
|
+
@onCloseActionMenu=${J.handleCloseMenu}
|
|
40603
|
+
?hidden=${!J.showActionMenu}
|
|
40604
|
+
>
|
|
40605
|
+
${J.config.actionMenuItems?.map(
|
|
40590
40606
|
(W) => W.hasNestedMenu ? ke$1`
|
|
40591
|
-
|
|
40592
|
-
|
|
40593
|
-
|
|
40594
|
-
|
|
40595
|
-
|
|
40596
|
-
|
|
40597
|
-
|
|
40607
|
+
<dss-action-menu-item
|
|
40608
|
+
righticon=${W.icon}
|
|
40609
|
+
.label=${W.label}
|
|
40610
|
+
hasnestedmenu
|
|
40611
|
+
>
|
|
40612
|
+
<dss-action-menu>
|
|
40613
|
+
${W.nestedMenuItems?.map(
|
|
40598
40614
|
(X) => ke$1`
|
|
40599
|
-
|
|
40600
|
-
|
|
40601
|
-
|
|
40602
|
-
|
|
40603
|
-
|
|
40604
|
-
|
|
40615
|
+
<dss-action-menu-item
|
|
40616
|
+
righticon=${X.icon}
|
|
40617
|
+
.label=${X.label}
|
|
40618
|
+
@click=${X.callbackFn}
|
|
40619
|
+
></dss-action-menu-item>
|
|
40620
|
+
`
|
|
40605
40621
|
)}
|
|
40606
|
-
|
|
40607
|
-
|
|
40608
|
-
|
|
40609
|
-
|
|
40610
|
-
|
|
40611
|
-
|
|
40612
|
-
|
|
40613
|
-
|
|
40614
|
-
|
|
40622
|
+
</dss-action-menu>
|
|
40623
|
+
</dss-action-menu-item>
|
|
40624
|
+
` : ke$1`
|
|
40625
|
+
<dss-action-menu-item
|
|
40626
|
+
righticon=${W.icon}
|
|
40627
|
+
.label=${W.label}
|
|
40628
|
+
@click=${W.callbackFn}
|
|
40629
|
+
></dss-action-menu-item>
|
|
40630
|
+
`
|
|
40615
40631
|
)}
|
|
40616
|
-
|
|
40617
|
-
` : D$7}
|
|
40632
|
+
</dss-action-menu>
|
|
40618
40633
|
</div>
|
|
40619
40634
|
`;
|
|
40620
40635
|
var __defProp$4 = Object.defineProperty, __decorateClass$4 = (J, W, X, te) => {
|
|
@@ -40625,12 +40640,15 @@ var __defProp$4 = Object.defineProperty, __decorateClass$4 = (J, W, X, te) => {
|
|
|
40625
40640
|
const Xs = class Xs extends h$p {
|
|
40626
40641
|
constructor(W) {
|
|
40627
40642
|
super(), this.showActionMenu = !1, this.handleItemClick = () => {
|
|
40628
|
-
this.showActionMenu = !0
|
|
40643
|
+
this.showActionMenu = !0;
|
|
40629
40644
|
}, this.handleCloseMenu = () => {
|
|
40630
40645
|
this.showActionMenu = !1;
|
|
40631
|
-
}, this.config = W
|
|
40632
|
-
|
|
40633
|
-
|
|
40646
|
+
}, this.config = W;
|
|
40647
|
+
}
|
|
40648
|
+
get primariaNavItemConfig() {
|
|
40649
|
+
return {
|
|
40650
|
+
icon: this.config.icon,
|
|
40651
|
+
label: this.config.label,
|
|
40634
40652
|
showArrow: !0,
|
|
40635
40653
|
callbackFn: this.handleItemClick
|
|
40636
40654
|
};
|
|
@@ -40646,9 +40664,6 @@ let PrimariaNavTreeMenu = Xs;
|
|
|
40646
40664
|
__decorateClass$4([
|
|
40647
40665
|
n$B({ type: Object })
|
|
40648
40666
|
], PrimariaNavTreeMenu.prototype, "config");
|
|
40649
|
-
__decorateClass$4([
|
|
40650
|
-
r$I()
|
|
40651
|
-
], PrimariaNavTreeMenu.prototype, "primariaNavItemConfig");
|
|
40652
40667
|
__decorateClass$4([
|
|
40653
40668
|
r$I()
|
|
40654
40669
|
], PrimariaNavTreeMenu.prototype, "showActionMenu");
|
|
@@ -49116,7 +49131,6 @@ if (typeof document < "u") {
|
|
|
49116
49131
|
` + dssCSS, document.head.appendChild(J);
|
|
49117
49132
|
}
|
|
49118
49133
|
export {
|
|
49119
|
-
BROKER_EVENTS as B,
|
|
49120
49134
|
EcapEventManager as E,
|
|
49121
49135
|
PrimariaRegionHost as P,
|
|
49122
49136
|
shellApi as a,
|
|
@@ -49145,4 +49159,4 @@ export {
|
|
|
49145
49159
|
l as x,
|
|
49146
49160
|
PrimariaInteractionService as y
|
|
49147
49161
|
};
|
|
49148
|
-
//# sourceMappingURL=index-
|
|
49162
|
+
//# sourceMappingURL=index-CRH7Fdpk.js.map
|