@bahmni/reports-app 0.0.1-dev.457 → 0.0.1-dev.459

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,13 +1,13 @@
1
1
  import { jsxs as S, jsx as n } from "react/jsx-runtime";
2
- import { d as Q, z as x, u as L, $ as M, f as G, p as J, H as P, a as X, r as Y, P as j, s as Z, v as W, b as ee, I as ae, S as se, y as B, B as te, X as re, h as ie, C as oe, Y as ne, D as de, J as le } from "./index-D-SD6TFa.js";
2
+ import { u as z, z as Q, a as V, n as M, V as G, o as H, Y, w as j, p as J, q as P, r as W, s as X, d as ee, I as ae, t as se, v as B, x as te, B as re, h as ie, C as oe, D as ne, E as de, F as le } from "./index-CakdCXWR.js";
3
3
  import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
4
- import { useRef as pe, useEffect as D, useMemo as g } from "react";
4
+ import { useRef as pe, useEffect as L, useMemo as g } from "react";
5
5
  const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
6
6
  observations: me,
7
7
  title: be,
8
8
  wrapper: he,
9
9
  secondary: ve
10
- }, U = (s, l, o, d, c, t) => {
10
+ }, F = (s, l, o, d, c, t) => {
11
11
  const r = te(s, l, c), e = r.value, p = re(e);
12
12
  let i = e;
13
13
  p === "Image" && (i = /* @__PURE__ */ n(
@@ -31,7 +31,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
31
31
  r.header.referenceRange && /* @__PURE__ */ n("span", { className: O.secondary, children: r.header.referenceRange })
32
32
  ] }), u = c("OBSERVATIONS_RECORDED_BY", {
33
33
  provider: r.provider
34
- }), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, E = /* @__PURE__ */ S("div", { className: O.wrapper, children: [
34
+ }), b = s.effectiveDateTime ? ie(s.effectiveDateTime, c, !0).formattedResult : void 0, T = /* @__PURE__ */ S("div", { className: O.wrapper, children: [
35
35
  /* @__PURE__ */ n("span", { children: u }),
36
36
  b && /* @__PURE__ */ n("span", { className: O.secondary, children: b })
37
37
  ] }), h = s.display, v = s.observationValue?.isAbnormal ? "abnormal-obs" : "obs", R = d ? `${d}-${v}-${h}-${o}-${l}` : `${v}-${h}-${o}-${l}`;
@@ -40,7 +40,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
40
40
  {
41
41
  header: m,
42
42
  value: i,
43
- info: E,
43
+ info: T,
44
44
  id: R,
45
45
  testId: R,
46
46
  ariaLabel: R
@@ -54,7 +54,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
54
54
  id: `grouped-obs-${s.display}-${d}`,
55
55
  open: o,
56
56
  children: s.members?.map(
57
- (e, p) => U(
57
+ (e, p) => F(
58
58
  e,
59
59
  p,
60
60
  c,
@@ -70,7 +70,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
70
70
  title: l = "",
71
71
  hideThumbnail: o
72
72
  }) => {
73
- const { t: d } = L(), c = (t, r, e) => {
73
+ const { t: d } = V(), c = (t, r, e) => {
74
74
  const p = se(t.encounterDetails, d);
75
75
  return /* @__PURE__ */ S(
76
76
  B,
@@ -80,7 +80,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
80
80
  open: r,
81
81
  children: [
82
82
  t.observations.map(
83
- (i, m) => U(
83
+ (i, m) => F(
84
84
  i,
85
85
  m,
86
86
  e,
@@ -132,29 +132,29 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
132
132
  conceptUuid: t = [],
133
133
  hideThumbnail: r = !1,
134
134
  scope: e = "all"
135
- } = d, p = pe(/* @__PURE__ */ new Set()), i = Q(), { addNotification: m } = x(), { t: u } = L(), b = ue({
135
+ } = d, p = pe(/* @__PURE__ */ new Set()), i = z(), { addNotification: m } = Q(), { t: u } = V(), b = ue({
136
136
  queries: c.map((a) => ({
137
137
  queryKey: Re(a),
138
138
  queryFn: () => M(a),
139
139
  enabled: !!a
140
140
  }))
141
141
  });
142
- D(() => {
143
- const a = b.some((z) => z.isError), y = p.current.size > 0;
142
+ L(() => {
143
+ const a = b.some((Z) => Z.isError), y = p.current.size > 0;
144
144
  a && !y ? (m({
145
145
  title: u("ERROR_DEFAULT_TITLE"),
146
146
  message: u("ERROR_FETCHING_OBSERVATIONS"),
147
147
  type: "error"
148
148
  }), p.current.add(0)) : !a && y && p.current.clear();
149
149
  }, [b, m, u]);
150
- const E = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V = G(
150
+ const T = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...T, ...t])], [T, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", U = G(
151
151
  l,
152
152
  o
153
153
  ), {
154
154
  data: _,
155
- isLoading: F,
155
+ isLoading: k,
156
156
  isError: I,
157
- refetch: $
157
+ refetch: N
158
158
  } = ce({
159
159
  queryKey: _e(
160
160
  i,
@@ -162,47 +162,47 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
162
162
  o,
163
163
  e
164
164
  ),
165
- queryFn: () => R ? J(
165
+ queryFn: () => R ? H(
166
166
  i,
167
167
  h,
168
168
  o
169
- ) : P(
169
+ ) : Y(
170
170
  i,
171
171
  h,
172
172
  o
173
173
  ),
174
- enabled: !!i && h.length > 0 && v && !V
174
+ enabled: !!i && h.length > 0 && v && !U
175
175
  });
176
- X(
176
+ j(
177
177
  (a) => {
178
178
  a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
179
179
  (y) => h.includes(y)
180
- ) && $();
180
+ ) && N();
181
181
  },
182
- [i, $]
183
- ), D(() => {
182
+ [i, N]
183
+ ), L(() => {
184
184
  I && m({
185
185
  title: u("ERROR_DEFAULT_TITLE"),
186
186
  message: u("ERROR_FETCHING_OBSERVATIONS"),
187
187
  type: "error"
188
188
  });
189
189
  }, [I]);
190
- const N = g(() => {
190
+ const $ = g(() => {
191
191
  if (!_) return [];
192
- let a = Y(_);
193
- e === "latest-encounter" && (a = j(a));
194
- const y = Z(a);
195
- return W(y);
192
+ let a = J(_);
193
+ e === "latest-encounter" && (a = P(a));
194
+ const y = W(a);
195
+ return X(y);
196
196
  }, [_, e]), w = [
197
197
  { key: "name", header: "name" },
198
198
  { key: "value", header: "value" },
199
199
  { key: "form", header: "form" }
200
- ], k = F || !v, A = I && v, C = (!_ || _.entry?.length === 0 || h.length === 0) && v, H = A ? u("ERROR_FETCHING_OBSERVATIONS") : null, K = C ? u("NO_OBSERVATIONS_FOUND") : void 0, q = N.length > 0 && !k && !A, T = d.titleTranslationKey, f = T ? u(T) : "";
200
+ ], A = k || !v, D = I && v, C = (!_ || _.entry?.length === 0 || h.length === 0) && v, q = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, x = C ? u("NO_OBSERVATIONS_FOUND") : void 0, K = $.length > 0 && !A && !D, E = d.titleTranslationKey, f = E ? u(E) : "";
201
201
  return /* @__PURE__ */ S(
202
202
  "div",
203
203
  {
204
204
  id: "observations",
205
- "data-testid": T ? `observations-${f}` : "observations",
205
+ "data-testid": E ? `observations-${f}` : "observations",
206
206
  "aria-label": "observations-aria-label",
207
207
  className: O.observations,
208
208
  children: [
@@ -210,16 +210,16 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
210
210
  ee,
211
211
  {
212
212
  id: "observations-title",
213
- testId: T ? `observations-title-${f}` : "observations-title",
213
+ testId: E ? `observations-title-${f}` : "observations-title",
214
214
  title: f,
215
215
  className: O.title,
216
216
  children: /* @__PURE__ */ n("p", { children: f })
217
217
  }
218
218
  ),
219
- q ? /* @__PURE__ */ n(
219
+ K ? /* @__PURE__ */ n(
220
220
  Oe,
221
221
  {
222
- groupedData: N,
222
+ groupedData: $,
223
223
  title: f,
224
224
  hideThumbnail: r
225
225
  }
@@ -229,9 +229,9 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
229
229
  headers: w,
230
230
  rows: [],
231
231
  ariaLabel: u("OBSERVATIONS"),
232
- loading: k,
233
- errorStateMessage: H,
234
- emptyStateMessage: K ?? u("NO_OBSERVATIONS_AVAILABLE"),
232
+ loading: A,
233
+ errorStateMessage: q,
234
+ emptyStateMessage: x ?? u("NO_OBSERVATIONS_AVAILABLE"),
235
235
  dataTestId: "observations-table"
236
236
  }
237
237
  )
@@ -1,15 +1,15 @@
1
1
  import { jsx as r, jsxs as S, Fragment as K } from "react/jsx-runtime";
2
- import { F as de, G as me, L as Se, O as fe, Q as Oe, V as ge, a0 as Pe, a1 as Ae, a2 as he, a3 as Re, a4 as Le, u as w, z as ce, a5 as De, a6 as q, a7 as Q, a8 as j, a9 as Ce, aa as be, ab as Ne, ac as J, ad as Z, Z as ye, ae as Ie, af as Me, ag as ee, ah as Fe, ai as te, aj as Be, ak as Ue, al as ve, am as He, an as ae, ao as Ye, ap as ne, aq as we, ar as xe } from "./index-D-SD6TFa.js";
3
- import qe, { useCallback as V, useState as A, useEffect as _e, useMemo as x } from "react";
4
- import { useQuery as ue } from "@tanstack/react-query";
2
+ import { H as de, M as me, P as Se, S as fe, _ as Oe, a0 as ge, a1 as Pe, a2 as Ae, a3 as he, a4 as Re, a5 as Le, a as w, z as ce, a6 as De, a7 as q, a8 as Q, a9 as X, aa as Ce, ab as be, ac as Ne, ad as Z, ae as J, Z as ye, af as Me, ag as Ie, ah as ee, ai as Fe, aj as te, ak as Be, al as Ue, am as ve, an as He, ao as ae, ap as Ye, aq as ne, ar as we, as as xe } from "./index-CakdCXWR.js";
3
+ import { useQuery as _e } from "@tanstack/react-query";
4
+ import qe, { useCallback as W, useState as A, useEffect as ue, useMemo as x } from "react";
5
5
  import { useLocation as Qe, useNavigate as Ge } from "react-router-dom";
6
- const $e = "http://json-schema.org/draft-07/schema#", Xe = "Reports App Configuration", je = "object", ke = { config: { type: "object", properties: { supportedFormats: { type: "array", items: { type: "string" }, description: "List of supported report formats" }, paperSize: { type: "string", description: "Default paper size for generated reports (e.g., A4)" }, enableReportQueue: { type: "boolean", description: "Whether reports can be queued (run asynchronously) in addition to running immediately" } }, additionalProperties: !0 } }, ze = !0, Ve = {
6
+ const $e = "http://json-schema.org/draft-07/schema#", ke = "Reports App Configuration", Xe = "object", je = { config: { type: "object", properties: { supportedFormats: { type: "array", items: { type: "string" }, description: "List of supported report formats" }, paperSize: { type: "string", description: "Default paper size for generated reports (e.g., A4)" }, enableReportQueue: { type: "boolean", description: "Whether reports can be queued (run asynchronously) in addition to running immediately" } }, additionalProperties: !0 } }, ze = !0, We = {
7
7
  $schema: $e,
8
- title: Xe,
9
- type: je,
10
- properties: ke,
8
+ title: ke,
9
+ type: Xe,
10
+ properties: je,
11
11
  additionalProperties: ze
12
- }, We = {
12
+ }, Ve = {
13
13
  PDF: "REPORTS_FORMAT_PDF",
14
14
  CSV: "REPORTS_FORMAT_CSV",
15
15
  HTML: "REPORTS_FORMAT_HTML",
@@ -24,7 +24,7 @@ const $e = "http://json-schema.org/draft-07/schema#", Xe = "Reports App Configur
24
24
  "THIS_YEAR",
25
25
  "LAST_7_DAYS",
26
26
  "LAST_30_DAYS"
27
- ], Je = {
27
+ ], Ze = {
28
28
  TODAY: "REPORTS_PRESET_TODAY",
29
29
  THIS_MONTH: "REPORTS_PRESET_THIS_MONTH",
30
30
  PREVIOUS_MONTH: "REPORTS_PRESET_PREVIOUS_MONTH",
@@ -35,13 +35,13 @@ const $e = "http://json-schema.org/draft-07/schema#", Xe = "Reports App Configur
35
35
  }, Te = {
36
36
  reportsConfig: ["reportsConfig"],
37
37
  reportsAppConfig: ["reportsAppConfig"]
38
- }, Ze = [".xls", ".xlsx"], et = () => ue({
38
+ }, Je = [".xls", ".xlsx"], et = () => _e({
39
39
  queryKey: Te.reportsAppConfig,
40
40
  queryFn: async () => {
41
41
  try {
42
42
  return await de(
43
43
  me,
44
- Ve
44
+ We
45
45
  );
46
46
  } catch {
47
47
  return {};
@@ -52,7 +52,7 @@ const $e = "http://json-schema.org/draft-07/schema#", Xe = "Reports App Configur
52
52
  title: at,
53
53
  type: nt,
54
54
  additionalProperties: rt
55
- }, ot = () => ue({
55
+ }, ot = () => _e({
56
56
  queryKey: Te.reportsConfig,
57
57
  queryFn: () => de(Se, st),
58
58
  retry: !1
@@ -128,7 +128,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
128
128
  default:
129
129
  return [new Date(t), new Date(t)];
130
130
  }
131
- }, Ee = (e) => (t) => t ? e(We[t]) : "", k = (e, t) => t ?? e.config?.macroTemplatePath ?? null, St = (e, t) => {
131
+ }, Ee = (e) => (t) => t ? e(Ve[t]) : "", j = (e, t) => t ?? e.config?.macroTemplatePath ?? null, St = (e, t) => {
132
132
  const {
133
133
  report: a,
134
134
  requiresDateRange: l,
@@ -137,7 +137,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
137
137
  endDate: _,
138
138
  templateLocation: E
139
139
  } = e;
140
- return o ? o === "CUSTOM EXCEL" && !k(a, E) ? {
140
+ return o ? o === "CUSTOM EXCEL" && !j(a, E) ? {
141
141
  field: "format",
142
142
  message: t("REPORTS_MISSING_TEMPLATE_ERROR", {
143
143
  reportName: a.name
@@ -173,7 +173,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
173
173
  });
174
174
  }, Ot = () => {
175
175
  const { user: e } = Ae();
176
- return { queueReport: V(
176
+ return { queueReport: W(
177
177
  async (a, l, o, s, _, E) => {
178
178
  if (!e?.username)
179
179
  return console.error("Error queueing report: no current user"), !1;
@@ -196,7 +196,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
196
196
  },
197
197
  [e?.username]
198
198
  ) };
199
- }, gt = () => ({ runReport: V(
199
+ }, gt = () => ({ runReport: W(
200
200
  (t, a, l, o, s, _) => {
201
201
  try {
202
202
  const E = Le(
@@ -221,7 +221,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
221
221
  const { t: o } = w(), { addNotification: s } = ce(), { runReport: _ } = gt(), { queueReport: E } = Ot(), [p, h] = A({}), [D, c] = A({}), [u, P] = A(null), [b, N] = A(null), [L, R] = A(
222
222
  null
223
223
  );
224
- _e(() => {
224
+ ue(() => {
225
225
  h({}), c({});
226
226
  }, [t.version]);
227
227
  const m = (n) => p[n] ?? {
@@ -264,7 +264,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
264
264
  (T, B) => o(T, { defaultValue: T, ...B })
265
265
  );
266
266
  return { filters: i, validationErr: d };
267
- }, I = (n, i) => {
267
+ }, M = (n, i) => {
268
268
  if (i.format === "CUSTOM EXCEL") {
269
269
  const d = a.find((T) => T !== "CUSTOM EXCEL") ?? null;
270
270
  f(n, {
@@ -272,7 +272,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
272
272
  templateLocation: null
273
273
  });
274
274
  }
275
- }, M = (n) => {
275
+ }, I = (n) => {
276
276
  const { filters: i, validationErr: d } = v(n);
277
277
  return d ? (s({
278
278
  title: o("REPORTS_VALIDATION_ERROR_TITLE"),
@@ -293,7 +293,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
293
293
  updateRow: f,
294
294
  clearRowFieldError: C,
295
295
  handleRunReport: (n) => {
296
- const i = M(n);
296
+ const i = I(n);
297
297
  if (!i) return;
298
298
  if (P(n.id), !_(
299
299
  n,
@@ -301,7 +301,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
301
301
  i.startDate,
302
302
  i.endDate,
303
303
  l,
304
- k(n, i.templateLocation)
304
+ j(n, i.templateLocation)
305
305
  )) {
306
306
  P(null), s({
307
307
  title: o("REPORTS_ERROR_TITLE"),
@@ -310,12 +310,12 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
310
310
  });
311
311
  return;
312
312
  }
313
- I(n.id, i), setTimeout(() => {
313
+ M(n.id, i), setTimeout(() => {
314
314
  P((T) => T === n.id ? null : T);
315
315
  }, 300);
316
316
  },
317
317
  handleQueueReport: async (n) => {
318
- const i = M(n);
318
+ const i = I(n);
319
319
  if (!i) return;
320
320
  N(n.id);
321
321
  const d = await E(
@@ -324,7 +324,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
324
324
  i.startDate,
325
325
  i.endDate,
326
326
  l,
327
- k(n, i.templateLocation)
327
+ j(n, i.templateLocation)
328
328
  );
329
329
  if (N((T) => T === n.id ? null : T), !d) {
330
330
  s({
@@ -338,7 +338,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
338
338
  title: o("REPORTS_QUEUE_SUCCESS_TITLE"),
339
339
  message: o("REPORTS_QUEUE_SUCCESS_MESSAGE", { reportName: n.name }),
340
340
  type: "success"
341
- }), I(n.id, i);
341
+ }), M(n.id, i);
342
342
  },
343
343
  handleTemplateUpload: async (n, i) => {
344
344
  R(n.id);
@@ -358,7 +358,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
358
358
  }
359
359
  }
360
360
  };
361
- }, At = "ReportsTable-module_tableContainer__-0YY7", ht = "ReportsTable-module_table__4ySYm", Lt = "ReportsTable-module_actionsColumn__Haj2L", Dt = "ReportsTable-module_nameColumn__BXFAo", Ct = "ReportsTable-module_dateColumn__zPT-K", bt = "ReportsTable-module_formatColumn__J0nQX", Nt = "ReportsTable-module_nameColumnWide__9NELB", yt = "ReportsTable-module_preconfiguredTemplateLabel__caPze", It = "ReportsTable-module_emptyState__nMhOo", O = {
361
+ }, At = "ReportsTable-module_tableContainer__-0YY7", ht = "ReportsTable-module_table__4ySYm", Lt = "ReportsTable-module_actionsColumn__Haj2L", Dt = "ReportsTable-module_nameColumn__BXFAo", Ct = "ReportsTable-module_dateColumn__zPT-K", bt = "ReportsTable-module_formatColumn__J0nQX", Nt = "ReportsTable-module_nameColumnWide__9NELB", yt = "ReportsTable-module_preconfiguredTemplateLabel__caPze", Mt = "ReportsTable-module_emptyState__nMhOo", O = {
362
362
  tableContainer: At,
363
363
  table: ht,
364
364
  actionsColumn: Lt,
@@ -367,7 +367,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
367
367
  formatColumn: bt,
368
368
  nameColumnWide: Nt,
369
369
  preconfiguredTemplateLabel: yt,
370
- emptyState: It
370
+ emptyState: Mt
371
371
  }, z = qe.memo(
372
372
  ({
373
373
  reports: e,
@@ -419,7 +419,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
419
419
  /* @__PURE__ */ r("th", { className: O.actionsColumn, children: s("REPORTS_ACTIONS_HEADER") })
420
420
  ] }) }),
421
421
  /* @__PURE__ */ r("tbody", { children: e.map((R) => {
422
- const m = _(R.id), f = E(R.id), C = Y(R), y = p(R.id), v = h(R.id), I = m.format === "CUSTOM EXCEL", M = !!R.config?.macroTemplatePath;
422
+ const m = _(R.id), f = E(R.id), C = Y(R), y = p(R.id), v = h(R.id), M = m.format === "CUSTOM EXCEL", I = !!R.config?.macroTemplatePath;
423
423
  let F = "edit";
424
424
  return D(R.id) ? F = "uploading" : m.templateLocation && (F = "complete"), /* @__PURE__ */ S("tr", { children: [
425
425
  /* @__PURE__ */ r(
@@ -482,7 +482,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
482
482
  ] }),
483
483
  /* @__PURE__ */ S("td", { children: [
484
484
  /* @__PURE__ */ r(
485
- j,
485
+ X,
486
486
  {
487
487
  id: `row-format-${R.id}`,
488
488
  titleText: s("REPORTS_FORMAT_LABEL"),
@@ -498,7 +498,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
498
498
  }
499
499
  }
500
500
  ),
501
- I && (M ? /* @__PURE__ */ r(
501
+ M && (I ? /* @__PURE__ */ r(
502
502
  "p",
503
503
  {
504
504
  className: O.preconfiguredTemplateLabel,
@@ -509,14 +509,14 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
509
509
  Ce,
510
510
  {
511
511
  testId: `template-uploader-${R.id}`,
512
- accept: Ze,
512
+ accept: Je,
513
513
  buttonLabel: s(
514
514
  "REPORTS_UPLOAD_TEMPLATE_BUTTON_LABEL"
515
515
  ),
516
516
  labelTitle: s("REPORTS_UPLOAD_TEMPLATE_LABEL"),
517
517
  filenameStatus: F,
518
- onChange: (g, W) => {
519
- const n = W?.addedFiles?.[0]?.file ?? g?.target?.files?.[0];
518
+ onChange: (g, V) => {
519
+ const n = V?.addedFiles?.[0]?.file ?? g?.target?.files?.[0];
520
520
  n && N(R, n);
521
521
  }
522
522
  },
@@ -537,7 +537,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
537
537
  "aria-label": s("REPORTS_ACTIONS_HEADER"),
538
538
  children: [
539
539
  /* @__PURE__ */ r(
540
- J,
540
+ Z,
541
541
  {
542
542
  itemText: s(
543
543
  o ? "REPORTS_RUN_NOW_BUTTON_LABEL" : "REPORTS_RUN_BUTTON_LABEL"
@@ -546,7 +546,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
546
546
  }
547
547
  ),
548
548
  o && /* @__PURE__ */ r(
549
- J,
549
+ Z,
550
550
  {
551
551
  itemText: s("REPORTS_QUEUE_BUTTON_LABEL"),
552
552
  onClick: () => b(R)
@@ -563,8 +563,8 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
563
563
  }
564
564
  );
565
565
  z.displayName = "ReportsTable";
566
- const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWidth__p10hj", Bt = "ReportList-module_emptyState__0xMZ9", $ = {
567
- reportList: Mt,
566
+ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWidth__p10hj", Bt = "ReportList-module_emptyState__0xMZ9", $ = {
567
+ reportList: It,
568
568
  fullWidth: Ft,
569
569
  emptyState: Bt
570
570
  }, Ut = "TableFilters-module_filtersContainer__k61FE", vt = "TableFilters-module_filtersTitle__fAhZr", Ht = "TableFilters-module_filtersRow__nM3k-", Yt = "TableFilters-module_divider__r8vOx", wt = "TableFilters-module_buttonsRow__otqUJ", H = {
@@ -591,13 +591,13 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
591
591
  /* @__PURE__ */ r("h2", { className: H.filtersTitle, children: c("REPORTS_FILTERS_LABEL") }),
592
592
  /* @__PURE__ */ S("div", { className: H.filtersRow, children: [
593
593
  /* @__PURE__ */ r(
594
- j,
594
+ X,
595
595
  {
596
596
  id: "date-range-preset",
597
597
  titleText: c("REPORTS_SELECT_DATE_RANGE"),
598
598
  label: "",
599
599
  items: Ke,
600
- itemToString: (u) => u ? c(Je[u]) : "",
600
+ itemToString: (u) => u ? c(Ze[u]) : "",
601
601
  selectedItem: l,
602
602
  onChange: ({ selectedItem: u }) => {
603
603
  if (p(u ?? null), !u) return;
@@ -647,7 +647,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
647
647
  ),
648
648
  /* @__PURE__ */ r("span", { className: H.divider, "aria-hidden": "true" }),
649
649
  /* @__PURE__ */ r(
650
- j,
650
+ X,
651
651
  {
652
652
  id: "filter-format",
653
653
  titleText: c("REPORTS_FORMAT_LABEL"),
@@ -660,8 +660,8 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
660
660
  )
661
661
  ] }),
662
662
  /* @__PURE__ */ S("div", { className: H.buttonsRow, children: [
663
- /* @__PURE__ */ r(Z, { kind: "tertiary", onClick: h, children: c("REPORTS_RESET_BUTTON") }),
664
- /* @__PURE__ */ r(Z, { kind: "primary", onClick: D, children: c("REPORTS_APPLY_BUTTON") })
663
+ /* @__PURE__ */ r(J, { kind: "tertiary", onClick: h, children: c("REPORTS_RESET_BUTTON") }),
664
+ /* @__PURE__ */ r(J, { kind: "primary", onClick: D, children: c("REPORTS_APPLY_BUTTON") })
665
665
  ] })
666
666
  ] });
667
667
  }, ie = {
@@ -675,7 +675,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
675
675
  isLoading: s,
676
676
  error: _
677
677
  } = ot(), { data: E } = et();
678
- _e(() => {
678
+ ue(() => {
679
679
  _ && l({
680
680
  title: e("REPORTS_ERROR_TITLE"),
681
681
  message: e("REPORTS_CONFIG_LOAD_ERROR"),
@@ -688,10 +688,10 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
688
688
  ) : [], [o, t]), f = x(
689
689
  () => pt(E?.config?.supportedFormats),
690
690
  [E]
691
- ), C = E?.config?.paperSize, y = E?.config?.enableReportQueue ?? !1, { dateRangeReports: v, noDateRangeReports: I } = x(
691
+ ), C = E?.config?.paperSize, y = E?.config?.enableReportQueue ?? !1, { dateRangeReports: v, noDateRangeReports: M } = x(
692
692
  () => Et(m),
693
693
  [m]
694
- ), M = () => {
694
+ ), I = () => {
695
695
  R((g) => ({
696
696
  startDate: p,
697
697
  endDate: D,
@@ -702,7 +702,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
702
702
  h(null), c(null), P(null), N(null), R((g) => ({ ...ie, version: g.version + 1 }));
703
703
  };
704
704
  return s || a ? /* @__PURE__ */ r(
705
- Ie,
705
+ Me,
706
706
  {
707
707
  id: "reports-config-loading",
708
708
  testId: "reports-config-loading",
@@ -737,10 +737,10 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
737
737
  onFormatChange: P,
738
738
  onPresetChange: N,
739
739
  onReset: F,
740
- onApply: M
740
+ onApply: I
741
741
  }
742
742
  ),
743
- /* @__PURE__ */ S(Me, { align: "start", children: [
743
+ /* @__PURE__ */ S(Ie, { align: "start", children: [
744
744
  /* @__PURE__ */ r(
745
745
  ee,
746
746
  {
@@ -768,7 +768,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
768
768
  children: /* @__PURE__ */ r(
769
769
  z,
770
770
  {
771
- reports: I,
771
+ reports: M,
772
772
  appliedFilters: L,
773
773
  availableFormats: f,
774
774
  defaultPaperSize: C,
@@ -781,17 +781,17 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
781
781
  ]
782
782
  }
783
783
  );
784
- }, Qt = "ReportsPage-module_page__ewRXe", Gt = "ReportsPage-module_panel__HFBCt", X = {
784
+ }, Qt = "ReportsPage-module_page__ewRXe", Gt = "ReportsPage-module_panel__HFBCt", k = {
785
785
  page: Qt,
786
786
  panel: Gt
787
- }, le = 1, $t = 0, Wt = () => {
787
+ }, le = 1, $t = 0, Vt = () => {
788
788
  const { t: e } = w(), t = Qe(), a = Ge(), l = x(
789
789
  () => [
790
790
  { id: "home", label: e("REPORTS_HOME_LABEL"), href: Fe },
791
791
  { id: "reports", label: e("REPORTS_LABEL"), isCurrentPage: !0 }
792
792
  ],
793
793
  [e]
794
- ), o = t.pathname === te ? le : $t, s = V(
794
+ ), o = t.pathname === te ? le : $t, s = W(
795
795
  ({ selectedIndex: _ }) => {
796
796
  a(
797
797
  _ === le ? te : Be
@@ -823,7 +823,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
823
823
  id: "reports-page",
824
824
  "data-testid": "reports-page-test-id",
825
825
  "aria-label": "Reports Page",
826
- className: X.page,
826
+ className: k.page,
827
827
  children: /* @__PURE__ */ S(ve, { selectedIndex: o, onChange: s, children: [
828
828
  /* @__PURE__ */ S(
829
829
  He,
@@ -860,7 +860,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
860
860
  id: "reports-tab-panel",
861
861
  "data-testid": "reports-tab-panel-test-id",
862
862
  "aria-label": e("REPORTS_TAB_LABEL"),
863
- className: X.panel,
863
+ className: k.panel,
864
864
  children: /* @__PURE__ */ r(qt, {})
865
865
  }
866
866
  ),
@@ -870,7 +870,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
870
870
  id: "my-reports-tab-panel",
871
871
  "data-testid": "my-reports-tab-panel-test-id",
872
872
  "aria-label": e("REPORTS_MY_REPORTS_TAB_LABEL"),
873
- className: X.panel,
873
+ className: k.panel,
874
874
  children: /* @__PURE__ */ r("p", { children: e("REPORTS_MY_REPORTS_TAB_PLACEHOLDER") })
875
875
  }
876
876
  )
@@ -882,6 +882,6 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
882
882
  );
883
883
  };
884
884
  export {
885
- Wt as ReportsPage,
886
- Wt as default
885
+ Vt as ReportsPage,
886
+ Vt as default
887
887
  };
@@ -1,4 +1,4 @@
1
- import { av as we, aw as z, ax as xt, ay as B, at as q, au as y, az as Ro, aA as ye, aB as R, aC as _, aD as k, aE as N, aF as A, aG as bs, aH as ir, aI as $e, aJ as U, aK as Hn, aL as Vn, aM as dt, aN as D, aO as xs, aP as cn, aQ as Be, aR as ws, aS as qt, aT as zt, aU as $s, aV as Cs, aW as $n, aX as Ss, aY as Nr, aZ as Bt, a_ as zo, a$ as ks, b0 as Es, b1 as j, b2 as Ur, b3 as Ms, b4 as Ds, b5 as sr, b6 as As, b7 as Ts, b8 as zn, b9 as Fs, ba as Is, bb as Z, bc as Ps, bd as Ls } from "./index-D-SD6TFa.js";
1
+ import { aw as we, ax as z, ay as xt, az as B, au as q, av as y, aA as Ro, aB as ye, aC as R, aD as _, aE as k, aF as N, aG as A, aH as bs, aI as ir, aJ as $e, aK as U, aL as Hn, aM as Vn, aN as dt, aO as D, aP as xs, aQ as cn, aR as Be, aS as ws, aT as qt, aU as zt, aV as $s, aW as Cs, aX as $n, aY as Ss, aZ as Nr, a_ as Bt, a$ as zo, b0 as ks, b1 as Es, b2 as j, b3 as Ur, b4 as Ms, b5 as Ds, b6 as sr, b7 as As, b8 as Ts, b9 as zn, ba as Fs, bb as Is, bc as Z, bd as Ps, be as Ls } from "./index-CakdCXWR.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {