@uxland/primary-shell 5.3.2 → 5.3.4
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 +6323 -6232
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +444 -435
- package/dist/index.umd.cjs.map +1 -1
- package/dist/primary/shell/src/UI/internal-views/lower-nav-menu-views.d.ts +1 -0
- package/dist/primary/shell/src/UI/internal-views/upper-nav-views.d.ts +1 -0
- package/dist/primary/shell/src/features/get-user-info/backend-adapter.d.ts +1 -0
- package/dist/primary/shell/src/features/visit/finalize-visit/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/features/visit/finalize-visit/component/finalize-visit-button.d.ts +9 -0
- package/dist/primary/shell/src/features/visit/finalize-visit/component/template.d.ts +3 -0
- package/dist/primary/shell/src/features/visit/finalize-visit/handler.d.ts +8 -0
- package/dist/primary/shell/src/features/visit/finalize-visit/request.d.ts +4 -0
- package/dist/primary/shell/src/features/visit/get-visit-id/bootstrapper.d.ts +4 -0
- package/dist/primary/shell/src/features/visit/get-visit-id/handler.d.ts +9 -0
- package/dist/primary/shell/src/features/visit/get-visit-id/request.d.ts +2 -0
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/domain/business-rules.d.ts +2 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/domain/model.d.ts +9 -1
- package/dist/primary/shell/src/internal-plugins/activity-history/activity-history-item/selectors.d.ts +4 -4
- package/dist/primary/shell/src/internal-plugins/activity-history/utils/get-unique-values-by-prop-path.d.ts +1 -1
- package/dist/primary/shell/src/locales.d.ts +1 -0
- package/package.json +4 -4
- package/src/UI/bootstrapper.ts +2 -0
- package/src/UI/components/bootstrapper.ts +2 -0
- package/src/UI/components/primaria-shell/shell-header/template.ts +2 -1
- package/src/UI/internal-views/handle-views.ts +13 -0
- package/src/UI/internal-views/lower-nav-menu-views.ts +19 -0
- package/src/UI/internal-views/upper-nav-views.ts +200 -0
- package/src/bootstrapper.ts +0 -2
- package/src/features/bootstrapper.ts +6 -0
- package/src/features/get-user-info/backend-adapter.ts +14 -3
- package/src/features/visit/finalize-visit/bootstrapper.ts +17 -0
- package/src/features/visit/finalize-visit/component/finalize-visit-button.ts +36 -0
- package/src/features/visit/finalize-visit/component/template.ts +9 -0
- package/src/features/visit/finalize-visit/handler.ts +18 -0
- package/src/features/visit/finalize-visit/request.ts +3 -0
- package/src/features/visit/get-visit-id/bootstrapper.ts +17 -0
- package/src/features/visit/get-visit-id/handler.ts +27 -0
- package/src/features/visit/get-visit-id/request.ts +1 -0
- package/src/internal-plugins/activity-history/activity-history-item/domain/business-rules.ts +25 -1
- package/src/internal-plugins/activity-history/activity-history-item/domain/is-valid-history-item/is-valid-history-item.test.ts +48 -6
- package/src/internal-plugins/activity-history/activity-history-item/domain/is-valid-history-item/is-valid-history-item.ts +13 -7
- package/src/internal-plugins/activity-history/activity-history-item/domain/model.ts +10 -1
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/activity-history-timeline.ts +20 -3
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/styles.css +8 -4
- package/src/internal-plugins/activity-history/activity-history-item/list/UI/timeline/template.ts +10 -10
- package/src/internal-plugins/activity-history/activity-history-item/list/group-history-items/group-history-items.ts +7 -4
- package/src/internal-plugins/activity-history/utils/get-unique-values-by-prop-path.test.ts +6 -6
- package/src/internal-plugins/activity-history/utils/get-unique-values-by-prop-path.ts +4 -7
- package/src/locales.ts +1 -0
- package/src/handle-views.ts +0 -255
- /package/dist/primary/shell/src/{handle-views.d.ts → UI/internal-views/handle-views.d.ts} +0 -0
package/src/handle-views.ts
DELETED
|
@@ -1,255 +0,0 @@
|
|
|
1
|
-
import { shellApi } from "./api/api";
|
|
2
|
-
import { registerPDFVisorMainView } from "./api/pdf-viewer-manager/handle-views";
|
|
3
|
-
import { shellRegions } from "./api/region-manager/regions";
|
|
4
|
-
import { pocTestEventsId } from "./constants";
|
|
5
|
-
import { ExitShell } from "./features/exit/request";
|
|
6
|
-
import { getPatientCip } from "./features/get-patient-cip/action";
|
|
7
|
-
import { navigateToEcapWithoutClosingWithCip } from "./features/navigate-to-ecap/navigate-without-closing-and-with-cip";
|
|
8
|
-
import { PrimariaNavItem } from "./UI/shared-components/primaria-nav-item/primaria-nav-item";
|
|
9
|
-
import { PrimariaNavTreeMenu } from "./UI/shared-components/primaria-nav-tree-menu/primaria-nav-tree-menu";
|
|
10
|
-
|
|
11
|
-
const registerUpperNavMenuViews = () => {
|
|
12
|
-
shellApi.regionManager.registerView(shellRegions.navigationMenu, {
|
|
13
|
-
id: "landing",
|
|
14
|
-
factory: () => {
|
|
15
|
-
const menuItem = new PrimariaNavItem({
|
|
16
|
-
icon: "home",
|
|
17
|
-
label: "Pàgina inici",
|
|
18
|
-
callbackFn: () => {
|
|
19
|
-
shellApi.broker.send(new ExitShell());
|
|
20
|
-
},
|
|
21
|
-
});
|
|
22
|
-
return Promise.resolve(menuItem);
|
|
23
|
-
},
|
|
24
|
-
sortHint: "0010",
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
shellApi.regionManager.registerView(shellRegions.navigationMenu, {
|
|
28
|
-
id: "processes",
|
|
29
|
-
factory: () => {
|
|
30
|
-
const menuItem = new PrimariaNavTreeMenu({
|
|
31
|
-
icon: "account_tree",
|
|
32
|
-
label: "Vies clíniques",
|
|
33
|
-
actionMenuItems: [
|
|
34
|
-
{
|
|
35
|
-
icon: "open_in_new",
|
|
36
|
-
label: "ARES",
|
|
37
|
-
callbackFn: async () => {
|
|
38
|
-
navigateToEcapWithoutClosingWithCip("PROCES_ATENCIO");
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
icon: "open_in_new",
|
|
43
|
-
label: "Procés Obstètric",
|
|
44
|
-
callbackFn: (): void => {},
|
|
45
|
-
},
|
|
46
|
-
{
|
|
47
|
-
icon: "open_in_new",
|
|
48
|
-
label: "Nen sa",
|
|
49
|
-
callbackFn: async () => {
|
|
50
|
-
navigateToEcapWithoutClosingWithCip("NEN_SA");
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
icon: "open_in_new",
|
|
55
|
-
label: "Odontologia",
|
|
56
|
-
callbackFn: async () => {
|
|
57
|
-
navigateToEcapWithoutClosingWithCip("ODONTOLOGO");
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
icon: "open_in_new",
|
|
62
|
-
label: "Situació d'especial cura",
|
|
63
|
-
callbackFn: async () => {
|
|
64
|
-
navigateToEcapWithoutClosingWithCip("SIT_ESPEC_CURA_DEV");
|
|
65
|
-
},
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
});
|
|
69
|
-
return Promise.resolve(menuItem);
|
|
70
|
-
},
|
|
71
|
-
sortHint: "0040",
|
|
72
|
-
});
|
|
73
|
-
shellApi.regionManager.registerView(shellRegions.navigationMenu, {
|
|
74
|
-
id: "unique-petition",
|
|
75
|
-
factory: () => {
|
|
76
|
-
const menuItem = new PrimariaNavTreeMenu({
|
|
77
|
-
icon: "playlist_add",
|
|
78
|
-
label: "Petitori",
|
|
79
|
-
actionMenuItems: [
|
|
80
|
-
{
|
|
81
|
-
icon: "open_in_new",
|
|
82
|
-
label: "Analítiques",
|
|
83
|
-
callbackFn: async (): Promise<void> => {
|
|
84
|
-
navigateToEcapWithoutClosingWithCip("LABORATORI");
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
{
|
|
88
|
-
icon: "open_in_new",
|
|
89
|
-
label: "Ordres Clíniques",
|
|
90
|
-
callbackFn: async (): Promise<void> => {
|
|
91
|
-
navigateToEcapWithoutClosingWithCip("RESULT_OC");
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
icon: "open_in_new",
|
|
96
|
-
label: "OC Exprés",
|
|
97
|
-
callbackFn: async (): Promise<void> => {
|
|
98
|
-
navigateToEcapWithoutClosingWithCip("OC_EXPRES");
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
icon: "open_in_new",
|
|
103
|
-
label: "Sol·licitud de trasllat",
|
|
104
|
-
callbackFn: async (): Promise<void> => {
|
|
105
|
-
navigateToEcapWithoutClosingWithCip("TRANSPORT");
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
});
|
|
110
|
-
return Promise.resolve(menuItem);
|
|
111
|
-
},
|
|
112
|
-
sortHint: "0050",
|
|
113
|
-
});
|
|
114
|
-
shellApi.regionManager.registerView(shellRegions.navigationMenu, {
|
|
115
|
-
id: "results-reports",
|
|
116
|
-
factory: () => {
|
|
117
|
-
const menuItem = new PrimariaNavTreeMenu({
|
|
118
|
-
icon: "folder_shared",
|
|
119
|
-
label: "Documents",
|
|
120
|
-
actionMenuItems: [
|
|
121
|
-
{
|
|
122
|
-
icon: "open_in_new",
|
|
123
|
-
label: "Resultats i informes ECAP",
|
|
124
|
-
callbackFn: (): void => {},
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
icon: "open_in_new",
|
|
128
|
-
label: "Documents usuari",
|
|
129
|
-
callbackFn: async (): Promise<void> => {
|
|
130
|
-
setTimeout(() => {
|
|
131
|
-
navigateToEcapWithoutClosingWithCip("CRIDA_DOCS_USU");
|
|
132
|
-
}, 0);
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
],
|
|
136
|
-
});
|
|
137
|
-
return Promise.resolve(menuItem);
|
|
138
|
-
},
|
|
139
|
-
sortHint: "0070",
|
|
140
|
-
});
|
|
141
|
-
shellApi.regionManager.registerView(shellRegions.navigationMenu, {
|
|
142
|
-
id: "communication",
|
|
143
|
-
factory: () => {
|
|
144
|
-
const menuItem = new PrimariaNavTreeMenu({
|
|
145
|
-
icon: "3p",
|
|
146
|
-
label: "Comunicació",
|
|
147
|
-
actionMenuItems: [
|
|
148
|
-
{
|
|
149
|
-
icon: "open_in_new",
|
|
150
|
-
label: "SMS",
|
|
151
|
-
callbackFn: async (): Promise<void> => {
|
|
152
|
-
const CIP = await getPatientCip(shellApi);
|
|
153
|
-
shellApi.ecapEventManager.publish("MISSATGES_DEV", "NO_TANCAR", {
|
|
154
|
-
CIP: CIP || "",
|
|
155
|
-
TipusMissatge: "SMS",
|
|
156
|
-
});
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
{
|
|
160
|
-
icon: "open_in_new",
|
|
161
|
-
label: "Econsulta",
|
|
162
|
-
callbackFn: (): void => {},
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
icon: "open_in_new",
|
|
166
|
-
label: "Mail",
|
|
167
|
-
callbackFn: (): void => {},
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
icon: "open_in_new",
|
|
171
|
-
label: "Veu IP",
|
|
172
|
-
callbackFn: async (): Promise<void> => {
|
|
173
|
-
navigateToEcapWithoutClosingWithCip("VOIP");
|
|
174
|
-
},
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
icon: "open_in_new",
|
|
178
|
-
label: "Videoconsulta",
|
|
179
|
-
callbackFn: (): void => {},
|
|
180
|
-
},
|
|
181
|
-
],
|
|
182
|
-
});
|
|
183
|
-
return Promise.resolve(menuItem);
|
|
184
|
-
},
|
|
185
|
-
sortHint: "0120",
|
|
186
|
-
});
|
|
187
|
-
shellApi.regionManager.registerView(shellRegions.navigationMenu, {
|
|
188
|
-
id: "visits",
|
|
189
|
-
factory: () => {
|
|
190
|
-
const menuItem = new PrimariaNavItem({
|
|
191
|
-
icon: "event",
|
|
192
|
-
label: "Visites",
|
|
193
|
-
callbackFn: async (): Promise<void> => {
|
|
194
|
-
navigateToEcapWithoutClosingWithCip("CONSULTA_VISITES");
|
|
195
|
-
},
|
|
196
|
-
});
|
|
197
|
-
return Promise.resolve(menuItem);
|
|
198
|
-
},
|
|
199
|
-
sortHint: "0130",
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
shellApi.regionManager.registerView(shellRegions.navigationMenu, {
|
|
203
|
-
id: "it",
|
|
204
|
-
factory: () => {
|
|
205
|
-
const menuItem = new PrimariaNavItem({
|
|
206
|
-
icon: "add_box",
|
|
207
|
-
label: "IT",
|
|
208
|
-
callbackFn: async (): Promise<void> => {
|
|
209
|
-
navigateToEcapWithoutClosingWithCip("REV_IT");
|
|
210
|
-
},
|
|
211
|
-
});
|
|
212
|
-
return Promise.resolve(menuItem);
|
|
213
|
-
},
|
|
214
|
-
});
|
|
215
|
-
|
|
216
|
-
shellApi.regionManager.registerView(shellRegions.navigationMenu, {
|
|
217
|
-
id: "variable activities",
|
|
218
|
-
factory: () => {
|
|
219
|
-
const menuItem = new PrimariaNavItem({
|
|
220
|
-
icon: "add_box",
|
|
221
|
-
label: "Activitats variables",
|
|
222
|
-
callbackFn: async () => {
|
|
223
|
-
navigateToEcapWithoutClosingWithCip("SIA_DEV");
|
|
224
|
-
},
|
|
225
|
-
});
|
|
226
|
-
return Promise.resolve(menuItem);
|
|
227
|
-
},
|
|
228
|
-
});
|
|
229
|
-
};
|
|
230
|
-
|
|
231
|
-
const registerLowerNavMenuViews = () => {
|
|
232
|
-
shellApi.regionManager.registerView(shellRegions.navigationLowerLeftMenu, {
|
|
233
|
-
id: "configuration-center",
|
|
234
|
-
factory: () => {
|
|
235
|
-
const menuItem = new PrimariaNavItem({
|
|
236
|
-
icon: "settings",
|
|
237
|
-
label: "Centre de configuració",
|
|
238
|
-
callbackFn: () => {
|
|
239
|
-
// shellApi.regionManager.activateView(shellRegions.main, "");
|
|
240
|
-
},
|
|
241
|
-
});
|
|
242
|
-
return Promise.resolve(menuItem);
|
|
243
|
-
},
|
|
244
|
-
});
|
|
245
|
-
};
|
|
246
|
-
|
|
247
|
-
const registerMainViews = () => {
|
|
248
|
-
registerPDFVisorMainView();
|
|
249
|
-
};
|
|
250
|
-
|
|
251
|
-
export const useInternalViews = () => {
|
|
252
|
-
registerMainViews();
|
|
253
|
-
registerUpperNavMenuViews();
|
|
254
|
-
registerLowerNavMenuViews();
|
|
255
|
-
};
|
|
File without changes
|