@bahmni/registration-app 0.0.1-dev.240 → 0.0.1-dev.241

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 r, jsxs as _, Fragment as Y } from "react/jsx-runtime";
2
- import { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te } from "./index-DvLFtPO3.js";
2
+ import { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te } from "./index-DmsNGq_D.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
5
5
  const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", le = "_documentImage_1voj8_50", d = {
@@ -1,44 +1,44 @@
1
1
  import { jsx as s, jsxs as W, Fragment as X } from "react/jsx-runtime";
2
- import { u as Z, c as ee, e as re, f as ae, s as te, g as oe, i as se, Q as ne, N as U, m as de, l as ie, b as S, x as me, h as ue, w as le, $ as ce, o as fe } from "./index-DvLFtPO3.js";
2
+ import { u as Z, c as ee, e as re, f as ae, s as te, g as oe, i as se, Q as ne, N as U, m as de, l as ie, b as S, x as me, h as ue, w as le, $ as ce, o as fe } from "./index-DmsNGq_D.js";
3
3
  import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
4
4
  import { useState as q, useMemo as d, useCallback as f } from "react";
5
- const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
5
+ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
6
6
  formsTableBody: pe,
7
7
  customAccordianItem: be
8
8
  }, Ne = (m) => m ? m.extension?.find(
9
9
  (n) => n.url === fe
10
- )?.valueString : void 0, Ie = ({
10
+ )?.valueString : void 0, Ae = ({
11
11
  episodeOfCareUuids: m,
12
12
  encounterUuids: n,
13
13
  config: C
14
14
  }) => {
15
- const { t: o } = Z(), u = ee(), [l, A] = q(!1), [t, I] = q(null), { numberOfVisits: x, hideThumbnail: k = !1 } = C ?? {}, T = re(
15
+ const { t: o } = Z(), u = ee(), [l, O] = q(!1), [t, A] = q(null), { numberOfVisits: x, hideThumbnail: $ = !1 } = C ?? {}, T = re(
16
16
  m,
17
17
  n
18
- ), $ = ye(), {
18
+ ), k = ye(), {
19
19
  data: y = [],
20
20
  isLoading: B,
21
21
  isError: E,
22
- error: H,
23
- refetch: K
22
+ error: w,
23
+ refetch: H
24
24
  } = c({
25
25
  queryKey: ["forms", u, m],
26
26
  queryFn: () => ae(u, void 0, x),
27
27
  enabled: !!u && !T
28
- }), _ = d(() => !n || n.length === 0 ? y : y.filter(
28
+ }), F = d(() => !n || n.length === 0 ? y : y.filter(
29
29
  (e) => n.includes(e.encounterUuid)
30
- ), [y, n]), { data: D = [] } = c({
30
+ ), [y, n]), { data: _ = [] } = c({
31
31
  queryKey: ["observationForms"],
32
32
  queryFn: () => te()
33
- }), F = f(
34
- (e) => D.find((r) => r.name === e)?.uuid,
35
- [D]
33
+ }), L = f(
34
+ (e) => _.find((r) => r.name === e)?.uuid,
35
+ [_]
36
36
  ), p = d(() => {
37
37
  if (t)
38
- return F(t.formName);
39
- }, [t, F]), {
40
- isLoading: Q,
41
- isError: j,
38
+ return L(t.formName);
39
+ }, [t, L]), {
40
+ isLoading: K,
41
+ isError: Q,
42
42
  error: b
43
43
  } = c({
44
44
  queryKey: ["formMetadata", p],
@@ -46,7 +46,7 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
46
46
  enabled: !!p && l
47
47
  }), {
48
48
  data: N,
49
- isLoading: w,
49
+ isLoading: j,
50
50
  isError: V,
51
51
  error: g
52
52
  } = c({
@@ -56,7 +56,7 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
56
56
  });
57
57
  ne(
58
58
  (e) => {
59
- e.patientUUID === u && e.updatedConcepts.size > 0 && (K(), $.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
59
+ e.patientUUID === u && e.updatedConcepts.size > 0 && (H(), k.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
60
60
  },
61
61
  [u]
62
62
  );
@@ -68,7 +68,7 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
68
68
  return U(b).message;
69
69
  if (g)
70
70
  return U(g).message;
71
- }, [b, g]), L = d(
71
+ }, [b, g]), M = d(
72
72
  () => [
73
73
  { key: "recordedOn", header: o("RECORDED_ON") },
74
74
  { key: "recordedBy", header: o("RECORDED_BY") }
@@ -80,8 +80,8 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
80
80
  { key: "recordedBy", sortable: !0 }
81
81
  ],
82
82
  []
83
- ), M = d(() => {
84
- const e = _.reduce(
83
+ ), D = d(() => {
84
+ const e = F.reduce(
85
85
  (r, a) => {
86
86
  const i = a.formName;
87
87
  r[i] ??= [];
@@ -105,10 +105,10 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
105
105
  )
106
106
  })
107
107
  ).sort((r, a) => r.formName.localeCompare(a.formName));
108
- }, [_, o]), R = f((e) => {
109
- I(e), A(!0);
108
+ }, [F, o]), R = f((e) => {
109
+ A(e), O(!0);
110
110
  }, []), Y = f(() => {
111
- A(!1), I(null);
111
+ O(!1), A(null);
112
112
  }, []), v = f(
113
113
  (e, r) => {
114
114
  switch (r) {
@@ -123,32 +123,32 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
123
123
  [R]
124
124
  );
125
125
  return /* @__PURE__ */ W(X, { children: [
126
- /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: B || E || M.length === 0 || T ? /* @__PURE__ */ s(
126
+ /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: B || E || D.length === 0 || T ? /* @__PURE__ */ s(
127
127
  S,
128
128
  {
129
- headers: L,
129
+ headers: M,
130
130
  ariaLabel: o("FORMS_HEADING"),
131
131
  rows: [],
132
132
  loading: B,
133
- errorStateMessage: E ? H?.message : void 0,
133
+ errorStateMessage: E ? w?.message : void 0,
134
134
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
135
135
  renderCell: v,
136
- className: O.formsTableBody,
136
+ className: I.formsTableBody,
137
137
  dataTestId: "forms-table"
138
138
  }
139
- ) : /* @__PURE__ */ s(me, { align: "start", children: M.map((e, r) => {
139
+ ) : /* @__PURE__ */ s(me, { align: "start", children: D.map((e, r) => {
140
140
  const { formName: a, records: i } = e;
141
141
  return /* @__PURE__ */ s(
142
142
  ue,
143
143
  {
144
144
  title: a,
145
- className: O.customAccordianItem,
145
+ className: I.customAccordianItem,
146
146
  testId: `accordian-title-${a}`,
147
147
  open: r === 0,
148
148
  children: /* @__PURE__ */ s(
149
149
  S,
150
150
  {
151
- headers: L,
151
+ headers: M,
152
152
  ariaLabel: o("FORMS_HEADING"),
153
153
  rows: i,
154
154
  loading: !1,
@@ -156,7 +156,7 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
156
156
  sortable: P,
157
157
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
158
158
  renderCell: v,
159
- className: O.formsTableBody,
159
+ className: I.formsTableBody,
160
160
  dataTestId: `forms-table-${a}`
161
161
  }
162
162
  )
@@ -180,12 +180,12 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
180
180
  ce,
181
181
  {
182
182
  observations: z,
183
- isLoading: Q || w,
184
- isError: j || V,
183
+ isLoading: K || j,
184
+ isError: Q || V,
185
185
  errorMessage: G,
186
186
  emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
187
187
  testIdPrefix: t.formName,
188
- hideThumbnail: k
188
+ hideThumbnail: $
189
189
  }
190
190
  )
191
191
  }
@@ -193,5 +193,5 @@ const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", O = {
193
193
  ] });
194
194
  };
195
195
  export {
196
- Ie as default
196
+ Ae as default
197
197
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-gy4VomWy.js";
2
- import { B as d, C as f, D as e } from "./index-DvLFtPO3.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-2Ogg3-tj.js";
2
+ import { B as d, C as f, D as e } from "./index-DmsNGq_D.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-gy4VomWy.js";
2
- import { B as C, C as v, D as e } from "./index-DvLFtPO3.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-2Ogg3-tj.js";
2
+ import { B as C, C as v, D as e } from "./index-DmsNGq_D.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 u } from "react/jsx-runtime";
2
- import { c as B, d as Q, u as N, n as H, j as K, Q as w, k as j, p as x, q as G, H as M, b as X, r as z, Z as A, t as P, v as Z, R as Y, y as J, z as W, A as ee } from "./index-DvLFtPO3.js";
2
+ import { c as B, d as Q, u as N, n as H, j as K, Q as w, k as M, p as j, q as x, H as G, b as X, r as z, Z as A, t as P, v as Z, R as Y, y as J, z as W, A as ee } from "./index-DmsNGq_D.js";
3
3
  import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as R } from "react";
5
5
  const D = (t, n, d, l, b, r) => {
@@ -123,10 +123,10 @@ const D = (t, n, d, l, b, r) => {
123
123
  $(() => {
124
124
  o.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
- const V = d[h];
126
+ const k = d[h];
127
127
  s({
128
128
  title: i("ERROR_DEFAULT_TITLE"),
129
- message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
129
+ message: i("ERROR_FETCHING_CONCEPT", { conceptName: k }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
@@ -158,13 +158,13 @@ const D = (t, n, d, l, b, r) => {
158
158
  }, [f]);
159
159
  const g = R(() => {
160
160
  if (!c) return [];
161
- const e = j(c), h = x(e);
162
- return G(h);
161
+ const e = M(c), h = j(e);
162
+ return x(h);
163
163
  }, [c]), L = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], O = F || !y, _ = f && y, k = (!c || c.entry?.length === 0 || m.length === 0) && y, q = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, C = k ? i("NO_OBSERVATIONS_FOUND") : void 0, U = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
167
+ ], O = F || !y, _ = f && y, q = (!c || c.entry?.length === 0 || m.length === 0) && y, C = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, U = q ? i("NO_OBSERVATIONS_FOUND") : void 0, V = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
168
168
  return /* @__PURE__ */ S(
169
169
  "div",
170
170
  {
@@ -174,7 +174,7 @@ const D = (t, n, d, l, b, r) => {
174
174
  className: I.observations,
175
175
  children: [
176
176
  /* @__PURE__ */ u(
177
- M,
177
+ G,
178
178
  {
179
179
  id: "observations-title",
180
180
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -183,7 +183,7 @@ const D = (t, n, d, l, b, r) => {
183
183
  children: /* @__PURE__ */ u("p", { children: v })
184
184
  }
185
185
  ),
186
- U ? /* @__PURE__ */ u(
186
+ V ? /* @__PURE__ */ u(
187
187
  ie,
188
188
  {
189
189
  groupedData: g,
@@ -197,8 +197,8 @@ const D = (t, n, d, l, b, r) => {
197
197
  rows: [],
198
198
  ariaLabel: i("OBSERVATIONS"),
199
199
  loading: O,
200
- errorStateMessage: q,
201
- emptyStateMessage: C,
200
+ errorStateMessage: C,
201
+ emptyStateMessage: U,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -1,4 +1,4 @@
1
- import { E as we, F as z, G as xt, I as B, C as q, D as y, P as Ro, J as ye, S as R, K as _, L as k, M as N, O as A, T as bs, U as ir, V as $e, W as U, X as Hn, Y as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-DvLFtPO3.js";
1
+ import { E as we, F as z, G as xt, I as B, C as q, D as y, P as Ro, J as ye, S as R, K as _, L as k, M as N, O as A, T as bs, U as ir, V as $e, W as U, X as Hn, Y as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-DmsNGq_D.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -166997,7 +166997,7 @@ function LU0(t, e, r) {
166997
166997
  return n;
166998
166998
  };
166999
166999
  }
167000
- Mt(() => Promise.resolve().then(() => RB0)), Mt(() => Promise.resolve().then(() => sP0)), Mt(() => Promise.resolve().then(() => ZP0)), Mt(() => Promise.resolve().then(() => UP0)), Mt(() => import("./DocumentsTable-widaz7Rd-Do7UrcI_.js")), Mt(() => Promise.resolve().then(() => Iq0)), Mt(() => import("./FormsTable-Ni6XE26b-BbgYn2tM.js")), Mt(() => Promise.resolve().then(() => hq0)), Mt(() => import("./Observations-BgucPoyM-BHs67iNm.js")), Mt(
167000
+ Mt(() => Promise.resolve().then(() => RB0)), Mt(() => Promise.resolve().then(() => sP0)), Mt(() => Promise.resolve().then(() => ZP0)), Mt(() => Promise.resolve().then(() => UP0)), Mt(() => import("./DocumentsTable-DEXvARku-CzmO77_Y.js")), Mt(() => Promise.resolve().then(() => Iq0)), Mt(() => import("./FormsTable-B1V8GAgi-Ab0g3Rc8.js")), Mt(() => Promise.resolve().then(() => hq0)), Mt(() => import("./Observations-C4_YlUV0-BrwIG9AP.js")), Mt(
167001
167001
  () => Promise.resolve().then(() => Yq0)
167002
167002
  ), Mt(
167003
167003
  () => Promise.resolve().then(() => Oj0)
@@ -168836,7 +168836,7 @@ var R0t = (t, e = !1) => {
168836
168836
  const e = zj1(() => {
168837
168837
  const r = this, [n] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t;
168838
168838
  let u;
168839
- return this.#i ? u = this.#i : (u = Mj1(() => import("./LNWAZHJI-AJoQ4hi_.js")), this.#i = u), Pj1(this.#h, this.#r), Ej1(u, yj1({
168839
+ return this.#i ? u = this.#i : (u = Mj1(() => import("./LNWAZHJI-DyQLcH75.js")), this.#i = u), Pj1(this.#h, this.#r), Ej1(u, yj1({
168840
168840
  get queryFlavor() {
168841
168841
  return r.#d;
168842
168842
  },
@@ -168934,7 +168934,7 @@ var R0t = (t, e = !1) => {
168934
168934
  const e = zj1(() => {
168935
168935
  const r = this, [n] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t, [u] = this.#i;
168936
168936
  let d;
168937
- return this.#l ? d = this.#l : (d = Mj1(() => import("./MWZ6AO7Z-kJr8Y-vk.js")), this.#l = d), Pj1(this.#h, this.#r), Ej1(d, yj1({
168937
+ return this.#l ? d = this.#l : (d = Mj1(() => import("./MWZ6AO7Z-BnX5cB07.js")), this.#l = d), Pj1(this.#h, this.#r), Ej1(d, yj1({
168938
168938
  get queryFlavor() {
168939
168939
  return r.#d;
168940
168940
  },
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { av as s, at as t, au as E } from "./index-DvLFtPO3.js";
1
+ import { av as s, at as t, au as E } from "./index-DmsNGq_D.js";
2
2
  export {
3
3
  s as IDENTIFIER_TYPES_QUERY_KEY,
4
4
  t as RegistrationApp,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/registration-app",
3
- "version": "0.0.1-dev.240",
3
+ "version": "0.0.1-dev.241",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",