@bahmni/home-app 0.0.1-dev.477 → 0.0.1-dev.478

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.
@@ -1,20 +1,20 @@
1
1
  import { jsx as n, jsxs as u, Fragment as pe } from "react/jsx-runtime";
2
- import { Q as _e, u as Ee, a as ge, f as Ce, z as Ne, P as fe, $ as Ae, B as v, q as Ie, W as De, t as be, H as Le, k as ye, D as ve, C as K, b as we, o as Oe, M as Se, R as Me, x as Re, T as Y, c as ee } from "./index-Di9GPxiI.js";
3
- import { useQuery as Ue } from "@tanstack/react-query";
4
- import { useState as h, useRef as ke, useEffect as _, useMemo as E, useCallback as T } from "react";
5
- const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTable-module_viewAttachmentsLink__aQ1on", He = "DocumentsTable-module_documentViewerContainer__F5m8D", xe = "DocumentsTable-module_printContainer__rtarJ", We = "DocumentsTable-module_attachmentItem__17KA7", ze = "DocumentsTable-module_attachmentCounter__WFiI3", Ve = "DocumentsTable-module_attachmentError__RI4U2", qe = "DocumentsTable-module_documentIframe__ptq5I", Fe = "DocumentsTable-module_attachmentContent__IaCEe", Ge = "DocumentsTable-module_attachmentLoading__FAR6p", Pe = "DocumentsTable-module_hiddenWhileLoading__IxocW", je = "DocumentsTable-module_documentImage__KQVgS", Qe = "DocumentsTable-module_header__345GY", Ke = "DocumentsTable-module_documentTypeCell__uWGM8", Ye = "DocumentsTable-module_printAllButton__IVYUW", Je = "DocumentsTable-module_attachmentHeader__yI2xn", o = {
6
- documentsTableBody: $e,
2
+ import { Q as _e, u as Ee, a as ge, f as Ce, z as Ne, $ as fe, b as Ae, B as v, U as Ie, q as De, t as be, H as Le, k as ye, D as ve, C as K, c as we, o as Oe, M as Se, R as Ue, x as Me, T as Y, d as ee } from "./index-rYOCqn9y.js";
3
+ import { useQuery as Re } from "@tanstack/react-query";
4
+ import { useState as h, useRef as $e, useEffect as _, useMemo as E, useCallback as T } from "react";
5
+ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTable-module_viewAttachmentsLink__aQ1on", He = "DocumentsTable-module_documentViewerContainer__F5m8D", xe = "DocumentsTable-module_printContainer__rtarJ", ze = "DocumentsTable-module_attachmentItem__17KA7", Ve = "DocumentsTable-module_attachmentCounter__WFiI3", We = "DocumentsTable-module_attachmentError__RI4U2", qe = "DocumentsTable-module_documentIframe__ptq5I", Fe = "DocumentsTable-module_attachmentContent__IaCEe", Ge = "DocumentsTable-module_attachmentLoading__FAR6p", je = "DocumentsTable-module_hiddenWhileLoading__IxocW", Pe = "DocumentsTable-module_documentImage__KQVgS", Qe = "DocumentsTable-module_header__345GY", Ke = "DocumentsTable-module_documentTypeCell__uWGM8", Ye = "DocumentsTable-module_printAllButton__IVYUW", Je = "DocumentsTable-module_attachmentHeader__yI2xn", o = {
6
+ documentsTableBody: ke,
7
7
  viewAttachmentsLink: Be,
8
8
  documentViewerContainer: He,
9
9
  printContainer: xe,
10
- attachmentItem: We,
11
- attachmentCounter: ze,
12
- attachmentError: Ve,
10
+ attachmentItem: ze,
11
+ attachmentCounter: Ve,
12
+ attachmentError: We,
13
13
  documentIframe: qe,
14
14
  attachmentContent: Fe,
15
15
  attachmentLoading: Ge,
16
- hiddenWhileLoading: Pe,
17
- documentImage: je,
16
+ hiddenWhileLoading: je,
17
+ documentImage: Pe,
18
18
  header: Qe,
19
19
  documentTypeCell: Ke,
20
20
  printAllButton: Ye,
@@ -40,16 +40,16 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
40
40
  /* @__PURE__ */ new Set()
41
41
  ), [D, O] = h(
42
42
  /* @__PURE__ */ new Set()
43
- ), N = ke(null), [S, W] = h(
43
+ ), N = $e(null), [S, z] = h(
44
44
  null
45
- ), z = S !== null;
45
+ ), V = S !== null;
46
46
  _(() => () => N.current?.abort(), []);
47
47
  const g = _e(), { t: a } = Ee(), { addNotification: b } = ge(), C = E(
48
48
  () => l?.actions?.find(
49
49
  (e) => e.type === Xe
50
50
  ),
51
51
  [l?.actions]
52
- ), te = Ce(C?.requiredPrivilege), ne = !!C && te, ae = Number(l?.pageSize) || 5, [M, R] = h(1), [f, oe] = h(ae), [re, U] = h(void 0), V = T((e) => {
52
+ ), te = Ce(C?.requiredPrivilege), ne = !!C && te, ae = Number(l?.pageSize) || 5, [U, M] = h(1), [f, oe] = h(ae), [re, R] = h(void 0), W = T((e) => {
53
53
  x(e), H(!0);
54
54
  }, []), de = T(() => {
55
55
  N.current?.abort(), O(/* @__PURE__ */ new Set()), H(!1), x(null), w(/* @__PURE__ */ new Set());
@@ -62,12 +62,12 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
62
62
  context: { encounterType: C.encounterType },
63
63
  action: { type: "create", resourceType: "DocumentReference" }
64
64
  });
65
- }, [C]), { data: A, isLoading: le, isError: k, error: $, refetch: G } = Ue({
65
+ }, [C]), { data: A, isLoading: le, isError: $, error: k, refetch: G } = Re({
66
66
  queryKey: [
67
67
  "documents",
68
68
  g,
69
69
  B,
70
- M,
70
+ U,
71
71
  f
72
72
  ],
73
73
  enabled: !!g,
@@ -75,7 +75,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
75
75
  g,
76
76
  B,
77
77
  f,
78
- M
78
+ U
79
79
  )
80
80
  });
81
81
  Ae(
@@ -84,16 +84,16 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
84
84
  },
85
85
  [g, G]
86
86
  ), _(() => {
87
- A && U(A.total);
87
+ A && R(A.total);
88
88
  }, [A]), _(() => {
89
- R(1), U(void 0);
89
+ M(1), R(void 0);
90
90
  }, [g]), _(() => {
91
- k && b({
91
+ $ && b({
92
92
  title: a("ERROR_DEFAULT_TITLE"),
93
- message: $?.message ?? "",
93
+ message: k?.message ?? "",
94
94
  type: "error"
95
95
  });
96
- }, [k, $, b, a]), _(() => {
96
+ }, [$, k, b, a]), _(() => {
97
97
  const e = new AbortController();
98
98
  return (async () => {
99
99
  if (!i || !r) return;
@@ -134,7 +134,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
134
134
  }, [i, r]);
135
135
  const ce = T(
136
136
  (e, t) => {
137
- t !== f ? (oe(t), R(1), U(void 0)) : R(e);
137
+ t !== f ? (oe(t), M(1), R(void 0)) : M(e);
138
138
  },
139
139
  [f]
140
140
  ), L = E(
@@ -149,7 +149,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
149
149
  ), c = E(
150
150
  () => r ? Z(r) : [],
151
151
  [r]
152
- ), P = c.every(
152
+ ), j = c.every(
153
153
  (e, t) => D.has(t) || I.has(t) || v(e.url) === "#"
154
154
  );
155
155
  _(() => {
@@ -160,11 +160,11 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
160
160
  );
161
161
  return () => clearTimeout(e);
162
162
  }, [i, c]);
163
- const j = T(
163
+ const P = T(
164
164
  async (e, t) => {
165
165
  if (!r || N.current) return;
166
166
  const d = new AbortController(), { signal: s } = d;
167
- N.current = d, W(t);
167
+ N.current = d, z(t);
168
168
  const m = document.getElementById(J);
169
169
  try {
170
170
  await De(
@@ -179,7 +179,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
179
179
  type: "error"
180
180
  });
181
181
  } finally {
182
- N.current = null, W(null);
182
+ N.current = null, z(null);
183
183
  }
184
184
  },
185
185
  [r, b, a]
@@ -218,7 +218,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
218
218
  return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ n(
219
219
  be,
220
220
  {
221
- onClick: () => V(e),
221
+ onClick: () => W(e),
222
222
  className: o.viewAttachmentsLink,
223
223
  "data-testid": `view-attachments-${e.id}`,
224
224
  children: a("DOCUMENTS_VIEW_ATTACHMENTS")
@@ -228,7 +228,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
228
228
  return null;
229
229
  }
230
230
  },
231
- [V, a]
231
+ [W, a]
232
232
  );
233
233
  return /* @__PURE__ */ u(pe, { children: [
234
234
  ne && /* @__PURE__ */ u(ve, { className: o.header, testId: "documents-header", children: [
@@ -253,7 +253,7 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
253
253
  ariaLabel: a("DOCUMENTS_TABLE_HEADING"),
254
254
  rows: ie,
255
255
  loading: le,
256
- errorStateMessage: k ? $?.message : null,
256
+ errorStateMessage: $ ? k?.message : null,
257
257
  sortable: ue,
258
258
  emptyStateMessage: a("DOCUMENTS_NO_RECORDS"),
259
259
  renderCell: he,
@@ -261,12 +261,12 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
261
261
  dataTestId: "documents-table",
262
262
  pageSize: f,
263
263
  totalItems: re,
264
- page: M,
264
+ page: U,
265
265
  onPageChange: ce
266
266
  }
267
267
  ) }),
268
268
  i && r && /* @__PURE__ */ n(
269
- Me,
269
+ Ue,
270
270
  {
271
271
  id: "modalIdForActionAreaLayout",
272
272
  portalId: "main-display-area",
@@ -278,15 +278,15 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
278
278
  testId: "document-view-modal",
279
279
  children: /* @__PURE__ */ u("div", { className: o.documentViewerContainer, children: [
280
280
  Q.length > 1 && /* @__PURE__ */ n(
281
- Re,
281
+ Me,
282
282
  {
283
283
  kind: "tertiary",
284
284
  size: "sm",
285
285
  className: o.printAllButton,
286
286
  renderIcon: S === "all" ? X : Y,
287
- disabled: z || !P,
287
+ disabled: V || !j,
288
288
  testId: "print-all-attachments",
289
- onClick: () => j(Q, "all"),
289
+ onClick: () => P(Q, "all"),
290
290
  children: a("DOCUMENTS_PRINT_ALL")
291
291
  }
292
292
  ),
@@ -325,9 +325,9 @@ const $e = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
325
325
  label: a("DOCUMENTS_PRINT_ATTACHMENT", {
326
326
  index: t + 1
327
327
  }),
328
- disabled: z || !P,
328
+ disabled: V || !j,
329
329
  testId: `print-attachment-${t}`,
330
- onClick: () => j([e], t),
330
+ onClick: () => P([e], t),
331
331
  children: S === t ? /* @__PURE__ */ n(X, {}) : /* @__PURE__ */ n(Y, {})
332
332
  }
333
333
  )
@@ -1,8 +1,8 @@
1
- import { jsx as n, jsxs as $, Fragment as ne } from "react/jsx-runtime";
2
- import { u as de, Q as ie, f as le, p as me, d as ue, e as ce, E as fe, J as ye, $ as pe, g as Ne, n as ge, h as he, H as be, z as Oe, C as q, i as z, t as Te, M as Q, O as Ie, S as Ae, R as _e, j as Ee, l as ve } from "./index-Di9GPxiI.js";
1
+ import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
2
+ import { u as ie, Q as de, f as le, p as me, e as ue, g as ce, E as fe, J as ye, b as pe, h as Ne, n as be, i as ge, H as he, z as Oe, C as $, j as z, t as Te, M as Q, O as Ie, S as Ae, R as _e, l as Ee, s as ve } from "./index-rYOCqn9y.js";
3
3
  import { useQueryClient as Ce, useQuery as A } from "@tanstack/react-query";
4
- import { useState as V, useMemo as d, useCallback as i } from "react";
5
- const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_modalHeading__wnTmA", Be = "FormsTable-module_customAccordianItem__isszs", g = {
4
+ import { useState as V, useMemo as i, useCallback as d } from "react";
5
+ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_modalHeading__wnTmA", Be = "FormsTable-module_customAccordianItem__isszs", b = {
6
6
  formsTableBody: Re,
7
7
  modalHeading: Le,
8
8
  customAccordianItem: Be
@@ -13,13 +13,13 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
13
13
  disableActions: x = !1,
14
14
  activeEncounterUuid: y = null
15
15
  }) => {
16
- const { t: o } = de(), m = ie(), [h, E] = V(!1), [s, v] = V(null), {
16
+ const { t: o } = ie(), m = de(), [g, E] = V(!1), [s, v] = V(null), {
17
17
  numberOfVisits: K,
18
18
  hideThumbnail: P = !1,
19
19
  forms: p
20
20
  } = j ?? {}, G = le(
21
21
  ve.EDIT_OBSERVATIONS
22
- ), { userPrivileges: N } = me(), b = G && !x && !!y, C = ue(
22
+ ), { userPrivileges: N } = me(), h = G && !x && !!y, C = ue(
23
23
  _,
24
24
  l
25
25
  ), J = Ce(), {
@@ -32,7 +32,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
32
32
  queryKey: ["forms", m, _],
33
33
  queryFn: () => ce(m, void 0, K),
34
34
  enabled: !!m && !C
35
- }), F = d(() => {
35
+ }), F = i(() => {
36
36
  let e = R;
37
37
  return l && l.length > 0 && (e = e.filter(
38
38
  (r) => l.includes(r.encounterUuid)
@@ -42,7 +42,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
42
42
  }, [R, l, p]), { data: S = [] } = A({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => fe()
45
- }), M = i(
45
+ }), M = d(
46
46
  (e) => {
47
47
  const r = S.find(
48
48
  (t) => t.name.toLowerCase() === e.toLowerCase()
@@ -55,7 +55,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
55
55
  );
56
56
  },
57
57
  [S, N]
58
- ), u = i(
58
+ ), u = d(
59
59
  (e) => !y || e.encounterUuid !== y ? !1 : M(e.formName),
60
60
  [y, M]
61
61
  ), {
@@ -66,7 +66,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
66
66
  } = A({
67
67
  queryKey: ["formsEncounterFHIR", s?.encounterUuid],
68
68
  queryFn: () => ye(s.encounterUuid),
69
- enabled: !!s?.encounterUuid && h
69
+ enabled: !!s?.encounterUuid && g
70
70
  });
71
71
  pe(
72
72
  (e) => {
@@ -74,28 +74,28 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
74
74
  },
75
75
  [m]
76
76
  );
77
- const ee = d(() => !O?.entry || !s?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Ne(e) ? ge(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [O, s?.formName]), re = d(() => {
77
+ const ee = i(() => !O?.entry || !s?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => Ne(e) ? be(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [O, s?.formName]), re = i(() => {
78
78
  if (T)
79
- return he(T).message;
80
- }, [T]), c = d(
79
+ return ge(T).message;
80
+ }, [T]), c = i(
81
81
  () => [
82
82
  { key: "recordedOn", header: o("RECORDED_ON") },
83
83
  { key: "recordedBy", header: o("RECORDED_BY") }
84
84
  ],
85
85
  [o]
86
- ), U = d(
86
+ ), U = i(
87
87
  () => [...c, { key: "actions", header: o("ACTIONS") }],
88
88
  [c, o]
89
- ), ae = i(
90
- (e) => b && e.some((r) => u(r)) ? U : c,
91
- [b, u, U, c]
92
- ), oe = c, se = d(
89
+ ), ae = d(
90
+ (e) => h && e.some((r) => u(r)) ? U : c,
91
+ [h, u, U, c]
92
+ ), oe = c, se = i(
93
93
  () => [
94
94
  { key: "recordedOn", sortable: !0 },
95
95
  { key: "recordedBy", sortable: !0 }
96
96
  ],
97
97
  []
98
- ), D = d(() => {
98
+ ), D = i(() => {
99
99
  const e = F.reduce(
100
100
  (r, a) => {
101
101
  const t = a.formName;
@@ -104,7 +104,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
104
104
  return r[t].push({
105
105
  id: a.encounterUuid,
106
106
  formName: a.formName,
107
- recordedOn: be(a.encounterDateTime, o, !0).formattedResult,
107
+ recordedOn: he(a.encounterDateTime, o, !0).formattedResult,
108
108
  recordedBy: f ?? "--",
109
109
  encounterDateTime: a.encounterDateTime,
110
110
  encounterUuid: a.encounterUuid
@@ -120,11 +120,11 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
120
120
  )
121
121
  })
122
122
  ).sort((r, a) => r.formName.localeCompare(a.formName));
123
- }, [F, o]), k = i((e) => {
123
+ }, [F, o]), k = d((e) => {
124
124
  v(e), E(!0);
125
- }, []), w = i(() => {
125
+ }, []), w = d(() => {
126
126
  E(!1), v(null);
127
- }, []), I = i((e) => {
127
+ }, []), I = d((e) => {
128
128
  Oe({
129
129
  context: {
130
130
  encounter: { resourceType: "Encounter", id: e.encounterUuid },
@@ -133,7 +133,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
133
133
  },
134
134
  action: { type: "update", resourceType: "Observation" }
135
135
  });
136
- }, []), H = i(
136
+ }, []), H = d(
137
137
  (e, r) => {
138
138
  switch (r) {
139
139
  case "recordedOn":
@@ -142,7 +142,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
142
142
  return e.recordedBy;
143
143
  case "actions":
144
144
  return u(e) ? /* @__PURE__ */ n(
145
- q,
145
+ $,
146
146
  {
147
147
  label: o("EDIT_OBSERVATION_FORM"),
148
148
  kind: "ghost",
@@ -158,7 +158,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
158
158
  },
159
159
  [k, I, u, o]
160
160
  );
161
- return /* @__PURE__ */ $(ne, { children: [
161
+ return /* @__PURE__ */ q(ne, { children: [
162
162
  /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L || B || D.length === 0 || C ? /* @__PURE__ */ n(
163
163
  Q,
164
164
  {
@@ -169,7 +169,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
169
169
  errorStateMessage: B ? W?.message : void 0,
170
170
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
171
171
  renderCell: H,
172
- className: g.formsTableBody,
172
+ className: b.formsTableBody,
173
173
  dataTestId: "forms-table"
174
174
  }
175
175
  ) : /* @__PURE__ */ n(Ie, { align: "start", children: D.map((e, r) => {
@@ -178,7 +178,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
178
178
  Ae,
179
179
  {
180
180
  title: a,
181
- className: g.customAccordianItem,
181
+ className: b.customAccordianItem,
182
182
  testId: `accordian-title-${a}`,
183
183
  open: r === 0,
184
184
  children: /* @__PURE__ */ n(
@@ -192,7 +192,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
192
192
  sortable: se,
193
193
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
194
194
  renderCell: H,
195
- className: g.formsTableBody,
195
+ className: b.formsTableBody,
196
196
  dataTestId: `forms-table-${a}`
197
197
  }
198
198
  )
@@ -200,17 +200,17 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
200
200
  a
201
201
  );
202
202
  }) }) }),
203
- h && s && /* @__PURE__ */ n(
203
+ g && s && /* @__PURE__ */ n(
204
204
  _e,
205
205
  {
206
206
  id: "modalIdForActionAreaLayout",
207
207
  portalId: "main-display-area",
208
- open: h,
208
+ open: g,
209
209
  onRequestClose: w,
210
- modalHeading: /* @__PURE__ */ $("div", { className: g.modalHeading, children: [
210
+ modalHeading: /* @__PURE__ */ q("div", { className: b.modalHeading, children: [
211
211
  /* @__PURE__ */ n("span", { children: s.formName }),
212
- b && u(s) && /* @__PURE__ */ n(
213
- q,
212
+ h && u(s) && /* @__PURE__ */ n(
213
+ $,
214
214
  {
215
215
  label: o("EDIT_OBSERVATION_FORM"),
216
216
  kind: "ghost",
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-uxsjEl-N.js";
2
- import { aa as d, ab as f, ac as e } from "./index-Di9GPxiI.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CaMe8zOX.js";
2
+ import { aa as d, ab as f, ac as e } from "./index-rYOCqn9y.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
- import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-uxsjEl-N.js";
2
- import { aa as v, ab as C, ac as e } from "./index-Di9GPxiI.js";
1
+ import { c as s, T as c, P as u, a as i, b as m, C as P, Q as d } from "./YPM2AS64-CaMe8zOX.js";
2
+ import { aa as v, ab as C, ac as e } from "./index-rYOCqn9y.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as S, jsx as n } from "react/jsx-runtime";
2
- import { Q as H, a as x, u as U, m as z, d as G, I as j, L as J, $ as X, r as P, s as Y, v as W, w as Z, D as ee, M as ae, y as se, A as F, X as re, F as te, H as ie, G as oe, K as ne, N as de, U as le } from "./index-Di9GPxiI.js";
2
+ import { Q as H, a as x, u as F, m as z, e as G, L as Y, r as j, b as J, X as P, v as X, w as W, y as Z, D as ee, M as ae, Y as se, A as U, F as re, G as te, H as ie, I as oe, K as ne, N as de, P as le } from "./index-rYOCqn9y.js";
3
3
  import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
4
4
  import { useRef as me, useEffect as L, useMemo as g } from "react";
5
5
  const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", R = {
@@ -48,7 +48,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
48
48
  `obs-${s.id}`
49
49
  );
50
50
  }, ye = (s, l, o, d, u, r, t) => /* @__PURE__ */ n(
51
- F,
51
+ U,
52
52
  {
53
53
  title: s.display,
54
54
  id: `grouped-obs-${s.display}-${d}`,
@@ -70,10 +70,10 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
70
70
  title: l = "",
71
71
  hideThumbnail: o
72
72
  }) => {
73
- const { t: d } = U(), u = (r, t, e) => {
73
+ const { t: d } = F(), u = (r, t, e) => {
74
74
  const m = se(r.encounterDetails, d);
75
75
  return /* @__PURE__ */ S(
76
- F,
76
+ U,
77
77
  {
78
78
  title: m,
79
79
  id: `encounter-${r.encounterId}`,
@@ -132,7 +132,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
132
132
  conceptUuid: r = [],
133
133
  hideThumbnail: t = !1,
134
134
  scope: e = "all"
135
- } = d, m = me(/* @__PURE__ */ new Set()), i = H(), { addNotification: p } = x(), { t: c } = U(), b = ce({
135
+ } = d, m = me(/* @__PURE__ */ new Set()), i = H(), { addNotification: p } = x(), { t: c } = F(), b = ce({
136
136
  queries: u.map((a) => ({
137
137
  queryKey: Oe(a),
138
138
  queryFn: () => z(a),
@@ -162,18 +162,18 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
162
162
  o,
163
163
  e
164
164
  ),
165
- queryFn: () => O ? j(
165
+ queryFn: () => O ? Y(
166
166
  i,
167
167
  h,
168
168
  o
169
- ) : J(
169
+ ) : j(
170
170
  i,
171
171
  h,
172
172
  o
173
173
  ),
174
174
  enabled: !!i && h.length > 0 && v && !B
175
175
  });
176
- X(
176
+ J(
177
177
  (a) => {
178
178
  a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
179
179
  (y) => h.includes(y)
@@ -190,7 +190,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
190
190
  const $ = g(() => {
191
191
  if (!_) return [];
192
192
  let a = P(_);
193
- e === "latest-encounter" && (a = Y(a));
193
+ e === "latest-encounter" && (a = X(a));
194
194
  const y = W(a);
195
195
  return Z(y);
196
196
  }, [_, e]), w = [
@@ -1,4 +1,4 @@
1
- import { ad as we, ae as z, af as xt, ag as B, ab as q, ac as y, ah as Ro, ai as ye, aj as R, ak as _, al as k, am as N, an as A, ao as bs, ap as ir, aq as $e, ar as U, as as Hn, at as Vn, au as dt, av as D, aw as xs, ax as cn, ay as Be, az as ws, aA as qt, aB as zt, aC as $s, aD as Cs, aE as $n, aF as Ss, aG as Nr, aH as Bt, aI as zo, aJ as ks, aK as Es, aL as j, aM as Ur, aN as Ms, aO as Ds, aP as sr, aQ as As, aR as Ts, aS as zn, aT as Fs, aU as Is, aV as Z, aW as Ps, aX as Ls } from "./index-Di9GPxiI.js";
1
+ import { ad as we, ae as z, af as xt, ag as B, ab as q, ac as y, ah as Ro, ai as ye, aj as R, ak as _, al as k, am as N, an as A, ao as bs, ap as ir, aq as $e, ar as U, as as Hn, at as Vn, au as dt, av as D, aw as xs, ax as cn, ay as Be, az as ws, aA as qt, aB as zt, aC as $s, aD as Cs, aE as $n, aF as Ss, aG as Nr, aH as Bt, aI as zo, aJ as ks, aK as Es, aL as j, aM as Ur, aN as Ms, aO as Ds, aP as sr, aQ as As, aR as Ts, aS as zn, aT as Fs, aU as Is, aV as Z, aW as Ps, aX as Ls } from "./index-rYOCqn9y.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as qt } from "react/jsx-runtime";
2
- import { u as rl, Q as il, V as ol, Y as al, Z as ul, _ as sl, a0 as ll, a1 as cl, a2 as hl, a3 as fl } from "./index-Di9GPxiI.js";
2
+ import { u as rl, Q as il, V as ol, W as al, Z as ul, _ as sl, a0 as ll, a1 as cl, a2 as hl, a3 as fl } from "./index-rYOCqn9y.js";
3
3
  import { useQuery as xo } from "@tanstack/react-query";
4
4
  var ou = /* @__PURE__ */ ((t) => (t.WHITE = "white", t.G100 = "g100", t.G90 = "g90", t.G10 = "g10", t))(ou || {}), tr = /* @__PURE__ */ ((t) => (t.GRAPH_VIEW = "graph_view", t.SLIDER_VIEW = "slider_view", t))(tr || {}), au = /* @__PURE__ */ ((t) => (t.END_LINE = "end_line", t.MID_LINE = "mid_line", t.FRONT_LINE = "front_line", t.NONE = "none", t))(au || {}), Gn = /* @__PURE__ */ ((t) => (t.TIME = "time", t.LINEAR = "linear", t.LOG = "log", t.LABELS = "labels", t.LABELS_RATIO = "labels-ratio", t))(Gn || {}), uu = /* @__PURE__ */ ((t) => (t.RIGHT = "right", t.LEFT = "left", t.TOP = "top", t.BOTTOM = "bottom", t))(uu || {}), ve = /* @__PURE__ */ ((t) => (t.LEFT = "left", t.CENTER = "center", t.RIGHT = "right", t))(ve || {}), su = /* @__PURE__ */ ((t) => (t.TREE = "tree", t.DENDROGRAM = "dendrogram", t))(su || {}), lu = /* @__PURE__ */ ((t) => (t.SEMI = "semi", t.FULL = "full", t))(lu || {}), te = /* @__PURE__ */ ((t) => (t.SCATTER = "scatter", t.LINE = "line", t.SIMPLE_BAR = "simple-bar", t.STACKED_BAR = "stacked-bar", t.GROUPED_BAR = "grouped-bar", t.AREA = "area", t.STACKED_AREA = "stacked-area", t))(te || {}), Pe = /* @__PURE__ */ ((t) => (t.EXPORT_CSV = "Export as CSV", t.EXPORT_PNG = "Export as PNG", t.EXPORT_JPG = "Export as JPG", t.ZOOM_IN = "Zoom in", t.ZOOM_OUT = "Zoom out", t.RESET_ZOOM = "Reset zoom", t.MAKE_FULLSCREEN = "Make fullscreen", t.EXIT_FULLSCREEN = "Exit fullscreen", t.SHOW_AS_DATATABLE = "Show as data-table", t.CUSTOM = "Custom", t))(Pe || {}), Nt = /* @__PURE__ */ ((t) => (t.CHECKBOX = "checkbox", t.RADIUS = "radius", t.AREA = "area", t.SIZE = "size", t.LINE = "line", t.QUARTILE = "quartile", t.ZOOM = "zoom", t))(Nt || {}), cu = /* @__PURE__ */ ((t) => (t.ON = "on", t.AUTO = "auto", t.OFF = "off", t))(cu || {}), hu = /* @__PURE__ */ ((t) => (t.geoEqualEarth = "geoEqualEarth", t.geoAlbers = "geoAlbers", t.geoConicEqualArea = "geoConicEqualArea", t.geoConicEquidistant = "geoConicEquidistant", t.geoEquirectangular = "geoEquirectangular", t.geoMercator = "geoMercator", t.geoNaturalEarth1 = "geoNaturalEarth1", t))(hu || {});
5
5
  function Ir(t) {
@@ -1,23 +1,23 @@
1
1
  import { jsx as e, jsxs as d, Fragment as E } from "react/jsx-runtime";
2
- import { a4 as _, a5 as f, u as m, a6 as u, a7 as O, a8 as g, a as h, a9 as H } from "./index-Di9GPxiI.js";
2
+ import { a4 as _, a5 as f, u as m, a6 as u, a7 as O, a8 as g, a as h, a9 as H } from "./index-rYOCqn9y.js";
3
3
  import "@tanstack/react-query";
4
4
  import { useRef as N, useEffect as S } from "react";
5
5
  import { useNavigate as M, useLocation as p } from "react-router";
6
- const I = "HomePageGrid-module_headerOffset__xmJ-q", y = {
6
+ const I = "HomePageGrid-module_headerOffset__xmJ-q", P = {
7
7
  headerOffset: I
8
- }, P = () => /* @__PURE__ */ e(
8
+ }, y = () => /* @__PURE__ */ e(
9
9
  _,
10
10
  {
11
11
  extensionPointId: f,
12
12
  loadingLabelKey: "HOME_LOADING_MODULES",
13
13
  errorMessageKey: "HOME_ERROR_FETCH_CONFIG",
14
14
  emptyMessageKey: "HOME_NO_MODULES",
15
- className: y.headerOffset,
15
+ className: P.headerOffset,
16
16
  testId: "home-modules"
17
17
  }
18
- ), D = "HomePageHeader-module_locationSelector__foYmn", L = {
18
+ ), D = "HomePageHeader-module_locationSelector__foYmn", T = {
19
19
  locationSelector: D
20
- }, T = () => {
20
+ }, C = () => {
21
21
  const { t: a } = m();
22
22
  return /* @__PURE__ */ e(
23
23
  u,
@@ -26,13 +26,13 @@ const I = "HomePageGrid-module_headerOffset__xmJ-q", y = {
26
26
  brandPrefix: a("HOME_LABEL"),
27
27
  brandHref: "/",
28
28
  globalFeatures: [
29
- /* @__PURE__ */ e("div", { className: L.locationSelector, children: /* @__PURE__ */ e(g, {}) }, "location")
29
+ /* @__PURE__ */ e("div", { className: T.locationSelector, children: /* @__PURE__ */ e(g, {}) }, "location")
30
30
  ],
31
31
  userMenu: /* @__PURE__ */ e(O, {})
32
32
  }
33
33
  );
34
- }, C = "HomePage-module_homePageBody__0qtrS", A = {
35
- homePageBody: C
34
+ }, L = "HomePage-module_homePageBody__0qtrS", A = {
35
+ homePageBody: L
36
36
  }, R = () => {
37
37
  const { t: a } = m(), { addNotification: t } = h(), s = M(), { pathname: r, search: n, hash: c, state: l } = p(), o = l?.accessDenied, i = N(!1);
38
38
  return S(() => {
@@ -43,8 +43,8 @@ const I = "HomePageGrid-module_headerOffset__xmJ-q", y = {
43
43
  timeout: H
44
44
  }), s({ pathname: r, search: n, hash: c }, { replace: !0, state: null }));
45
45
  }, [o, t, a, s, r, n, c]), /* @__PURE__ */ d(E, { children: [
46
- /* @__PURE__ */ e(T, {}),
47
- /* @__PURE__ */ e("main", { className: A.homePageBody, children: /* @__PURE__ */ e(P, {}) })
46
+ /* @__PURE__ */ e(C, {}),
47
+ /* @__PURE__ */ e("main", { className: A.homePageBody, children: /* @__PURE__ */ e(y, {}) })
48
48
  ] });
49
49
  };
50
50
  export {