@uxland/primary-shell 3.5.0 → 3.5.2
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/index.js +59 -28
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +10 -10
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/UI/components/primaria-shell/primaria-shell.d.ts +1 -0
- package/dist/primary/shell/src/UI/shared-components/primaria-interaction/typings.d.ts +1 -1
- package/dist/primary/shell/src/bootstrapper.d.ts +1 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/components/activity-history/activity-history.d.ts +2 -0
- package/package.json +1 -1
- package/src/UI/components/primaria-shell/primaria-shell.ts +12 -5
- package/src/UI/shared-components/primaria-interaction/components/notifier-component-styles.css +6 -6
- package/src/UI/shared-components/primaria-interaction/components/notifier-component.ts +2 -2
- package/src/UI/shared-components/primaria-interaction/typings.ts +1 -1
- package/src/UI/shared-components/primaria-nav-item/primaria-nav-item.ts +22 -3
- package/src/api/broker/factory.ts +13 -1
- package/src/bootstrapper.ts +1 -1
- package/src/handle-views.ts +1 -6
- package/src/internal-plugins/activity-history/components/activity-history/activity-history-timeline/activity-history-timeline.ts +1 -1
- package/src/internal-plugins/activity-history/components/activity-history/activity-history.ts +16 -6
- package/src/internal-plugins/activity-history/components/activity-history/template.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -3578,8 +3578,16 @@ const createDynamicEventClass = (te) => createDynamicMessageClass(te, "Event"),
|
|
|
3578
3578
|
constructor(payload) {
|
|
3579
3579
|
Object.assign(this, payload);
|
|
3580
3580
|
}
|
|
3581
|
-
}`)(), createDynamicRequestHandler = (te) => createDynamicMessageHandler(te, "RequestHandler"), createDynamicEventHandler = (te) => createDynamicMessageHandler(te, "EventHandler"),
|
|
3582
|
-
|
|
3581
|
+
}`)(), createDynamicRequestHandler = (te) => createDynamicMessageHandler(te, "RequestHandler"), createDynamicEventHandler = (te) => createDynamicMessageHandler(te, "EventHandler"), usedSuffixes = /* @__PURE__ */ new Set();
|
|
3582
|
+
function generateUniqueRandomSuffix() {
|
|
3583
|
+
let te;
|
|
3584
|
+
do
|
|
3585
|
+
te = Math.floor(Math.random() * 1e4);
|
|
3586
|
+
while (usedSuffixes.has(te));
|
|
3587
|
+
return usedSuffixes.add(te), te;
|
|
3588
|
+
}
|
|
3589
|
+
const createDynamicMessageHandler = (te, W) => {
|
|
3590
|
+
const X = `${W}_${generateUniqueRandomSuffix()}`;
|
|
3583
3591
|
return new Function(
|
|
3584
3592
|
"handler",
|
|
3585
3593
|
`return class ${X}{
|
|
@@ -5485,7 +5493,7 @@ const buildDialogComponent = (te) => {
|
|
|
5485
5493
|
* Copyright 2018 Google LLC
|
|
5486
5494
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
5487
5495
|
*/
|
|
5488
|
-
const to = (te) => te ?? D$2, styles$a = ".snackbar{display:flex;align-items:center;flex-direction:row;justify-content:space-between;gap:10px;visibility:hidden;min-width:250px;width:417px;height:56px;background-color:#333;color:#fff;text-align:center;border-radius:10px;font-weight:500;padding:12px 16px;position:fixed;z-index:500;left:24px;box-shadow:0 0 2px #00000029,0 0 5px #0000003b;border:2px solid;border-color:transparent;@-webkit-keyframes fadein{0%{bottom:0;opacity:0}to{opacity:1}}@keyframes fadein{0%{bottom:0;opacity:0}to{opacity:1}}@-webkit-keyframes fadeout{0%{opacity:1}to{bottom:0;opacity:0}}@keyframes fadeout{0%{opacity:1}to{bottom:0;opacity:0}}}.snackbar .snackbar__message{text-align:left;margin-right:24px;flex:1}.snackbar.show{visibility:visible}.snackbar.success{background-color
|
|
5496
|
+
const to = (te) => te ?? D$2, styles$a = ".snackbar{display:flex;align-items:center;flex-direction:row;justify-content:space-between;gap:10px;visibility:hidden;min-width:250px;width:417px;height:56px;background-color:#333;color:#fff;text-align:center;border-radius:10px;font-weight:500;padding:12px 16px;position:fixed;z-index:500;left:24px;box-shadow:0 0 2px #00000029,0 0 5px #0000003b;border:2px solid;border-color:transparent;@-webkit-keyframes fadein{0%{bottom:0;opacity:0}to{opacity:1}}@keyframes fadein{0%{bottom:0;opacity:0}to{opacity:1}}@-webkit-keyframes fadeout{0%{opacity:1}to{bottom:0;opacity:0}}@keyframes fadeout{0%{opacity:1}to{bottom:0;opacity:0}}}.snackbar .snackbar__message{text-align:left;margin-right:24px;flex:1}.snackbar.show{visibility:visible}.snackbar.success{background-color:var(--color-green-500);color:#fff;box-shadow:#43a0474d 0 0 2px,#43a04738 0 0 5px}.snackbar.error{background-color:var(--color-red-500);color:#fff;box-shadow:#e539354d 0 0 2px,#e5393538 0 0 5px}.snackbar.warning{background-color:var(--color-yellow-500);color:#000;box-shadow:#fb8c004d 0 0 2px,#fb8c0038 0 0 5px}.snackbar.info{background-color:var(--color-primary-500);color:#fff;box-shadow:#0e508a4d 0 0 2px,#0e508a38 0 0 5px}.snackbar.notification-1{-webkit-animation:fadein .3s,fadeout .55s 6s;animation:fadein .3s,fadeout .55s 6s;bottom:72px}.snackbar.notification-2{-webkit-animation:fadein .3s,fadeout .55s 6s;animation:fadein .3s,fadeout .55s 6s;bottom:132px}.snackbar.notification-3{-webkit-animation:fadein .3s,fadeout .55s 6s;animation:fadein .3s,fadeout .55s 6s;bottom:192px}.snackbar #close-btn{cursor:pointer}";
|
|
5489
5497
|
var __defProp$n = Object.defineProperty, __getOwnPropDesc$m = Object.getOwnPropertyDescriptor, __decorateClass$n = (te, W, X, re) => {
|
|
5490
5498
|
for (var ne = re > 1 ? void 0 : re ? __getOwnPropDesc$m(W, X) : W, oe = te.length - 1, de; oe >= 0; oe--)
|
|
5491
5499
|
(de = te[oe]) && (ne = (re ? de(W, X, ne) : de(ne)) || ne);
|
|
@@ -5493,10 +5501,10 @@ var __defProp$n = Object.defineProperty, __getOwnPropDesc$m = Object.getOwnPrope
|
|
|
5493
5501
|
};
|
|
5494
5502
|
function getIcon(te) {
|
|
5495
5503
|
return te ? (/* @__PURE__ */ new Map([
|
|
5496
|
-
["
|
|
5504
|
+
["error", "error"],
|
|
5497
5505
|
["info", "info"],
|
|
5498
5506
|
["warning", "warning"],
|
|
5499
|
-
["success", "
|
|
5507
|
+
["success", "check_circle"]
|
|
5500
5508
|
])).get(te) : void 0;
|
|
5501
5509
|
}
|
|
5502
5510
|
let NotifierComponent = class extends h$i {
|
|
@@ -28307,13 +28315,13 @@ var __defProp$i = Object.defineProperty, __getOwnPropDesc$i = Object.getOwnPrope
|
|
|
28307
28315
|
};
|
|
28308
28316
|
let PrimariaNavItem = class extends k$4(h$i) {
|
|
28309
28317
|
constructor(te) {
|
|
28310
|
-
super(), this.containerWidth = 0, this.showText = !1, this.isActive = !1, this.config = te;
|
|
28318
|
+
super(), this.subscriptions = [], this.containerWidth = 0, this.showText = !1, this.isActive = !1, this.config = te;
|
|
28311
28319
|
}
|
|
28312
28320
|
connectedCallback() {
|
|
28313
|
-
super.connectedCallback(),
|
|
28314
|
-
|
|
28315
|
-
|
|
28316
|
-
|
|
28321
|
+
super.connectedCallback(), this._subscribeEvents();
|
|
28322
|
+
}
|
|
28323
|
+
disconnectedCallback() {
|
|
28324
|
+
this._unsubscribeEvents();
|
|
28317
28325
|
}
|
|
28318
28326
|
firstUpdated(te) {
|
|
28319
28327
|
super.firstUpdated(te), this.observeHostResize();
|
|
@@ -28327,6 +28335,19 @@ let PrimariaNavItem = class extends k$4(h$i) {
|
|
|
28327
28335
|
}
|
|
28328
28336
|
}).observe(te);
|
|
28329
28337
|
}
|
|
28338
|
+
_subscribeEvents() {
|
|
28339
|
+
const te = shellApi.broker.subscribe(
|
|
28340
|
+
shellEvents.mainViewChanged,
|
|
28341
|
+
(W) => {
|
|
28342
|
+
var X;
|
|
28343
|
+
this.isActive = W.viewId === ((X = this.view) == null ? void 0 : X.id);
|
|
28344
|
+
}
|
|
28345
|
+
);
|
|
28346
|
+
this.subscriptions.push(te);
|
|
28347
|
+
}
|
|
28348
|
+
_unsubscribeEvents() {
|
|
28349
|
+
this.subscriptions.forEach((te) => te.dispose());
|
|
28350
|
+
}
|
|
28330
28351
|
render() {
|
|
28331
28352
|
return ke$1`${template$8(this)}`;
|
|
28332
28353
|
}
|
|
@@ -28633,9 +28654,6 @@ const registerUpperNavMenuViews = () => {
|
|
|
28633
28654
|
icon: "add_box",
|
|
28634
28655
|
label: "Pàgina inici",
|
|
28635
28656
|
callbackFn: () => {
|
|
28636
|
-
shellApi.broker.publish("window_close"), shellApi.broker.publish(shellEvents.appCrashed, {
|
|
28637
|
-
message: "S'ha tancat la finestra"
|
|
28638
|
-
});
|
|
28639
28657
|
}
|
|
28640
28658
|
});
|
|
28641
28659
|
return Promise.resolve(te);
|
|
@@ -28683,7 +28701,7 @@ var __defProp$g = Object.defineProperty, __getOwnPropDesc$g = Object.getOwnPrope
|
|
|
28683
28701
|
};
|
|
28684
28702
|
let PrimariaShell = class extends PrimariaRegionHost(h$i) {
|
|
28685
28703
|
constructor() {
|
|
28686
|
-
super(...arguments), this.sidebarExpanded = !1, this.viewSelected = shellViews.shell;
|
|
28704
|
+
super(...arguments), this.sidebarExpanded = !1, this.viewSelected = shellViews.shell, this.subscriptions = [];
|
|
28687
28705
|
}
|
|
28688
28706
|
render() {
|
|
28689
28707
|
return ke$1`${template$a(this)}`;
|
|
@@ -28703,11 +28721,16 @@ let PrimariaShell = class extends PrimariaRegionHost(h$i) {
|
|
|
28703
28721
|
this.sidebarExpanded = !this.sidebarExpanded;
|
|
28704
28722
|
}
|
|
28705
28723
|
_subscribeEvents() {
|
|
28706
|
-
shellApi.broker.subscribe(
|
|
28707
|
-
|
|
28708
|
-
|
|
28724
|
+
const te = shellApi.broker.subscribe(
|
|
28725
|
+
shellEvents.appCrashed,
|
|
28726
|
+
(W) => {
|
|
28727
|
+
this.viewSelected = shellViews.error, this.error = W;
|
|
28728
|
+
}
|
|
28729
|
+
);
|
|
28730
|
+
this.subscriptions.push(te);
|
|
28709
28731
|
}
|
|
28710
28732
|
_unsubscribeEvents() {
|
|
28733
|
+
this.subscriptions.forEach((te) => te.dispose());
|
|
28711
28734
|
}
|
|
28712
28735
|
};
|
|
28713
28736
|
PrimariaShell.styles = i$w`
|
|
@@ -30868,7 +30891,7 @@ const bootstrapGetUserInfo = () => {
|
|
|
30868
30891
|
container$1.bind(TYPES$1.primaryApi).toConstantValue(te), bootstrapGetUserInfo(), shellApi.broker.send(new GetUserInfo());
|
|
30869
30892
|
}, teardownFeatures$1 = () => {
|
|
30870
30893
|
teardownGetUserInfo(), container$1.unbindAll();
|
|
30871
|
-
},
|
|
30894
|
+
}, initializeShell = (te) => {
|
|
30872
30895
|
initializeLocalization$1(shellApi), p$f.registerAdapterFactory("primaria-content-switcher", d$n);
|
|
30873
30896
|
const W = new PrimariaShell();
|
|
30874
30897
|
te.appendChild(W), registerInternalViews(), bootstrapFeatures$1(shellApi);
|
|
@@ -32419,7 +32442,7 @@ let ActivityHistoryTimeline = class extends PrimariaRegionHost(h$i) {
|
|
|
32419
32442
|
super(...arguments), this._hasUpdatedOnce = !1;
|
|
32420
32443
|
}
|
|
32421
32444
|
render() {
|
|
32422
|
-
return ke$1`${template$5(this)}
|
|
32445
|
+
return ke$1`${template$5(this)}`;
|
|
32423
32446
|
}
|
|
32424
32447
|
firstUpdated() {
|
|
32425
32448
|
this._hasUpdatedOnce = !0;
|
|
@@ -32561,7 +32584,7 @@ const template$3 = (te) => ke$1`<div class="container" ?maximized=${te.maximized
|
|
|
32561
32584
|
<div class="title">${translate("activityHistory")}</div>
|
|
32562
32585
|
<dss-search-bar dropdownStyle=${"display: none"} @onSearchChange=${te._handleSearchChange} icon="search" inputsize="md" threshold="2" recentsearchestext="" emptydropdowntext="">
|
|
32563
32586
|
<label slot="label" for="searchbar1" aria-hidden="false"></label>
|
|
32564
|
-
<input slot="input" id="searchbar1" type="text" @input=${(W) => te._handleSearchChange({ detail: [W.target.value] })}>
|
|
32587
|
+
<input slot="input" id="searchbar1" type="text" value=${te.searchQuery} @input=${(W) => te._handleSearchChange({ detail: [W.target.value] })}>
|
|
32565
32588
|
</dss-search-bar>
|
|
32566
32589
|
<dss-datepicker dropdownFixed inputsize="md" class="date-picker" @onValueChange=${(W) => te._handleSelectDate(W.detail)}>
|
|
32567
32590
|
<label slot="label" for="myDatepicker">${translate("goToDate")}</label>
|
|
@@ -32597,7 +32620,7 @@ const template$3 = (te) => ke$1`<div class="container" ?maximized=${te.maximized
|
|
|
32597
32620
|
<div class="title">${translate("activityHistory")}</div>
|
|
32598
32621
|
<dss-search-bar dropdownStyle=${"display: none"} @onSearchChange=${te._handleSearchChange} icon="search" inputsize="md" threshold="3" recentsearchestext="" emptydropdowntext="Sense resultats per">
|
|
32599
32622
|
<label slot="label" for="searchbar1" aria-hidden="false"></label>
|
|
32600
|
-
<input slot="input" id="searchbar1" type="text" @input=${(W) => te._handleSearchChange({ detail: [W.target.value] })}>
|
|
32623
|
+
<input slot="input" id="searchbar1" type="text" value=${te.searchQuery} @input=${(W) => te._handleSearchChange({ detail: [W.target.value] })}>
|
|
32601
32624
|
</dss-search-bar>
|
|
32602
32625
|
<dss-datepicker dropdownFixed inputsize="md" class="date-picker" @onValueChange=${(W) => te._handleSelectDate(W.detail)}>
|
|
32603
32626
|
<label slot="label" for="myDatepicker">${translate("goToDate")}</label>
|
|
@@ -32633,14 +32656,10 @@ let ActivityHistory = class extends PrimariaRegionHost(h$i) {
|
|
|
32633
32656
|
return ke$1`${template$3(this)}`;
|
|
32634
32657
|
}
|
|
32635
32658
|
connectedCallback() {
|
|
32636
|
-
super.connectedCallback(), this.
|
|
32637
|
-
this.api.broker.subscribe(shellEvents.openClinicalMonitoringRequested, () => {
|
|
32638
|
-
this.maximized = !1;
|
|
32639
|
-
})
|
|
32640
|
-
);
|
|
32659
|
+
super.connectedCallback(), this._subscribeEvents();
|
|
32641
32660
|
}
|
|
32642
32661
|
disconnectedCallback() {
|
|
32643
|
-
super.disconnectedCallback(), this.
|
|
32662
|
+
super.disconnectedCallback(), this._unsubscribeEvents();
|
|
32644
32663
|
}
|
|
32645
32664
|
_toggleFilters() {
|
|
32646
32665
|
this.filtersExpanded = !this.filtersExpanded;
|
|
@@ -32651,6 +32670,18 @@ let ActivityHistory = class extends PrimariaRegionHost(h$i) {
|
|
|
32651
32670
|
_minimize() {
|
|
32652
32671
|
this.maximized = !1;
|
|
32653
32672
|
}
|
|
32673
|
+
_subscribeEvents() {
|
|
32674
|
+
const te = this.api.broker.subscribe(
|
|
32675
|
+
shellEvents.openClinicalMonitoringRequested,
|
|
32676
|
+
() => {
|
|
32677
|
+
this.maximized = !1;
|
|
32678
|
+
}
|
|
32679
|
+
);
|
|
32680
|
+
this.subscriptions.push(te);
|
|
32681
|
+
}
|
|
32682
|
+
_unsubscribeEvents() {
|
|
32683
|
+
this.subscriptions.forEach((te) => te.dispose());
|
|
32684
|
+
}
|
|
32654
32685
|
_handleSearchChange(te) {
|
|
32655
32686
|
const W = te.detail || [], X = W.length > 0 ? W.join(" ") : "", re = X.length > 1 ? X : "";
|
|
32656
32687
|
this.searchQuery = X, this.api.broker.send(new SearchActivityHistoryItems(re));
|
|
@@ -40828,12 +40859,12 @@ export {
|
|
|
40828
40859
|
PrimariaNavItem,
|
|
40829
40860
|
PrimariaRegionHost,
|
|
40830
40861
|
bootstrapPlugins,
|
|
40831
|
-
bootstrapShell,
|
|
40832
40862
|
clinicalMonitoringRegions,
|
|
40833
40863
|
confirmMixin,
|
|
40834
40864
|
createEcapEventManager,
|
|
40835
40865
|
disposePlugins,
|
|
40836
40866
|
disposeShell,
|
|
40867
|
+
initializeShell,
|
|
40837
40868
|
primariaApiFactory,
|
|
40838
40869
|
raiseCloseEvent,
|
|
40839
40870
|
shellApi,
|