@uxland/primary-shell 7.19.0 → 7.21.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-Dntb8lDA.js → component-DhiYlRUr.js} +2 -2
- package/dist/{component-Dntb8lDA.js.map → component-DhiYlRUr.js.map} +1 -1
- package/dist/{index-Bh_v3jlk.js → index-DFUx37wx.js} +363 -327
- package/dist/index-DFUx37wx.js.map +1 -0
- package/dist/index.js +14 -13
- package/dist/index.umd.cjs +26 -25
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/api/broker/broker-events.d.ts +12 -2
- package/dist/primary/shell/src/api/interaction-service/interaction-service.d.ts +1 -0
- package/dist/primary/shell/src/api/region-manager/region-manager.d.ts +2 -1
- package/dist/primary/shell/src/api/region-manager/regions.d.ts +4 -1
- package/package.json +1 -1
- package/src/api/broker/broker-events.ts +12 -2
- package/src/api/interaction-service/interaction-service-impl.tsx +1 -0
- package/src/api/interaction-service/interaction-service.ts +1 -0
- package/src/api/interaction-service/modal-styles.css +9 -6
- package/src/api/region-manager/region-manager.ts +3 -1
- package/src/api/region-manager/regions.ts +6 -1
- package/dist/index-Bh_v3jlk.js.map +0 -1
|
@@ -3361,8 +3361,17 @@ var NotificationMappings = (
|
|
|
3361
3361
|
})()
|
|
3362
3362
|
);
|
|
3363
3363
|
const BROKER_EVENTS = {
|
|
3364
|
-
|
|
3365
|
-
|
|
3364
|
+
activityHistory: {
|
|
3365
|
+
refreshDataRequested: "refresh_history_data_requested",
|
|
3366
|
+
errorLoadingData: "error_loading_activity_history_data",
|
|
3367
|
+
searched: "activity_history_searched",
|
|
3368
|
+
filtersCleaned: "activity_history_filters_cleaned",
|
|
3369
|
+
diagnosticFilterDeactivated: "activity_history_diagnostic_filter_deactivated",
|
|
3370
|
+
injectAsyncHistoryItemsRequest: "inject_async_history_items_request",
|
|
3371
|
+
addHistoryItemRequest: "add_history_item_request",
|
|
3372
|
+
addHistoryItemsRequest: "add_history_items_request",
|
|
3373
|
+
updateHistoryItemRequest: "update_history_item_request"
|
|
3374
|
+
}
|
|
3366
3375
|
}, disposableFactory = (te) => ({
|
|
3367
3376
|
dispose: () => {
|
|
3368
3377
|
mediatorSettings.resolver.remove(te.name);
|
|
@@ -5407,7 +5416,9 @@ class PrimariaInteractionService {
|
|
|
5407
5416
|
}
|
|
5408
5417
|
const ConfirmationMessage = ({ data: te }) => /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: te }), modalStyles = `.modal {
|
|
5409
5418
|
font-family: "Open Sans", sans-serif;
|
|
5410
|
-
display:
|
|
5419
|
+
display: flex;
|
|
5420
|
+
align-items: center;
|
|
5421
|
+
justify-content: center;
|
|
5411
5422
|
position: fixed;
|
|
5412
5423
|
z-index: 400;
|
|
5413
5424
|
left: 0;
|
|
@@ -5419,11 +5430,8 @@ const ConfirmationMessage = ({ data: te }) => /* @__PURE__ */ jsxRuntimeExports.
|
|
|
5419
5430
|
.dialog {
|
|
5420
5431
|
display: flex;
|
|
5421
5432
|
flex-direction: column;
|
|
5422
|
-
position:
|
|
5423
|
-
|
|
5424
|
-
left: 50%;
|
|
5425
|
-
transform: translate(-50%, -50%);
|
|
5426
|
-
z-index: 21;
|
|
5433
|
+
position: relative;
|
|
5434
|
+
z-index: 401;
|
|
5427
5435
|
background: #fff;
|
|
5428
5436
|
border-radius: 16px;
|
|
5429
5437
|
width: auto;
|
|
@@ -5432,6 +5440,7 @@ const ConfirmationMessage = ({ data: te }) => /* @__PURE__ */ jsxRuntimeExports.
|
|
|
5432
5440
|
min-width: 400px;
|
|
5433
5441
|
box-shadow: 0 8px 12px 6px rgba(0 0 0 / 5%), 0 4px 4px rgba(0 0 0 / 10%);
|
|
5434
5442
|
}
|
|
5443
|
+
|
|
5435
5444
|
.dss-dialog-header {
|
|
5436
5445
|
position: relative;
|
|
5437
5446
|
display: flex;
|
|
@@ -5461,9 +5470,12 @@ const ConfirmationMessage = ({ data: te }) => /* @__PURE__ */ jsxRuntimeExports.
|
|
|
5461
5470
|
.modal-content {
|
|
5462
5471
|
flex: 1;
|
|
5463
5472
|
padding: 0 24px;
|
|
5473
|
+
overflow: visible;
|
|
5474
|
+
position: relative;
|
|
5464
5475
|
}
|
|
5465
5476
|
.modal-content.full-customization {
|
|
5466
5477
|
padding: 0;
|
|
5478
|
+
overflow: visible;
|
|
5467
5479
|
}
|
|
5468
5480
|
.dss-modal-footer {
|
|
5469
5481
|
display: flex;
|
|
@@ -5530,6 +5542,7 @@ class ParimariaInteractionServiceImpl extends PrimariaInteractionService {
|
|
|
5530
5542
|
setResult: ve,
|
|
5531
5543
|
setIsValid: _e,
|
|
5532
5544
|
confirm: () => me && qe(!0),
|
|
5545
|
+
confirmResult: (Ie) => me && Fe(Ie),
|
|
5533
5546
|
cancel: () => qe(!1)
|
|
5534
5547
|
}
|
|
5535
5548
|
);
|
|
@@ -9606,12 +9619,15 @@ const shellRegions = {
|
|
|
9606
9619
|
sidebar: "clinical-monitoring-widgets-sidebar-region",
|
|
9607
9620
|
header: "clinical-monitoring-header-widgets-region",
|
|
9608
9621
|
content: "clinical-monitoring-content-widgets-region"
|
|
9622
|
+
}, activityHistoryRegions = {
|
|
9623
|
+
customFilters: "clinical-monitoring-activity-history-filters-region"
|
|
9609
9624
|
};
|
|
9610
9625
|
class RegionManagerProxy {
|
|
9611
9626
|
constructor(J, X, re) {
|
|
9612
9627
|
this.pluginInfo = J, this.regionManager = X, this.broker = re, this.regions = {
|
|
9613
9628
|
shell: shellRegions,
|
|
9614
|
-
clinicalMonitoring: clinicalMonitoringRegions
|
|
9629
|
+
clinicalMonitoring: clinicalMonitoringRegions,
|
|
9630
|
+
activityHistory: activityHistoryRegions
|
|
9615
9631
|
};
|
|
9616
9632
|
}
|
|
9617
9633
|
/**
|
|
@@ -9766,7 +9782,7 @@ class ImportDataManagerImpl {
|
|
|
9766
9782
|
async import(J) {
|
|
9767
9783
|
this.currentImporterId = J, this.selectedItems = {}, this.pluginTexts = {};
|
|
9768
9784
|
try {
|
|
9769
|
-
const { ImportDataManagerModal: X } = await import("./component-
|
|
9785
|
+
const { ImportDataManagerModal: X } = await import("./component-DhiYlRUr.js"), { confirmed: re } = await this.interactionService.confirm(
|
|
9770
9786
|
void 0,
|
|
9771
9787
|
{ component: X },
|
|
9772
9788
|
{
|
|
@@ -11172,6 +11188,14 @@ function addCustomFiltersReducer(te, J) {
|
|
|
11172
11188
|
function clearCustomFiltersReducer(te) {
|
|
11173
11189
|
te.filters = te.filters.filter((J) => !isCustomFilter(J));
|
|
11174
11190
|
}
|
|
11191
|
+
function setCustomFilterAllValuesReducer(te, J) {
|
|
11192
|
+
te.filters = te.filters.map((X) => X.id === J.payload.filterGroupId ? {
|
|
11193
|
+
...X,
|
|
11194
|
+
filters: X.filters.map(
|
|
11195
|
+
(re) => re.id === J.payload.filterId ? { ...re, enabledValues: J.payload.values } : re
|
|
11196
|
+
)
|
|
11197
|
+
} : X);
|
|
11198
|
+
}
|
|
11175
11199
|
function setCustomFilterGroupValueReducer(te, J) {
|
|
11176
11200
|
te.filters = te.filters.map((X) => X.id === J.payload.id ? {
|
|
11177
11201
|
...X,
|
|
@@ -11200,23 +11224,45 @@ const setMultipleOptionsFilterValue = (te, J) => {
|
|
|
11200
11224
|
enabled: J,
|
|
11201
11225
|
enabledValues: J ? [!0] : []
|
|
11202
11226
|
});
|
|
11203
|
-
function
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11227
|
+
function deleteDiagnosticFilterValueReducer(te, J) {
|
|
11228
|
+
te.filters.some(isDiagnosticFilter) && (te.filters = [...te.filters].map((re) => {
|
|
11229
|
+
if (isDiagnosticFilter(re)) {
|
|
11230
|
+
const ne = re.enabledValues.filter((oe) => {
|
|
11231
|
+
if (oe.codi === J.payload.diagnosticCodi)
|
|
11232
|
+
return !1;
|
|
11233
|
+
const de = re.enabledValues.some(
|
|
11234
|
+
(ue) => ue.codi === J.payload.diagnosticCodi && ue.evolucions?.some((he) => he.codi === oe.codi)
|
|
11235
|
+
), ce = re.enabledValues.some(
|
|
11236
|
+
(ue) => ue.codi === J.payload.diagnosticCodi && ue.relacions?.some((he) => he.codi === oe.codi)
|
|
11237
|
+
);
|
|
11238
|
+
return !de && !ce;
|
|
11239
|
+
});
|
|
11240
|
+
return { ...re, enabledValues: ne };
|
|
11241
|
+
}
|
|
11242
|
+
return re;
|
|
11243
|
+
}));
|
|
11244
|
+
}
|
|
11245
|
+
function setDiagnosticFilterValuesReducer(te, J) {
|
|
11246
|
+
if (te.filters.some(isDiagnosticFilter))
|
|
11247
|
+
te.filters = [...te.filters].map((re) => isDiagnosticFilter(re) ? { ...re, enabledValues: J.payload } : re);
|
|
11207
11248
|
else {
|
|
11208
|
-
const re =
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
...re,
|
|
11214
|
-
values: ne
|
|
11249
|
+
const re = {
|
|
11250
|
+
id: diagnosticsfilterId,
|
|
11251
|
+
title: "Diagnòstics",
|
|
11252
|
+
values: [],
|
|
11253
|
+
enabledValues: J.payload
|
|
11215
11254
|
};
|
|
11255
|
+
te.filters = [...te.filters, re];
|
|
11216
11256
|
}
|
|
11217
11257
|
}
|
|
11218
|
-
function
|
|
11219
|
-
te.filters =
|
|
11258
|
+
function resetFiltersReducer(te, J) {
|
|
11259
|
+
te.filters = te.filters.map((X) => X.id !== "common" && X.id !== "history-diagnostics" && X.id !== "history-up" ? {
|
|
11260
|
+
...X,
|
|
11261
|
+
filters: X.filters.map((re) => re.singleOption ? { ...re, enabled: !1 } : { ...re, enabled: !0, enabledValues: [] })
|
|
11262
|
+
} : X.id === "history-diagnostics" || X.id === "history-up" ? {
|
|
11263
|
+
...X,
|
|
11264
|
+
enabledValues: []
|
|
11265
|
+
} : X.id === "common" ? commonFilters[0] : X);
|
|
11220
11266
|
}
|
|
11221
11267
|
function addUpFiltersReducer(te, J) {
|
|
11222
11268
|
const X = te.filters.findIndex(isUpFilter);
|
|
@@ -11236,23 +11282,6 @@ function addUpFiltersReducer(te, J) {
|
|
|
11236
11282
|
function setUpFilterValuesReducer(te, J) {
|
|
11237
11283
|
te.filters = [...te.filters].map((X) => isUpFilter(X) ? { ...X, enabledValues: J.payload } : X);
|
|
11238
11284
|
}
|
|
11239
|
-
function resetFiltersReducer(te, J) {
|
|
11240
|
-
te.filters = te.filters.map((X) => X.id !== "common" && X.id !== "history-diagnostics" && X.id !== "history-up" ? {
|
|
11241
|
-
...X,
|
|
11242
|
-
filters: X.filters.map((re) => re.singleOption ? { ...re, enabled: !1 } : { ...re, enabled: !0, enabledValues: [] })
|
|
11243
|
-
} : X.id === "history-diagnostics" || X.id === "history-up" ? {
|
|
11244
|
-
...X,
|
|
11245
|
-
enabledValues: []
|
|
11246
|
-
} : X.id === "common" ? commonFilters[0] : X);
|
|
11247
|
-
}
|
|
11248
|
-
function setCustomFilterAllValuesReducer(te, J) {
|
|
11249
|
-
te.filters = te.filters.map((X) => X.id === J.payload.filterGroupId ? {
|
|
11250
|
-
...X,
|
|
11251
|
-
filters: X.filters.map(
|
|
11252
|
-
(re) => re.id === J.payload.filterId ? { ...re, enabledValues: J.payload.values } : re
|
|
11253
|
-
)
|
|
11254
|
-
} : X);
|
|
11255
|
-
}
|
|
11256
11285
|
const activityHistoryFiltersSlice = createSlice({
|
|
11257
11286
|
name: "activity-history-filters",
|
|
11258
11287
|
initialState: {
|
|
@@ -11267,8 +11296,8 @@ const activityHistoryFiltersSlice = createSlice({
|
|
|
11267
11296
|
setCustomFilterGroupValue: setCustomFilterGroupValueReducer,
|
|
11268
11297
|
setCustomFilterValue: setCustomFilterValueReducer,
|
|
11269
11298
|
setCustomFilterAllValues: setCustomFilterAllValuesReducer,
|
|
11270
|
-
addDiagnosticFilters: addDiagnosticFiltersReducer,
|
|
11271
11299
|
setDiagnosticFilterValues: setDiagnosticFilterValuesReducer,
|
|
11300
|
+
deleteDiagnosticFilterValue: deleteDiagnosticFilterValueReducer,
|
|
11272
11301
|
addUpFilters: addUpFiltersReducer,
|
|
11273
11302
|
setUpFilterValues: setUpFilterValuesReducer,
|
|
11274
11303
|
resetFilters: resetFiltersReducer
|
|
@@ -11347,7 +11376,7 @@ class InjectAsyncHistoryItemsHandler extends BaseHandler {
|
|
|
11347
11376
|
this.store.dispatch(addBusyHistoryItem(J.entityId));
|
|
11348
11377
|
try {
|
|
11349
11378
|
const X = await J.asyncDataProvider();
|
|
11350
|
-
validateAddAsyncCommand(J, X), this.api.broker.send(
|
|
11379
|
+
validateAddAsyncCommand(J, X), this.api.broker.send(this.api.broker.events.activityHistory.addHistoryItemsRequest, {
|
|
11351
11380
|
entityId: J.entityId,
|
|
11352
11381
|
entityDescription: J.entityDescription,
|
|
11353
11382
|
items: X,
|
|
@@ -11368,51 +11397,15 @@ class InjectAsyncHistoryItemsHandler extends BaseHandler {
|
|
|
11368
11397
|
}
|
|
11369
11398
|
}
|
|
11370
11399
|
}
|
|
11371
|
-
let request$
|
|
11372
|
-
const bootstrapInjectAsyncHistoryItems = (te) => {
|
|
11373
|
-
request$
|
|
11400
|
+
let request$k;
|
|
11401
|
+
const bootstrapInjectAsyncHistoryItems = (te, J) => {
|
|
11402
|
+
request$k = te.registerRequest(
|
|
11403
|
+
J.broker.events.activityHistory.injectAsyncHistoryItemsRequest,
|
|
11404
|
+
InjectAsyncHistoryItemsHandler
|
|
11405
|
+
);
|
|
11374
11406
|
}, teardownInjectAsyncHistoryItems = () => {
|
|
11375
|
-
request$
|
|
11376
|
-
}
|
|
11377
|
-
if (typeof te != "string" || te.trim() === "") return !1;
|
|
11378
|
-
const J = new Date(te);
|
|
11379
|
-
return J instanceof Date && !Number.isNaN(J.getTime());
|
|
11380
|
-
}, isValidBasicActivityHistoryItem = (te) => te && isString(te.id) && // Verifica que "id" esté informado
|
|
11381
|
-
isValidDateString(te.date), ensureAreValidBasicActivityHistoryItems = (te) => {
|
|
11382
|
-
if (!te.every(isValidBasicActivityHistoryItem))
|
|
11383
|
-
throw console.error("Invalid activity history items", te), new Error("Invalid activity history items");
|
|
11384
|
-
return te;
|
|
11385
|
-
}, notifyInvalidItem = (te) => {
|
|
11386
|
-
console.error("Invalid history item", te);
|
|
11387
|
-
}, validateAndFilterBasicItems = (te) => {
|
|
11388
|
-
const J = [];
|
|
11389
|
-
for (const X of te)
|
|
11390
|
-
isValidBasicActivityHistoryItem(X) ? J.push(X) : notifyInvalidItem(X);
|
|
11391
|
-
return J;
|
|
11392
|
-
}, handleAddDiagnosticsFilter = (te, J) => {
|
|
11393
|
-
const X = te.flatMap((re) => re.diagnostics ?? []).filter((re) => typeof re.codi == "string" && re.codi.trim() !== "").filter((re, ne, oe) => ne === oe.findIndex((de) => de.codi === re.codi));
|
|
11394
|
-
if (X.length > 0) {
|
|
11395
|
-
const re = {
|
|
11396
|
-
id: diagnosticsfilterId,
|
|
11397
|
-
title: "Diagnòstics",
|
|
11398
|
-
values: mapArrayToLabelValue(X, "descripcio", "codi"),
|
|
11399
|
-
enabledValues: []
|
|
11400
|
-
};
|
|
11401
|
-
J.dispatch(activityHistoryFiltersSlice.actions.addDiagnosticFilters(re));
|
|
11402
|
-
}
|
|
11403
|
-
}, getUpFilter = (te) => {
|
|
11404
|
-
const J = te.flatMap((X) => X.up ?? []).filter((X) => X?.id?.trim()).filter((X, re, ne) => re === ne.findIndex((oe) => oe.id === X.id));
|
|
11405
|
-
if (J.length > 0)
|
|
11406
|
-
return {
|
|
11407
|
-
id: upFilterId,
|
|
11408
|
-
title: "UP",
|
|
11409
|
-
values: mapArrayToLabelValue(J, "description", "id"),
|
|
11410
|
-
enabledValues: []
|
|
11411
|
-
};
|
|
11412
|
-
}, handleAddUpFilter = (te, J) => {
|
|
11413
|
-
const X = getUpFilter(te);
|
|
11414
|
-
X && J.dispatch(activityHistoryFiltersSlice.actions.addUpFilters(X));
|
|
11415
|
-
}, { addActivityHistoryItem } = activityHistoryCollectionsSlice.actions;
|
|
11407
|
+
request$k?.dispose();
|
|
11408
|
+
};
|
|
11416
11409
|
let pluginLocaleManager;
|
|
11417
11410
|
const initializeLocalization = async (te) => {
|
|
11418
11411
|
pluginLocaleManager = await te.createLocaleManager(locales);
|
|
@@ -11508,7 +11501,35 @@ const initializeLocalization = async (te) => {
|
|
|
11508
11501
|
}, existItemInCollection = (te, J, X) => {
|
|
11509
11502
|
const re = te?.[J];
|
|
11510
11503
|
return re?.items ? re.items.some((ne) => ne.id === X) : !1;
|
|
11511
|
-
}
|
|
11504
|
+
}, isString = (te) => typeof te == "string" && te.trim() !== "", isValidDateString = (te) => {
|
|
11505
|
+
if (typeof te != "string" || te.trim() === "") return !1;
|
|
11506
|
+
const J = new Date(te);
|
|
11507
|
+
return J instanceof Date && !Number.isNaN(J.getTime());
|
|
11508
|
+
}, isValidBasicActivityHistoryItem = (te) => te && isString(te.id) && // Verifica que "id" esté informado
|
|
11509
|
+
isValidDateString(te.date), ensureAreValidBasicActivityHistoryItems = (te) => {
|
|
11510
|
+
if (!te.every(isValidBasicActivityHistoryItem))
|
|
11511
|
+
throw console.error("Invalid activity history items", te), new Error("Invalid activity history items");
|
|
11512
|
+
return te;
|
|
11513
|
+
}, notifyInvalidItem = (te) => {
|
|
11514
|
+
console.error("Invalid history item", te);
|
|
11515
|
+
}, validateAndFilterBasicItems = (te) => {
|
|
11516
|
+
const J = [];
|
|
11517
|
+
for (const X of te)
|
|
11518
|
+
isValidBasicActivityHistoryItem(X) ? J.push(X) : notifyInvalidItem(X);
|
|
11519
|
+
return J;
|
|
11520
|
+
}, getUpFilter = (te) => {
|
|
11521
|
+
const J = te.flatMap((X) => X.up ?? []).filter((X) => X?.id?.trim()).filter((X, re, ne) => re === ne.findIndex((oe) => oe.id === X.id));
|
|
11522
|
+
if (J.length > 0)
|
|
11523
|
+
return {
|
|
11524
|
+
id: upFilterId,
|
|
11525
|
+
title: "UP",
|
|
11526
|
+
values: mapArrayToLabelValue(J, "description", "id"),
|
|
11527
|
+
enabledValues: []
|
|
11528
|
+
};
|
|
11529
|
+
}, handleAddUpFilter = (te, J) => {
|
|
11530
|
+
const X = getUpFilter(te);
|
|
11531
|
+
X && J.dispatch(activityHistoryFiltersSlice.actions.addUpFilters(X));
|
|
11532
|
+
}, { addActivityHistoryItem } = activityHistoryCollectionsSlice.actions;
|
|
11512
11533
|
class AddHistoryItemHandler extends BaseHandler {
|
|
11513
11534
|
async handle(J) {
|
|
11514
11535
|
try {
|
|
@@ -11518,7 +11539,7 @@ class AddHistoryItemHandler extends BaseHandler {
|
|
|
11518
11539
|
throw new Error(translate("error.itemAlreadyExists"));
|
|
11519
11540
|
if (!ne)
|
|
11520
11541
|
throw new Error(translate("error.filterNotInitialized"));
|
|
11521
|
-
|
|
11542
|
+
handleAddUpFilter([J.item], this.store), this.store.dispatch(
|
|
11522
11543
|
addActivityHistoryItem({
|
|
11523
11544
|
id: J.entityId,
|
|
11524
11545
|
item: J.item,
|
|
@@ -11530,24 +11551,25 @@ class AddHistoryItemHandler extends BaseHandler {
|
|
|
11530
11551
|
}
|
|
11531
11552
|
}
|
|
11532
11553
|
}
|
|
11533
|
-
let request$
|
|
11534
|
-
const bootstrapAddHistoryItem = (te) => {
|
|
11535
|
-
request$
|
|
11554
|
+
let request$j;
|
|
11555
|
+
const bootstrapAddHistoryItem = (te, J) => {
|
|
11556
|
+
request$j = te.registerRequest(J.broker.events.activityHistory.addHistoryItemRequest, AddHistoryItemHandler);
|
|
11536
11557
|
}, teardownAddHistoryItem = () => {
|
|
11537
|
-
request$
|
|
11538
|
-
}
|
|
11558
|
+
request$j?.dispose();
|
|
11559
|
+
};
|
|
11539
11560
|
class AddCustomFiltersCommand {
|
|
11540
11561
|
constructor(J) {
|
|
11541
11562
|
this.payload = J;
|
|
11542
11563
|
}
|
|
11543
11564
|
}
|
|
11565
|
+
const { addActivityHistoryItems } = activityHistoryCollectionsSlice.actions;
|
|
11544
11566
|
class AddHistoryItemsHandler extends BaseHandler {
|
|
11545
11567
|
async handle(J) {
|
|
11546
11568
|
try {
|
|
11547
11569
|
const X = validateAndFilterBasicItems(J.items), re = this.filterDuplicateItems(X, J.entityId);
|
|
11548
11570
|
if (!this.store.getState().activityHistoryFilters?.filters?.find((de) => de.id === J.entityId) && !J.filters)
|
|
11549
11571
|
throw new Error(translate("error.filterNotInitialized"));
|
|
11550
|
-
re.length > 0 && (
|
|
11572
|
+
re.length > 0 && (handleAddUpFilter(re, this.store), this.store.dispatch(
|
|
11551
11573
|
addActivityHistoryItems({
|
|
11552
11574
|
id: J.entityId,
|
|
11553
11575
|
items: re,
|
|
@@ -11568,11 +11590,11 @@ class AddHistoryItemsHandler extends BaseHandler {
|
|
|
11568
11590
|
return ne.length < J.length && this.api.notificationService.warning(translate("warning.someItemsAlreadyExist")), ne;
|
|
11569
11591
|
}
|
|
11570
11592
|
}
|
|
11571
|
-
let request$
|
|
11572
|
-
const bootstrapAddHistoryItems = (te) => {
|
|
11573
|
-
request$
|
|
11593
|
+
let request$i;
|
|
11594
|
+
const bootstrapAddHistoryItems = (te, J) => {
|
|
11595
|
+
request$i = te.registerRequest(J.broker.events.activityHistory.addHistoryItemsRequest, AddHistoryItemsHandler);
|
|
11574
11596
|
}, teardownAddHistoryItems = () => {
|
|
11575
|
-
request$
|
|
11597
|
+
request$i?.dispose();
|
|
11576
11598
|
}, styles$k = ".spinner-container{display:flex;flex-direction:row;align-items:center;gap:24px;justify-content:center;padding-top:16px}.skeleton-container{padding:20px;height:100%}", template$m = (te) => te.isCollectionInitialState ? ke$1`<div class="skeleton-container">${te.skeletons}</div>` : te.isSomeCollectionLoadedAndOtherLoading ? ke$1`<div class="spinner-container"><dss-spinner size="sm"></dss-spinner><div class="busy-description">${translate("busyEntriesLoading")}</div></div>` : D$5;
|
|
11577
11599
|
function connectedProperty(te, J = {}) {
|
|
11578
11600
|
return createConnectedProperty(store)(te, J);
|
|
@@ -11612,7 +11634,7 @@ class HandleHistoryItemsAddErrorHandler extends BaseHandler {
|
|
|
11612
11634
|
async handle(J) {
|
|
11613
11635
|
try {
|
|
11614
11636
|
const X = J.entities.map((re) => re.entityId);
|
|
11615
|
-
await this.dispatchRemoveErrorItems(X), this.api.broker.publish(this.api.broker.events.
|
|
11637
|
+
await this.dispatchRemoveErrorItems(X), this.api.broker.publish(this.api.broker.events.activityHistory.errorLoadingData, X);
|
|
11616
11638
|
} catch {
|
|
11617
11639
|
this.api.notificationService.error(translate("error.errorToRefresh"));
|
|
11618
11640
|
}
|
|
@@ -11622,11 +11644,11 @@ class HandleHistoryItemsAddErrorHandler extends BaseHandler {
|
|
|
11622
11644
|
this.store.dispatch(removeErrorHistoryItem(X));
|
|
11623
11645
|
}
|
|
11624
11646
|
}
|
|
11625
|
-
let request$
|
|
11647
|
+
let request$h;
|
|
11626
11648
|
const bootstrapHandleHistoryItemsAddError = (te) => {
|
|
11627
|
-
teardownHandleHistoryItemsAddError(), request$
|
|
11649
|
+
teardownHandleHistoryItemsAddError(), request$h = te.registerRequest(HandleHistoryItemsAddError, HandleHistoryItemsAddErrorHandler);
|
|
11628
11650
|
}, teardownHandleHistoryItemsAddError = () => {
|
|
11629
|
-
request$
|
|
11651
|
+
request$h?.dispose();
|
|
11630
11652
|
}, styles$j = ".wrapper{display:flex;flex-direction:column;align-items:center;gap:24px;width:484px;height:auto}.wrapper .content-options{display:flex;flex-direction:column;align-items:center;gap:16px}.wrapper .selector-options{display:flex;flex-direction:row;gap:16px}.wrapper .content-date{display:flex;flex-direction:column;align-items:center;gap:16px;height:124px}.wrapper .datepicker-canvas{display:flex;flex-direction:row;justify-content:center;align-content:center;gap:16px}.wrapper .actions{display:flex;flex-direction:row;align-items:center;justify-content:center;gap:16px}dss-datepicker{width:234px;height:48px;border-radius:var(--dss-radius-sm);border:var(--dss-border-width-sm);padding:var(--dss-spacing-sm);gap:var(--dss-spacing-xs);color:var(--color-neutral-100)}", template$l = (te) => {
|
|
11631
11653
|
const { arrayElements: J, text: X } = te;
|
|
11632
11654
|
return ke$1`
|
|
@@ -11738,133 +11760,12 @@ class ExportToPdfHandler extends ApiBaseHandler {
|
|
|
11738
11760
|
}
|
|
11739
11761
|
class ExportPdf {
|
|
11740
11762
|
}
|
|
11741
|
-
let request$
|
|
11763
|
+
let request$g;
|
|
11742
11764
|
const bootstrapExportPdf = (te) => {
|
|
11743
|
-
request$
|
|
11765
|
+
request$g = te.registerRequest(ExportPdf, ExportToPdfHandler);
|
|
11744
11766
|
}, teardownExportPdf = () => {
|
|
11745
|
-
request$
|
|
11746
|
-
}, 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 .custom-filter{display:flex;flex-direction:column;padding:6px 8px 6px var(--dss-spacing-xl)}.filter-group .custom-filter .custom-filter-content{display:flex;flex-direction:column;gap:8px}";
|
|
11747
|
-
/**
|
|
11748
|
-
* @license
|
|
11749
|
-
* Copyright 2021 Google LLC
|
|
11750
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
11751
|
-
*/
|
|
11752
|
-
function nn(te, J, X) {
|
|
11753
|
-
return te ? J(te) : X?.(te);
|
|
11754
|
-
}
|
|
11755
|
-
const filterTemplates = {
|
|
11756
|
-
[ActivityHistoryFilterType.Switch]: (te, J, X, re, ne) => ke$1`
|
|
11757
|
-
<dss-input-switch size="sm" @onChangeValue=${X} .checked=${re}>
|
|
11758
|
-
<input slot="input" id="switch-${te}" aria-label=${J} type="checkbox" ?disabled=${!ne}>
|
|
11759
|
-
<label slot="label" for="switch-${te}">${J || te}</label>
|
|
11760
|
-
</dss-input-switch>`,
|
|
11761
|
-
[ActivityHistoryFilterType.Checkbox]: (te, J, X, re, ne) => ke$1`
|
|
11762
|
-
<dss-checkbox variant="default" @onChange=${(oe) => X(oe)}>
|
|
11763
|
-
<input slot="input" id="checkboxStory-${te}" type="checkbox" .checked=${re} ?disabled=${!ne}>
|
|
11764
|
-
<label slot="label" for="checkboxStory-${te}">${J || te}</label>
|
|
11765
|
-
</dss-checkbox>`
|
|
11766
|
-
/* [ActivityHistoryFilterType.Dropdown]: (id, title, handleChange, isSelected, isEnabled) => html`
|
|
11767
|
-
<dss-input-dropdown type="default" @onChange=${(e) => handleChange(e)}>
|
|
11768
|
-
<input slot="input" id="dropdownStory-${id}" type="text" .checked=${isSelected} ?disabled=${!isEnabled}>
|
|
11769
|
-
<label slot="label" for="dropdownStory-${id}">${title || id}</label>
|
|
11770
|
-
</dss-input-dropdown>`, */
|
|
11771
|
-
}, getFilterTemplate = (te, J, X, re) => {
|
|
11772
|
-
const ne = !!X?.id && !!re, oe = generateId(), de = ne ? re.title || re.id : te.title, ce = (pe) => {
|
|
11773
|
-
te.singleOption ? J(X?.id, te.id, null, pe.detail) : ne && re ? J(X?.id, te.id, re.id, pe.detail) : J(te.id, pe.detail);
|
|
11774
|
-
}, ue = ne && re ? te.enabledValues?.includes(re.id) : te.enabled, he = ne && re || te.singleOption ? X.enabled : !0;
|
|
11775
|
-
return filterTemplates[te.type]?.(oe, de, ce, ue, he) || ke$1``;
|
|
11776
|
-
}, template$k = (te) => ke$1`
|
|
11777
|
-
<div class="filters-sidebar" ?expanded=${te.filtersExpanded} >
|
|
11778
|
-
${te.filtersExpanded ? ke$1`<div class="filters-sidebar-opened">${translate("filters.filters")}<dss-icon-button ?hidden=${te.wrapperMaximized} @click=${() => te._toggleFilters()} size="md" variant="primary" icon="keyboard_double_arrow_left"></dss-icon-button></div>
|
|
11779
|
-
<div class="filter-container">
|
|
11780
|
-
${Qt(te.commonFilters, (J) => ke$1`<div class="filter">${getFilterTemplate(J, te._onChangeCommonFilterValue.bind(te))}</div> `)}
|
|
11781
|
-
${te.diagnosticFilter && ke$1`<div class="filter">
|
|
11782
|
-
<dss-input-dropdown inputsize="md" icon="" multiple dropdownFixed type="default" .elements=${te.diagnosticFilter?.values} @onInputDropdownChange=${te._handleDiagnosticFilterChange} .selectedValue=${te.diagnosticFilterEnabledValues} selectorStyle=${"max-height: 450px"}>
|
|
11783
|
-
<label slot="label" for="diagnostic-filter">${te.diagnosticFilter.title}</label>
|
|
11784
|
-
<input id="diagnostic-filter" slot="input" type="text" class="dss-input" autocomplete="off"/>
|
|
11785
|
-
</dss-input-dropdown>
|
|
11786
|
-
</div>`}
|
|
11787
|
-
${te.upFilter && ke$1`<div class="filter">
|
|
11788
|
-
<dss-input-dropdown inputsize="md" icon="" multiple dropdownFixed type="default" .elements=${te.upFilter?.values} @onInputDropdownChange=${te._handleUpFilterChange} .selectedValue=${te.upFilterEnabledValues} selectorStyle=${"max-height: 450px"}>
|
|
11789
|
-
<label slot="label" for="up-filter">${te.upFilter.title}</label>
|
|
11790
|
-
<input id="up-filter" slot="input" type="text" class="dss-input" autocomplete="off"/>
|
|
11791
|
-
</dss-input-dropdown>
|
|
11792
|
-
</div>`}
|
|
11793
|
-
${Qt(
|
|
11794
|
-
te.customFilterGroups,
|
|
11795
|
-
(J) => ke$1`
|
|
11796
|
-
<div class="filter-group">
|
|
11797
|
-
<dss-input-switch size="sm" .checked=${J.enabled} @onChangeValue=${(X) => te._onChangeCustomFilterGroupValue(J.id, X.detail)}>
|
|
11798
|
-
<input slot="input" id="switch-${J.id}" aria-label=${J.title} type="checkbox">
|
|
11799
|
-
<label slot="label" for="switch-${J.id}">${J.title}</label>
|
|
11800
|
-
</dss-input-switch>
|
|
11801
|
-
${J?.filters && Qt(J.filters, (X) => customFilterTemplate(X, te, J))}
|
|
11802
|
-
</div> `
|
|
11803
|
-
)}
|
|
11804
|
-
</div> ` : ke$1`<dss-icon-button @click=${() => te._toggleFilters()} size="md" variant="primary" icon="keyboard_double_arrow_right"></dss-icon-button>`}
|
|
11805
|
-
</div>
|
|
11806
|
-
`, customFilterTemplate = (te, J, X) => {
|
|
11807
|
-
if (te.type === ActivityHistoryFilterType.Dropdown) {
|
|
11808
|
-
const re = te?.options.map((ne) => ({ value: ne.id, label: ne.title || ne.id }));
|
|
11809
|
-
return nn(
|
|
11810
|
-
re.length > 0,
|
|
11811
|
-
() => ke$1`
|
|
11812
|
-
<dss-input-dropdown
|
|
11813
|
-
inputsize="md"
|
|
11814
|
-
icon=""
|
|
11815
|
-
multiple
|
|
11816
|
-
dropdownFixed
|
|
11817
|
-
type="default"
|
|
11818
|
-
.elements=${re}
|
|
11819
|
-
@onInputDropdownChange=${(ne) => J._onChangeCustomFilterAllValues(X.id, te.id, ne.detail.selectedValue)}
|
|
11820
|
-
.selectedValue=${te.enabledValues}
|
|
11821
|
-
selectorStyle="max-height: 450px"
|
|
11822
|
-
>
|
|
11823
|
-
<label slot="label">${te.title}</label>
|
|
11824
|
-
<input slot="input" type="text" class="dss-input" autocomplete="off" />
|
|
11825
|
-
</dss-input-dropdown>
|
|
11826
|
-
`
|
|
11827
|
-
);
|
|
11828
|
-
}
|
|
11829
|
-
return te.singleOption ? getFilterTemplate(te, J._onChangeCustomFilterValue.bind(J), X) : nn(
|
|
11830
|
-
!!te.options?.length,
|
|
11831
|
-
() => ke$1`
|
|
11832
|
-
<primaria-accordion isOpen>
|
|
11833
|
-
<div class="custom-filter-title" slot="title">${te.title}</div>
|
|
11834
|
-
<div class="custom-filter-content" slot="content">
|
|
11835
|
-
${te.options.map(
|
|
11836
|
-
(re) => getFilterTemplate(te, J._onChangeCustomFilterValue.bind(J), X, re)
|
|
11837
|
-
)}
|
|
11838
|
-
</div>
|
|
11839
|
-
</primaria-accordion>
|
|
11840
|
-
`
|
|
11841
|
-
);
|
|
11767
|
+
request$g?.dispose();
|
|
11842
11768
|
};
|
|
11843
|
-
class SetCustomFilterGroup {
|
|
11844
|
-
constructor(J) {
|
|
11845
|
-
this.payload = J;
|
|
11846
|
-
}
|
|
11847
|
-
}
|
|
11848
|
-
class SetCommonFilter {
|
|
11849
|
-
constructor(J) {
|
|
11850
|
-
this.payload = J;
|
|
11851
|
-
}
|
|
11852
|
-
}
|
|
11853
|
-
const activityHistoryFiltersSelector = (te) => te.activityHistoryFilters.filters, activityHistoryCommonFiltersSelector = createSelector(
|
|
11854
|
-
activityHistoryFiltersSelector,
|
|
11855
|
-
(te) => te.find(isCommonFilterGroup)?.filters || []
|
|
11856
|
-
), activityHistoryEnabledCommonFiltersSelector = createSelector(
|
|
11857
|
-
activityHistoryCommonFiltersSelector,
|
|
11858
|
-
(te) => te.filter((J) => J.enabled)
|
|
11859
|
-
), areCommonFiltersActive = createSelector(
|
|
11860
|
-
activityHistoryEnabledCommonFiltersSelector,
|
|
11861
|
-
(te) => !!te.length
|
|
11862
|
-
);
|
|
11863
|
-
class SetCustomFilterValue {
|
|
11864
|
-
constructor(J) {
|
|
11865
|
-
this.payload = J;
|
|
11866
|
-
}
|
|
11867
|
-
}
|
|
11868
11769
|
function getUniqueObjects(te, J, X, re) {
|
|
11869
11770
|
const ne = `Sense ${re.toLocaleLowerCase()}`, oe = /* @__PURE__ */ new Map();
|
|
11870
11771
|
let de = !1;
|
|
@@ -11959,7 +11860,16 @@ class ComposedTypeSpec extends Spec {
|
|
|
11959
11860
|
return X.length === 0 ? !0 : X.reduce((ne, oe) => ne.or(new TypeSpec(oe)), new FalseSpec()).isSatisfiedBy(J);
|
|
11960
11861
|
}
|
|
11961
11862
|
}
|
|
11962
|
-
const
|
|
11863
|
+
const activityHistoryFiltersSelector = (te) => te.activityHistoryFilters.filters, activityHistoryCommonFiltersSelector = createSelector(
|
|
11864
|
+
activityHistoryFiltersSelector,
|
|
11865
|
+
(te) => te.find(isCommonFilterGroup)?.filters || []
|
|
11866
|
+
), activityHistoryEnabledCommonFiltersSelector = createSelector(
|
|
11867
|
+
activityHistoryCommonFiltersSelector,
|
|
11868
|
+
(te) => te.filter((J) => J.enabled)
|
|
11869
|
+
), areCommonFiltersActive = createSelector(
|
|
11870
|
+
activityHistoryEnabledCommonFiltersSelector,
|
|
11871
|
+
(te) => !!te.length
|
|
11872
|
+
), activityHistoryCustomFilterGroupsSelector = createSelector(
|
|
11963
11873
|
activityHistoryFiltersSelector,
|
|
11964
11874
|
(te) => te.filter(isCustomFilter).sort(sortBySortProperty)
|
|
11965
11875
|
), sortBySortProperty = (te, J) => Number(te.sort) - Number(J.sort), areCustomFiltersActive = createSelector(
|
|
@@ -12075,7 +11985,19 @@ const groupActivityHistoryItems = (te) => {
|
|
|
12075
11985
|
);
|
|
12076
11986
|
class DiagnosticCodeSpec extends Spec {
|
|
12077
11987
|
constructor(J) {
|
|
12078
|
-
super(), this.diagnosticCodes = J;
|
|
11988
|
+
super(), this.diagnosticCodes = this.extractAllCodes(J);
|
|
11989
|
+
}
|
|
11990
|
+
extractAllCodes(J) {
|
|
11991
|
+
const X = /* @__PURE__ */ new Set();
|
|
11992
|
+
for (const re of J) {
|
|
11993
|
+
if (re.codi && X.add(re.codi), re.evolucions && Array.isArray(re.evolucions))
|
|
11994
|
+
for (const ne of re.evolucions)
|
|
11995
|
+
ne.codi && X.add(ne.codi);
|
|
11996
|
+
if (re.relacions && Array.isArray(re.relacions))
|
|
11997
|
+
for (const ne of re.relacions)
|
|
11998
|
+
ne.codi && X.add(ne.codi);
|
|
11999
|
+
}
|
|
12000
|
+
return Array.from(X);
|
|
12079
12001
|
}
|
|
12080
12002
|
isSatisfiedBy(J) {
|
|
12081
12003
|
return this.diagnosticCodes?.length ? (J.diagnostics ?? []).some((re) => this.diagnosticCodes.includes(re.codi)) : !0;
|
|
@@ -12136,21 +12058,126 @@ const activityHistoryCollectionsSelector = (te) => te.activityHistoryCollections
|
|
|
12136
12058
|
return sortGroupsByMostRecentDate(ce);
|
|
12137
12059
|
}
|
|
12138
12060
|
);
|
|
12139
|
-
class
|
|
12061
|
+
class SetCommonFilter {
|
|
12140
12062
|
constructor(J) {
|
|
12141
12063
|
this.payload = J;
|
|
12142
12064
|
}
|
|
12143
12065
|
}
|
|
12144
|
-
class
|
|
12066
|
+
class SetCustomFilterAllValues {
|
|
12145
12067
|
constructor(J) {
|
|
12146
12068
|
this.payload = J;
|
|
12147
12069
|
}
|
|
12148
12070
|
}
|
|
12149
|
-
class
|
|
12071
|
+
class SetCustomFilterGroup {
|
|
12072
|
+
constructor(J) {
|
|
12073
|
+
this.payload = J;
|
|
12074
|
+
}
|
|
12075
|
+
}
|
|
12076
|
+
class SetCustomFilterValue {
|
|
12077
|
+
constructor(J) {
|
|
12078
|
+
this.payload = J;
|
|
12079
|
+
}
|
|
12080
|
+
}
|
|
12081
|
+
class SetUpFiltersCommand {
|
|
12150
12082
|
constructor(J) {
|
|
12151
12083
|
this.payload = J;
|
|
12152
12084
|
}
|
|
12153
12085
|
}
|
|
12086
|
+
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 .custom-filter{display:flex;flex-direction:column;padding:6px 8px 6px var(--dss-spacing-xl)}.filter-group .custom-filter .custom-filter-content{display:flex;flex-direction:column;gap:8px}";
|
|
12087
|
+
/**
|
|
12088
|
+
* @license
|
|
12089
|
+
* Copyright 2021 Google LLC
|
|
12090
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
12091
|
+
*/
|
|
12092
|
+
function nn(te, J, X) {
|
|
12093
|
+
return te ? J(te) : X?.(te);
|
|
12094
|
+
}
|
|
12095
|
+
const filterTemplates = {
|
|
12096
|
+
[ActivityHistoryFilterType.Switch]: (te, J, X, re, ne) => ke$1`
|
|
12097
|
+
<dss-input-switch size="sm" @onChangeValue=${X} .checked=${re}>
|
|
12098
|
+
<input slot="input" id="switch-${te}" aria-label=${J} type="checkbox" ?disabled=${!ne}>
|
|
12099
|
+
<label slot="label" for="switch-${te}">${J || te}</label>
|
|
12100
|
+
</dss-input-switch>`,
|
|
12101
|
+
[ActivityHistoryFilterType.Checkbox]: (te, J, X, re, ne) => ke$1`
|
|
12102
|
+
<dss-checkbox variant="default" @onChange=${(oe) => X(oe)}>
|
|
12103
|
+
<input slot="input" id="checkboxStory-${te}" type="checkbox" .checked=${re} ?disabled=${!ne}>
|
|
12104
|
+
<label slot="label" for="checkboxStory-${te}">${J || te}</label>
|
|
12105
|
+
</dss-checkbox>`
|
|
12106
|
+
/* [ActivityHistoryFilterType.Dropdown]: (id, title, handleChange, isSelected, isEnabled) => html`
|
|
12107
|
+
<dss-input-dropdown type="default" @onChange=${(e) => handleChange(e)}>
|
|
12108
|
+
<input slot="input" id="dropdownStory-${id}" type="text" .checked=${isSelected} ?disabled=${!isEnabled}>
|
|
12109
|
+
<label slot="label" for="dropdownStory-${id}">${title || id}</label>
|
|
12110
|
+
</dss-input-dropdown>`, */
|
|
12111
|
+
}, getFilterTemplate = (te, J, X, re) => {
|
|
12112
|
+
const ne = !!X?.id && !!re, oe = generateId(), de = ne ? re.title || re.id : te.title, ce = (pe) => {
|
|
12113
|
+
te.singleOption ? J(X?.id, te.id, null, pe.detail) : ne && re ? J(X?.id, te.id, re.id, pe.detail) : J(te.id, pe.detail);
|
|
12114
|
+
}, ue = ne && re ? te.enabledValues?.includes(re.id) : te.enabled, he = ne && re || te.singleOption ? X.enabled : !0;
|
|
12115
|
+
return filterTemplates[te.type]?.(oe, de, ce, ue, he) || ke$1``;
|
|
12116
|
+
}, template$k = (te) => ke$1`
|
|
12117
|
+
<div class="filters-sidebar" ?expanded=${te.filtersExpanded} >
|
|
12118
|
+
${te.filtersExpanded ? ke$1`<div class="filters-sidebar-opened">${translate("filters.filters")}<dss-icon-button ?hidden=${te.wrapperMaximized} @click=${() => te._toggleFilters()} size="md" variant="primary" icon="keyboard_double_arrow_left"></dss-icon-button></div>
|
|
12119
|
+
<div class="filter-container">
|
|
12120
|
+
${Qt(te.commonFilters, (J) => ke$1`<div class="filter">${getFilterTemplate(J, te._onChangeCommonFilterValue.bind(te))}</div> `)}
|
|
12121
|
+
<!-- Regió per al filtre de diagnostics extern -->
|
|
12122
|
+
<div class="filter">
|
|
12123
|
+
<primaria-region name=${te.api.regionManager.regions.activityHistory.customFilters}></primaria-region>
|
|
12124
|
+
</div>
|
|
12125
|
+
${te.upFilter && ke$1`<div class="filter">
|
|
12126
|
+
<dss-input-dropdown inputsize="md" icon="" multiple dropdownFixed type="default" .elements=${te.upFilter?.values} @onInputDropdownChange=${te._handleUpFilterChange} .selectedValue=${te.upFilterEnabledValues} selectorStyle=${"max-height: 450px"}>
|
|
12127
|
+
<label slot="label" for="up-filter">${te.upFilter.title}</label>
|
|
12128
|
+
<input id="up-filter" slot="input" type="text" class="dss-input" autocomplete="off"/>
|
|
12129
|
+
</dss-input-dropdown>
|
|
12130
|
+
</div>`}
|
|
12131
|
+
${Qt(
|
|
12132
|
+
te.customFilterGroups,
|
|
12133
|
+
(J) => ke$1`
|
|
12134
|
+
<div class="filter-group">
|
|
12135
|
+
<dss-input-switch size="sm" .checked=${J.enabled} @onChangeValue=${(X) => te._onChangeCustomFilterGroupValue(J.id, X.detail)}>
|
|
12136
|
+
<input slot="input" id="switch-${J.id}" aria-label=${J.title} type="checkbox">
|
|
12137
|
+
<label slot="label" for="switch-${J.id}">${J.title}</label>
|
|
12138
|
+
</dss-input-switch>
|
|
12139
|
+
${J?.filters && Qt(J.filters, (X) => customFilterTemplate(X, te, J))}
|
|
12140
|
+
</div> `
|
|
12141
|
+
)}
|
|
12142
|
+
</div> ` : ke$1`<dss-icon-button @click=${() => te._toggleFilters()} size="md" variant="primary" icon="keyboard_double_arrow_right"></dss-icon-button>`}
|
|
12143
|
+
</div>
|
|
12144
|
+
`, customFilterTemplate = (te, J, X) => {
|
|
12145
|
+
if (te.type === ActivityHistoryFilterType.Dropdown) {
|
|
12146
|
+
const re = te?.options.map((ne) => ({ value: ne.id, label: ne.title || ne.id }));
|
|
12147
|
+
return nn(
|
|
12148
|
+
re.length > 0,
|
|
12149
|
+
() => ke$1`
|
|
12150
|
+
<dss-input-dropdown
|
|
12151
|
+
inputsize="md"
|
|
12152
|
+
icon=""
|
|
12153
|
+
multiple
|
|
12154
|
+
dropdownFixed
|
|
12155
|
+
type="default"
|
|
12156
|
+
.elements=${re}
|
|
12157
|
+
@onInputDropdownChange=${(ne) => J._onChangeCustomFilterAllValues(X.id, te.id, ne.detail.selectedValue)}
|
|
12158
|
+
.selectedValue=${te.enabledValues}
|
|
12159
|
+
selectorStyle="max-height: 450px"
|
|
12160
|
+
>
|
|
12161
|
+
<label slot="label">${te.title}</label>
|
|
12162
|
+
<input slot="input" type="text" class="dss-input" autocomplete="off" />
|
|
12163
|
+
</dss-input-dropdown>
|
|
12164
|
+
`
|
|
12165
|
+
);
|
|
12166
|
+
}
|
|
12167
|
+
return te.singleOption ? getFilterTemplate(te, J._onChangeCustomFilterValue.bind(J), X) : nn(
|
|
12168
|
+
!!te.options?.length,
|
|
12169
|
+
() => ke$1`
|
|
12170
|
+
<primaria-accordion isOpen>
|
|
12171
|
+
<div class="custom-filter-title" slot="title">${te.title}</div>
|
|
12172
|
+
<div class="custom-filter-content" slot="content">
|
|
12173
|
+
${te.options.map(
|
|
12174
|
+
(re) => getFilterTemplate(te, J._onChangeCustomFilterValue.bind(J), X, re)
|
|
12175
|
+
)}
|
|
12176
|
+
</div>
|
|
12177
|
+
</primaria-accordion>
|
|
12178
|
+
`
|
|
12179
|
+
);
|
|
12180
|
+
};
|
|
12154
12181
|
var __defProp$m = Object.defineProperty, __getOwnPropDesc$g = Object.getOwnPropertyDescriptor, __decorateClass$s = (te, J, X, re) => {
|
|
12155
12182
|
for (var ne = re > 1 ? void 0 : re ? __getOwnPropDesc$g(J, X) : J, oe = te.length - 1, de; oe >= 0; oe--)
|
|
12156
12183
|
(de = te[oe]) && (ne = (re ? de(J, X, ne) : de(ne)) || ne);
|
|
@@ -12194,10 +12221,6 @@ let ActivityHistoryFilters = class extends h$q {
|
|
|
12194
12221
|
})
|
|
12195
12222
|
);
|
|
12196
12223
|
}
|
|
12197
|
-
_handleDiagnosticFilterChange(te) {
|
|
12198
|
-
const J = te.detail.selectedValue;
|
|
12199
|
-
this.api.broker.send(new SetDiagnosticFiltersCommand(J));
|
|
12200
|
-
}
|
|
12201
12224
|
_handleUpFilterChange(te) {
|
|
12202
12225
|
const J = te.detail.selectedValue;
|
|
12203
12226
|
this.api.broker.send(new SetUpFiltersCommand(J));
|
|
@@ -12246,11 +12269,11 @@ class SetCommonFilterHandler extends StoreBaseHandler {
|
|
|
12246
12269
|
}
|
|
12247
12270
|
}
|
|
12248
12271
|
}
|
|
12249
|
-
let request$
|
|
12272
|
+
let request$f;
|
|
12250
12273
|
const bootstrapSetCommonFilter = (te) => {
|
|
12251
|
-
request$
|
|
12274
|
+
request$f = te.registerRequest(SetCommonFilter, SetCommonFilterHandler);
|
|
12252
12275
|
}, teardownSetCommonFilter = () => {
|
|
12253
|
-
request$
|
|
12276
|
+
request$f?.dispose();
|
|
12254
12277
|
}, { addCustomFilters } = activityHistoryFiltersSlice.actions;
|
|
12255
12278
|
class AddCustomFiltersHandler extends StoreBaseHandler {
|
|
12256
12279
|
async handle(J) {
|
|
@@ -12261,11 +12284,26 @@ class AddCustomFiltersHandler extends StoreBaseHandler {
|
|
|
12261
12284
|
}
|
|
12262
12285
|
}
|
|
12263
12286
|
}
|
|
12264
|
-
let request$
|
|
12287
|
+
let request$e;
|
|
12265
12288
|
const bootstrapAddCustomFilter = (te) => {
|
|
12266
|
-
request$
|
|
12289
|
+
request$e = te.registerRequest(AddCustomFiltersCommand, AddCustomFiltersHandler);
|
|
12267
12290
|
}, teardownAddCustomFilter = () => {
|
|
12268
|
-
request$
|
|
12291
|
+
request$e?.dispose();
|
|
12292
|
+
}, { setCustomFilterAllValues } = activityHistoryFiltersSlice.actions;
|
|
12293
|
+
class SetCustomFilterAllValuesHandler extends StoreBaseHandler {
|
|
12294
|
+
async handle(J) {
|
|
12295
|
+
try {
|
|
12296
|
+
this.store.dispatch(setCustomFilterAllValues(J.payload));
|
|
12297
|
+
} catch (X) {
|
|
12298
|
+
console.log(X.message);
|
|
12299
|
+
}
|
|
12300
|
+
}
|
|
12301
|
+
}
|
|
12302
|
+
let request$d;
|
|
12303
|
+
const bootstrapSetCustomFilterAllValues = (te) => {
|
|
12304
|
+
request$d = te.registerRequest(SetCustomFilterAllValues, SetCustomFilterAllValuesHandler);
|
|
12305
|
+
}, teardownSetCustomFilterAllValues = () => {
|
|
12306
|
+
request$d?.dispose();
|
|
12269
12307
|
}, { setCustomFilterGroupValue } = activityHistoryFiltersSlice.actions;
|
|
12270
12308
|
class SetCustomFilterGroupHandler extends StoreBaseHandler {
|
|
12271
12309
|
async handle(J) {
|
|
@@ -12276,11 +12314,11 @@ class SetCustomFilterGroupHandler extends StoreBaseHandler {
|
|
|
12276
12314
|
}
|
|
12277
12315
|
}
|
|
12278
12316
|
}
|
|
12279
|
-
let request$
|
|
12317
|
+
let request$c;
|
|
12280
12318
|
const bootstrapSetCustomFilterGroup = (te) => {
|
|
12281
|
-
request$
|
|
12319
|
+
request$c = te.registerRequest(SetCustomFilterGroup, SetCustomFilterGroupHandler);
|
|
12282
12320
|
}, teardownSetCustomFilterGroup = () => {
|
|
12283
|
-
request$
|
|
12321
|
+
request$c?.dispose();
|
|
12284
12322
|
}, { setCustomFilterValue } = activityHistoryFiltersSlice.actions;
|
|
12285
12323
|
class SetCustomFilterValueHandler extends StoreBaseHandler {
|
|
12286
12324
|
async handle(J) {
|
|
@@ -12291,46 +12329,80 @@ class SetCustomFilterValueHandler extends StoreBaseHandler {
|
|
|
12291
12329
|
}
|
|
12292
12330
|
}
|
|
12293
12331
|
}
|
|
12294
|
-
let request$
|
|
12332
|
+
let request$b;
|
|
12295
12333
|
const bootstrapSetCustomFilterValue = (te) => {
|
|
12296
|
-
request$
|
|
12334
|
+
request$b = te.registerRequest(SetCustomFilterValue, SetCustomFilterValueHandler);
|
|
12297
12335
|
}, teardownSetCustomFilterValue = () => {
|
|
12298
|
-
request$
|
|
12299
|
-
}, {
|
|
12300
|
-
class
|
|
12336
|
+
request$b?.dispose();
|
|
12337
|
+
}, { deleteDiagnosticFilterValue } = activityHistoryFiltersSlice.actions;
|
|
12338
|
+
class DeleteDiagnosticFilterValueHandler extends BaseHandler {
|
|
12301
12339
|
async handle(J) {
|
|
12302
12340
|
try {
|
|
12303
|
-
this.store.
|
|
12341
|
+
const re = diagnosticFilterEnabledValuesSelector(this.store.getState()).find((ne) => ne.codi === J.payload.diagnosticCodi);
|
|
12342
|
+
if (re) {
|
|
12343
|
+
const { evolucions: ne, relacions: oe, ...de } = re;
|
|
12344
|
+
this.api.broker.publish(this.api.broker.events.activityHistory.diagnosticFilterDeactivated, {
|
|
12345
|
+
diagnostic: de
|
|
12346
|
+
});
|
|
12347
|
+
}
|
|
12348
|
+
this.store.dispatch(deleteDiagnosticFilterValue(J.payload));
|
|
12304
12349
|
} catch (X) {
|
|
12305
|
-
console.
|
|
12350
|
+
console.error(X.message);
|
|
12306
12351
|
}
|
|
12307
12352
|
}
|
|
12308
12353
|
}
|
|
12309
|
-
class
|
|
12354
|
+
class DeleteDiagnosticFilterValueCommand {
|
|
12310
12355
|
constructor(J) {
|
|
12311
12356
|
this.payload = J;
|
|
12312
12357
|
}
|
|
12313
12358
|
}
|
|
12314
|
-
let
|
|
12315
|
-
const
|
|
12316
|
-
|
|
12317
|
-
},
|
|
12318
|
-
|
|
12359
|
+
let deleteFilterValueRequest;
|
|
12360
|
+
const bootstrapDeleteDiagnosticFilterValue = (te) => {
|
|
12361
|
+
deleteFilterValueRequest = te.registerRequest(DeleteDiagnosticFilterValueCommand, DeleteDiagnosticFilterValueHandler);
|
|
12362
|
+
}, teardownDeleteDiagnosticFilterValue = () => {
|
|
12363
|
+
deleteFilterValueRequest?.dispose();
|
|
12319
12364
|
}, { setDiagnosticFilterValues } = activityHistoryFiltersSlice.actions;
|
|
12320
|
-
class
|
|
12365
|
+
class SetDiagnosticFilterValuesHandler extends StoreBaseHandler {
|
|
12321
12366
|
async handle(J) {
|
|
12322
12367
|
try {
|
|
12323
|
-
this.store.dispatch(setDiagnosticFilterValues(J.payload));
|
|
12368
|
+
this.store.dispatch(setDiagnosticFilterValues(J.payload.diagnostics));
|
|
12324
12369
|
} catch (X) {
|
|
12325
|
-
console.
|
|
12370
|
+
console.error(X.message);
|
|
12326
12371
|
}
|
|
12327
12372
|
}
|
|
12328
12373
|
}
|
|
12329
|
-
|
|
12374
|
+
class SetDiagnosticFiltersValuesCommand {
|
|
12375
|
+
constructor(J) {
|
|
12376
|
+
this.payload = J;
|
|
12377
|
+
}
|
|
12378
|
+
}
|
|
12379
|
+
let setFiltersValueRequest;
|
|
12330
12380
|
const bootstrapSetDiagnosticFilter = (te) => {
|
|
12331
|
-
|
|
12381
|
+
setFiltersValueRequest = te.registerRequest(SetDiagnosticFiltersValuesCommand, SetDiagnosticFilterValuesHandler);
|
|
12332
12382
|
}, teardownSetDiagnosticFilter = () => {
|
|
12333
|
-
|
|
12383
|
+
setFiltersValueRequest?.dispose();
|
|
12384
|
+
}, subscribeDiagnosticFilters = (te) => {
|
|
12385
|
+
te.broker.subscribe("cipds_diagnostic_filter_historic_requested", (J) => {
|
|
12386
|
+
te.broker.send(new SetDiagnosticFiltersValuesCommand(J));
|
|
12387
|
+
});
|
|
12388
|
+
};
|
|
12389
|
+
class ResetFiltersCommand {
|
|
12390
|
+
}
|
|
12391
|
+
const { resetFilters } = activityHistoryFiltersSlice.actions;
|
|
12392
|
+
class ResetFiltersHandler extends BaseHandler {
|
|
12393
|
+
async handle(J) {
|
|
12394
|
+
try {
|
|
12395
|
+
this.api.broker.publish(this.api.broker.events.activityHistory.filtersCleaned), this.store.dispatch(resetFilters());
|
|
12396
|
+
} catch (X) {
|
|
12397
|
+
console.log(X.message);
|
|
12398
|
+
}
|
|
12399
|
+
}
|
|
12400
|
+
}
|
|
12401
|
+
let request$a;
|
|
12402
|
+
const bootstrapResetFilters = (te) => {
|
|
12403
|
+
request$a = te.registerRequest(ResetFiltersCommand, ResetFiltersHandler);
|
|
12404
|
+
}, teardownResetFilters = () => {
|
|
12405
|
+
request$a?.dispose();
|
|
12334
12406
|
}, { addUpFilters } = activityHistoryFiltersSlice.actions;
|
|
12335
12407
|
class AddUpFiltersHandler extends StoreBaseHandler {
|
|
12336
12408
|
async handle(J) {
|
|
@@ -12346,11 +12418,11 @@ class AddUpFiltersCommand {
|
|
|
12346
12418
|
this.payload = J;
|
|
12347
12419
|
}
|
|
12348
12420
|
}
|
|
12349
|
-
let request$
|
|
12421
|
+
let request$9;
|
|
12350
12422
|
const bootstrapAddUpFilter = (te) => {
|
|
12351
|
-
request$
|
|
12423
|
+
request$9 = te.registerRequest(AddUpFiltersCommand, AddUpFiltersHandler);
|
|
12352
12424
|
}, teardownAddUpFilter = () => {
|
|
12353
|
-
request$
|
|
12425
|
+
request$9?.dispose();
|
|
12354
12426
|
}, { setUpFilterValues } = activityHistoryFiltersSlice.actions;
|
|
12355
12427
|
class SetUpFiltersHandler extends StoreBaseHandler {
|
|
12356
12428
|
async handle(J) {
|
|
@@ -12361,48 +12433,15 @@ class SetUpFiltersHandler extends StoreBaseHandler {
|
|
|
12361
12433
|
}
|
|
12362
12434
|
}
|
|
12363
12435
|
}
|
|
12364
|
-
let request$
|
|
12436
|
+
let request$8;
|
|
12365
12437
|
const bootstrapSetUpFilter = (te) => {
|
|
12366
|
-
request$
|
|
12438
|
+
request$8 = te.registerRequest(SetUpFiltersCommand, SetUpFiltersHandler);
|
|
12367
12439
|
}, teardownSetUpFilter = () => {
|
|
12368
|
-
request$a?.dispose();
|
|
12369
|
-
};
|
|
12370
|
-
class ResetFiltersCommand {
|
|
12371
|
-
}
|
|
12372
|
-
const { resetFilters } = activityHistoryFiltersSlice.actions;
|
|
12373
|
-
class ResetFiltersHandler extends StoreBaseHandler {
|
|
12374
|
-
async handle(J) {
|
|
12375
|
-
try {
|
|
12376
|
-
this.store.dispatch(resetFilters());
|
|
12377
|
-
} catch (X) {
|
|
12378
|
-
console.log(X.message);
|
|
12379
|
-
}
|
|
12380
|
-
}
|
|
12381
|
-
}
|
|
12382
|
-
let request$9;
|
|
12383
|
-
const bootstrapResetFilters = (te) => {
|
|
12384
|
-
request$9 = te.registerRequest(ResetFiltersCommand, ResetFiltersHandler);
|
|
12385
|
-
}, teardownResetFilters = () => {
|
|
12386
|
-
request$9?.dispose();
|
|
12387
|
-
}, { setCustomFilterAllValues } = activityHistoryFiltersSlice.actions;
|
|
12388
|
-
class SetCustomFilterAllValuesHandler extends StoreBaseHandler {
|
|
12389
|
-
async handle(J) {
|
|
12390
|
-
try {
|
|
12391
|
-
this.store.dispatch(setCustomFilterAllValues(J.payload));
|
|
12392
|
-
} catch (X) {
|
|
12393
|
-
console.log(X.message);
|
|
12394
|
-
}
|
|
12395
|
-
}
|
|
12396
|
-
}
|
|
12397
|
-
let request$8;
|
|
12398
|
-
const bootstrapSetCustomFilterAllValues = (te) => {
|
|
12399
|
-
request$8 = te.registerRequest(SetCustomFilterAllValues, SetCustomFilterAllValuesHandler);
|
|
12400
|
-
}, teardownSetCustomFilterAllValues = () => {
|
|
12401
12440
|
request$8?.dispose();
|
|
12402
|
-
}, bootstrapFilters = (te) => {
|
|
12403
|
-
bootstrapSetCommonFilter(te), bootstrapAddCustomFilter(te), bootstrapSetCustomFilterGroup(te), bootstrapSetCustomFilterValue(te), bootstrapSetCustomFilterAllValues(te),
|
|
12441
|
+
}, bootstrapFilters = (te, J) => {
|
|
12442
|
+
bootstrapSetCommonFilter(te), bootstrapAddCustomFilter(te), bootstrapSetCustomFilterGroup(te), bootstrapSetCustomFilterValue(te), bootstrapSetCustomFilterAllValues(te), bootstrapSetDiagnosticFilter(te), bootstrapDeleteDiagnosticFilterValue(te), bootstrapAddUpFilter(te), bootstrapSetUpFilter(te), bootstrapResetFilters(te), subscribeDiagnosticFilters(J);
|
|
12404
12443
|
}, teardownFilters = () => {
|
|
12405
|
-
teardownSetCommonFilter(), teardownAddCustomFilter(), teardownSetCustomFilterGroup(), teardownSetCustomFilterValue(), teardownSetCustomFilterAllValues(),
|
|
12444
|
+
teardownSetCommonFilter(), teardownAddCustomFilter(), teardownSetCustomFilterGroup(), teardownSetCustomFilterValue(), teardownSetCustomFilterAllValues(), teardownSetDiagnosticFilter(), teardownDeleteDiagnosticFilterValue(), teardownAddUpFilter(), teardownSetUpFilter(), teardownResetFilters();
|
|
12406
12445
|
}, styles$h = ":host{min-height:1px;display:flex;flex-direction:column;flex:1 1 0%}.virtual-container{height:100%;position:relative}.virtual-viewport{height:100%;overflow:auto;padding-inline:16px}.virtual-content{position:relative;width:100%}.virtual-items{position:relative}.container{min-height:1px;height:100%}.visit:first-child{margin-top:var(--dss-spacing-md)}.visit{width:calc(100% - var(--dss-spacing-md) - var(--dss-spacing-md));display:flex;flex-direction:column;gap:var(--dss-spacing-sm);background-color:#fff;border-radius:var(--dss-radius-sm);padding:var(--dss-spacing-sm);margin-bottom:var(--dss-spacing-md)}.visit .visit__header{display:flex;flex-direction:row;align-items:center;gap:16px}.visit .visit__header .title{flex:1;font-size:14px;line-height:24px;display:flex;flex-direction:row;gap:12px;color:var(--color-neutral-800)}.visit .visit__header .title-date{font-weight:700}.visit .visit__header .title-description{font-weight:600;display:flex;flex-direction:row;gap:4px}.visit .visit__header .highlight{background-color:#ff0;font-weight:700}.visit .visit__items{display:flex;flex-direction:column;gap:var(--dss-spacing-sm)}.visit .visit__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .visit__items .item[has-divider]:last-of-type{border:none}.visit .diagnostics{display:flex;flex-direction:column;gap:var(--dss-spacing-sm);border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics:last-of-type{border:none}.visit .diagnostics .diagnostics__header{display:flex;flex-direction:row;align-items:center;gap:16px;flex-wrap:wrap}.visit .diagnostics .diagnostics__items{display:flex;flex-direction:column}.visit .diagnostics .diagnostics__items .item[has-divider]{border-bottom:var(--dss-border-width-sm) solid var(--color-neutral-200)}.visit .diagnostics .diagnostics__items .item[has-divider]:last-of-type{border:none}.feedback{width:100%;height:100%;display:flex;align-items:center;justify-content:center}";
|
|
12407
12446
|
function toDate(te) {
|
|
12408
12447
|
const J = Object.prototype.toString.call(te);
|
|
@@ -15709,7 +15748,7 @@ ActivityHistoryPartialDataError = __decorateClass$n([
|
|
|
15709
15748
|
const { clearActivityHistoryCollections } = activityHistoryCollectionsSlice.actions;
|
|
15710
15749
|
class RefreshHistoryItemsHandler extends BaseHandler {
|
|
15711
15750
|
async handle() {
|
|
15712
|
-
this.store.dispatch(activityHistoryFiltersSlice.actions.clearCustomFilters()), this.store.dispatch(clearActivityHistoryCollections()), this.api.broker.publish(this.api.broker.events.
|
|
15751
|
+
this.store.dispatch(activityHistoryFiltersSlice.actions.clearCustomFilters()), this.store.dispatch(clearActivityHistoryCollections()), this.api.broker.publish(this.api.broker.events.activityHistory.refreshDataRequested);
|
|
15713
15752
|
}
|
|
15714
15753
|
}
|
|
15715
15754
|
class HandleRefreshHistoryItems {
|
|
@@ -15739,14 +15778,12 @@ const bootstrapRemoveHistoryItem = (te) => {
|
|
|
15739
15778
|
request$6 = te.registerRequest("remove_history_item_request", RemoveHistoryItemHandler);
|
|
15740
15779
|
}, teardownRemoveHistoryItem = () => {
|
|
15741
15780
|
request$6?.dispose();
|
|
15742
|
-
}, events = {
|
|
15743
|
-
activityHistorySearched: "activity_history_searched"
|
|
15744
15781
|
}, { setSearchString } = activityHistoryFiltersSlice.actions;
|
|
15745
15782
|
class SearchItemsHandler extends BaseHandler {
|
|
15746
15783
|
async handle(J) {
|
|
15747
15784
|
try {
|
|
15748
15785
|
this.store.dispatch(setSearchString(J.searchString)), setTimeout(() => {
|
|
15749
|
-
this.api.broker.publish(events.
|
|
15786
|
+
this.api.broker.publish(this.api.broker.events.activityHistory.searched, {
|
|
15750
15787
|
searchQuery: J.searchString
|
|
15751
15788
|
});
|
|
15752
15789
|
}, 300);
|
|
@@ -15855,17 +15892,17 @@ const styles$a = ":host{display:flex;justify-content:space-between}.filters-cont
|
|
|
15855
15892
|
@onDelete=${() => X._onDeleteUpFilterValue(te)}
|
|
15856
15893
|
></dss-chip>
|
|
15857
15894
|
`, renderFilterTitle = (te) => ke$1`<div class="filter-title">${`${te}:`}</div>`, template$c = (te) => {
|
|
15858
|
-
if (te.enabledFilters.length === 0 && te.enabledCommonFilters.length === 0 && te.diagnosticFilterEnabled
|
|
15895
|
+
if (te.enabledFilters.length === 0 && te.enabledCommonFilters.length === 0 && te.diagnosticFilterEnabled?.enabledValues?.length === 0 && te.upFilterEnabled.enabledValues.length === 0)
|
|
15859
15896
|
return D$5;
|
|
15860
15897
|
let J = 0;
|
|
15861
15898
|
const X = [], re = [], ne = [], oe = te.diagnosticFilterEnabled;
|
|
15862
15899
|
if (oe) {
|
|
15863
|
-
const { title: ce,
|
|
15864
|
-
if (
|
|
15865
|
-
let
|
|
15866
|
-
for (const
|
|
15867
|
-
const
|
|
15868
|
-
J < MAX_VISIBLE_CHIPS ? (
|
|
15900
|
+
const { title: ce, enabledValues: ue } = oe;
|
|
15901
|
+
if (ue && ue.length > 0) {
|
|
15902
|
+
let he = !1, pe = !1;
|
|
15903
|
+
for (const fe of ue) {
|
|
15904
|
+
const be = renderDiagnosticChip(fe.codi, fe.descripcio, te);
|
|
15905
|
+
J < MAX_VISIBLE_CHIPS ? (he || (X.push(renderFilterTitle(ce)), he = !0), X.push(be), J++) : (pe || (re.push(renderFilterTitle(ce)), pe = !0), re.push(be), ne.push(be));
|
|
15869
15906
|
}
|
|
15870
15907
|
}
|
|
15871
15908
|
}
|
|
@@ -15947,9 +15984,7 @@ let ActiveFiltersBadges = class extends h$q {
|
|
|
15947
15984
|
this.api.broker.send(new SetCommonFilter({ id: te, enabled: !1 }));
|
|
15948
15985
|
}
|
|
15949
15986
|
_onDeleteDiagnosticFilterValue(te) {
|
|
15950
|
-
this.api.broker.send(
|
|
15951
|
-
new SetDiagnosticFiltersCommand([...this.diagnosticFilterEnabled.enabledValues.filter((J) => J !== te)])
|
|
15952
|
-
);
|
|
15987
|
+
this.api.broker.send(new DeleteDiagnosticFilterValueCommand({ diagnosticCodi: te }));
|
|
15953
15988
|
}
|
|
15954
15989
|
_onDeleteUpFilterValue(te) {
|
|
15955
15990
|
this.api.broker.send(new SetUpFiltersCommand([...this.upFilterEnabled.enabledValues.filter((J) => J !== te)]));
|
|
@@ -16007,7 +16042,7 @@ const bootstrapUpdateHistoryItem = (te) => {
|
|
|
16007
16042
|
};
|
|
16008
16043
|
let broker;
|
|
16009
16044
|
const bootstrapActivityHistoryItem = (te) => {
|
|
16010
|
-
broker = brokerExtensions(te, container), bootstrapInjectAsyncHistoryItems(broker), bootstrapAddHistoryItem(broker), bootstrapAddHistoryItems(broker), bootstrapHandleHistoryItemsAddError(broker), bootstrapHandleRefreshHistoryItems(broker), bootstrapUpdateHistoryItem(broker), bootstrapExportPdf(broker), bootstrapFilters(broker), bootstrapSearchItems(broker), bootstrapRemoveHistoryItem(broker);
|
|
16045
|
+
broker = brokerExtensions(te, container), bootstrapInjectAsyncHistoryItems(broker, te), bootstrapAddHistoryItem(broker, te), bootstrapAddHistoryItems(broker, te), bootstrapHandleHistoryItemsAddError(broker), bootstrapHandleRefreshHistoryItems(broker), bootstrapUpdateHistoryItem(broker), bootstrapExportPdf(broker), bootstrapFilters(broker, te), bootstrapSearchItems(broker), bootstrapRemoveHistoryItem(broker);
|
|
16011
16046
|
}, teardownActivityHistoryItem = () => {
|
|
16012
16047
|
teardownInjectAsyncHistoryItems(), teardownAddHistoryItem(), teardownAddHistoryItems(), teardownHandleHistoryItemsAddError(), teardownUpdateHistoryItem(), teardownExportPdf(), teardownFilters(), teardownSearchItems(), teardownRemoveHistoryItem();
|
|
16013
16048
|
}, styles$9 = ":host{display:flex;min-height:1px;height:100%;width:100%}.container{display:flex;flex-direction:column;width:100%;border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm)}.container[maximized]{position:absolute;background:#fff;top:0;left:0;bottom:0;border:none}.container[maximized] .header-maximized-container{display:flex;flex-direction:column}.container[maximized] .header-maximized-container .header__maximized{display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:24px;padding-top:24px;padding-bottom:24px;padding-inline:40px}.container[maximized] .header-maximized-container .header__maximized .header__maximized__search{flex:1;border-radius:8px;border:1px solid rgb(189,189,189);padding:8px;width:300px}.container[maximized] .header-maximized-container .header__maximized .title{color:var(--color-neutral-900);font-weight:700;font-size:20px;line-height:30px;white-space:nowrap}.container[maximized] .header-maximized-container .header__maximized .options{display:flex;align-items:center;color:var(--color-primary-400);font-weight:600;font-size:14px;line-height:24px;cursor:pointer}.container[maximized] .header-maximized-container .header__maximized .header__maximized__left{display:flex;flex-direction:row;gap:24px;align-items:center;width:100%}.container[maximized] .header-maximized-container .header__maximized .header__maximized__right{display:flex;flex-direction:row;gap:16px;align-items:center}.container[maximized] .wrapper{height:calc(100vh - 175px);border:1px solid rgb(189,189,189);border-radius:var(--dss-radius-sm);margin-bottom:24px;margin-inline:40px;width:calc(100% - 80px)}.container .header{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:8px 12px;border-bottom:1px solid rgb(189,189,189);gap:16px}.container .header .header__left{display:flex;flex-direction:row;align-items:center;flex:1;gap:16px}.container .header .header__left .title{color:var(--color-neutral-800);font-weight:700;font-size:16px;line-height:24px;white-space:nowrap}.container .header .header__right{display:flex;flex-direction:row;align-items:center;gap:8px}.container .header .header__right .action-icons{display:flex;align-items:center}.container .wrapper{display:flex;flex-direction:row;min-height:1px;width:100%;height:100%}.container .wrapper[maximized] .content{width:100%;background:var(--color-neutral-50);border-top-right-radius:var(--dss-radius-sm);display:flex;flex-direction:column}.container .wrapper .content{width:100%;background:var(--color-neutral-50);border-bottom-right-radius:var(--dss-radius-sm);overflow:hidden;display:flex;flex-direction:column}", template$b = (te) => ke$1`<div class="container" ?maximized=${te.maximized}>
|
|
@@ -47756,15 +47791,16 @@ export {
|
|
|
47756
47791
|
raiseCustomCloseEvent as l,
|
|
47757
47792
|
shellRegions as m,
|
|
47758
47793
|
clinicalMonitoringRegions as n,
|
|
47759
|
-
|
|
47760
|
-
|
|
47761
|
-
|
|
47794
|
+
activityHistoryRegions as o,
|
|
47795
|
+
bootstrapPlugins as p,
|
|
47796
|
+
handleStartupPlugin as q,
|
|
47762
47797
|
r$L as r,
|
|
47763
47798
|
s$F as s,
|
|
47764
47799
|
translate$1 as t,
|
|
47765
|
-
|
|
47766
|
-
|
|
47767
|
-
|
|
47768
|
-
|
|
47800
|
+
disposePlugins as u,
|
|
47801
|
+
primariaApiFactory as v,
|
|
47802
|
+
PrimariaContentSwitcher as w,
|
|
47803
|
+
h as x,
|
|
47804
|
+
PrimariaInteractionService as y
|
|
47769
47805
|
};
|
|
47770
|
-
//# sourceMappingURL=index-
|
|
47806
|
+
//# sourceMappingURL=index-DFUx37wx.js.map
|