@bahmni/admin-app 0.0.1-dev.441 → 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,11 +1,11 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { A as o, p as a, r as s, t as r } from "./index-C1nJC-ZZ.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(
6
6
  a,
7
7
  {
8
- extensionPointId: r,
8
+ extensionPointId: I,
9
9
  appName: s,
10
10
  loadingLabelKey: "ADMIN_LOADING_MODULES",
11
11
  errorMessageKey: "ADMIN_ERROR_FETCH_CONFIG",
@@ -1,5 +1,5 @@
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, A as ie, S as oe, a5 as ue, a6 as de, a7 as U, U as H, a8 as le } from "./index-C1nJC-ZZ.js";
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
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");
@@ -38,7 +38,7 @@ 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 = C(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
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],
@@ -48,10 +48,10 @@ const Le = (e, t) => {
48
48
  // (and audit logs must always be fetched fresh). Drop entries as soon as
49
49
  // they become inactive instead of retaining them for the default gcTime.
50
50
  gcTime: 0
51
- }), I = (c, V, m, D, h, $) => {
51
+ }), I = (c, H, m, D, h, $) => {
52
52
  o.current += 1, j({
53
53
  action: c,
54
- params: V,
54
+ params: H,
55
55
  alwaysReplace: m,
56
56
  defaultFirstIndex: D,
57
57
  defaultLastIndex: h,
@@ -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: "",
@@ -159,12 +159,12 @@ const Le = (e, t) => {
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") },
@@ -298,17 +298,17 @@ const Le = (e, t) => {
298
298
  }
299
299
  ),
300
300
  /* @__PURE__ */ d(
301
- H,
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")
308
308
  }
309
309
  ),
310
310
  /* @__PURE__ */ d(
311
- H,
311
+ V,
312
312
  {
313
313
  kind: "primary",
314
314
  onClick: g,
@@ -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,28 +1,28 @@
1
1
  import { jsx as n, jsxs as d } from "react/jsx-runtime";
2
- import { u as M, z as N, x as R, y as O, C as h, M as P, O as g, A as V, S as x, T as D, U as f, V as y } from "./index-C1nJC-ZZ.js";
3
- import { useState as E, useMemo as b } from "react";
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
+ 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, S = 2, _ = 5e3, H = "custom:(uuid,setMembers:(uuid))", K = () => {
11
- const { t } = M(), { addNotification: i } = N(), [p, C] = 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(p.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
- enabled: a.length >= S && a !== s?.name,
16
+ enabled: a.length >= p && a !== s?.name,
17
17
  // Keep prior options visible while the next term loads, but not once the input is too short to search
18
- placeholderData: (e) => a.length >= S ? e : void 0
19
- }), T = b(
18
+ placeholderData: (e) => a.length >= p ? e : void 0
19
+ }), T = y(
20
20
  () => l.flatMap(
21
21
  (e) => e.name?.name ? [{ uuid: e.uuid, name: e.name.name }] : []
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) {
@@ -50,8 +50,8 @@ const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U
50
50
  });
51
51
  }
52
52
  }), I = (e) => {
53
- C(e), s && e !== s.name && c(null);
54
- }, A = (e) => {
53
+ S(e), s && e !== s.name && c(null);
54
+ }, N = (e) => {
55
55
  if (e.preventDefault(), !o.isPending) {
56
56
  if (!s) {
57
57
  i({
@@ -66,7 +66,7 @@ const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U
66
66
  }
67
67
  };
68
68
  return /* @__PURE__ */ n(V, { breadcrumbLabel: t("BREADCRUMB_CSV_EXPORT"), children: /* @__PURE__ */ d(
69
- x,
69
+ D,
70
70
  {
71
71
  id: "admin-csv-export-page",
72
72
  "data-testid": "admin-csv-export-page-test-id",
@@ -74,9 +74,9 @@ 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: A, 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
- D,
79
+ f,
80
80
  {
81
81
  id: "csv-export-concept-search",
82
82
  "data-testid": "csv-export-concept-search-test-id",
@@ -96,7 +96,7 @@ const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U
96
96
  }
97
97
  ) }),
98
98
  /* @__PURE__ */ n(
99
- f,
99
+ x,
100
100
  {
101
101
  type: "submit",
102
102
  kind: "primary",
@@ -104,7 +104,7 @@ const X = "CsvExport-module_tile__yBrLM", B = "CsvExport-module_title__epZnI", U
104
104
  testId: "csv-export-button-test-id",
105
105
  disabled: o.isPending,
106
106
  children: o.isPending ? /* @__PURE__ */ n(
107
- y,
107
+ b,
108
108
  {
109
109
  description: t("ADMIN_CSV_EXPORT_IN_PROGRESS"),
110
110
  testId: "csv-export-loading-test-id"
@@ -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, A as o } from "./index-C1nJC-ZZ.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
1
  import { jsx as d, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
- import { d as G, u as W, z as Y, P as J, s as X, h as Z, $ as ee, a as te } from "./index-C1nJC-ZZ.js";
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,13 +38,13 @@ const Te = [
38
38
  null
39
39
  ), [$, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), g = G(), { t: n } = W(), { addNotification: L } = Y(), 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());
45
45
  }, []), v = _((e) => {
46
46
  O((t) => new Set(t).add(e));
47
- }, []), { data: i, isLoading: P, isError: y, error: b } = ae({
47
+ }, []), { data: i, isLoading: q, isError: y, error: b } = ae({
48
48
  queryKey: [
49
49
  "documents",
50
50
  g,
@@ -53,7 +53,7 @@ const Te = [
53
53
  u
54
54
  ],
55
55
  enabled: !!g,
56
- queryFn: () => J(
56
+ queryFn: () => Y(
57
57
  g,
58
58
  E,
59
59
  u,
@@ -89,7 +89,7 @@ const Te = [
89
89
  e.signal.aborted || O(t);
90
90
  })(), () => e.abort();
91
91
  }, [s, o]);
92
- const q = _(
92
+ const z = _(
93
93
  (e, t) => {
94
94
  t !== u ? (V(t), C(1), A(void 0)) : C(e);
95
95
  },
@@ -97,7 +97,7 @@ const Te = [
97
97
  ), N = p(
98
98
  () => a?.fields ?? Te,
99
99
  [a?.fields]
100
- ), z = p(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), j = p(() => ie(N, n), [N, n]), K = p(
100
+ ), j = p(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), P = p(() => ie(N, n), [N, n]), K = p(
101
101
  () => N.map((e) => ({
102
102
  key: e,
103
103
  sortable: e !== "attachments"
@@ -141,10 +141,10 @@ const Te = [
141
141
  /* @__PURE__ */ d("div", { "data-testid": "documents-table", children: /* @__PURE__ */ d(
142
142
  ee,
143
143
  {
144
- headers: j,
144
+ headers: P,
145
145
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
146
- rows: z,
147
- loading: P,
146
+ rows: j,
147
+ loading: q,
148
148
  errorStateMessage: y ? b?.message : null,
149
149
  sortable: K,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
@@ -154,7 +154,7 @@ const Te = [
154
154
  pageSize: u,
155
155
  totalItems: F,
156
156
  page: f,
157
- onPageChange: q
157
+ onPageChange: z
158
158
  }
159
159
  ) }),
160
160
  s && o && /* @__PURE__ */ d(
@@ -1,50 +1,50 @@
1
1
  import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
2
- import { u as de, d as ie, v as le, k as me, H as ue, B as ce, b as fe, D as ye, w as Ne, N as he, c as ge, R as Te, h as pe, L as V, e as $, s as Oe, $ as K, W as be, q as Ie, a as Ee, f as _e, g as Ae } from "./index-C1nJC-ZZ.js";
3
- import { useQueryClient as ve, useQuery as E } from "@tanstack/react-query";
4
- import { useState as j, useMemo as d, useCallback as i } from "react";
5
- const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_modalHeading__wnTmA", Re = "FormsTable-module_customAccordianItem__isszs", g = {
6
- formsTableBody: Be,
7
- modalHeading: Le,
8
- customAccordianItem: Re
9
- }, Ce = "startConsultation", Me = ({
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
+ import { useState as Q, useMemo as i, useCallback as d } from "react";
5
+ const Le = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA", ve = "FormsTable-module_customAccordianItem__isszs", N = {
6
+ formsTableBody: Le,
7
+ modalHeading: Ce,
8
+ customAccordianItem: ve
9
+ }, Be = "startConsultation", Me = ({
10
10
  episodeOfCareUuids: _,
11
11
  encounterUuids: l,
12
- config: x,
13
- disableActions: z = !1,
12
+ config: z,
13
+ disableActions: j = !1,
14
14
  activeEncounterUuid: y = null
15
15
  }) => {
16
- const { t: o } = de(), m = ie(), [T, A] = j(!1), [t, v] = j(null), {
17
- numberOfVisits: Q,
16
+ const { t: o } = ie(), m = de(), [g, A] = Q(!1), [t, R] = Q(null), {
17
+ numberOfVisits: x,
18
18
  hideThumbnail: G = !1,
19
- forms: N
20
- } = x ?? {}, W = le(
19
+ forms: T
20
+ } = z ?? {}, J = le(
21
21
  Ae.EDIT_OBSERVATIONS
22
- ), { userPrivileges: h } = me(), p = W && !z && !!y, B = ue(
22
+ ), { userPrivileges: h } = me(), p = J && !j && !!y, L = ue(
23
23
  _,
24
24
  l
25
- ), P = ve(), {
26
- data: L = [],
27
- isLoading: R,
28
- isError: C,
29
- error: Y,
30
- refetch: J
25
+ ), P = Re(), {
26
+ data: C = [],
27
+ isLoading: v,
28
+ isError: B,
29
+ error: W,
30
+ refetch: Y
31
31
  } = E({
32
32
  queryKey: ["forms", m, _],
33
- queryFn: () => ce(m, void 0, Q),
34
- enabled: !!m && !B
35
- }), F = d(() => {
36
- let e = L;
33
+ queryFn: () => ce(m, void 0, x),
34
+ enabled: !!m && !L
35
+ }), D = i(() => {
36
+ let e = C;
37
37
  return l && l.length > 0 && (e = e.filter(
38
38
  (r) => l.includes(r.encounterUuid)
39
- )), Array.isArray(N) && N.length > 0 && (e = e.filter(
40
- (r) => N.some((a) => a.toLowerCase() === r.formName.toLowerCase())
39
+ )), Array.isArray(T) && T.length > 0 && (e = e.filter(
40
+ (r) => T.some((a) => a.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [L, l, N]), { data: D = [] } = E({
42
+ }, [C, l, T]), { data: F = [] } = E({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => fe()
45
- }), U = i(
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,8 +54,8 @@ const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
54
54
  (s) => a.has(s.privilegeName) && s.editable
55
55
  );
56
56
  },
57
- [D, h]
58
- ), u = i(
57
+ [F, h]
58
+ ), u = d(
59
59
  (e) => !y || e.encounterUuid !== y ? !1 : U(e.formName),
60
60
  [y, U]
61
61
  ), {
@@ -66,37 +66,37 @@ const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
66
66
  } = E({
67
67
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
68
68
  queryFn: () => ye(t.encounterUuid),
69
- enabled: !!t?.encounterUuid && T
69
+ enabled: !!t?.encounterUuid && g
70
70
  });
71
- Ne(
71
+ Te(
72
72
  (e) => {
73
- e.patientUUID === m && (J(), P.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
73
+ e.patientUUID === m && (Y(), P.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
74
74
  },
75
75
  [m]
76
76
  );
77
- const ee = d(() => !O?.entry || !t?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => he(e) ? ge(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [O, t?.formName]), re = d(() => {
77
+ const ee = i(() => !O?.entry || !t?.formName ? [] : O.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => he(e) ? Ne(e)?.toLowerCase() === t.formName.toLowerCase() : !0), [O, t?.formName]), re = i(() => {
78
78
  if (b)
79
- return Te(b).message;
80
- }, [b]), c = d(
79
+ return ge(b).message;
80
+ }, [b]), 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
- ), S = d(
86
+ ), S = i(
87
87
  () => [...c, { key: "actions", header: o("ACTIONS") }],
88
88
  [c, o]
89
- ), ae = i(
89
+ ), ae = d(
90
90
  (e) => p && e.some((r) => u(r)) ? S : c,
91
91
  [p, u, S, c]
92
- ), oe = c, te = d(
92
+ ), oe = c, te = i(
93
93
  () => [
94
94
  { key: "recordedOn", sortable: !0 },
95
95
  { key: "recordedBy", sortable: !0 }
96
96
  ],
97
97
  []
98
- ), M = d(() => {
99
- const e = F.reduce(
98
+ ), M = i(() => {
99
+ const e = D.reduce(
100
100
  (r, a) => {
101
101
  const s = a.formName;
102
102
  r[s] ??= [];
@@ -120,13 +120,13 @@ const Be = "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) => {
124
- v(e), A(!0);
125
- }, []), w = i(() => {
126
- A(!1), v(null);
127
- }, []), I = i((e) => {
123
+ }, [D, o]), k = d((e) => {
124
+ R(e), A(!0);
125
+ }, []), w = d(() => {
126
+ A(!1), R(null);
127
+ }, []), I = d((e) => {
128
128
  globalThis.dispatchEvent(
129
- new CustomEvent(Ce, {
129
+ new CustomEvent(Be, {
130
130
  detail: {
131
131
  editOnly: "observationForms",
132
132
  editTitle: "EDIT_OBSERVATION_FORM_TITLE",
@@ -136,7 +136,7 @@ const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
136
136
  }
137
137
  })
138
138
  );
139
- }, []), H = i(
139
+ }, []), H = d(
140
140
  (e, r) => {
141
141
  switch (r) {
142
142
  case "recordedOn":
@@ -162,17 +162,17 @@ const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
162
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: R || C || M.length === 0 || B ? /* @__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
- loading: R,
172
- errorStateMessage: C ? Y?.message : void 0,
171
+ loading: v,
172
+ errorStateMessage: B ? W?.message : void 0,
173
173
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
174
174
  renderCell: H,
175
- className: g.formsTableBody,
175
+ className: N.formsTableBody,
176
176
  dataTestId: "forms-table"
177
177
  }
178
178
  ) : /* @__PURE__ */ n(be, { align: "start", children: M.map((e, r) => {
@@ -181,7 +181,7 @@ const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
181
181
  Ie,
182
182
  {
183
183
  title: a,
184
- className: g.customAccordianItem,
184
+ className: N.customAccordianItem,
185
185
  testId: `accordian-title-${a}`,
186
186
  open: r === 0,
187
187
  children: /* @__PURE__ */ n(
@@ -195,7 +195,7 @@ const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
195
195
  sortable: te,
196
196
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
197
197
  renderCell: H,
198
- className: g.formsTableBody,
198
+ className: N.formsTableBody,
199
199
  dataTestId: `forms-table-${a}`
200
200
  }
201
201
  )
@@ -203,14 +203,14 @@ const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_mo
203
203
  a
204
204
  );
205
205
  }) }) }),
206
- T && t && /* @__PURE__ */ n(
206
+ g && t && /* @__PURE__ */ n(
207
207
  Ee,
208
208
  {
209
209
  id: "modalIdForActionAreaLayout",
210
210
  portalId: "main-display-area",
211
- open: T,
211
+ open: g,
212
212
  onRequestClose: w,
213
- modalHeading: /* @__PURE__ */ q("div", { className: g.modalHeading, children: [
213
+ modalHeading: /* @__PURE__ */ q("div", { className: N.modalHeading, children: [
214
214
  /* @__PURE__ */ n("span", { children: t.formName }),
215
215
  p && u(t) && /* @__PURE__ */ n(
216
216
  V,
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DsTQkrYO.js";
2
- import { a9 as d, aa as f, ab as e } from "./index-C1nJC-ZZ.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-DsTQkrYO.js";
2
- import { a9 as v, aa as C, ab as e } from "./index-C1nJC-ZZ.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"