@bahmni/widgets 0.0.1-dev.477 → 0.0.1-dev.479
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.
- package/dist/{DocumentsTable-BBI3cnsm.js → DocumentsTable-DrLSPqbo.js} +42 -42
- package/dist/{FormsTable-nB9TzYWV.js → FormsTable-CIcMFA3C.js} +79 -79
- package/dist/{Observations-Bg2yOYz9.js → Observations-D_lfW14C.js} +21 -21
- package/dist/allergies/AllergiesTable.d.ts.map +1 -1
- package/dist/{index-DAQ7I7MF.js → index-7x3JLxKJ.js} +1 -1
- package/dist/{index-CnirxyTH.js → index-D-gbGn9r.js} +16205 -16181
- package/dist/index.css +1 -1
- package/dist/index.js +12 -12
- package/package.json +1 -1
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { jsx as i, jsxs as N } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { r as z, _ as U, s as G, v as H, O as P, x as j, z as x, L as J, D as Y, u as W, a as X, J as Z, Q as ee, N as se, K as te, y as re, M as ae, R as oe, T as ne, U as ie, S as ce, A as le } from "./index-D-gbGn9r.js";
|
|
3
3
|
import { useQueries as de, useQuery as ue } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as pe, useEffect as C, useMemo as I } from "react";
|
|
5
|
-
import { useTranslation as
|
|
5
|
+
import { useTranslation as F } from "react-i18next";
|
|
6
6
|
const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", ye = "Observations-module_secondary__14nuS", y = {
|
|
7
7
|
observations: me,
|
|
8
8
|
title: be,
|
|
9
9
|
wrapper: ve,
|
|
10
10
|
secondary: ye
|
|
11
|
-
},
|
|
11
|
+
}, w = (t, l, n, c, u, r) => {
|
|
12
12
|
const a = G(t, l, u), e = a.value, p = H(e);
|
|
13
13
|
let o = e;
|
|
14
14
|
p === "Image" && (o = /* @__PURE__ */ i(
|
|
15
|
-
|
|
15
|
+
x,
|
|
16
16
|
{
|
|
17
17
|
imageSrc: e,
|
|
18
18
|
alt: e,
|
|
@@ -20,7 +20,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
20
20
|
hideThumbnail: r
|
|
21
21
|
}
|
|
22
22
|
)), p === "Video" && (o = /* @__PURE__ */ i(
|
|
23
|
-
|
|
23
|
+
J,
|
|
24
24
|
{
|
|
25
25
|
id: `${e}-video`,
|
|
26
26
|
videoSrc: e,
|
|
@@ -32,16 +32,16 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
32
32
|
a.header.referenceRange && /* @__PURE__ */ i("span", { className: y.secondary, children: a.header.referenceRange })
|
|
33
33
|
] }), d = u("OBSERVATIONS_RECORDED_BY", {
|
|
34
34
|
provider: a.provider
|
|
35
|
-
}), b = t.effectiveDateTime ? P(t.effectiveDateTime, u, !0).formattedResult : void 0,
|
|
35
|
+
}), b = t.effectiveDateTime ? P(t.effectiveDateTime, u, !0).formattedResult : void 0, _ = /* @__PURE__ */ N("div", { className: y.wrapper, children: [
|
|
36
36
|
/* @__PURE__ */ i("span", { children: d }),
|
|
37
37
|
b && /* @__PURE__ */ i("span", { className: y.secondary, children: b })
|
|
38
|
-
] }), v = t.display,
|
|
38
|
+
] }), v = t.display, g = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", O = c ? `${c}-${g}-${v}-${n}-${l}` : `${g}-${v}-${n}-${l}`;
|
|
39
39
|
return /* @__PURE__ */ i(
|
|
40
40
|
j,
|
|
41
41
|
{
|
|
42
42
|
header: m,
|
|
43
43
|
value: o,
|
|
44
|
-
info:
|
|
44
|
+
info: _,
|
|
45
45
|
id: O,
|
|
46
46
|
testId: O,
|
|
47
47
|
ariaLabel: O
|
|
@@ -49,13 +49,13 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
49
49
|
`obs-${t.id}`
|
|
50
50
|
);
|
|
51
51
|
}, fe = (t, l, n, c, u, r, a) => /* @__PURE__ */ i(
|
|
52
|
-
|
|
52
|
+
U,
|
|
53
53
|
{
|
|
54
54
|
title: t.display,
|
|
55
55
|
id: `grouped-obs-${t.display}-${c}`,
|
|
56
56
|
open: n,
|
|
57
57
|
children: t.members?.map(
|
|
58
|
-
(e, p) =>
|
|
58
|
+
(e, p) => w(
|
|
59
59
|
e,
|
|
60
60
|
p,
|
|
61
61
|
u,
|
|
@@ -71,17 +71,17 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
71
71
|
title: l = "",
|
|
72
72
|
hideThumbnail: n
|
|
73
73
|
}) => {
|
|
74
|
-
const { t: c } =
|
|
74
|
+
const { t: c } = F(), u = (r, a, e) => {
|
|
75
75
|
const p = z(r.encounterDetails, c);
|
|
76
76
|
return /* @__PURE__ */ N(
|
|
77
|
-
|
|
77
|
+
U,
|
|
78
78
|
{
|
|
79
79
|
title: p,
|
|
80
80
|
id: `encounter-${r.encounterId}`,
|
|
81
81
|
open: a,
|
|
82
82
|
children: [
|
|
83
83
|
r.observations.map(
|
|
84
|
-
(o, m) =>
|
|
84
|
+
(o, m) => w(
|
|
85
85
|
o,
|
|
86
86
|
m,
|
|
87
87
|
e,
|
|
@@ -133,7 +133,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
133
133
|
conceptUuid: r = [],
|
|
134
134
|
hideThumbnail: a = !1,
|
|
135
135
|
scope: e = "all"
|
|
136
|
-
} = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: m } = X(), { t: d } =
|
|
136
|
+
} = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: m } = X(), { t: d } = F(), b = de({
|
|
137
137
|
queries: u.map((s) => ({
|
|
138
138
|
queryKey: Ee(s),
|
|
139
139
|
queryFn: () => Z(s),
|
|
@@ -148,7 +148,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
148
148
|
type: "error"
|
|
149
149
|
}), p.current.add(0)) : !s && R && p.current.clear();
|
|
150
150
|
}, [b, m, d]);
|
|
151
|
-
const
|
|
151
|
+
const _ = I(() => b.map((s) => s.data?.uuid).filter((s) => !!s), [b]), v = I(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = I(() => u.length === 0 ? !0 : b.every((s) => !s.isLoading), [b, u.length]), g = e === "latest" || e === "latest-encounter", O = ee(
|
|
152
152
|
l,
|
|
153
153
|
n
|
|
154
154
|
), {
|
|
@@ -163,7 +163,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
163
163
|
n,
|
|
164
164
|
e
|
|
165
165
|
),
|
|
166
|
-
queryFn: () =>
|
|
166
|
+
queryFn: () => g ? se(
|
|
167
167
|
o,
|
|
168
168
|
v,
|
|
169
169
|
n
|
|
@@ -194,11 +194,11 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
194
194
|
e === "latest-encounter" && (s = oe(s));
|
|
195
195
|
const R = ne(s);
|
|
196
196
|
return ie(R);
|
|
197
|
-
}, [E, e]),
|
|
197
|
+
}, [E, e]), K = [
|
|
198
198
|
{ key: "name", header: "name" },
|
|
199
199
|
{ key: "value", header: "value" },
|
|
200
200
|
{ key: "form", header: "form" }
|
|
201
|
-
], L = V || !f, B = S && f,
|
|
201
|
+
], L = V || !f, B = S && f, M = (!E || E.entry?.length === 0 || v.length === 0) && f, Q = B ? d("ERROR_FETCHING_OBSERVATIONS") : null, k = M ? d("NO_OBSERVATIONS_FOUND") : void 0, q = D.length > 0 && !L && !B, T = c.titleTranslationKey, h = T ? d(T) : "";
|
|
202
202
|
return /* @__PURE__ */ N(
|
|
203
203
|
"div",
|
|
204
204
|
{
|
|
@@ -217,7 +217,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
217
217
|
children: /* @__PURE__ */ i("p", { children: h })
|
|
218
218
|
}
|
|
219
219
|
),
|
|
220
|
-
|
|
220
|
+
q ? /* @__PURE__ */ i(
|
|
221
221
|
Oe,
|
|
222
222
|
{
|
|
223
223
|
groupedData: D,
|
|
@@ -227,12 +227,12 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
|
|
|
227
227
|
) : /* @__PURE__ */ i(
|
|
228
228
|
le,
|
|
229
229
|
{
|
|
230
|
-
headers:
|
|
230
|
+
headers: K,
|
|
231
231
|
rows: [],
|
|
232
232
|
ariaLabel: d("OBSERVATIONS"),
|
|
233
233
|
loading: L,
|
|
234
234
|
errorStateMessage: Q,
|
|
235
|
-
emptyStateMessage:
|
|
235
|
+
emptyStateMessage: k ?? d("NO_OBSERVATIONS_AVAILABLE"),
|
|
236
236
|
dataTestId: "observations-table"
|
|
237
237
|
}
|
|
238
238
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AllergiesTable.d.ts","sourceRoot":"","sources":["../../src/allergies/AllergiesTable.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAsB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAyBpE,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,
|
|
1
|
+
{"version":3,"file":"AllergiesTable.d.ts","sourceRoot":"","sources":["../../src/allergies/AllergiesTable.tsx"],"names":[],"mappings":"AAoBA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAsB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAyBpE,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwLzC,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as ge } from "react/jsx-runtime";
|
|
2
|
-
import { V as Bh, u as zh, W as Gh,
|
|
2
|
+
import { V as Bh, u as zh, W as Gh, Y as Wh, Z as qh, $ as Xh, a0 as Zh, a1 as Yh, a2 as Kh } from "./index-D-gbGn9r.js";
|
|
3
3
|
import { useQuery as ja } from "@tanstack/react-query";
|
|
4
4
|
import { useTranslation as Qh } from "react-i18next";
|
|
5
5
|
var Gl = /* @__PURE__ */ ((t) => (t.RENDER_FINISHED = "render-finished", t.RESIZE = "chart-resize", t.MOUSEOVER = "chart-mouseover", t.MOUSEOUT = "chart-mouseout", t))(Gl || {}), Wl = /* @__PURE__ */ ((t) => (t.SHOW = "show-modal", t.HIDE = "hide-modal", t))(Wl || {}), ql = /* @__PURE__ */ ((t) => (t.UPDATE = "model-update", t))(ql || {}), Xl = /* @__PURE__ */ ((t) => (t.SHOW_OVERFLOW_MENU = "show-toolbar-overflow-menu", t.HIDE_OVERFLOW_MENU = "hide-toolbar-overflow-menu", t.BUTTON_CLICK = "toolbar-button-click", t.SHOW_TOOLTIP = "toolbar-show-tooltip", t.HIDE_TOOLTIP = "toolbar-hide-tooltip", t))(Xl || {}), Zl = /* @__PURE__ */ ((t) => (t.UPDATE = "zoom-bar-update", t.SELECTION_START = "zoom-bar-selection-start", t.SELECTION_IN_PROGRESS = "zoom-bar-selection-in-progress", t.SELECTION_END = "zoom-bar-selection-end", t))(Zl || {}), Yl = /* @__PURE__ */ ((t) => (t.CHANGE = "zoom-domain-change", t))(Yl || {}), Kl = /* @__PURE__ */ ((t) => (t.CANVAS_ZOOM_IN = "canvas-zoom-in", t.CANVAS_ZOOM_OUT = "canvas-zoom-out", t))(Kl || {}), Ql = /* @__PURE__ */ ((t) => (t.LABEL_MOUSEOVER = "axis-label-mouseover", t.LABEL_MOUSEMOVE = "axis-label-mousemove", t.LABEL_CLICK = "axis-label-click", t.LABEL_MOUSEOUT = "axis-label-mouseout", t.LABEL_FOCUS = "axis-label-focus", t.LABEL_BLUR = "axis-label-blur", t.RENDER_COMPLETE = "axis-render-complete", t))(Ql || {}), Jl = /* @__PURE__ */ ((t) => (t.POINT_MOUSEOVER = "scatter-mouseover", t.POINT_MOUSEMOVE = "scatter-mousemove", t.POINT_CLICK = "scatter-click", t.POINT_MOUSEOUT = "scatter-mouseout", t))(Jl || {}), tu = /* @__PURE__ */ ((t) => (t.WORD_MOUSEOVER = "wordcloud-word-mouseover", t.WORD_MOUSEMOVE = "wordcloud-word-mousemove", t.WORD_CLICK = "wordcloud-word-click", t.WORD_MOUSEOUT = "wordcloud-word-mouseout", t))(tu || {}), eu = /* @__PURE__ */ ((t) => (t.SLICE_MOUSEOVER = "pie-slice-mouseover", t.SLICE_MOUSEMOVE = "pie-slice-mousemove", t.SLICE_CLICK = "pie-slice-click", t.SLICE_MOUSEOUT = "pie-slice-mouseout", t))(eu || {}), nu = /* @__PURE__ */ ((t) => (t.ARC_MOUSEOVER = "gauge-arc-mouseover", t.ARC_MOUSEMOVE = "gauge-arc-mousemove", t.ARC_CLICK = "gauge-arc-click", t.ARC_MOUSEOUT = "gauge-arc-mouseout", t))(nu || {}), ru = /* @__PURE__ */ ((t) => (t.BAR_MOUSEOVER = "bar-mouseover", t.BAR_MOUSEMOVE = "bar-mousemove", t.BAR_CLICK = "bar-click", t.BAR_MOUSEOUT = "bar-mouseout", t))(ru || {}), iu = /* @__PURE__ */ ((t) => (t.BOX_MOUSEOVER = "box-mouseover", t.BOX_MOUSEMOVE = "box-mousemove", t.BOX_CLICK = "box-click", t.BOX_MOUSEOUT = "box-mouseout", t.OUTLIER_MOUSEOVER = "outlier-mouseover", t.OUTLIER_MOUSEMOVE = "outlier-mousemove", t.OUTLIER_CLICK = "outlier-click", t.OUTLIER_MOUSEOUT = "outlier-mouseout", t))(iu || {}), ou = /* @__PURE__ */ ((t) => (t.SCATTER_MOUSEOVER = "scatter-mouseover", t.SCATTER_MOUSEMOVE = "scatter-mousemove", t.SCATTER_CLICK = "scatter-click", t.SCATTER_MOUSEOUT = "scatter-mouseout", t))(ou || {}), au = /* @__PURE__ */ ((t) => (t.POINT_MOUSEOVER = "scatter-mouseover", t.POINT_MOUSEMOVE = "scatter-mousemove", t.POINT_CLICK = "scatter-click", t.POINT_MOUSEOUT = "scatter-mouseout", t))(au || {}), su = /* @__PURE__ */ ((t) => (t.X_AXIS_MOUSEOVER = "radar-x-axis-mouseover", t.X_AXIS_MOUSEMOVE = "radar-x-axis-mousemove", t.X_AXIS_CLICK = "radar-x-axis-click", t.X_AXIS_MOUSEOUT = "radar-x-axis-mouseout", t))(su || {}), lu = /* @__PURE__ */ ((t) => (t.NODE_MOUSEOVER = "tree-node-mouseover", t.NODE_CLICK = "tree-node-click", t.NODE_MOUSEOUT = "tree-node-mouseout", t))(lu || {}), uu = /* @__PURE__ */ ((t) => (t.LEAF_MOUSEOVER = "leaf-mouseover", t.LEAF_MOUSEMOVE = "leaf-mousemove", t.LEAF_CLICK = "leaf-click", t.LEAF_MOUSEOUT = "leaf-mouseout", t))(uu || {}), cu = /* @__PURE__ */ ((t) => (t.SHOW = "show-tooltip", t.MOVE = "move-tooltip", t.HIDE = "hide-tooltip", t))(cu || {}), hu = /* @__PURE__ */ ((t) => (t.SHOW = "show-threshold", t.HIDE = "hide-threshold", t))(hu || {}), fu = /* @__PURE__ */ ((t) => (t.ITEM_HOVER = "legend-item-onhover", t.ITEM_CLICK = "legend-item-onclick", t.ITEM_MOUSEOUT = "legend-item-onmouseout", t.ITEMS_UPDATE = "legend-items-update", t))(fu || {}), du = /* @__PURE__ */ ((t) => (t.CIRCLE_MOUSEOVER = "circle-leaf-mouseover", t.CIRCLE_CLICK = "circle-leaf-click", t.CIRCLE_MOUSEOUT = "circle-leaf-mouseout", t.CIRCLE_MOUSEMOVE = "circle-leaf-mousemove", t))(du || {}), pu = /* @__PURE__ */ ((t) => (t.NODE_MOUSEOVER = "alluvial-node-mouseover", t.NODE_CLICK = "alluvial-node-click", t.NODE_MOUSEOUT = "alluvial-node-mouseout", t.NODE_MOUSEMOVE = "alluvial-node-mousemove", t.LINE_MOUSEOVER = "alluvial-line-mouseover", t.LINE_CLICK = "alluvial-line-click", t.LINE_MOUSEOUT = "alluvial-line-mouseout", t.LINE_MOUSEMOVE = "alluvial-line-mousemove", t))(pu || {}), gu = /* @__PURE__ */ ((t) => (t.METER_MOUSEOVER = "meter-mouseover", t.METER_CLICK = "meter-click", t.METER_MOUSEOUT = "meter-mouseout", t.METER_MOUSEMOVE = "meter-mousemove", t))(gu || {}), mu = /* @__PURE__ */ ((t) => (t.HEATMAP_MOUSEOVER = "heatmap-mouseover", t.HEATMAP_CLICK = "heatmap-click", t.HEATMAP_MOUSEOUT = "heatmap-mouseout", t.HEATMAP_MOUSEMOVE = "hetmap-mousemove", t))(mu || {}), yu = /* @__PURE__ */ ((t) => (t.CHOROPLETH_MOUSEOVER = "choropleth-mouseover", t.CHOROPLETH_CLICK = "choropleth-click", t.CHOROPLETH_MOUSEOUT = "choropleth-mouseout", t.CHOROPLETH_MOUSEMOVE = "choropleth-mousemove", t))(yu || {});
|