@bahmni/registration-app 0.0.1-dev.221 → 0.0.1-dev.222

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 p, Fragment as Y } from "react/jsx-runtime";
2
- import { t as K, u as Q, r as W, a as J, M as X, N as Z, o as ee, s as te } from "./index-Mm75tbmR.js";
2
+ import { t as W, u as K, r as Q, a as J, M as X, N as Z, o as ee, s as te } from "./index-Bic-gOae.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as m, 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", me = "_documentImage_1voj8_50", d = {
@@ -38,7 +38,7 @@ const _e = [
38
38
  null
39
39
  ), [R, I] = m(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = K(), { t: n } = Q(), { addNotification: L } = W(), $ = Number(a?.pageSize) || 5, [C, A] = m(1), [l, k] = m($), [V, y] = m(void 0), U = h((e) => {
41
+ ), E = W(), { t: n } = K(), { addNotification: L } = Q(), $ = Number(a?.pageSize) || 5, [C, A] = m(1), [l, k] = m($), [V, y] = m(void 0), U = h((e) => {
42
42
  M(e), w(!0);
43
43
  }, []), F = h(() => {
44
44
  w(!1), M(null), I(/* @__PURE__ */ new Set());
@@ -1,18 +1,18 @@
1
1
  import { jsx as s, jsxs as Y, Fragment as Z } from "react/jsx-runtime";
2
- import { u as W, t as ee, m as re, b as ae, X as te, e as oe, Q as se, k as ne, V as U, N as de, M as ie, o as S, G as me, J as ue, s as le, Z as ce, c as fe } from "./index-Mm75tbmR.js";
2
+ import { u as W, t as ee, m as re, b as ae, X as te, e as oe, Q as se, k as ne, V as U, N as de, M as ie, o as C, G as me, J as ue, s as le, Z as ce, c as fe } from "./index-Bic-gOae.js";
3
3
  import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
4
- import { useState as q, useMemo as d, useCallback as f } from "react";
5
- const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
4
+ import { useState as S, useMemo as d, useCallback as f } from "react";
5
+ const be = "_formsTableBody_81hra_1", pe = "_customAccordianItem_81hra_6", O = {
6
6
  formsTableBody: be,
7
- customAccordianItem: Ne
8
- }, pe = (m) => m ? m.extension?.find(
7
+ customAccordianItem: pe
8
+ }, Ne = (m) => m ? m.extension?.find(
9
9
  (n) => n.url === fe
10
- )?.valueString : void 0, Ae = ({
10
+ )?.valueString : void 0, Ie = ({
11
11
  episodeOfCareUuids: m,
12
12
  encounterUuids: n,
13
- config: C
13
+ config: q
14
14
  }) => {
15
- const { t: o } = W(), u = ee(), [l, O] = q(!1), [t, A] = q(null), { numberOfVisits: k, hideThumbnail: V = !1 } = C ?? {}, M = re(
15
+ const { t: o } = W(), u = ee(), [l, A] = S(!1), [t, I] = S(null), { numberOfVisits: k, hideThumbnail: V = !1 } = q ?? {}, M = re(
16
16
  m,
17
17
  n
18
18
  ), G = ye(), {
@@ -27,25 +27,25 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
27
27
  enabled: !!u && !M
28
28
  }), E = d(() => !n || n.length === 0 ? y : y.filter(
29
29
  (e) => n.includes(e.encounterUuid)
30
- ), [y, n]), { data: F = [] } = c({
30
+ ), [y, n]), { data: _ = [] } = c({
31
31
  queryKey: ["observationForms"],
32
32
  queryFn: () => te()
33
- }), _ = f(
34
- (e) => F.find((r) => r.name === e)?.uuid,
35
- [F]
33
+ }), D = f(
34
+ (e) => _.find((r) => r.name === e)?.uuid,
35
+ [_]
36
36
  ), b = d(() => {
37
37
  if (t)
38
- return _(t.formName);
39
- }, [t, _]), {
38
+ return D(t.formName);
39
+ }, [t, D]), {
40
40
  isLoading: Q,
41
41
  isError: j,
42
- error: N
42
+ error: p
43
43
  } = c({
44
44
  queryKey: ["formMetadata", b],
45
45
  queryFn: () => oe(b),
46
46
  enabled: !!b && l
47
47
  }), {
48
- data: p,
48
+ data: N,
49
49
  isLoading: x,
50
50
  isError: $,
51
51
  error: g
@@ -60,15 +60,15 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
60
60
  },
61
61
  [u]
62
62
  );
63
- const w = d(() => !p?.entry || !t?.formName ? [] : p.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
64
- const r = pe(e);
63
+ const w = d(() => !N?.entry || !t?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
64
+ const r = Ne(e);
65
65
  return !r || r.includes(t.formName);
66
- }), [p, t?.formName]), z = d(() => {
67
- if (N)
68
- return U(N).message;
66
+ }), [N, t?.formName]), z = d(() => {
67
+ if (p)
68
+ return U(p).message;
69
69
  if (g)
70
70
  return U(g).message;
71
- }, [N, g]), L = d(
71
+ }, [p, g]), F = d(
72
72
  () => [
73
73
  { key: "recordedOn", header: o("RECORDED_ON") },
74
74
  { key: "recordedBy", header: o("RECORDED_BY") }
@@ -80,7 +80,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
80
80
  { key: "recordedBy", sortable: !0 }
81
81
  ],
82
82
  []
83
- ), D = d(() => {
83
+ ), L = d(() => {
84
84
  const e = E.reduce(
85
85
  (r, a) => {
86
86
  const i = a.formName;
@@ -106,9 +106,9 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
106
106
  })
107
107
  ).sort((r, a) => r.formName.localeCompare(a.formName));
108
108
  }, [E, o]), R = f((e) => {
109
- A(e), O(!0);
109
+ I(e), A(!0);
110
110
  }, []), P = f(() => {
111
- O(!1), A(null);
111
+ A(!1), I(null);
112
112
  }, []), v = f(
113
113
  (e, r) => {
114
114
  switch (r) {
@@ -123,32 +123,32 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
123
123
  [R]
124
124
  );
125
125
  return /* @__PURE__ */ Y(Z, { children: [
126
- /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: T || B || D.length === 0 || M ? /* @__PURE__ */ s(
127
- S,
126
+ /* @__PURE__ */ s("div", { "data-testid": "forms-table", children: T || B || L.length === 0 || M ? /* @__PURE__ */ s(
127
+ C,
128
128
  {
129
- headers: L,
129
+ headers: F,
130
130
  ariaLabel: o("FORMS_HEADING"),
131
131
  rows: [],
132
132
  loading: T,
133
133
  errorStateMessage: B ? H?.message : void 0,
134
134
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
135
135
  renderCell: v,
136
- className: I.formsTableBody,
136
+ className: O.formsTableBody,
137
137
  dataTestId: "forms-table"
138
138
  }
139
- ) : /* @__PURE__ */ s(me, { align: "start", children: D.map((e, r) => {
139
+ ) : /* @__PURE__ */ s(me, { align: "start", children: L.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: I.customAccordianItem,
145
+ className: O.customAccordianItem,
146
146
  testId: `accordian-title-${a}`,
147
147
  open: r === 0,
148
148
  children: /* @__PURE__ */ s(
149
- S,
149
+ C,
150
150
  {
151
- headers: L,
151
+ headers: F,
152
152
  ariaLabel: o("FORMS_HEADING"),
153
153
  rows: i,
154
154
  loading: !1,
@@ -156,7 +156,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
156
156
  sortable: J,
157
157
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
158
158
  renderCell: v,
159
- className: I.formsTableBody,
159
+ className: O.formsTableBody,
160
160
  dataTestId: `forms-table-${a}`
161
161
  }
162
162
  )
@@ -193,5 +193,5 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
193
193
  ] });
194
194
  };
195
195
  export {
196
- Ae as default
196
+ Ie 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-DHZ5z7U1.js";
2
- import { w as d, x as f, y as e } from "./index-Mm75tbmR.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DvBwJCv1.js";
2
+ import { w as d, x as f, y as e } from "./index-Bic-gOae.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-DHZ5z7U1.js";
2
- import { w as v, x as C, y as e } from "./index-Mm75tbmR.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-DvBwJCv1.js";
2
+ import { w as v, x as C, y as e } from "./index-Bic-gOae.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 N, jsx as u } from "react/jsx-runtime";
2
- import { t as B, r as K, u as S, Y as G, d as M, k as Q, f as j, l as w, g as x, h as H, o as Y, i as P, O as U, j as z, n as J, I as W, p as X, q as Z, v as ee } from "./index-Mm75tbmR.js";
2
+ import { t as K, r as V, u as S, Y as G, d as M, k as Q, f as j, l as w, g as x, h as H, o as Y, i as P, O as U, j as z, n as J, I as W, p as X, q as Z, v as ee } from "./index-Bic-gOae.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as f } from "react";
5
5
  const D = (a, n, d, l, b, r) => {
@@ -113,7 +113,7 @@ const D = (a, n, d, l, b, r) => {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = K(), { t: i } = S(), o = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = K(), { addNotification: s } = V(), { t: i } = S(), o = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
119
  queryFn: () => G(e),
@@ -123,10 +123,10 @@ const D = (a, 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 B = 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: B }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
@@ -1,4 +1,4 @@
1
- import { z as we, A as z, B as xt, C as B, x as q, y, P as Ro, D as ye, S as R, E as _, F as k, H as N, K as A, L as bs, R as ir, T as $e, U, W as Hn, _ 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-Mm75tbmR.js";
1
+ import { z as we, A as z, B as xt, C as B, x as q, y, P as Ro, D as ye, S as R, E as _, F as k, H as N, K as A, L as bs, R as ir, T as $e, U, W as Hn, _ 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-Bic-gOae.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -159721,7 +159721,7 @@ function Z$0(t, e, r) {
159721
159721
  return o;
159722
159722
  };
159723
159723
  }
159724
- ht(() => Promise.resolve().then(() => rL0)), ht(() => Promise.resolve().then(() => LL0)), ht(() => Promise.resolve().then(() => aA0)), ht(() => Promise.resolve().then(() => hA0)), ht(() => import("./DocumentsTable-BZHe_sb0-C2zG0GwF.js")), ht(() => Promise.resolve().then(() => XT0)), ht(() => import("./FormsTable-BztxQbBL-CLxpjuZi.js")), ht(() => Promise.resolve().then(() => bT0)), ht(() => import("./Observations-Cnt-RGWx-11A1fxdA.js")), ht(
159724
+ ht(() => Promise.resolve().then(() => rL0)), ht(() => Promise.resolve().then(() => LL0)), ht(() => Promise.resolve().then(() => aA0)), ht(() => Promise.resolve().then(() => hA0)), ht(() => import("./DocumentsTable-CxTI1Hgb-DTflvAwC.js")), ht(() => Promise.resolve().then(() => XT0)), ht(() => import("./FormsTable-DvLskkhx-BnAZnDQk.js")), ht(() => Promise.resolve().then(() => bT0)), ht(() => import("./Observations-BU9Xc30t-C1mpy_f2.js")), ht(
159725
159725
  () => Promise.resolve().then(() => l$0)
159726
159726
  ), ht(
159727
159727
  () => Promise.resolve().then(() => W_0)
@@ -161560,7 +161560,7 @@ var bj0 = (t, e = !1) => {
161560
161560
  const e = sS1(() => {
161561
161561
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t;
161562
161562
  let d;
161563
- return this.#i ? d = this.#i : (d = iS1(() => import("./LNWAZHJI-DXQQ0dPM.js")), this.#i = d), CS1(this.#h, this.#r), aS1(d, cS1({
161563
+ return this.#i ? d = this.#i : (d = iS1(() => import("./LNWAZHJI-hD3HiAdp.js")), this.#i = d), CS1(this.#h, this.#r), aS1(d, cS1({
161564
161564
  get queryFlavor() {
161565
161565
  return r.#d;
161566
161566
  },
@@ -161658,7 +161658,7 @@ var bj0 = (t, e = !1) => {
161658
161658
  const e = sS1(() => {
161659
161659
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [i] = this.#c, [l] = this.#p, [s] = this.#t, [d] = this.#i;
161660
161660
  let u;
161661
- return this.#l ? u = this.#l : (u = iS1(() => import("./MWZ6AO7Z-rDk_b_dN.js")), this.#l = u), CS1(this.#h, this.#r), aS1(u, cS1({
161661
+ return this.#l ? u = this.#l : (u = iS1(() => import("./MWZ6AO7Z-Df1AG96O.js")), this.#l = u), CS1(this.#h, this.#r), aS1(u, cS1({
161662
161662
  get queryFlavor() {
161663
161663
  return r.#d;
161664
161664
  },
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { av as s, at as t, au as E } from "./index-Mm75tbmR.js";
1
+ import { av as s, at as t, au as E } from "./index-Bic-gOae.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.221",
3
+ "version": "0.0.1-dev.222",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",