@uxland/primary-shell 5.4.5 → 5.4.7
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 +12821 -12444
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +790 -733
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/UI/components/communication-action-menu/communication-action-menu.d.ts +16 -0
- package/dist/primary/shell/src/UI/components/communication-action-menu/template.d.ts +3 -0
- package/dist/primary/shell/src/UI/components/primaria-accordion/primaria-accordion.d.ts +8 -0
- package/dist/primary/shell/src/UI/internal-views/upper-nav-views.d.ts +2 -0
- package/dist/primary/shell/src/UI/shared-components/quick-action-item/quick-action-item.d.ts +9 -0
- package/dist/primary/shell/src/UI/shared-components/quick-action-item/template.d.ts +3 -0
- package/dist/primary/shell/src/api/region-manager/regions.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-badges/active-filters-badges.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/actions.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/handler.d.ts +5 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/reducer.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/request.d.ts +2 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/actions.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/handler.d.ts +5 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/reducer.d.ts +1 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/request.d.ts +2 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/filter/slice.d.ts +4 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/localization.d.ts +1 -0
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/src/UI/components/bootstrapper.ts +4 -0
- package/src/UI/components/communication-action-menu/communication-action-menu.ts +48 -0
- package/src/UI/components/communication-action-menu/styles.css +25 -0
- package/src/UI/components/communication-action-menu/template.ts +23 -0
- package/src/UI/components/primaria-accordion/primaria-accordion.ts +46 -0
- package/src/UI/components/primaria-shell/styles.css +13 -6
- package/src/UI/internal-views/handle-views.ts +4 -1
- package/src/UI/internal-views/upper-nav-views.ts +61 -31
- package/src/UI/shared-components/quick-action-item/quick-action-item.ts +21 -0
- package/src/UI/shared-components/quick-action-item/template.ts +8 -0
- package/src/api/region-manager/region-manager.ts +7 -25
- package/src/api/region-manager/regions.ts +1 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-badges/active-filters-badges.ts +9 -5
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-badges/styles.css +14 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/active-filters-badges/template.ts +4 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/styles.css +1 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/UI/activity-history-filters/template.ts +8 -12
- package/src/internal-plugins/activity-history/activity-history-item/filter/bootstrapper.ts +10 -16
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/actions.ts +3 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/bootstrapper.ts +14 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/handler.ts +12 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/reducer.ts +11 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/reset-common-filter/request.ts +1 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/common-filters/set-common-filter/bootstrapper.ts +1 -1
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/actions.ts +3 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/bootstrapper.ts +14 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/handler.ts +8 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/reducer.ts +12 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/custom-filters/reset-custom-filter/request.ts +1 -0
- package/src/internal-plugins/activity-history/activity-history-item/filter/slice.ts +4 -0
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/styles.css +1 -1
- package/src/internal-plugins/activity-history/localization.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxland/primary-shell",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.7",
|
|
4
4
|
"description": "Primaria Shell",
|
|
5
5
|
"author": "UXLand <dev@uxland.es>",
|
|
6
6
|
"homepage": "https://github.com/uxland/harmonix/tree/app#readme",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@primaria/plugins-core": "^1.0.14",
|
|
33
33
|
"@reduxjs/toolkit": "^2.6.1",
|
|
34
|
-
"@salut/design-system-salut": "../../design-system-salut-2.5.
|
|
34
|
+
"@salut/design-system-salut": "../../design-system-salut-2.5.1.tgz",
|
|
35
35
|
"@types/react": "^19.0.12",
|
|
36
36
|
"@uxland/lit-utilities": "^1.0.0",
|
|
37
37
|
"@uxland/localization": "^1.0.3",
|
|
@@ -5,6 +5,8 @@ import { QuickActionsMenu } from "./quick-actions-menu/quick-actions-menu";
|
|
|
5
5
|
import { PrimariaShellHeader } from "./primaria-shell/shell-header/shell-header";
|
|
6
6
|
import { PocEventsEcap } from "./poc-events-ecap/poc-events-ecap";
|
|
7
7
|
import { FinalizeVisitButton } from "../../features/visit/finalize-visit/component/finalize-visit-button";
|
|
8
|
+
import { PrimariaAccordion } from "./primaria-accordion/primaria-accordion";
|
|
9
|
+
import { CommunicationActionMenu } from "./communication-action-menu/communication-action-menu";
|
|
8
10
|
|
|
9
11
|
export const useComponents = () => {
|
|
10
12
|
//@ts-ignore
|
|
@@ -14,6 +16,8 @@ export const useComponents = () => {
|
|
|
14
16
|
customElement("primaria-error-view")(PrimariaErrorView);
|
|
15
17
|
customElement("quick-actions-menu")(QuickActionsMenu);
|
|
16
18
|
customElement("finalize-visit-button")(FinalizeVisitButton);
|
|
19
|
+
customElement("communication-action-menu")(CommunicationActionMenu);
|
|
17
20
|
//@ts-ignore
|
|
18
21
|
customElement("poc-events-ecap")(PocEventsEcap);
|
|
22
|
+
customElement("primaria-accordion")(PrimariaAccordion);
|
|
19
23
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { LitElement, html, css, unsafeCSS, PropertyValues } from "lit";
|
|
2
|
+
import { template } from "./template";
|
|
3
|
+
import { property, state } from "lit/decorators.js";
|
|
4
|
+
import { shellRegions } from "../../../api/region-manager/regions";
|
|
5
|
+
import { IRegion, region } from "@uxland/regions";
|
|
6
|
+
import { PrimariaRegionHost } from "../../../api/api";
|
|
7
|
+
import styles from "./styles.css?inline";
|
|
8
|
+
|
|
9
|
+
export class CommunicationActionMenu extends PrimariaRegionHost(LitElement) {
|
|
10
|
+
constructor(icon: string, label: string) {
|
|
11
|
+
super();
|
|
12
|
+
this.icon = icon;
|
|
13
|
+
this.label = label;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
@state() showText = false;
|
|
17
|
+
|
|
18
|
+
@region({ targetId: "communication-sidenav-region-container", name: shellRegions.communicationSidenav })
|
|
19
|
+
comminucationSidenavRegion: IRegion | undefined;
|
|
20
|
+
|
|
21
|
+
static styles = css`
|
|
22
|
+
${unsafeCSS(styles)}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
firstUpdated(_changedProps: PropertyValues<CommunicationActionMenu>) {
|
|
26
|
+
super.firstUpdated(_changedProps);
|
|
27
|
+
this.observeHostResize();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
observeHostResize() {
|
|
31
|
+
const parentElement = this.parentElement;
|
|
32
|
+
const observer = new ResizeObserver((entries) => {
|
|
33
|
+
for (const entry of entries) {
|
|
34
|
+
const width = entry.target.clientWidth;
|
|
35
|
+
this.showText = width > 100;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
observer.observe(parentElement as HTMLElement);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
render() {
|
|
43
|
+
return html`${template(this)}`;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
@property({ type: String }) icon = "";
|
|
47
|
+
@property({ type: String }) label = "";
|
|
48
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
.item {
|
|
2
|
+
display: flex;
|
|
3
|
+
cursor: pointer;
|
|
4
|
+
border-radius: 8px;
|
|
5
|
+
padding: 8px;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
transition: background-color 0.3s ease;
|
|
8
|
+
&[expanded] {
|
|
9
|
+
justify-content: space-between;
|
|
10
|
+
}
|
|
11
|
+
&:hover {
|
|
12
|
+
background-color: var(--color-primary-900);
|
|
13
|
+
color: white;
|
|
14
|
+
}
|
|
15
|
+
.icon-label {
|
|
16
|
+
display: flex;
|
|
17
|
+
gap: 8px;
|
|
18
|
+
transition: background-color 0.3s;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.item.active{
|
|
23
|
+
outline: 2px solid white;
|
|
24
|
+
outline-offset: -2px;
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html, nothing } from "lit";
|
|
2
|
+
import { CommunicationActionMenu } from "./communication-action-menu";
|
|
3
|
+
|
|
4
|
+
export const template = (props: CommunicationActionMenu) => {
|
|
5
|
+
return html`
|
|
6
|
+
<div class="item" ?expanded=${props.showText}>
|
|
7
|
+
<div class="icon-label">
|
|
8
|
+
<dss-icon icon=${props.icon} size="md"></dss-icon>
|
|
9
|
+
${props.showText ? html`<span>${props.label}</span>` : ""}
|
|
10
|
+
${
|
|
11
|
+
!props.showText
|
|
12
|
+
? html`
|
|
13
|
+
<dss-tooltip position="right">
|
|
14
|
+
${props.label}
|
|
15
|
+
</dss-tooltip>`
|
|
16
|
+
: nothing
|
|
17
|
+
}
|
|
18
|
+
<dss-action-menu id="communication-sidenav-region-container" slot="content" >
|
|
19
|
+
</dss-action-menu>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
`;
|
|
23
|
+
};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { LitElement, html, css } from "lit";
|
|
2
|
+
import { property } from "lit/decorators.js";
|
|
3
|
+
|
|
4
|
+
export class PrimariaAccordion extends LitElement {
|
|
5
|
+
@property({ type: Boolean })
|
|
6
|
+
isOpen;
|
|
7
|
+
|
|
8
|
+
static styles = css`
|
|
9
|
+
:host {
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.content {
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
max-height: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.content.open {
|
|
19
|
+
margin-top: 8px;
|
|
20
|
+
max-height: unset;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.title {
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
display: flex;
|
|
26
|
+
justify-content: space-between;
|
|
27
|
+
align-items: center;
|
|
28
|
+
}
|
|
29
|
+
`;
|
|
30
|
+
|
|
31
|
+
toggle() {
|
|
32
|
+
this.isOpen = !this.isOpen;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
render() {
|
|
36
|
+
return html`
|
|
37
|
+
<div class="title" @click=${this.toggle}>
|
|
38
|
+
<slot name="title"></slot>
|
|
39
|
+
<dss-icon-button size="md" variant="primary" icon=${this.isOpen ? "keyboard_arrow_up" : "keyboard_arrow_down"}></dss-icon-button>
|
|
40
|
+
</div>
|
|
41
|
+
<div class="content ${this.isOpen ? "open" : ""}">
|
|
42
|
+
<slot name="content"></slot>
|
|
43
|
+
</div>
|
|
44
|
+
`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
@@ -62,11 +62,21 @@
|
|
|
62
62
|
/*Temporary scrollbar*/
|
|
63
63
|
#menu-region-container {
|
|
64
64
|
overflow-y: auto;
|
|
65
|
-
margin-right: -
|
|
66
|
-
padding-right:
|
|
67
|
-
scrollbar-color: var(--color-primary-
|
|
65
|
+
margin-right: -14px;
|
|
66
|
+
padding-right: 14px;
|
|
67
|
+
scrollbar-color: var(--color-primary-800) var(--color-primary-700);
|
|
68
68
|
scrollbar-width: thin;
|
|
69
69
|
}
|
|
70
|
+
#menu-region-container::-webkit-scrollbar {
|
|
71
|
+
width: 6px;
|
|
72
|
+
}
|
|
73
|
+
#menu-region-container::-webkit-scrollbar-track {
|
|
74
|
+
background: var(--color-primary-700);
|
|
75
|
+
}
|
|
76
|
+
#menu-region-container::-webkit-scrollbar-thumb {
|
|
77
|
+
background-color: var(--color-primary-400);
|
|
78
|
+
border-radius: 4px;
|
|
79
|
+
}
|
|
70
80
|
/**/
|
|
71
81
|
|
|
72
82
|
.bottom-content {
|
|
@@ -80,9 +90,6 @@
|
|
|
80
90
|
gap: 4px;
|
|
81
91
|
}
|
|
82
92
|
}
|
|
83
|
-
#quick-actions-region-container {
|
|
84
|
-
width: 100%;
|
|
85
|
-
}
|
|
86
93
|
&[expanded] {
|
|
87
94
|
width: 252px;
|
|
88
95
|
align-items: flex-start;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { registerPDFVisorMainView } from "../../api/pdf-viewer-manager/handle-views";
|
|
2
2
|
import { registerLowerNavMenuViews } from "./lower-nav-menu-views";
|
|
3
|
-
import { registerUpperNavMenuViews } from "./upper-nav-views";
|
|
3
|
+
import { registerCommunicationMenuActions, registerCommunicationNavMenuItem, registerUpperNavMenuViews } from "./upper-nav-views";
|
|
4
4
|
|
|
5
5
|
const registerMainViews = () => {
|
|
6
6
|
registerPDFVisorMainView();
|
|
@@ -8,6 +8,9 @@ const registerMainViews = () => {
|
|
|
8
8
|
|
|
9
9
|
export const useInternalViews = () => {
|
|
10
10
|
registerMainViews();
|
|
11
|
+
registerCommunicationNavMenuItem();
|
|
11
12
|
registerUpperNavMenuViews();
|
|
12
13
|
registerLowerNavMenuViews();
|
|
14
|
+
|
|
15
|
+
registerCommunicationMenuActions();
|
|
13
16
|
};
|
|
@@ -3,6 +3,8 @@ import { shellRegions } from "../../api/region-manager/regions";
|
|
|
3
3
|
import { ExitShell } from "../../features/exit/request";
|
|
4
4
|
import { getPatientCip } from "../../features/get-patient-cip/action";
|
|
5
5
|
import { navigateToEcapWithoutClosingWithCip } from "../../features/navigate-to-ecap/navigate-without-closing-and-with-cip";
|
|
6
|
+
import { CommunicationActionMenu } from "../components/communication-action-menu/communication-action-menu";
|
|
7
|
+
import { QuickActionItem } from "../shared-components/quick-action-item/quick-action-item";
|
|
6
8
|
import { PrimariaNavItem } from "../shared-components/primaria-nav-item/primaria-nav-item";
|
|
7
9
|
import { PrimariaNavTreeMenu } from "../shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu";
|
|
8
10
|
|
|
@@ -43,7 +45,7 @@ const upperNavMenuItems: MenuItemConfig[] = [
|
|
|
43
45
|
label: "Monitoratge dinàmic",
|
|
44
46
|
type: "item",
|
|
45
47
|
sortHint: "0030",
|
|
46
|
-
callbackFn: () => navigateToEcapWithoutClosingWithCip("
|
|
48
|
+
callbackFn: () => navigateToEcapWithoutClosingWithCip("IA_DEV"),
|
|
47
49
|
},
|
|
48
50
|
{
|
|
49
51
|
id: "processes",
|
|
@@ -80,7 +82,7 @@ const upperNavMenuItems: MenuItemConfig[] = [
|
|
|
80
82
|
{
|
|
81
83
|
icon: "open_in_new",
|
|
82
84
|
label: "Valoració social",
|
|
83
|
-
callbackFn: () =>
|
|
85
|
+
callbackFn: () => navigateToEcapWithoutClosingWithCip("VALORACIO_SOCIAL"),
|
|
84
86
|
},
|
|
85
87
|
],
|
|
86
88
|
},
|
|
@@ -166,7 +168,7 @@ const upperNavMenuItems: MenuItemConfig[] = [
|
|
|
166
168
|
{
|
|
167
169
|
icon: "open_in_new",
|
|
168
170
|
label: "Prescripció",
|
|
169
|
-
callbackFn: () => navigateToEcapWithoutClosingWithCip("
|
|
171
|
+
callbackFn: () => navigateToEcapWithoutClosingWithCip("PRESCRIPCIO_ACTIVA"),
|
|
170
172
|
},
|
|
171
173
|
{
|
|
172
174
|
icon: "open_in_new",
|
|
@@ -201,34 +203,6 @@ const upperNavMenuItems: MenuItemConfig[] = [
|
|
|
201
203
|
sortHint: "0100",
|
|
202
204
|
callbackFn: () => navigateToEcapWithoutClosingWithCip("REV_IT"),
|
|
203
205
|
},
|
|
204
|
-
{
|
|
205
|
-
id: "communication",
|
|
206
|
-
icon: "3p",
|
|
207
|
-
label: "Comunicació",
|
|
208
|
-
type: "tree",
|
|
209
|
-
sortHint: "0120",
|
|
210
|
-
actionMenuItems: [
|
|
211
|
-
{
|
|
212
|
-
icon: "open_in_new",
|
|
213
|
-
label: "SMS",
|
|
214
|
-
callbackFn: async () => {
|
|
215
|
-
const CIP = await getPatientCip(shellApi);
|
|
216
|
-
shellApi.ecapEventManager.publish("MISSATGES_DEV", "NO_TANCAR", {
|
|
217
|
-
CIP: CIP || "",
|
|
218
|
-
TipusMissatge: "SMS",
|
|
219
|
-
});
|
|
220
|
-
},
|
|
221
|
-
},
|
|
222
|
-
{ icon: "open_in_new", label: "eConsulta", callbackFn: () => {} },
|
|
223
|
-
{ icon: "open_in_new", label: "Mail", callbackFn: () => {} },
|
|
224
|
-
{
|
|
225
|
-
icon: "open_in_new",
|
|
226
|
-
label: "Veu IP",
|
|
227
|
-
callbackFn: () => navigateToEcapWithoutClosingWithCip("VOIP"),
|
|
228
|
-
},
|
|
229
|
-
{ icon: "open_in_new", label: "Videoconsulta", callbackFn: () => {} },
|
|
230
|
-
],
|
|
231
|
-
},
|
|
232
206
|
{
|
|
233
207
|
id: "visits",
|
|
234
208
|
icon: "event",
|
|
@@ -271,3 +245,59 @@ export const registerUpperNavMenuViews = () => {
|
|
|
271
245
|
});
|
|
272
246
|
}
|
|
273
247
|
};
|
|
248
|
+
|
|
249
|
+
export const registerCommunicationNavMenuItem = () => {
|
|
250
|
+
shellApi.regionManager.registerView(shellRegions.navigationMenu, {
|
|
251
|
+
id: "communication",
|
|
252
|
+
sortHint: "0120",
|
|
253
|
+
factory: () => {
|
|
254
|
+
const menuItem = new CommunicationActionMenu("3p", "Comunicació");
|
|
255
|
+
|
|
256
|
+
return Promise.resolve(menuItem);
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
};
|
|
260
|
+
|
|
261
|
+
export const registerCommunicationMenuActions = () => {
|
|
262
|
+
const communicationItems = [
|
|
263
|
+
{
|
|
264
|
+
id: "1",
|
|
265
|
+
sortHint: "0010",
|
|
266
|
+
icon: "open_in_new",
|
|
267
|
+
label: "SMS",
|
|
268
|
+
callbackFn: async () => {
|
|
269
|
+
const CIP = await getPatientCip(shellApi);
|
|
270
|
+
shellApi.ecapEventManager.publish("MISSATGES_DEV", "NO_TANCAR", {
|
|
271
|
+
CIP: CIP || "",
|
|
272
|
+
TipusMissatge: "SMS",
|
|
273
|
+
});
|
|
274
|
+
},
|
|
275
|
+
},
|
|
276
|
+
{ id: "2", sortHint: "0020", icon: "open_in_new", label: "eConsulta", callbackFn: () => {} },
|
|
277
|
+
{ id: "3", icon: "open_in_new", label: "Mail", callbackFn: () => {} },
|
|
278
|
+
{
|
|
279
|
+
id: "4",
|
|
280
|
+
sortHint: "0030",
|
|
281
|
+
icon: "open_in_new",
|
|
282
|
+
label: "Veu IP",
|
|
283
|
+
callbackFn: () => navigateToEcapWithoutClosingWithCip("VOIP"),
|
|
284
|
+
},
|
|
285
|
+
{ id: "5", sortHint: "0040", icon: "open_in_new", label: "Videoconsulta", callbackFn: () => {} },
|
|
286
|
+
];
|
|
287
|
+
for (const item of communicationItems) {
|
|
288
|
+
shellApi.regionManager.registerView(shellRegions.communicationSidenav, {
|
|
289
|
+
id: item.id,
|
|
290
|
+
sortHint: item.sortHint,
|
|
291
|
+
factory: () => {
|
|
292
|
+
const menuItem = new PrimariaNavItem({
|
|
293
|
+
icon: item.icon,
|
|
294
|
+
label: item.label,
|
|
295
|
+
callbackFn: item.callbackFn,
|
|
296
|
+
});
|
|
297
|
+
|
|
298
|
+
const menuTest = new QuickActionItem(item.icon, item.label, item.callbackFn);
|
|
299
|
+
return Promise.resolve(menuTest);
|
|
300
|
+
},
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { LitElement, html } from "lit";
|
|
2
|
+
import { template } from "./template";
|
|
3
|
+
import { customElement, property } from "lit/decorators.js";
|
|
4
|
+
|
|
5
|
+
@customElement("quick-action-item")
|
|
6
|
+
export class QuickActionItem extends LitElement {
|
|
7
|
+
constructor(icon: string, label: string, callbackFn: () => void) {
|
|
8
|
+
super();
|
|
9
|
+
this.icon = icon;
|
|
10
|
+
this.label = label;
|
|
11
|
+
this.callbackFn = callbackFn;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
render() {
|
|
15
|
+
return html`${template(this)}`;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@property({ type: String }) icon = "";
|
|
19
|
+
@property({ type: String }) label = "";
|
|
20
|
+
@property({ attribute: false }) callbackFn = () => {};
|
|
21
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { html } from "lit";
|
|
2
|
+
import { QuickActionItem } from "./quick-action-item";
|
|
3
|
+
|
|
4
|
+
export const template = (props: QuickActionItem) => {
|
|
5
|
+
return html`
|
|
6
|
+
<dss-action-menu-item @click=${props.callbackFn} notificationsstate="error" rightIcon=${props.icon} label=${props.label}></dss-action-menu-item>
|
|
7
|
+
`;
|
|
8
|
+
};
|
|
@@ -28,11 +28,7 @@ class RegionManagerProxy implements PrimariaRegionManager {
|
|
|
28
28
|
* @return {Promise<void>} A promise that resolves when the view is successfully registered.
|
|
29
29
|
*/
|
|
30
30
|
registerView(regionName: string, view: HarmonixViewDefinition): Promise<void> {
|
|
31
|
-
this.regionManager.registerViewWithRegion(
|
|
32
|
-
regionName,
|
|
33
|
-
`${this.pluginInfo.pluginId}::${view.id}`,
|
|
34
|
-
view,
|
|
35
|
-
);
|
|
31
|
+
this.regionManager.registerViewWithRegion(regionName, `${this.pluginInfo.pluginId}::${view.id}`, view);
|
|
36
32
|
return Promise.resolve();
|
|
37
33
|
}
|
|
38
34
|
/**
|
|
@@ -101,44 +97,30 @@ class RegionManagerProxy implements PrimariaRegionManager {
|
|
|
101
97
|
return Promise.resolve(region?.isViewActive(`${this.pluginInfo.pluginId}::${viewId}`));
|
|
102
98
|
}
|
|
103
99
|
registerQuickAction(view: HarmonixViewDefinition): Promise<void> {
|
|
104
|
-
this.regionManager.registerViewWithRegion(
|
|
105
|
-
shellRegions.quickActions,
|
|
106
|
-
`${this.pluginInfo.pluginId}::${view.id}`,
|
|
107
|
-
view,
|
|
108
|
-
);
|
|
100
|
+
this.regionManager.registerViewWithRegion(shellRegions.quickActions, `${this.pluginInfo.pluginId}::${view.id}`, view);
|
|
109
101
|
return Promise.resolve();
|
|
110
102
|
}
|
|
111
103
|
registerNavigationMenu(view: HarmonixViewDefinition): Promise<void> {
|
|
112
|
-
this.regionManager.registerViewWithRegion(
|
|
113
|
-
shellRegions.navigationMenu,
|
|
114
|
-
`${this.pluginInfo.pluginId}::${view.id}`,
|
|
115
|
-
view,
|
|
116
|
-
);
|
|
104
|
+
this.regionManager.registerViewWithRegion(shellRegions.navigationMenu, `${this.pluginInfo.pluginId}::${view.id}`, view);
|
|
117
105
|
return Promise.resolve();
|
|
118
106
|
}
|
|
119
107
|
registerMainView(view: HarmonixViewDefinition): Promise<void> {
|
|
120
|
-
this.regionManager.registerViewWithRegion(
|
|
121
|
-
shellRegions.main,
|
|
122
|
-
`${this.pluginInfo.pluginId}::${view.id}`,
|
|
123
|
-
view,
|
|
124
|
-
);
|
|
108
|
+
this.regionManager.registerViewWithRegion(shellRegions.main, `${this.pluginInfo.pluginId}::${view.id}`, view);
|
|
125
109
|
return Promise.resolve();
|
|
126
110
|
}
|
|
127
111
|
activateMainView(viewId: string): Promise<void> {
|
|
128
|
-
this.regionManager
|
|
129
|
-
.getRegion(shellRegions.main)
|
|
130
|
-
.activate(`${this.pluginInfo.pluginId}::${viewId}`);
|
|
112
|
+
this.regionManager.getRegion(shellRegions.main).activate(`${this.pluginInfo.pluginId}::${viewId}`);
|
|
131
113
|
this._notifyMainViewChanged(viewId);
|
|
132
114
|
return Promise.resolve();
|
|
133
115
|
}
|
|
134
116
|
|
|
135
117
|
getCurrentMainViewActive() {
|
|
136
|
-
const mainView = this.regionManager.getRegion(shellRegions.main)
|
|
137
|
-
.currentActiveViews[0] as HarmonixViewDefinition;
|
|
118
|
+
const mainView = this.regionManager.getRegion(shellRegions.main).currentActiveViews[0] as HarmonixViewDefinition;
|
|
138
119
|
return mainView?.id;
|
|
139
120
|
}
|
|
140
121
|
|
|
141
122
|
_notifyMainViewChanged(viewId: string) {
|
|
123
|
+
console.log(viewId);
|
|
142
124
|
this.broker.publish(shellEvents.mainViewChanged, { viewId });
|
|
143
125
|
}
|
|
144
126
|
|
|
@@ -6,6 +6,7 @@ export const shellRegions = {
|
|
|
6
6
|
navigationLowerLeftMenu: "navigation-lower-left-menu",
|
|
7
7
|
quickActions: "quick-actions-region",
|
|
8
8
|
floating: "floating-region",
|
|
9
|
+
communicationSidenav: "communication-sidenav-region",
|
|
9
10
|
};
|
|
10
11
|
|
|
11
12
|
export const clinicalMonitoringRegions = {
|
|
@@ -8,15 +8,13 @@ import { template } from "./template";
|
|
|
8
8
|
import styles from "./styles.css?inline";
|
|
9
9
|
import { activeGroupsWithEnabledFilters } from "../../custom-filters/selectors";
|
|
10
10
|
import { SetCustomFilterValue } from "../../custom-filters/set-custom-filter-value/request";
|
|
11
|
-
import {
|
|
12
|
-
IActivityHistoryCustomFilterGroup,
|
|
13
|
-
IActivityHistoryDiagnosticsFilter,
|
|
14
|
-
IActivityHistoryFilter,
|
|
15
|
-
} from "../../model";
|
|
11
|
+
import { IActivityHistoryCustomFilterGroup, IActivityHistoryDiagnosticsFilter, IActivityHistoryFilter } from "../../model";
|
|
16
12
|
import { activityHistoryEnabledCommonFiltersSelector } from "../../common-filters/selectors";
|
|
17
13
|
import { SetCommonFilter } from "../../common-filters/set-common-filter/request";
|
|
18
14
|
import { diagnosticFilterSelector } from "../../diagnostic-filters/selectors";
|
|
19
15
|
import { SetDiagnosticFiltersCommand } from "../../diagnostic-filters/set/request";
|
|
16
|
+
import { ResetCommonFilter } from "../../common-filters/reset-common-filter/request";
|
|
17
|
+
import { ResetCustomFilter } from "../../custom-filters/reset-custom-filter/request";
|
|
20
18
|
|
|
21
19
|
//@ts-ignore
|
|
22
20
|
@customElement("active-filters-badges")
|
|
@@ -65,4 +63,10 @@ export class ActiveFiltersBadges extends LitElement {
|
|
|
65
63
|
]),
|
|
66
64
|
);
|
|
67
65
|
}
|
|
66
|
+
|
|
67
|
+
resetFilters() {
|
|
68
|
+
this.api.broker.send(new SetDiagnosticFiltersCommand([]));
|
|
69
|
+
this.api.broker.send(new ResetCommonFilter());
|
|
70
|
+
this.api.broker.send(new ResetCustomFilter());
|
|
71
|
+
}
|
|
68
72
|
}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
:host{
|
|
2
|
+
display: flex;
|
|
3
|
+
justify-content: space-between;
|
|
4
|
+
}
|
|
5
|
+
|
|
1
6
|
.filters-container{
|
|
2
7
|
display: flex;
|
|
3
8
|
gap: var(--dss-spacing-md);
|
|
@@ -9,6 +14,7 @@
|
|
|
9
14
|
|
|
10
15
|
.filter-groups{
|
|
11
16
|
display: flex;
|
|
17
|
+
flex-wrap: wrap;
|
|
12
18
|
gap: var(--dss-spacing-xs);
|
|
13
19
|
}
|
|
14
20
|
|
|
@@ -19,6 +25,14 @@
|
|
|
19
25
|
font-weight: 600;
|
|
20
26
|
}
|
|
21
27
|
|
|
28
|
+
.clean-filters{
|
|
29
|
+
display: flex;
|
|
30
|
+
|
|
31
|
+
.separator{
|
|
32
|
+
padding: 0 8px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
22
36
|
.popover-content {
|
|
23
37
|
box-sizing: border-box;
|
|
24
38
|
display: flex;
|
|
@@ -147,5 +147,9 @@ export const template = (props: ActiveFiltersBadges) => {
|
|
|
147
147
|
}
|
|
148
148
|
</div>
|
|
149
149
|
</div>
|
|
150
|
+
<div class="clean-filters">
|
|
151
|
+
<div class="separator">|</div>
|
|
152
|
+
<dss-button variant="secondary" size="sm" label=${translate("chipHeader.cleanFilters")} icon="cleaning_services" @click=${props.resetFilters}></dss-button>
|
|
153
|
+
</div>
|
|
150
154
|
`;
|
|
151
155
|
};
|
|
@@ -42,14 +42,10 @@ const getFilterTemplate = (
|
|
|
42
42
|
};
|
|
43
43
|
|
|
44
44
|
const isSelected =
|
|
45
|
-
isCustom && option
|
|
46
|
-
? (filter as IActivityHistoryCustomFilter).enabledValues?.includes(option.id)
|
|
47
|
-
: filter.enabled;
|
|
45
|
+
isCustom && option ? (filter as IActivityHistoryCustomFilter).enabledValues?.includes(option.id) : filter.enabled;
|
|
48
46
|
|
|
49
47
|
const isEnabled =
|
|
50
|
-
(isCustom && option) || filter.singleOption
|
|
51
|
-
? (filterGroup as IActivityHistoryCustomFilterGroup).enabled
|
|
52
|
-
: true;
|
|
48
|
+
(isCustom && option) || filter.singleOption ? (filterGroup as IActivityHistoryCustomFilterGroup).enabled : true;
|
|
53
49
|
|
|
54
50
|
return filterTemplates[filter.type]?.(id, title, handleChange, isSelected, isEnabled) || html``;
|
|
55
51
|
};
|
|
@@ -81,9 +77,7 @@ export const template = (props: ActivityHistoryFilters) =>
|
|
|
81
77
|
</dss-input-switch>
|
|
82
78
|
${
|
|
83
79
|
group?.filters &&
|
|
84
|
-
repeat(group.filters, (filter: IActivityHistoryCustomFilter) =>
|
|
85
|
-
customFilterTemplate(filter, props, group),
|
|
86
|
-
)
|
|
80
|
+
repeat(group.filters, (filter: IActivityHistoryCustomFilter) => customFilterTemplate(filter, props, group))
|
|
87
81
|
}
|
|
88
82
|
</div> `,
|
|
89
83
|
)}
|
|
@@ -103,9 +97,11 @@ const customFilterTemplate = (
|
|
|
103
97
|
${
|
|
104
98
|
filter.singleOption
|
|
105
99
|
? getFilterTemplate(filter, props._onChangeCustomFilterValue.bind(props), group)
|
|
106
|
-
: html
|
|
107
|
-
|
|
100
|
+
: html`
|
|
101
|
+
<primaria-accordion isOpen=${true}>
|
|
102
|
+
<div class="custom-filter-title" slot="title">${filter.title}</div>
|
|
103
|
+
<div class="custom-filter-content" slot="content">${repeat(filter.options, (option) => html`${getFilterTemplate(filter, props._onChangeCustomFilterValue.bind(props), group, option)}`)}</div>
|
|
104
|
+
</primaria-accordion>`
|
|
108
105
|
}
|
|
109
|
-
|
|
110
106
|
</div>
|
|
111
107
|
`;
|
|
@@ -1,13 +1,7 @@
|
|
|
1
1
|
import { BrokerExtensions } from "@primaria/plugins-core";
|
|
2
2
|
import "../../activity-history-item/filter/UI/activity-history-filters/activity-history-filters";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
teardownSetCommonFilter,
|
|
6
|
-
} from "./common-filters/set-common-filter/bootstrapper";
|
|
7
|
-
import {
|
|
8
|
-
bootstrapAddCustomFilter,
|
|
9
|
-
teardownAddCustomFilter,
|
|
10
|
-
} from "./custom-filters/add-custom-filters/bootstrapper";
|
|
3
|
+
import { bootstrapSetCommonFilter, teardownSetCommonFilter } from "./common-filters/set-common-filter/bootstrapper";
|
|
4
|
+
import { bootstrapAddCustomFilter, teardownAddCustomFilter } from "./custom-filters/add-custom-filters/bootstrapper";
|
|
11
5
|
import {
|
|
12
6
|
bootstrapSetCustomFilterGroup,
|
|
13
7
|
teardownSetCustomFilterGroup,
|
|
@@ -16,14 +10,10 @@ import {
|
|
|
16
10
|
bootstrapSetCustomFilterValue,
|
|
17
11
|
teardownSetCustomFilterValue,
|
|
18
12
|
} from "./custom-filters/set-custom-filter-value/bootstrapper";
|
|
19
|
-
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./
|
|
23
|
-
import {
|
|
24
|
-
bootstrapSetDiagnosticFilter,
|
|
25
|
-
teardownSetDiagnosticFilter,
|
|
26
|
-
} from "./diagnostic-filters/set/bootstrapper";
|
|
13
|
+
import { bootstrapAddDiagnosticFilter, teardownAddDiagnosticFilter } from "./diagnostic-filters/add/bootstrapper";
|
|
14
|
+
import { bootstrapSetDiagnosticFilter, teardownSetDiagnosticFilter } from "./diagnostic-filters/set/bootstrapper";
|
|
15
|
+
import { bootstrapResetCommonFilter, teardownResetCommonFilter } from "./common-filters/reset-common-filter/bootstrapper";
|
|
16
|
+
import { bootstrapResetCustomFilter, teardownResetCustomFilter } from "./custom-filters/reset-custom-filter/bootstrapper";
|
|
27
17
|
|
|
28
18
|
export const bootstrapFilters = (broker: BrokerExtensions) => {
|
|
29
19
|
bootstrapSetCommonFilter(broker);
|
|
@@ -32,6 +22,8 @@ export const bootstrapFilters = (broker: BrokerExtensions) => {
|
|
|
32
22
|
bootstrapSetCustomFilterValue(broker);
|
|
33
23
|
bootstrapAddDiagnosticFilter(broker);
|
|
34
24
|
bootstrapSetDiagnosticFilter(broker);
|
|
25
|
+
bootstrapResetCommonFilter(broker);
|
|
26
|
+
bootstrapResetCustomFilter(broker);
|
|
35
27
|
};
|
|
36
28
|
|
|
37
29
|
export const teardownFilters = () => {
|
|
@@ -41,4 +33,6 @@ export const teardownFilters = () => {
|
|
|
41
33
|
teardownSetCustomFilterValue();
|
|
42
34
|
teardownAddDiagnosticFilter();
|
|
43
35
|
teardownSetDiagnosticFilter();
|
|
36
|
+
teardownResetCommonFilter();
|
|
37
|
+
teardownResetCustomFilter();
|
|
44
38
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BrokerExtensions } from "@primaria/plugins-core";
|
|
2
|
+
import { BrokerDisposableHandler } from "../../../../../../api/broker/primaria-broker";
|
|
3
|
+
import { ResetCommonFilter } from "./request";
|
|
4
|
+
import { ResetCommonFilterHandler } from "./handler";
|
|
5
|
+
|
|
6
|
+
let request: BrokerDisposableHandler;
|
|
7
|
+
|
|
8
|
+
export const bootstrapResetCommonFilter = (broker: BrokerExtensions) => {
|
|
9
|
+
request = broker.registerRequest(ResetCommonFilter, ResetCommonFilterHandler);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const teardownResetCommonFilter = () => {
|
|
13
|
+
request?.dispose();
|
|
14
|
+
};
|