@bahmni/admin-app 0.0.1-dev.442 → 0.0.1-dev.443

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,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { C as o, F as a, G as s, I } from "./index-gUvbXTOR.js";
2
+ import { C as o, F as a, G as s, I } from "./index-JLCGGo7t.js";
3
3
  import "react";
4
4
  import "@tanstack/react-query";
5
5
  const i = () => /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
@@ -1,6 +1,6 @@
1
1
  import { jsx as d, jsxs as S } from "react/jsx-runtime";
2
- import { _ as ee, a0 as te, a1 as se, a2 as K, u as ae, a3 as ne, a4 as re, C as ie, U as oe, a5 as ue, a6 as de, a7 as C, Y as V, a8 as le } from "./index-gUvbXTOR.js";
3
- import { useState as l, useRef as U, useEffect as k, useMemo as ce, useCallback as me } from "react";
2
+ import { _ as ee, a0 as te, a1 as se, a2 as K, u as ae, a3 as ne, a4 as re, C as ie, U as oe, a5 as ue, a6 as de, a7 as U, Y as V, a8 as le } from "./index-JLCGGo7t.js";
3
+ import { useState as l, useRef as C, useEffect as k, useMemo as ce, useCallback as me } from "react";
4
4
  import { useQuery as _e } from "@tanstack/react-query";
5
5
  const G = Symbol.for("constructDateFrom");
6
6
  function y(e, t) {
@@ -38,9 +38,9 @@ const Le = (e, t) => {
38
38
  startTime: "00:00",
39
39
  username: "",
40
40
  patientId: ""
41
- }), [r, a] = l(0), [i, u] = l(0), [_, E] = l([]), [R, p] = l(null), [b, f] = l(!1), [F, g] = l(!1), [O, M] = l(1), T = U(1), s = (c) => {
41
+ }), [r, a] = l(0), [i, u] = l(0), [_, E] = l([]), [R, p] = l(null), [b, f] = l(!1), [O, g] = l(!1), [F, M] = l(1), T = C(1), s = (c) => {
42
42
  T.current = c, M(c);
43
- }, o = U(0), [n, j] = l(null), B = U(null), { data: N, isLoading: X, isFetching: L, isError: z } = _e({
43
+ }, o = C(0), [n, j] = l(null), B = C(null), { data: N, isLoading: z, isFetching: L, isError: Q } = _e({
44
44
  queryKey: ["auditLogs", n?.requestId],
45
45
  queryFn: () => te(n.params),
46
46
  enabled: !!n,
@@ -58,7 +58,7 @@ const Le = (e, t) => {
58
58
  emptyMessageKey: $,
59
59
  requestId: o.current
60
60
  });
61
- }, A = Le(e.startDate, e.startTime), Q = () => {
61
+ }, A = Le(e.startDate, e.startTime), X = () => {
62
62
  I(
63
63
  "init",
64
64
  { startFrom: A, defaultView: !0 },
@@ -67,7 +67,7 @@ const Le = (e, t) => {
67
67
  0,
68
68
  q
69
69
  );
70
- }, v = () => !!r || !!i, W = () => {
70
+ }, v = () => !!r || !!i, Z = () => {
71
71
  if (!L) {
72
72
  if (!v()) {
73
73
  x();
@@ -88,7 +88,7 @@ const Le = (e, t) => {
88
88
  Y
89
89
  );
90
90
  }
91
- }, Z = () => {
91
+ }, J = () => {
92
92
  if (!L) {
93
93
  if (!v()) {
94
94
  x();
@@ -122,7 +122,7 @@ const Le = (e, t) => {
122
122
  0,
123
123
  Te
124
124
  );
125
- }, J = () => {
125
+ }, W = () => {
126
126
  L || (t({
127
127
  startDate: null,
128
128
  startTime: "",
@@ -131,7 +131,7 @@ const Le = (e, t) => {
131
131
  }), I("init", { defaultView: !0 }, !0, 0, 0, q));
132
132
  };
133
133
  return k(() => {
134
- Q();
134
+ X();
135
135
  }, []), k(() => {
136
136
  if (!n || N === void 0 || B.current === n.requestId) return;
137
137
  B.current = n.requestId;
@@ -152,19 +152,19 @@ const Le = (e, t) => {
152
152
  filters: e,
153
153
  setFilters: t,
154
154
  logs: _,
155
- isLoading: X || L,
155
+ isLoading: z || L,
156
156
  isFetching: L,
157
- isError: z,
157
+ isError: Q,
158
158
  emptyMessageKey: R,
159
159
  firstIndex: r,
160
160
  lastIndex: i,
161
161
  hasNext: b,
162
- hasPrevious: F,
163
- currentPageNumber: O,
164
- next: W,
165
- prev: Z,
162
+ hasPrevious: O,
163
+ currentPageNumber: F,
164
+ next: Z,
165
+ prev: J,
166
166
  runReport: x,
167
- reset: J
167
+ reset: W
168
168
  };
169
169
  }, pe = "AuditLog-module_page__-FKzd", Ne = "AuditLog-module_filters__DA4tQ", Ae = "AuditLog-module_filterRow__x6DqE", P = {
170
170
  page: pe,
@@ -183,9 +183,9 @@ const Le = (e, t) => {
183
183
  hasPrevious: p,
184
184
  currentPageNumber: b,
185
185
  next: f,
186
- prev: F,
186
+ prev: O,
187
187
  runReport: g,
188
- reset: O
188
+ reset: F
189
189
  } = Ie(), M = ce(
190
190
  () => [
191
191
  { key: "auditLogId", header: e("EVENT_ID") },
@@ -256,7 +256,7 @@ const Le = (e, t) => {
256
256
  t.startDate?.getTime() ?? "empty"
257
257
  ),
258
258
  /* @__PURE__ */ d(
259
- C,
259
+ U,
260
260
  {
261
261
  id: "audit-log-start-time",
262
262
  type: "time",
@@ -270,7 +270,7 @@ const Le = (e, t) => {
270
270
  }
271
271
  ),
272
272
  /* @__PURE__ */ d(
273
- C,
273
+ U,
274
274
  {
275
275
  id: "audit-log-username",
276
276
  labelText: e("USERNAME_FILTER_LABEL"),
@@ -284,7 +284,7 @@ const Le = (e, t) => {
284
284
  }
285
285
  ),
286
286
  /* @__PURE__ */ d(
287
- C,
287
+ U,
288
288
  {
289
289
  id: "audit-log-patient-id",
290
290
  labelText: e("PATIENT_ID_FILTER_LABEL"),
@@ -301,7 +301,7 @@ const Le = (e, t) => {
301
301
  V,
302
302
  {
303
303
  kind: "tertiary",
304
- onClick: O,
304
+ onClick: F,
305
305
  disabled: u,
306
306
  testId: "audit-log-reset-button",
307
307
  children: e("AUDIT_LOG_RESET_BUTTON_LABEL")
@@ -340,7 +340,7 @@ const Le = (e, t) => {
340
340
  disabled: u,
341
341
  previousLabel: e("AUDIT_LOG_PREV_BUTTON_LABEL"),
342
342
  nextLabel: e("AUDIT_LOG_NEXT_BUTTON_LABEL"),
343
- onSetChange: (s) => s === "next" ? f() : F()
343
+ onSetChange: (s) => s === "next" ? f() : O()
344
344
  }
345
345
  }
346
346
  ) })
@@ -1,16 +1,16 @@
1
1
  import { jsx as n, jsxs as d } from "react/jsx-runtime";
2
- import { u as N, z as A, K as R, M as O, N as h, O as P, P as g, C as V, U as D, V as f, Y as x, Z as b } from "./index-gUvbXTOR.js";
2
+ import { u as A, z as M, K as R, M as O, N as h, O as P, P as g, C as V, U as D, V as f, Y as x, Z as b } from "./index-JLCGGo7t.js";
3
3
  import { useState as E, useMemo as y } from "react";
4
4
  import { useQuery as L, useMutation as v } from "@tanstack/react-query";
5
- const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U = "CsvExport-module_form__w-cN-", z = "CsvExport-module_search__G82i7", r = {
5
+ const X = "CsvExport-module_tile__yBrLM", U = "CsvExport-module_title__epZnI", B = "CsvExport-module_form__w-cN-", H = "CsvExport-module_search__G82i7", r = {
6
6
  tile: X,
7
- title: B,
8
- form: U,
9
- search: z
10
- }, G = 300, p = 2, _ = 5e3, H = "custom:(uuid,setMembers:(uuid))", K = () => {
11
- const { t } = N(), { addNotification: i } = A(), [C, S] = E(""), [s, c] = E(
7
+ title: U,
8
+ form: B,
9
+ search: H
10
+ }, z = 300, p = 2, _ = 5e3, G = "custom:(uuid,setMembers:(uuid))", k = () => {
11
+ const { t } = A(), { addNotification: i } = M(), [C, S] = E(""), [s, c] = E(
12
12
  null
13
- ), a = R(C.trim(), G), { data: l = [] } = L({
13
+ ), a = R(C.trim(), z), { data: l = [] } = L({
14
14
  queryKey: ["csvExportConceptSearch", a],
15
15
  queryFn: () => O(a),
16
16
  enabled: a.length >= p && a !== s?.name,
@@ -22,7 +22,7 @@ const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U
22
22
  ),
23
23
  [l]
24
24
  ), o = v({
25
- mutationFn: async (e) => (await P(e.uuid, H)).setMembers?.length ? g(e.name) : null,
25
+ mutationFn: async (e) => (await P(e.uuid, G)).setMembers?.length ? g(e.name) : null,
26
26
  onSuccess: (e, u) => {
27
27
  const m = u.name;
28
28
  if (!e || e.size === 0) {
@@ -51,7 +51,7 @@ const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U
51
51
  }
52
52
  }), I = (e) => {
53
53
  S(e), s && e !== s.name && c(null);
54
- }, M = (e) => {
54
+ }, N = (e) => {
55
55
  if (e.preventDefault(), !o.isPending) {
56
56
  if (!s) {
57
57
  i({
@@ -74,7 +74,7 @@ const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U
74
74
  className: r.tile,
75
75
  children: [
76
76
  /* @__PURE__ */ n("h2", { className: r.title, children: t("ADMIN_CSV_EXPORT_TITLE") }),
77
- /* @__PURE__ */ d("form", { className: r.form, onSubmit: M, noValidate: !0, children: [
77
+ /* @__PURE__ */ d("form", { className: r.form, onSubmit: N, noValidate: !0, children: [
78
78
  /* @__PURE__ */ n("div", { className: r.search, children: /* @__PURE__ */ n(
79
79
  f,
80
80
  {
@@ -118,5 +118,5 @@ const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U
118
118
  ) });
119
119
  };
120
120
  export {
121
- K as CsvExport
121
+ k as CsvExport
122
122
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as e } from "react/jsx-runtime";
2
- import { u as d, C as o } from "./index-gUvbXTOR.js";
2
+ import { u as d, C as o } from "./index-JLCGGo7t.js";
3
3
  const t = "CsvUpload-module_page__AxMNv", i = {
4
4
  page: t
5
5
  }, n = () => {
@@ -1,5 +1,5 @@
1
- import { jsx as d, jsxs as h, Fragment as G } from "react/jsx-runtime";
2
- import { d as Q, u as W, z as J, a as Y, J as X, h as Z, $ as ee, b as te } from "./index-gUvbXTOR.js";
1
+ import { jsx as d, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
+ import { d as G, u as J, z as W, a as Y, J as X, h as Z, $ as ee, b as te } from "./index-JLCGGo7t.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", de = "DocumentsTable-module_documentViewerContainer__F5m8D", re = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", r = {
@@ -38,7 +38,7 @@ const Te = [
38
38
  null
39
39
  ), [$, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), g = Q(), { t: n } = W(), { addNotification: L } = J(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
41
+ ), g = G(), { t: n } = J(), { addNotification: L } = W(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
42
42
  U(e), w(!0);
43
43
  }, []), H = _(() => {
44
44
  w(!1), U(null), O(/* @__PURE__ */ new Set());
@@ -106,7 +106,7 @@ const Te = [
106
106
  ), T = p(
107
107
  () => o ? B(o) : [],
108
108
  [o]
109
- ), x = _(
109
+ ), Q = _(
110
110
  (e, t) => {
111
111
  switch (t) {
112
112
  case "documentIdentifier":
@@ -137,7 +137,7 @@ const Te = [
137
137
  },
138
138
  [M, n]
139
139
  );
140
- return /* @__PURE__ */ h(G, { children: [
140
+ return /* @__PURE__ */ h(x, { children: [
141
141
  /* @__PURE__ */ d("div", { "data-testid": "documents-table", children: /* @__PURE__ */ d(
142
142
  ee,
143
143
  {
@@ -148,7 +148,7 @@ const Te = [
148
148
  errorStateMessage: y ? b?.message : null,
149
149
  sortable: K,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
151
- renderCell: x,
151
+ renderCell: Q,
152
152
  className: r.documentsTableBody,
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
@@ -1,50 +1,50 @@
1
1
  import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
2
- import { u as ie, d as de, c as le, k as me, H as ue, o as ce, E as fe, Q as ye, w as Te, D as he, R as Ne, e as ge, h as pe, L as V, T as $, J as Oe, $ as K, W as be, q as Ee, b as Ie, f as Ae, g as Re } from "./index-gUvbXTOR.js";
3
- import { useQueryClient as _e, useQuery as I } from "@tanstack/react-query";
2
+ import { u as ie, d as de, c as le, k as me, H as ue, o as ce, E as fe, Q as ye, w as Te, D as he, R as Ne, e as ge, h as pe, L as V, T as $, J as Oe, $ as K, W as be, q as Ie, b as Ee, f as _e, g as Ae } from "./index-JLCGGo7t.js";
3
+ import { useQueryClient as Re, useQuery as E } from "@tanstack/react-query";
4
4
  import { useState as Q, useMemo as i, useCallback as d } from "react";
5
5
  const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA", ve = "FormsTable-module_customAccordianItem__isszs", N = {
6
6
  formsTableBody: Le,
7
7
  modalHeading: Ce,
8
8
  customAccordianItem: ve
9
- }, Fe = "startConsultation", Me = ({
10
- episodeOfCareUuids: A,
9
+ }, Be = "startConsultation", Me = ({
10
+ episodeOfCareUuids: _,
11
11
  encounterUuids: l,
12
12
  config: z,
13
13
  disableActions: j = !1,
14
14
  activeEncounterUuid: y = null
15
15
  }) => {
16
- const { t: o } = ie(), m = de(), [g, R] = Q(!1), [t, _] = Q(null), {
16
+ const { t: o } = ie(), m = de(), [g, A] = Q(!1), [t, R] = Q(null), {
17
17
  numberOfVisits: x,
18
18
  hideThumbnail: G = !1,
19
19
  forms: T
20
20
  } = z ?? {}, J = le(
21
- Re.EDIT_OBSERVATIONS
21
+ Ae.EDIT_OBSERVATIONS
22
22
  ), { userPrivileges: h } = me(), p = J && !j && !!y, L = ue(
23
- A,
23
+ _,
24
24
  l
25
- ), W = _e(), {
25
+ ), P = Re(), {
26
26
  data: C = [],
27
27
  isLoading: v,
28
- isError: F,
29
- error: P,
28
+ isError: B,
29
+ error: W,
30
30
  refetch: Y
31
- } = I({
32
- queryKey: ["forms", m, A],
31
+ } = E({
32
+ queryKey: ["forms", m, _],
33
33
  queryFn: () => ce(m, void 0, x),
34
34
  enabled: !!m && !L
35
- }), B = i(() => {
35
+ }), D = i(() => {
36
36
  let e = C;
37
37
  return l && l.length > 0 && (e = e.filter(
38
38
  (r) => l.includes(r.encounterUuid)
39
39
  )), Array.isArray(T) && T.length > 0 && (e = e.filter(
40
40
  (r) => T.some((a) => a.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [C, l, T]), { data: D = [] } = I({
42
+ }, [C, l, T]), { data: F = [] } = E({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => fe()
45
45
  }), U = d(
46
46
  (e) => {
47
- const r = D.find(
47
+ const r = F.find(
48
48
  (s) => s.name.toLowerCase() === e.toLowerCase()
49
49
  );
50
50
  if (!r?.privileges || r.privileges.length === 0) return !0;
@@ -54,7 +54,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
54
54
  (s) => a.has(s.privilegeName) && s.editable
55
55
  );
56
56
  },
57
- [D, h]
57
+ [F, h]
58
58
  ), u = d(
59
59
  (e) => !y || e.encounterUuid !== y ? !1 : U(e.formName),
60
60
  [y, U]
@@ -63,14 +63,14 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
63
63
  isLoading: X,
64
64
  isError: Z,
65
65
  error: b
66
- } = I({
66
+ } = E({
67
67
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
68
68
  queryFn: () => ye(t.encounterUuid),
69
69
  enabled: !!t?.encounterUuid && g
70
70
  });
71
71
  Te(
72
72
  (e) => {
73
- e.patientUUID === m && (Y(), W.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
73
+ e.patientUUID === m && (Y(), P.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
74
74
  },
75
75
  [m]
76
76
  );
@@ -96,7 +96,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
96
96
  ],
97
97
  []
98
98
  ), M = i(() => {
99
- const e = B.reduce(
99
+ const e = D.reduce(
100
100
  (r, a) => {
101
101
  const s = a.formName;
102
102
  r[s] ??= [];
@@ -120,13 +120,13 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
120
120
  )
121
121
  })
122
122
  ).sort((r, a) => r.formName.localeCompare(a.formName));
123
- }, [B, o]), k = d((e) => {
124
- _(e), R(!0);
123
+ }, [D, o]), k = d((e) => {
124
+ R(e), A(!0);
125
125
  }, []), w = d(() => {
126
- R(!1), _(null);
127
- }, []), E = d((e) => {
126
+ A(!1), R(null);
127
+ }, []), I = d((e) => {
128
128
  globalThis.dispatchEvent(
129
- new CustomEvent(Fe, {
129
+ new CustomEvent(Be, {
130
130
  detail: {
131
131
  editOnly: "observationForms",
132
132
  editTitle: "EDIT_OBSERVATION_FORM_TITLE",
@@ -151,7 +151,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
151
151
  kind: "ghost",
152
152
  size: "sm",
153
153
  testId: `edit-form-${e.encounterUuid}`,
154
- onClick: () => E(e),
154
+ onClick: () => I(e),
155
155
  children: /* @__PURE__ */ n($, {})
156
156
  }
157
157
  ) : null;
@@ -159,17 +159,17 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
159
159
  return null;
160
160
  }
161
161
  },
162
- [k, E, u, o]
162
+ [k, I, u, o]
163
163
  );
164
164
  return /* @__PURE__ */ q(ne, { children: [
165
- /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: v || F || M.length === 0 || L ? /* @__PURE__ */ n(
165
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: v || B || M.length === 0 || L ? /* @__PURE__ */ n(
166
166
  K,
167
167
  {
168
168
  headers: oe,
169
169
  ariaLabel: o("FORMS_HEADING"),
170
170
  rows: [],
171
171
  loading: v,
172
- errorStateMessage: F ? P?.message : void 0,
172
+ errorStateMessage: B ? W?.message : void 0,
173
173
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
174
174
  renderCell: H,
175
175
  className: N.formsTableBody,
@@ -178,7 +178,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
178
178
  ) : /* @__PURE__ */ n(be, { align: "start", children: M.map((e, r) => {
179
179
  const { formName: a, records: s } = e, f = ae(s);
180
180
  return /* @__PURE__ */ n(
181
- Ee,
181
+ Ie,
182
182
  {
183
183
  title: a,
184
184
  className: N.customAccordianItem,
@@ -204,7 +204,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
204
204
  );
205
205
  }) }) }),
206
206
  g && t && /* @__PURE__ */ n(
207
- Ie,
207
+ Ee,
208
208
  {
209
209
  id: "modalIdForActionAreaLayout",
210
210
  portalId: "main-display-area",
@@ -220,7 +220,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
220
220
  size: "sm",
221
221
  testId: `edit-form-modal-${t.encounterUuid}`,
222
222
  onClick: () => {
223
- w(), E(t);
223
+ w(), I(t);
224
224
  },
225
225
  children: /* @__PURE__ */ n($, {})
226
226
  }
@@ -231,7 +231,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
231
231
  size: "md",
232
232
  testId: "form-details-modal",
233
233
  children: /* @__PURE__ */ n(
234
- Ae,
234
+ _e,
235
235
  {
236
236
  observations: ee,
237
237
  isLoading: X,
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-Dyjz9YII.js";
2
- import { a9 as d, aa as f, ab as e } from "./index-gUvbXTOR.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-xjQ40sBa.js";
2
+ import { a9 as d, aa as f, ab as e } from "./index-JLCGGo7t.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-Dyjz9YII.js";
2
- import { a9 as v, aa as C, ab as e } from "./index-gUvbXTOR.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-xjQ40sBa.js";
2
+ import { a9 as v, aa as C, ab as e } from "./index-JLCGGo7t.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 { d as H, z as x, u as V, t as M, H as j, n as G, r as J, w as X, p as P, i as Y, j as W, m as Z, l as ee, $ as ae, s as se, S as B, v as te, x as re, h as ie, y as oe, A as ne, B as de, X as le } from "./index-gUvbXTOR.js";
2
+ import { d as H, z as x, u as V, t as M, H as j, n as G, r as J, w as X, p as P, i as Y, j as W, m as Z, l as ee, $ as ae, s as se, S as B, v as te, x as re, h as ie, y as oe, A as ne, B as de, X as le } from "./index-JLCGGo7t.js";
3
3
  import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
4
4
  import { useRef as pe, useEffect as L, useMemo as g } from "react";
5
5
  const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
@@ -7,7 +7,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
7
7
  title: be,
8
8
  wrapper: he,
9
9
  secondary: ve
10
- }, U = (s, l, o, d, c, t) => {
10
+ }, w = (s, l, o, d, c, t) => {
11
11
  const r = te(s, l, c), e = r.value, p = re(e);
12
12
  let i = e;
13
13
  p === "Image" && (i = /* @__PURE__ */ n(
@@ -54,7 +54,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
54
54
  id: `grouped-obs-${s.display}-${d}`,
55
55
  open: o,
56
56
  children: s.members?.map(
57
- (e, p) => U(
57
+ (e, p) => w(
58
58
  e,
59
59
  p,
60
60
  c,
@@ -80,7 +80,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
80
80
  open: r,
81
81
  children: [
82
82
  t.observations.map(
83
- (i, m) => U(
83
+ (i, m) => w(
84
84
  i,
85
85
  m,
86
86
  e,
@@ -147,12 +147,12 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
147
147
  type: "error"
148
148
  }), p.current.add(0)) : !a && y && p.current.clear();
149
149
  }, [b, m, u]);
150
- const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...t])], [T, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), f = e === "latest" || e === "latest-encounter", w = j(
150
+ const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...t])], [T, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), f = e === "latest" || e === "latest-encounter", F = j(
151
151
  l,
152
152
  o
153
153
  ), {
154
154
  data: R,
155
- isLoading: F,
155
+ isLoading: U,
156
156
  isError: I,
157
157
  refetch: N
158
158
  } = ce({
@@ -171,7 +171,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
171
171
  h,
172
172
  o
173
173
  ),
174
- enabled: !!i && h.length > 0 && v && !w
174
+ enabled: !!i && h.length > 0 && v && !F
175
175
  });
176
176
  X(
177
177
  (a) => {
@@ -197,7 +197,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
197
197
  { key: "name", header: "name" },
198
198
  { key: "value", header: "value" },
199
199
  { key: "form", header: "form" }
200
- ], A = F || !v, D = I && v, K = (!R || R.entry?.length === 0 || h.length === 0) && v, k = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, q = K ? u("NO_OBSERVATIONS_FOUND") : void 0, Q = $.length > 0 && !A && !D, E = d.titleTranslationKey, _ = E ? u(E) : "";
200
+ ], A = U || !v, D = I && v, K = (!R || R.entry?.length === 0 || h.length === 0) && v, k = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, q = K ? u("NO_OBSERVATIONS_FOUND") : void 0, Q = $.length > 0 && !A && !D, E = d.titleTranslationKey, _ = E ? u(E) : "";
201
201
  return /* @__PURE__ */ S(
202
202
  "div",
203
203
  {
@@ -1,4 +1,4 @@
1
- import { ac as we, ad as z, ae as xt, af as B, aa as q, ab as y, ag as Ro, ah as ye, ai as R, aj as _, ak as k, al as N, am as A, an as bs, ao as ir, ap as $e, aq as U, ar as Hn, as as Vn, at as dt, au as D, av as xs, aw as cn, ax as Be, ay as ws, az as qt, aA as zt, aB as $s, aC as Cs, aD as $n, aE as Ss, aF as Nr, aG as Bt, aH as zo, aI as ks, aJ as Es, aK as j, aL as Ur, aM as Ms, aN as Ds, aO as sr, aP as As, aQ as Ts, aR as zn, aS as Fs, aT as Is, aU as Z, aV as Ps, aW as Ls } from "./index-gUvbXTOR.js";
1
+ import { ac as we, ad as z, ae as xt, af as B, aa as q, ab as y, ag as Ro, ah as ye, ai as R, aj as _, ak as k, al as N, am as A, an as bs, ao as ir, ap as $e, aq as U, ar as Hn, as as Vn, at as dt, au as D, av as xs, aw as cn, ax as Be, ay as ws, az as qt, aA as zt, aB as $s, aC as Cs, aD as $n, aE as Ss, aF as Nr, aG as Bt, aH as zo, aI as ks, aJ as Es, aK as j, aL as Ur, aM as Ms, aN as Ds, aO as sr, aP as As, aQ as Ts, aR as zn, aS as Fs, aT as Is, aU as Z, aV as Ps, aW as Ls } from "./index-JLCGGo7t.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {