@alfadocs/ui-kit 1.10.0 → 1.10.1

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.
@@ -51,7 +51,7 @@ const nr = [
51
51
  ], ar = Vt("columns-3-cog", nr);
52
52
  function or(e) {
53
53
  if (!He(e)) return e;
54
- const t = e, o = t.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(o) ? o : `${o} ds:size-4`.trim();
54
+ const t = e, a = t.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} ds:size-4`.trim();
55
55
  return Ve(t, { className: n, size: t.props.size ?? 16 });
56
56
  }
57
57
  const Je = Re(null);
@@ -66,13 +66,13 @@ function V(e) {
66
66
  function sr({
67
67
  getApi: e,
68
68
  selectionCount: t,
69
- onPrint: o,
69
+ onPrint: a,
70
70
  markColumnsUserTouched: n,
71
71
  children: s
72
72
  }) {
73
73
  const d = j(
74
- () => ({ getApi: e, selectionCount: t, onPrint: o, markColumnsUserTouched: n }),
75
- [e, t, o, n]
74
+ () => ({ getApi: e, selectionCount: t, onPrint: a, markColumnsUserTouched: n }),
75
+ [e, t, a, n]
76
76
  );
77
77
  return /* @__PURE__ */ i(Je.Provider, { value: d, children: s });
78
78
  }
@@ -89,20 +89,20 @@ const ir = [
89
89
  // matching the header-tools layout the Patients / Care Plan List
90
90
  // patterns established (the old bg-card + border + shadow bar is gone).
91
91
  ].join(" "), Ze = $(
92
- ({ className: e, children: t, ...o }, n) => /* @__PURE__ */ i(
92
+ ({ className: e, children: t, ...a }, n) => /* @__PURE__ */ i(
93
93
  "div",
94
94
  {
95
95
  ref: n,
96
96
  role: "toolbar",
97
97
  className: [ir, e ?? ""].join(" ").trim(),
98
- ...o,
98
+ ...a,
99
99
  children: t
100
100
  }
101
101
  )
102
102
  );
103
103
  Ze.displayName = "DataTable.Toolbar";
104
104
  const Ye = $(
105
- ({ className: e, children: t, ...o }, n) => /* @__PURE__ */ i(
105
+ ({ className: e, children: t, ...a }, n) => /* @__PURE__ */ i(
106
106
  "div",
107
107
  {
108
108
  ref: n,
@@ -115,14 +115,14 @@ const Ye = $(
115
115
  "ds:grow ds:min-w-0",
116
116
  e ?? ""
117
117
  ].join(" ").trim(),
118
- ...o,
118
+ ...a,
119
119
  children: t
120
120
  }
121
121
  )
122
122
  );
123
123
  Ye.displayName = "DataTable.Toolbar.FilterBar";
124
124
  const et = $(
125
- ({ className: e, children: t, ...o }, n) => /* @__PURE__ */ i(
125
+ ({ className: e, children: t, ...a }, n) => /* @__PURE__ */ i(
126
126
  "div",
127
127
  {
128
128
  ref: n,
@@ -131,14 +131,14 @@ const et = $(
131
131
  "ds:ms-auto",
132
132
  e ?? ""
133
133
  ].join(" ").trim(),
134
- ...o,
134
+ ...a,
135
135
  children: t
136
136
  }
137
137
  )
138
138
  );
139
139
  et.displayName = "DataTable.Toolbar.Actions";
140
140
  const Ne = $(
141
- ({ label: e, onExport: t, intent: o = "outline", ...n }, s) => {
141
+ ({ label: e, onExport: t, intent: a = "outline", ...n }, s) => {
142
142
  const { t: d } = A(), { getApi: m } = V("DataTable.Toolbar.ExportCsv"), g = N(() => {
143
143
  const p = m();
144
144
  p && (t ? t(p) : p.exportDataAsCsv());
@@ -148,7 +148,7 @@ const Ne = $(
148
148
  {
149
149
  ref: s,
150
150
  type: "button",
151
- intent: o,
151
+ intent: a,
152
152
  icon: /* @__PURE__ */ i(ye, { "aria-hidden": !0 }),
153
153
  tooltip: e ?? d("dataTable.exportCsv"),
154
154
  onClick: g,
@@ -160,16 +160,16 @@ const Ne = $(
160
160
  Ne.displayName = "DataTable.Toolbar.ExportCsv";
161
161
  function oe(e, t = [30, 30, 30]) {
162
162
  if (typeof document > "u") return t;
163
- const o = document.createElement("span");
164
- o.style.color = `hsl(var(${e}))`, o.style.position = "absolute", o.style.visibility = "hidden", document.body.appendChild(o);
165
- const n = getComputedStyle(o).color;
166
- document.body.removeChild(o);
163
+ const a = document.createElement("span");
164
+ a.style.color = `hsl(var(${e}))`, a.style.position = "absolute", a.style.visibility = "hidden", document.body.appendChild(a);
165
+ const n = getComputedStyle(a).color;
166
+ document.body.removeChild(a);
167
167
  const s = n.match(/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/i);
168
168
  return s ? [Number(s[1]), Number(s[2]), Number(s[3])] : t;
169
169
  }
170
170
  async function tt(e, t) {
171
171
  if (!e) return;
172
- const [{ jsPDF: o }, { default: n }] = await Promise.all([
172
+ const [{ jsPDF: a }, { default: n }] = await Promise.all([
173
173
  import("./jspdf.es.min-DaapWjR1.js").then((y) => y.j),
174
174
  import("./jspdf.plugin.autotable-CSiDNyPn.js")
175
175
  ]), d = (e.getColumns() ?? []).filter((y) => y.isVisible()), m = [
@@ -187,7 +187,7 @@ async function tt(e, t) {
187
187
  });
188
188
  g.push(c);
189
189
  });
190
- const p = oe("--muted", [240, 240, 240]), h = oe("--foreground", [30, 30, 30]), u = oe("--card-foreground", [30, 30, 30]), b = oe("--card", [250, 250, 250]), T = new o({ orientation: "landscape" });
190
+ const p = oe("--muted", [240, 240, 240]), h = oe("--foreground", [30, 30, 30]), u = oe("--card-foreground", [30, 30, 30]), b = oe("--card", [250, 250, 250]), T = new a({ orientation: "landscape" });
191
191
  n(T, {
192
192
  head: m,
193
193
  body: g,
@@ -202,7 +202,7 @@ async function tt(e, t) {
202
202
  }), T.save(t.fileName);
203
203
  }
204
204
  const De = $(
205
- ({ label: e, onClick: t, fileName: o, intent: n = "outline", ...s }, d) => {
205
+ ({ label: e, onClick: t, fileName: a, intent: n = "outline", ...s }, d) => {
206
206
  const { t: m } = A(), { getApi: g } = V("DataTable.Toolbar.ExportPdf"), p = N(() => {
207
207
  const h = g();
208
208
  if (t) {
@@ -210,9 +210,9 @@ const De = $(
210
210
  return;
211
211
  }
212
212
  tt(h, {
213
- fileName: o ?? "data-table-export.pdf"
213
+ fileName: a ?? "data-table-export.pdf"
214
214
  });
215
- }, [g, t, o]);
215
+ }, [g, t, a]);
216
216
  return /* @__PURE__ */ i(
217
217
  Q,
218
218
  {
@@ -229,7 +229,7 @@ const De = $(
229
229
  );
230
230
  De.displayName = "DataTable.Toolbar.ExportPdf";
231
231
  const Fe = $(
232
- ({ label: e, intent: t = "outline", ...o }, n) => {
232
+ ({ label: e, intent: t = "outline", ...a }, n) => {
233
233
  const { t: s } = A(), { onPrint: d } = V("DataTable.Toolbar.Print");
234
234
  return /* @__PURE__ */ i(
235
235
  Q,
@@ -240,14 +240,14 @@ const Fe = $(
240
240
  icon: /* @__PURE__ */ i(Xt, { "aria-hidden": !0 }),
241
241
  tooltip: e ?? s("dataTable.print"),
242
242
  onClick: d,
243
- ...o
243
+ ...a
244
244
  }
245
245
  );
246
246
  }
247
247
  );
248
248
  Fe.displayName = "DataTable.Toolbar.Print";
249
249
  const rt = ({ placeholder: e, debounceMs: t = 150 }) => {
250
- const { t: o } = A(), { getApi: n } = V("DataTable.Toolbar.QuickSearch"), [s, d] = _(""), m = W(void 0);
250
+ const { t: a } = A(), { getApi: n } = V("DataTable.Toolbar.QuickSearch"), [s, d] = _(""), m = W(void 0);
251
251
  return K(() => (m.current && window.clearTimeout(m.current), m.current = window.setTimeout(() => {
252
252
  const g = n();
253
253
  g && g.setGridOption("quickFilterText", s);
@@ -267,24 +267,24 @@ const rt = ({ placeholder: e, debounceMs: t = 150 }) => {
267
267
  size: "sm",
268
268
  value: s,
269
269
  onChange: (g) => d(g.target.value),
270
- placeholder: e ?? o("dataTable.quickSearch.placeholder", "Search…"),
270
+ placeholder: e ?? a("dataTable.quickSearch.placeholder", "Search…"),
271
271
  startAdornment: /* @__PURE__ */ i(Ee, { "aria-hidden": !0, className: "ds:size-4" }),
272
272
  clearable: !0,
273
273
  onClear: () => d(""),
274
- "aria-label": o("dataTable.quickSearch.label", "Quick search")
274
+ "aria-label": a("dataTable.quickSearch.label", "Quick search")
275
275
  }
276
276
  ) });
277
277
  };
278
278
  rt.displayName = "DataTable.Toolbar.QuickSearch";
279
279
  const ke = $(
280
- ({ onRefresh: e, label: t, intent: o = "outline", ...n }, s) => {
280
+ ({ onRefresh: e, label: t, intent: a = "outline", ...n }, s) => {
281
281
  const { t: d } = A();
282
282
  return /* @__PURE__ */ i(
283
283
  Q,
284
284
  {
285
285
  ref: s,
286
286
  type: "button",
287
- intent: o,
287
+ intent: a,
288
288
  icon: /* @__PURE__ */ i(Ht, { "aria-hidden": !0 }),
289
289
  tooltip: t ?? d("dataTable.refresh", "Refresh"),
290
290
  onClick: e,
@@ -294,17 +294,17 @@ const ke = $(
294
294
  }
295
295
  );
296
296
  ke.displayName = "DataTable.Toolbar.Refresh";
297
- function lr(e) {
297
+ function lr(e, t) {
298
298
  if (!e || typeof e != "object") return "";
299
- const t = e;
300
- if (typeof t.filter == "string" || typeof t.filter == "number") {
301
- const o = typeof t.type == "string" ? t.type : "", n = typeof t.filterTo == "string" || typeof t.filterTo == "number" ? String(t.filterTo) : "";
302
- return o === "inRange" && n ? `${t.filter} – ${n}` : o ? `${o} ${t.filter}` : String(t.filter);
299
+ const a = e;
300
+ if (typeof a.filter == "string" || typeof a.filter == "number") {
301
+ const n = typeof a.type == "string" ? a.type : "", s = typeof a.filterTo == "string" || typeof a.filterTo == "number" ? String(a.filterTo) : "";
302
+ return n === "inRange" && s ? `${a.filter} – ${s}` : n ? `${t(`dataTable.agGrid.${n}`, n)} ${a.filter}` : String(a.filter);
303
303
  }
304
- return typeof t.dateFrom == "string" ? typeof t.dateTo == "string" && t.dateTo ? `${t.dateFrom} – ${t.dateTo}` : String(t.dateFrom) : Array.isArray(t.values) ? t.values.map(String).join(", ") : "";
304
+ return typeof a.dateFrom == "string" ? typeof a.dateTo == "string" && a.dateTo ? `${a.dateFrom} – ${a.dateTo}` : String(a.dateFrom) : Array.isArray(a.values) ? a.values.map(String).join(", ") : "";
305
305
  }
306
306
  const nt = () => {
307
- const { t: e } = A(), { getApi: t } = V("DataTable.Toolbar.FilterChips"), [o, n] = _([]), [s, d] = _(""), m = N(() => {
307
+ const { t: e } = A(), { getApi: t } = V("DataTable.Toolbar.FilterChips"), [a, n] = _([]), [s, d] = _(""), m = N(() => {
308
308
  const u = t();
309
309
  if (!u) {
310
310
  n([]), d("");
@@ -316,13 +316,13 @@ const nt = () => {
316
316
  y.push({
317
317
  colId: f,
318
318
  headerName: C,
319
- text: lr(b[f])
319
+ text: lr(b[f], e)
320
320
  });
321
321
  }
322
322
  n(y);
323
323
  const c = u.getGridOption("quickFilterText");
324
324
  d(typeof c == "string" ? c : "");
325
- }, [t]);
325
+ }, [t, e]);
326
326
  if (K(() => {
327
327
  let u;
328
328
  const b = (c) => m(), T = (c) => {
@@ -338,7 +338,7 @@ const nt = () => {
338
338
  u = () => window.clearInterval(c);
339
339
  }
340
340
  return () => u == null ? void 0 : u();
341
- }, [t, m]), o.length + (s ? 1 : 0) === 0) return null;
341
+ }, [t, m]), a.length + (s ? 1 : 0) === 0) return null;
342
342
  function p(u) {
343
343
  const b = t();
344
344
  b && b.destroyFilter(u);
@@ -366,7 +366,7 @@ const nt = () => {
366
366
  }
367
367
  }
368
368
  ),
369
- o.map((u) => /* @__PURE__ */ i(
369
+ a.map((u) => /* @__PURE__ */ i(
370
370
  We,
371
371
  {
372
372
  label: u.text ? `${u.headerName}: ${u.text}` : u.headerName,
@@ -395,7 +395,7 @@ nt.displayName = "DataTable.Toolbar.FilterChips";
395
395
  const at = ({
396
396
  field: e,
397
397
  options: t,
398
- label: o
398
+ label: a
399
399
  }) => {
400
400
  const { t: n } = A(), { getApi: s } = V("DataTable.Toolbar.FacetFilter"), [d, m] = _(null);
401
401
  function g(p) {
@@ -416,7 +416,7 @@ const at = ({
416
416
  "div",
417
417
  {
418
418
  role: "group",
419
- "aria-label": o ?? n("dataTable.facetFilter.label", "Filter"),
419
+ "aria-label": a ?? n("dataTable.facetFilter.label", "Filter"),
420
420
  className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
421
421
  children: t.map((p) => {
422
422
  const h = d === p.value;
@@ -440,7 +440,7 @@ at.displayName = "DataTable.Toolbar.FacetFilter";
440
440
  const dr = ["csv", "xlsx", "pdf"];
441
441
  async function cr(e, t) {
442
442
  if (!e) return;
443
- const o = await import("./exceljs.min-D2MHbJsF.js").then((f) => f.e), n = new o.Workbook(), s = n.addWorksheet("Sheet1"), m = (e.getColumns() ?? []).filter((f) => f.isVisible());
443
+ const a = await import("./exceljs.min-D2MHbJsF.js").then((f) => f.e), n = new a.Workbook(), s = n.addWorksheet("Sheet1"), m = (e.getColumns() ?? []).filter((f) => f.isVisible());
444
444
  s.addRow(
445
445
  m.map(
446
446
  (f) => e.getDisplayNameForColumn(f, null) ?? f.getColId()
@@ -480,7 +480,7 @@ function ur() {
480
480
  return e;
481
481
  }
482
482
  const Ae = $(
483
- ({ children: e, label: t, intent: o = "outline", ...n }, s) => {
483
+ ({ children: e, label: t, intent: a = "outline", ...n }, s) => {
484
484
  const { t: d } = A(), { getApi: m } = V("DataTable.Toolbar.ExportMenu"), g = j(() => ({ getApi: m }), [m]), p = e ?? dr.map((h) => /* @__PURE__ */ i(Pe, { format: h }, h));
485
485
  return /* @__PURE__ */ i(ot.Provider, { value: g, children: /* @__PURE__ */ G(X.Root, { children: [
486
486
  /* @__PURE__ */ i(X.Trigger, { asChild: !0, children: /* @__PURE__ */ i(
@@ -488,7 +488,7 @@ const Ae = $(
488
488
  {
489
489
  ref: s,
490
490
  type: "button",
491
- intent: o,
491
+ intent: a,
492
492
  icon: /* @__PURE__ */ i(ye, { "aria-hidden": !0 }),
493
493
  tooltip: t ?? d("dataTable.export.menu", "Export"),
494
494
  "aria-label": t ?? d("dataTable.export.menu", "Export"),
@@ -510,7 +510,7 @@ function fr(e) {
510
510
  const Pe = ({
511
511
  format: e,
512
512
  label: t,
513
- onClick: o,
513
+ onClick: a,
514
514
  fileName: n
515
515
  }) => {
516
516
  const { t: s } = A(), { getApi: d } = ur(), m = N(() => {
@@ -531,8 +531,8 @@ const Pe = ({
531
531
  });
532
532
  return;
533
533
  }
534
- o == null || o(g);
535
- }, [e, n, o, d]);
534
+ a == null || a(g);
535
+ }, [e, n, a, d]);
536
536
  return /* @__PURE__ */ i(X.Item, { onSelect: m, children: /* @__PURE__ */ G("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
537
537
  fr(e),
538
538
  /* @__PURE__ */ i("span", { children: t ?? pr(s, e) })
@@ -551,7 +551,7 @@ function mr(e) {
551
551
  }).filter((n) => n !== null);
552
552
  }
553
553
  const Oe = $(
554
- function({ label: t, icon: o, footer: n, header: s, intent: d = "outline", ...m }, g) {
554
+ function({ label: t, icon: a, footer: n, header: s, intent: d = "outline", ...m }, g) {
555
555
  const { t: p } = A(), { getApi: h, markColumnsUserTouched: u } = V(
556
556
  "DataTable.Toolbar.ColumnToggle"
557
557
  ), [b, T] = _(!1), [y, c] = _([]), [f, w] = _(null), [C, S] = _(null);
@@ -594,7 +594,7 @@ const Oe = $(
594
594
  ref: g,
595
595
  type: "button",
596
596
  intent: d,
597
- icon: o ?? /* @__PURE__ */ i(ar, { "aria-hidden": !0 }),
597
+ icon: a ?? /* @__PURE__ */ i(ar, { "aria-hidden": !0 }),
598
598
  tooltip: L,
599
599
  "aria-label": L,
600
600
  "aria-haspopup": "dialog",
@@ -678,7 +678,7 @@ const Oe = $(
678
678
  );
679
679
  Oe.displayName = "DataTable.Toolbar.ColumnToggle";
680
680
  const st = $(
681
- ({ label: e, icon: t, onClick: o, variant: n = "default", size: s = "sm", ...d }, m) => {
681
+ ({ label: e, icon: t, onClick: a, variant: n = "default", size: s = "sm", ...d }, m) => {
682
682
  const { t: g } = A(), { getApi: p, selectionCount: h } = V(
683
683
  "DataTable.Toolbar.BulkAction"
684
684
  );
@@ -690,7 +690,7 @@ const st = $(
690
690
  intent: n === "destructive" ? "destructive" : "secondary",
691
691
  size: s,
692
692
  startIcon: or(t),
693
- onClick: () => o(p()),
693
+ onClick: () => a(p()),
694
694
  "aria-label": `${e} (${g("dataTable.bulkAction", { count: h })})`,
695
695
  ...d,
696
696
  children: [
@@ -747,7 +747,7 @@ function br(e) {
747
747
  sensitivity: "base",
748
748
  usage: "search"
749
749
  });
750
- function o(n, s) {
750
+ function a(n, s) {
751
751
  if (s.length === 0) return 0;
752
752
  if (s.length > n.length) return -1;
753
753
  for (let d = 0; d <= n.length - s.length; d += 1)
@@ -757,7 +757,7 @@ function br(e) {
757
757
  }
758
758
  return {
759
759
  equals: (n, s) => t.compare(n, s) === 0,
760
- contains: (n, s) => o(n, s) !== -1,
760
+ contains: (n, s) => a(n, s) !== -1,
761
761
  startsWith: (n, s) => s.length <= n.length && t.compare(n.slice(0, s.length), s) === 0,
762
762
  endsWith: (n, s) => s.length <= n.length && t.compare(
763
763
  n.slice(n.length - s.length),
@@ -769,7 +769,7 @@ function yr(e) {
769
769
  return e == null ? null : typeof e == "string" ? e : String(e);
770
770
  }
771
771
  function xr(e) {
772
- const { model: t, onModelChange: o, getValue: n, placeholder: s, defaultOperator: d } = e, { t: m } = A("ui"), g = (t == null ? void 0 : t.type) ?? d ?? "contains", [p, h] = _(g), [u, b] = _((t == null ? void 0 : t.filter) ?? "");
772
+ const { model: t, onModelChange: a, getValue: n, placeholder: s, defaultOperator: d } = e, { t: m } = A("ui"), g = (t == null ? void 0 : t.type) ?? d ?? "contains", [p, h] = _(g), [u, b] = _((t == null ? void 0 : t.filter) ?? "");
773
773
  K(() => {
774
774
  h((t == null ? void 0 : t.type) ?? d ?? "contains"), b((t == null ? void 0 : t.filter) ?? "");
775
775
  }, [t, d]);
@@ -798,13 +798,13 @@ function xr(e) {
798
798
  });
799
799
  function y() {
800
800
  if (u.trim() === "") {
801
- o(null);
801
+ a(null);
802
802
  return;
803
803
  }
804
- o({ type: p, filter: u });
804
+ a({ type: p, filter: u });
805
805
  }
806
806
  function c() {
807
- b(""), h(d ?? "contains"), o(null);
807
+ b(""), h(d ?? "contains"), a(null);
808
808
  }
809
809
  const f = hr.map(
810
810
  (C) => ({
@@ -854,22 +854,22 @@ function xr(e) {
854
854
  }
855
855
  function vr(e) {
856
856
  var b, T;
857
- const { model: t, onModelChange: o, column: n } = e, { t: s } = A("ui"), d = ((T = (b = n == null ? void 0 : n.getColDef) == null ? void 0 : b.call(n)) == null ? void 0 : T.filterParams) ?? {}, m = d.defaultOperator ?? "contains", g = d.placeholder ?? s("dataTable.textFilter.placeholder"), [p, h] = _((t == null ? void 0 : t.filter) ?? "");
857
+ const { model: t, onModelChange: a, column: n } = e, { t: s } = A("ui"), d = ((T = (b = n == null ? void 0 : n.getColDef) == null ? void 0 : b.call(n)) == null ? void 0 : T.filterParams) ?? {}, m = d.defaultOperator ?? "contains", g = d.placeholder ?? s("dataTable.textFilter.placeholder"), [p, h] = _((t == null ? void 0 : t.filter) ?? "");
858
858
  K(() => {
859
859
  h((t == null ? void 0 : t.filter) ?? "");
860
860
  }, [t == null ? void 0 : t.filter]), K(() => {
861
861
  if (p === ((t == null ? void 0 : t.filter) ?? "")) return;
862
862
  const y = setTimeout(() => {
863
863
  if (p === "") {
864
- t && o(null);
864
+ t && a(null);
865
865
  return;
866
866
  }
867
- o({ type: m, filter: p });
867
+ a({ type: m, filter: p });
868
868
  }, 200);
869
869
  return () => clearTimeout(y);
870
- }, [p, m, t, o]);
870
+ }, [p, m, t, a]);
871
871
  function u() {
872
- h(""), t && o(null);
872
+ h(""), t && a(null);
873
873
  }
874
874
  return /* @__PURE__ */ i("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ i(
875
875
  Ie,
@@ -900,10 +900,10 @@ function he(e) {
900
900
  }
901
901
  function wr(e, t = !0) {
902
902
  K(() => {
903
- const o = e.current;
904
- if (!t || !o || typeof MutationObserver > "u") return;
903
+ const a = e.current;
904
+ if (!t || !a || typeof MutationObserver > "u") return;
905
905
  (() => {
906
- for (const d of o.querySelectorAll($e)) he(d);
906
+ for (const d of a.querySelectorAll($e)) he(d);
907
907
  })();
908
908
  const s = new MutationObserver((d) => {
909
909
  for (const m of d)
@@ -917,7 +917,7 @@ function wr(e, t = !0) {
917
917
  he(p);
918
918
  }
919
919
  });
920
- return s.observe(o, {
920
+ return s.observe(a, {
921
921
  subtree: !0,
922
922
  childList: !0,
923
923
  attributes: !0,
@@ -945,7 +945,7 @@ function Er(e) {
945
945
  var c;
946
946
  const t = Se(
947
947
  lt
948
- ), { t: o } = A(), n = W(null), { data: s, node: d, api: m } = e, g = B(s), p = t == null ? void 0 : t.heights, h = d.id, u = W(t);
948
+ ), { t: a } = A(), n = W(null), { data: s, node: d, api: m } = e, g = B(s), p = t == null ? void 0 : t.heights, h = d.id, u = W(t);
949
949
  if (u.current = t, K(() => {
950
950
  const f = n.current;
951
951
  if (!f || !g || !p || h == null) return;
@@ -991,7 +991,7 @@ function Er(e) {
991
991
  f.key !== "Escape" || f.defaultPrevented || (f.stopPropagation(), (w = t == null ? void 0 : t.onExpandedRowChange) == null || w.call(t, null));
992
992
  },
993
993
  children: [
994
- /* @__PURE__ */ i("span", { className: "ds:sr-only", children: o("dataTable.expandedRow") }),
994
+ /* @__PURE__ */ i("span", { className: "ds:sr-only", children: a("dataTable.expandedRow") }),
995
995
  (c = t == null ? void 0 : t.renderExpandedRow) == null ? void 0 : c.call(t, T)
996
996
  ]
997
997
  }
@@ -1278,16 +1278,16 @@ function Ar() {
1278
1278
  );
1279
1279
  }
1280
1280
  function Pr(e) {
1281
- return e.map(({ pinned: t, ...o }) => o);
1281
+ return e.map(({ pinned: t, ...a }) => a);
1282
1282
  }
1283
1283
  function Or(e) {
1284
- return e.map(({ hide: t, pinned: o, ...n }) => n);
1284
+ return e.map(({ hide: t, pinned: a, ...n }) => n);
1285
1285
  }
1286
1286
  function zr(e, t) {
1287
1287
  try {
1288
- const o = localStorage.getItem(`data-table-col-state:${e}`);
1289
- if (!o) return null;
1290
- const n = JSON.parse(o);
1288
+ const a = localStorage.getItem(`data-table-col-state:${e}`);
1289
+ if (!a) return null;
1290
+ const n = JSON.parse(a);
1291
1291
  if (Array.isArray(n))
1292
1292
  return {
1293
1293
  state: Or(n),
@@ -1303,11 +1303,11 @@ function zr(e, t) {
1303
1303
  return null;
1304
1304
  }
1305
1305
  }
1306
- function Mr(e, t, o, n) {
1306
+ function Mr(e, t, a, n) {
1307
1307
  try {
1308
1308
  const s = {
1309
1309
  v: 2,
1310
- dir: o,
1310
+ dir: a,
1311
1311
  state: t.getColumnState(),
1312
1312
  touched: [...n]
1313
1313
  };
@@ -1328,7 +1328,7 @@ const _r = /* @__PURE__ */ new Set([
1328
1328
  ]);
1329
1329
  function Gr(e, t) {
1330
1330
  const {
1331
- columnDefs: o,
1331
+ columnDefs: a,
1332
1332
  rowData: n,
1333
1333
  rowSelection: s,
1334
1334
  pagination: d = !1,
@@ -1367,21 +1367,21 @@ function Gr(e, t) {
1367
1367
  var l;
1368
1368
  const r = (l = E.current) == null ? void 0 : l.api;
1369
1369
  if (!r) return [];
1370
- const a = [];
1370
+ const o = [];
1371
1371
  for (const x of r.getSelectedNodes())
1372
- x.id != null && !B(x.data) && a.push(x.id);
1373
- return a;
1372
+ x.id != null && !B(x.data) && o.push(x.id);
1373
+ return o;
1374
1374
  },
1375
1375
  setSelection: (r) => {
1376
1376
  var x;
1377
- const a = (x = E.current) == null ? void 0 : x.api;
1378
- if (!a) return;
1377
+ const o = (x = E.current) == null ? void 0 : x.api;
1378
+ if (!o) return;
1379
1379
  const l = new Set(r);
1380
- a.forEachNode((v) => {
1380
+ o.forEachNode((v) => {
1381
1381
  v.id != null && v.setSelected(l.has(v.id));
1382
1382
  });
1383
1383
  },
1384
- selectRange: (r, a) => {
1384
+ selectRange: (r, o) => {
1385
1385
  var Be;
1386
1386
  const l = (Be = E.current) == null ? void 0 : Be.api;
1387
1387
  if (!l) return;
@@ -1389,7 +1389,7 @@ function Gr(e, t) {
1389
1389
  l.forEachNodeAfterFilterAndSort((te) => {
1390
1390
  te.id != null && !B(te.data) && x.push(te.id);
1391
1391
  });
1392
- const v = x.indexOf(r), k = x.indexOf(a);
1392
+ const v = x.indexOf(r), k = x.indexOf(o);
1393
1393
  if (v < 0 || k < 0) return;
1394
1394
  const [P, ae] = v <= k ? [v, k] : [k, v], ee = new Set(x.slice(P, ae + 1));
1395
1395
  l.forEachNode((te) => {
@@ -1397,39 +1397,39 @@ function Gr(e, t) {
1397
1397
  });
1398
1398
  },
1399
1399
  clearSelection: () => {
1400
- var r, a;
1401
- (a = (r = E.current) == null ? void 0 : r.api) == null || a.deselectAll();
1400
+ var r, o;
1401
+ (o = (r = E.current) == null ? void 0 : r.api) == null || o.deselectAll();
1402
1402
  },
1403
1403
  getFilter: () => {
1404
- var r, a;
1405
- return ((a = (r = E.current) == null ? void 0 : r.api) == null ? void 0 : a.getFilterModel()) ?? {};
1404
+ var r, o;
1405
+ return ((o = (r = E.current) == null ? void 0 : r.api) == null ? void 0 : o.getFilterModel()) ?? {};
1406
1406
  },
1407
1407
  setFilter: (r) => {
1408
- var a, l;
1409
- (l = (a = E.current) == null ? void 0 : a.api) == null || l.setFilterModel(r);
1408
+ var o, l;
1409
+ (l = (o = E.current) == null ? void 0 : o.api) == null || l.setFilterModel(r);
1410
1410
  },
1411
1411
  getSort: () => {
1412
- var a;
1413
- const r = (a = E.current) == null ? void 0 : a.api;
1412
+ var o;
1413
+ const r = (o = E.current) == null ? void 0 : o.api;
1414
1414
  return r ? r.getColumnState().filter((l) => l.sort === "asc" || l.sort === "desc").map((l) => ({ colId: l.colId, sort: l.sort })) : [];
1415
1415
  },
1416
1416
  setSort: (r) => {
1417
1417
  var x;
1418
- const a = (x = E.current) == null ? void 0 : x.api;
1419
- if (!a) return;
1420
- const l = a.getColumnState().map((v) => {
1418
+ const o = (x = E.current) == null ? void 0 : x.api;
1419
+ if (!o) return;
1420
+ const l = o.getColumnState().map((v) => {
1421
1421
  const k = r.find((P) => P.colId === v.colId);
1422
1422
  return { ...v, sort: k ? k.sort : null };
1423
1423
  });
1424
- a.applyColumnState({ state: l, defaultState: { sort: null } });
1424
+ o.applyColumnState({ state: l, defaultState: { sort: null } });
1425
1425
  },
1426
1426
  getCurrentPage: () => {
1427
- var r, a;
1428
- return ((a = (r = E.current) == null ? void 0 : r.api) == null ? void 0 : a.paginationGetCurrentPage()) ?? 0;
1427
+ var r, o;
1428
+ return ((o = (r = E.current) == null ? void 0 : r.api) == null ? void 0 : o.paginationGetCurrentPage()) ?? 0;
1429
1429
  },
1430
1430
  goToPage: (r) => {
1431
- var a, l;
1432
- (l = (a = E.current) == null ? void 0 : a.api) == null || l.paginationGoToPage(r);
1431
+ var o, l;
1432
+ (l = (o = E.current) == null ? void 0 : o.api) == null || l.paginationGoToPage(r);
1433
1433
  },
1434
1434
  getExpandedRowId: () => ze.current ?? null,
1435
1435
  getUserTouchedColumns: () => [...ne.current],
@@ -1447,7 +1447,7 @@ function Gr(e, t) {
1447
1447
  _t(t, () => Te, [Te]), Yt(Nr, Te, p);
1448
1448
  const _e = M.dir() === "rtl", ut = n === void 0, pt = er(), { resolvedTheme: Ge } = tr(), ft = (Ge === "light-accessible" || Ge === "dark-accessible") && f === "compact" ? "default" : f, mt = j(() => {
1449
1449
  if (!s) return;
1450
- const r = (a) => !B(a.data);
1450
+ const r = (o) => !B(o.data);
1451
1451
  return s === "single" ? { mode: "singleRow", isRowSelectable: r } : {
1452
1452
  mode: "multiRow",
1453
1453
  headerCheckbox: !0,
@@ -1455,8 +1455,8 @@ function Gr(e, t) {
1455
1455
  isRowSelectable: r
1456
1456
  };
1457
1457
  }, [s]), pe = _e ? "rtl" : "ltr", H = N(
1458
- (r, a, l) => {
1459
- const x = new Set(a);
1458
+ (r, o, l) => {
1459
+ const x = new Set(o);
1460
1460
  for (const v of r.getColumnState()) {
1461
1461
  if (!x.has(v.colId)) continue;
1462
1462
  const k = ue.current.get(v.colId) ?? {};
@@ -1474,8 +1474,8 @@ function Gr(e, t) {
1474
1474
  (r) => {
1475
1475
  var l;
1476
1476
  for (const x of r) ne.current.add(x);
1477
- const a = (l = E.current) == null ? void 0 : l.api;
1478
- a && (H(a, r, ["hide"]), le(a));
1477
+ const o = (l = E.current) == null ? void 0 : l.api;
1478
+ o && (H(o, r, ["hide"]), le(o));
1479
1479
  },
1480
1480
  [le, H]
1481
1481
  );
@@ -1483,20 +1483,20 @@ function Gr(e, t) {
1483
1483
  const gt = N(() => {
1484
1484
  var l;
1485
1485
  if (!((l = E.current) != null && l.api)) return;
1486
- const r = E.current.api, a = p ? zr(p, pe) : null;
1487
- if (a) {
1488
- for (const x of a.touched) ne.current.add(x);
1486
+ const r = E.current.api, o = p ? zr(p, pe) : null;
1487
+ if (o) {
1488
+ for (const x of o.touched) ne.current.add(x);
1489
1489
  r.applyColumnState({
1490
- state: a.state,
1490
+ state: o.state,
1491
1491
  applyOrder: !0
1492
- }), H(r, a.touched, ["hide"]);
1492
+ }), H(r, o.touched, ["hide"]);
1493
1493
  }
1494
1494
  }, [p, pe, H]), ht = N(
1495
1495
  (r) => {
1496
1496
  var l;
1497
1497
  if (r.source !== "gridOptionsChanged") return;
1498
- const a = (l = E.current) == null ? void 0 : l.api;
1499
- !a || ue.current.size === 0 || a.applyColumnState({
1498
+ const o = (l = E.current) == null ? void 0 : l.api;
1499
+ !o || ue.current.size === 0 || o.applyColumnState({
1500
1500
  state: [...ue.current].map(([x, v]) => ({
1501
1501
  colId: x,
1502
1502
  ...v
@@ -1507,23 +1507,23 @@ function Gr(e, t) {
1507
1507
  ), fe = N(
1508
1508
  (r) => {
1509
1509
  var x;
1510
- const a = (x = E.current) == null ? void 0 : x.api;
1511
- if (!a) return;
1510
+ const o = (x = E.current) == null ? void 0 : x.api;
1511
+ if (!o) return;
1512
1512
  const l = (r.columns ?? (r.column ? [r.column] : [])).map((v) => v.getColId());
1513
1513
  if (r.source && _r.has(r.source)) {
1514
1514
  if (r.source === "api" && "visible" in r) {
1515
1515
  const v = l.filter(
1516
1516
  (k) => ne.current.has(k)
1517
1517
  );
1518
- v.length > 0 && (H(a, v, ["hide"]), le(a));
1518
+ v.length > 0 && (H(o, v, ["hide"]), le(o));
1519
1519
  }
1520
1520
  return;
1521
1521
  }
1522
1522
  if ("visible" in r) {
1523
1523
  for (const v of l) ne.current.add(v);
1524
- H(a, l, ["hide"]);
1525
- } else "pinned" in r ? H(a, l, ["pinned"]) : "flexColumns" in r && H(a, l, ["width", "flex"]);
1526
- le(a);
1524
+ H(o, l, ["hide"]);
1525
+ } else "pinned" in r ? H(o, l, ["pinned"]) : "flexColumns" in r && H(o, l, ["width", "flex"]);
1526
+ le(o);
1527
1527
  },
1528
1528
  [le, H]
1529
1529
  ), bt = j(() => {
@@ -1534,25 +1534,25 @@ function Gr(e, t) {
1534
1534
  de.current = c;
1535
1535
  const qe = N(
1536
1536
  (r) => {
1537
- var a;
1537
+ var o;
1538
1538
  return q == null ? void 0 : q({
1539
1539
  data: r,
1540
1540
  level: 0,
1541
- api: (a = E.current) == null ? void 0 : a.api,
1541
+ api: (o = E.current) == null ? void 0 : o.api,
1542
1542
  context: c == null ? void 0 : c.context
1543
1543
  });
1544
1544
  },
1545
1545
  [q, c == null ? void 0 : c.context]
1546
1546
  ), Y = j(() => {
1547
1547
  if (!D || R == null || !n) return null;
1548
- const r = n.find((a) => qe(a) === R);
1548
+ const r = n.find((o) => qe(o) === R);
1549
1549
  return r === void 0 ? null : { id: R, row: r };
1550
1550
  }, [D, R, qe, n]), yt = j(() => {
1551
1551
  if (!Y || !n) return n;
1552
- const r = n.indexOf(Y.row), a = Ir(Y.row, Y.id);
1552
+ const r = n.indexOf(Y.row), o = Ir(Y.row, Y.id);
1553
1553
  return [
1554
1554
  ...n.slice(0, r + 1),
1555
- a,
1555
+ o,
1556
1556
  ...n.slice(r + 1)
1557
1557
  ];
1558
1558
  }, [Y, n]), xt = N(
@@ -1560,30 +1560,30 @@ function Gr(e, t) {
1560
1560
  [q]
1561
1561
  ), vt = N(
1562
1562
  (r) => {
1563
- var a, l;
1564
- return B(r.rowNode.data) || (((l = (a = de.current) == null ? void 0 : a.isFullWidthRow) == null ? void 0 : l.call(a, r)) ?? !1);
1563
+ var o, l;
1564
+ return B(r.rowNode.data) || (((l = (o = de.current) == null ? void 0 : o.isFullWidthRow) == null ? void 0 : l.call(o, r)) ?? !1);
1565
1565
  },
1566
1566
  []
1567
1567
  ), Tt = N(
1568
1568
  (r) => {
1569
- var a, l;
1570
- return B(r.data) ? je.current.get(r.node.id ?? "") : (l = (a = de.current) == null ? void 0 : a.getRowHeight) == null ? void 0 : l.call(a, r);
1569
+ var o, l;
1570
+ return B(r.data) ? je.current.get(r.node.id ?? "") : (l = (o = de.current) == null ? void 0 : o.getRowHeight) == null ? void 0 : l.call(o, r);
1571
1571
  },
1572
1572
  []
1573
1573
  ), wt = N(
1574
1574
  (r) => {
1575
1575
  var P, ae;
1576
1576
  (ae = (P = de.current) == null ? void 0 : P.postSortRows) == null || ae.call(P, r);
1577
- const { nodes: a } = r, l = a.findIndex((ee) => B(ee.data));
1577
+ const { nodes: o } = r, l = o.findIndex((ee) => B(ee.data));
1578
1578
  if (l < 0) return;
1579
- const [x] = a.splice(l, 1), v = x.data[se], k = a.findIndex((ee) => ee.id === v);
1580
- a.splice(k < 0 ? a.length : k + 1, 0, x);
1579
+ const [x] = o.splice(l, 1), v = x.data[se], k = o.findIndex((ee) => ee.id === v);
1580
+ o.splice(k < 0 ? o.length : k + 1, 0, x);
1581
1581
  },
1582
1582
  []
1583
1583
  ), Ct = N(
1584
1584
  (r) => {
1585
- var a, l;
1586
- return B(r.data) ? Cr : ((l = (a = de.current) == null ? void 0 : a.getRowClass) == null ? void 0 : l.call(a, r)) ?? (I == null ? void 0 : I(r));
1585
+ var o, l;
1586
+ return B(r.data) ? Cr : ((l = (o = de.current) == null ? void 0 : o.getRowClass) == null ? void 0 : l.call(o, r)) ?? (I == null ? void 0 : I(r));
1587
1587
  },
1588
1588
  [I]
1589
1589
  ), me = N(
@@ -1594,9 +1594,9 @@ function Gr(e, t) {
1594
1594
  const r = c == null ? void 0 : c.defaultCsvExportParams;
1595
1595
  return {
1596
1596
  ...r,
1597
- shouldRowBeSkipped: (a) => {
1597
+ shouldRowBeSkipped: (o) => {
1598
1598
  var l;
1599
- return me(a) || (((l = r == null ? void 0 : r.shouldRowBeSkipped) == null ? void 0 : l.call(r, a)) ?? !1);
1599
+ return me(o) || (((l = r == null ? void 0 : r.shouldRowBeSkipped) == null ? void 0 : l.call(r, o)) ?? !1);
1600
1600
  }
1601
1601
  };
1602
1602
  }, [D, c == null ? void 0 : c.defaultCsvExportParams, me]), St = j(() => {
@@ -1604,9 +1604,9 @@ function Gr(e, t) {
1604
1604
  const r = c == null ? void 0 : c.defaultExcelExportParams;
1605
1605
  return {
1606
1606
  ...r,
1607
- shouldRowBeSkipped: (a) => {
1607
+ shouldRowBeSkipped: (o) => {
1608
1608
  var l;
1609
- return me(a) || (((l = r == null ? void 0 : r.shouldRowBeSkipped) == null ? void 0 : l.call(r, a)) ?? !1);
1609
+ return me(o) || (((l = r == null ? void 0 : r.shouldRowBeSkipped) == null ? void 0 : l.call(r, o)) ?? !1);
1610
1610
  }
1611
1611
  };
1612
1612
  }, [D, c == null ? void 0 : c.defaultExcelExportParams, me]), we = c == null ? void 0 : c.fullWidthCellRenderer, It = j(
@@ -1627,16 +1627,16 @@ function Gr(e, t) {
1627
1627
  var l;
1628
1628
  const r = (l = E.current) == null ? void 0 : l.api;
1629
1629
  if (!r) return;
1630
- const a = r.getSelectedRows().filter((x) => !B(x));
1631
- xe(a.length), h == null || h(a);
1630
+ const o = r.getSelectedRows().filter((x) => !B(x));
1631
+ xe(o.length), h == null || h(o);
1632
1632
  }, [h]), Nt = N(
1633
1633
  (r) => {
1634
1634
  var l;
1635
- const a = (l = E.current) == null ? void 0 : l.api;
1636
- if (a) {
1637
- const v = a.getColumnState().find((k) => k.sort);
1635
+ const o = (l = E.current) == null ? void 0 : l.api;
1636
+ if (o) {
1637
+ const v = o.getColumnState().find((k) => k.sort);
1638
1638
  if (v) {
1639
- const k = v.colId, P = a.getColumnDef(k), ae = (P == null ? void 0 : P.headerName) ?? k, ee = v.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
1639
+ const k = v.colId, P = o.getColumnDef(k), ae = (P == null ? void 0 : P.headerName) ?? k, ee = v.sort === "asc" ? "dataTable.sortAscending" : "dataTable.sortDescending";
1640
1640
  ve(
1641
1641
  U("dataTable.sortAnnounce", {
1642
1642
  column: ae,
@@ -1718,7 +1718,7 @@ function Gr(e, t) {
1718
1718
  {
1719
1719
  ref: E,
1720
1720
  theme: "legacy",
1721
- columnDefs: o,
1721
+ columnDefs: a,
1722
1722
  rowData: yt,
1723
1723
  defaultColDef: {
1724
1724
  sortable: !0,
@@ -1804,7 +1804,7 @@ const vn = Object.assign(dt, {
1804
1804
  });
1805
1805
  function Ke(e) {
1806
1806
  if (!He(e)) return e;
1807
- const t = e, o = t.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(o) ? o : `${o} size-4`.trim();
1807
+ const t = e, a = t.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} size-4`.trim();
1808
1808
  return Ve(t, { className: n, size: t.props.size ?? 16 });
1809
1809
  }
1810
1810
  function Tn(e) {
@@ -1815,9 +1815,9 @@ function Ce(e, t) {
1815
1815
  }
1816
1816
  const Lr = "ds:text-[color:var(--destructive)] ds:hover:text-[color:var(--destructive-hover)]";
1817
1817
  function wn(e) {
1818
- const { data: t, actions: o, intent: n = "ghost", group: s, label: d, collapsed: m } = e, { t: g } = A();
1818
+ const { data: t, actions: a, intent: n = "ghost", group: s, label: d, collapsed: m } = e, { t: g } = A();
1819
1819
  if (!t) return null;
1820
- const p = o.filter((b) => !Ce(b.hidden, t));
1820
+ const p = a.filter((b) => !Ce(b.hidden, t));
1821
1821
  if (typeof m == "function" ? m() : !!m)
1822
1822
  return /* @__PURE__ */ G(X.Root, { children: [
1823
1823
  /* @__PURE__ */ i(X.Trigger, { asChild: !0, children: /* @__PURE__ */ i(
@@ -1884,4 +1884,4 @@ export {
1884
1884
  xn as h,
1885
1885
  B as i
1886
1886
  };
1887
- //# sourceMappingURL=actions-cell-renderer-BbzCqcld.js.map
1887
+ //# sourceMappingURL=actions-cell-renderer-xfSYiTXQ.js.map