@uxland/primary-shell 7.29.16 → 7.30.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-aYPNyXoD.js → component-B-axUbH9.js} +2 -2
- package/dist/{component-aYPNyXoD.js.map → component-B-axUbH9.js.map} +1 -1
- package/dist/{index-BdvrdZXA.js → index-CXvNTuhe.js} +27 -13
- package/dist/index-CXvNTuhe.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/index.umd.cjs +6 -6
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +1 -1
- package/dist/index-BdvrdZXA.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-CXvNTuhe.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-B-axUbH9.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-
|
|
1
|
+
{"version":3,"file":"component-B-axUbH9.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;"}
|
|
@@ -9663,7 +9663,7 @@ class ImportDataManagerImpl {
|
|
|
9663
9663
|
async import(W) {
|
|
9664
9664
|
this.currentImporterId = W, this.selectedItems = {}, this.pluginTexts = {};
|
|
9665
9665
|
try {
|
|
9666
|
-
const { ImportDataManagerModal: X } = await import("./component-
|
|
9666
|
+
const { ImportDataManagerModal: X } = await import("./component-B-axUbH9.js"), { confirmed: te } = await this.interactionService.confirm(
|
|
9667
9667
|
void 0,
|
|
9668
9668
|
{ component: X },
|
|
9669
9669
|
{
|
|
@@ -11009,7 +11009,8 @@ function removeErrorHistoryItemReducer(J, W) {
|
|
|
11009
11009
|
function clearActivityHistoryCollectionsReducer(J) {
|
|
11010
11010
|
return {
|
|
11011
11011
|
...J,
|
|
11012
|
-
collections: {}
|
|
11012
|
+
collections: {},
|
|
11013
|
+
error: []
|
|
11013
11014
|
};
|
|
11014
11015
|
}
|
|
11015
11016
|
const removeItemFromCollection = (J, W, X) => {
|
|
@@ -11918,9 +11919,12 @@ const diagnosticFilterSelector = createSelector(
|
|
|
11918
11919
|
return !1;
|
|
11919
11920
|
const X = J.map((re) => re.codi).sort(), te = W.map((re) => re.codi).sort();
|
|
11920
11921
|
return X.every((re, oe) => re === te[oe]);
|
|
11921
|
-
}, hasValidDiagnostic = (J) => J != null && typeof J.codi == "string" && (typeof J.cataleg == "string" || J.cataleg === null) && typeof J.descripcio == "string", hasValidDiagnostics = (J) => J == null ? !0 : Array.isArray(J) && J.every(hasValidDiagnostic), dateStringCache = /* @__PURE__ */ new Map(), dateObjectCache = /* @__PURE__ */ new Map(), getDateString = (J) => (dateStringCache.has(J) || dateStringCache.set(J, new Date(J).toDateString()), dateStringCache.get(J)), getDateObject = (J) => (dateObjectCache.has(J) || dateObjectCache.set(J, new Date(J)), dateObjectCache.get(J)),
|
|
11922
|
-
const W = `${J.professional?.id || "null"}-${J.professional?.role?.id || "null"}-${J.professional?.speciality?.id || "null"}`, X = `${J.ep?.id || "null"}-${J.up?.id || "null"}-${J.center?.id || "null"}
|
|
11922
|
+
}, hasValidDiagnostic = (J) => J != null && typeof J.codi == "string" && (typeof J.cataleg == "string" || J.cataleg === null) && typeof J.descripcio == "string", hasValidDiagnostics = (J) => J == null ? !0 : Array.isArray(J) && J.every(hasValidDiagnostic), dateStringCache = /* @__PURE__ */ new Map(), dateObjectCache = /* @__PURE__ */ new Map(), getDateString = (J) => (dateStringCache.has(J) || dateStringCache.set(J, new Date(J).toDateString()), dateStringCache.get(J)), getDateObject = (J) => (dateObjectCache.has(J) || dateObjectCache.set(J, new Date(J)), dateObjectCache.get(J)), createVisitKeyWithoutService = (J) => {
|
|
11923
|
+
const W = `${J.professional?.id || "null"}-${J.professional?.role?.id || "null"}-${J.professional?.speciality?.id || "null"}`, X = `${J.ep?.id || "null"}-${J.up?.id || "null"}-${J.center?.id || "null"}`, te = getDateString(J.date);
|
|
11923
11924
|
return `${W}|${X}|${te}`;
|
|
11925
|
+
}, hasService = (J) => J.service?.id != null, canGroupTogether = (J, W) => {
|
|
11926
|
+
const X = createVisitKeyWithoutService(J), te = createVisitKeyWithoutService(W);
|
|
11927
|
+
return X !== te ? !1 : !hasService(J) || !hasService(W) ? !0 : J.service?.id === W.service?.id;
|
|
11924
11928
|
}, withinEightHours = (J, W) => {
|
|
11925
11929
|
const X = getDateObject(J).getTime(), te = getDateObject(W).getTime();
|
|
11926
11930
|
return Math.abs(X - te) <= 480 * 60 * 1e3;
|
|
@@ -11955,12 +11959,12 @@ const groupActivityHistoryItems = (J) => {
|
|
|
11955
11959
|
(re, oe) => getDateObject(oe.date).getTime() - getDateObject(re.date).getTime()
|
|
11956
11960
|
), X = /* @__PURE__ */ new Map(), te = [];
|
|
11957
11961
|
for (const re of W) {
|
|
11958
|
-
const oe =
|
|
11962
|
+
const oe = createVisitKeyWithoutService(re), ne = getDateObject(re.date).getTime();
|
|
11959
11963
|
let de = !1;
|
|
11960
11964
|
const ce = X.get(oe) || [];
|
|
11961
11965
|
for (const ue of ce) {
|
|
11962
11966
|
const he = ue.items[0], pe = ue.items[ue.items.length - 1];
|
|
11963
|
-
if (withinEightHours(he.date, re.date) && withinEightHours(pe.date, re.date)) {
|
|
11967
|
+
if (!(!he || !pe) && canGroupTogether(he, re) && withinEightHours(he.date, re.date) && withinEightHours(pe.date, re.date)) {
|
|
11964
11968
|
const fe = getDateObject(pe.date).getTime(), be = getDateObject(he.date).getTime(), me = Math.min(fe, ne), ge = Math.max(be, ne);
|
|
11965
11969
|
let ve = !1;
|
|
11966
11970
|
for (const [_e, we] of X)
|
|
@@ -15304,7 +15308,7 @@ const hasItemDivider = (J, W) => {
|
|
|
15304
15308
|
(W, X) => ke$1`
|
|
15305
15309
|
<div class="visit"
|
|
15306
15310
|
data-date=${to(W?.items[0]?.date || W?.subGroups[0]?.items[0]?.date)}>
|
|
15307
|
-
${visitHeaderTemplate(J, W?.items[0] || W?.subGroups[0]?.items[0])}
|
|
15311
|
+
${visitHeaderTemplate(J, W?.items[0] || W?.subGroups[0]?.items[0], W)}
|
|
15308
15312
|
<div class="visit__items">
|
|
15309
15313
|
${Qt(
|
|
15310
15314
|
mergeHistoryItemsAndSubgroups(W),
|
|
@@ -15363,7 +15367,7 @@ ${J.searchString?.length > 1 ? ke$1`
|
|
|
15363
15367
|
imagesrc=${notFound}
|
|
15364
15368
|
title=${translate("noData.title")}
|
|
15365
15369
|
description=${translate("noData.description")}>
|
|
15366
|
-
</dss-user-feedback>` : D$7}`, visitHeaderTemplate = (J, W) => W ? ke$1`
|
|
15370
|
+
</dss-user-feedback>` : D$7}`, visitHeaderTemplate = (J, W, X) => W ? ke$1`
|
|
15367
15371
|
<div class="visit__header">
|
|
15368
15372
|
<div class="title">
|
|
15369
15373
|
<div class="title-date">
|
|
@@ -15371,15 +15375,25 @@ ${J.searchString?.length > 1 ? ke$1`
|
|
|
15371
15375
|
</div>
|
|
15372
15376
|
<div class="title-description">
|
|
15373
15377
|
<div>
|
|
15374
|
-
${renderProfessionalValues(J, W)}
|
|
15378
|
+
${renderProfessionalValues(J, W, X)}
|
|
15375
15379
|
</div>
|
|
15376
15380
|
</div>
|
|
15377
15381
|
</div>
|
|
15378
15382
|
</div>
|
|
15379
|
-
` : D$7,
|
|
15383
|
+
` : D$7, findServiceInGroup = (J) => {
|
|
15384
|
+
if (J) {
|
|
15385
|
+
for (const W of J.items || [])
|
|
15386
|
+
if (W.service?.id) return W.service;
|
|
15387
|
+
for (const W of J.subGroups || [])
|
|
15388
|
+
for (const X of W.items || [])
|
|
15389
|
+
if (X.service?.id) return X.service;
|
|
15390
|
+
}
|
|
15391
|
+
}, renderProfessionalValues = (J, W, X) => {
|
|
15380
15392
|
if (!W.professional) return D$7;
|
|
15381
|
-
const
|
|
15382
|
-
|
|
15393
|
+
const te = shouldShowRole(W), re = [];
|
|
15394
|
+
re.push(J.highlighted(W.professional.name)), te && W.professional?.role?.description && re.push(J.highlighted(W.professional.role.description)), W.professional?.speciality?.description && re.push(J.highlighted(W.professional.speciality.description)), W.up?.description && re.push(J.highlighted(W.up.description));
|
|
15395
|
+
const oe = W.service?.description ? W.service : findServiceInGroup(X);
|
|
15396
|
+
return oe?.description && re.push(J.highlighted(oe.description)), re.map((ne, de) => ke$1`${ne}${de < re.length - 1 ? " | " : ""}`);
|
|
15383
15397
|
}, diagnosticHeaderTemplate = (J) => J && ke$1`
|
|
15384
15398
|
<div class="diagnostics__header">
|
|
15385
15399
|
${J.diagnostics.filter((W) => W.descripcio != null && W.descripcio.trim() !== "").map(
|
|
@@ -49194,4 +49208,4 @@ export {
|
|
|
49194
49208
|
l as x,
|
|
49195
49209
|
PrimariaInteractionService as y
|
|
49196
49210
|
};
|
|
49197
|
-
//# sourceMappingURL=index-
|
|
49211
|
+
//# sourceMappingURL=index-CXvNTuhe.js.map
|