@bahmni/appointments-app 0.0.1-dev.393 → 0.0.1-dev.394
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-ULtsCmIW-B3a-wR0i.js → DocumentsTable-Cz-E1n_9-ev_6HncJ.js} +1 -1
- package/dist/{FormsTable-DAFDPXnd-BWet699c.js → FormsTable-D2iNj6MO-Cooe1uL_.js} +1 -1
- package/dist/{LNWAZHJI-Db8S0448.js → LNWAZHJI-CMWV8frw.js} +2 -2
- package/dist/{MWZ6AO7Z-BQ5GEGGR.js → MWZ6AO7Z-BPCEO6bV.js} +2 -2
- package/dist/{Observations-DOZ-UiSs-l_0dljPE.js → Observations-mnzr0Nxn-C8ffI22P.js} +1 -1
- package/dist/{YPM2AS64-CQ8FZu4y.js → YPM2AS64-IiNGFbba.js} +1 -1
- package/dist/{index-VA8owXMt.js → index-B0zxSHSO.js} +1 -1
- package/dist/{index-D9LaSwdQ.js → index-BnMAhwqo.js} +50 -50
- package/dist/{index-DGX5E4u4.js → index-CXUQOc97.js} +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p, Fragment as x } from "react/jsx-runtime";
|
|
2
|
-
import { g as G, u as W, L as Y, D as J, q as X, w as Z, K as ee, p as te } from "./index-
|
|
2
|
+
import { g as G, u as W, L as Y, D as J, q as X, w as Z, K as ee, p as te } from "./index-BnMAhwqo.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as h, useEffect as I, useMemo as _ } from "react";
|
|
5
5
|
const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as i, jsxs as z, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
-
import { u as ge, g as be, A as Ne, e as Oe, a as Te, R as Ee, b as Ie, c as Ae, Z as _e, m as ve, d as Fe, P as Re, Y as $, w as Be, N as x, E as G, q as Se, K as Q, B as Le, f as Me, p as Ce, o as Ue, J as De } from "./index-
|
|
2
|
+
import { u as ge, g as be, A as Ne, e as Oe, a as Te, R as Ee, b as Ie, c as Ae, Z as _e, m as ve, d as Fe, P as Re, Y as $, w as Be, N as x, E as G, q as Se, K as Q, B as Le, f as Me, p as Ce, o as Ue, J as De } from "./index-BnMAhwqo.js";
|
|
3
3
|
import { useQueryClient as ke, useQuery as O } from "@tanstack/react-query";
|
|
4
4
|
import { useState as Y, useMemo as d, useCallback as c } from "react";
|
|
5
5
|
const qe = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { an as p, ao as d, ap as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-IiNGFbba.js";
|
|
2
|
+
import { an as p, ao as d, ap as e } from "./index-BnMAhwqo.js";
|
|
3
3
|
var f = (a) => {
|
|
4
4
|
const [r, o] = 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-
|
|
2
|
-
import { an as v, ao as C, ap as e } from "./index-
|
|
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-IiNGFbba.js";
|
|
2
|
+
import { an as v, ao as C, ap as e } from "./index-BnMAhwqo.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 { g as k, L as q, u as N, T as j, O as M, m as Q, F as w, j as x, U as G, h as H, K as P, i as z, k as F, l as J, _ as Y, n as W, r as X, V as Z, y as ee } from "./index-
|
|
2
|
+
import { g as k, L as q, u as N, T as j, O as M, m as Q, F as w, j as x, U as G, h as H, K as P, i as z, k as F, l as J, _ as Y, n as W, r as X, V as Z, y as ee } from "./index-BnMAhwqo.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as se, useEffect as I, useMemo as T } from "react";
|
|
5
5
|
const L = (a, n, d, l, b, r) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-
|
|
1
|
+
import { aq as we, ar as z, as as xt, at as B, ao as q, ap as y, au as Ro, av as ye, aw as R, ax as _, ay as k, az as N, aA as A, aB as bs, aC as ir, aD as $e, aE as U, aF as Hn, aG as Vn, aH as dt, aI as D, aJ as xs, aK as cn, aL as Be, aM as ws, aN as qt, aO as zt, aP as $s, aQ as Cs, aR as $n, aS as Ss, aT as Nr, aU as Bt, aV as zo, aW as ks, aX as Es, aY as j, aZ as Ur, a_ as Ms, a$ as Ds, b0 as sr, b1 as As, b2 as Ts, b3 as zn, b4 as Fs, b5 as Is, b6 as Z, b7 as Ps, b8 as Ls } from "./index-BnMAhwqo.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as a, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import { Q as V, s as O, u as I, t as P, v as h, L as B, e as G, x as A, C as x, z as U, M as q, G as F, H as Q, I as k, S as H, W, X as $ } from "./index-
|
|
2
|
+
import { Q as V, s as O, u as I, t as P, v as h, L as B, e as G, x as A, C as x, z as U, M as q, G as F, H as Q, I as k, S as H, W, X as $ } from "./index-BnMAhwqo.js";
|
|
3
3
|
import { useState as C, useMemo as _ } from "react";
|
|
4
4
|
import { useQueryClient as j, useQuery as w } from "@tanstack/react-query";
|
|
5
5
|
const K = V(
|
|
@@ -103924,13 +103924,7 @@ const fg0 = ({
|
|
|
103924
103924
|
}
|
|
103925
103925
|
)
|
|
103926
103926
|
] });
|
|
103927
|
-
}, Xg0 =
|
|
103928
|
-
$schema: Xg0,
|
|
103929
|
-
title: Qg0,
|
|
103930
|
-
type: ev0,
|
|
103931
|
-
additionalProperties: tv0,
|
|
103932
|
-
properties: rv0
|
|
103933
|
-
}, ov0 = ({
|
|
103927
|
+
}, Xg0 = ({
|
|
103934
103928
|
buttonTitle: t,
|
|
103935
103929
|
searchBarPlaceholder: e,
|
|
103936
103930
|
isLoading: r,
|
|
@@ -104055,6 +104049,12 @@ const fg0 = ({
|
|
|
104055
104049
|
]
|
|
104056
104050
|
}
|
|
104057
104051
|
);
|
|
104052
|
+
}, Qg0 = "http://json-schema.org/draft-07/schema#", ev0 = "Search Patient Widget Config Schema", tv0 = "object", rv0 = !1, nv0 = { patientDetailUrl: { type: "string", description: "URL template for navigating to a patient detail page. Use {{patientUuid}} as a placeholder." }, customAttributes: { type: "array", description: "Array of available search fields", items: { type: "object", additionalProperties: !1, properties: { translationKey: { type: "string", description: "Translation key for the dropdown label" }, fields: { type: "array", description: "Array of field names to search against", items: { type: "string" } }, columnTranslationKeys: { type: "array", description: "Array of translation keys for the column headers", items: { type: "string" } }, expectedFields: { type: "array", description: "Array of fields configurations with translation keys to display on table headers", items: { type: "object", additionalProperties: !1, properties: { field: { type: "string", description: "field corresponding to table header" }, translationKey: { type: "string", description: "Translation key for the table header" } } } }, type: { type: "string", enum: ["person", "address", "program", "appointment"], description: "Type of the search field (person, address, program, appointment)" } } } }, appointment: { type: "array", description: "Array of available search fields for appointments", items: { type: "object", additionalProperties: !0, required: ["translationKey", "fields"], properties: { translationKey: { type: "string", description: "Translation key for the field label" }, fields: { type: "array", description: "Array of field names to search against", items: { type: "string" } }, expectedFields: { type: "array", description: "Array of expected fields with optional types", items: { type: "object", required: ["field", "translationKey"], properties: { field: { type: "string", description: "The field name (e.g., apptNumber, apptDate)" }, translationKey: { type: "string", description: "Translation key for the field's display label" }, type: { type: "string", description: "Optional field type (e.g., date, string)" } } } }, type: { type: "string", enum: ["appointment"], description: "Type of the search field (appointment)" }, actions: { type: "array", description: "Array of actions allowed on this search field", items: { type: "object", required: ["translationKey", "type", "enabledRule", "onAction"], properties: { translationKey: { type: "string", description: "Translation key for the action button label" }, type: { type: "string", enum: ["changeStatus", "navigate", "checkInAndStartVisit"], description: "Type of action to perform" }, enabledRule: { type: "array", description: "Conditions to enable this action (rules)", items: { type: "object", properties: { type: { type: "string", enum: ["privilegeCheck", "statusCheck", "appDateCheck", "appointmentService"], description: "Type of rule to evaluate" }, values: { type: "array", items: { type: "string" }, description: "Values to match for the rule" }, excludeValues: { type: "array", items: { type: "string" }, description: "Values to exclude for the rule" } } } }, onAction: { type: "object", description: "What happens when action is triggered", additionalProperties: !0, properties: { status: { type: "string", description: "Status to set (for changeStatus type)" }, navigation: { type: "string", description: "URL path to navigate to (for navigate type)" }, submit: { type: "string", description: "API endpoint URL to submit to (for checkInAndStartVisit type)" } } }, onSuccess: { type: "object", description: "Notification or other success response", additionalProperties: !0, properties: { notification: { type: "string", description: "Translation key for success notification message" } } } } } } } } } }, ov0 = {
|
|
104053
|
+
$schema: Qg0,
|
|
104054
|
+
title: ev0,
|
|
104055
|
+
type: tv0,
|
|
104056
|
+
additionalProperties: rv0,
|
|
104057
|
+
properties: nv0
|
|
104058
104058
|
};
|
|
104059
104059
|
class av0 {
|
|
104060
104060
|
type = "appointment";
|
|
@@ -104316,7 +104316,7 @@ const sv0 = ({ extensionParams: t }) => {
|
|
|
104316
104316
|
data: a
|
|
104317
104317
|
} = W2({
|
|
104318
104318
|
queryKey: ["searchPatientConfig", e],
|
|
104319
|
-
queryFn: () => gt2(e,
|
|
104319
|
+
queryFn: () => gt2(e, ov0),
|
|
104320
104320
|
enabled: !!e
|
|
104321
104321
|
}), [c, l] = z1(""), [i, s] = z1(""), [d, u] = z1(""), [h, p] = z1(""), { addNotification: m } = lt(), { t: y } = Ke(), [w, v] = z1(!1), [M, f] = z1([]), [g, C] = z1(""), [E, L] = z1([]), [A, _] = z1(void 0), I = () => E.find(
|
|
104322
104322
|
(P) => y(P.translationKey) === g
|
|
@@ -104432,7 +104432,7 @@ const sv0 = ({ extensionParams: t }) => {
|
|
|
104432
104432
|
} : void 0, X = w ? O : "", W = X === "appointment" ? k?.appointment ?? [] : k?.customAttributes ?? [];
|
|
104433
104433
|
return /* @__PURE__ */ q1("div", { children: [
|
|
104434
104434
|
/* @__PURE__ */ n1(
|
|
104435
|
-
|
|
104435
|
+
Xg0,
|
|
104436
104436
|
{
|
|
104437
104437
|
buttonTitle: y("REGISTRATION_PATIENT_SEARCH_BUTTON_TITLE"),
|
|
104438
104438
|
searchBarPlaceholder: y(
|
|
@@ -112560,15 +112560,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112560
112560
|
className: L2.dataTable
|
|
112561
112561
|
}
|
|
112562
112562
|
);
|
|
112563
|
-
}, ez0 =
|
|
112564
|
-
$schema: ez0,
|
|
112565
|
-
title: tz0,
|
|
112566
|
-
description: rz0,
|
|
112567
|
-
type: nz0,
|
|
112568
|
-
minItems: oz0,
|
|
112569
|
-
items: az0,
|
|
112570
|
-
definitions: cz0
|
|
112571
|
-
}, iz0 = ({
|
|
112563
|
+
}, ez0 = ({
|
|
112572
112564
|
input: t,
|
|
112573
112565
|
value: e,
|
|
112574
112566
|
onChange: r,
|
|
@@ -112677,7 +112669,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112677
112669
|
)
|
|
112678
112670
|
}
|
|
112679
112671
|
) });
|
|
112680
|
-
},
|
|
112672
|
+
}, tz0 = async () => {
|
|
112681
112673
|
const t = x6();
|
|
112682
112674
|
return (await e30()).filter(
|
|
112683
112675
|
(e) => e.location === null || e.location.uuid === t.uuid
|
|
@@ -112685,20 +112677,20 @@ const qH0 = (t, e) => t.filter(
|
|
|
112685
112677
|
uuid: e.uuid,
|
|
112686
112678
|
label: e.name
|
|
112687
112679
|
}));
|
|
112688
|
-
},
|
|
112680
|
+
}, rz0 = async () => (await ra0()).filter((t) => !t.retired).map((t) => ({ uuid: t.uuid, label: t.name })), nz0 = async () => (await S40()).filter((t) => t.person).map((t) => ({
|
|
112689
112681
|
uuid: t.uuid,
|
|
112690
112682
|
label: (t.person?.preferredName?.display ?? t.person.display) || t.display
|
|
112691
|
-
})),
|
|
112692
|
-
appointmentService:
|
|
112693
|
-
provider:
|
|
112694
|
-
programName:
|
|
112695
|
-
},
|
|
112683
|
+
})), oz0 = {
|
|
112684
|
+
appointmentService: tz0,
|
|
112685
|
+
provider: nz0,
|
|
112686
|
+
programName: rz0
|
|
112687
|
+
}, az0 = ({
|
|
112696
112688
|
input: t,
|
|
112697
112689
|
value: e,
|
|
112698
112690
|
onChange: r,
|
|
112699
112691
|
validationError: o
|
|
112700
112692
|
}) => {
|
|
112701
|
-
const { t: a } = Ke(), [c, l] = z1(null), i =
|
|
112693
|
+
const { t: a } = Ke(), [c, l] = z1(null), i = oz0[t.lookup.source], { data: s, isLoading: d, isError: u } = W2({
|
|
112702
112694
|
queryKey: ["lookup", t.lookup.source],
|
|
112703
112695
|
queryFn: i,
|
|
112704
112696
|
enabled: !!i,
|
|
@@ -112739,7 +112731,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112739
112731
|
)
|
|
112740
112732
|
}
|
|
112741
112733
|
);
|
|
112742
|
-
}, hf = (t) => t == null || t === "" ? null : String(t),
|
|
112734
|
+
}, hf = (t) => t == null || t === "" ? null : String(t), cz0 = ({
|
|
112743
112735
|
input: t,
|
|
112744
112736
|
value: e,
|
|
112745
112737
|
onChange: r,
|
|
@@ -112840,7 +112832,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112840
112832
|
)
|
|
112841
112833
|
}
|
|
112842
112834
|
);
|
|
112843
|
-
},
|
|
112835
|
+
}, lz0 = ({
|
|
112844
112836
|
input: t,
|
|
112845
112837
|
value: e,
|
|
112846
112838
|
onChange: r,
|
|
@@ -112870,7 +112862,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112870
112862
|
)
|
|
112871
112863
|
}
|
|
112872
112864
|
);
|
|
112873
|
-
},
|
|
112865
|
+
}, iz0 = ({
|
|
112874
112866
|
input: t,
|
|
112875
112867
|
value: e,
|
|
112876
112868
|
onChange: r,
|
|
@@ -112893,7 +112885,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112893
112885
|
invalidText: o ?? void 0
|
|
112894
112886
|
}
|
|
112895
112887
|
) });
|
|
112896
|
-
},
|
|
112888
|
+
}, sz0 = ({
|
|
112897
112889
|
input: t,
|
|
112898
112890
|
value: e,
|
|
112899
112891
|
onChange: r,
|
|
@@ -112903,7 +112895,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112903
112895
|
switch (t.kind) {
|
|
112904
112896
|
case "text":
|
|
112905
112897
|
return /* @__PURE__ */ n1(
|
|
112906
|
-
|
|
112898
|
+
iz0,
|
|
112907
112899
|
{
|
|
112908
112900
|
input: t,
|
|
112909
112901
|
value: e,
|
|
@@ -112913,7 +112905,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112913
112905
|
);
|
|
112914
112906
|
case "numeric":
|
|
112915
112907
|
return /* @__PURE__ */ n1(
|
|
112916
|
-
|
|
112908
|
+
cz0,
|
|
112917
112909
|
{
|
|
112918
112910
|
input: t,
|
|
112919
112911
|
value: e,
|
|
@@ -112924,7 +112916,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112924
112916
|
);
|
|
112925
112917
|
case "date":
|
|
112926
112918
|
return /* @__PURE__ */ n1(
|
|
112927
|
-
|
|
112919
|
+
ez0,
|
|
112928
112920
|
{
|
|
112929
112921
|
input: t,
|
|
112930
112922
|
value: e,
|
|
@@ -112935,7 +112927,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112935
112927
|
);
|
|
112936
112928
|
case "options":
|
|
112937
112929
|
return /* @__PURE__ */ n1(
|
|
112938
|
-
|
|
112930
|
+
lz0,
|
|
112939
112931
|
{
|
|
112940
112932
|
input: t,
|
|
112941
112933
|
value: e,
|
|
@@ -112945,7 +112937,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112945
112937
|
);
|
|
112946
112938
|
case "lookup":
|
|
112947
112939
|
return /* @__PURE__ */ n1(
|
|
112948
|
-
|
|
112940
|
+
az0,
|
|
112949
112941
|
{
|
|
112950
112942
|
input: t,
|
|
112951
112943
|
value: e,
|
|
@@ -112954,7 +112946,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112954
112946
|
}
|
|
112955
112947
|
);
|
|
112956
112948
|
}
|
|
112957
|
-
},
|
|
112949
|
+
}, dz0 = ({
|
|
112958
112950
|
row: t,
|
|
112959
112951
|
availableCriteria: e,
|
|
112960
112952
|
selectedCriterion: r,
|
|
@@ -112989,7 +112981,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
112989
112981
|
}
|
|
112990
112982
|
) }),
|
|
112991
112983
|
/* @__PURE__ */ n1("div", { className: L2.criterionInput, children: r ? /* @__PURE__ */ n1(
|
|
112992
|
-
|
|
112984
|
+
sz0,
|
|
112993
112985
|
{
|
|
112994
112986
|
input: r.input,
|
|
112995
112987
|
value: t.value,
|
|
@@ -113012,7 +113004,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
113012
113004
|
]
|
|
113013
113005
|
}
|
|
113014
113006
|
);
|
|
113015
|
-
},
|
|
113007
|
+
}, uz0 = ({
|
|
113016
113008
|
config: t,
|
|
113017
113009
|
location: e,
|
|
113018
113010
|
onSearch: r,
|
|
@@ -113096,7 +113088,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
113096
113088
|
}
|
|
113097
113089
|
) }),
|
|
113098
113090
|
d.map((g) => /* @__PURE__ */ n1("div", { className: L2.fullWidthCol, children: /* @__PURE__ */ n1(
|
|
113099
|
-
|
|
113091
|
+
dz0,
|
|
113100
113092
|
{
|
|
113101
113093
|
row: g,
|
|
113102
113094
|
availableCriteria: ZH0(
|
|
@@ -113146,7 +113138,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
113146
113138
|
]
|
|
113147
113139
|
}
|
|
113148
113140
|
);
|
|
113149
|
-
},
|
|
113141
|
+
}, hz0 = (t, e, r) => {
|
|
113150
113142
|
if ("value" in t) {
|
|
113151
113143
|
if (e.kind === "options") {
|
|
113152
113144
|
const a = e.options.find((c) => c.value === t.value);
|
|
@@ -113162,14 +113154,14 @@ const qH0 = (t, e) => t.filter(
|
|
|
113162
113154
|
}
|
|
113163
113155
|
const o = t.from.value;
|
|
113164
113156
|
return t.to?.value ? r("COMMON_SEARCH_CRITERIA_TAG_RANGE", { from: o, to: t.to.value }) : o;
|
|
113165
|
-
},
|
|
113157
|
+
}, pz0 = (t, e, r) => `${r(e.translationKey)}: ${hz0(t.value, e.input, r)}`, fz0 = ({ currentSearchState: t }) => {
|
|
113166
113158
|
const { t: e } = Ke(), { context: r, rows: o } = t, a = o.filter(
|
|
113167
113159
|
(c) => c.criterionKey !== null && c.value !== null
|
|
113168
113160
|
).map((c) => {
|
|
113169
113161
|
const l = r.criteria.find(
|
|
113170
113162
|
(i) => i.id === c.criterionKey
|
|
113171
113163
|
);
|
|
113172
|
-
return { key: c.rowId, text:
|
|
113164
|
+
return { key: c.rowId, text: pz0(c, l, e) };
|
|
113173
113165
|
});
|
|
113174
113166
|
return /* @__PURE__ */ q1(
|
|
113175
113167
|
"div",
|
|
@@ -113201,6 +113193,14 @@ const qH0 = (t, e) => t.filter(
|
|
|
113201
113193
|
]
|
|
113202
113194
|
}
|
|
113203
113195
|
);
|
|
113196
|
+
}, mz0 = "http://json-schema.org/draft-07/schema#", wz0 = "Common Search Widget Config Schema", gz0 = "Configuration for the common search widget, defining search criteria per context", vz0 = "array", Ez0 = 1, Mz0 = { $ref: "#/definitions/searchContextConfig" }, yz0 = { searchContextConfig: { type: "object", required: ["context", "translationKey", "requiredPrivileges", "url", "pageSize", "criteria", "resultFields"], additionalProperties: !1, properties: { context: { type: "string", enum: ["patient", "appointment", "patientProgram"], description: "The context this search configuration applies to" }, translationKey: { type: "string", minLength: 1, description: "i18n key for the tab/section label" }, requiredPrivileges: { type: "array", items: { type: "string" }, minItems: 1, uniqueItems: !0, description: "Privileges required to access this search context" }, locationAware: { type: "string", enum: ["loggedInLocation", "allowedLocation"], description: "Location scope applied when executing searches in this context" }, url: { type: "string", minLength: 1, description: "API endpoint URL for search results" }, pageSize: { type: "integer", minimum: 1, description: "Number of results per page" }, criteria: { type: "array", items: { $ref: "#/definitions/criterionConfig" }, minItems: 1, description: "Search criteria available in this context" }, resultFields: { type: "array", items: { $ref: "#/definitions/resultFieldConfig" }, minItems: 1, description: "Defines the columns shown in the results table after a successful search" }, actions: { type: "array", minItems: 1, items: { $ref: "#/definitions/actionConfig" }, description: "Actions available in this context. Optional at the context level, but required when any resultField references an action key. Each action key must be unique within the context." } } }, resultFieldConfig: { type: "object", required: ["translationKey", "expression"], additionalProperties: !1, properties: { translationKey: { type: "string", minLength: 1, description: "i18n key for the column header" }, expression: { type: "string", minLength: 1, description: "JSONata expression evaluated against each result item to extract the column value" }, enableSort: { type: "boolean", description: "When true, the column header is clickable to sort results client-side" }, sortOrder: { type: "string", enum: ["asc", "desc"], description: "Direction the results are sorted by this column before any user interaction" }, filterType: { type: "string", enum: ["text", "select", "dateRange", "numeric"], description: "When present, a filter control appears for this column" }, action: { type: "string", description: "Key of an action defined in the context's actions array. When the referenced action has type navigate, the cell renders as a link. If the user holds none of the action's required privileges, the cell renders as plain text. Referencing a key not present in the actions array is a config error and blocks the widget." }, transform: { type: "string", enum: ["formatDate", "formatTime", "formatDateTime", "formatAge", "formatGender", "formatCountry", "formatSearchResult"], description: "Name of a transform applied to the extracted value before display" } } }, criterionConfig: { type: "object", required: ["field", "translationKey", "input"], additionalProperties: !1, properties: { id: { type: "string", minLength: 1, description: "Human-readable identifier for this criterion, unique within its context. Referenced by other criteria's additionalCriteria list. When omitted, an identifier is auto-derived from field.key/keyType." }, field: { $ref: "#/definitions/fieldConfig" }, default: { type: "boolean", description: "Whether this criterion is shown by default in the UI" }, translationKey: { type: "string", minLength: 1, description: "i18n key for the criterion label" }, input: { $ref: "#/definitions/inputConfig" }, additionalCriteria: { type: "array", items: { type: "string", minLength: 1 }, minItems: 1, uniqueItems: !0, description: "IDs of other criteria in this context that qualify as a sufficient companion when this criterion would otherwise be the only one active. When set and no other active criterion's id appears in this list, the search is blocked." } } }, fieldConfig: { type: "object", required: ["key"], additionalProperties: !1, properties: { key: { type: "string", minLength: 1, description: "Field identifier used when constructing the search query" }, keyType: { type: "string", minLength: 1, description: "UUID or type qualifier for polymorphic fields such as identifier or personAttribute" } } }, inputConfig: { oneOf: [{ $ref: "#/definitions/textInput" }, { $ref: "#/definitions/dateInput" }, { $ref: "#/definitions/numericInput" }, { $ref: "#/definitions/optionsInput" }, { $ref: "#/definitions/lookupInput" }] }, textInput: { type: "object", required: ["kind", "placeholderTranslationKey"], additionalProperties: !1, properties: { kind: { type: "string", const: "text" }, placeholderTranslationKey: { type: "string", minLength: 1 }, regex: { type: "string", minLength: 1, description: "Optional regular expression. When provided, the value is validated against this pattern on search submission." } } }, dateInput: { type: "object", required: ["kind", "placeholderTranslationKey"], additionalProperties: !1, properties: { kind: { type: "string", const: "date" }, placeholderTranslationKey: { type: "string", minLength: 1 }, rangeAllowed: { type: "boolean", description: "When true, UI renders two inputs (From and To), each with its own value and comparator" } } }, numericInput: { type: "object", required: ["kind", "placeholderTranslationKey"], additionalProperties: !1, properties: { kind: { type: "string", const: "numeric" }, placeholderTranslationKey: { type: "string", minLength: 1 }, rangeAllowed: { type: "boolean", description: "When true, UI renders two inputs (From and To), each with its own value and comparator" } } }, optionsInput: { type: "object", required: ["kind", "placeholderTranslationKey", "options"], additionalProperties: !1, properties: { kind: { type: "string", const: "options" }, placeholderTranslationKey: { type: "string", minLength: 1 }, options: { type: "array", minItems: 1, items: { $ref: "#/definitions/optionItem" }, description: "Static list of selectable options" } } }, optionItem: { type: "object", required: ["translationKey", "value"], additionalProperties: !1, properties: { translationKey: { type: "string", minLength: 1 }, value: { type: "string", minLength: 1 } } }, lookupInput: { type: "object", required: ["kind", "placeholderTranslationKey", "lookup"], additionalProperties: !1, properties: { kind: { type: "string", const: "lookup" }, placeholderTranslationKey: { type: "string", minLength: 1 }, lookup: { $ref: "#/definitions/lookupConfig" } } }, lookupConfig: { type: "object", required: ["source"], additionalProperties: !1, properties: { source: { type: "string", minLength: 1, description: "Identifies the lookup source (e.g. appointmentService, concept)" }, prefetch: { type: "boolean", description: "Whether to load all options upfront rather than on user input" }, valueSet: { type: "string", description: "UUID of the concept value set to restrict lookup results" } } }, actionConfig: { oneOf: [{ $ref: "#/definitions/navigateAction" }] }, navigateAction: { type: "object", required: ["key", "type", "navigationURL"], additionalProperties: !0, properties: { key: { type: "string", description: "Unique identifier for this action within the context. Referenced by resultField entries via their action field." }, type: { type: "string", const: "navigate", description: "Renders the column cell as a link navigating to navigationURL." }, navigationURL: { type: "string", description: "URL template for navigation. Placeholders use {expression} syntax where the content must be a valid JSONata expression evaluated against the result row. For example, {uuid} resolves the uuid field; {patient.uuid} resolves a nested field." }, requiredPrivileges: { type: "array", items: { type: "string" }, description: "Privileges required to activate this action. Any one suffices. An empty array makes the action available to all users." } } } }, Vz0 = {
|
|
113197
|
+
$schema: mz0,
|
|
113198
|
+
title: wz0,
|
|
113199
|
+
description: gz0,
|
|
113200
|
+
type: vz0,
|
|
113201
|
+
minItems: Ez0,
|
|
113202
|
+
items: Mz0,
|
|
113203
|
+
definitions: yz0
|
|
113204
113204
|
}, Hz0 = ({ extensionParams: t }) => {
|
|
113205
113205
|
const { t: e } = Ke(), { addNotification: r } = lt(), o = t?.configUrl, [a, c] = z1(!1), [l] = z1(() => {
|
|
113206
113206
|
try {
|
|
@@ -113214,7 +113214,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
113214
113214
|
data: y
|
|
113215
113215
|
} = W2({
|
|
113216
113216
|
queryKey: ["commonSearchWidgetConfig", o],
|
|
113217
|
-
queryFn: () => gt2(o,
|
|
113217
|
+
queryFn: () => gt2(o, Vz0),
|
|
113218
113218
|
enabled: !!o
|
|
113219
113219
|
}), {
|
|
113220
113220
|
isLoading: w,
|
|
@@ -113336,7 +113336,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
113336
113336
|
testId: "common-search-criteria-accordion-test-id",
|
|
113337
113337
|
className: L2.searchCriteriaAccordionItem,
|
|
113338
113338
|
children: /* @__PURE__ */ n1(
|
|
113339
|
-
|
|
113339
|
+
uz0,
|
|
113340
113340
|
{
|
|
113341
113341
|
config: L,
|
|
113342
113342
|
location: l,
|
|
@@ -113350,7 +113350,7 @@ const qH0 = (t, e) => t.filter(
|
|
|
113350
113350
|
}
|
|
113351
113351
|
),
|
|
113352
113352
|
!a && i && /* @__PURE__ */ q1(Q2, { children: [
|
|
113353
|
-
/* @__PURE__ */ n1(
|
|
113353
|
+
/* @__PURE__ */ n1(fz0, { currentSearchState: i }),
|
|
113354
113354
|
/* @__PURE__ */ n1(
|
|
113355
113355
|
QH0,
|
|
113356
113356
|
{
|
|
@@ -113376,7 +113376,7 @@ Rr2({
|
|
|
113376
113376
|
key: "commonSearch",
|
|
113377
113377
|
component: Hz0
|
|
113378
113378
|
});
|
|
113379
|
-
I0(() => Promise.resolve().then(() => ph0)), I0(() => Promise.resolve().then(() => Ih0)), I0(() => Promise.resolve().then(() => Ep0)), I0(() => Promise.resolve().then(() => bp0)), I0(() => import("./DocumentsTable-
|
|
113379
|
+
I0(() => Promise.resolve().then(() => ph0)), I0(() => Promise.resolve().then(() => Ih0)), I0(() => Promise.resolve().then(() => Ep0)), I0(() => Promise.resolve().then(() => bp0)), I0(() => import("./DocumentsTable-Cz-E1n_9-ev_6HncJ.js")), I0(() => Promise.resolve().then(() => zv0)), I0(() => import("./FormsTable-D2iNj6MO-Cooe1uL_.js")), I0(() => Promise.resolve().then(() => gg0)), I0(() => import("./Observations-mnzr0Nxn-C8ffI22P.js")), I0(
|
|
113380
113380
|
() => Promise.resolve().then(() => pE0)
|
|
113381
113381
|
), I0(
|
|
113382
113382
|
() => Promise.resolve().then(() => Zw0)
|
|
@@ -204381,7 +204381,7 @@ var mjt = (t, e = !1) => {
|
|
|
204381
204381
|
const e = vd2(() => {
|
|
204382
204382
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e;
|
|
204383
204383
|
let d;
|
|
204384
|
-
return this.#l ? d = this.#l : (d = wd2(() => import("./LNWAZHJI-
|
|
204384
|
+
return this.#l ? d = this.#l : (d = wd2(() => import("./LNWAZHJI-CMWV8frw.js")), this.#l = d), Sd2(this.#h, this.#r), fd2(d, md2({
|
|
204385
204385
|
get queryFlavor() {
|
|
204386
204386
|
return r.#d;
|
|
204387
204387
|
},
|
|
@@ -204479,7 +204479,7 @@ var mjt = (t, e = !1) => {
|
|
|
204479
204479
|
const e = vd2(() => {
|
|
204480
204480
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e, [d] = this.#l;
|
|
204481
204481
|
let u;
|
|
204482
|
-
return this.#i ? u = this.#i : (u = wd2(() => import("./MWZ6AO7Z-
|
|
204482
|
+
return this.#i ? u = this.#i : (u = wd2(() => import("./MWZ6AO7Z-BPCEO6bV.js")), this.#i = u), Sd2(this.#h, this.#r), fd2(u, md2({
|
|
204483
204483
|
get queryFlavor() {
|
|
204484
204484
|
return r.#d;
|
|
204485
204485
|
},
|
|
@@ -204639,11 +204639,11 @@ const KIt = {
|
|
|
204639
204639
|
}), lBt = I0(
|
|
204640
204640
|
() => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
|
|
204641
204641
|
), iBt = I0(
|
|
204642
|
-
() => import("./index-
|
|
204642
|
+
() => import("./index-B0zxSHSO.js").then((t) => ({
|
|
204643
204643
|
default: t.default
|
|
204644
204644
|
}))
|
|
204645
204645
|
), sBt = I0(
|
|
204646
|
-
() => import("./index-
|
|
204646
|
+
() => import("./index-CXUQOc97.js").then((t) => ({
|
|
204647
204647
|
default: t.default
|
|
204648
204648
|
}))
|
|
204649
204649
|
), dBt = [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import { $ as f, a0 as P, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, C as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as U, ad as C, ae as F, af as Y, ag as x, ah as k, ai as $, e as oe, L as de, x as q, aj as ce, z as me, ak as Ae, al as Ie, am as ue, G as _e, H as Te, I as Le } from "./index-
|
|
2
|
+
import { $ as f, a0 as P, a1 as O, a2 as V, a3 as Z, a4 as ee, a5 as te, a6 as ie, C as ae, a7 as ne, u as Q, a8 as R, a9 as le, aa as re, ab as se, ac as U, ad as C, ae as F, af as Y, ag as x, ah as k, ai as $, e as oe, L as de, x as q, aj as ce, z as me, ak as Ae, al as Ie, am as ue, G as _e, H as Te, I as Le } from "./index-BnMAhwqo.js";
|
|
3
3
|
import { useState as g, useMemo as N, useEffect as h, useRef as ve, useCallback as E } from "react";
|
|
4
4
|
import { useQuery as D, useQueryClient as Ne } from "@tanstack/react-query";
|
|
5
5
|
const be = "Available for appointments", w = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", ye = () => {
|
package/dist/index.js
CHANGED