@alfadocs/ui-kit 1.20.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{anamnesis-summary-rows-BPSQhxnZ.js → anamnesis-summary-rows-DwjqZgR5.js} +2 -2
- package/dist/_chunks/{antenatal-schedule-timeline-B1k8QkA6.js → antenatal-schedule-timeline-sXfIp5lp.js} +3 -3
- package/dist/_chunks/{appointment-timeline-DCn0Jx55.js → appointment-timeline-DhHwmHo1.js} +2 -2
- package/dist/_chunks/{balance-badge-cell-BlvFil5p.js → balance-badge-cell-CX6b0ML4.js} +47 -46
- package/dist/_chunks/{booking-DQbo6mQF.js → booking-WXKbA69C.js} +4 -4
- package/dist/_chunks/{calendar-workspace-D6kipuvT.js → calendar-workspace-ax7xmSAp.js} +4 -4
- package/dist/_chunks/{cycle-calculator-DmtYGhqq.js → cycle-calculator-DVgxBfP0.js} +3 -3
- package/dist/_chunks/{data-table-D7nA8OGL.js → data-table-DB5BiVQ0.js} +122 -116
- package/dist/_chunks/{date-picker-CepI_oI2.js → date-picker-B6NW_PS5.js} +3 -3
- package/dist/_chunks/{date-picker-variants-DfuooXEK.js → date-picker-variants-B9NLAfUK.js} +5 -2
- package/dist/_chunks/{date-range-picker-BD8P_rJq.js → date-range-picker-TpmECKRh.js} +197 -196
- package/dist/_chunks/{date-time-picker-3I2vVKGV.js → date-time-picker-DijEae25.js} +2 -2
- package/dist/_chunks/{due-date-calculator-BF_Ikofx.js → due-date-calculator-BtgWeFqp.js} +4 -4
- package/dist/_chunks/{file-manager-Bsc8-MQQ.js → file-manager-Cd8V9IcZ.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-CiOQjzgx.js → gestational-age-calculator-KdMg9z9H.js} +5 -5
- package/dist/_chunks/{hcg-doubling-CpU7H5rQ.js → hcg-doubling-C2fQxfXd.js} +3 -3
- package/dist/_chunks/{link-cell-renderer-B-xrUPew.js → link-cell-renderer-tWEOv3Sc.js} +6 -4
- package/dist/_chunks/{parse-MN9bGkrY.js → parse-DPqj4JtD.js} +2 -2
- package/dist/_chunks/{patient-details-1QDA-XOO.js → patient-details-DYAmq76G.js} +2 -2
- package/dist/_chunks/{pregnancy-dating-D2wchD11.js → pregnancy-dating-m-c05DOI.js} +5 -5
- package/dist/_chunks/{radiograph-panel.agent-C3trfWqB.js → radiograph-panel.agent-ByM9M3qm.js} +3 -3
- package/dist/_chunks/subDays-HPvBuvq3.js +8 -0
- package/dist/agent-catalog.json +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +6 -0
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/columns.d.ts +10 -3
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/index.js +19 -19
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/subDays-BLl3y3pd.js +0 -8
|
@@ -138,10 +138,10 @@ const Xe = $(
|
|
|
138
138
|
Xe.displayName = "DataTable.Toolbar.Actions";
|
|
139
139
|
const Ee = $(
|
|
140
140
|
({ label: e, onExport: t, intent: n = "outline", ...a }, i) => {
|
|
141
|
-
const { t: d } = A(), { getApi:
|
|
142
|
-
const p =
|
|
141
|
+
const { t: d } = A(), { getApi: g } = V("DataTable.Toolbar.ExportCsv"), h = D(() => {
|
|
142
|
+
const p = g();
|
|
143
143
|
p && (t ? t(p) : p.exportDataAsCsv());
|
|
144
|
-
}, [
|
|
144
|
+
}, [g, t]);
|
|
145
145
|
return /* @__PURE__ */ s(
|
|
146
146
|
oe,
|
|
147
147
|
{
|
|
@@ -150,7 +150,7 @@ const Ee = $(
|
|
|
150
150
|
intent: n,
|
|
151
151
|
icon: /* @__PURE__ */ s(ye, { "aria-hidden": !0 }),
|
|
152
152
|
tooltip: e ?? d("dataTable.exportCsv"),
|
|
153
|
-
onClick:
|
|
153
|
+
onClick: h,
|
|
154
154
|
...a
|
|
155
155
|
}
|
|
156
156
|
);
|
|
@@ -171,9 +171,9 @@ async function Qe(e, t) {
|
|
|
171
171
|
const [{ jsPDF: n }, { default: a }] = await Promise.all([
|
|
172
172
|
import("./jspdf.es.min-DaapWjR1.js").then((C) => C.j),
|
|
173
173
|
import("./jspdf.plugin.autotable-CSiDNyPn.js")
|
|
174
|
-
]), d = (e.getColumns() ?? []).filter((C) => C.isVisible()),
|
|
174
|
+
]), d = (e.getColumns() ?? []).filter((C) => C.isVisible()), g = [
|
|
175
175
|
d.map((C) => e.getDisplayNameForColumn(C, null) ?? "")
|
|
176
|
-
],
|
|
176
|
+
], h = [];
|
|
177
177
|
e.forEachNodeAfterFilterAndSort((C) => {
|
|
178
178
|
if (!C.data) return;
|
|
179
179
|
const c = d.map((f) => {
|
|
@@ -184,13 +184,13 @@ async function Qe(e, t) {
|
|
|
184
184
|
});
|
|
185
185
|
return w == null ? "" : String(w);
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
h.push(c);
|
|
188
188
|
});
|
|
189
|
-
const p = ae("--muted", [240, 240, 240]),
|
|
189
|
+
const p = ae("--muted", [240, 240, 240]), m = ae("--foreground", [30, 30, 30]), u = ae("--card-foreground", [30, 30, 30]), b = ae("--card", [250, 250, 250]), S = new n({ orientation: "landscape" });
|
|
190
190
|
a(S, {
|
|
191
|
-
head:
|
|
192
|
-
body:
|
|
193
|
-
headStyles: { fillColor: p, textColor:
|
|
191
|
+
head: g,
|
|
192
|
+
body: h,
|
|
193
|
+
headStyles: { fillColor: p, textColor: m },
|
|
194
194
|
bodyStyles: { textColor: u },
|
|
195
195
|
alternateRowStyles: { fillColor: b },
|
|
196
196
|
styles: {
|
|
@@ -202,16 +202,16 @@ async function Qe(e, t) {
|
|
|
202
202
|
}
|
|
203
203
|
const De = $(
|
|
204
204
|
({ label: e, onClick: t, fileName: n, intent: a = "outline", ...i }, d) => {
|
|
205
|
-
const { t:
|
|
206
|
-
const
|
|
205
|
+
const { t: g } = A(), { getApi: h } = V("DataTable.Toolbar.ExportPdf"), p = D(() => {
|
|
206
|
+
const m = h();
|
|
207
207
|
if (t) {
|
|
208
|
-
t(
|
|
208
|
+
t(m);
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
Qe(
|
|
211
|
+
Qe(m, {
|
|
212
212
|
fileName: n ?? "data-table-export.pdf"
|
|
213
213
|
});
|
|
214
|
-
}, [
|
|
214
|
+
}, [h, t, n]);
|
|
215
215
|
return /* @__PURE__ */ s(
|
|
216
216
|
oe,
|
|
217
217
|
{
|
|
@@ -219,7 +219,7 @@ const De = $(
|
|
|
219
219
|
type: "button",
|
|
220
220
|
intent: a,
|
|
221
221
|
icon: /* @__PURE__ */ s(Ke, { "aria-hidden": !0 }),
|
|
222
|
-
tooltip: e ??
|
|
222
|
+
tooltip: e ?? g("dataTable.exportPdf"),
|
|
223
223
|
onClick: p,
|
|
224
224
|
...i
|
|
225
225
|
}
|
|
@@ -246,12 +246,12 @@ const Ne = $(
|
|
|
246
246
|
);
|
|
247
247
|
Ne.displayName = "DataTable.Toolbar.Print";
|
|
248
248
|
const Je = ({ placeholder: e, debounceMs: t = 150 }) => {
|
|
249
|
-
const { t: n } = A(), { getApi: a } = V("DataTable.Toolbar.QuickSearch"), [i, d] = G(""),
|
|
250
|
-
return K(() => (
|
|
251
|
-
const
|
|
252
|
-
|
|
249
|
+
const { t: n } = A(), { getApi: a } = V("DataTable.Toolbar.QuickSearch"), [i, d] = G(""), g = B(void 0);
|
|
250
|
+
return K(() => (g.current && window.clearTimeout(g.current), g.current = window.setTimeout(() => {
|
|
251
|
+
const h = a();
|
|
252
|
+
h && h.setGridOption("quickFilterText", i);
|
|
253
253
|
}, t), () => {
|
|
254
|
-
|
|
254
|
+
g.current && window.clearTimeout(g.current);
|
|
255
255
|
}), [i, t, a]), // Slot wrapper caps the search at a sensible legible width on desktop —
|
|
256
256
|
// without this, TextInput's `w-full` lets the QuickSearch absorb the
|
|
257
257
|
// entire FilterBar row and push trailing Actions onto a second line at
|
|
@@ -265,7 +265,7 @@ const Je = ({ placeholder: e, debounceMs: t = 150 }) => {
|
|
|
265
265
|
type: "search",
|
|
266
266
|
size: "sm",
|
|
267
267
|
value: i,
|
|
268
|
-
onChange: (
|
|
268
|
+
onChange: (h) => d(h.target.value),
|
|
269
269
|
placeholder: e ?? n("dataTable.quickSearch.placeholder", "Search…"),
|
|
270
270
|
startAdornment: /* @__PURE__ */ s(Ie, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
271
271
|
clearable: !0,
|
|
@@ -303,7 +303,7 @@ function or(e, t) {
|
|
|
303
303
|
return typeof n.dateFrom == "string" ? typeof n.dateTo == "string" && n.dateTo ? `${n.dateFrom} – ${n.dateTo}` : String(n.dateFrom) : Array.isArray(n.values) ? n.values.map(String).join(", ") : "";
|
|
304
304
|
}
|
|
305
305
|
const Ze = () => {
|
|
306
|
-
const { t: e } = A(), { getApi: t } = V("DataTable.Toolbar.FilterChips"), [n, a] = G([]), [i, d] = G(""),
|
|
306
|
+
const { t: e } = A(), { getApi: t } = V("DataTable.Toolbar.FilterChips"), [n, a] = G([]), [i, d] = G(""), g = D(() => {
|
|
307
307
|
const u = t();
|
|
308
308
|
if (!u) {
|
|
309
309
|
a([]), d("");
|
|
@@ -324,8 +324,8 @@ const Ze = () => {
|
|
|
324
324
|
}, [t, e]);
|
|
325
325
|
if (K(() => {
|
|
326
326
|
let u;
|
|
327
|
-
const b = (c) =>
|
|
328
|
-
c.addEventListener("filterChanged", b),
|
|
327
|
+
const b = (c) => g(), S = (c) => {
|
|
328
|
+
c.addEventListener("filterChanged", b), g(), u = () => c.removeEventListener("filterChanged", b);
|
|
329
329
|
}, C = t();
|
|
330
330
|
if (C)
|
|
331
331
|
S(C);
|
|
@@ -337,12 +337,12 @@ const Ze = () => {
|
|
|
337
337
|
u = () => window.clearInterval(c);
|
|
338
338
|
}
|
|
339
339
|
return () => u == null ? void 0 : u();
|
|
340
|
-
}, [t,
|
|
340
|
+
}, [t, g]), n.length + (i ? 1 : 0) === 0) return null;
|
|
341
341
|
function p(u) {
|
|
342
342
|
const b = t();
|
|
343
|
-
b && b.
|
|
343
|
+
b && (b.setColumnFilterModel(u, null), b.onFilterChanged());
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function m() {
|
|
346
346
|
const u = t();
|
|
347
347
|
u && (u.setFilterModel(null), u.setGridOption("quickFilterText", ""), d(""));
|
|
348
348
|
}
|
|
@@ -358,7 +358,8 @@ const Ze = () => {
|
|
|
358
358
|
{
|
|
359
359
|
label: `${e("dataTable.quickSearch.label", "Quick search")}: ${i}`,
|
|
360
360
|
size: "sm",
|
|
361
|
-
|
|
361
|
+
variant: "brand",
|
|
362
|
+
fill: "solid",
|
|
362
363
|
onRemove: () => {
|
|
363
364
|
const u = t();
|
|
364
365
|
u == null || u.setGridOption("quickFilterText", ""), d("");
|
|
@@ -370,7 +371,8 @@ const Ze = () => {
|
|
|
370
371
|
{
|
|
371
372
|
label: u.text ? `${u.headerName}: ${u.text}` : u.headerName,
|
|
372
373
|
size: "sm",
|
|
373
|
-
|
|
374
|
+
variant: "brand",
|
|
375
|
+
fill: "solid",
|
|
374
376
|
onRemove: () => p(u.colId)
|
|
375
377
|
},
|
|
376
378
|
u.colId
|
|
@@ -381,7 +383,7 @@ const Ze = () => {
|
|
|
381
383
|
type: "button",
|
|
382
384
|
intent: "ghost",
|
|
383
385
|
size: "sm",
|
|
384
|
-
onClick:
|
|
386
|
+
onClick: m,
|
|
385
387
|
startIcon: /* @__PURE__ */ s($e, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
386
388
|
children: e("dataTable.filterChips.clearAll", "Clear all")
|
|
387
389
|
}
|
|
@@ -396,19 +398,19 @@ const Ye = ({
|
|
|
396
398
|
options: t,
|
|
397
399
|
label: n
|
|
398
400
|
}) => {
|
|
399
|
-
const { t: a } = A(), { getApi: i } = V("DataTable.Toolbar.FacetFilter"), [d,
|
|
400
|
-
function
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
401
|
+
const { t: a } = A(), { getApi: i } = V("DataTable.Toolbar.FacetFilter"), [d, g] = G(null);
|
|
402
|
+
function h(p) {
|
|
403
|
+
g(p);
|
|
404
|
+
const m = i();
|
|
405
|
+
if (m) {
|
|
404
406
|
if (p === null) {
|
|
405
|
-
|
|
407
|
+
m.setColumnFilterModel(e, null), m.onFilterChanged();
|
|
406
408
|
return;
|
|
407
409
|
}
|
|
408
|
-
|
|
410
|
+
m.setColumnFilterModel(e, {
|
|
409
411
|
type: "equals",
|
|
410
412
|
filter: p
|
|
411
|
-
}),
|
|
413
|
+
}), m.onFilterChanged();
|
|
412
414
|
}
|
|
413
415
|
}
|
|
414
416
|
return /* @__PURE__ */ s(
|
|
@@ -418,15 +420,15 @@ const Ye = ({
|
|
|
418
420
|
"aria-label": n ?? a("dataTable.facetFilter.label", "Filter"),
|
|
419
421
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
420
422
|
children: t.map((p) => {
|
|
421
|
-
const
|
|
423
|
+
const m = d === p.value;
|
|
422
424
|
return /* @__PURE__ */ s(
|
|
423
425
|
de,
|
|
424
426
|
{
|
|
425
427
|
type: "button",
|
|
426
428
|
size: "sm",
|
|
427
|
-
intent:
|
|
428
|
-
"aria-pressed":
|
|
429
|
-
onClick: () =>
|
|
429
|
+
intent: m ? "primary" : "secondary",
|
|
430
|
+
"aria-pressed": m,
|
|
431
|
+
onClick: () => h(p.value),
|
|
430
432
|
children: p.label
|
|
431
433
|
},
|
|
432
434
|
String(p.value)
|
|
@@ -439,14 +441,14 @@ Ye.displayName = "DataTable.Toolbar.FacetFilter";
|
|
|
439
441
|
const ir = ["csv", "xlsx", "pdf"];
|
|
440
442
|
async function sr(e, t) {
|
|
441
443
|
if (!e) return;
|
|
442
|
-
const n = await import("./exceljs.min-D2MHbJsF.js").then((f) => f.e), a = new n.Workbook(), i = a.addWorksheet("Sheet1"),
|
|
444
|
+
const n = await import("./exceljs.min-D2MHbJsF.js").then((f) => f.e), a = new n.Workbook(), i = a.addWorksheet("Sheet1"), g = (e.getColumns() ?? []).filter((f) => f.isVisible());
|
|
443
445
|
i.addRow(
|
|
444
|
-
|
|
446
|
+
g.map(
|
|
445
447
|
(f) => e.getDisplayNameForColumn(f, null) ?? f.getColId()
|
|
446
448
|
)
|
|
447
449
|
), e.forEachNodeAfterFilterAndSort((f) => {
|
|
448
450
|
f.data && i.addRow(
|
|
449
|
-
|
|
451
|
+
g.map((w) => {
|
|
450
452
|
const T = e.getCellValue({
|
|
451
453
|
rowNode: f,
|
|
452
454
|
colKey: w,
|
|
@@ -456,12 +458,12 @@ async function sr(e, t) {
|
|
|
456
458
|
})
|
|
457
459
|
);
|
|
458
460
|
});
|
|
459
|
-
const
|
|
460
|
-
|
|
461
|
+
const h = ae("--muted", [240, 240, 240]), p = ae("--foreground", [30, 30, 30]), m = i.getRow(1), u = ([f, w, T]) => `${f.toString(16).padStart(2, "0")}${w.toString(16).padStart(2, "0")}${T.toString(16).padStart(2, "0")}`.toUpperCase();
|
|
462
|
+
m.eachCell((f) => {
|
|
461
463
|
f.font = { bold: !0, color: { argb: `FF${u(p)}` } }, f.fill = {
|
|
462
464
|
type: "pattern",
|
|
463
465
|
pattern: "solid",
|
|
464
|
-
fgColor: { argb: `FF${u(
|
|
466
|
+
fgColor: { argb: `FF${u(h)}` }
|
|
465
467
|
};
|
|
466
468
|
});
|
|
467
469
|
const b = await a.xlsx.writeBuffer(), S = new Blob([b], {
|
|
@@ -480,8 +482,8 @@ function lr() {
|
|
|
480
482
|
}
|
|
481
483
|
const ke = $(
|
|
482
484
|
({ children: e, label: t, intent: n = "outline", ...a }, i) => {
|
|
483
|
-
const { t: d } = A(), { getApi:
|
|
484
|
-
return /* @__PURE__ */ s(et.Provider, { value:
|
|
485
|
+
const { t: d } = A(), { getApi: g } = V("DataTable.Toolbar.ExportMenu"), h = j(() => ({ getApi: g }), [g]), p = e ?? ir.map((m) => /* @__PURE__ */ s(Ae, { format: m }, m));
|
|
486
|
+
return /* @__PURE__ */ s(et.Provider, { value: h, children: /* @__PURE__ */ L(he.Root, { children: [
|
|
485
487
|
/* @__PURE__ */ s(he.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
486
488
|
oe,
|
|
487
489
|
{
|
|
@@ -512,27 +514,27 @@ const Ae = ({
|
|
|
512
514
|
onClick: n,
|
|
513
515
|
fileName: a
|
|
514
516
|
}) => {
|
|
515
|
-
const { t: i } = A(), { getApi: d } = lr(),
|
|
516
|
-
const
|
|
517
|
+
const { t: i } = A(), { getApi: d } = lr(), g = D(() => {
|
|
518
|
+
const h = d();
|
|
517
519
|
if (e === "csv") {
|
|
518
|
-
|
|
520
|
+
h == null || h.exportDataAsCsv();
|
|
519
521
|
return;
|
|
520
522
|
}
|
|
521
523
|
if (e === "pdf") {
|
|
522
|
-
Qe(
|
|
524
|
+
Qe(h, {
|
|
523
525
|
fileName: a ?? "data-table-export.pdf"
|
|
524
526
|
});
|
|
525
527
|
return;
|
|
526
528
|
}
|
|
527
529
|
if (e === "xlsx") {
|
|
528
|
-
sr(
|
|
530
|
+
sr(h, {
|
|
529
531
|
fileName: a ?? "data-table-export.xlsx"
|
|
530
532
|
});
|
|
531
533
|
return;
|
|
532
534
|
}
|
|
533
|
-
n == null || n(
|
|
535
|
+
n == null || n(h);
|
|
534
536
|
}, [e, a, n, d]);
|
|
535
|
-
return /* @__PURE__ */ s(he.Item, { onSelect:
|
|
537
|
+
return /* @__PURE__ */ s(he.Item, { onSelect: g, children: /* @__PURE__ */ L("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
536
538
|
cr(e),
|
|
537
539
|
/* @__PURE__ */ s("span", { children: t ?? dr(i, e) })
|
|
538
540
|
] }) });
|
|
@@ -550,27 +552,27 @@ function ur(e) {
|
|
|
550
552
|
}).filter((a) => a !== null);
|
|
551
553
|
}
|
|
552
554
|
const Pe = $(
|
|
553
|
-
function({ label: t, icon: n, footer: a, header: i, intent: d = "outline", ...
|
|
554
|
-
const { t: p } = A(), { getApi:
|
|
555
|
+
function({ label: t, icon: n, footer: a, header: i, intent: d = "outline", ...g }, h) {
|
|
556
|
+
const { t: p } = A(), { getApi: m, markColumnsUserTouched: u } = V(
|
|
555
557
|
"DataTable.Toolbar.ColumnToggle"
|
|
556
558
|
), [b, S] = G(!1), [C, c] = G([]), [f, w] = G(null), [T, R] = G(null);
|
|
557
559
|
K(() => {
|
|
558
|
-
b && c(ur(
|
|
559
|
-
}, [b,
|
|
560
|
+
b && c(ur(m()));
|
|
561
|
+
}, [b, m]);
|
|
560
562
|
const I = D(
|
|
561
563
|
(v, O) => {
|
|
562
|
-
const M =
|
|
564
|
+
const M = m();
|
|
563
565
|
M && (M.setColumnsVisible([v], O), u == null || u([v]), c(
|
|
564
566
|
(F) => F.map(
|
|
565
567
|
(N) => N.colId === v ? { ...N, visible: O } : N
|
|
566
568
|
)
|
|
567
569
|
));
|
|
568
570
|
},
|
|
569
|
-
[
|
|
571
|
+
[m, u]
|
|
570
572
|
), ee = D(
|
|
571
573
|
(v, O) => {
|
|
572
574
|
if (v === O) return;
|
|
573
|
-
const M =
|
|
575
|
+
const M = m();
|
|
574
576
|
if (!M) return;
|
|
575
577
|
c((z) => {
|
|
576
578
|
const E = z.findIndex((Q) => Q.colId === v), ie = z.findIndex((Q) => Q.colId === O);
|
|
@@ -584,20 +586,20 @@ const Pe = $(
|
|
|
584
586
|
const U = M.getAllGridColumns().findIndex((z) => z.getColId() === O);
|
|
585
587
|
U >= 0 && M.moveColumns([v], U);
|
|
586
588
|
},
|
|
587
|
-
[
|
|
589
|
+
[m]
|
|
588
590
|
), _ = t ?? p("dataTable.columnToggle");
|
|
589
591
|
return /* @__PURE__ */ L(me.Root, { open: b, onOpenChange: S, children: [
|
|
590
592
|
/* @__PURE__ */ s(me.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
591
593
|
oe,
|
|
592
594
|
{
|
|
593
|
-
ref:
|
|
595
|
+
ref: h,
|
|
594
596
|
type: "button",
|
|
595
597
|
intent: d,
|
|
596
598
|
icon: n ?? /* @__PURE__ */ s(tr, { "aria-hidden": !0 }),
|
|
597
599
|
tooltip: _,
|
|
598
600
|
"aria-label": _,
|
|
599
601
|
"aria-haspopup": "dialog",
|
|
600
|
-
...
|
|
602
|
+
...g
|
|
601
603
|
}
|
|
602
604
|
) }),
|
|
603
605
|
/* @__PURE__ */ L(
|
|
@@ -677,20 +679,20 @@ const Pe = $(
|
|
|
677
679
|
);
|
|
678
680
|
Pe.displayName = "DataTable.Toolbar.ColumnToggle";
|
|
679
681
|
const tt = $(
|
|
680
|
-
({ label: e, icon: t, onClick: n, variant: a = "default", size: i = "sm", ...d },
|
|
681
|
-
const { t:
|
|
682
|
+
({ label: e, icon: t, onClick: n, variant: a = "default", size: i = "sm", ...d }, g) => {
|
|
683
|
+
const { t: h } = A(), { getApi: p, selectionCount: m } = V(
|
|
682
684
|
"DataTable.Toolbar.BulkAction"
|
|
683
685
|
);
|
|
684
|
-
return
|
|
686
|
+
return m === 0 ? null : /* @__PURE__ */ L(
|
|
685
687
|
de,
|
|
686
688
|
{
|
|
687
|
-
ref:
|
|
689
|
+
ref: g,
|
|
688
690
|
type: "button",
|
|
689
691
|
intent: a === "destructive" ? "destructive" : "secondary",
|
|
690
692
|
size: i,
|
|
691
693
|
startIcon: rr(t),
|
|
692
694
|
onClick: () => n(p()),
|
|
693
|
-
"aria-label": `${e} (${
|
|
695
|
+
"aria-label": `${e} (${h("dataTable.bulkAction", { count: m })})`,
|
|
694
696
|
...d,
|
|
695
697
|
children: [
|
|
696
698
|
/* @__PURE__ */ s("span", { children: e }),
|
|
@@ -699,7 +701,7 @@ const tt = $(
|
|
|
699
701
|
{
|
|
700
702
|
"aria-hidden": "true",
|
|
701
703
|
className: "ds:ms-[var(--spacing-xs)] ds:opacity-80",
|
|
702
|
-
children:
|
|
704
|
+
children: h("dataTable.bulkAction", { count: m })
|
|
703
705
|
}
|
|
704
706
|
)
|
|
705
707
|
]
|
|
@@ -768,9 +770,9 @@ function gr(e) {
|
|
|
768
770
|
return e == null ? null : typeof e == "string" ? e : String(e);
|
|
769
771
|
}
|
|
770
772
|
function hr(e) {
|
|
771
|
-
const { model: t, onModelChange: n, getValue: a, placeholder: i, defaultOperator: d } = e, { t:
|
|
773
|
+
const { model: t, onModelChange: n, getValue: a, placeholder: i, defaultOperator: d } = e, { t: g } = A("ui"), h = (t == null ? void 0 : t.type) ?? d ?? "contains", [p, m] = G(h), [u, b] = G((t == null ? void 0 : t.filter) ?? "");
|
|
772
774
|
K(() => {
|
|
773
|
-
|
|
775
|
+
m((t == null ? void 0 : t.type) ?? d ?? "contains"), b((t == null ? void 0 : t.filter) ?? "");
|
|
774
776
|
}, [t, d]);
|
|
775
777
|
const S = j(() => mr(Xt.language), []);
|
|
776
778
|
_t({
|
|
@@ -803,14 +805,14 @@ function hr(e) {
|
|
|
803
805
|
n({ type: p, filter: u });
|
|
804
806
|
}
|
|
805
807
|
function c() {
|
|
806
|
-
b(""),
|
|
808
|
+
b(""), m(d ?? "contains"), n(null);
|
|
807
809
|
}
|
|
808
810
|
const f = fr.map(
|
|
809
811
|
(T) => ({
|
|
810
812
|
value: T,
|
|
811
|
-
label:
|
|
813
|
+
label: g(`dataTable.textFilter.operators.${T}`)
|
|
812
814
|
})
|
|
813
|
-
), w = i ??
|
|
815
|
+
), w = i ?? g("dataTable.textFilter.placeholder");
|
|
814
816
|
return /* @__PURE__ */ L(
|
|
815
817
|
"div",
|
|
816
818
|
{
|
|
@@ -824,9 +826,9 @@ function hr(e) {
|
|
|
824
826
|
options: f,
|
|
825
827
|
value: p,
|
|
826
828
|
onValueChange: (T) => {
|
|
827
|
-
T !== "" &&
|
|
829
|
+
T !== "" && m(T);
|
|
828
830
|
},
|
|
829
|
-
"aria-label":
|
|
831
|
+
"aria-label": g("dataTable.textFilter.operators.contains")
|
|
830
832
|
}
|
|
831
833
|
),
|
|
832
834
|
/* @__PURE__ */ s(
|
|
@@ -844,8 +846,8 @@ function hr(e) {
|
|
|
844
846
|
}
|
|
845
847
|
),
|
|
846
848
|
/* @__PURE__ */ L("div", { className: "ds:flex ds:items-center ds:justify-end ds:gap-[var(--spacing-xs)] ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: [
|
|
847
|
-
/* @__PURE__ */ s(de, { intent: "ghost", size: "sm", onClick: c, type: "button", children:
|
|
848
|
-
/* @__PURE__ */ s(de, { intent: "primary", size: "sm", onClick: C, type: "button", children:
|
|
849
|
+
/* @__PURE__ */ s(de, { intent: "ghost", size: "sm", onClick: c, type: "button", children: g("dataTable.textFilter.clear") }),
|
|
850
|
+
/* @__PURE__ */ s(de, { intent: "primary", size: "sm", onClick: C, type: "button", children: g("dataTable.textFilter.apply") })
|
|
849
851
|
] })
|
|
850
852
|
]
|
|
851
853
|
}
|
|
@@ -853,9 +855,9 @@ function hr(e) {
|
|
|
853
855
|
}
|
|
854
856
|
function br(e) {
|
|
855
857
|
var b, S;
|
|
856
|
-
const { model: t, onModelChange: n, column: a } = e, { t: i } = A("ui"), d = ((S = (b = a == null ? void 0 : a.getColDef) == null ? void 0 : b.call(a)) == null ? void 0 : S.filterParams) ?? {},
|
|
858
|
+
const { model: t, onModelChange: n, column: a } = e, { t: i } = A("ui"), d = ((S = (b = a == null ? void 0 : a.getColDef) == null ? void 0 : b.call(a)) == null ? void 0 : S.filterParams) ?? {}, g = d.defaultOperator ?? "contains", h = d.placeholder ?? i("dataTable.textFilter.placeholder"), [p, m] = G((t == null ? void 0 : t.filter) ?? "");
|
|
857
859
|
K(() => {
|
|
858
|
-
|
|
860
|
+
m((t == null ? void 0 : t.filter) ?? "");
|
|
859
861
|
}, [t == null ? void 0 : t.filter]), K(() => {
|
|
860
862
|
if (p === ((t == null ? void 0 : t.filter) ?? "")) return;
|
|
861
863
|
const C = setTimeout(() => {
|
|
@@ -863,21 +865,21 @@ function br(e) {
|
|
|
863
865
|
t && n(null);
|
|
864
866
|
return;
|
|
865
867
|
}
|
|
866
|
-
n({ type:
|
|
868
|
+
n({ type: g, filter: p });
|
|
867
869
|
}, 200);
|
|
868
870
|
return () => clearTimeout(C);
|
|
869
|
-
}, [p,
|
|
871
|
+
}, [p, g, t, n]);
|
|
870
872
|
function u() {
|
|
871
|
-
|
|
873
|
+
m(""), t && n(null);
|
|
872
874
|
}
|
|
873
875
|
return /* @__PURE__ */ s("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
874
876
|
Se,
|
|
875
877
|
{
|
|
876
878
|
size: "sm",
|
|
877
879
|
value: p,
|
|
878
|
-
onChange: (C) =>
|
|
879
|
-
placeholder:
|
|
880
|
-
"aria-label":
|
|
880
|
+
onChange: (C) => m(C.target.value),
|
|
881
|
+
placeholder: h,
|
|
882
|
+
"aria-label": h,
|
|
881
883
|
startAdornment: /* @__PURE__ */ s(Ie, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
882
884
|
endAdornment: p.length > 0 ? /* @__PURE__ */ s(
|
|
883
885
|
"button",
|
|
@@ -905,14 +907,14 @@ function xr(e, t = !0) {
|
|
|
905
907
|
for (const d of n.querySelectorAll(Be)) ge(d);
|
|
906
908
|
})();
|
|
907
909
|
const i = new MutationObserver((d) => {
|
|
908
|
-
for (const
|
|
909
|
-
if (
|
|
910
|
-
ge(
|
|
910
|
+
for (const g of d)
|
|
911
|
+
if (g.type === "attributes")
|
|
912
|
+
ge(g.target);
|
|
911
913
|
else
|
|
912
|
-
for (const
|
|
913
|
-
if (
|
|
914
|
-
ge(
|
|
915
|
-
for (const p of
|
|
914
|
+
for (const h of g.addedNodes)
|
|
915
|
+
if (h instanceof Element) {
|
|
916
|
+
ge(h);
|
|
917
|
+
for (const p of h.querySelectorAll(Be))
|
|
916
918
|
ge(p);
|
|
917
919
|
}
|
|
918
920
|
});
|
|
@@ -944,27 +946,27 @@ function Rr(e) {
|
|
|
944
946
|
var c;
|
|
945
947
|
const t = Re(
|
|
946
948
|
at
|
|
947
|
-
), { t: n } = A(), a = B(null), { data: i, node: d, api:
|
|
949
|
+
), { t: n } = A(), a = B(null), { data: i, node: d, api: g } = e, h = W(i), p = t == null ? void 0 : t.heights, m = d.id, u = B(t);
|
|
948
950
|
if (u.current = t, K(() => {
|
|
949
951
|
const f = a.current;
|
|
950
|
-
if (!f || !
|
|
951
|
-
let w = p.get(
|
|
952
|
+
if (!f || !h || !p || m == null) return;
|
|
953
|
+
let w = p.get(m) ?? 0;
|
|
952
954
|
const T = () => {
|
|
953
955
|
const I = Math.ceil(f.getBoundingClientRect().height);
|
|
954
|
-
I <= 0 || I === w || (w = I, p.set(
|
|
956
|
+
I <= 0 || I === w || (w = I, p.set(m, I), d.setRowHeight(I), g.onRowHeightChanged());
|
|
955
957
|
};
|
|
956
958
|
T();
|
|
957
959
|
const R = new ResizeObserver(T);
|
|
958
960
|
return R.observe(f), () => R.disconnect();
|
|
959
|
-
}, [
|
|
961
|
+
}, [g, m, p, h, d]), K(() => {
|
|
960
962
|
const f = a.current, w = f == null ? void 0 : f.parentElement;
|
|
961
|
-
if (!f || !w || !
|
|
963
|
+
if (!f || !w || !h) return;
|
|
962
964
|
const T = (R) => {
|
|
963
965
|
var I, ee;
|
|
964
966
|
R.target !== w || R.defaultPrevented || (R.key === "Escape" ? (R.stopPropagation(), (ee = (I = u.current) == null ? void 0 : I.onExpandedRowChange) == null || ee.call(I, null)) : R.key === "Enter" && (R.preventDefault(), (f.querySelector(Tr) ?? f).focus()));
|
|
965
967
|
};
|
|
966
968
|
return w.addEventListener("keydown", T), () => w.removeEventListener("keydown", T);
|
|
967
|
-
}, [
|
|
969
|
+
}, [h]), !h) {
|
|
968
970
|
const f = t == null ? void 0 : t.fallbackRenderer;
|
|
969
971
|
return f ? /* @__PURE__ */ s(f, { ...e }) : null;
|
|
970
972
|
}
|
|
@@ -1331,10 +1333,10 @@ function Mr(e, t) {
|
|
|
1331
1333
|
rowData: a,
|
|
1332
1334
|
rowSelection: i,
|
|
1333
1335
|
pagination: d = !1,
|
|
1334
|
-
paginationPageSize:
|
|
1335
|
-
paginationPageSizeSelector:
|
|
1336
|
+
paginationPageSize: g = 25,
|
|
1337
|
+
paginationPageSizeSelector: h = [10, 25, 50, 100],
|
|
1336
1338
|
gridId: p,
|
|
1337
|
-
onSelectionChanged:
|
|
1339
|
+
onSelectionChanged: m,
|
|
1338
1340
|
onSortChanged: u,
|
|
1339
1341
|
onFilterChanged: b,
|
|
1340
1342
|
noRowsOverlay: S,
|
|
@@ -1447,10 +1449,15 @@ function Mr(e, t) {
|
|
|
1447
1449
|
const ze = z.dir() === "rtl", it = a === void 0, st = Zt(), { resolvedTheme: Ge } = Yt(), lt = (Ge === "light-accessible" || Ge === "dark-accessible") && f === "compact" ? "default" : f, dt = j(() => {
|
|
1448
1450
|
if (!i) return;
|
|
1449
1451
|
const r = (o) => !W(o.data);
|
|
1450
|
-
return i === "single" ? {
|
|
1452
|
+
return i === "single" ? {
|
|
1453
|
+
mode: "singleRow",
|
|
1454
|
+
enableClickSelection: !1,
|
|
1455
|
+
isRowSelectable: r
|
|
1456
|
+
} : {
|
|
1451
1457
|
mode: "multiRow",
|
|
1452
1458
|
headerCheckbox: !0,
|
|
1453
1459
|
checkboxes: !0,
|
|
1460
|
+
enableClickSelection: !1,
|
|
1454
1461
|
isRowSelectable: r
|
|
1455
1462
|
};
|
|
1456
1463
|
}, [i]), ue = ze ? "rtl" : "ltr", H = D(
|
|
@@ -1627,8 +1634,8 @@ function Mr(e, t) {
|
|
|
1627
1634
|
const r = (l = E.current) == null ? void 0 : l.api;
|
|
1628
1635
|
if (!r) return;
|
|
1629
1636
|
const o = r.getSelectedRows().filter((y) => !W(y));
|
|
1630
|
-
xe(o.length),
|
|
1631
|
-
}, [
|
|
1637
|
+
xe(o.length), m == null || m(o);
|
|
1638
|
+
}, [m]), Ct = D(
|
|
1632
1639
|
(r) => {
|
|
1633
1640
|
var l;
|
|
1634
1641
|
const o = (l = E.current) == null ? void 0 : l.api;
|
|
@@ -1737,8 +1744,8 @@ function Mr(e, t) {
|
|
|
1737
1744
|
},
|
|
1738
1745
|
rowSelection: dt,
|
|
1739
1746
|
pagination: kt,
|
|
1740
|
-
paginationPageSize:
|
|
1741
|
-
paginationPageSizeSelector:
|
|
1747
|
+
paginationPageSize: g,
|
|
1748
|
+
paginationPageSizeSelector: h,
|
|
1742
1749
|
paginationNumberFormatter: (r) => new Intl.NumberFormat(z.language).format(r.value),
|
|
1743
1750
|
animateRows: !st,
|
|
1744
1751
|
enableRtl: ze,
|
|
@@ -1749,7 +1756,6 @@ function Mr(e, t) {
|
|
|
1749
1756
|
accentedSort: !0,
|
|
1750
1757
|
multiSortKey: "ctrl",
|
|
1751
1758
|
suppressDragLeaveHidesColumns: !0,
|
|
1752
|
-
suppressRowClickSelection: i ? !0 : void 0,
|
|
1753
1759
|
tooltipShowDelay: 500,
|
|
1754
1760
|
tooltipHideDelay: 5e3,
|
|
1755
1761
|
tooltipInteraction: !0,
|
|
@@ -1814,4 +1820,4 @@ export {
|
|
|
1814
1820
|
fa as g,
|
|
1815
1821
|
W as i
|
|
1816
1822
|
};
|
|
1817
|
-
//# sourceMappingURL=data-table-
|
|
1823
|
+
//# sourceMappingURL=data-table-DB5BiVQ0.js.map
|
|
@@ -5,11 +5,11 @@ import * as k from "@radix-ui/react-popover";
|
|
|
5
5
|
import { u as ue } from "./use-controllable-state-BiY4xTzM.js";
|
|
6
6
|
import { u as fe, F as me } from "./form-field-context-B3APVHKx.js";
|
|
7
7
|
import { u as he } from "./registry-DvAUVLHh.js";
|
|
8
|
-
import { u as ge, g as ve, b as ye, i as ke, c as be, t as Ce, d as De, p as Pe, D as Se, C as xe, e as we, f as Ie } from "./date-picker-variants-
|
|
8
|
+
import { u as ge, g as ve, b as ye, i as ke, c as be, t as Ce, d as De, p as Pe, D as Se, C as xe, e as we, f as Ie } from "./date-picker-variants-B9NLAfUK.js";
|
|
9
9
|
import { f as T, i as Oe, b as Ne } from "./format-4HNwNGrN.js";
|
|
10
10
|
import { C as Ve } from "./calendar-days-BGWklvE-.js";
|
|
11
11
|
import { C as Fe } from "./check-DrFSN__t.js";
|
|
12
|
-
import { p as Ae } from "./parse-
|
|
12
|
+
import { p as Ae } from "./parse-DPqj4JtD.js";
|
|
13
13
|
const Ke = {
|
|
14
14
|
id: "date-picker",
|
|
15
15
|
// Persisted single date (value state + set_date) → select_single + set_value,
|
|
@@ -269,4 +269,4 @@ export {
|
|
|
269
269
|
Re as D,
|
|
270
270
|
Ke as d
|
|
271
271
|
};
|
|
272
|
-
//# sourceMappingURL=date-picker-
|
|
272
|
+
//# sourceMappingURL=date-picker-B6NW_PS5.js.map
|
|
@@ -1860,7 +1860,10 @@ const Ae = "ds:bg-[var(--calendar-range-fill)]", gs = "ds:size-[var(--min-target
|
|
|
1860
1860
|
"ds:aria-disabled:opacity-50 ds:aria-disabled:cursor-default"
|
|
1861
1861
|
].join(" "), xs = {
|
|
1862
1862
|
/* ---- Layout shell ---- */
|
|
1863
|
-
|
|
1863
|
+
// `ds:font-sans` is Tailwind's DEFAULT stack (ui-sans-serif, system-ui …), not
|
|
1864
|
+
// the kit's face, so it overrode the correct font the portal root had already
|
|
1865
|
+
// supplied and the calendar rendered in the system font.
|
|
1866
|
+
[h.Root]: "rdp-root ds:relative ds:font-[family-name:var(--font-sans)] ds:text-foreground",
|
|
1864
1867
|
[h.Months]: "rdp-months ds:relative ds:flex ds:flex-wrap ds:gap-[var(--spacing-lg)]",
|
|
1865
1868
|
[h.Month]: "rdp-month ds:flex ds:flex-col",
|
|
1866
1869
|
[h.MonthGrid]: "rdp-month_grid ds:border-collapse",
|
|
@@ -2091,4 +2094,4 @@ export {
|
|
|
2091
2094
|
mt as w,
|
|
2092
2095
|
Hn as x
|
|
2093
2096
|
};
|
|
2094
|
-
//# sourceMappingURL=date-picker-variants-
|
|
2097
|
+
//# sourceMappingURL=date-picker-variants-B9NLAfUK.js.map
|