@bahmni/widgets 0.0.1-dev.356 → 0.0.1-dev.357

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 T, Fragment as Y } from "react/jsx-runtime";
2
- import { u as W, a as X, m as J, B as Z, N as x, q as ee, F as te } from "./index-CeWPoe2Y.js";
2
+ import { u as W, a as X, m as J, B as Z, N as x, q as ee, F as te } from "./index-CgrvtY9S.js";
3
3
  import { useQuery as ne } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  import { useTranslation as ae } from "react-i18next";
@@ -1,5 +1,5 @@
1
1
  import { jsx as i, jsxs as G, Fragment as be } from "react/jsx-runtime";
2
- import { u as ye, b as Ne, c as pe, W as Oe, G as Te, d as Ee, z as Fe, A as Ie, i as ve, e as Ae, f as _e, Y as x, N as Re, l as j, $ as K, B as Me, q as Q, T as Be, R as De, F as Ce, O as Le, C as Se } from "./index-CeWPoe2Y.js";
2
+ import { u as ye, b as Ne, c as pe, W as Oe, G as Te, d as Ee, z as Fe, A as Ie, i as ve, e as Ae, f as _e, Y as x, N as Re, l as j, $ as K, B as Me, q as Q, T as Be, R as De, F as Ce, O as Le, C as Se } from "./index-CgrvtY9S.js";
3
3
  import { useQueryClient as Ue, useQuery as T } from "@tanstack/react-query";
4
4
  import { useState as W, useMemo as d, useCallback as l } from "react";
5
5
  import { useTranslation as we } from "react-i18next";
@@ -1,5 +1,5 @@
1
1
  import { jsx as d, jsxs as N } from "react/jsx-runtime";
2
- import { g as K, Q as D, t as V, h as q, j as w, k, n as H, o as G, u as P, a as j, p as z, r as J, i as W, s as Y, v as X, w as Z, x, q as ee } from "./index-CeWPoe2Y.js";
2
+ import { g as K, Q as D, t as V, h as q, j as w, k, n as H, o as G, u as P, a as j, p as z, r as J, i as W, s as Y, v as X, w as Z, x, q as ee } from "./index-CgrvtY9S.js";
3
3
  import { useQueries as te, useQuery as se } from "@tanstack/react-query";
4
4
  import { useRef as oe, useEffect as C, useMemo as g } from "react";
5
5
  import { useTranslation as U } from "react-i18next";
@@ -39432,7 +39432,7 @@ function Ec({
39432
39432
  }, s), a));
39433
39433
  }
39434
39434
  const {
39435
- open: XKt,
39435
+ open: eGt,
39436
39436
  ...rdt
39437
39437
  } = zo.propTypes ?? {};
39438
39438
  Ec.propTypes = {
@@ -68409,7 +68409,7 @@ const oDe = ({
68409
68409
  container: Umt,
68410
68410
  accordion: Wmt,
68411
68411
  rows: qmt
68412
- }, eGt = ({
68412
+ }, rGt = ({
68413
68413
  title: t,
68414
68414
  rows: e,
68415
68415
  children: r,
@@ -71041,23 +71041,23 @@ g1.getAdapter = zDe.getAdapter;
71041
71041
  g1.HttpStatusCode = bd;
71042
71042
  g1.default = g1;
71043
71043
  const {
71044
- Axios: rGt,
71045
- AxiosError: nGt,
71046
- CanceledError: oGt,
71047
- isCancel: aGt,
71048
- CancelToken: iGt,
71049
- VERSION: sGt,
71050
- all: lGt,
71051
- Cancel: cGt,
71052
- isAxiosError: uGt,
71053
- spread: dGt,
71054
- toFormData: hGt,
71055
- AxiosHeaders: pGt,
71056
- HttpStatusCode: fGt,
71057
- formToJSON: mGt,
71058
- getAdapter: wGt,
71059
- mergeConfig: gGt,
71060
- create: vGt
71044
+ Axios: oGt,
71045
+ AxiosError: aGt,
71046
+ CanceledError: iGt,
71047
+ isCancel: sGt,
71048
+ CancelToken: lGt,
71049
+ VERSION: cGt,
71050
+ all: uGt,
71051
+ Cancel: dGt,
71052
+ isAxiosError: hGt,
71053
+ spread: pGt,
71054
+ toFormData: fGt,
71055
+ AxiosHeaders: mGt,
71056
+ HttpStatusCode: wGt,
71057
+ formToJSON: gGt,
71058
+ getAdapter: vGt,
71059
+ mergeConfig: EGt,
71060
+ create: yGt
71061
71061
  } = g1, pvt = (t) => typeof t == "object" && t !== null && "resourceType" in t && t.resourceType === "OperationOutcome", fvt = (t) => {
71062
71062
  if (!t.issue || !Array.isArray(t.issue))
71063
71063
  return null;
@@ -74592,7 +74592,7 @@ const vVt = () => {
74592
74592
  }
74593
74593
  };
74594
74594
  }, Ia = vVt(), EVt = (t, e) => `${H1}/concept?s=byFullySpecifiedName&name=${encodeURIComponent(t)}`, yVt = "SHORT", VVt = "FULLY_SPECIFIED";
74595
- async function EGt(t, e) {
74595
+ async function VGt(t, e) {
74596
74596
  const r = EVt(t), n = await xt(r);
74597
74597
  return !n.results || n.results.length === 0 ? null : n.results[0];
74598
74598
  }
@@ -79731,7 +79731,7 @@ async function kMt(t, e, r) {
79731
79731
  const n = vRe(t, e, r);
79732
79732
  return await xt(n);
79733
79733
  }
79734
- async function yGt(t, e) {
79734
+ async function HGt(t, e) {
79735
79735
  const r = vRe(t, e, void 0, !0);
79736
79736
  return await xt(r);
79737
79737
  }
@@ -79834,7 +79834,7 @@ const ERe = async () => {
79834
79834
  return e.map(
79835
79835
  (n) => XMt(n, r)
79836
79836
  );
79837
- }, VGt = async (t) => {
79837
+ }, MGt = async (t) => {
79838
79838
  const e = await fetch(RMt(t));
79839
79839
  if (!e.ok)
79840
79840
  throw new Error(
@@ -79868,7 +79868,7 @@ const ERe = async () => {
79868
79868
  schema: n,
79869
79869
  translations: u
79870
79870
  };
79871
- }, HGt = async (t, e, r) => {
79871
+ }, bGt = async (t, e, r) => {
79872
79872
  const n = IMt(t, r), a = await xt(n);
79873
79873
  return Array.isArray(a) ? a : [];
79874
79874
  }, ebt = H1 + "/bahmnicore/diseaseSummaryData?", tbt = async (t, e, r, n) => {
@@ -79977,7 +79977,7 @@ function pbt(t) {
79977
79977
  };
79978
79978
  });
79979
79979
  }
79980
- async function MGt(t, e, r = 10, n = 1) {
79980
+ async function xGt(t, e, r = 10, n = 1) {
79981
79981
  const a = (n - 1) * r, i = dbt(
79982
79982
  t,
79983
79983
  e,
@@ -80215,7 +80215,7 @@ async function Rbt(t) {
80215
80215
  const l = setTimeout(s, Cbt);
80216
80216
  a.focus(), a.print();
80217
80217
  }
80218
- const bGt = ({
80218
+ const AGt = ({
80219
80219
  printOptions: t,
80220
80220
  renderContext: e,
80221
80221
  renderData: r,
@@ -94319,7 +94319,7 @@ function Sh({
94319
94319
  }, s), a));
94320
94320
  }
94321
94321
  const {
94322
- open: xGt,
94322
+ open: _Gt,
94323
94323
  ...dSt
94324
94324
  } = wi.propTypes ?? {};
94325
94325
  Sh.propTypes = {
@@ -95082,7 +95082,7 @@ const lSe = () => {
95082
95082
  "useNotification must be used within a NotificationProvider"
95083
95083
  );
95084
95084
  return t;
95085
- }, AGt = () => {
95085
+ }, NGt = () => {
95086
95086
  const { addNotification: t } = ar();
95087
95087
  return be(() => {
95088
95088
  Ia.register((e) => {
@@ -95162,7 +95162,7 @@ const ESt = "DocumentUpload-module_container__rONO3", ySt = "DocumentUpload-modu
95162
95162
  }) => {
95163
95163
  const a = (n ?? "").toLowerCase();
95164
95164
  return a.includes("image") ? /* @__PURE__ */ R(aDe, { id: t, imageSrc: e, alt: r }) : a.includes("video") ? /* @__PURE__ */ R(sDe, { id: t, videoSrc: e, modalTitle: r }) : /* @__PURE__ */ R(iDe, { id: t, src: e, modalTitle: r });
95165
- }, DSt = (t) => t.startsWith("image/") || t.startsWith("video/") || t === "application/pdf", _Gt = ({
95165
+ }, DSt = (t) => t.startsWith("image/") || t.startsWith("video/") || t === "application/pdf", CGt = ({
95166
95166
  patientUuid: t,
95167
95167
  encounterTypeName: e,
95168
95168
  saveTarget: r,
@@ -95375,7 +95375,7 @@ function WSt(t, e) {
95375
95375
  ageDetails: USt(t.birthDate, e)
95376
95376
  };
95377
95377
  }
95378
- const NGt = () => {
95378
+ const zGt = () => {
95379
95379
  const { t } = dt(), e = mr(), r = g3(RSt), {
95380
95380
  data: n,
95381
95381
  isLoading: a,
@@ -99746,13 +99746,13 @@ function Dkt(t) {
99746
99746
  }
99747
99747
  const NSe = (t) => t ? t.extension?.find(
99748
99748
  (r) => r.url === oEt
99749
- )?.valueString : void 0, CGt = (t) => {
99749
+ )?.valueString : void 0, TGt = (t) => {
99750
99750
  const e = NSe(t);
99751
99751
  if (!e) return;
99752
99752
  const r = e.split("/")[0].split("^").pop()?.replace(/\.\d+$/, "");
99753
99753
  if (r)
99754
99754
  return r;
99755
- }, zGt = (t, e) => t?.date ? gt(t.date, e).formattedResult : e("DATE_ERROR_PARSE"), Fh = (t, e) => {
99755
+ }, OGt = (t, e) => t?.date ? gt(t.date, e).formattedResult : e("DATE_ERROR_PARSE"), Fh = (t, e) => {
99756
99756
  if (t.observationValue?.value == null)
99757
99757
  return "";
99758
99758
  const { value: r, unit: n, type: a } = t.observationValue;
@@ -99784,7 +99784,7 @@ const NSe = (t) => t ? t.extension?.find(
99784
99784
  return `${e} (<${s})`;
99785
99785
  }
99786
99786
  return e;
99787
- }, TGt = (t, e, r) => ({
99787
+ }, LGt = (t, e, r) => ({
99788
99788
  index: e,
99789
99789
  header: Rkt(t),
99790
99790
  value: Fh(t, r),
@@ -99818,7 +99818,7 @@ function CSe(t, e, r) {
99818
99818
  // conceptId is required to group the multiselect obs
99819
99819
  };
99820
99820
  }
99821
- function OGt(t) {
99821
+ function DGt(t) {
99822
99822
  const e = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set();
99823
99823
  t.entry?.forEach(({ resource: s }) => {
99824
99824
  s?.id && (s.resourceType === "Encounter" ? e.set(s.id, s) : s.resourceType === "Observation" && (r.set(s.id, s), s.hasMember?.forEach((l) => {
@@ -99837,7 +99837,7 @@ function OGt(t) {
99837
99837
  c.members ? i.push(c) : a.push(c);
99838
99838
  }), { observations: a, groupedObservations: i };
99839
99839
  }
99840
- function LGt(t) {
99840
+ function RGt(t) {
99841
99841
  const e = /* @__PURE__ */ new Map();
99842
99842
  return t.observations.forEach((r) => {
99843
99843
  if (!r.encounter?.id) return;
@@ -99863,7 +99863,7 @@ function LGt(t) {
99863
99863
  };
99864
99864
  });
99865
99865
  }
99866
- function DGt(t) {
99866
+ function SGt(t) {
99867
99867
  return [...t].sort((e, r) => {
99868
99868
  const n = e.encounterDetails?.date, a = r.encounterDetails?.date;
99869
99869
  return !n && !a ? 0 : n ? a ? new Date(a).getTime() - new Date(n).getTime() : -1 : 1;
@@ -101474,7 +101474,7 @@ const fPt = "SearchPatient-module_searchPatientContainer__uqWDm", mPt = "SearchP
101474
101474
  advanceInputWrapper: EPt,
101475
101475
  errorMessage: yPt,
101476
101476
  searchTypeDropdown: VPt
101477
- }, RGt = ({
101477
+ }, $Gt = ({
101478
101478
  buttonTitle: t,
101479
101479
  searchBarPlaceholder: e,
101480
101480
  patientSearch: r,
@@ -103266,7 +103266,7 @@ function njt(t, e) {
103266
103266
  const ojt = (t) => ["programs", t], ajt = async (t, e) => {
103267
103267
  const r = await abt(t);
103268
103268
  return njt(r, e);
103269
- }, SGt = ({
103269
+ }, IGt = ({
103270
103270
  programUUID: t,
103271
103271
  config: e
103272
103272
  }) => {
@@ -104722,7 +104722,7 @@ UUt.displayName = f$e;
104722
104722
  function Jh(t) {
104723
104723
  return t ? "open" : "closed";
104724
104724
  }
104725
- var m$e = "DialogTitleWarning", [$Gt, w$e] = mjt(m$e, {
104725
+ var m$e = "DialogTitleWarning", [ZGt, w$e] = mjt(m$e, {
104726
104726
  contentName: w2,
104727
104727
  titleName: Yh,
104728
104728
  docsSlug: "dialog"
@@ -105681,7 +105681,7 @@ const mqt = ({
105681
105681
  return /* @__PURE__ */ R(uSe.Provider, { value: l, children: t });
105682
105682
  };
105683
105683
  mqt.displayName = "UserPrivilegeProvider";
105684
- const IGt = {
105684
+ const kGt = {
105685
105685
  ENCOUNTER: ["Add Encounters"],
105686
105686
  ALLERGIES: ["Add Allergies"],
105687
105687
  EDIT_ALLERGIES: ["Edit Allergies"],
@@ -105706,7 +105706,7 @@ const gqt = "configProvider-module_errorState__l62qJ", vqt = "configProvider-mod
105706
105706
  errorStateTitle: vqt,
105707
105707
  errorStateBody: Eqt
105708
105708
  };
105709
- function ZGt(t) {
105709
+ function BGt(t) {
105710
105710
  const {
105711
105711
  context: e,
105712
105712
  queryKey: r,
@@ -105770,7 +105770,7 @@ function ZGt(t) {
105770
105770
  };
105771
105771
  return c.displayName = l, c;
105772
105772
  }
105773
- function kGt(t, e, r) {
105773
+ function PGt(t, e, r) {
105774
105774
  return () => {
105775
105775
  const n = Ht(t);
105776
105776
  if (!n)
@@ -105783,7 +105783,7 @@ const ep = [], yqt = (t) => {
105783
105783
  key: t.key,
105784
105784
  component: t.component
105785
105785
  });
105786
- }, BGt = (t) => ep.find((e) => e.key === t), PGt = () => {
105786
+ }, FGt = (t) => ep.find((e) => e.key === t), jGt = () => {
105787
105787
  ep.length = 0;
105788
105788
  };
105789
105789
  function Zs(t) {
@@ -109572,7 +109572,13 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109572
109572
  return !Number.isNaN(i) && !Number.isNaN(s) && i > s ? r : null;
109573
109573
  }
109574
109574
  return new Date(n) > new Date(a) ? r : null;
109575
- }, Kd = (t) => ({
109575
+ }, tKt = (t) => t.keyType ? `${t.key}:${t.keyType}` : t.key, rKt = (t, e) => t.filter((r) => Sn(e, r.requiredPrivileges)).map((r) => ({
109576
+ ...r,
109577
+ criteria: r.criteria.map((n) => ({
109578
+ ...n,
109579
+ id: tKt(n.field)
109580
+ }))
109581
+ })), Kd = (t) => ({
109576
109582
  rowId: Fqt(),
109577
109583
  criterionKey: t,
109578
109584
  value: null,
@@ -109580,18 +109586,18 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109580
109586
  rangeOrderError: null
109581
109587
  }), aCe = (t) => {
109582
109588
  const e = t.criteria.filter((r) => r.default);
109583
- return e.length > 0 ? e.map((r) => Kd(r.field.key)) : [Kd(t.criteria[0].field.key)];
109589
+ return e.length > 0 ? e.map((r) => Kd(r.id)) : [Kd(t.criteria[0].id)];
109584
109590
  }, N$e = (t, e) => new Set(
109585
109591
  t.filter(
109586
109592
  (r) => r.criterionKey !== null && r.rowId !== e
109587
109593
  ).map((r) => r.criterionKey)
109588
- ), tKt = (t, e, r) => {
109594
+ ), nKt = (t, e, r) => {
109589
109595
  const n = N$e(e, r);
109590
- return t.filter((a) => !n.has(a.field.key));
109591
- }, rKt = (t, e) => {
109596
+ return t.filter((a) => !n.has(a.id));
109597
+ }, oKt = (t, e) => {
109592
109598
  const r = N$e(e);
109593
- return t.filter((n) => !r.has(n.field.key));
109594
- }, iCe = (t, e, r) => t.map((n) => n.rowId === e ? { ...n, ...r(n) } : n), nKt = (t, e, r, n) => {
109599
+ return t.filter((n) => !r.has(n.id));
109600
+ }, iCe = (t, e, r) => t.map((n) => n.rowId === e ? { ...n, ...r(n) } : n), aKt = (t, e, r, n) => {
109595
109601
  switch (e.input.kind) {
109596
109602
  case "text":
109597
109603
  return {
@@ -109617,7 +109623,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109617
109623
  default:
109618
109624
  return { validationError: null, rangeOrderError: null };
109619
109625
  }
109620
- }, oKt = ({ field: t, value: e }) => Ei(e) ? t.keyType ? {
109626
+ }, iKt = ({ field: t, value: e }) => Ei(e) ? t.keyType ? {
109621
109627
  operator: "AND",
109622
109628
  conditions: [
109623
109629
  {
@@ -109637,7 +109643,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109637
109643
  { field: t.key, comparator: "gt", value: e.from.value },
109638
109644
  { field: t.key, comparator: "lt", value: e.to.value }
109639
109645
  ]
109640
- }, Hu = (t) => JZt(new Date(t), Wqt), aKt = (t) => Ei(t) ? { value: Hu(t.value) } : {
109646
+ }, Hu = (t) => JZt(new Date(t), Wqt), sKt = (t) => Ei(t) ? { value: Hu(t.value) } : {
109641
109647
  from: {
109642
109648
  ...t.from,
109643
109649
  value: t.from.value ? Hu(t.from.value) : null
@@ -109648,24 +109654,28 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109648
109654
  value: t.to.value ? Hu(t.to.value) : null
109649
109655
  }
109650
109656
  }
109651
- }, iKt = (t, e) => t.filter(
109657
+ }, lKt = (t, e) => t.filter(
109652
109658
  (r) => r.criterionKey !== null && r.value !== null
109653
- ).map((r) => {
109654
- const n = e.find((i) => i.field.key === r.criterionKey), a = n.input.kind === "date" ? aKt(r.value) : r.value;
109655
- return { field: n.field, value: a };
109656
- }), sKt = (t, e, r) => ({
109659
+ ).flatMap((r) => {
109660
+ const n = e.find((i) => i.id === r.criterionKey);
109661
+ if (!n) return [];
109662
+ const a = n.input.kind === "date" ? sKt(r.value) : r.value;
109663
+ return [{ field: n.field, value: a }];
109664
+ }), cKt = (t, e, r) => ({
109657
109665
  entity: e,
109658
109666
  criteria: {
109659
109667
  operator: "AND",
109660
109668
  conditions: [
109661
- ...t.map(oKt),
109669
+ ...t.map(iKt),
109662
109670
  { field: Uqt, comparator: "eq", value: r }
109663
109671
  ]
109664
109672
  }
109665
- }), lKt = (t, e, r, n, a, i) => t.map((s) => {
109673
+ }), uKt = (t, e, r, n, a, i) => t.map((s) => {
109666
109674
  if (!s.criterionKey)
109667
109675
  return { ...s, validationError: r, rangeOrderError: null };
109668
- const l = e.find((m) => m.field.key === s.criterionKey), c = Xqt(
109676
+ const l = e.find((m) => m.id === s.criterionKey);
109677
+ if (!l) return s;
109678
+ const c = Xqt(
109669
109679
  s.value,
109670
109680
  l.input,
109671
109681
  n
@@ -109676,14 +109686,14 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109676
109686
  validationError: c,
109677
109687
  rangeOrderError: null
109678
109688
  };
109679
- const { validationError: u, rangeOrderError: d } = nKt(
109689
+ const { validationError: u, rangeOrderError: d } = aKt(
109680
109690
  s.value,
109681
109691
  l,
109682
109692
  a,
109683
109693
  i
109684
109694
  );
109685
109695
  return { ...s, validationError: u, rangeOrderError: d };
109686
- }), cKt = async (t, e, r) => {
109696
+ }), dKt = async (t, e, r) => {
109687
109697
  const n = e.map(({ id: a, field: i }) => ({
109688
109698
  key: a,
109689
109699
  expr: x$e(i.expression),
@@ -109705,7 +109715,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109705
109715
  return i;
109706
109716
  })
109707
109717
  );
109708
- }, uKt = ({ resultFields: t, results: e }) => {
109718
+ }, hKt = ({ resultFields: t, results: e }) => {
109709
109719
  const { t: r } = dt(), [n, a] = ve([]), [i, s] = ve(null), l = Ze(
109710
109720
  () => t.map((m) => ({ id: Ra(), field: m })),
109711
109721
  [t]
@@ -109719,7 +109729,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109719
109729
  return null;
109720
109730
  }, [t, r]);
109721
109731
  be(() => {
109722
- c || (s(null), cKt(e, l, r).then(a).catch(() => s(r("COMMON_SEARCH_EVALUATION_ERROR"))));
109732
+ c || (s(null), dKt(e, l, r).then(a).catch(() => s(r("COMMON_SEARCH_EVALUATION_ERROR"))));
109723
109733
  }, [e, l, c, r]);
109724
109734
  const u = c ?? i, d = Ze(
109725
109735
  () => l.map(({ id: m, field: w }) => ({
@@ -109746,15 +109756,15 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109746
109756
  className: t1.dataTable
109747
109757
  }
109748
109758
  );
109749
- }, dKt = "http://json-schema.org/draft-07/schema#", hKt = "Common Search Widget Config Schema", pKt = "Configuration for the common search widget, defining search criteria per context", fKt = "array", mKt = 1, wKt = { $ref: "#/definitions/searchContextConfig" }, gKt = { searchContextConfig: { type: "object", required: ["context", "translationKey", "requiredPrivileges", "locationAware", "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" } } }, 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" }, 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: { 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" } } }, 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" } } } }, vKt = {
109750
- $schema: dKt,
109751
- title: hKt,
109752
- description: pKt,
109753
- type: fKt,
109754
- minItems: mKt,
109755
- items: wKt,
109756
- definitions: gKt
109757
- }, EKt = ({
109759
+ }, pKt = "http://json-schema.org/draft-07/schema#", fKt = "Common Search Widget Config Schema", mKt = "Configuration for the common search widget, defining search criteria per context", wKt = "array", gKt = 1, vKt = { $ref: "#/definitions/searchContextConfig" }, EKt = { searchContextConfig: { type: "object", required: ["context", "translationKey", "requiredPrivileges", "locationAware", "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" } } }, 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" }, 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: { 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" } } }, 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" } } } }, yKt = {
109760
+ $schema: pKt,
109761
+ title: fKt,
109762
+ description: mKt,
109763
+ type: wKt,
109764
+ minItems: gKt,
109765
+ items: vKt,
109766
+ definitions: EKt
109767
+ }, VKt = ({
109758
109768
  input: t,
109759
109769
  value: e,
109760
109770
  onChange: r,
@@ -109863,7 +109873,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109863
109873
  )
109864
109874
  }
109865
109875
  ) });
109866
- }, yKt = ({
109876
+ }, HKt = ({
109867
109877
  input: t,
109868
109878
  value: e,
109869
109879
  onChange: r,
@@ -109892,7 +109902,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109892
109902
  )
109893
109903
  }
109894
109904
  );
109895
- }, Mu = (t) => t == null || t === "" ? null : String(t), VKt = ({
109905
+ }, Mu = (t) => t == null || t === "" ? null : String(t), MKt = ({
109896
109906
  input: t,
109897
109907
  value: e,
109898
109908
  onChange: r,
@@ -109993,7 +110003,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
109993
110003
  )
109994
110004
  }
109995
110005
  );
109996
- }, HKt = ({
110006
+ }, bKt = ({
109997
110007
  input: t,
109998
110008
  value: e,
109999
110009
  onChange: r,
@@ -110023,7 +110033,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110023
110033
  )
110024
110034
  }
110025
110035
  );
110026
- }, MKt = ({
110036
+ }, xKt = ({
110027
110037
  input: t,
110028
110038
  value: e,
110029
110039
  onChange: r,
@@ -110046,7 +110056,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110046
110056
  invalidText: n ?? void 0
110047
110057
  }
110048
110058
  ) });
110049
- }, bKt = ({
110059
+ }, AKt = ({
110050
110060
  input: t,
110051
110061
  value: e,
110052
110062
  onChange: r,
@@ -110056,7 +110066,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110056
110066
  switch (t.kind) {
110057
110067
  case "text":
110058
110068
  return /* @__PURE__ */ R(
110059
- MKt,
110069
+ xKt,
110060
110070
  {
110061
110071
  input: t,
110062
110072
  value: e,
@@ -110066,7 +110076,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110066
110076
  );
110067
110077
  case "numeric":
110068
110078
  return /* @__PURE__ */ R(
110069
- VKt,
110079
+ MKt,
110070
110080
  {
110071
110081
  input: t,
110072
110082
  value: e,
@@ -110077,7 +110087,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110077
110087
  );
110078
110088
  case "date":
110079
110089
  return /* @__PURE__ */ R(
110080
- EKt,
110090
+ VKt,
110081
110091
  {
110082
110092
  input: t,
110083
110093
  value: e,
@@ -110088,7 +110098,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110088
110098
  );
110089
110099
  case "options":
110090
110100
  return /* @__PURE__ */ R(
110091
- HKt,
110101
+ bKt,
110092
110102
  {
110093
110103
  input: t,
110094
110104
  value: e,
@@ -110098,7 +110108,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110098
110108
  );
110099
110109
  case "lookup":
110100
110110
  return /* @__PURE__ */ R(
110101
- yKt,
110111
+ HKt,
110102
110112
  {
110103
110113
  input: t,
110104
110114
  value: e,
@@ -110107,7 +110117,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110107
110117
  }
110108
110118
  );
110109
110119
  }
110110
- }, xKt = ({
110120
+ }, _Kt = ({
110111
110121
  row: t,
110112
110122
  availableCriteria: e,
110113
110123
  selectedCriterion: r,
@@ -110135,14 +110145,14 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110135
110145
  onChange: ({
110136
110146
  selectedItem: c
110137
110147
  }) => {
110138
- n(t.rowId, c.field.key);
110148
+ n(t.rowId, c.id);
110139
110149
  },
110140
110150
  invalid: !!l,
110141
110151
  invalidText: l
110142
110152
  }
110143
110153
  ) }),
110144
110154
  /* @__PURE__ */ R("div", { className: t1.criterionInput, children: r ? /* @__PURE__ */ R(
110145
- bKt,
110155
+ AKt,
110146
110156
  {
110147
110157
  input: r.input,
110148
110158
  value: t.value,
@@ -110165,7 +110175,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110165
110175
  ]
110166
110176
  }
110167
110177
  );
110168
- }, AKt = ({
110178
+ }, NKt = ({
110169
110179
  config: t,
110170
110180
  location: e,
110171
110181
  onSearch: r,
@@ -110202,12 +110212,12 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110202
110212
  );
110203
110213
  }, H = (v) => {
110204
110214
  d((E) => E.filter((x) => x.rowId !== v));
110205
- }, y = rKt(
110215
+ }, y = oKt(
110206
110216
  c.criteria,
110207
110217
  u
110208
110218
  ), M = y.length > 0, b = () => {
110209
- const v = c.criteria.find((x) => x.default)?.field.key ?? null, E = y.some((x) => x.field.key === v) ? v : null;
110210
- d((x) => [...x, Kd(E)]);
110219
+ const v = c.criteria.find((V) => V.default), E = v ? v.id : null, x = y.some((V) => V.id === E) ? E : null;
110220
+ d((V) => [...V, Kd(x)]);
110211
110221
  };
110212
110222
  return /* @__PURE__ */ _e(
110213
110223
  "div",
@@ -110245,17 +110255,15 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110245
110255
  }
110246
110256
  ) }),
110247
110257
  u.map((v) => /* @__PURE__ */ R("div", { className: t1.fullWidthCol, children: /* @__PURE__ */ R(
110248
- xKt,
110258
+ _Kt,
110249
110259
  {
110250
110260
  row: v,
110251
- availableCriteria: tKt(
110261
+ availableCriteria: nKt(
110252
110262
  c.criteria,
110253
110263
  u,
110254
110264
  v.rowId
110255
110265
  ),
110256
- selectedCriterion: c.criteria.find(
110257
- (E) => E.field.key === v.criterionKey
110258
- ) ?? null,
110266
+ selectedCriterion: c.criteria.find((E) => E.id === v.criterionKey) ?? null,
110259
110267
  onCriterionChange: w,
110260
110268
  onValueChange: g,
110261
110269
  onRemove: H
@@ -110297,7 +110305,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110297
110305
  ]
110298
110306
  }
110299
110307
  );
110300
- }, _Kt = (t, e, r) => {
110308
+ }, CKt = (t, e, r) => {
110301
110309
  if ("value" in t) {
110302
110310
  if (e.kind === "options") {
110303
110311
  const a = e.options.find((i) => i.value === t.value);
@@ -110313,7 +110321,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110313
110321
  }
110314
110322
  const n = t.from.value;
110315
110323
  return t.to?.value ? r("COMMON_SEARCH_CRITERIA_TAG_RANGE", { from: n, to: t.to.value }) : n;
110316
- }, NKt = (t, e, r) => `${r(e.translationKey)}: ${_Kt(t.value, e.input, r)}`, CKt = ({
110324
+ }, zKt = (t, e, r) => `${r(e.translationKey)}: ${CKt(t.value, e.input, r)}`, TKt = ({
110317
110325
  currentSearchState: t,
110318
110326
  onModifySearch: e
110319
110327
  }) => {
@@ -110321,9 +110329,9 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110321
110329
  (s) => s.criterionKey !== null && s.value !== null
110322
110330
  ).map((s) => {
110323
110331
  const l = n.criteria.find(
110324
- (c) => c.field.key === s.criterionKey
110332
+ (c) => c.id === s.criterionKey
110325
110333
  );
110326
- return { key: s.rowId, text: NKt(s, l, r) };
110334
+ return { key: s.rowId, text: zKt(s, l, r) };
110327
110335
  });
110328
110336
  return /* @__PURE__ */ _e(
110329
110337
  "div",
@@ -110373,7 +110381,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110373
110381
  ]
110374
110382
  }
110375
110383
  );
110376
- }, zKt = ({ extensionParams: t }) => {
110384
+ }, OKt = ({ extensionParams: t }) => {
110377
110385
  const { t: e } = dt(), { addNotification: r } = ar(), n = t?.configUrl, [a, i] = ve(!1), [s] = ve(() => {
110378
110386
  try {
110379
110387
  return Zo();
@@ -110386,7 +110394,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110386
110394
  data: w
110387
110395
  } = Ut({
110388
110396
  queryKey: ["commonSearchWidgetConfig", n],
110389
- queryFn: () => TMt(n, vKt),
110397
+ queryFn: () => TMt(n, yKt),
110390
110398
  enabled: !!n
110391
110399
  }), {
110392
110400
  isLoading: g,
@@ -110397,7 +110405,7 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110397
110405
  queryFn: ERe,
110398
110406
  enabled: !!w
110399
110407
  }), M = d || g, b = m ?? H, v = (V, A) => {
110400
- const N = lKt(
110408
+ const N = uKt(
110401
110409
  V,
110402
110410
  A.criteria,
110403
110411
  e("COMMON_SEARCH_CRITERION_REQUIRED"),
@@ -110412,8 +110420,8 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110412
110420
  results: []
110413
110421
  }), i(!0), Gr(
110414
110422
  A.url,
110415
- sKt(
110416
- iKt(N, A.criteria),
110423
+ cKt(
110424
+ lKt(N, A.criteria),
110417
110425
  A.context,
110418
110426
  s.uuid
110419
110427
  )
@@ -110471,8 +110479,9 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110471
110479
  className: t1.fullWidth
110472
110480
  }
110473
110481
  );
110474
- const x = w.filter(
110475
- (V) => Sn(y ?? null, V.requiredPrivileges)
110482
+ const x = rKt(
110483
+ w,
110484
+ y ?? null
110476
110485
  );
110477
110486
  return x.length === 0 ? /* @__PURE__ */ R(
110478
110487
  _4,
@@ -110493,21 +110502,21 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110493
110502
  children: [
110494
110503
  !a && l ? /* @__PURE__ */ _e(p1, { children: [
110495
110504
  /* @__PURE__ */ R(
110496
- CKt,
110505
+ TKt,
110497
110506
  {
110498
110507
  currentSearchState: l,
110499
110508
  onModifySearch: E
110500
110509
  }
110501
110510
  ),
110502
110511
  /* @__PURE__ */ R(
110503
- uKt,
110512
+ hKt,
110504
110513
  {
110505
110514
  resultFields: l.resultFields,
110506
110515
  results: l.results
110507
110516
  }
110508
110517
  )
110509
110518
  ] }) : /* @__PURE__ */ R(
110510
- AKt,
110519
+ NKt,
110511
110520
  {
110512
110521
  config: x,
110513
110522
  location: s,
@@ -110530,9 +110539,9 @@ const Uqt = "location.uuid", Wqt = "yyyy-MM-dd'T'HH:mm:ss.SSSxx", qqt = ".kind",
110530
110539
  };
110531
110540
  yqt({
110532
110541
  key: "commonSearch",
110533
- component: zKt
110542
+ component: OKt
110534
110543
  });
110535
- const TKt = [
110544
+ const LKt = [
110536
110545
  {
110537
110546
  type: "allergies",
110538
110547
  component: ir(() => Promise.resolve().then(() => u$t))
@@ -110551,7 +110560,7 @@ const TKt = [
110551
110560
  },
110552
110561
  {
110553
110562
  type: "patientDocuments",
110554
- component: ir(() => import("./DocumentsTable-C1wLctnQ.js"))
110563
+ component: ir(() => import("./DocumentsTable-D21hxYZW.js"))
110555
110564
  },
110556
110565
  {
110557
110566
  type: "flowSheet",
@@ -110559,7 +110568,7 @@ const TKt = [
110559
110568
  },
110560
110569
  {
110561
110570
  type: "forms",
110562
- component: ir(() => import("./FormsTable-B7uQTHdZ.js"))
110571
+ component: ir(() => import("./FormsTable-D-0kKMtT.js"))
110563
110572
  },
110564
110573
  {
110565
110574
  type: "labOrders",
@@ -110567,7 +110576,7 @@ const TKt = [
110567
110576
  },
110568
110577
  {
110569
110578
  type: "observations",
110570
- component: ir(() => import("./Observations-CioFAmqI.js"))
110579
+ component: ir(() => import("./Observations-BH3Rnq0H.js"))
110571
110580
  },
110572
110581
  {
110573
110582
  type: "ordersControl",
@@ -110608,7 +110617,7 @@ class qr {
110608
110617
  return qr.instance || (qr.instance = new qr()), qr.instance;
110609
110618
  }
110610
110619
  registerBuiltInWidgets() {
110611
- TKt.forEach((e) => {
110620
+ LKt.forEach((e) => {
110612
110621
  this.registry.set(e.type, e);
110613
110622
  });
110614
110623
  }
@@ -110641,31 +110650,31 @@ class qr {
110641
110650
  this.registry.clear(), this.registerBuiltInWidgets();
110642
110651
  }
110643
110652
  }
110644
- const FGt = (t) => {
110653
+ const UGt = (t) => {
110645
110654
  qr.getInstance().register(t);
110646
- }, jGt = (t) => qr.getInstance().get(t), UGt = (t) => qr.getInstance().getConfig(t), WGt = (t) => qr.getInstance().has(t), qGt = () => qr.getInstance().getAll(), KGt = () => qr.getInstance().getAllConfigs(), GGt = () => {
110655
+ }, WGt = (t) => qr.getInstance().get(t), qGt = (t) => qr.getInstance().getConfig(t), KGt = (t) => qr.getInstance().has(t), GGt = () => qr.getInstance().getAll(), YGt = () => qr.getInstance().getAllConfigs(), JGt = () => {
110647
110656
  qr.getInstance().reset();
110648
- }, OKt = {
110657
+ }, DKt = {
110649
110658
  id: "user-logout-global-action",
110650
110659
  label: "USER_LOGOUT_GLOBAL_ACTION",
110651
110660
  onClick: DMt,
110652
110661
  priority: 9999
110653
- }, LKt = (t) => {
110654
- t.registerAction(OKt);
110655
- }, C$e = R1(void 0), DKt = () => {
110662
+ }, RKt = (t) => {
110663
+ t.registerAction(DKt);
110664
+ }, C$e = R1(void 0), SKt = () => {
110656
110665
  const t = Ht(C$e);
110657
110666
  if (t === void 0)
110658
110667
  throw new Error(
110659
110668
  "useUserActionRegistry must be used within UserActionProvider"
110660
110669
  );
110661
110670
  return t;
110662
- }, RKt = "UserGlobalAction-module_container__XrGRb", SKt = "UserGlobalAction-module_menu__4A9xa", sCe = {
110663
- container: RKt,
110664
- menu: SKt
110665
- }, $Kt = () => {
110666
- const { t } = dt(), { userPrivileges: e } = x2(), [r, n] = ve(!1), a = DKt(), { getActions: i, version: s } = a, l = Ae(!1);
110671
+ }, $Kt = "UserGlobalAction-module_container__XrGRb", IKt = "UserGlobalAction-module_menu__4A9xa", sCe = {
110672
+ container: $Kt,
110673
+ menu: IKt
110674
+ }, ZKt = () => {
110675
+ const { t } = dt(), { userPrivileges: e } = x2(), [r, n] = ve(!1), a = SKt(), { getActions: i, version: s } = a, l = Ae(!1);
110667
110676
  be(() => {
110668
- l.current || (LKt(a), l.current = !0);
110677
+ l.current || (RKt(a), l.current = !0);
110669
110678
  }, [a]);
110670
110679
  const c = Ze(() => i().filter(
110671
110680
  (u) => !u.requiredPrivilege || u.requiredPrivilege.every(
@@ -110730,19 +110739,19 @@ const FGt = (t) => {
110730
110739
  }
110731
110740
  );
110732
110741
  };
110733
- $Kt.displayName = "UserGlobalAction";
110734
- const IKt = (t) => {
110742
+ ZKt.displayName = "UserGlobalAction";
110743
+ const kKt = (t) => {
110735
110744
  if (!t.id || typeof t.id != "string")
110736
110745
  throw new Error("Action id must be a non-empty string");
110737
110746
  if (!t.label || typeof t.label != "string")
110738
110747
  throw new Error("Action label must be a non-empty string");
110739
110748
  if (typeof t.onClick != "function")
110740
110749
  throw new TypeError("Action onClick must be a function");
110741
- }, ZKt = ({
110750
+ }, BKt = ({
110742
110751
  children: t
110743
110752
  }) => {
110744
110753
  const e = Ae(/* @__PURE__ */ new Map()), [r, n] = ve(0), a = ke((u) => {
110745
- IKt(u), e.current.get(u.id) !== u && (e.current.set(u.id, u), n((m) => m + 1));
110754
+ kKt(u), e.current.get(u.id) !== u && (e.current.set(u.id, u), n((m) => m + 1));
110746
110755
  }, []), i = ke((u) => {
110747
110756
  e.current.delete(u), n((d) => d + 1);
110748
110757
  }, []), s = ke(() => Array.from(e.current.values()).sort(
@@ -110761,13 +110770,13 @@ const IKt = (t) => {
110761
110770
  );
110762
110771
  return /* @__PURE__ */ R(C$e.Provider, { value: c, children: t });
110763
110772
  };
110764
- ZKt.displayName = "UserActionProvider";
110765
- const z$e = o.createContext(void 0), kKt = () => {
110773
+ BKt.displayName = "UserActionProvider";
110774
+ const z$e = o.createContext(void 0), PKt = () => {
110766
110775
  const t = o.useContext(z$e);
110767
110776
  if (!t)
110768
110777
  throw new Error("useLocation must be used within LocationProvider");
110769
110778
  return t;
110770
- }, YGt = ({
110779
+ }, XGt = ({
110771
110780
  children: t
110772
110781
  }) => {
110773
110782
  const [e, r] = ve(null), [n, a] = ve(
@@ -110827,13 +110836,13 @@ const z$e = o.createContext(void 0), kKt = () => {
110827
110836
  [e, n, i, l, u]
110828
110837
  );
110829
110838
  return /* @__PURE__ */ R(z$e.Provider, { value: w, children: t });
110830
- }, BKt = "LocationSelector-module_dropdownWrapper__EGQSN", PKt = "LocationSelector-module_skeleton__5QGfl", FKt = "LocationSelector-module_error__7K-5g", jKt = "LocationSelector-module_noLocation__mrBOk", ks = {
110831
- dropdownWrapper: BKt,
110832
- skeleton: PKt,
110833
- error: FKt,
110834
- noLocation: jKt
110835
- }, JGt = () => {
110836
- const { t } = dt(), { location: e, setLocation: r, availableLocations: n, loading: a, error: i } = kKt(), s = (c) => {
110839
+ }, FKt = "LocationSelector-module_dropdownWrapper__EGQSN", jKt = "LocationSelector-module_skeleton__5QGfl", UKt = "LocationSelector-module_error__7K-5g", WKt = "LocationSelector-module_noLocation__mrBOk", ks = {
110840
+ dropdownWrapper: FKt,
110841
+ skeleton: jKt,
110842
+ error: UKt,
110843
+ noLocation: WKt
110844
+ }, QGt = () => {
110845
+ const { t } = dt(), { location: e, setLocation: r, availableLocations: n, loading: a, error: i } = PKt(), s = (c) => {
110837
110846
  !c || c.uuid === e?.uuid || r(c);
110838
110847
  };
110839
110848
  if (a)
@@ -110863,11 +110872,11 @@ export {
110863
110872
  cc as $,
110864
110873
  BMt as A,
110865
110874
  to as B,
110866
- IGt as C,
110867
- bGt as D,
110868
- _Gt as E,
110875
+ kGt as C,
110876
+ AGt as D,
110877
+ CGt as E,
110869
110878
  dr as F,
110870
- HGt as G,
110879
+ bGt as G,
110871
110880
  LSt as H,
110872
110881
  c$t as I,
110873
110882
  S$t as J,
@@ -110876,15 +110885,15 @@ export {
110876
110885
  Vkt as M,
110877
110886
  gt as N,
110878
110887
  Wh as O,
110879
- NGt as P,
110880
- eGt as Q,
110888
+ zGt as P,
110889
+ rGt as Q,
110881
110890
  ii as R,
110882
110891
  zBt as S,
110883
110892
  ai as T,
110884
110893
  zSe as U,
110885
110894
  lPt as V,
110886
110895
  hi as W,
110887
- RGt as X,
110896
+ $Gt as X,
110888
110897
  or as Y,
110889
110898
  RPt as Z,
110890
110899
  EFt as _,
@@ -110892,11 +110901,11 @@ export {
110892
110901
  $Se as a0,
110893
110902
  _Ft as a1,
110894
110903
  qFt as a2,
110895
- SGt as a3,
110904
+ IGt as a3,
110896
110905
  fqt as a4,
110897
110906
  sqt as a5,
110898
110907
  vSt as a6,
110899
- AGt as a7,
110908
+ NGt as a7,
110900
110909
  lqt as a8,
110901
110910
  mqt as a9,
110902
110911
  RSt as aa,
@@ -110904,49 +110913,49 @@ export {
110904
110913
  gSt as ac,
110905
110914
  lSe as ad,
110906
110915
  sSe as ae,
110907
- ZGt as af,
110908
- kGt as ag,
110916
+ BGt as af,
110917
+ PGt as ag,
110909
110918
  yqt as ah,
110910
- BGt as ai,
110911
- PGt as aj,
110912
- zKt as ak,
110913
- FGt as al,
110914
- jGt as am,
110915
- UGt as an,
110916
- WGt as ao,
110917
- qGt as ap,
110918
- KGt as aq,
110919
- GGt as ar,
110920
- $Kt as as,
110921
- ZKt as at,
110922
- DKt as au,
110919
+ FGt as ai,
110920
+ jGt as aj,
110921
+ OKt as ak,
110922
+ UGt as al,
110923
+ WGt as am,
110924
+ qGt as an,
110925
+ KGt as ao,
110926
+ GGt as ap,
110927
+ YGt as aq,
110928
+ JGt as ar,
110929
+ ZKt as as,
110930
+ BKt as at,
110931
+ SKt as au,
110923
110932
  z$e as av,
110924
- kKt as aw,
110925
- YGt as ax,
110926
- JGt as ay,
110933
+ PKt as aw,
110934
+ XGt as ax,
110935
+ QGt as ay,
110927
110936
  g3 as b,
110928
110937
  x2 as c,
110929
110938
  QMt as d,
110930
110939
  NSe as e,
110931
- CGt as f,
110932
- zGt as g,
110940
+ TGt as f,
110941
+ OGt as g,
110933
110942
  p6e as h,
110934
110943
  d0 as i,
110935
110944
  Oft as j,
110936
110945
  aDe as k,
110937
110946
  H2 as l,
110938
- MGt as m,
110947
+ xGt as m,
110939
110948
  sDe as n,
110940
110949
  iDe as o,
110941
- EGt as p,
110950
+ VGt as p,
110942
110951
  er as q,
110943
- yGt as r,
110944
- OGt as s,
110945
- TGt as t,
110952
+ HGt as r,
110953
+ DGt as s,
110954
+ LGt as t,
110946
110955
  mr as u,
110947
- LGt as v,
110948
- DGt as w,
110956
+ RGt as v,
110957
+ SGt as w,
110949
110958
  Fc as x,
110950
110959
  fwt as y,
110951
- VGt as z
110960
+ MGt as z
110952
110961
  };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { ae as o, ac as r, I as n, ab as g, J as c, C as l, a4 as d, ak as P, K as m, y as v, L as u, D as T, E as C, aa as b, _ as A, a2 as p, V as I, av as S, ax as f, ay as W, M as D, a6 as L, a7 as R, O as U, P as y, a1 as h, a3 as E, U as N, S as x, X as O, a0 as _, at as G, as as H, a9 as V, Z as k, aj as M, ag as q, af as w, f as F, aq as j, ap as z, ai as B, am as J, an as K, ao as X, ah as Z, al as Q, H as Y, ar as $, ad as aa, a5 as ea, a8 as sa, b as ta, aw as ia, a as oa, u as ra, au as na, c as ga } from "./index-CeWPoe2Y.js";
1
+ import { ae as o, ac as r, I as n, ab as g, J as c, C as l, a4 as d, ak as P, K as m, y as v, L as u, D as T, E as C, aa as b, _ as A, a2 as p, V as I, av as S, ax as f, ay as W, M as D, a6 as L, a7 as R, O as U, P as y, a1 as h, a3 as E, U as N, S as x, X as O, a0 as _, at as G, as as H, a9 as V, Z as k, aj as M, ag as q, af as w, f as F, aq as j, ap as z, ai as B, am as J, an as K, ao as X, ah as Z, al as Q, H as Y, ar as $, ad as aa, a5 as ea, a8 as sa, b as ta, aw as ia, a as oa, u as ra, au as na, c as ga } from "./index-CgrvtY9S.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "@tanstack/react-query";
@@ -1 +1 @@
1
- {"version":3,"file":"CommonSearchWidget.d.ts","sourceRoot":"","sources":["../../../src/search/commonSearch/CommonSearchWidget.tsx"],"names":[],"mappings":"AAkBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAmB9C,QAAA,MAAM,kBAAkB,GAAI,qBAAqB,iBAAiB,4CA6LjE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"CommonSearchWidget.d.ts","sourceRoot":"","sources":["../../../src/search/commonSearch/CommonSearchWidget.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAoB9C,QAAA,MAAM,kBAAkB,GAAI,qBAAqB,iBAAiB,4CA8LjE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SearchForm.d.ts","sourceRoot":"","sources":["../../../src/search/commonSearch/SearchForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhE,OAAO,EAAE,YAAY,EAAkB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAU7E,UAAU,eAAe;IACvB,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,CACR,IAAI,EAAE,YAAY,EAAE,EACpB,OAAO,EAAE,mBAAmB,KACzB,YAAY,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAClD;AAED,QAAA,MAAM,UAAU,GAAI,6DAMjB,eAAe,4CA2JjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"SearchForm.d.ts","sourceRoot":"","sources":["../../../src/search/commonSearch/SearchForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkB,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhE,OAAO,EAAE,YAAY,EAAkB,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAU7E,UAAU,eAAe;IACvB,MAAM,EAAE,mBAAmB,EAAE,CAAC;IAC9B,QAAQ,EAAE,YAAY,CAAC;IACvB,QAAQ,EAAE,CACR,IAAI,EAAE,YAAY,EAAE,EACpB,OAAO,EAAE,mBAAmB,KACzB,YAAY,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,YAAY,EAAE,CAAC;IAC3B,eAAe,CAAC,EAAE,mBAAmB,CAAC,SAAS,CAAC,CAAC;CAClD;AAED,QAAA,MAAM,UAAU,GAAI,6DAMjB,eAAe,4CA0JjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"commonSearchWidgetMocks.d.ts","sourceRoot":"","sources":["../../../../../src/search/commonSearch/__tests__/__mocks__/commonSearchWidgetMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,YAAY,EAEb,MAAM,cAAc,CAAC;AAUtB,eAAO,MAAM,4BAA4B,EAAE,wBAqB1C,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,wBAyCpC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,aAAa,EAEpD,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,aAAa,EAExD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAIhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eAQrC,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,eAS7C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAMnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAMnC,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,wBAWnD,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YASxC,CAAC"}
1
+ {"version":3,"file":"commonSearchWidgetMocks.d.ts","sourceRoot":"","sources":["../../../../../src/search/commonSearch/__tests__/__mocks__/commonSearchWidgetMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,wBAAwB,EACxB,eAAe,EACf,YAAY,EAEb,MAAM,cAAc,CAAC;AAUtB,eAAO,MAAM,4BAA4B,EAAE,wBAsB1C,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,wBA2CpC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,aAAa,EAEpD,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,aAAa,EAExD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAIhC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,eASrC,CAAC;AAEF,eAAO,MAAM,+BAA+B,EAAE,eAU7C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAMnC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAMnC,CAAC;AAEF,eAAO,MAAM,qCAAqC,EAAE,wBAWnD,CAAC;AAEF,eAAO,MAAM,0BAA0B,EAAE,YASxC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"criterionRowMocks.d.ts","sourceRoot":"","sources":["../../../../../src/search/commonSearch/__tests__/__mocks__/criterionRowMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,iBAAiB,EAAE,eAO/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eAQjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,eAQvC,CAAC"}
1
+ {"version":3,"file":"criterionRowMocks.d.ts","sourceRoot":"","sources":["../../../../../src/search/commonSearch/__tests__/__mocks__/criterionRowMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAE/C,eAAO,MAAM,iBAAiB,EAAE,eAQ/B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,eASjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,eASvC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"searchFormMocks.d.ts","sourceRoot":"","sources":["../../../../../src/search/commonSearch/__tests__/__mocks__/searchFormMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,EAM/C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAI1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAGnC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,mBAuChC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,mBA4BpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,mBA2BnC,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,mBAoBhD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,mBAgCzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,mBAoBzC,CAAC;AAEF,eAAO,MAAM,UAAU,uBAA+C,CAAC;AAEvE,eAAO,MAAM,aAAa,EAAE,YAAY,EAevC,CAAC"}
1
+ {"version":3,"file":"searchFormMocks.d.ts","sourceRoot":"","sources":["../../../../../src/search/commonSearch/__tests__/__mocks__/searchFormMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,gBAAgB,EAAE,iBAAiB,EAM/C,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAI1B,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,YAGnC,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,mBA0ChC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,mBA8BpC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,mBA6BnC,CAAC;AAEF,eAAO,MAAM,kCAAkC,EAAE,mBAqBhD,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,mBAkCzC,CAAC;AAEF,eAAO,MAAM,2BAA2B,EAAE,mBAqBzC,CAAC;AAEF,eAAO,MAAM,UAAU,uBAA+C,CAAC;AAEvE,eAAO,MAAM,aAAa,EAAE,YAAY,EAevC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"searchSummaryMocks.d.ts","sourceRoot":"","sources":["../../../../../src/search/commonSearch/__tests__/__mocks__/searchSummaryMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAMtB,eAAO,MAAM,sBAAsB,EAAE,mBAmFpC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,YAMzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,YAM5B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAM3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAMlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YASjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,YAMpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAM/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAS9B,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,YAM3C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,kBAKnC,CAAC"}
1
+ {"version":3,"file":"searchSummaryMocks.d.ts","sourceRoot":"","sources":["../../../../../src/search/commonSearch/__tests__/__mocks__/searchSummaryMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kBAAkB,EAClB,YAAY,EACZ,mBAAmB,EACpB,MAAM,cAAc,CAAC;AAMtB,eAAO,MAAM,sBAAsB,EAAE,mBA2FpC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,YAMzB,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,YAM5B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAM3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAMlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YASjC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,YAMpC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAM/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAS9B,CAAC;AAEF,eAAO,MAAM,6BAA6B,EAAE,YAM3C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,kBAKnC,CAAC"}
@@ -1,4 +1,5 @@
1
- import { CriterionRow, ResolvedRow } from '../../models';
1
+ import { UserPrivilege } from '@bahmni/services';
2
+ import { CriterionConfig, CriterionRow, ResolvedRow, SearchContextConfig } from '../../models';
2
3
  export declare const mockRowNoCriterion: CriterionRow;
3
4
  export declare const mockRowTextNoValue: CriterionRow;
4
5
  export declare const mockRowTextWithValue: CriterionRow;
@@ -12,10 +13,17 @@ export declare const mockRowRangeInvalidOrder: CriterionRow;
12
13
  export declare const mockRowTextFailingRegex: CriterionRow;
13
14
  export declare const mockRowTextPassingRegex: CriterionRow;
14
15
  export declare const mockRowWithKeyTypeValue: CriterionRow;
16
+ export declare const mockRowUmiIdentifier: CriterionRow;
17
+ export declare const mockRowImeIdentifier: CriterionRow;
15
18
  export declare const mockResolvedScalarRow: ResolvedRow;
16
19
  export declare const mockResolvedKeyTypeRow: ResolvedRow;
17
20
  export declare const mockResolvedRangeRow: ResolvedRow;
18
21
  export declare const mockRowDateScalar: CriterionRow;
19
22
  export declare const mockRowDateRange: CriterionRow;
20
23
  export declare const mockRowDateRangeFromOnly: CriterionRow;
24
+ export declare const multiKeyTypeCriteria: CriterionConfig[];
25
+ export declare const mockUserPrivileges: UserPrivilege[];
26
+ export declare const mockSimpleFieldCriterion: CriterionConfig;
27
+ export declare const mockKeyTypeFieldCriterion: CriterionConfig;
28
+ export declare const makeMockContextWithCriteria: (criteria: CriterionConfig[], requiredPrivileges?: string[]) => SearchContextConfig;
21
29
  //# sourceMappingURL=utilsMocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utilsMocks.d.ts","sourceRoot":"","sources":["../../../../../src/search/commonSearch/__tests__/__mocks__/utilsMocks.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EAEZ,WAAW,EAEZ,MAAM,cAAc,CAAC;AAEtB,eAAO,MAAM,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AAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAMhC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAMlC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,YAMpC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAMlC,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,YAMjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAS9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,YAStC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,YAMrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,YAMrC,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,YAMrC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAMlC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAMlC,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,WAGnC,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,WAGpC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,WAMlC,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,YAM/B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAS9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,YAQtC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,eAAe,EAajD,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,aAAa,EAAiC,CAAC;AAEhF,eAAO,MAAM,wBAAwB,EAAE,eAItC,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,eAIvC,CAAC;AAEF,eAAO,MAAM,2BAA2B,GACtC,UAAU,eAAe,EAAE,EAC3B,qBAAoB,MAAM,EAAO,KAChC,mBASD,CAAC"}
@@ -51,6 +51,7 @@ export interface LookupInput {
51
51
  }
52
52
  export type InputConfig = TextInput | NumericInput | DateInput | OptionsInput | LookupInput;
53
53
  export interface CriterionConfig {
54
+ id?: string;
54
55
  field: FieldConfig;
55
56
  translationKey: string;
56
57
  default?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../../src/search/commonSearch/models.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEjE,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IACzB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/B;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,UAAU,CAAC;IACjB,EAAE,CAAC,EAAE,UAAU,CAAC;CACjB;AAED,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,UAAU,CAAC;AAEtD,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB,EAAE,MAAM,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,SAAS,CAAC;IAChB,yBAAyB,EAAE,MAAM,CAAC;IAClC,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB,EAAE,MAAM,CA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B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,mBAAmB,CAAC;IAC7B,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,YAAY,EAAE,iBAAiB,EAAE,CAAC;IAClC,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,WAAW,CAAC;IACnB,KAAK,EAAE,cAAc,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,KAAK,GAAG,IAAI,CAAC;IACvB,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,oBAAoB,CAAC;AAEzE,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,oBAAoB,CAAC;CAChC"}
@@ -1,4 +1,4 @@
1
- import { AuditEventType } from '@bahmni/services';
1
+ import { AuditEventType, UserPrivilege } from '@bahmni/services';
2
2
  import { CriterionConfig, CriterionRow, CriterionValue, InputConfig, ResolvedRow, SearchPayload, SearchContextConfig, TextInput } from './models';
3
3
  export type ResultTransform = (value: string, t: (key: string) => string) => string | null;
4
4
  export type DateTimeValue = string | Date | number;
@@ -8,6 +8,7 @@ export declare const toSearchAuditEventType: (context: SearchContextConfig["cont
8
8
  export declare const getValueError: (value: CriterionValue | null, input: InputConfig, errorMessage: string) => string | null;
9
9
  export declare const validateTextInput: (value: CriterionValue | null, input: TextInput, errorMessage: string) => string | null;
10
10
  export declare const getRangeOrderError: (value: CriterionValue | null, input: InputConfig, errorMessage: string) => string | null;
11
+ export declare const processContextConfigs: (contexts: SearchContextConfig[], userPrivileges: UserPrivilege[] | null) => SearchContextConfig[];
11
12
  export declare const makeRow: (criterionKey: string | null) => CriterionRow;
12
13
  export declare const initialRows: (context: SearchContextConfig) => CriterionRow[];
13
14
  export declare const availableCriteriaForRow: (criteria: CriterionConfig[], rows: CriterionRow[], currentRowId: string) => CriterionConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/search/commonSearch/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EAOf,MAAM,kBAAkB,CAAC;AAS1B,OAAO,EACL,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EAGX,aAAa,EACb,mBAAmB,EACnB,SAAS,EACV,MAAM,UAAU,CAAC;AAElB,MAAM,MAAM,eAAe,GAAG,CAC5B,KAAK,EAAE,MAAM,EACb,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACvB,MAAM,GAAG,IAAI,CAAC;AAEnB,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;AAEnD,eAAO,MAAM,kBAAkB,GAC7B,OAAO,MAAM,EACb,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,KACzB,MAAM,GAAG,IAIX,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAa5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,SAAS,mBAAmB,CAAC,SAAS,CAAC,KACtC,cACiE,CAAC;AAOrE,eAAO,MAAM,aAAa,GACxB,OAAO,cAAc,GAAG,IAAI,EAC5B,OAAO,WAAW,EAClB,cAAc,MAAM,KACnB,MAAM,GAAG,IAOX,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,OAAO,cAAc,GAAG,IAAI,EAC5B,OAAO,SAAS,EAChB,cAAc,MAAM,KACnB,MAAM,GAAG,IAIX,CAAC;AAEF,eA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GAAI,SAAS,mBAAmB,KAAG,YAAY,EAItE,CAAC;AAeF,eAAO,MAAM,uBAAuB,GAClC,UAAU,eAAe,EAAE,EAC3B,MAAM,YAAY,EAAE,EACpB,cAAc,MAAM,KACnB,eAAe,EAGjB,CAAC;AAEF,eAAO,MAAM,sBAAsB,GACjC,UAAU,eAAe,EAAE,EAC3B,MAAM,YAAY,EAAE,KACnB,eAAe,EAGjB,CAAC;AAEF,eAAO,MAAM,SAAS,GACpB,MAAM,YAAY,EAAE,EACpB,OAAO,MAAM,EACb,SAAS,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC,YAAY,CAAC,KACpD,YAAY,EACqD,CAAC;AAoFrE,eAAO,MAAM,WAAW,GACtB,MAAM,YAAY,EAAE,EACpB,UAAU,eAAe,EAAE,KAC1B,WAAW,EAcR,CAAC;AAEP,eAAO,MAAM,YAAY,GACvB,cAAc,WAAW,EAAE,EAC3B,QAAQ,MAAM,EACd,cAAc,MAAM,KACnB,aASD,CAAC;AAEH,eAAO,MAAM,YAAY,GACvB,MAAM,YAAY,EAAE,EACpB,UAAU,eAAe,EAAE,EAC3B,gBAAgB,MAAM,EACtB,YAAY,MAAM,EAClB,mBAAmB,MAAM,EACzB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAAE,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,KAAK,MAAM,KAC9D,YAAY,EAwBX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/widgets",
3
- "version": "0.0.1-dev.356",
3
+ "version": "0.0.1-dev.357",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",