@alfadocs/ui-kit 0.67.0 → 0.67.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.
- package/dist/_chunks/{ai-tools-rail-DfmewPUN.js → ai-tools-rail-CInA_1-E.js} +2 -2
- package/dist/_chunks/{appointment-tray-CQJ3Nbi5.js → appointment-tray-BMl89NPW.js} +2 -2
- package/dist/_chunks/{care-plan-card-CJei-nl9.js → care-plan-card-BwVUyUBb.js} +3 -3
- package/dist/_chunks/{care-plan-entry-card-EmfrbHu8.js → care-plan-entry-card-VzdQHcOL.js} +2 -2
- package/dist/_chunks/{color-picker-B7xsn6tX.js → color-picker-FXpItIaF.js} +171 -167
- package/dist/_chunks/{editable-currency-cell-renderer-BVJ04DkB.js → editable-currency-cell-renderer-D1ewvJKO.js} +358 -351
- package/dist/_chunks/{marketplace-app-shell-Bu-HD3fy.js → marketplace-app-shell-D4-T9Qzz.js} +2 -2
- package/dist/_chunks/{patient-shell-DrV_iekt.js → patient-shell-BfgufL_q.js} +2 -2
- package/dist/_chunks/{patient-summary-card-ByfIU8N0.js → patient-summary-card-hEmr4eTW.js} +2 -2
- package/dist/_chunks/{payment-request-card-yTjzKQCU.js → payment-request-card-CYE5vhZ0.js} +2 -2
- package/dist/_chunks/{rich-text-editor-BOQr5lHx.js → rich-text-editor-DAeCXiQG.js} +646 -643
- package/dist/_chunks/{scroll-area-eccd_Uf-.js → scroll-area-5wNK0Cyz.js} +3 -3
- package/dist/_chunks/{sidebar-CGjIk_FQ.js → sidebar-DaB4ulxH.js} +344 -340
- package/dist/_chunks/{transaction-chip-BrW8P50O.js → transaction-chip-DK84XCBU.js} +31 -18
- package/dist/agent-catalog.json +1 -1
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/color-picker/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/scroll-area/index.js +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/transaction-chip/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +4 -1
- package/dist/i18n/locales/ar.js +5 -2
- package/dist/i18n/locales/de.d.ts +4 -1
- package/dist/i18n/locales/de.js +5 -2
- package/dist/i18n/locales/el.d.ts +4 -1
- package/dist/i18n/locales/el.js +5 -2
- package/dist/i18n/locales/en.d.ts +4 -1
- package/dist/i18n/locales/en.js +5 -2
- package/dist/i18n/locales/es.d.ts +4 -1
- package/dist/i18n/locales/es.js +5 -2
- package/dist/i18n/locales/fr.d.ts +4 -1
- package/dist/i18n/locales/fr.js +5 -2
- package/dist/i18n/locales/hi.d.ts +4 -1
- package/dist/i18n/locales/hi.js +5 -2
- package/dist/i18n/locales/it.d.ts +4 -1
- package/dist/i18n/locales/it.js +5 -2
- package/dist/i18n/locales/ja.d.ts +4 -1
- package/dist/i18n/locales/ja.js +5 -2
- package/dist/i18n/locales/nl.d.ts +4 -1
- package/dist/i18n/locales/nl.js +5 -2
- package/dist/i18n/locales/pl.d.ts +4 -1
- package/dist/i18n/locales/pl.js +5 -2
- package/dist/i18n/locales/pt.d.ts +4 -1
- package/dist/i18n/locales/pt.js +5 -2
- package/dist/i18n/locales/ro.d.ts +4 -1
- package/dist/i18n/locales/ro.js +5 -2
- package/dist/i18n/locales/ru.d.ts +4 -1
- package/dist/i18n/locales/ru.js +5 -2
- package/dist/i18n/locales/sq.d.ts +4 -1
- package/dist/i18n/locales/sq.js +5 -2
- package/dist/i18n/locales/sv.d.ts +4 -1
- package/dist/i18n/locales/sv.js +5 -2
- package/dist/i18n/locales/tr.d.ts +4 -1
- package/dist/i18n/locales/tr.js +5 -2
- package/dist/i18n/locales/zh.d.ts +4 -1
- package/dist/i18n/locales/zh.js +5 -2
- package/dist/index.js +14 -14
- package/dist/locales/ar.json +5 -2
- package/dist/locales/de.json +5 -2
- package/dist/locales/el.json +5 -2
- package/dist/locales/en.json +5 -2
- package/dist/locales/es.json +5 -2
- package/dist/locales/fr.json +5 -2
- package/dist/locales/hi.json +5 -2
- package/dist/locales/it.json +5 -2
- package/dist/locales/ja.json +5 -2
- package/dist/locales/nl.json +5 -2
- package/dist/locales/pl.json +5 -2
- package/dist/locales/pt.json +5 -2
- package/dist/locales/ro.json +5 -2
- package/dist/locales/ru.json +5 -2
- package/dist/locales/sq.json +5 -2
- package/dist/locales/sv.json +5 -2
- package/dist/locales/tr.json +5 -2
- package/dist/locales/zh.json +5 -2
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@ import { useMemo as z, forwardRef as $, useState as D, useCallback as M, useEffe
|
|
|
3
3
|
import { S as Ct } from "./skeleton-CZbwyJAA.js";
|
|
4
4
|
import { E as xt } from "./empty-state-BLy7tigq.js";
|
|
5
5
|
import { c as Nt } from "./index-D2ZczOXr.js";
|
|
6
|
-
import { useTranslation as
|
|
6
|
+
import { useTranslation as F } from "react-i18next";
|
|
7
7
|
import { useGridFilter as Y, AgGridReact as St } from "ag-grid-react";
|
|
8
8
|
import { ModuleRegistry as wt, AllCommunityModule as Ft } from "ag-grid-community";
|
|
9
9
|
import { B as L } from "./button-DD_0Xdmr.js";
|
|
@@ -137,10 +137,10 @@ const Be = $(
|
|
|
137
137
|
Be.displayName = "DataTable.Toolbar.Actions";
|
|
138
138
|
const Ge = $(
|
|
139
139
|
({ label: t, onExport: e, intent: a = "outline", ...n }, r) => {
|
|
140
|
-
const { t:
|
|
141
|
-
const d =
|
|
140
|
+
const { t: l } = F(), { getApi: o } = _("DataTable.Toolbar.ExportCsv"), f = M(() => {
|
|
141
|
+
const d = o();
|
|
142
142
|
d && (e ? e(d) : d.exportDataAsCsv());
|
|
143
|
-
}, [
|
|
143
|
+
}, [o, e]);
|
|
144
144
|
return /* @__PURE__ */ s(
|
|
145
145
|
G,
|
|
146
146
|
{
|
|
@@ -148,8 +148,8 @@ const Ge = $(
|
|
|
148
148
|
type: "button",
|
|
149
149
|
intent: a,
|
|
150
150
|
icon: /* @__PURE__ */ s(ne, { "aria-hidden": !0 }),
|
|
151
|
-
tooltip: t ??
|
|
152
|
-
onClick:
|
|
151
|
+
tooltip: t ?? l("dataTable.exportCsv"),
|
|
152
|
+
onClick: f,
|
|
153
153
|
...n
|
|
154
154
|
}
|
|
155
155
|
);
|
|
@@ -170,12 +170,12 @@ async function Ve(t, e) {
|
|
|
170
170
|
const [{ jsPDF: a }, { default: n }] = await Promise.all([
|
|
171
171
|
import("./jspdf.es.min-DaapWjR1.js").then((b) => b.j),
|
|
172
172
|
import("./jspdf.plugin.autotable-CSiDNyPn.js")
|
|
173
|
-
]),
|
|
174
|
-
|
|
175
|
-
],
|
|
173
|
+
]), l = (t.getColumns() ?? []).filter((b) => b.isVisible()), o = [
|
|
174
|
+
l.map((b) => t.getDisplayNameForColumn(b, null) ?? "")
|
|
175
|
+
], f = [];
|
|
176
176
|
t.forEachNodeAfterFilterAndSort((b) => {
|
|
177
177
|
if (!b.data) return;
|
|
178
|
-
const x =
|
|
178
|
+
const x = l.map((T) => {
|
|
179
179
|
const h = t.getCellValue({
|
|
180
180
|
rowNode: b,
|
|
181
181
|
colKey: T,
|
|
@@ -183,15 +183,15 @@ async function Ve(t, e) {
|
|
|
183
183
|
});
|
|
184
184
|
return h == null ? "" : String(h);
|
|
185
185
|
});
|
|
186
|
-
|
|
186
|
+
f.push(x);
|
|
187
187
|
});
|
|
188
|
-
const d = H("--muted", [240, 240, 240]), c = H("--foreground", [30, 30, 30]),
|
|
188
|
+
const d = H("--muted", [240, 240, 240]), c = H("--foreground", [30, 30, 30]), i = H("--card-foreground", [30, 30, 30]), u = H("--card", [250, 250, 250]), y = new a({ orientation: "landscape" });
|
|
189
189
|
n(y, {
|
|
190
|
-
head:
|
|
191
|
-
body:
|
|
190
|
+
head: o,
|
|
191
|
+
body: f,
|
|
192
192
|
headStyles: { fillColor: d, textColor: c },
|
|
193
|
-
bodyStyles: { textColor:
|
|
194
|
-
alternateRowStyles: { fillColor:
|
|
193
|
+
bodyStyles: { textColor: i },
|
|
194
|
+
alternateRowStyles: { fillColor: u },
|
|
195
195
|
styles: {
|
|
196
196
|
font: "helvetica",
|
|
197
197
|
fontSize: 10,
|
|
@@ -200,9 +200,9 @@ async function Ve(t, e) {
|
|
|
200
200
|
}), y.save(e.fileName);
|
|
201
201
|
}
|
|
202
202
|
const Ue = $(
|
|
203
|
-
({ label: t, onClick: e, fileName: a, intent: n = "outline", ...r },
|
|
204
|
-
const { t:
|
|
205
|
-
const c =
|
|
203
|
+
({ label: t, onClick: e, fileName: a, intent: n = "outline", ...r }, l) => {
|
|
204
|
+
const { t: o } = F(), { getApi: f } = _("DataTable.Toolbar.ExportPdf"), d = M(() => {
|
|
205
|
+
const c = f();
|
|
206
206
|
if (e) {
|
|
207
207
|
e(c);
|
|
208
208
|
return;
|
|
@@ -210,15 +210,15 @@ const Ue = $(
|
|
|
210
210
|
Ve(c, {
|
|
211
211
|
fileName: a ?? "data-table-export.pdf"
|
|
212
212
|
});
|
|
213
|
-
}, [
|
|
213
|
+
}, [f, e, a]);
|
|
214
214
|
return /* @__PURE__ */ s(
|
|
215
215
|
G,
|
|
216
216
|
{
|
|
217
|
-
ref:
|
|
217
|
+
ref: l,
|
|
218
218
|
type: "button",
|
|
219
219
|
intent: n,
|
|
220
220
|
icon: /* @__PURE__ */ s(Ie, { "aria-hidden": !0 }),
|
|
221
|
-
tooltip: t ??
|
|
221
|
+
tooltip: t ?? o("dataTable.exportPdf"),
|
|
222
222
|
onClick: d,
|
|
223
223
|
...r
|
|
224
224
|
}
|
|
@@ -228,7 +228,7 @@ const Ue = $(
|
|
|
228
228
|
Ue.displayName = "DataTable.Toolbar.ExportPdf";
|
|
229
229
|
const Ke = $(
|
|
230
230
|
({ label: t, intent: e = "outline", ...a }, n) => {
|
|
231
|
-
const { t: r } =
|
|
231
|
+
const { t: r } = F(), { onPrint: l } = _("DataTable.Toolbar.Print");
|
|
232
232
|
return /* @__PURE__ */ s(
|
|
233
233
|
G,
|
|
234
234
|
{
|
|
@@ -237,7 +237,7 @@ const Ke = $(
|
|
|
237
237
|
intent: e,
|
|
238
238
|
icon: /* @__PURE__ */ s(It, { "aria-hidden": !0 }),
|
|
239
239
|
tooltip: t ?? r("dataTable.print"),
|
|
240
|
-
onClick:
|
|
240
|
+
onClick: l,
|
|
241
241
|
...a
|
|
242
242
|
}
|
|
243
243
|
);
|
|
@@ -245,12 +245,12 @@ const Ke = $(
|
|
|
245
245
|
);
|
|
246
246
|
Ke.displayName = "DataTable.Toolbar.Print";
|
|
247
247
|
const We = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
248
|
-
const { t: a } =
|
|
249
|
-
return P(() => (
|
|
250
|
-
const
|
|
251
|
-
|
|
248
|
+
const { t: a } = F(), { getApi: n } = _("DataTable.Toolbar.QuickSearch"), [r, l] = D(""), o = Z(void 0);
|
|
249
|
+
return P(() => (o.current && window.clearTimeout(o.current), o.current = window.setTimeout(() => {
|
|
250
|
+
const f = n();
|
|
251
|
+
f && f.setGridOption("quickFilterText", r);
|
|
252
252
|
}, e), () => {
|
|
253
|
-
|
|
253
|
+
o.current && window.clearTimeout(o.current);
|
|
254
254
|
}), [r, e, n]), // Slot wrapper caps the search at a sensible legible width on desktop —
|
|
255
255
|
// without this, TextInput's `w-full` lets the QuickSearch absorb the
|
|
256
256
|
// entire FilterBar row and push trailing Actions onto a second line at
|
|
@@ -264,11 +264,11 @@ const We = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
|
264
264
|
type: "search",
|
|
265
265
|
size: "sm",
|
|
266
266
|
value: r,
|
|
267
|
-
onChange: (
|
|
267
|
+
onChange: (f) => l(f.target.value),
|
|
268
268
|
placeholder: t ?? a("dataTable.quickSearch.placeholder", "Search…"),
|
|
269
269
|
startAdornment: /* @__PURE__ */ s(me, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
270
270
|
clearable: !0,
|
|
271
|
-
onClear: () =>
|
|
271
|
+
onClear: () => l(""),
|
|
272
272
|
"aria-label": a("dataTable.quickSearch.label", "Quick search")
|
|
273
273
|
}
|
|
274
274
|
) });
|
|
@@ -276,7 +276,7 @@ const We = ({ placeholder: t, debounceMs: e = 150 }) => {
|
|
|
276
276
|
We.displayName = "DataTable.Toolbar.QuickSearch";
|
|
277
277
|
const He = $(
|
|
278
278
|
({ onRefresh: t, label: e, intent: a = "outline", ...n }, r) => {
|
|
279
|
-
const { t:
|
|
279
|
+
const { t: l } = F();
|
|
280
280
|
return /* @__PURE__ */ s(
|
|
281
281
|
G,
|
|
282
282
|
{
|
|
@@ -284,7 +284,7 @@ const He = $(
|
|
|
284
284
|
type: "button",
|
|
285
285
|
intent: a,
|
|
286
286
|
icon: /* @__PURE__ */ s(Rt, { "aria-hidden": !0 }),
|
|
287
|
-
tooltip: e ??
|
|
287
|
+
tooltip: e ?? l("dataTable.refresh", "Refresh"),
|
|
288
288
|
onClick: t,
|
|
289
289
|
...n
|
|
290
290
|
}
|
|
@@ -302,40 +302,40 @@ function Wt(t) {
|
|
|
302
302
|
return typeof e.dateFrom == "string" ? typeof e.dateTo == "string" && e.dateTo ? `${e.dateFrom} – ${e.dateTo}` : String(e.dateFrom) : Array.isArray(e.values) ? e.values.map(String).join(", ") : "";
|
|
303
303
|
}
|
|
304
304
|
const Qe = () => {
|
|
305
|
-
const { t } =
|
|
306
|
-
const
|
|
307
|
-
if (!
|
|
308
|
-
n([]),
|
|
305
|
+
const { t } = F(), { getApi: e } = _("DataTable.Toolbar.FilterChips"), [a, n] = D([]), [r, l] = D(""), o = M(() => {
|
|
306
|
+
const i = e();
|
|
307
|
+
if (!i) {
|
|
308
|
+
n([]), l("");
|
|
309
309
|
return;
|
|
310
310
|
}
|
|
311
|
-
const
|
|
312
|
-
for (const T of Object.keys(
|
|
313
|
-
const h = y.find((g) => g.getColId() === T), p =
|
|
311
|
+
const u = i.getFilterModel() ?? {}, y = i.getColumns() ?? [], b = [];
|
|
312
|
+
for (const T of Object.keys(u)) {
|
|
313
|
+
const h = y.find((g) => g.getColId() === T), p = i.getDisplayNameForColumn(h, null) ?? T;
|
|
314
314
|
b.push({
|
|
315
315
|
colId: T,
|
|
316
316
|
headerName: p,
|
|
317
|
-
text: Wt(
|
|
317
|
+
text: Wt(u[T])
|
|
318
318
|
});
|
|
319
319
|
}
|
|
320
320
|
n(b);
|
|
321
|
-
const x =
|
|
322
|
-
|
|
321
|
+
const x = i.getGridOption("quickFilterText");
|
|
322
|
+
l(typeof x == "string" ? x : "");
|
|
323
323
|
}, [e]);
|
|
324
324
|
if (P(() => {
|
|
325
|
-
const
|
|
326
|
-
if (!
|
|
327
|
-
const
|
|
328
|
-
return
|
|
329
|
-
|
|
325
|
+
const i = e();
|
|
326
|
+
if (!i) return;
|
|
327
|
+
const u = (y) => o();
|
|
328
|
+
return i.addEventListener("filterChanged", u), o(), () => {
|
|
329
|
+
i.removeEventListener("filterChanged", u);
|
|
330
330
|
};
|
|
331
|
-
}, [e,
|
|
332
|
-
function d(
|
|
333
|
-
const
|
|
334
|
-
|
|
331
|
+
}, [e, o]), a.length + (r ? 1 : 0) === 0) return null;
|
|
332
|
+
function d(i) {
|
|
333
|
+
const u = e();
|
|
334
|
+
u && u.destroyFilter(i);
|
|
335
335
|
}
|
|
336
336
|
function c() {
|
|
337
|
-
const
|
|
338
|
-
|
|
337
|
+
const i = e();
|
|
338
|
+
i && (i.setFilterModel(null), i.setGridOption("quickFilterText", ""), l(""));
|
|
339
339
|
}
|
|
340
340
|
return /* @__PURE__ */ I(
|
|
341
341
|
"div",
|
|
@@ -351,20 +351,20 @@ const Qe = () => {
|
|
|
351
351
|
size: "sm",
|
|
352
352
|
fill: "outline",
|
|
353
353
|
onRemove: () => {
|
|
354
|
-
const
|
|
355
|
-
|
|
354
|
+
const i = e();
|
|
355
|
+
i == null || i.setGridOption("quickFilterText", ""), l("");
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
358
|
),
|
|
359
|
-
a.map((
|
|
359
|
+
a.map((i) => /* @__PURE__ */ s(
|
|
360
360
|
J,
|
|
361
361
|
{
|
|
362
|
-
label:
|
|
362
|
+
label: i.text ? `${i.headerName}: ${i.text}` : i.headerName,
|
|
363
363
|
size: "sm",
|
|
364
364
|
fill: "outline",
|
|
365
|
-
onRemove: () => d(
|
|
365
|
+
onRemove: () => d(i.colId)
|
|
366
366
|
},
|
|
367
|
-
|
|
367
|
+
i.colId
|
|
368
368
|
)),
|
|
369
369
|
/* @__PURE__ */ s(
|
|
370
370
|
L,
|
|
@@ -387,9 +387,9 @@ const Xe = ({
|
|
|
387
387
|
options: e,
|
|
388
388
|
label: a
|
|
389
389
|
}) => {
|
|
390
|
-
const { t: n } =
|
|
391
|
-
function
|
|
392
|
-
|
|
390
|
+
const { t: n } = F(), { getApi: r } = _("DataTable.Toolbar.FacetFilter"), [l, o] = D(null);
|
|
391
|
+
function f(d) {
|
|
392
|
+
o(d);
|
|
393
393
|
const c = r();
|
|
394
394
|
if (c) {
|
|
395
395
|
if (d === null) {
|
|
@@ -409,7 +409,7 @@ const Xe = ({
|
|
|
409
409
|
"aria-label": a ?? n("dataTable.facetFilter.label", "Filter"),
|
|
410
410
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
411
411
|
children: e.map((d) => {
|
|
412
|
-
const c =
|
|
412
|
+
const c = l === d.value;
|
|
413
413
|
return /* @__PURE__ */ s(
|
|
414
414
|
L,
|
|
415
415
|
{
|
|
@@ -417,7 +417,7 @@ const Xe = ({
|
|
|
417
417
|
size: "sm",
|
|
418
418
|
intent: c ? "primary" : "secondary",
|
|
419
419
|
"aria-pressed": c,
|
|
420
|
-
onClick: () =>
|
|
420
|
+
onClick: () => f(d.value),
|
|
421
421
|
children: d.label
|
|
422
422
|
},
|
|
423
423
|
String(d.value)
|
|
@@ -430,14 +430,14 @@ Xe.displayName = "DataTable.Toolbar.FacetFilter";
|
|
|
430
430
|
const Ht = ["csv", "xlsx", "pdf"];
|
|
431
431
|
async function Qt(t, e) {
|
|
432
432
|
if (!t) return;
|
|
433
|
-
const a = await import("./exceljs.min-DUJ-5CGx.js").then((T) => T.e), n = new a.Workbook(), r = n.addWorksheet("Sheet1"),
|
|
433
|
+
const a = await import("./exceljs.min-DUJ-5CGx.js").then((T) => T.e), n = new a.Workbook(), r = n.addWorksheet("Sheet1"), o = (t.getColumns() ?? []).filter((T) => T.isVisible());
|
|
434
434
|
r.addRow(
|
|
435
|
-
|
|
435
|
+
o.map(
|
|
436
436
|
(T) => t.getDisplayNameForColumn(T, null) ?? T.getColId()
|
|
437
437
|
)
|
|
438
438
|
), t.forEachNodeAfterFilterAndSort((T) => {
|
|
439
439
|
T.data && r.addRow(
|
|
440
|
-
|
|
440
|
+
o.map((h) => {
|
|
441
441
|
const p = t.getCellValue({
|
|
442
442
|
rowNode: T,
|
|
443
443
|
colKey: h,
|
|
@@ -447,15 +447,15 @@ async function Qt(t, e) {
|
|
|
447
447
|
})
|
|
448
448
|
);
|
|
449
449
|
});
|
|
450
|
-
const
|
|
450
|
+
const f = H("--muted", [240, 240, 240]), d = H("--foreground", [30, 30, 30]), c = r.getRow(1), i = ([T, h, p]) => `${T.toString(16).padStart(2, "0")}${h.toString(16).padStart(2, "0")}${p.toString(16).padStart(2, "0")}`.toUpperCase();
|
|
451
451
|
c.eachCell((T) => {
|
|
452
|
-
T.font = { bold: !0, color: { argb: `FF${
|
|
452
|
+
T.font = { bold: !0, color: { argb: `FF${i(d)}` } }, T.fill = {
|
|
453
453
|
type: "pattern",
|
|
454
454
|
pattern: "solid",
|
|
455
|
-
fgColor: { argb: `FF${
|
|
455
|
+
fgColor: { argb: `FF${i(f)}` }
|
|
456
456
|
};
|
|
457
457
|
});
|
|
458
|
-
const
|
|
458
|
+
const u = await n.xlsx.writeBuffer(), y = new Blob([u], {
|
|
459
459
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
460
460
|
}), b = URL.createObjectURL(y), x = document.createElement("a");
|
|
461
461
|
x.href = b, x.download = e.fileName, document.body.appendChild(x), x.click(), document.body.removeChild(x), URL.revokeObjectURL(b);
|
|
@@ -470,7 +470,7 @@ function Xt() {
|
|
|
470
470
|
return t;
|
|
471
471
|
}
|
|
472
472
|
const Ze = ({ children: t, label: e }) => {
|
|
473
|
-
const { t: a } =
|
|
473
|
+
const { t: a } = F(), { getApi: n } = _("DataTable.Toolbar.ExportMenu"), r = z(() => ({ getApi: n }), [n]), l = t ?? Ht.map((o) => /* @__PURE__ */ s(ge, { format: o }, o));
|
|
474
474
|
return /* @__PURE__ */ s(Je.Provider, { value: r, children: /* @__PURE__ */ I(B.Root, { children: [
|
|
475
475
|
/* @__PURE__ */ s(B.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
476
476
|
G,
|
|
@@ -483,7 +483,7 @@ const Ze = ({ children: t, label: e }) => {
|
|
|
483
483
|
"aria-haspopup": "menu"
|
|
484
484
|
}
|
|
485
485
|
) }),
|
|
486
|
-
/* @__PURE__ */ s(B.Content, { align: "end", sideOffset: 4, children:
|
|
486
|
+
/* @__PURE__ */ s(B.Content, { align: "end", sideOffset: 4, children: l })
|
|
487
487
|
] }) });
|
|
488
488
|
};
|
|
489
489
|
Ze.displayName = "DataTable.Toolbar.ExportMenu";
|
|
@@ -499,27 +499,27 @@ const ge = ({
|
|
|
499
499
|
onClick: a,
|
|
500
500
|
fileName: n
|
|
501
501
|
}) => {
|
|
502
|
-
const { t: r } =
|
|
503
|
-
const
|
|
502
|
+
const { t: r } = F(), { getApi: l } = Xt(), o = M(() => {
|
|
503
|
+
const f = l();
|
|
504
504
|
if (t === "csv") {
|
|
505
|
-
|
|
505
|
+
f == null || f.exportDataAsCsv();
|
|
506
506
|
return;
|
|
507
507
|
}
|
|
508
508
|
if (t === "pdf") {
|
|
509
|
-
Ve(
|
|
509
|
+
Ve(f, {
|
|
510
510
|
fileName: n ?? "data-table-export.pdf"
|
|
511
511
|
});
|
|
512
512
|
return;
|
|
513
513
|
}
|
|
514
514
|
if (t === "xlsx") {
|
|
515
|
-
Qt(
|
|
515
|
+
Qt(f, {
|
|
516
516
|
fileName: n ?? "data-table-export.xlsx"
|
|
517
517
|
});
|
|
518
518
|
return;
|
|
519
519
|
}
|
|
520
|
-
a == null || a(
|
|
521
|
-
}, [t, n, a,
|
|
522
|
-
return /* @__PURE__ */ s(B.Item, { onSelect:
|
|
520
|
+
a == null || a(f);
|
|
521
|
+
}, [t, n, a, l]);
|
|
522
|
+
return /* @__PURE__ */ s(B.Item, { onSelect: o, children: /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
523
523
|
Zt(t),
|
|
524
524
|
/* @__PURE__ */ s("span", { children: e ?? Jt(r, t) })
|
|
525
525
|
] }) });
|
|
@@ -533,10 +533,10 @@ function Yt(t) {
|
|
|
533
533
|
}).filter((a) => a !== null) : [];
|
|
534
534
|
}
|
|
535
535
|
const Ye = ({ label: t, icon: e, footer: a }) => {
|
|
536
|
-
const { t: n } =
|
|
536
|
+
const { t: n } = F(), { getApi: r } = _("DataTable.Toolbar.ColumnToggle"), [l, o] = D(!1), [f, d] = D([]), [c, i] = D(null), [u, y] = D(null);
|
|
537
537
|
P(() => {
|
|
538
|
-
|
|
539
|
-
}, [
|
|
538
|
+
l && d(Yt(r()));
|
|
539
|
+
}, [l, r]);
|
|
540
540
|
const b = M(
|
|
541
541
|
(h, p) => {
|
|
542
542
|
const g = r();
|
|
@@ -553,17 +553,17 @@ const Ye = ({ label: t, icon: e, footer: a }) => {
|
|
|
553
553
|
const g = r();
|
|
554
554
|
if (!g) return;
|
|
555
555
|
d((v) => {
|
|
556
|
-
const S = v.findIndex((
|
|
556
|
+
const S = v.findIndex((R) => R.colId === h), E = v.findIndex((R) => R.colId === p);
|
|
557
557
|
if (S < 0 || E < 0) return v;
|
|
558
558
|
const k = [...v], [q] = k.splice(S, 1);
|
|
559
559
|
return k.splice(E, 0, q), k;
|
|
560
560
|
});
|
|
561
|
-
const m =
|
|
561
|
+
const m = f.findIndex((v) => v.colId === p);
|
|
562
562
|
m >= 0 && g.moveColumns([h], m);
|
|
563
563
|
},
|
|
564
|
-
[r,
|
|
564
|
+
[r, f]
|
|
565
565
|
), T = t ?? n("dataTable.columnToggle");
|
|
566
|
-
return /* @__PURE__ */ I(ee.Root, { open:
|
|
566
|
+
return /* @__PURE__ */ I(ee.Root, { open: l, onOpenChange: o, children: [
|
|
567
567
|
/* @__PURE__ */ s(ee.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
568
568
|
G,
|
|
569
569
|
{
|
|
@@ -581,14 +581,14 @@ const Ye = ({ label: t, icon: e, footer: a }) => {
|
|
|
581
581
|
{
|
|
582
582
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
583
583
|
"aria-label": T,
|
|
584
|
-
children:
|
|
585
|
-
const p = c === h.colId, g =
|
|
584
|
+
children: f.map((h) => {
|
|
585
|
+
const p = c === h.colId, g = u === h.colId && c !== h.colId;
|
|
586
586
|
return /* @__PURE__ */ I(
|
|
587
587
|
"li",
|
|
588
588
|
{
|
|
589
589
|
draggable: !0,
|
|
590
590
|
onDragStart: (m) => {
|
|
591
|
-
|
|
591
|
+
i(h.colId), m.dataTransfer.effectAllowed = "move", m.dataTransfer.setData("text/plain", h.colId);
|
|
592
592
|
},
|
|
593
593
|
onDragOver: (m) => {
|
|
594
594
|
m.preventDefault(), m.dataTransfer.dropEffect = "move", y(h.colId);
|
|
@@ -599,10 +599,10 @@ const Ye = ({ label: t, icon: e, footer: a }) => {
|
|
|
599
599
|
onDrop: (m) => {
|
|
600
600
|
m.preventDefault();
|
|
601
601
|
const v = m.dataTransfer.getData("text/plain");
|
|
602
|
-
v && x(v, h.colId),
|
|
602
|
+
v && x(v, h.colId), i(null), y(null);
|
|
603
603
|
},
|
|
604
604
|
onDragEnd: () => {
|
|
605
|
-
|
|
605
|
+
i(null), y(null);
|
|
606
606
|
},
|
|
607
607
|
className: [
|
|
608
608
|
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:rounded-[var(--radius-sm)] ds:px-[var(--spacing-xs)] ds:py-[var(--spacing-2xs,var(--spacing-xs))] ds:transition-colors",
|
|
@@ -639,21 +639,21 @@ const Ye = ({ label: t, icon: e, footer: a }) => {
|
|
|
639
639
|
};
|
|
640
640
|
Ye.displayName = "DataTable.Toolbar.ColumnToggle";
|
|
641
641
|
const et = $(
|
|
642
|
-
({ label: t, icon: e, onClick: a, variant: n = "default", size: r = "sm", ...
|
|
643
|
-
const { t:
|
|
642
|
+
({ label: t, icon: e, onClick: a, variant: n = "default", size: r = "sm", ...l }, o) => {
|
|
643
|
+
const { t: f } = F(), { getApi: d, selectionCount: c } = _(
|
|
644
644
|
"DataTable.Toolbar.BulkAction"
|
|
645
645
|
);
|
|
646
646
|
return c === 0 ? null : /* @__PURE__ */ I(
|
|
647
647
|
L,
|
|
648
648
|
{
|
|
649
|
-
ref:
|
|
649
|
+
ref: o,
|
|
650
650
|
type: "button",
|
|
651
651
|
intent: n === "destructive" ? "destructive" : "secondary",
|
|
652
652
|
size: r,
|
|
653
653
|
startIcon: Vt(e),
|
|
654
654
|
onClick: () => a(d()),
|
|
655
|
-
"aria-label": `${t} (${
|
|
656
|
-
...
|
|
655
|
+
"aria-label": `${t} (${f("dataTable.bulkAction", { count: c })})`,
|
|
656
|
+
...l,
|
|
657
657
|
children: [
|
|
658
658
|
/* @__PURE__ */ s("span", { children: t }),
|
|
659
659
|
/* @__PURE__ */ s(
|
|
@@ -661,7 +661,7 @@ const et = $(
|
|
|
661
661
|
{
|
|
662
662
|
"aria-hidden": "true",
|
|
663
663
|
className: "ds:ms-[var(--spacing-xs)] ds:opacity-80",
|
|
664
|
-
children:
|
|
664
|
+
children: f("dataTable.bulkAction", { count: c })
|
|
665
665
|
}
|
|
666
666
|
)
|
|
667
667
|
]
|
|
@@ -702,9 +702,9 @@ function aa(t) {
|
|
|
702
702
|
function a(n, r) {
|
|
703
703
|
if (r.length === 0) return 0;
|
|
704
704
|
if (r.length > n.length) return -1;
|
|
705
|
-
for (let
|
|
706
|
-
if (e.compare(n.slice(
|
|
707
|
-
return
|
|
705
|
+
for (let l = 0; l <= n.length - r.length; l += 1)
|
|
706
|
+
if (e.compare(n.slice(l, l + r.length), r) === 0)
|
|
707
|
+
return l;
|
|
708
708
|
return -1;
|
|
709
709
|
}
|
|
710
710
|
return {
|
|
@@ -721,10 +721,10 @@ function na(t) {
|
|
|
721
721
|
return t == null ? null : typeof t == "string" ? t : String(t);
|
|
722
722
|
}
|
|
723
723
|
function ra(t) {
|
|
724
|
-
const { model: e, onModelChange: a, getValue: n, placeholder: r, defaultOperator:
|
|
724
|
+
const { model: e, onModelChange: a, getValue: n, placeholder: r, defaultOperator: l } = t, { t: o } = F("ui"), f = (e == null ? void 0 : e.type) ?? l ?? "contains", [d, c] = D(f), [i, u] = D((e == null ? void 0 : e.filter) ?? "");
|
|
725
725
|
P(() => {
|
|
726
|
-
c((e == null ? void 0 : e.type) ??
|
|
727
|
-
}, [e,
|
|
726
|
+
c((e == null ? void 0 : e.type) ?? l ?? "contains"), u((e == null ? void 0 : e.filter) ?? "");
|
|
727
|
+
}, [e, l]);
|
|
728
728
|
const y = z(() => aa(zt.language), []);
|
|
729
729
|
Y({
|
|
730
730
|
doesFilterPass: (p) => {
|
|
@@ -749,21 +749,21 @@ function ra(t) {
|
|
|
749
749
|
}
|
|
750
750
|
});
|
|
751
751
|
function b() {
|
|
752
|
-
if (
|
|
752
|
+
if (i.trim() === "") {
|
|
753
753
|
a(null);
|
|
754
754
|
return;
|
|
755
755
|
}
|
|
756
|
-
a({ type: d, filter:
|
|
756
|
+
a({ type: d, filter: i });
|
|
757
757
|
}
|
|
758
758
|
function x() {
|
|
759
|
-
|
|
759
|
+
u(""), c(l ?? "contains"), a(null);
|
|
760
760
|
}
|
|
761
761
|
const T = ta.map(
|
|
762
762
|
(p) => ({
|
|
763
763
|
value: p,
|
|
764
|
-
label:
|
|
764
|
+
label: o(`dataTable.textFilter.operators.${p}`)
|
|
765
765
|
})
|
|
766
|
-
), h = r ??
|
|
766
|
+
), h = r ?? o("dataTable.textFilter.placeholder");
|
|
767
767
|
return /* @__PURE__ */ I(
|
|
768
768
|
"div",
|
|
769
769
|
{
|
|
@@ -779,15 +779,15 @@ function ra(t) {
|
|
|
779
779
|
onValueChange: (p) => {
|
|
780
780
|
p !== "" && c(p);
|
|
781
781
|
},
|
|
782
|
-
"aria-label":
|
|
782
|
+
"aria-label": o("dataTable.textFilter.operators.contains")
|
|
783
783
|
}
|
|
784
784
|
),
|
|
785
785
|
/* @__PURE__ */ s(
|
|
786
786
|
pe,
|
|
787
787
|
{
|
|
788
788
|
size: "sm",
|
|
789
|
-
value:
|
|
790
|
-
onChange: (p) =>
|
|
789
|
+
value: i,
|
|
790
|
+
onChange: (p) => u(p.target.value),
|
|
791
791
|
onKeyDown: (p) => {
|
|
792
792
|
p.key === "Enter" && (p.preventDefault(), b());
|
|
793
793
|
},
|
|
@@ -797,16 +797,16 @@ function ra(t) {
|
|
|
797
797
|
}
|
|
798
798
|
),
|
|
799
799
|
/* @__PURE__ */ I("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: [
|
|
800
|
-
/* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: x, type: "button", children:
|
|
801
|
-
/* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: b, type: "button", children:
|
|
800
|
+
/* @__PURE__ */ s(L, { intent: "ghost", size: "sm", onClick: x, type: "button", children: o("dataTable.textFilter.clear") }),
|
|
801
|
+
/* @__PURE__ */ s(L, { intent: "primary", size: "sm", onClick: b, type: "button", children: o("dataTable.textFilter.apply") })
|
|
802
802
|
] })
|
|
803
803
|
]
|
|
804
804
|
}
|
|
805
805
|
);
|
|
806
806
|
}
|
|
807
807
|
function sa(t) {
|
|
808
|
-
var
|
|
809
|
-
const { model: e, onModelChange: a, column: n } = t, { t: r } =
|
|
808
|
+
var u, y;
|
|
809
|
+
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), l = ((y = (u = n == null ? void 0 : n.getColDef) == null ? void 0 : u.call(n)) == null ? void 0 : y.filterParams) ?? {}, o = l.defaultOperator ?? "contains", f = l.placeholder ?? r("dataTable.textFilter.placeholder"), [d, c] = D((e == null ? void 0 : e.filter) ?? "");
|
|
810
810
|
P(() => {
|
|
811
811
|
c((e == null ? void 0 : e.filter) ?? "");
|
|
812
812
|
}, [e == null ? void 0 : e.filter]), P(() => {
|
|
@@ -816,11 +816,11 @@ function sa(t) {
|
|
|
816
816
|
e && a(null);
|
|
817
817
|
return;
|
|
818
818
|
}
|
|
819
|
-
a({ type:
|
|
819
|
+
a({ type: o, filter: d });
|
|
820
820
|
}, 200);
|
|
821
821
|
return () => clearTimeout(b);
|
|
822
|
-
}, [d,
|
|
823
|
-
function
|
|
822
|
+
}, [d, o, e, a]);
|
|
823
|
+
function i() {
|
|
824
824
|
c(""), e && a(null);
|
|
825
825
|
}
|
|
826
826
|
return /* @__PURE__ */ s("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
@@ -829,15 +829,15 @@ function sa(t) {
|
|
|
829
829
|
size: "sm",
|
|
830
830
|
value: d,
|
|
831
831
|
onChange: (b) => c(b.target.value),
|
|
832
|
-
placeholder:
|
|
833
|
-
"aria-label":
|
|
832
|
+
placeholder: f,
|
|
833
|
+
"aria-label": f,
|
|
834
834
|
startAdornment: /* @__PURE__ */ s(me, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
835
835
|
endAdornment: d.length > 0 ? /* @__PURE__ */ s(
|
|
836
836
|
"button",
|
|
837
837
|
{
|
|
838
838
|
type: "button",
|
|
839
839
|
"aria-label": r("dataTable.textFilter.clear"),
|
|
840
|
-
onClick:
|
|
840
|
+
onClick: i,
|
|
841
841
|
className: "ds:pointer-events-auto ds:flex ds:items-center ds:text-[var(--muted-foreground)] ds:hover:text-[var(--foreground)] ds:transition-colors ds:duration-[var(--animation-duration)] ds:motion-reduce:transition-none",
|
|
842
842
|
children: /* @__PURE__ */ s(ke, { "aria-hidden": "true", className: "ds:size-4" })
|
|
843
843
|
}
|
|
@@ -972,7 +972,7 @@ const oa = Nt("ag-theme-alfadocs ds:w-full", {
|
|
|
972
972
|
}
|
|
973
973
|
});
|
|
974
974
|
function ia() {
|
|
975
|
-
const { t } =
|
|
975
|
+
const { t } = F();
|
|
976
976
|
return z(
|
|
977
977
|
() => ({
|
|
978
978
|
// Filter strings
|
|
@@ -1024,7 +1024,7 @@ function ca() {
|
|
|
1024
1024
|
);
|
|
1025
1025
|
}
|
|
1026
1026
|
function da() {
|
|
1027
|
-
const { t } =
|
|
1027
|
+
const { t } = F();
|
|
1028
1028
|
return /* @__PURE__ */ s(
|
|
1029
1029
|
xt,
|
|
1030
1030
|
{
|
|
@@ -1057,13 +1057,13 @@ function pa(t, e) {
|
|
|
1057
1057
|
columnDefs: a,
|
|
1058
1058
|
rowData: n,
|
|
1059
1059
|
rowSelection: r,
|
|
1060
|
-
pagination:
|
|
1061
|
-
paginationPageSize:
|
|
1062
|
-
paginationPageSizeSelector:
|
|
1060
|
+
pagination: l = !1,
|
|
1061
|
+
paginationPageSize: o = 25,
|
|
1062
|
+
paginationPageSizeSelector: f = [10, 25, 50, 100],
|
|
1063
1063
|
gridId: d,
|
|
1064
1064
|
onSelectionChanged: c,
|
|
1065
|
-
onSortChanged:
|
|
1066
|
-
onFilterChanged:
|
|
1065
|
+
onSortChanged: i,
|
|
1066
|
+
onFilterChanged: u,
|
|
1067
1067
|
noRowsOverlay: y,
|
|
1068
1068
|
loadingOverlay: b,
|
|
1069
1069
|
gridOptions: x,
|
|
@@ -1075,11 +1075,11 @@ function pa(t, e) {
|
|
|
1075
1075
|
pinnedBottomRowData: v,
|
|
1076
1076
|
printMode: S = !1,
|
|
1077
1077
|
children: E
|
|
1078
|
-
} = t, { t: k, i18n: q } =
|
|
1078
|
+
} = t, { t: k, i18n: q } = F(), R = Z(null), [V, at] = D(0), [se, le] = D(""), nt = ia(), oe = z(
|
|
1079
1079
|
() => ({
|
|
1080
1080
|
getSelection: () => {
|
|
1081
1081
|
var w;
|
|
1082
|
-
const C = (w =
|
|
1082
|
+
const C = (w = R.current) == null ? void 0 : w.api;
|
|
1083
1083
|
if (!C) return [];
|
|
1084
1084
|
const N = [];
|
|
1085
1085
|
for (const O of C.getSelectedNodes())
|
|
@@ -1088,7 +1088,7 @@ function pa(t, e) {
|
|
|
1088
1088
|
},
|
|
1089
1089
|
setSelection: (C) => {
|
|
1090
1090
|
var O;
|
|
1091
|
-
const N = (O =
|
|
1091
|
+
const N = (O = R.current) == null ? void 0 : O.api;
|
|
1092
1092
|
if (!N) return;
|
|
1093
1093
|
const w = new Set(C);
|
|
1094
1094
|
N.forEachNode((A) => {
|
|
@@ -1097,7 +1097,7 @@ function pa(t, e) {
|
|
|
1097
1097
|
},
|
|
1098
1098
|
selectRange: (C, N) => {
|
|
1099
1099
|
var he;
|
|
1100
|
-
const w = (he =
|
|
1100
|
+
const w = (he = R.current) == null ? void 0 : he.api;
|
|
1101
1101
|
if (!w) return;
|
|
1102
1102
|
const O = [];
|
|
1103
1103
|
w.forEachNodeAfterFilterAndSort((K) => {
|
|
@@ -1112,24 +1112,24 @@ function pa(t, e) {
|
|
|
1112
1112
|
},
|
|
1113
1113
|
clearSelection: () => {
|
|
1114
1114
|
var C, N;
|
|
1115
|
-
(N = (C =
|
|
1115
|
+
(N = (C = R.current) == null ? void 0 : C.api) == null || N.deselectAll();
|
|
1116
1116
|
},
|
|
1117
1117
|
getFilter: () => {
|
|
1118
1118
|
var C, N;
|
|
1119
|
-
return ((N = (C =
|
|
1119
|
+
return ((N = (C = R.current) == null ? void 0 : C.api) == null ? void 0 : N.getFilterModel()) ?? {};
|
|
1120
1120
|
},
|
|
1121
1121
|
setFilter: (C) => {
|
|
1122
1122
|
var N, w;
|
|
1123
|
-
(w = (N =
|
|
1123
|
+
(w = (N = R.current) == null ? void 0 : N.api) == null || w.setFilterModel(C);
|
|
1124
1124
|
},
|
|
1125
1125
|
getSort: () => {
|
|
1126
1126
|
var N;
|
|
1127
|
-
const C = (N =
|
|
1127
|
+
const C = (N = R.current) == null ? void 0 : N.api;
|
|
1128
1128
|
return C ? C.getColumnState().filter((w) => w.sort === "asc" || w.sort === "desc").map((w) => ({ colId: w.colId, sort: w.sort })) : [];
|
|
1129
1129
|
},
|
|
1130
1130
|
setSort: (C) => {
|
|
1131
1131
|
var O;
|
|
1132
|
-
const N = (O =
|
|
1132
|
+
const N = (O = R.current) == null ? void 0 : O.api;
|
|
1133
1133
|
if (!N) return;
|
|
1134
1134
|
const w = N.getColumnState().map((A) => {
|
|
1135
1135
|
const j = C.find((U) => U.colId === A.colId);
|
|
@@ -1139,15 +1139,15 @@ function pa(t, e) {
|
|
|
1139
1139
|
},
|
|
1140
1140
|
getCurrentPage: () => {
|
|
1141
1141
|
var C, N;
|
|
1142
|
-
return ((N = (C =
|
|
1142
|
+
return ((N = (C = R.current) == null ? void 0 : C.api) == null ? void 0 : N.paginationGetCurrentPage()) ?? 0;
|
|
1143
1143
|
},
|
|
1144
1144
|
goToPage: (C) => {
|
|
1145
1145
|
var N, w;
|
|
1146
|
-
(w = (N =
|
|
1146
|
+
(w = (N = R.current) == null ? void 0 : N.api) == null || w.paginationGoToPage(C);
|
|
1147
1147
|
},
|
|
1148
1148
|
getRawApi: () => {
|
|
1149
1149
|
var C;
|
|
1150
|
-
return (C =
|
|
1150
|
+
return (C = R.current) == null ? void 0 : C.api;
|
|
1151
1151
|
}
|
|
1152
1152
|
}),
|
|
1153
1153
|
[]
|
|
@@ -1162,25 +1162,25 @@ function pa(t, e) {
|
|
|
1162
1162
|
};
|
|
1163
1163
|
}, [r]), ct = M(() => {
|
|
1164
1164
|
var N;
|
|
1165
|
-
if (!d || !((N =
|
|
1165
|
+
if (!d || !((N = R.current) != null && N.api)) return;
|
|
1166
1166
|
const C = ua(d);
|
|
1167
|
-
C &&
|
|
1167
|
+
C && R.current.api.applyColumnState({
|
|
1168
1168
|
state: C,
|
|
1169
1169
|
applyOrder: !0
|
|
1170
1170
|
});
|
|
1171
1171
|
}, [d]), ie = M(() => {
|
|
1172
1172
|
var C;
|
|
1173
|
-
d && ((C =
|
|
1173
|
+
d && ((C = R.current) != null && C.api) && fa(d, R.current.api);
|
|
1174
1174
|
}, [d]), dt = M(() => {
|
|
1175
1175
|
var w;
|
|
1176
|
-
const C = (w =
|
|
1176
|
+
const C = (w = R.current) == null ? void 0 : w.api;
|
|
1177
1177
|
if (!C) return;
|
|
1178
1178
|
const N = C.getSelectedRows();
|
|
1179
1179
|
at(N.length), c == null || c(N);
|
|
1180
1180
|
}, [c]), ut = M(
|
|
1181
1181
|
(C) => {
|
|
1182
1182
|
var w;
|
|
1183
|
-
const N = (w =
|
|
1183
|
+
const N = (w = R.current) == null ? void 0 : w.api;
|
|
1184
1184
|
if (N) {
|
|
1185
1185
|
const A = N.getColumnState().find((j) => j.sort);
|
|
1186
1186
|
if (A) {
|
|
@@ -1194,14 +1194,14 @@ function pa(t, e) {
|
|
|
1194
1194
|
} else
|
|
1195
1195
|
le("");
|
|
1196
1196
|
}
|
|
1197
|
-
|
|
1197
|
+
i == null || i(C);
|
|
1198
1198
|
},
|
|
1199
|
-
[
|
|
1199
|
+
[i, k]
|
|
1200
1200
|
), ft = M(
|
|
1201
1201
|
(C) => {
|
|
1202
|
-
|
|
1202
|
+
u == null || u(C);
|
|
1203
1203
|
},
|
|
1204
|
-
[
|
|
1204
|
+
[u]
|
|
1205
1205
|
);
|
|
1206
1206
|
P(() => {
|
|
1207
1207
|
if (!se) return;
|
|
@@ -1211,7 +1211,7 @@ function pa(t, e) {
|
|
|
1211
1211
|
const pt = y ?? da, mt = b ?? ca, gt = M(
|
|
1212
1212
|
() => {
|
|
1213
1213
|
var C;
|
|
1214
|
-
return (C =
|
|
1214
|
+
return (C = R.current) == null ? void 0 : C.api;
|
|
1215
1215
|
},
|
|
1216
1216
|
[]
|
|
1217
1217
|
), bt = M(() => {
|
|
@@ -1220,7 +1220,7 @@ function pa(t, e) {
|
|
|
1220
1220
|
density: ot,
|
|
1221
1221
|
bordered: h,
|
|
1222
1222
|
className: g
|
|
1223
|
-
}), vt = E ?? /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(ae.Actions, { children: /* @__PURE__ */ s(ae.ExportMenu, {}) }) }), yt = S ? !1 :
|
|
1223
|
+
}), vt = E ?? /* @__PURE__ */ s(ae, { children: /* @__PURE__ */ s(ae.Actions, { children: /* @__PURE__ */ s(ae.ExportMenu, {}) }) }), yt = S ? !1 : l;
|
|
1224
1224
|
return /* @__PURE__ */ I(
|
|
1225
1225
|
"div",
|
|
1226
1226
|
{
|
|
@@ -1246,7 +1246,7 @@ function pa(t, e) {
|
|
|
1246
1246
|
children: /* @__PURE__ */ s(
|
|
1247
1247
|
St,
|
|
1248
1248
|
{
|
|
1249
|
-
ref:
|
|
1249
|
+
ref: R,
|
|
1250
1250
|
theme: "legacy",
|
|
1251
1251
|
columnDefs: a,
|
|
1252
1252
|
rowData: n,
|
|
@@ -1268,8 +1268,8 @@ function pa(t, e) {
|
|
|
1268
1268
|
},
|
|
1269
1269
|
rowSelection: it,
|
|
1270
1270
|
pagination: yt,
|
|
1271
|
-
paginationPageSize:
|
|
1272
|
-
paginationPageSizeSelector:
|
|
1271
|
+
paginationPageSize: o,
|
|
1272
|
+
paginationPageSizeSelector: f,
|
|
1273
1273
|
paginationNumberFormatter: (C) => new Intl.NumberFormat(q.language).format(C.value),
|
|
1274
1274
|
animateRows: !lt,
|
|
1275
1275
|
enableRtl: rt,
|
|
@@ -1323,12 +1323,12 @@ function wn(t, e, a) {
|
|
|
1323
1323
|
return z(() => {
|
|
1324
1324
|
const n = {};
|
|
1325
1325
|
for (const r of e) {
|
|
1326
|
-
let
|
|
1327
|
-
for (const
|
|
1328
|
-
const
|
|
1329
|
-
Number.isFinite(d) && (
|
|
1326
|
+
let l = 0;
|
|
1327
|
+
for (const o of t ?? []) {
|
|
1328
|
+
const f = o[r], d = typeof f == "number" ? f : Number(f);
|
|
1329
|
+
Number.isFinite(d) && (l += d);
|
|
1330
1330
|
}
|
|
1331
|
-
n[r] =
|
|
1331
|
+
n[r] = l;
|
|
1332
1332
|
}
|
|
1333
1333
|
return a != null && a.labelField && a.labelValue !== void 0 && (n[a.labelField] = a.labelValue), n;
|
|
1334
1334
|
}, [t, e, a == null ? void 0 : a.labelField, a == null ? void 0 : a.labelValue]);
|
|
@@ -1342,20 +1342,20 @@ function X(t) {
|
|
|
1342
1342
|
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
1343
1343
|
}
|
|
1344
1344
|
function Fn(t) {
|
|
1345
|
-
const { model: e, onModelChange: a, getValue: n, doesRowPassOtherFilter: r } = t,
|
|
1345
|
+
const { model: e, onModelChange: a, getValue: n, doesRowPassOtherFilter: r } = t, l = {
|
|
1346
1346
|
from: X(e == null ? void 0 : e.dateFrom),
|
|
1347
1347
|
to: X(e == null ? void 0 : e.dateTo)
|
|
1348
|
-
}, [
|
|
1348
|
+
}, [o, f] = D(l);
|
|
1349
1349
|
Y({
|
|
1350
1350
|
doesFilterPass: (c) => {
|
|
1351
|
-
const
|
|
1352
|
-
if (!
|
|
1353
|
-
const
|
|
1354
|
-
return !(!
|
|
1351
|
+
const i = n(c.node);
|
|
1352
|
+
if (!i) return !1;
|
|
1353
|
+
const u = i instanceof Date ? i : X(String(i));
|
|
1354
|
+
return !(!u || o.from && u < o.from || o.to && u > o.to);
|
|
1355
1355
|
}
|
|
1356
1356
|
});
|
|
1357
1357
|
function d(c) {
|
|
1358
|
-
if (
|
|
1358
|
+
if (f(c), !c.from && !c.to) {
|
|
1359
1359
|
a(null);
|
|
1360
1360
|
return;
|
|
1361
1361
|
}
|
|
@@ -1365,30 +1365,30 @@ function Fn(t) {
|
|
|
1365
1365
|
dateTo: re(c.to)
|
|
1366
1366
|
});
|
|
1367
1367
|
}
|
|
1368
|
-
return /* @__PURE__ */ s("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ s(ze, { value:
|
|
1368
|
+
return /* @__PURE__ */ s("div", { className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]", children: /* @__PURE__ */ s(ze, { value: o, onChange: d, size: "sm" }) });
|
|
1369
1369
|
}
|
|
1370
1370
|
function Rn(t) {
|
|
1371
1371
|
var d, c;
|
|
1372
|
-
const { model: e, onModelChange: a, column: n } = t, r = ((c = (d = n == null ? void 0 : n.getColDef) == null ? void 0 : d.call(n)) == null ? void 0 : c.filterParams) ?? {}, [
|
|
1372
|
+
const { model: e, onModelChange: a, column: n } = t, r = ((c = (d = n == null ? void 0 : n.getColDef) == null ? void 0 : d.call(n)) == null ? void 0 : c.filterParams) ?? {}, [l, o] = D({
|
|
1373
1373
|
from: X(e == null ? void 0 : e.dateFrom),
|
|
1374
1374
|
to: X(e == null ? void 0 : e.dateTo)
|
|
1375
1375
|
});
|
|
1376
|
-
function
|
|
1377
|
-
if (i
|
|
1376
|
+
function f(i) {
|
|
1377
|
+
if (o(i), !i.from && !i.to) {
|
|
1378
1378
|
a(null);
|
|
1379
1379
|
return;
|
|
1380
1380
|
}
|
|
1381
1381
|
a({
|
|
1382
1382
|
type: "inRange",
|
|
1383
|
-
dateFrom: re(
|
|
1384
|
-
dateTo: re(
|
|
1383
|
+
dateFrom: re(i.from),
|
|
1384
|
+
dateTo: re(i.to)
|
|
1385
1385
|
});
|
|
1386
1386
|
}
|
|
1387
1387
|
return /* @__PURE__ */ s("div", { "data-component": "date-range-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1388
1388
|
ze,
|
|
1389
1389
|
{
|
|
1390
|
-
value:
|
|
1391
|
-
onChange:
|
|
1390
|
+
value: l,
|
|
1391
|
+
onChange: f,
|
|
1392
1392
|
size: "sm",
|
|
1393
1393
|
placeholder: r.placeholder
|
|
1394
1394
|
}
|
|
@@ -1398,9 +1398,9 @@ function W(t) {
|
|
|
1398
1398
|
return typeof t == "number" ? `n:${t}` : `s:${t}`;
|
|
1399
1399
|
}
|
|
1400
1400
|
function Dn(t) {
|
|
1401
|
-
const { model: e, onModelChange: a, getValue: n, api: r, column:
|
|
1402
|
-
if (
|
|
1403
|
-
if (!r || !
|
|
1401
|
+
const { model: e, onModelChange: a, getValue: n, api: r, column: l, options: o, placeholder: f } = t, { t: d } = F("ui"), c = z(() => {
|
|
1402
|
+
if (o && o.length > 0) return o;
|
|
1403
|
+
if (!r || !l) return [];
|
|
1404
1404
|
const p = /* @__PURE__ */ new Map();
|
|
1405
1405
|
return r.forEachNode((g) => {
|
|
1406
1406
|
const m = n(g);
|
|
@@ -1410,14 +1410,14 @@ function Dn(t) {
|
|
|
1410
1410
|
}), Array.from(p.values()).sort(
|
|
1411
1411
|
(g, m) => String(g.label).localeCompare(String(m.label))
|
|
1412
1412
|
);
|
|
1413
|
-
}, [
|
|
1413
|
+
}, [o, r, l, n]), i = z(() => {
|
|
1414
1414
|
const p = /* @__PURE__ */ new Set(), g = (e == null ? void 0 : e.values) ?? [];
|
|
1415
1415
|
for (const m of g) p.add(W(m));
|
|
1416
1416
|
return p;
|
|
1417
|
-
}, [e]), [
|
|
1417
|
+
}, [e]), [u, y] = D(i);
|
|
1418
1418
|
P(() => {
|
|
1419
|
-
y(
|
|
1420
|
-
}, [
|
|
1419
|
+
y(i);
|
|
1420
|
+
}, [i]), Y({
|
|
1421
1421
|
doesFilterPass: (p) => {
|
|
1422
1422
|
const g = e == null ? void 0 : e.values;
|
|
1423
1423
|
if (!g || g.length === 0) return !0;
|
|
@@ -1434,19 +1434,19 @@ function Dn(t) {
|
|
|
1434
1434
|
});
|
|
1435
1435
|
}
|
|
1436
1436
|
function x() {
|
|
1437
|
-
if (
|
|
1437
|
+
if (u.size === 0) {
|
|
1438
1438
|
a(null);
|
|
1439
1439
|
return;
|
|
1440
1440
|
}
|
|
1441
1441
|
const p = [];
|
|
1442
1442
|
for (const g of c)
|
|
1443
|
-
|
|
1443
|
+
u.has(W(g.value)) && p.push(g.value);
|
|
1444
1444
|
a({ type: "set", values: p });
|
|
1445
1445
|
}
|
|
1446
1446
|
function T() {
|
|
1447
1447
|
y(/* @__PURE__ */ new Set()), a(null);
|
|
1448
1448
|
}
|
|
1449
|
-
const h =
|
|
1449
|
+
const h = f ?? d("dataTable.selectFilter.all");
|
|
1450
1450
|
return /* @__PURE__ */ I(
|
|
1451
1451
|
"div",
|
|
1452
1452
|
{
|
|
@@ -1466,7 +1466,7 @@ function Dn(t) {
|
|
|
1466
1466
|
{
|
|
1467
1467
|
size: "sm",
|
|
1468
1468
|
label: p.label,
|
|
1469
|
-
checked:
|
|
1469
|
+
checked: u.has(g),
|
|
1470
1470
|
onCheckedChange: () => b(g)
|
|
1471
1471
|
},
|
|
1472
1472
|
g
|
|
@@ -1484,21 +1484,21 @@ function Dn(t) {
|
|
|
1484
1484
|
}
|
|
1485
1485
|
function kn(t) {
|
|
1486
1486
|
var y;
|
|
1487
|
-
const { model: e, onModelChange: a, column: n } = t, r = (y = n == null ? void 0 : n.getColDef) == null ? void 0 : y.call(n),
|
|
1487
|
+
const { model: e, onModelChange: a, column: n } = t, r = (y = n == null ? void 0 : n.getColDef) == null ? void 0 : y.call(n), l = (r == null ? void 0 : r.filterParams) ?? {}, o = l.options ?? [], f = l.placeholder ?? (typeof (r == null ? void 0 : r.headerName) == "string" ? r.headerName : void 0), d = z(() => {
|
|
1488
1488
|
const b = /* @__PURE__ */ new Map();
|
|
1489
|
-
for (const x of
|
|
1489
|
+
for (const x of o) b.set(String(x.value), x.value);
|
|
1490
1490
|
return b;
|
|
1491
|
-
}, [
|
|
1492
|
-
() =>
|
|
1491
|
+
}, [o]), c = z(
|
|
1492
|
+
() => o.map((b) => ({
|
|
1493
1493
|
value: String(b.value),
|
|
1494
1494
|
label: b.label
|
|
1495
1495
|
})),
|
|
1496
|
-
[
|
|
1497
|
-
),
|
|
1496
|
+
[o]
|
|
1497
|
+
), i = z(
|
|
1498
1498
|
() => ((e == null ? void 0 : e.values) ?? []).map((b) => String(b)),
|
|
1499
1499
|
[e]
|
|
1500
1500
|
);
|
|
1501
|
-
function
|
|
1501
|
+
function u(b) {
|
|
1502
1502
|
if (b.length === 0) {
|
|
1503
1503
|
a(null);
|
|
1504
1504
|
return;
|
|
@@ -1515,10 +1515,10 @@ function kn(t) {
|
|
|
1515
1515
|
{
|
|
1516
1516
|
size: "sm",
|
|
1517
1517
|
options: c,
|
|
1518
|
-
value:
|
|
1519
|
-
onChange:
|
|
1520
|
-
placeholder:
|
|
1521
|
-
"aria-label":
|
|
1518
|
+
value: i,
|
|
1519
|
+
onChange: u,
|
|
1520
|
+
placeholder: l.placeholder,
|
|
1521
|
+
"aria-label": f,
|
|
1522
1522
|
allowClear: !0
|
|
1523
1523
|
}
|
|
1524
1524
|
) });
|
|
@@ -1532,13 +1532,13 @@ function In(t) {
|
|
|
1532
1532
|
onModelChange: a,
|
|
1533
1533
|
getValue: n,
|
|
1534
1534
|
api: r,
|
|
1535
|
-
column:
|
|
1536
|
-
options:
|
|
1537
|
-
loadOptions:
|
|
1535
|
+
column: l,
|
|
1536
|
+
options: o,
|
|
1537
|
+
loadOptions: f,
|
|
1538
1538
|
placeholder: d
|
|
1539
|
-
} = t, { t: c } =
|
|
1540
|
-
if (
|
|
1541
|
-
if (!r || !
|
|
1539
|
+
} = t, { t: c } = F("ui"), i = z(() => {
|
|
1540
|
+
if (o && o.length > 0) return o;
|
|
1541
|
+
if (!r || !l) return [];
|
|
1542
1542
|
const g = /* @__PURE__ */ new Map();
|
|
1543
1543
|
return r.forEachNode((m) => {
|
|
1544
1544
|
const v = n(m);
|
|
@@ -1548,12 +1548,12 @@ function In(t) {
|
|
|
1548
1548
|
}), Array.from(g.values()).sort(
|
|
1549
1549
|
(m, v) => m.label.localeCompare(v.label)
|
|
1550
1550
|
);
|
|
1551
|
-
}, [
|
|
1552
|
-
if (
|
|
1553
|
-
return (await
|
|
1551
|
+
}, [o, r, l, n]), u = z(() => async (g, m) => {
|
|
1552
|
+
if (f)
|
|
1553
|
+
return (await f(g, m)).map((k) => ({ value: k.value, label: k.label }));
|
|
1554
1554
|
const v = Q(g);
|
|
1555
|
-
return (v ?
|
|
1556
|
-
}, [
|
|
1555
|
+
return (v ? i.filter((E) => Q(E.label).includes(v)) : i).slice(0, 50).map((E) => ({ value: E.value, label: E.label }));
|
|
1556
|
+
}, [f, i]), [y, b] = D((e == null ? void 0 : e.value) ?? "");
|
|
1557
1557
|
P(() => {
|
|
1558
1558
|
b((e == null ? void 0 : e.value) ?? "");
|
|
1559
1559
|
}, [e == null ? void 0 : e.value]), Y({
|
|
@@ -1589,7 +1589,7 @@ function In(t) {
|
|
|
1589
1589
|
value: y,
|
|
1590
1590
|
onChange: T,
|
|
1591
1591
|
onSelect: x,
|
|
1592
|
-
loadOptions:
|
|
1592
|
+
loadOptions: u,
|
|
1593
1593
|
placeholder: p,
|
|
1594
1594
|
"aria-label": p
|
|
1595
1595
|
}
|
|
@@ -1601,26 +1601,26 @@ function In(t) {
|
|
|
1601
1601
|
}
|
|
1602
1602
|
function En(t) {
|
|
1603
1603
|
var x, T;
|
|
1604
|
-
const { model: e, onModelChange: a, column: n } = t, { t: r } =
|
|
1605
|
-
if (
|
|
1606
|
-
return (await
|
|
1604
|
+
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), l = ((T = (x = n == null ? void 0 : n.getColDef) == null ? void 0 : x.call(n)) == null ? void 0 : T.filterParams) ?? {}, o = l.options ?? [], f = l.loadOptions, d = l.placeholder ?? r("dataTable.typeaheadFilter.placeholder"), c = z(() => async (h, p) => {
|
|
1605
|
+
if (f)
|
|
1606
|
+
return (await f(h, p)).map((S) => ({ value: S.value, label: S.label }));
|
|
1607
1607
|
const g = Q(h);
|
|
1608
|
-
return (g ?
|
|
1609
|
-
}, [
|
|
1608
|
+
return (g ? o.filter((v) => Q(v.label).includes(g)) : o).slice(0, 50).map((v) => ({ value: v.value, label: v.label }));
|
|
1609
|
+
}, [f, o]), [i, u] = D((e == null ? void 0 : e.value) ?? "");
|
|
1610
1610
|
P(() => {
|
|
1611
|
-
|
|
1611
|
+
u((e == null ? void 0 : e.value) ?? "");
|
|
1612
1612
|
}, [e == null ? void 0 : e.value]);
|
|
1613
1613
|
function y(h) {
|
|
1614
|
-
|
|
1614
|
+
u(h.label), a({ type: "equals", value: h.value });
|
|
1615
1615
|
}
|
|
1616
1616
|
function b(h) {
|
|
1617
|
-
|
|
1617
|
+
u(h), h === "" && e && a(null);
|
|
1618
1618
|
}
|
|
1619
1619
|
return /* @__PURE__ */ s("div", { "data-component": "typeahead-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1620
1620
|
Ae,
|
|
1621
1621
|
{
|
|
1622
1622
|
size: "sm",
|
|
1623
|
-
value:
|
|
1623
|
+
value: i,
|
|
1624
1624
|
onChange: b,
|
|
1625
1625
|
onSelect: y,
|
|
1626
1626
|
loadOptions: c,
|
|
@@ -1666,8 +1666,8 @@ function ga(t, e, a, n) {
|
|
|
1666
1666
|
return e <= a;
|
|
1667
1667
|
case "inRange": {
|
|
1668
1668
|
if (n === null) return e >= a;
|
|
1669
|
-
const r = Math.min(a, n),
|
|
1670
|
-
return e >= r && e <=
|
|
1669
|
+
const r = Math.min(a, n), l = Math.max(a, n);
|
|
1670
|
+
return e >= r && e <= l;
|
|
1671
1671
|
}
|
|
1672
1672
|
default:
|
|
1673
1673
|
return !0;
|
|
@@ -1684,11 +1684,11 @@ function zn(t) {
|
|
|
1684
1684
|
onModelChange: a,
|
|
1685
1685
|
getValue: n,
|
|
1686
1686
|
defaultOperator: r,
|
|
1687
|
-
min:
|
|
1688
|
-
max:
|
|
1689
|
-
step:
|
|
1687
|
+
min: l,
|
|
1688
|
+
max: o,
|
|
1689
|
+
step: f,
|
|
1690
1690
|
placeholder: d
|
|
1691
|
-
} = t, { t: c } =
|
|
1691
|
+
} = t, { t: c } = F("ui"), i = (e == null ? void 0 : e.type) ?? r ?? "equals", [u, y] = D(i), [b, x] = D((e == null ? void 0 : e.filter) ?? null), [T, h] = D(
|
|
1692
1692
|
(e == null ? void 0 : e.filterTo) ?? null
|
|
1693
1693
|
);
|
|
1694
1694
|
P(() => {
|
|
@@ -1717,28 +1717,28 @@ function zn(t) {
|
|
|
1717
1717
|
[c]
|
|
1718
1718
|
), g = d ?? c("dataTable.numberFilter.placeholder");
|
|
1719
1719
|
function m() {
|
|
1720
|
-
if (!ye(
|
|
1721
|
-
a({ type:
|
|
1720
|
+
if (!ye(u)) {
|
|
1721
|
+
a({ type: u, filter: 0 });
|
|
1722
1722
|
return;
|
|
1723
1723
|
}
|
|
1724
1724
|
if (b === null) {
|
|
1725
1725
|
a(null);
|
|
1726
1726
|
return;
|
|
1727
1727
|
}
|
|
1728
|
-
if (Te(
|
|
1728
|
+
if (Te(u)) {
|
|
1729
1729
|
a({
|
|
1730
|
-
type:
|
|
1730
|
+
type: u,
|
|
1731
1731
|
filter: b,
|
|
1732
1732
|
filterTo: T ?? void 0
|
|
1733
1733
|
});
|
|
1734
1734
|
return;
|
|
1735
1735
|
}
|
|
1736
|
-
a({ type:
|
|
1736
|
+
a({ type: u, filter: b });
|
|
1737
1737
|
}
|
|
1738
1738
|
function v() {
|
|
1739
1739
|
y(r ?? "equals"), x(null), h(null), a(null);
|
|
1740
1740
|
}
|
|
1741
|
-
const S = ye(
|
|
1741
|
+
const S = ye(u), E = Te(u);
|
|
1742
1742
|
return /* @__PURE__ */ I(
|
|
1743
1743
|
"div",
|
|
1744
1744
|
{
|
|
@@ -1750,7 +1750,7 @@ function zn(t) {
|
|
|
1750
1750
|
{
|
|
1751
1751
|
size: "sm",
|
|
1752
1752
|
options: p,
|
|
1753
|
-
value:
|
|
1753
|
+
value: u,
|
|
1754
1754
|
onValueChange: (k) => {
|
|
1755
1755
|
k !== "" && y(k);
|
|
1756
1756
|
},
|
|
@@ -1763,9 +1763,9 @@ function zn(t) {
|
|
|
1763
1763
|
size: "sm",
|
|
1764
1764
|
value: b,
|
|
1765
1765
|
onChange: x,
|
|
1766
|
-
min:
|
|
1767
|
-
max:
|
|
1768
|
-
step:
|
|
1766
|
+
min: l,
|
|
1767
|
+
max: o,
|
|
1768
|
+
step: f,
|
|
1769
1769
|
placeholder: g,
|
|
1770
1770
|
"aria-label": g
|
|
1771
1771
|
}
|
|
@@ -1777,9 +1777,9 @@ function zn(t) {
|
|
|
1777
1777
|
size: "sm",
|
|
1778
1778
|
value: b,
|
|
1779
1779
|
onChange: x,
|
|
1780
|
-
min:
|
|
1781
|
-
max:
|
|
1782
|
-
step:
|
|
1780
|
+
min: l,
|
|
1781
|
+
max: o,
|
|
1782
|
+
step: f,
|
|
1783
1783
|
placeholder: c("dataTable.numberFilter.from"),
|
|
1784
1784
|
"aria-label": c("dataTable.numberFilter.from")
|
|
1785
1785
|
}
|
|
@@ -1790,9 +1790,9 @@ function zn(t) {
|
|
|
1790
1790
|
size: "sm",
|
|
1791
1791
|
value: T,
|
|
1792
1792
|
onChange: h,
|
|
1793
|
-
min:
|
|
1794
|
-
max:
|
|
1795
|
-
step:
|
|
1793
|
+
min: l,
|
|
1794
|
+
max: o,
|
|
1795
|
+
step: f,
|
|
1796
1796
|
placeholder: c("dataTable.numberFilter.to"),
|
|
1797
1797
|
"aria-label": c("dataTable.numberFilter.to")
|
|
1798
1798
|
}
|
|
@@ -1807,8 +1807,8 @@ function zn(t) {
|
|
|
1807
1807
|
);
|
|
1808
1808
|
}
|
|
1809
1809
|
function An(t) {
|
|
1810
|
-
var
|
|
1811
|
-
const { model: e, onModelChange: a, column: n } = t, { t: r } =
|
|
1810
|
+
var i, u;
|
|
1811
|
+
const { model: e, onModelChange: a, column: n } = t, { t: r } = F("ui"), l = ((u = (i = n == null ? void 0 : n.getColDef) == null ? void 0 : i.call(n)) == null ? void 0 : u.filterParams) ?? {}, o = l.defaultOperator ?? "equals", f = l.placeholder ?? r("dataTable.numberFilter.placeholder"), [d, c] = D((e == null ? void 0 : e.filter) ?? null);
|
|
1812
1812
|
return P(() => {
|
|
1813
1813
|
c((e == null ? void 0 : e.filter) ?? null);
|
|
1814
1814
|
}, [e == null ? void 0 : e.filter]), P(() => {
|
|
@@ -1818,20 +1818,20 @@ function An(t) {
|
|
|
1818
1818
|
a(null);
|
|
1819
1819
|
return;
|
|
1820
1820
|
}
|
|
1821
|
-
a({ type:
|
|
1821
|
+
a({ type: o, filter: d });
|
|
1822
1822
|
}, 200);
|
|
1823
1823
|
return () => clearTimeout(y);
|
|
1824
|
-
}, [d,
|
|
1824
|
+
}, [d, o]), /* @__PURE__ */ s("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
1825
1825
|
te,
|
|
1826
1826
|
{
|
|
1827
1827
|
size: "sm",
|
|
1828
1828
|
value: d,
|
|
1829
1829
|
onChange: c,
|
|
1830
|
-
min:
|
|
1831
|
-
max:
|
|
1832
|
-
step:
|
|
1833
|
-
placeholder:
|
|
1834
|
-
"aria-label":
|
|
1830
|
+
min: l.min,
|
|
1831
|
+
max: l.max,
|
|
1832
|
+
step: l.step,
|
|
1833
|
+
placeholder: f,
|
|
1834
|
+
"aria-label": f
|
|
1835
1835
|
}
|
|
1836
1836
|
) });
|
|
1837
1837
|
}
|
|
@@ -1873,11 +1873,11 @@ function Mn(t) {
|
|
|
1873
1873
|
srcField: a,
|
|
1874
1874
|
altField: n,
|
|
1875
1875
|
fallbackField: r,
|
|
1876
|
-
size:
|
|
1877
|
-
shape:
|
|
1876
|
+
size: l = "md",
|
|
1877
|
+
shape: o = "rounded"
|
|
1878
1878
|
} = t;
|
|
1879
1879
|
if (!e) return null;
|
|
1880
|
-
const
|
|
1880
|
+
const f = ue(e, a), d = Ta(f), c = n ? ue(e, n) ?? "" : "", i = r ? ue(e, r) : void 0;
|
|
1881
1881
|
return d ? /* @__PURE__ */ s(
|
|
1882
1882
|
"img",
|
|
1883
1883
|
{
|
|
@@ -1885,22 +1885,22 @@ function Mn(t) {
|
|
|
1885
1885
|
alt: c,
|
|
1886
1886
|
loading: "lazy",
|
|
1887
1887
|
decoding: "async",
|
|
1888
|
-
className: ["ds:object-cover", ha[
|
|
1888
|
+
className: ["ds:object-cover", ha[l], va[o]].join(
|
|
1889
1889
|
" "
|
|
1890
1890
|
)
|
|
1891
1891
|
}
|
|
1892
|
-
) :
|
|
1892
|
+
) : i ? /* @__PURE__ */ s(Pe, { name: i, size: l }) : null;
|
|
1893
1893
|
}
|
|
1894
1894
|
function jn(t) {
|
|
1895
|
-
const { value: e, maxVisible: a = 3 } = t, { t: n } =
|
|
1895
|
+
const { value: e, maxVisible: a = 3 } = t, { t: n } = F();
|
|
1896
1896
|
if (!Array.isArray(e) || e.length === 0) return null;
|
|
1897
|
-
const r = e.slice(0, a),
|
|
1897
|
+
const r = e.slice(0, a), l = e.length - a;
|
|
1898
1898
|
return /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
1899
|
-
r.map((
|
|
1900
|
-
|
|
1899
|
+
r.map((o) => /* @__PURE__ */ s(J, { label: o, size: "sm" }, o)),
|
|
1900
|
+
l > 0 && /* @__PURE__ */ s(Lt, { label: e.slice(a).join(", "), children: /* @__PURE__ */ s(
|
|
1901
1901
|
J,
|
|
1902
1902
|
{
|
|
1903
|
-
label: n("inputs.multiSelect.overflow", { count:
|
|
1903
|
+
label: n("inputs.multiSelect.overflow", { count: l }),
|
|
1904
1904
|
size: "sm",
|
|
1905
1905
|
variant: "neutral",
|
|
1906
1906
|
fill: "outline"
|
|
@@ -1971,15 +1971,15 @@ function $n(t) {
|
|
|
1971
1971
|
currency: a = "EUR",
|
|
1972
1972
|
colorNegative: n,
|
|
1973
1973
|
strikethrough: r,
|
|
1974
|
-
options:
|
|
1975
|
-
} = t, { i18n:
|
|
1976
|
-
if (
|
|
1977
|
-
const d =
|
|
1974
|
+
options: l
|
|
1975
|
+
} = t, { i18n: o } = F(), f = Na(e);
|
|
1976
|
+
if (f === null) return null;
|
|
1977
|
+
const d = o.language || "en", c = new Intl.NumberFormat(d, {
|
|
1978
1978
|
style: "currency",
|
|
1979
1979
|
currency: a,
|
|
1980
|
-
...
|
|
1981
|
-
}).format(
|
|
1982
|
-
return n &&
|
|
1980
|
+
...l
|
|
1981
|
+
}).format(f), i = ["ds:tabular-nums"];
|
|
1982
|
+
return n && f < 0 && i.push("ds:text-[color:var(--destructive)]"), r && i.push("line-through"), /* @__PURE__ */ s("span", { className: i.join(" "), children: c });
|
|
1983
1983
|
}
|
|
1984
1984
|
function Ce(t) {
|
|
1985
1985
|
if (!Fe(t)) return t;
|
|
@@ -1991,10 +1991,10 @@ function fe(t, e) {
|
|
|
1991
1991
|
}
|
|
1992
1992
|
const Sa = "ds:text-[color:var(--destructive)] ds:hover:text-[color:var(--destructive-hover)]";
|
|
1993
1993
|
function _n(t) {
|
|
1994
|
-
const { data: e, actions: a, intent: n = "ghost", group: r, label:
|
|
1994
|
+
const { data: e, actions: a, intent: n = "ghost", group: r, label: l, collapsed: o } = t, { t: f } = F();
|
|
1995
1995
|
if (!e) return null;
|
|
1996
|
-
const
|
|
1997
|
-
if (typeof
|
|
1996
|
+
const d = a.filter((u) => !fe(u.hidden, e));
|
|
1997
|
+
if (typeof o == "function" ? o() : !!o)
|
|
1998
1998
|
return /* @__PURE__ */ I(B.Root, { children: [
|
|
1999
1999
|
/* @__PURE__ */ s(B.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
2000
2000
|
G,
|
|
@@ -2002,41 +2002,48 @@ function _n(t) {
|
|
|
2002
2002
|
size: "sm",
|
|
2003
2003
|
intent: n,
|
|
2004
2004
|
icon: /* @__PURE__ */ s($t, { "aria-hidden": !0 }),
|
|
2005
|
-
"aria-label":
|
|
2005
|
+
"aria-label": l ?? f("dataTable.actions", "Actions")
|
|
2006
2006
|
}
|
|
2007
2007
|
) }),
|
|
2008
|
-
/* @__PURE__ */ s(B.Content, { align: "end", children:
|
|
2008
|
+
/* @__PURE__ */ s(B.Content, { align: "end", children: d.map((u, y) => /* @__PURE__ */ s(
|
|
2009
2009
|
B.Item,
|
|
2010
2010
|
{
|
|
2011
|
-
startIcon: Ce(
|
|
2012
|
-
disabled: fe(
|
|
2013
|
-
onSelect: () =>
|
|
2014
|
-
className:
|
|
2015
|
-
children:
|
|
2011
|
+
startIcon: Ce(u.icon),
|
|
2012
|
+
disabled: fe(u.disabled, e),
|
|
2013
|
+
onSelect: () => u.onClick(e),
|
|
2014
|
+
className: u.variant === "destructive" ? "ds:text-[color:var(--destructive)]" : void 0,
|
|
2015
|
+
children: u.label
|
|
2016
2016
|
},
|
|
2017
|
-
|
|
2017
|
+
y
|
|
2018
2018
|
)) })
|
|
2019
2019
|
] });
|
|
2020
|
-
const
|
|
2021
|
-
const
|
|
2020
|
+
const i = d.map((u, y) => {
|
|
2021
|
+
const b = fe(u.disabled, e), x = b && u.disabledReason ? u.disabledReason : u.label;
|
|
2022
2022
|
return /* @__PURE__ */ s(
|
|
2023
2023
|
G,
|
|
2024
2024
|
{
|
|
2025
2025
|
size: "sm",
|
|
2026
2026
|
intent: n,
|
|
2027
|
-
icon: Ce(
|
|
2028
|
-
tooltip:
|
|
2029
|
-
"aria-label":
|
|
2030
|
-
disabled:
|
|
2031
|
-
onClick: (
|
|
2032
|
-
|
|
2027
|
+
icon: Ce(u.icon),
|
|
2028
|
+
tooltip: x,
|
|
2029
|
+
"aria-label": u.label,
|
|
2030
|
+
disabled: b,
|
|
2031
|
+
onClick: (T) => {
|
|
2032
|
+
T.stopPropagation(), u.onClick(e);
|
|
2033
2033
|
},
|
|
2034
|
-
className:
|
|
2034
|
+
className: u.variant === "destructive" ? Sa : void 0
|
|
2035
2035
|
},
|
|
2036
|
-
|
|
2036
|
+
y
|
|
2037
2037
|
);
|
|
2038
2038
|
});
|
|
2039
|
-
return r ? /* @__PURE__ */ s(
|
|
2039
|
+
return r ? /* @__PURE__ */ s(
|
|
2040
|
+
qt,
|
|
2041
|
+
{
|
|
2042
|
+
"aria-label": l ?? f("dataTable.actions", "Actions"),
|
|
2043
|
+
size: "sm",
|
|
2044
|
+
children: i
|
|
2045
|
+
}
|
|
2046
|
+
) : /* @__PURE__ */ s("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: i });
|
|
2040
2047
|
}
|
|
2041
2048
|
function xe(t, e) {
|
|
2042
2049
|
return typeof t == "function" ? t(e) : t;
|
|
@@ -2045,9 +2052,9 @@ function wa(t) {
|
|
|
2045
2052
|
return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
|
|
2046
2053
|
}
|
|
2047
2054
|
function Bn(t) {
|
|
2048
|
-
const { value: e, data: a, href: n, onClick: r, secondary:
|
|
2055
|
+
const { value: e, data: a, href: n, onClick: r, secondary: l } = t;
|
|
2049
2056
|
if (!a) return null;
|
|
2050
|
-
const
|
|
2057
|
+
const o = xe(n, a), f = xe(l, a), d = e == null || e === "" ? "" : String(e), c = [
|
|
2051
2058
|
"ds:text-[color:var(--primary)]",
|
|
2052
2059
|
"ds:hover:underline",
|
|
2053
2060
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -2055,15 +2062,15 @@ function Bn(t) {
|
|
|
2055
2062
|
"ds:focus-visible:outline-[color:var(--ring)]",
|
|
2056
2063
|
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
2057
2064
|
"ds:rounded-[var(--radius-sm)]"
|
|
2058
|
-
].join(" "),
|
|
2059
|
-
r && (
|
|
2065
|
+
].join(" "), i = (u) => {
|
|
2066
|
+
r && (o || u.preventDefault(), u.stopPropagation(), r(a));
|
|
2060
2067
|
};
|
|
2061
2068
|
return /* @__PURE__ */ I("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
|
|
2062
|
-
|
|
2069
|
+
o ? /* @__PURE__ */ s(
|
|
2063
2070
|
"a",
|
|
2064
2071
|
{
|
|
2065
|
-
href: wa(
|
|
2066
|
-
onClick:
|
|
2072
|
+
href: wa(o),
|
|
2073
|
+
onClick: i,
|
|
2067
2074
|
className: c,
|
|
2068
2075
|
children: d
|
|
2069
2076
|
}
|
|
@@ -2071,7 +2078,7 @@ function Bn(t) {
|
|
|
2071
2078
|
"button",
|
|
2072
2079
|
{
|
|
2073
2080
|
type: "button",
|
|
2074
|
-
onClick:
|
|
2081
|
+
onClick: i,
|
|
2075
2082
|
className: [
|
|
2076
2083
|
"ds:appearance-none ds:bg-transparent ds:p-0 ds:text-start",
|
|
2077
2084
|
c
|
|
@@ -2079,7 +2086,7 @@ function Bn(t) {
|
|
|
2079
2086
|
children: d
|
|
2080
2087
|
}
|
|
2081
2088
|
),
|
|
2082
|
-
|
|
2089
|
+
f ? /* @__PURE__ */ s("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: f }) : null
|
|
2083
2090
|
] });
|
|
2084
2091
|
}
|
|
2085
2092
|
function Gn(t) {
|
|
@@ -2088,16 +2095,16 @@ function Gn(t) {
|
|
|
2088
2095
|
data: a,
|
|
2089
2096
|
onToggle: n,
|
|
2090
2097
|
onError: r,
|
|
2091
|
-
trueIcon:
|
|
2092
|
-
falseIcon:
|
|
2093
|
-
trueClass:
|
|
2098
|
+
trueIcon: l,
|
|
2099
|
+
falseIcon: o,
|
|
2100
|
+
trueClass: f = "ds:text-[color:var(--success)]",
|
|
2094
2101
|
falseClass: d = "ds:text-[color:var(--muted-foreground)]",
|
|
2095
2102
|
label: c
|
|
2096
|
-
} = t, { t:
|
|
2103
|
+
} = t, { t: i } = F(), [u, y] = D(!1);
|
|
2097
2104
|
if (!a) return null;
|
|
2098
|
-
const b = !!e, x = b ?
|
|
2105
|
+
const b = !!e, x = b ? l ?? /* @__PURE__ */ s(_t, { "aria-hidden": !0, className: "ds:size-4" }) : o ?? /* @__PURE__ */ s(Bt, { "aria-hidden": !0, className: "ds:size-4" }), T = b ? f : d, h = c ?? i(b ? "inputs.switch.on" : "inputs.switch.off");
|
|
2099
2106
|
async function p(g) {
|
|
2100
|
-
if (g.stopPropagation(),
|
|
2107
|
+
if (g.stopPropagation(), u || !a) return;
|
|
2101
2108
|
const v = n(a, !b);
|
|
2102
2109
|
if (v && typeof v.then == "function") {
|
|
2103
2110
|
y(!0);
|
|
@@ -2116,9 +2123,9 @@ function Gn(t) {
|
|
|
2116
2123
|
type: "button",
|
|
2117
2124
|
role: "switch",
|
|
2118
2125
|
"aria-checked": b,
|
|
2119
|
-
"aria-busy":
|
|
2126
|
+
"aria-busy": u,
|
|
2120
2127
|
"aria-label": h,
|
|
2121
|
-
disabled:
|
|
2128
|
+
disabled: u,
|
|
2122
2129
|
onClick: p,
|
|
2123
2130
|
className: [
|
|
2124
2131
|
"ds:inline-flex ds:items-center ds:justify-center",
|
|
@@ -2154,15 +2161,15 @@ function Ea(t) {
|
|
|
2154
2161
|
return e;
|
|
2155
2162
|
}
|
|
2156
2163
|
function Vn(t) {
|
|
2157
|
-
const { data: e, colorField: a, size: n = "md", labelField: r } = t,
|
|
2164
|
+
const { data: e, colorField: a, size: n = "md", labelField: r } = t, l = Z(null), o = e ? Ne(e, a) : void 0, f = Ea(o), d = e && r ? Ne(e, r) : void 0;
|
|
2158
2165
|
return Gt(() => {
|
|
2159
|
-
const c =
|
|
2160
|
-
c && (
|
|
2161
|
-
}, [
|
|
2166
|
+
const c = l.current;
|
|
2167
|
+
c && (f ? c.style.setProperty("--data-table-dot-color", f) : c.style.removeProperty("--data-table-dot-color"));
|
|
2168
|
+
}, [f]), f ? /* @__PURE__ */ I("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
2162
2169
|
/* @__PURE__ */ s(
|
|
2163
2170
|
"span",
|
|
2164
2171
|
{
|
|
2165
|
-
ref:
|
|
2172
|
+
ref: l,
|
|
2166
2173
|
"aria-hidden": "true",
|
|
2167
2174
|
className: [
|
|
2168
2175
|
"ds:inline-block ds:shrink-0 ds:rounded-[var(--radius-full)]",
|
|
@@ -2181,34 +2188,34 @@ function za(t, e) {
|
|
|
2181
2188
|
return Number.isFinite(n) ? n : null;
|
|
2182
2189
|
}
|
|
2183
2190
|
function Un(t) {
|
|
2184
|
-
const { data: e, lines: a, currency: n = "EUR", highlightNegative: r } = t, { i18n:
|
|
2191
|
+
const { data: e, lines: a, currency: n = "EUR", highlightNegative: r } = t, { i18n: l } = F();
|
|
2185
2192
|
if (!e) return null;
|
|
2186
|
-
const
|
|
2187
|
-
const
|
|
2188
|
-
if (
|
|
2189
|
-
let
|
|
2193
|
+
const o = l.language || "en", f = (c) => {
|
|
2194
|
+
const i = za(e, c.valueField);
|
|
2195
|
+
if (i === null) return null;
|
|
2196
|
+
let u;
|
|
2190
2197
|
switch (c.format ?? "number") {
|
|
2191
2198
|
case "currency":
|
|
2192
|
-
|
|
2199
|
+
u = new Intl.NumberFormat(o, {
|
|
2193
2200
|
style: "currency",
|
|
2194
2201
|
currency: n
|
|
2195
|
-
}).format(
|
|
2202
|
+
}).format(i);
|
|
2196
2203
|
break;
|
|
2197
2204
|
case "percent":
|
|
2198
|
-
|
|
2205
|
+
u = new Intl.NumberFormat(o, {
|
|
2199
2206
|
style: "percent",
|
|
2200
2207
|
maximumFractionDigits: 1
|
|
2201
|
-
}).format(
|
|
2208
|
+
}).format(i / 100);
|
|
2202
2209
|
break;
|
|
2203
2210
|
default:
|
|
2204
|
-
|
|
2211
|
+
u = new Intl.NumberFormat(o).format(i);
|
|
2205
2212
|
}
|
|
2206
2213
|
return {
|
|
2207
2214
|
label: c.label,
|
|
2208
|
-
formatted:
|
|
2209
|
-
negative: !!r &&
|
|
2215
|
+
formatted: u,
|
|
2216
|
+
negative: !!r && i < 0
|
|
2210
2217
|
};
|
|
2211
|
-
}, d = a.map(
|
|
2218
|
+
}, d = a.map(f).filter(
|
|
2212
2219
|
(c) => c !== null
|
|
2213
2220
|
);
|
|
2214
2221
|
return d.length === 0 ? null : /* @__PURE__ */ s(
|
|
@@ -2223,12 +2230,12 @@ function Un(t) {
|
|
|
2223
2230
|
"type-meta",
|
|
2224
2231
|
"ds:leading-tight"
|
|
2225
2232
|
].join(" "),
|
|
2226
|
-
children: d.map((c,
|
|
2233
|
+
children: d.map((c, i) => /* @__PURE__ */ I(
|
|
2227
2234
|
"span",
|
|
2228
2235
|
{
|
|
2229
2236
|
className: "ds:inline-flex ds:items-baseline ds:gap-x-[var(--spacing-xs)]",
|
|
2230
2237
|
children: [
|
|
2231
|
-
|
|
2238
|
+
i > 0 ? /* @__PURE__ */ s(
|
|
2232
2239
|
"span",
|
|
2233
2240
|
{
|
|
2234
2241
|
"aria-hidden": "true",
|
|
@@ -2250,32 +2257,32 @@ function Un(t) {
|
|
|
2250
2257
|
)
|
|
2251
2258
|
]
|
|
2252
2259
|
},
|
|
2253
|
-
`${c.label}-${
|
|
2260
|
+
`${c.label}-${i}`
|
|
2254
2261
|
))
|
|
2255
2262
|
}
|
|
2256
2263
|
);
|
|
2257
2264
|
}
|
|
2258
2265
|
function Kn(t) {
|
|
2259
|
-
var c,
|
|
2260
|
-
const { initialValue: e, onValueChange: a, stopEditing: n, column: r } = t, [
|
|
2266
|
+
var c, i;
|
|
2267
|
+
const { initialValue: e, onValueChange: a, stopEditing: n, column: r } = t, [l, o] = D(e ?? ""), f = Z(null);
|
|
2261
2268
|
P(() => {
|
|
2262
|
-
const
|
|
2263
|
-
|
|
2269
|
+
const u = f.current;
|
|
2270
|
+
u && (u.focus(), u.select());
|
|
2264
2271
|
}, []);
|
|
2265
|
-
const d = ((
|
|
2272
|
+
const d = ((i = (c = r == null ? void 0 : r.getColDef) == null ? void 0 : c.call(r)) == null ? void 0 : i.headerName) ?? void 0;
|
|
2266
2273
|
return /* @__PURE__ */ s(
|
|
2267
2274
|
"input",
|
|
2268
2275
|
{
|
|
2269
|
-
ref:
|
|
2276
|
+
ref: f,
|
|
2270
2277
|
type: "text",
|
|
2271
|
-
value:
|
|
2278
|
+
value: l,
|
|
2272
2279
|
"aria-label": d,
|
|
2273
|
-
onChange: (
|
|
2274
|
-
const y =
|
|
2275
|
-
|
|
2280
|
+
onChange: (u) => {
|
|
2281
|
+
const y = u.target.value;
|
|
2282
|
+
o(y), a(y);
|
|
2276
2283
|
},
|
|
2277
|
-
onKeyDown: (
|
|
2278
|
-
|
|
2284
|
+
onKeyDown: (u) => {
|
|
2285
|
+
u.key === "Enter" && (u.preventDefault(), n());
|
|
2279
2286
|
},
|
|
2280
2287
|
className: [
|
|
2281
2288
|
"ds:block ds:w-full ds:appearance-none",
|
|
@@ -2298,18 +2305,18 @@ function Wn(t) {
|
|
|
2298
2305
|
onValueChange: a,
|
|
2299
2306
|
stopEditing: n,
|
|
2300
2307
|
column: r,
|
|
2301
|
-
decimals:
|
|
2302
|
-
min:
|
|
2303
|
-
max:
|
|
2304
|
-
} = t, { i18n: d } =
|
|
2308
|
+
decimals: l = 2,
|
|
2309
|
+
min: o,
|
|
2310
|
+
max: f
|
|
2311
|
+
} = t, { i18n: d } = F(), c = Z(null), i = ((h = (T = r == null ? void 0 : r.getColDef) == null ? void 0 : T.call(r)) == null ? void 0 : h.headerName) ?? void 0, [u, y] = D(() => e == null || Number.isNaN(e) ? "" : String(e));
|
|
2305
2312
|
P(() => {
|
|
2306
2313
|
const p = c.current;
|
|
2307
2314
|
p && (p.focus(), p.select());
|
|
2308
2315
|
}, []);
|
|
2309
2316
|
function b(p) {
|
|
2310
|
-
var q,
|
|
2317
|
+
var q, R;
|
|
2311
2318
|
if (p.trim().length === 0) return null;
|
|
2312
|
-
const g = d.language || "en", m = new Intl.NumberFormat(g).formatToParts(12345.6), v = ((q = m.find((V) => V.type === "group")) == null ? void 0 : q.value) ?? "", S = ((
|
|
2319
|
+
const g = d.language || "en", m = new Intl.NumberFormat(g).formatToParts(12345.6), v = ((q = m.find((V) => V.type === "group")) == null ? void 0 : q.value) ?? "", S = ((R = m.find((V) => V.type === "decimal")) == null ? void 0 : R.value) ?? ".", E = p.replace(new RegExp(`\\${v}`, "g"), "").replace(S, ".").replace(/[^\d.-]/g, ""), k = Number(E);
|
|
2313
2320
|
return Number.isFinite(k) ? k : null;
|
|
2314
2321
|
}
|
|
2315
2322
|
function x(p) {
|
|
@@ -2319,8 +2326,8 @@ function Wn(t) {
|
|
|
2319
2326
|
return;
|
|
2320
2327
|
}
|
|
2321
2328
|
let m = g;
|
|
2322
|
-
typeof
|
|
2323
|
-
const v = 10 **
|
|
2329
|
+
typeof o == "number" && (m = Math.max(o, m)), typeof f == "number" && (m = Math.min(f, m));
|
|
2330
|
+
const v = 10 ** l;
|
|
2324
2331
|
a(Math.round(m * v) / v);
|
|
2325
2332
|
}
|
|
2326
2333
|
return /* @__PURE__ */ s(
|
|
@@ -2329,8 +2336,8 @@ function Wn(t) {
|
|
|
2329
2336
|
ref: c,
|
|
2330
2337
|
type: "text",
|
|
2331
2338
|
inputMode: "decimal",
|
|
2332
|
-
value:
|
|
2333
|
-
"aria-label":
|
|
2339
|
+
value: u,
|
|
2340
|
+
"aria-label": i,
|
|
2334
2341
|
onChange: (p) => {
|
|
2335
2342
|
const g = p.target.value;
|
|
2336
2343
|
y(g), x(g);
|
|
@@ -2381,4 +2388,4 @@ export {
|
|
|
2381
2388
|
Ve as r,
|
|
2382
2389
|
wn as u
|
|
2383
2390
|
};
|
|
2384
|
-
//# sourceMappingURL=editable-currency-cell-renderer-
|
|
2391
|
+
//# sourceMappingURL=editable-currency-cell-renderer-D1ewvJKO.js.map
|