@bahmni/widgets 0.0.1-dev.171 → 0.0.1-dev.174

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 { jsxs as A, jsx as v, Fragment as $5 } from "react/jsx-runtime";
2
- import { P as h, u as S5, a as W5, k as P5, E as k5, t as F5, m as U5, l as j5 } from "./index-BBA52eg6.js";
2
+ import { P as h, u as S5, a as W5, K as P5, k as k5, t as F5, m as U5, o as j5 } from "./index-qhCmLUh7.js";
3
3
  import { useQuery as q5 } from "@tanstack/react-query";
4
4
  import e, { useState as N, useCallback as _, useEffect as K5, useMemo as x } from "react";
5
5
  import { useTranslation as Q5 } from "react-i18next";
@@ -1,29 +1,29 @@
1
- import { jsxs as b, jsx as d, Fragment as k } from "react/jsx-runtime";
2
- import { c as C, x as te, N as re, $ as ae, e as oe, b as se, u as ne, p as de, d as ie, f as le, w as ce, g as me, L as ue, E as pe, h as be, t as U, H as fe, C as _e, m as $e, o as ge, i as H, l as he } from "./index-BBA52eg6.js";
3
- import { useQueryClient as ye, useQuery as O } from "@tanstack/react-query";
4
- import { useState as P, useMemo as y, useCallback as F } from "react";
1
+ import { jsxs as b, jsx as d, Fragment as P } from "react/jsx-runtime";
2
+ import { c as C, Z as te, N as re, $ as ae, e as oe, Y as se, u as ne, O as de, M as ie, C as le, L as ce, T as me, G as ue, k as pe, b as be, t as x, H as fe, d as _e, m as $e, f as ye, g as H, o as ge } from "./index-qhCmLUh7.js";
3
+ import { useQueryClient as he, useQuery as L } from "@tanstack/react-query";
4
+ import { useState as k, useMemo as h, useCallback as F } from "react";
5
5
  import { useTranslation as ve } from "react-i18next";
6
- const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe = "_formContent_1pd36_18", Fe = "_formDetailsContainer_1pd36_25", Ce = "_observation_1pd36_30", Me = "_groupContainer_1pd36_39", Re = "_rowContainer_1pd36_43", we = "_groupLabel_1pd36_48", De = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", Ve = "_groupMembers_1pd36_75", Ee = "_memberRow_1pd36_81", Ae = "_memberLabel_1pd36_86", Ie = "_memberValue_1pd36_94", Be = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", Ge = "_commentText_1pd36_116", xe = "_nestedGroup_1pd36_125", qe = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", o = {
6
+ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Fe = "_formDetailsContainer_1pd36_25", Ce = "_observation_1pd36_30", Me = "_groupContainer_1pd36_39", Re = "_rowContainer_1pd36_43", Te = "_groupLabel_1pd36_48", we = "_rowLabel_1pd36_58", De = "_rowValue_1pd36_67", Ve = "_groupMembers_1pd36_75", Ae = "_memberRow_1pd36_81", Ee = "_memberLabel_1pd36_86", Ie = "_memberValue_1pd36_94", Be = "_abnormalValue_1pd36_102", Ge = "_commentSection_1pd36_110", Se = "_commentText_1pd36_116", qe = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", xe = "_nestedGroupMembers_1pd36_141", o = {
7
7
  formsTableBody: Ne,
8
- customAccordianItem: Le,
9
- formContent: Oe,
8
+ customAccordianItem: Oe,
9
+ formContent: Le,
10
10
  formDetailsContainer: Fe,
11
11
  observation: Ce,
12
12
  groupContainer: Me,
13
13
  rowContainer: Re,
14
- groupLabel: we,
15
- rowLabel: De,
16
- rowValue: Te,
14
+ groupLabel: Te,
15
+ rowLabel: we,
16
+ rowValue: De,
17
17
  groupMembers: Ve,
18
- memberRow: Ee,
19
- memberLabel: Ae,
18
+ memberRow: Ae,
19
+ memberLabel: Ee,
20
20
  memberValue: Ie,
21
21
  abnormalValue: Be,
22
- commentSection: Se,
23
- commentText: Ge,
24
- nestedGroup: xe,
25
- nestedGroupLabel: qe,
26
- nestedGroupMembers: Ue
22
+ commentSection: Ge,
23
+ commentText: Se,
24
+ nestedGroup: qe,
25
+ nestedGroupLabel: Ue,
26
+ nestedGroupMembers: xe
27
27
  }, K = (e) => {
28
28
  const t = te(e);
29
29
  return t === "Image" ? /* @__PURE__ */ d(
@@ -81,8 +81,8 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
81
81
  ]
82
82
  }
83
83
  );
84
- const { units: p, rangeString: h, isAbnormal: f } = j(e), _ = e.observationValue?.value?.toString(), $ = _ ? K(_) : null;
85
- return /* @__PURE__ */ b(k, { children: [
84
+ const { units: p, rangeString: g, isAbnormal: f } = j(e), _ = e.observationValue?.value?.toString(), $ = _ ? K(_) : null;
85
+ return /* @__PURE__ */ b(P, { children: [
86
86
  /* @__PURE__ */ b(
87
87
  "div",
88
88
  {
@@ -100,7 +100,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
100
100
  "data-testid": `${r}obs-member-label-${i}-${a}`,
101
101
  children: [
102
102
  i,
103
- h
103
+ g
104
104
  ]
105
105
  }
106
106
  ),
@@ -140,7 +140,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
140
140
  formName: a = "",
141
141
  comment: n
142
142
  }) => {
143
- const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: r } = j(e), p = a ? `${a}-` : "", h = e.observationValue?.value?.toString(), f = h ? K(h) : null;
143
+ const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: r } = j(e), p = a ? `${a}-` : "", g = e.observationValue?.value?.toString(), f = g ? K(g) : null;
144
144
  return /* @__PURE__ */ b(
145
145
  "div",
146
146
  {
@@ -215,16 +215,16 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
215
215
  },
216
216
  `${e.id}-${t}`
217
217
  );
218
- }, Pe = (e) => e ? e.extension?.find(
218
+ }, ke = (e) => e ? e.extension?.find(
219
219
  (a) => a.url === se
220
- )?.valueString : void 0, ke = (e) => {
220
+ )?.valueString : void 0, Pe = (e) => {
221
221
  if (e)
222
222
  return e.note?.[0]?.text;
223
- }, Ke = (e, t) => e.entry?.find((a) => a.resource?.id === t)?.resource, D = (e, t) => {
223
+ }, Ke = (e, t) => e.entry?.find((a) => a.resource?.id === t)?.resource, w = (e, t) => {
224
224
  const a = Ke(e, t);
225
225
  return a ? {
226
- formFieldPath: Pe(a),
227
- comment: ke(a)
226
+ formFieldPath: ke(a),
227
+ comment: Pe(a)
228
228
  } : {};
229
229
  }, je = (e, t) => {
230
230
  if (!e?.entry || !t)
@@ -232,96 +232,96 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
232
232
  const a = oe(e);
233
233
  return [
234
234
  ...a.observations.map((s) => {
235
- const { formFieldPath: c, comment: i } = D(
235
+ const { formFieldPath: c, comment: i } = w(
236
236
  e,
237
237
  s.id
238
238
  );
239
239
  return { obs: s, formFieldPath: c, comment: i };
240
240
  }),
241
241
  ...a.groupedObservations.flatMap((s) => {
242
- const { formFieldPath: c } = D(e, s.id);
242
+ const { formFieldPath: c } = w(e, s.id);
243
243
  return (s.members ?? []).map((i) => {
244
- const { comment: r } = D(e, i.id);
244
+ const { comment: r } = w(e, i.id);
245
245
  return { obs: i, formFieldPath: c, comment: r };
246
246
  });
247
247
  })
248
248
  ].filter(
249
249
  ({ formFieldPath: s }) => !s || s.includes(t)
250
250
  );
251
- }, Xe = ({
251
+ }, Je = ({
252
252
  episodeOfCareUuids: e,
253
253
  encounterUuids: t,
254
254
  config: a
255
255
  }) => {
256
- const { t: n } = ve(), s = ne(), [c, i] = P(!1), [r, p] = P(null), h = a?.numberOfVisits, f = de(
256
+ const { t: n } = ve(), s = ne(), [c, i] = k(!1), [r, p] = k(null), g = a?.numberOfVisits, f = de(
257
257
  e,
258
258
  t
259
- ), _ = ye(), {
259
+ ), _ = he(), {
260
260
  data: $ = [],
261
261
  isLoading: v,
262
262
  isError: N,
263
- error: z,
264
- refetch: W
265
- } = O({
263
+ error: Y,
264
+ refetch: z
265
+ } = L({
266
266
  queryKey: ["forms", s, e],
267
- queryFn: () => ie(s, void 0, h),
267
+ queryFn: () => ie(s, void 0, g),
268
268
  enabled: !!s && !f
269
- }), T = y(() => !t || t.length === 0 ? $ : $.filter(
269
+ }), D = h(() => !t || t.length === 0 ? $ : $.filter(
270
270
  (l) => t.includes(l.encounterUuid)
271
- ), [$, t]), { data: V = [] } = O({
271
+ ), [$, t]), { data: V = [] } = L({
272
272
  queryKey: ["observationForms"],
273
273
  queryFn: () => le()
274
- }), E = F(
274
+ }), A = F(
275
275
  (l) => V.find((m) => m.name === l)?.uuid,
276
276
  [V]
277
- ), M = y(() => {
277
+ ), M = h(() => {
278
278
  if (r)
279
- return E(r.formName);
280
- }, [r, E]), { isLoading: Y, error: A } = O({
279
+ return A(r.formName);
280
+ }, [r, A]), { isLoading: Z, error: E } = L({
281
281
  queryKey: ["formMetadata", M],
282
282
  queryFn: () => ce(M),
283
283
  enabled: !!M && c
284
284
  }), {
285
285
  data: R,
286
- isLoading: J,
286
+ isLoading: W,
287
287
  error: I
288
- } = O({
288
+ } = L({
289
289
  queryKey: ["formsEncounterFHIR", r?.encounterUuid],
290
290
  queryFn: () => me(r.encounterUuid),
291
291
  enabled: !!r?.encounterUuid && c
292
292
  });
293
293
  ue(
294
294
  (l) => {
295
- l.patientUUID === s && l.updatedConcepts.size > 0 && (W(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
295
+ l.patientUUID === s && l.updatedConcepts.size > 0 && (z(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
296
296
  },
297
297
  [s]
298
298
  );
299
- const B = y(() => !R || !r?.formName ? [] : je(
299
+ const B = h(() => !R || !r?.formName ? [] : je(
300
300
  R,
301
301
  r.formName
302
- ), [R, r?.formName]), S = y(
302
+ ), [R, r?.formName]), G = h(
303
303
  () => [
304
304
  { key: "recordedOn", header: n("FORM_RECORDED_ON") },
305
305
  { key: "recordedBy", header: n("FORM_RECORDED_BY") }
306
306
  ],
307
307
  [n]
308
- ), X = y(
308
+ ), J = h(
309
309
  () => [
310
310
  { key: "recordedOn", sortable: !0 },
311
311
  { key: "recordedBy", sortable: !0 }
312
312
  ],
313
313
  []
314
- ), G = y(() => {
315
- const l = T.reduce(
314
+ ), S = h(() => {
315
+ const l = D.reduce(
316
316
  (m, u) => {
317
- const L = u.formName;
318
- m[L] ??= [];
319
- const w = u.providers.map((ee) => ee.providerName).filter(Boolean).join(", ");
320
- return m[L].push({
317
+ const O = u.formName;
318
+ m[O] ??= [];
319
+ const T = u.providers.map((ee) => ee.providerName).filter(Boolean).join(", ");
320
+ return m[O].push({
321
321
  id: u.encounterUuid,
322
322
  formName: u.formName,
323
- recordedOn: pe(u.encounterDateTime, n, he).formattedResult,
324
- recordedBy: w ?? "--",
323
+ recordedOn: pe(u.encounterDateTime, n, ge).formattedResult,
324
+ recordedBy: T ?? "--",
325
325
  encounterDateTime: u.encounterDateTime,
326
326
  encounterUuid: u.encounterUuid
327
327
  }), m;
@@ -332,42 +332,42 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
332
332
  ([m, u]) => ({
333
333
  formName: m,
334
334
  records: u.sort(
335
- (L, w) => w.encounterDateTime - L.encounterDateTime
335
+ (O, T) => T.encounterDateTime - O.encounterDateTime
336
336
  )
337
337
  })
338
338
  ).sort((m, u) => m.formName.localeCompare(u.formName));
339
- }, [T, n]), x = F((l) => {
339
+ }, [D, n]), q = F((l) => {
340
340
  p(l), i(!0);
341
- }, []), Z = F(() => {
341
+ }, []), X = F(() => {
342
342
  i(!1), p(null);
343
- }, []), q = F(
344
- (l, g) => {
345
- switch (g) {
343
+ }, []), U = F(
344
+ (l, y) => {
345
+ switch (y) {
346
346
  case "recordedOn":
347
- return /* @__PURE__ */ d(be, { onClick: () => x(l), children: l.recordedOn });
347
+ return /* @__PURE__ */ d(be, { onClick: () => q(l), children: l.recordedOn });
348
348
  case "recordedBy":
349
349
  return l.recordedBy;
350
350
  default:
351
351
  return null;
352
352
  }
353
353
  },
354
- [x]
354
+ [q]
355
355
  );
356
- return /* @__PURE__ */ b(k, { children: [
357
- /* @__PURE__ */ d("div", { "data-testid": "forms-table", children: v || N || G.length === 0 || f ? /* @__PURE__ */ d(
358
- U,
356
+ return /* @__PURE__ */ b(P, { children: [
357
+ /* @__PURE__ */ d("div", { "data-testid": "forms-table", children: v || N || S.length === 0 || f ? /* @__PURE__ */ d(
358
+ x,
359
359
  {
360
- headers: S,
360
+ headers: G,
361
361
  ariaLabel: n("FORMS_HEADING"),
362
362
  rows: [],
363
363
  loading: v,
364
- errorStateMessage: N ? z?.message : void 0,
364
+ errorStateMessage: N ? Y?.message : void 0,
365
365
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
366
- renderCell: q,
366
+ renderCell: U,
367
367
  className: o.formsTableBody,
368
368
  dataTestId: "forms-table"
369
369
  }
370
- ) : /* @__PURE__ */ d(fe, { align: "start", children: G.map((l, g) => {
370
+ ) : /* @__PURE__ */ d(fe, { align: "start", children: S.map((l, y) => {
371
371
  const { formName: m, records: u } = l;
372
372
  return /* @__PURE__ */ d(
373
373
  _e,
@@ -375,18 +375,18 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
375
375
  title: m,
376
376
  className: o.customAccordianItem,
377
377
  testId: `accordian-title-${m}`,
378
- open: g === 0,
378
+ open: y === 0,
379
379
  children: /* @__PURE__ */ d(
380
- U,
380
+ x,
381
381
  {
382
- headers: S,
382
+ headers: G,
383
383
  ariaLabel: n("FORMS_HEADING"),
384
384
  rows: u,
385
385
  loading: !1,
386
386
  errorStateMessage: "",
387
- sortable: X,
387
+ sortable: J,
388
388
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
389
- renderCell: q,
389
+ renderCell: U,
390
390
  className: o.formsTableBody,
391
391
  dataTestId: `forms-table-${m}`
392
392
  }
@@ -400,19 +400,19 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
400
400
  {
401
401
  id: "modalIdForActionAreaLayout",
402
402
  open: c,
403
- onRequestClose: Z,
403
+ onRequestClose: X,
404
404
  modalHeading: r.formName,
405
405
  modalLabel: `${r.recordedOn} | ${r.recordedBy}`,
406
406
  passiveModal: !0,
407
407
  size: "md",
408
408
  testId: "form-details-modal",
409
- children: /* @__PURE__ */ d("div", { className: o.formContent, children: Y || J ? /* @__PURE__ */ d(ge, { width: "100%", lineCount: 3 }) : A ? /* @__PURE__ */ d("div", { children: H(A).message ?? n("ERROR_FETCHING_FORM_METADATA") }) : I ? /* @__PURE__ */ d("div", { children: H(I).message ?? n("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ d("div", { className: o.formDetailsContainer, children: B.map(({ obs: l, comment: g }, m) => /* @__PURE__ */ d(
409
+ children: /* @__PURE__ */ d("div", { className: o.formContent, children: Z || W ? /* @__PURE__ */ d(ye, { width: "100%", lineCount: 3 }) : E ? /* @__PURE__ */ d("div", { children: H(E).message ?? n("ERROR_FETCHING_FORM_METADATA") }) : I ? /* @__PURE__ */ d("div", { children: H(I).message ?? n("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ d("div", { className: o.formDetailsContainer, children: B.map(({ obs: l, comment: y }, m) => /* @__PURE__ */ d(
410
410
  He,
411
411
  {
412
412
  observation: l,
413
413
  index: m,
414
414
  formName: r.formName,
415
- comment: g
415
+ comment: y
416
416
  },
417
417
  `${l.id}`
418
418
  )) }) : /* @__PURE__ */ d("div", { children: n("NO_FORM_DATA_AVAILABLE") }) })
@@ -421,5 +421,5 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Oe =
421
421
  ] });
422
422
  };
423
423
  export {
424
- Xe as default
424
+ Je as default
425
425
  };
@@ -1,17 +1,17 @@
1
1
  import { jsx as d, jsxs as S } from "react/jsx-runtime";
2
- import { j as q, _ as C, n as M, x as V, q as k, N as K, $ as Q, u as G, a as j, r as H, s as P, L as z, e as Y, v as x, y as J, B as W, t as X } from "./index-BBA52eg6.js";
3
- import { useQueries as Z, useQuery as ee } from "@tanstack/react-query";
2
+ import { h as M, _ as C, i as V, Z as k, j as q, N as G, $ as K, u as Q, a as j, x as H, S as P, G as Z, e as z, l as Y, s as x, B as J, t as W } from "./index-qhCmLUh7.js";
3
+ import { useQueries as X, useQuery as ee } from "@tanstack/react-query";
4
4
  import { useRef as te, useEffect as I, useMemo as h } from "react";
5
5
  import { useTranslation as D } from "react-i18next";
6
6
  const U = (t, c, n, l, o) => {
7
- const s = M(t, c), r = s.value, a = V(r);
7
+ const s = V(t, c), r = s.value, a = k(r);
8
8
  let i = r;
9
- a === "Image" && (i = /* @__PURE__ */ d(K, { imageSrc: r, alt: r, id: `${r}-img` })), a === "Video" && (i = /* @__PURE__ */ d(Q, { id: `${r}-video`, videoSrc: r }));
9
+ a === "Image" && (i = /* @__PURE__ */ d(G, { imageSrc: r, alt: r, id: `${r}-img` })), a === "Video" && (i = /* @__PURE__ */ d(K, { id: `${r}-video`, videoSrc: r }));
10
10
  const u = o("OBSERVATIONS_RECORDED_BY", {
11
11
  provider: s.provider
12
12
  }), b = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", f = l ? `${l}-${p}-${b}-${n}-${c}` : `${p}-${b}-${n}-${c}`;
13
13
  return /* @__PURE__ */ d(
14
- k,
14
+ q,
15
15
  {
16
16
  header: s.header,
17
17
  value: i,
@@ -38,7 +38,7 @@ const U = (t, c, n, l, o) => {
38
38
  title: c = ""
39
39
  }) => {
40
40
  const { t: n } = D(), l = (o, s, r) => {
41
- const a = q(o.encounterDetails, n);
41
+ const a = M(o.encounterDetails, n);
42
42
  return /* @__PURE__ */ S(
43
43
  C,
44
44
  {
@@ -79,7 +79,7 @@ const U = (t, c, n, l, o) => {
79
79
  observations: re,
80
80
  title: ae
81
81
  }, ne = (t) => ["conceptUuid", t], ie = (t, c) => ["observations", t, ...c], pe = ({ config: t }) => {
82
- const c = t, { conceptNames: n = [], conceptUuid: l = [] } = c, o = te(/* @__PURE__ */ new Set()), s = G(), { addNotification: r } = j(), { t: a } = D(), i = Z({
82
+ const c = t, { conceptNames: n = [], conceptUuid: l = [] } = c, o = te(/* @__PURE__ */ new Set()), s = Q(), { addNotification: r } = j(), { t: a } = D(), i = X({
83
83
  queries: n.map((e) => ({
84
84
  queryKey: ne(e),
85
85
  queryFn: () => H(e),
@@ -108,7 +108,7 @@ const U = (t, c, n, l, o) => {
108
108
  queryFn: () => P(s, b),
109
109
  enabled: !!s && b.length > 0 && v
110
110
  });
111
- z(
111
+ Z(
112
112
  (e) => {
113
113
  e.patientUUID === s && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
114
114
  (g) => b.includes(g)
@@ -124,13 +124,13 @@ const U = (t, c, n, l, o) => {
124
124
  }, [O]);
125
125
  const T = h(() => {
126
126
  if (!p) return [];
127
- const e = Y(p), m = x(e);
128
- return J(m);
127
+ const e = z(p), m = Y(e);
128
+ return x(m);
129
129
  }, [p]), B = [
130
130
  { key: "name", header: "name" },
131
131
  { key: "value", header: "value" },
132
132
  { key: "form", header: "form" }
133
- ], _ = f || !v, $ = O && v, L = (!p || p.entry?.length === 0 || b.length === 0) && v, A = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, F = L ? a("NO_OBSERVATIONS_FOUND") : void 0, w = T.length > 0 && !_ && !$, E = c.titleTranslationKey, y = E ? a(E) : "";
133
+ ], _ = f || !v, $ = O && v, A = (!p || p.entry?.length === 0 || b.length === 0) && v, F = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? a("NO_OBSERVATIONS_FOUND") : void 0, w = T.length > 0 && !_ && !$, E = c.titleTranslationKey, y = E ? a(E) : "";
134
134
  return /* @__PURE__ */ S(
135
135
  "div",
136
136
  {
@@ -140,7 +140,7 @@ const U = (t, c, n, l, o) => {
140
140
  className: N.observations,
141
141
  children: [
142
142
  /* @__PURE__ */ d(
143
- W,
143
+ J,
144
144
  {
145
145
  id: "observations-title",
146
146
  testId: E ? `observations-title-${y}` : "observations-title",
@@ -150,14 +150,14 @@ const U = (t, c, n, l, o) => {
150
150
  }
151
151
  ),
152
152
  w ? /* @__PURE__ */ d(oe, { groupedData: T, title: y }) : /* @__PURE__ */ d(
153
- X,
153
+ W,
154
154
  {
155
155
  headers: B,
156
156
  rows: [],
157
157
  ariaLabel: a("OBSERVATIONS"),
158
158
  loading: _,
159
- errorStateMessage: A,
160
- emptyStateMessage: F,
159
+ errorStateMessage: F,
160
+ emptyStateMessage: L,
161
161
  dataTestId: "observations-table"
162
162
  }
163
163
  )
@@ -0,0 +1,3 @@
1
+ import { Context } from 'react';
2
+ export declare function createConfigHook<TContextValue>(context: Context<TContextValue | undefined>, hookName: string, providerName: string): () => TContextValue;
3
+ //# sourceMappingURL=createConfigHook.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createConfigHook.d.ts","sourceRoot":"","sources":["../../src/configProvider/createConfigHook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAc,MAAM,OAAO,CAAC;AAE5C,wBAAgB,gBAAgB,CAAC,aAAa,EAC5C,OAAO,EAAE,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,EAC3C,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,GACnB,MAAM,aAAa,CAQrB"}
@@ -0,0 +1,21 @@
1
+ import { default as React, Context, ReactNode } from 'react';
2
+ interface CreateConfigProviderOptions<TConfig, TContextValue extends {
3
+ isLoading: boolean;
4
+ error: Error | null;
5
+ }> {
6
+ context: Context<TContextValue | undefined>;
7
+ queryKey: string[];
8
+ queryFn: () => Promise<TConfig | null>;
9
+ valueMapper: (data: TConfig | null | undefined, isLoading: boolean, error: Error | null) => TContextValue;
10
+ id: string;
11
+ name: string;
12
+ displayName: string;
13
+ }
14
+ export declare function createConfigProvider<TConfig, TContextValue extends {
15
+ isLoading: boolean;
16
+ error: Error | null;
17
+ }>(options: CreateConfigProviderOptions<TConfig, TContextValue>): React.FC<{
18
+ children: ReactNode;
19
+ }>;
20
+ export {};
21
+ //# sourceMappingURL=createConfigProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createConfigProvider.d.ts","sourceRoot":"","sources":["../../src/configProvider/createConfigProvider.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,SAAS,EAAsB,MAAM,OAAO,CAAC;AAItE,UAAU,2BAA2B,CACnC,OAAO,EACP,aAAa,SAAS;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE;IAEjE,OAAO,EAAE,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC,CAAC;IAC5C,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,EAAE,MAAM,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAAC;IACvC,WAAW,EAAE,CACX,IAAI,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,EAChC,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,GAAG,IAAI,KAChB,aAAa,CAAC;IACnB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAClC,OAAO,EACP,aAAa,SAAS;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAAE,EAEjE,OAAO,EAAE,2BAA2B,CAAC,OAAO,EAAE,aAAa,CAAC,GAC3D,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,CAAC,CAgFnC"}
@@ -0,0 +1,3 @@
1
+ export { createConfigProvider } from './createConfigProvider';
2
+ export { createConfigHook } from './createConfigHook';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configProvider/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}