@alfadocs/ui-kit-debug 1.48.0 → 1.49.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/{agenda-card-C4h0xMGi.js → agenda-card-CjjxlA9K.js} +2 -2
- package/dist/_chunks/{agenda-card-C4h0xMGi.js.map → agenda-card-CjjxlA9K.js.map} +1 -1
- package/dist/_chunks/{agenda-tray-DNZYW2xt.js → agenda-tray-BhZASyJm.js} +2 -2
- package/dist/_chunks/{agenda-tray-DNZYW2xt.js.map → agenda-tray-BhZASyJm.js.map} +1 -1
- package/dist/_chunks/{alia-sidebar-Crn8OGPF.js → alia-sidebar-Dx-oeOV2.js} +3 -3
- package/dist/_chunks/{alia-sidebar-Crn8OGPF.js.map → alia-sidebar-Dx-oeOV2.js.map} +1 -1
- package/dist/_chunks/{appointment-card-CvGU0QP6.js → appointment-card-BgLpE6T5.js} +2 -2
- package/dist/_chunks/{appointment-card-CvGU0QP6.js.map → appointment-card-BgLpE6T5.js.map} +1 -1
- package/dist/_chunks/{appointment-peek--dmWznLZ.js → appointment-peek-BDiCIBb-.js} +2 -2
- package/dist/_chunks/{appointment-peek--dmWznLZ.js.map → appointment-peek-BDiCIBb-.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-y9uYZMUd.js → appointment-timeline-wQ-PdkFV.js} +2 -2
- package/dist/_chunks/{appointment-timeline-y9uYZMUd.js.map → appointment-timeline-wQ-PdkFV.js.map} +1 -1
- package/dist/_chunks/{appointment-tray-BTecNeSb.js → appointment-tray-D7Gt6m8x.js} +2 -2
- package/dist/_chunks/{appointment-tray-BTecNeSb.js.map → appointment-tray-D7Gt6m8x.js.map} +1 -1
- package/dist/_chunks/{avatar-CkDeQOSI.js → avatar-BVvjKNTp.js} +2 -2
- package/dist/_chunks/avatar-BVvjKNTp.js.map +1 -0
- package/dist/_chunks/{balance-badge-cell-CA0YNJMR.js → balance-badge-cell-klaxFNL_.js} +3 -3
- package/dist/_chunks/{balance-badge-cell-CA0YNJMR.js.map → balance-badge-cell-klaxFNL_.js.map} +1 -1
- package/dist/_chunks/{booking-BQYFDcrz.js → booking-BF9pVa2n.js} +377 -381
- package/dist/_chunks/booking-BF9pVa2n.js.map +1 -0
- package/dist/_chunks/{calendar-DjoJ9ovF.js → calendar-Bt44KMNO.js} +3 -2
- package/dist/_chunks/{calendar-DjoJ9ovF.js.map → calendar-Bt44KMNO.js.map} +1 -1
- package/dist/_chunks/calendar-workspace-C_eXL1by.js +10464 -0
- package/dist/_chunks/{calendar-workspace-D8zX9JWm.js.map → calendar-workspace-C_eXL1by.js.map} +1 -1
- package/dist/_chunks/{chat-message-Co_NRGM4.js → chat-message-B4ihjNy3.js} +2 -2
- package/dist/_chunks/{chat-message-Co_NRGM4.js.map → chat-message-B4ihjNy3.js.map} +1 -1
- package/dist/_chunks/{clinical-note-card-DYDQ3q2x.js → clinical-note-card-B7s5BtEl.js} +2 -2
- package/dist/_chunks/{clinical-note-card-DYDQ3q2x.js.map → clinical-note-card-B7s5BtEl.js.map} +1 -1
- package/dist/_chunks/{data-table-DWOSxlsy.js → data-table-CrI3_bjH.js} +411 -410
- package/dist/_chunks/data-table-CrI3_bjH.js.map +1 -0
- package/dist/_chunks/{dependent-selector-BR_8D2Qu.js → dependent-selector-58hTg5rB.js} +2 -2
- package/dist/_chunks/{dependent-selector-BR_8D2Qu.js.map → dependent-selector-58hTg5rB.js.map} +1 -1
- package/dist/_chunks/{entity-summary-Ckz_U00H.js → entity-summary-CFJfBdVP.js} +2 -2
- package/dist/_chunks/{entity-summary-Ckz_U00H.js.map → entity-summary-CFJfBdVP.js.map} +1 -1
- package/dist/_chunks/{file-manager-CqgxLqoA.js → file-manager-C6QQPQV5.js} +2 -2
- package/dist/_chunks/{file-manager-CqgxLqoA.js.map → file-manager-C6QQPQV5.js.map} +1 -1
- package/dist/_chunks/link-cell-renderer-CkNbUsBM.js +867 -0
- package/dist/_chunks/link-cell-renderer-CkNbUsBM.js.map +1 -0
- package/dist/_chunks/{marketplace-app-shell-Dehuxbi-.js → marketplace-app-shell-1uKqs4gD.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-Dehuxbi-.js.map → marketplace-app-shell-1uKqs4gD.js.map} +1 -1
- package/dist/_chunks/{message-card-DKOtnBHy.js → message-card-C2zsvyj0.js} +2 -2
- package/dist/_chunks/{message-card-DKOtnBHy.js.map → message-card-C2zsvyj0.js.map} +1 -1
- package/dist/_chunks/{message-tray-COMEtmyr.js → message-tray-CMlmxdH2.js} +2 -2
- package/dist/_chunks/{message-tray-COMEtmyr.js.map → message-tray-CMlmxdH2.js.map} +1 -1
- package/dist/_chunks/{notes-panel-BiOxZL_0.js → notes-panel-xxpFt-I1.js} +2 -2
- package/dist/_chunks/{notes-panel-BiOxZL_0.js.map → notes-panel-xxpFt-I1.js.map} +1 -1
- package/dist/_chunks/{operator-hero-5061fkY5.js → operator-hero-DyrNLoRO.js} +2 -2
- package/dist/_chunks/{operator-hero-5061fkY5.js.map → operator-hero-DyrNLoRO.js.map} +1 -1
- package/dist/_chunks/{patient-details-C23Hdm8v.js → patient-details-tTlvrJSU.js} +2 -2
- package/dist/_chunks/{patient-details-C23Hdm8v.js.map → patient-details-tTlvrJSU.js.map} +1 -1
- package/dist/_chunks/{patient-summary-card-C36L3h7h.js → patient-summary-card-DQ__6DR-.js} +2 -2
- package/dist/_chunks/{patient-summary-card-C36L3h7h.js.map → patient-summary-card-DQ__6DR-.js.map} +1 -1
- package/dist/_chunks/{practice-profile-hero-CPy5h2yI.js → practice-profile-hero-B-WcJYNH.js} +2 -2
- package/dist/_chunks/{practice-profile-hero-CPy5h2yI.js.map → practice-profile-hero-B-WcJYNH.js.map} +1 -1
- package/dist/_chunks/{practice-results-t2BHht91.js → practice-results-EKRiqWtQ.js} +2 -2
- package/dist/_chunks/{practice-results-t2BHht91.js.map → practice-results-EKRiqWtQ.js.map} +1 -1
- package/dist/_chunks/{signature-request-15D363w5.js → signature-request-BUGeG8oD.js} +2 -2
- package/dist/_chunks/{signature-request-15D363w5.js.map → signature-request-BUGeG8oD.js.map} +1 -1
- package/dist/_chunks/{task-card-CTTQfPS6.js → task-card-jaOhnj_q.js} +31 -30
- package/dist/_chunks/task-card-jaOhnj_q.js.map +1 -0
- package/dist/_chunks/{task-tray-JA-qp_pB.js → task-tray-HHyxi9ga.js} +2 -2
- package/dist/_chunks/{task-tray-JA-qp_pB.js.map → task-tray-HHyxi9ga.js.map} +1 -1
- package/dist/_chunks/{tasks-panel-C_dVDQKJ.js → tasks-panel-DbSjq_mz.js} +2 -2
- package/dist/_chunks/{tasks-panel-C_dVDQKJ.js.map → tasks-panel-DbSjq_mz.js.map} +1 -1
- package/dist/_chunks/{timeline-61AihzYz.js → timeline-ChY7iZrs.js} +2 -2
- package/dist/_chunks/{timeline-61AihzYz.js.map → timeline-ChY7iZrs.js.map} +1 -1
- package/dist/_chunks/{use-appointment-details-read-D2FH-cHF.js → use-appointment-details-read-5-hV-2xA.js} +4 -4
- package/dist/_chunks/{use-appointment-details-read-D2FH-cHF.js.map → use-appointment-details-read-5-hV-2xA.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/agenda-card/index.js +1 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/appointment-card/index.js +2 -2
- package/dist/components/appointment-details-panel/index.js +1 -1
- package/dist/components/appointment-peek/index.js +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/index.js +1 -1
- package/dist/components/booking/booking.d.ts.map +1 -1
- package/dist/components/booking/cascade.d.ts +5 -0
- package/dist/components/booking/cascade.d.ts.map +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calendar/calendar.d.ts.map +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/clinical-note-card/index.js +1 -1
- package/dist/components/data-table/filters/number-filter.d.ts +26 -12
- package/dist/components/data-table/filters/number-filter.d.ts.map +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/data-table/toolbar.d.ts.map +1 -1
- package/dist/components/dependent-selector/index.js +1 -1
- package/dist/components/entity-summary/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/operator-hero/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-profile-hero/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/task-card/index.js +1 -1
- package/dist/components/task-card/task-card.d.ts +3 -2
- package/dist/components/task-card/task-card.d.ts.map +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/tasks-panel/index.js +1 -1
- package/dist/components/timeline/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +19 -14
- package/dist/i18n/locales/ar.d.ts.map +1 -1
- package/dist/i18n/locales/ar.js +19 -14
- package/dist/i18n/locales/ar.js.map +1 -1
- package/dist/i18n/locales/de.d.ts +19 -14
- package/dist/i18n/locales/de.d.ts.map +1 -1
- package/dist/i18n/locales/de.js +19 -14
- package/dist/i18n/locales/de.js.map +1 -1
- package/dist/i18n/locales/el.d.ts +19 -14
- package/dist/i18n/locales/el.d.ts.map +1 -1
- package/dist/i18n/locales/el.js +19 -14
- package/dist/i18n/locales/el.js.map +1 -1
- package/dist/i18n/locales/en.d.ts +5 -0
- package/dist/i18n/locales/en.d.ts.map +1 -1
- package/dist/i18n/locales/en.js +6 -0
- package/dist/i18n/locales/en.js.map +1 -1
- package/dist/i18n/locales/es.d.ts +19 -14
- package/dist/i18n/locales/es.d.ts.map +1 -1
- package/dist/i18n/locales/es.js +19 -14
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +19 -14
- package/dist/i18n/locales/fr.d.ts.map +1 -1
- package/dist/i18n/locales/fr.js +19 -14
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hi.d.ts +19 -14
- package/dist/i18n/locales/hi.d.ts.map +1 -1
- package/dist/i18n/locales/hi.js +19 -14
- package/dist/i18n/locales/hi.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +5 -0
- package/dist/i18n/locales/it.d.ts.map +1 -1
- package/dist/i18n/locales/it.js +6 -0
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/ja.d.ts +19 -14
- package/dist/i18n/locales/ja.d.ts.map +1 -1
- package/dist/i18n/locales/ja.js +19 -14
- package/dist/i18n/locales/ja.js.map +1 -1
- package/dist/i18n/locales/nl.d.ts +19 -14
- package/dist/i18n/locales/nl.d.ts.map +1 -1
- package/dist/i18n/locales/nl.js +19 -14
- package/dist/i18n/locales/nl.js.map +1 -1
- package/dist/i18n/locales/pl.d.ts +19 -14
- package/dist/i18n/locales/pl.d.ts.map +1 -1
- package/dist/i18n/locales/pl.js +19 -14
- package/dist/i18n/locales/pl.js.map +1 -1
- package/dist/i18n/locales/pt.d.ts +19 -14
- package/dist/i18n/locales/pt.d.ts.map +1 -1
- package/dist/i18n/locales/pt.js +19 -14
- package/dist/i18n/locales/pt.js.map +1 -1
- package/dist/i18n/locales/ro.d.ts +19 -14
- package/dist/i18n/locales/ro.d.ts.map +1 -1
- package/dist/i18n/locales/ro.js +19 -14
- package/dist/i18n/locales/ro.js.map +1 -1
- package/dist/i18n/locales/ru.d.ts +19 -14
- package/dist/i18n/locales/ru.d.ts.map +1 -1
- package/dist/i18n/locales/ru.js +19 -14
- package/dist/i18n/locales/ru.js.map +1 -1
- package/dist/i18n/locales/sq.d.ts +19 -14
- package/dist/i18n/locales/sq.d.ts.map +1 -1
- package/dist/i18n/locales/sq.js +19 -14
- package/dist/i18n/locales/sq.js.map +1 -1
- package/dist/i18n/locales/sv.d.ts +19 -14
- package/dist/i18n/locales/sv.d.ts.map +1 -1
- package/dist/i18n/locales/sv.js +19 -14
- package/dist/i18n/locales/sv.js.map +1 -1
- package/dist/i18n/locales/tr.d.ts +19 -14
- package/dist/i18n/locales/tr.d.ts.map +1 -1
- package/dist/i18n/locales/tr.js +19 -14
- package/dist/i18n/locales/tr.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +19 -14
- package/dist/i18n/locales/zh.d.ts.map +1 -1
- package/dist/i18n/locales/zh.js +19 -14
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/index.js +34 -34
- package/dist/locales/ar.json +19 -14
- package/dist/locales/de.json +19 -14
- package/dist/locales/el.json +19 -14
- package/dist/locales/en.json +5 -0
- package/dist/locales/es.json +19 -14
- package/dist/locales/fr.json +19 -14
- package/dist/locales/hi.json +19 -14
- package/dist/locales/it.json +5 -0
- package/dist/locales/ja.json +19 -14
- package/dist/locales/nl.json +19 -14
- package/dist/locales/pl.json +19 -14
- package/dist/locales/pt.json +19 -14
- package/dist/locales/ro.json +19 -14
- package/dist/locales/ru.json +19 -14
- package/dist/locales/sq.json +19 -14
- package/dist/locales/sv.json +19 -14
- package/dist/locales/tr.json +19 -14
- package/dist/locales/zh.json +19 -14
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/calendar/calendar-workspace.d.ts +10 -0
- package/dist/patterns/calendar/calendar-workspace.d.ts.map +1 -1
- package/dist/patterns/calendar/calendar.surface.d.ts +4 -1
- package/dist/patterns/calendar/calendar.surface.d.ts.map +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/signature-request/index.js +1 -1
- package/dist/tokens.css +1 -1
- package/package.json +12 -12
- package/dist/_chunks/avatar-CkDeQOSI.js.map +0 -1
- package/dist/_chunks/booking-BQYFDcrz.js.map +0 -1
- package/dist/_chunks/calendar-workspace-D8zX9JWm.js +0 -10423
- package/dist/_chunks/data-table-DWOSxlsy.js.map +0 -1
- package/dist/_chunks/link-cell-renderer-Tswqf6BT.js +0 -778
- package/dist/_chunks/link-cell-renderer-Tswqf6BT.js.map +0 -1
- package/dist/_chunks/task-card-CTTQfPS6.js.map +0 -1
|
@@ -0,0 +1,867 @@
|
|
|
1
|
+
import { jsx as u, jsxs as R } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x, useEffect as w, useCallback as W, useMemo as E, useRef as ee } from "react";
|
|
3
|
+
import { useGridFilter as V } from "ag-grid-react";
|
|
4
|
+
import { D as te } from "./date-range-picker-TpmECKRh.js";
|
|
5
|
+
import { useTranslation as M } from "react-i18next";
|
|
6
|
+
import { C as le } from "./checkbox-CZkipDn7.js";
|
|
7
|
+
import { B as j } from "./button-18oBsI3n.js";
|
|
8
|
+
import { M as se } from "./multi-select-N4Smh-gj.js";
|
|
9
|
+
import { S as ie } from "./scroll-area-BZOvUhwQ.js";
|
|
10
|
+
import { A as ne } from "./autocomplete-DSasZUf6.js";
|
|
11
|
+
import { N as D } from "./number-input-Cgu2TtA8.js";
|
|
12
|
+
import { S as oe } from "./select-upNAltly.js";
|
|
13
|
+
import { B as ue } from "./badge-BAkd6_Pj.js";
|
|
14
|
+
import { A as $ } from "./avatar-BVvjKNTp.js";
|
|
15
|
+
import { T as K } from "./tag-B65tLWvD.js";
|
|
16
|
+
import { T as ce } from "./tooltip-Cp-PLePW.js";
|
|
17
|
+
import { T as X } from "./timestamp-BV2lC-wV.js";
|
|
18
|
+
const ae = /^\d{4}-\d{2}-\d{2}$/, de = /^(\d{4}-\d{2}-\d{2})/;
|
|
19
|
+
function I(t) {
|
|
20
|
+
if (!t) return null;
|
|
21
|
+
const e = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0");
|
|
22
|
+
return `${e}-${n}-${a}`;
|
|
23
|
+
}
|
|
24
|
+
function fe(t) {
|
|
25
|
+
return typeof t == "string" && ae.test(t);
|
|
26
|
+
}
|
|
27
|
+
function k(t) {
|
|
28
|
+
if (!t) return;
|
|
29
|
+
const e = ae.test(t) ? new Date(
|
|
30
|
+
Number(t.slice(0, 4)),
|
|
31
|
+
Number(t.slice(5, 7)) - 1,
|
|
32
|
+
Number(t.slice(8, 10))
|
|
33
|
+
) : new Date(t);
|
|
34
|
+
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
35
|
+
}
|
|
36
|
+
function me(t) {
|
|
37
|
+
if (t == null || t === "")
|
|
38
|
+
return null;
|
|
39
|
+
if (typeof t == "string") {
|
|
40
|
+
const n = de.exec(t);
|
|
41
|
+
if (n) return n[1];
|
|
42
|
+
}
|
|
43
|
+
const e = t instanceof Date ? t : new Date(String(t));
|
|
44
|
+
return Number.isNaN(e.getTime()) ? null : I(e);
|
|
45
|
+
}
|
|
46
|
+
function pe(t, e, n) {
|
|
47
|
+
if (!e && !n) return !0;
|
|
48
|
+
const a = me(t);
|
|
49
|
+
return !(!a || e && a < e || n && a > n);
|
|
50
|
+
}
|
|
51
|
+
function Ue(t) {
|
|
52
|
+
var d;
|
|
53
|
+
const { model: e, onModelChange: n, getValue: a, doesRowPassOtherFilter: l } = t, r = ((d = t.colDef) == null ? void 0 : d.filterParams) ?? {}, [s, o] = x(() => ({
|
|
54
|
+
from: k(e == null ? void 0 : e.dateFrom),
|
|
55
|
+
to: k(e == null ? void 0 : e.dateTo)
|
|
56
|
+
}));
|
|
57
|
+
w(() => {
|
|
58
|
+
o({
|
|
59
|
+
from: k(e == null ? void 0 : e.dateFrom),
|
|
60
|
+
to: k(e == null ? void 0 : e.dateTo)
|
|
61
|
+
});
|
|
62
|
+
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]), V({
|
|
63
|
+
doesFilterPass: (i) => pe(a(i.node), e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo)
|
|
64
|
+
});
|
|
65
|
+
function m(i) {
|
|
66
|
+
if (o(i), !i.from && !i.to) {
|
|
67
|
+
n(null);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
n({
|
|
71
|
+
type: "inRange",
|
|
72
|
+
dateFrom: I(i.from),
|
|
73
|
+
dateTo: I(i.to)
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
return /* @__PURE__ */ u(
|
|
77
|
+
"div",
|
|
78
|
+
{
|
|
79
|
+
"data-component": "date-range-filter",
|
|
80
|
+
className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]",
|
|
81
|
+
children: /* @__PURE__ */ u(
|
|
82
|
+
te,
|
|
83
|
+
{
|
|
84
|
+
value: s,
|
|
85
|
+
onChange: m,
|
|
86
|
+
commitMode: r.commitMode,
|
|
87
|
+
size: "sm",
|
|
88
|
+
compact: !0
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
}
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
function He(t) {
|
|
95
|
+
var m, d;
|
|
96
|
+
const { model: e, onModelChange: n, column: a } = t, l = ((d = (m = a == null ? void 0 : a.getColDef) == null ? void 0 : m.call(a)) == null ? void 0 : d.filterParams) ?? {}, [r, s] = x(() => ({
|
|
97
|
+
from: k(e == null ? void 0 : e.dateFrom),
|
|
98
|
+
to: k(e == null ? void 0 : e.dateTo)
|
|
99
|
+
}));
|
|
100
|
+
w(() => {
|
|
101
|
+
s({
|
|
102
|
+
from: k(e == null ? void 0 : e.dateFrom),
|
|
103
|
+
to: k(e == null ? void 0 : e.dateTo)
|
|
104
|
+
});
|
|
105
|
+
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]);
|
|
106
|
+
function o(i) {
|
|
107
|
+
if (s(i), !i.from && !i.to) {
|
|
108
|
+
n(null);
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
n({
|
|
112
|
+
type: "inRange",
|
|
113
|
+
dateFrom: I(i.from),
|
|
114
|
+
dateTo: I(i.to)
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
return /* @__PURE__ */ u("div", { "data-component": "date-range-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ u(
|
|
118
|
+
te,
|
|
119
|
+
{
|
|
120
|
+
value: r,
|
|
121
|
+
onChange: o,
|
|
122
|
+
commitMode: l.commitMode,
|
|
123
|
+
size: "sm",
|
|
124
|
+
placeholder: l.placeholder,
|
|
125
|
+
compact: !0
|
|
126
|
+
}
|
|
127
|
+
) });
|
|
128
|
+
}
|
|
129
|
+
function L(t) {
|
|
130
|
+
return typeof t == "number" ? `n:${t}` : `s:${t}`;
|
|
131
|
+
}
|
|
132
|
+
const ge = new Intl.Collator(void 0, { numeric: !0 });
|
|
133
|
+
function he(t, e) {
|
|
134
|
+
if (!t) return [];
|
|
135
|
+
const n = /* @__PURE__ */ new Map();
|
|
136
|
+
return t.forEachNode((a) => {
|
|
137
|
+
const l = e(a);
|
|
138
|
+
if (l == null) return;
|
|
139
|
+
const r = typeof l == "string" || typeof l == "number" ? l : String(l), s = L(r);
|
|
140
|
+
n.has(s) || n.set(s, { value: r, label: String(r) });
|
|
141
|
+
}), Array.from(n.values()).sort(
|
|
142
|
+
(a, l) => ge.compare(String(a.label), String(l.label))
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
function ve(t, e) {
|
|
146
|
+
return t.length !== e.length ? !1 : t.every(
|
|
147
|
+
(n, a) => L(n.value) === L(e[a].value) && n.label === e[a].label
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
function re(t, e, n) {
|
|
151
|
+
const a = e, l = a !== void 0, [r, s] = x([]), o = ee(n);
|
|
152
|
+
return w(() => {
|
|
153
|
+
o.current = n;
|
|
154
|
+
}), w(() => {
|
|
155
|
+
if (l || !t) return;
|
|
156
|
+
const m = () => {
|
|
157
|
+
s((d) => {
|
|
158
|
+
const i = he(t, o.current);
|
|
159
|
+
return ve(d, i) ? d : i;
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
return m(), t.addEventListener("modelUpdated", m), t.addEventListener("cellValueChanged", m), () => {
|
|
163
|
+
t.isDestroyed() || (t.removeEventListener("modelUpdated", m), t.removeEventListener("cellValueChanged", m));
|
|
164
|
+
};
|
|
165
|
+
}, [t, l]), a ?? r;
|
|
166
|
+
}
|
|
167
|
+
function Ye(t) {
|
|
168
|
+
const { model: e, onModelChange: n, getValue: a, api: l, options: r, placeholder: s } = t, { t: o } = M("ui"), m = W(
|
|
169
|
+
(p) => a(p),
|
|
170
|
+
[a]
|
|
171
|
+
), d = re(l, r, m), i = E(() => {
|
|
172
|
+
const p = /* @__PURE__ */ new Set(), c = (e == null ? void 0 : e.values) ?? [];
|
|
173
|
+
for (const v of c) p.add(L(v));
|
|
174
|
+
return p;
|
|
175
|
+
}, [e]), [g, C] = x(i);
|
|
176
|
+
w(() => {
|
|
177
|
+
C(i);
|
|
178
|
+
}, [i]), V({
|
|
179
|
+
doesFilterPass: (p) => {
|
|
180
|
+
const c = e == null ? void 0 : e.values;
|
|
181
|
+
if (!c || c.length === 0) return !0;
|
|
182
|
+
const v = a(p.node);
|
|
183
|
+
if (v == null) return !1;
|
|
184
|
+
const f = typeof v == "string" || typeof v == "number" ? v : String(v), F = L(f);
|
|
185
|
+
return c.some((N) => L(N) === F);
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
function T(p) {
|
|
189
|
+
C((c) => {
|
|
190
|
+
const v = new Set(c);
|
|
191
|
+
return v.has(p) ? v.delete(p) : v.add(p), v;
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
function y() {
|
|
195
|
+
if (g.size === 0) {
|
|
196
|
+
n(null);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
const p = [];
|
|
200
|
+
for (const c of d)
|
|
201
|
+
g.has(L(c.value)) && p.push(c.value);
|
|
202
|
+
if (p.length === 0) {
|
|
203
|
+
n(null);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
n({ type: "set", values: p });
|
|
207
|
+
}
|
|
208
|
+
function b() {
|
|
209
|
+
C(/* @__PURE__ */ new Set()), n(null);
|
|
210
|
+
}
|
|
211
|
+
const h = s ?? o("dataTable.selectFilter.all");
|
|
212
|
+
return /* @__PURE__ */ R(
|
|
213
|
+
"div",
|
|
214
|
+
{
|
|
215
|
+
"data-component": "select-filter",
|
|
216
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[200px] ds:max-w-[260px]",
|
|
217
|
+
children: [
|
|
218
|
+
/* @__PURE__ */ u(ie, { orientation: "vertical", className: "ds:max-h-[240px]", children: /* @__PURE__ */ u(
|
|
219
|
+
"div",
|
|
220
|
+
{
|
|
221
|
+
role: "group",
|
|
222
|
+
"aria-label": h,
|
|
223
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
224
|
+
children: d.length === 0 ? /* @__PURE__ */ u("p", { className: "ds:text-[length:var(--font-size-sm)] ds:text-[var(--muted-foreground)] ds:py-[var(--spacing-xs)]", children: o("dataTable.agGrid.noRowsToShow") }) : d.map((p) => {
|
|
225
|
+
const c = L(p.value);
|
|
226
|
+
return /* @__PURE__ */ u(
|
|
227
|
+
le,
|
|
228
|
+
{
|
|
229
|
+
size: "sm",
|
|
230
|
+
label: p.label,
|
|
231
|
+
checked: g.has(c),
|
|
232
|
+
onCheckedChange: () => T(c)
|
|
233
|
+
},
|
|
234
|
+
c
|
|
235
|
+
);
|
|
236
|
+
})
|
|
237
|
+
}
|
|
238
|
+
) }),
|
|
239
|
+
/* @__PURE__ */ R("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: [
|
|
240
|
+
/* @__PURE__ */ u(j, { intent: "ghost", size: "sm", onClick: b, type: "button", children: o("dataTable.selectFilter.clear") }),
|
|
241
|
+
/* @__PURE__ */ u(j, { intent: "primary", size: "sm", onClick: y, type: "button", children: o("dataTable.selectFilter.apply") })
|
|
242
|
+
] })
|
|
243
|
+
]
|
|
244
|
+
}
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
function Ge(t) {
|
|
248
|
+
var y;
|
|
249
|
+
const { model: e, onModelChange: n, column: a, api: l } = t, r = (y = a == null ? void 0 : a.getColDef) == null ? void 0 : y.call(a), s = (r == null ? void 0 : r.filterParams) ?? {}, o = W(
|
|
250
|
+
(b) => l && a ? l.getCellValue({
|
|
251
|
+
rowNode: b,
|
|
252
|
+
colKey: a
|
|
253
|
+
}) : void 0,
|
|
254
|
+
[l, a]
|
|
255
|
+
), m = re(
|
|
256
|
+
l,
|
|
257
|
+
s.options,
|
|
258
|
+
o
|
|
259
|
+
), d = s.placeholder ?? (typeof (r == null ? void 0 : r.headerName) == "string" ? r.headerName : void 0), i = E(() => {
|
|
260
|
+
const b = /* @__PURE__ */ new Map();
|
|
261
|
+
for (const h of m) b.set(String(h.value), h.value);
|
|
262
|
+
return b;
|
|
263
|
+
}, [m]), g = E(
|
|
264
|
+
() => m.map((b) => ({
|
|
265
|
+
value: String(b.value),
|
|
266
|
+
label: b.label
|
|
267
|
+
})),
|
|
268
|
+
[m]
|
|
269
|
+
), C = E(
|
|
270
|
+
() => ((e == null ? void 0 : e.values) ?? []).map((b) => String(b)),
|
|
271
|
+
[e]
|
|
272
|
+
);
|
|
273
|
+
function T(b) {
|
|
274
|
+
if (b.length === 0) {
|
|
275
|
+
n(null);
|
|
276
|
+
return;
|
|
277
|
+
}
|
|
278
|
+
const h = [];
|
|
279
|
+
for (const p of b) {
|
|
280
|
+
const c = i.get(p);
|
|
281
|
+
c !== void 0 && h.push(c);
|
|
282
|
+
}
|
|
283
|
+
if (h.length === 0) {
|
|
284
|
+
n(null);
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
n({ type: "set", values: h });
|
|
288
|
+
}
|
|
289
|
+
return /* @__PURE__ */ u("div", { "data-component": "select-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ u(
|
|
290
|
+
se,
|
|
291
|
+
{
|
|
292
|
+
size: "sm",
|
|
293
|
+
options: g,
|
|
294
|
+
value: C,
|
|
295
|
+
onChange: T,
|
|
296
|
+
placeholder: s.placeholder,
|
|
297
|
+
"aria-label": d,
|
|
298
|
+
allowClear: !0
|
|
299
|
+
}
|
|
300
|
+
) });
|
|
301
|
+
}
|
|
302
|
+
function A(t) {
|
|
303
|
+
return t.trim().toLocaleLowerCase();
|
|
304
|
+
}
|
|
305
|
+
function Ze(t) {
|
|
306
|
+
const {
|
|
307
|
+
model: e,
|
|
308
|
+
onModelChange: n,
|
|
309
|
+
getValue: a,
|
|
310
|
+
api: l,
|
|
311
|
+
column: r,
|
|
312
|
+
options: s,
|
|
313
|
+
loadOptions: o,
|
|
314
|
+
placeholder: m
|
|
315
|
+
} = t, { t: d } = M("ui"), i = E(() => {
|
|
316
|
+
if (s && s.length > 0) return s;
|
|
317
|
+
if (!l || !r) return [];
|
|
318
|
+
const c = /* @__PURE__ */ new Map();
|
|
319
|
+
return l.forEachNode((v) => {
|
|
320
|
+
const f = a(v);
|
|
321
|
+
if (f == null) return;
|
|
322
|
+
const F = typeof f == "string" ? f : String(f);
|
|
323
|
+
c.has(F) || c.set(F, { value: F, label: F });
|
|
324
|
+
}), Array.from(c.values()).sort(
|
|
325
|
+
(v, f) => v.label.localeCompare(f.label)
|
|
326
|
+
);
|
|
327
|
+
}, [s, l, r, a]), g = E(() => async (c, v) => {
|
|
328
|
+
if (o)
|
|
329
|
+
return (await o(c, v)).map((S) => ({ value: S.value, label: S.label }));
|
|
330
|
+
const f = A(c);
|
|
331
|
+
return (f ? i.filter((N) => A(N.label).includes(f)) : i).slice(0, 50).map((N) => ({ value: N.value, label: N.label }));
|
|
332
|
+
}, [o, i]), [C, T] = x((e == null ? void 0 : e.value) ?? "");
|
|
333
|
+
w(() => {
|
|
334
|
+
T((e == null ? void 0 : e.value) ?? "");
|
|
335
|
+
}, [e == null ? void 0 : e.value]), V({
|
|
336
|
+
doesFilterPass: (c) => {
|
|
337
|
+
const v = e == null ? void 0 : e.value;
|
|
338
|
+
if (!v) return !0;
|
|
339
|
+
const f = a(c.node);
|
|
340
|
+
if (f == null) return !1;
|
|
341
|
+
const F = typeof f == "string" ? f : String(f);
|
|
342
|
+
return A(F) === A(v);
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
function y(c) {
|
|
346
|
+
T(c.label), n({ type: "equals", value: c.value });
|
|
347
|
+
}
|
|
348
|
+
function b(c) {
|
|
349
|
+
T(c), c === "" && e && n(null);
|
|
350
|
+
}
|
|
351
|
+
function h() {
|
|
352
|
+
T(""), n(null);
|
|
353
|
+
}
|
|
354
|
+
const p = m ?? d("dataTable.typeaheadFilter.placeholder");
|
|
355
|
+
return /* @__PURE__ */ R(
|
|
356
|
+
"div",
|
|
357
|
+
{
|
|
358
|
+
"data-component": "typeahead-filter",
|
|
359
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
360
|
+
children: [
|
|
361
|
+
/* @__PURE__ */ u(
|
|
362
|
+
ne,
|
|
363
|
+
{
|
|
364
|
+
size: "sm",
|
|
365
|
+
value: C,
|
|
366
|
+
onChange: b,
|
|
367
|
+
onSelect: y,
|
|
368
|
+
loadOptions: g,
|
|
369
|
+
placeholder: p,
|
|
370
|
+
"aria-label": p
|
|
371
|
+
}
|
|
372
|
+
),
|
|
373
|
+
/* @__PURE__ */ u("div", { className: "ds:flex ds:items-center ds:justify-end ds:pt-[var(--spacing-xs)] ds:border-t ds:border-[var(--border)]", children: /* @__PURE__ */ u(j, { intent: "ghost", size: "sm", onClick: h, type: "button", children: d("dataTable.typeaheadFilter.clear") }) })
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
function Ke(t) {
|
|
379
|
+
var y, b;
|
|
380
|
+
const { model: e, onModelChange: n, column: a } = t, { t: l } = M("ui"), r = ((b = (y = a == null ? void 0 : a.getColDef) == null ? void 0 : y.call(a)) == null ? void 0 : b.filterParams) ?? {}, s = r.options ?? [], o = r.loadOptions, m = r.placeholder ?? l("dataTable.typeaheadFilter.placeholder"), d = E(() => async (h, p) => {
|
|
381
|
+
if (o)
|
|
382
|
+
return (await o(h, p)).map((F) => ({ value: F.value, label: F.label }));
|
|
383
|
+
const c = A(h);
|
|
384
|
+
return (c ? s.filter((f) => A(f.label).includes(c)) : s).slice(0, 50).map((f) => ({ value: f.value, label: f.label }));
|
|
385
|
+
}, [o, s]), [i, g] = x((e == null ? void 0 : e.value) ?? "");
|
|
386
|
+
w(() => {
|
|
387
|
+
g((e == null ? void 0 : e.value) ?? "");
|
|
388
|
+
}, [e == null ? void 0 : e.value]);
|
|
389
|
+
function C(h) {
|
|
390
|
+
g(h.label), n({ type: "equals", value: h.value });
|
|
391
|
+
}
|
|
392
|
+
function T(h) {
|
|
393
|
+
g(h), h === "" && e && n(null);
|
|
394
|
+
}
|
|
395
|
+
return /* @__PURE__ */ u("div", { "data-component": "typeahead-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ u(
|
|
396
|
+
ne,
|
|
397
|
+
{
|
|
398
|
+
size: "sm",
|
|
399
|
+
value: i,
|
|
400
|
+
onChange: T,
|
|
401
|
+
onSelect: C,
|
|
402
|
+
loadOptions: d,
|
|
403
|
+
placeholder: m,
|
|
404
|
+
"aria-label": m
|
|
405
|
+
}
|
|
406
|
+
) });
|
|
407
|
+
}
|
|
408
|
+
const be = [
|
|
409
|
+
"equals",
|
|
410
|
+
"notEqual",
|
|
411
|
+
"greaterThan",
|
|
412
|
+
"greaterThanOrEqual",
|
|
413
|
+
"lessThan",
|
|
414
|
+
"lessThanOrEqual",
|
|
415
|
+
"inRange",
|
|
416
|
+
"blank",
|
|
417
|
+
"notBlank"
|
|
418
|
+
];
|
|
419
|
+
function U(t) {
|
|
420
|
+
return t !== "blank" && t !== "notBlank";
|
|
421
|
+
}
|
|
422
|
+
function H(t) {
|
|
423
|
+
return t === "inRange";
|
|
424
|
+
}
|
|
425
|
+
function ye(t, e, n, a) {
|
|
426
|
+
if (t === "blank") return e === null;
|
|
427
|
+
if (t === "notBlank") return e !== null;
|
|
428
|
+
if (e === null) return !1;
|
|
429
|
+
if (t === "inRange")
|
|
430
|
+
return n === null ? a === null || e <= a : a === null ? e >= n : e >= n && e <= a;
|
|
431
|
+
if (n === null) return !0;
|
|
432
|
+
switch (t) {
|
|
433
|
+
case "equals":
|
|
434
|
+
return e === n;
|
|
435
|
+
case "notEqual":
|
|
436
|
+
return e !== n;
|
|
437
|
+
case "greaterThan":
|
|
438
|
+
return e > n;
|
|
439
|
+
case "greaterThanOrEqual":
|
|
440
|
+
return e >= n;
|
|
441
|
+
case "lessThan":
|
|
442
|
+
return e < n;
|
|
443
|
+
case "lessThanOrEqual":
|
|
444
|
+
return e <= n;
|
|
445
|
+
default:
|
|
446
|
+
return !0;
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
function J(t) {
|
|
450
|
+
return typeof t == "string" && t.trim() !== "" ? t : void 0;
|
|
451
|
+
}
|
|
452
|
+
function Te(t) {
|
|
453
|
+
if (t == null || t === "") return null;
|
|
454
|
+
const e = typeof t == "number" ? t : Number(t);
|
|
455
|
+
return Number.isNaN(e) ? null : e;
|
|
456
|
+
}
|
|
457
|
+
function Xe(t) {
|
|
458
|
+
const {
|
|
459
|
+
model: e,
|
|
460
|
+
onModelChange: n,
|
|
461
|
+
getValue: a,
|
|
462
|
+
defaultOperator: l,
|
|
463
|
+
min: r,
|
|
464
|
+
max: s,
|
|
465
|
+
step: o,
|
|
466
|
+
placeholder: m
|
|
467
|
+
} = t, { t: d } = M("ui"), i = (e == null ? void 0 : e.type) ?? l ?? "equals", [g, C] = x(i), [T, y] = x((e == null ? void 0 : e.filter) ?? null), [b, h] = x(
|
|
468
|
+
(e == null ? void 0 : e.filterTo) ?? null
|
|
469
|
+
);
|
|
470
|
+
w(() => {
|
|
471
|
+
if (e == null) {
|
|
472
|
+
C(l ?? "equals"), y(null), h(null);
|
|
473
|
+
return;
|
|
474
|
+
}
|
|
475
|
+
C(e.type), y(e.filter ?? null), h(e.filterTo ?? null);
|
|
476
|
+
}, [e, l]), V({
|
|
477
|
+
doesFilterPass: (S) => {
|
|
478
|
+
if (!e) return !0;
|
|
479
|
+
const q = Te(a(S.node));
|
|
480
|
+
return ye(
|
|
481
|
+
e.type,
|
|
482
|
+
q,
|
|
483
|
+
e.filter ?? null,
|
|
484
|
+
e.filterTo ?? null
|
|
485
|
+
);
|
|
486
|
+
}
|
|
487
|
+
});
|
|
488
|
+
const p = E(
|
|
489
|
+
() => be.map((S) => ({
|
|
490
|
+
value: S,
|
|
491
|
+
label: d(`dataTable.numberFilter.operators.${S}`)
|
|
492
|
+
})),
|
|
493
|
+
[d]
|
|
494
|
+
), c = m ?? d("dataTable.numberFilter.placeholder");
|
|
495
|
+
function v() {
|
|
496
|
+
if (!U(g)) {
|
|
497
|
+
n({ type: g, filter: 0 });
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
if (H(g)) {
|
|
501
|
+
if (T === null && b === null) {
|
|
502
|
+
n(null);
|
|
503
|
+
return;
|
|
504
|
+
}
|
|
505
|
+
n({
|
|
506
|
+
type: g,
|
|
507
|
+
filter: T ?? void 0,
|
|
508
|
+
filterTo: b ?? void 0
|
|
509
|
+
});
|
|
510
|
+
return;
|
|
511
|
+
}
|
|
512
|
+
if (T === null) {
|
|
513
|
+
n(null);
|
|
514
|
+
return;
|
|
515
|
+
}
|
|
516
|
+
n({ type: g, filter: T });
|
|
517
|
+
}
|
|
518
|
+
function f() {
|
|
519
|
+
C(l ?? "equals"), y(null), h(null), n(null);
|
|
520
|
+
}
|
|
521
|
+
const F = U(g), N = H(g);
|
|
522
|
+
return /* @__PURE__ */ R(
|
|
523
|
+
"div",
|
|
524
|
+
{
|
|
525
|
+
"data-component": "number-filter",
|
|
526
|
+
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
527
|
+
children: [
|
|
528
|
+
/* @__PURE__ */ u(
|
|
529
|
+
oe,
|
|
530
|
+
{
|
|
531
|
+
size: "sm",
|
|
532
|
+
options: p,
|
|
533
|
+
value: g,
|
|
534
|
+
onValueChange: (S) => {
|
|
535
|
+
S !== "" && C(S);
|
|
536
|
+
},
|
|
537
|
+
"aria-label": d("dataTable.numberFilter.operatorLabel")
|
|
538
|
+
}
|
|
539
|
+
),
|
|
540
|
+
F && !N && /* @__PURE__ */ u(
|
|
541
|
+
D,
|
|
542
|
+
{
|
|
543
|
+
size: "sm",
|
|
544
|
+
mode: "decimal",
|
|
545
|
+
value: T,
|
|
546
|
+
onChange: y,
|
|
547
|
+
min: r,
|
|
548
|
+
max: s,
|
|
549
|
+
step: o,
|
|
550
|
+
placeholder: c,
|
|
551
|
+
"aria-label": c
|
|
552
|
+
}
|
|
553
|
+
),
|
|
554
|
+
N && /* @__PURE__ */ R("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
555
|
+
/* @__PURE__ */ u(
|
|
556
|
+
D,
|
|
557
|
+
{
|
|
558
|
+
size: "sm",
|
|
559
|
+
mode: "decimal",
|
|
560
|
+
value: T,
|
|
561
|
+
onChange: y,
|
|
562
|
+
min: r,
|
|
563
|
+
max: s,
|
|
564
|
+
step: o,
|
|
565
|
+
placeholder: d("dataTable.numberFilter.from"),
|
|
566
|
+
"aria-label": d("dataTable.numberFilter.from")
|
|
567
|
+
}
|
|
568
|
+
),
|
|
569
|
+
/* @__PURE__ */ u(
|
|
570
|
+
D,
|
|
571
|
+
{
|
|
572
|
+
size: "sm",
|
|
573
|
+
mode: "decimal",
|
|
574
|
+
value: b,
|
|
575
|
+
onChange: h,
|
|
576
|
+
min: r,
|
|
577
|
+
max: s,
|
|
578
|
+
step: o,
|
|
579
|
+
placeholder: d("dataTable.numberFilter.to"),
|
|
580
|
+
"aria-label": d("dataTable.numberFilter.to")
|
|
581
|
+
}
|
|
582
|
+
)
|
|
583
|
+
] }),
|
|
584
|
+
/* @__PURE__ */ R("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: [
|
|
585
|
+
/* @__PURE__ */ u(j, { intent: "ghost", size: "sm", onClick: f, type: "button", children: d("dataTable.numberFilter.clear") }),
|
|
586
|
+
/* @__PURE__ */ u(j, { intent: "primary", size: "sm", onClick: v, type: "button", children: d("dataTable.numberFilter.apply") })
|
|
587
|
+
] })
|
|
588
|
+
]
|
|
589
|
+
}
|
|
590
|
+
);
|
|
591
|
+
}
|
|
592
|
+
function Je(t) {
|
|
593
|
+
var Y;
|
|
594
|
+
const { model: e, onModelChange: n, column: a, api: l } = t, { t: r } = M("ui"), s = (Y = a == null ? void 0 : a.getColDef) == null ? void 0 : Y.call(a), o = (s == null ? void 0 : s.filterParams) ?? {}, [m, d] = x(
|
|
595
|
+
null
|
|
596
|
+
), i = (e == null ? void 0 : e.type) ?? m ?? o.defaultOperator ?? "equals", g = H(i), C = U(i), T = o.placeholder ?? r("dataTable.numberFilter.placeholder"), y = J(a ? l == null ? void 0 : l.getDisplayNameForColumn(a, "header") : null) ?? J(s == null ? void 0 : s.headerName), b = r("dataTable.numberFilter.from"), h = r("dataTable.numberFilter.to"), p = y ? r("dataTable.numberFilter.columnFrom", { column: y }) : b, c = y ? r("dataTable.numberFilter.columnTo", { column: y }) : h, v = y ? r("dataTable.numberFilter.columnFilter", { column: y }) : T, [f, F] = x((e == null ? void 0 : e.filter) ?? null), [N, S] = x((e == null ? void 0 : e.filterTo) ?? null), q = ee(
|
|
597
|
+
null
|
|
598
|
+
);
|
|
599
|
+
if (w(() => {
|
|
600
|
+
const O = { from: (e == null ? void 0 : e.filter) ?? null, to: (e == null ? void 0 : e.filterTo) ?? null }, z = q.current;
|
|
601
|
+
q.current = null, !(z && z.from === O.from && z.to === O.to) && (F(O.from), S(O.to));
|
|
602
|
+
}, [e == null ? void 0 : e.filter, e == null ? void 0 : e.filterTo]), w(() => {
|
|
603
|
+
e != null && d(null);
|
|
604
|
+
}, [e]), w(() => {
|
|
605
|
+
if (!C || f === ((e == null ? void 0 : e.filter) ?? null) && N === ((e == null ? void 0 : e.filterTo) ?? null))
|
|
606
|
+
return;
|
|
607
|
+
const O = setTimeout(() => {
|
|
608
|
+
const z = f === null || Number.isNaN(f) ? null : f, G = N === null || Number.isNaN(N) ? null : N, B = (P) => {
|
|
609
|
+
q.current = {
|
|
610
|
+
from: (P == null ? void 0 : P.filter) ?? null,
|
|
611
|
+
to: (P == null ? void 0 : P.filterTo) ?? null
|
|
612
|
+
}, n(P);
|
|
613
|
+
}, Z = () => {
|
|
614
|
+
d(i), B(null);
|
|
615
|
+
};
|
|
616
|
+
if (!g) {
|
|
617
|
+
z === null ? Z() : B({ type: i, filter: z });
|
|
618
|
+
return;
|
|
619
|
+
}
|
|
620
|
+
if (z === null && G === null) {
|
|
621
|
+
Z();
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
B({
|
|
625
|
+
type: "inRange",
|
|
626
|
+
filter: z ?? void 0,
|
|
627
|
+
filterTo: G ?? void 0
|
|
628
|
+
});
|
|
629
|
+
}, 200);
|
|
630
|
+
return () => clearTimeout(O);
|
|
631
|
+
}, [f, N, i, g, C]), !C) {
|
|
632
|
+
const O = r(`dataTable.numberFilter.operators.${i}`);
|
|
633
|
+
return /* @__PURE__ */ u("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ u(
|
|
634
|
+
D,
|
|
635
|
+
{
|
|
636
|
+
size: "sm",
|
|
637
|
+
variant: "plain",
|
|
638
|
+
value: null,
|
|
639
|
+
disabled: !0,
|
|
640
|
+
placeholder: O,
|
|
641
|
+
"aria-label": y ? r("dataTable.numberFilter.columnOperator", {
|
|
642
|
+
column: y,
|
|
643
|
+
operator: O
|
|
644
|
+
}) : O
|
|
645
|
+
}
|
|
646
|
+
) });
|
|
647
|
+
}
|
|
648
|
+
return g ? /* @__PURE__ */ R(
|
|
649
|
+
"div",
|
|
650
|
+
{
|
|
651
|
+
"data-component": "number-floating-filter",
|
|
652
|
+
className: "ds:flex ds:w-full ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
653
|
+
children: [
|
|
654
|
+
/* @__PURE__ */ u(
|
|
655
|
+
D,
|
|
656
|
+
{
|
|
657
|
+
size: "sm",
|
|
658
|
+
variant: "plain",
|
|
659
|
+
mode: "decimal",
|
|
660
|
+
className: "ds:min-w-0 ds:flex-1",
|
|
661
|
+
value: f,
|
|
662
|
+
onChange: F,
|
|
663
|
+
min: o.min,
|
|
664
|
+
max: o.max,
|
|
665
|
+
step: o.step,
|
|
666
|
+
placeholder: b,
|
|
667
|
+
"aria-label": p
|
|
668
|
+
}
|
|
669
|
+
),
|
|
670
|
+
/* @__PURE__ */ u(
|
|
671
|
+
D,
|
|
672
|
+
{
|
|
673
|
+
size: "sm",
|
|
674
|
+
variant: "plain",
|
|
675
|
+
mode: "decimal",
|
|
676
|
+
className: "ds:min-w-0 ds:flex-1",
|
|
677
|
+
value: N,
|
|
678
|
+
onChange: S,
|
|
679
|
+
min: o.min,
|
|
680
|
+
max: o.max,
|
|
681
|
+
step: o.step,
|
|
682
|
+
placeholder: h,
|
|
683
|
+
"aria-label": c
|
|
684
|
+
}
|
|
685
|
+
)
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
) : /* @__PURE__ */ u("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ u(
|
|
689
|
+
D,
|
|
690
|
+
{
|
|
691
|
+
size: "sm",
|
|
692
|
+
mode: "decimal",
|
|
693
|
+
value: f,
|
|
694
|
+
onChange: F,
|
|
695
|
+
min: o.min,
|
|
696
|
+
max: o.max,
|
|
697
|
+
step: o.step,
|
|
698
|
+
placeholder: T,
|
|
699
|
+
"aria-label": v
|
|
700
|
+
}
|
|
701
|
+
) });
|
|
702
|
+
}
|
|
703
|
+
function Qe(t) {
|
|
704
|
+
const { value: e, variantMap: n } = t, a = (n == null ? void 0 : n[e]) ?? "neutral";
|
|
705
|
+
return /* @__PURE__ */ u(ue, { variant: a, withDot: !0, size: "sm", children: String(e ?? "") });
|
|
706
|
+
}
|
|
707
|
+
function We(t) {
|
|
708
|
+
const { value: e } = t;
|
|
709
|
+
return e ? /* @__PURE__ */ R("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
710
|
+
/* @__PURE__ */ u($, { name: e.name, src: e.src, size: "sm" }),
|
|
711
|
+
/* @__PURE__ */ u("span", { children: e.name })
|
|
712
|
+
] }) : null;
|
|
713
|
+
}
|
|
714
|
+
const Ce = {
|
|
715
|
+
sm: "ds:size-8",
|
|
716
|
+
md: "ds:size-10",
|
|
717
|
+
lg: "ds:size-12"
|
|
718
|
+
}, Fe = {
|
|
719
|
+
square: "ds:rounded-none",
|
|
720
|
+
rounded: "ds:rounded-[var(--radius-md)]",
|
|
721
|
+
circle: "ds:rounded-[var(--radius-full)]"
|
|
722
|
+
};
|
|
723
|
+
function _(t, e) {
|
|
724
|
+
if (!t || typeof t != "object") return;
|
|
725
|
+
const n = t[e];
|
|
726
|
+
return typeof n == "string" ? n : void 0;
|
|
727
|
+
}
|
|
728
|
+
const Ne = /^(?:https?:|data:image\/|\/(?!\/))/i;
|
|
729
|
+
function Se(t) {
|
|
730
|
+
if (!t) return;
|
|
731
|
+
const e = t.trim();
|
|
732
|
+
if (e.length !== 0)
|
|
733
|
+
return Ne.test(e) ? e : void 0;
|
|
734
|
+
}
|
|
735
|
+
function et(t) {
|
|
736
|
+
const {
|
|
737
|
+
data: e,
|
|
738
|
+
srcField: n,
|
|
739
|
+
altField: a,
|
|
740
|
+
fallbackField: l,
|
|
741
|
+
size: r = "md",
|
|
742
|
+
shape: s = "rounded"
|
|
743
|
+
} = t;
|
|
744
|
+
if (!e) return null;
|
|
745
|
+
const o = _(e, n), m = Se(o), d = a ? _(e, a) ?? "" : "", i = l ? _(e, l) : void 0;
|
|
746
|
+
return s === "circle" && i ? /* @__PURE__ */ u($, { src: m, name: i, size: r }) : m ? /* @__PURE__ */ u(
|
|
747
|
+
"img",
|
|
748
|
+
{
|
|
749
|
+
src: m,
|
|
750
|
+
alt: d,
|
|
751
|
+
loading: "lazy",
|
|
752
|
+
decoding: "async",
|
|
753
|
+
className: ["ds:object-cover", Ce[r], Fe[s]].join(
|
|
754
|
+
" "
|
|
755
|
+
)
|
|
756
|
+
}
|
|
757
|
+
) : i ? /* @__PURE__ */ u($, { name: i, size: r }) : null;
|
|
758
|
+
}
|
|
759
|
+
function tt(t) {
|
|
760
|
+
const { value: e, maxVisible: n = 3 } = t, { t: a } = M();
|
|
761
|
+
if (!Array.isArray(e) || e.length === 0) return null;
|
|
762
|
+
const l = e.slice(0, n), r = e.length - n;
|
|
763
|
+
return /* @__PURE__ */ R("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
764
|
+
l.map((s) => /* @__PURE__ */ u(K, { label: s, size: "sm" }, s)),
|
|
765
|
+
r > 0 && /* @__PURE__ */ u(ce, { label: e.slice(n).join(", "), children: /* @__PURE__ */ u(
|
|
766
|
+
K,
|
|
767
|
+
{
|
|
768
|
+
label: a("inputs.multiSelect.overflow", { count: r }),
|
|
769
|
+
size: "sm",
|
|
770
|
+
variant: "neutral",
|
|
771
|
+
fill: "outline"
|
|
772
|
+
}
|
|
773
|
+
) })
|
|
774
|
+
] });
|
|
775
|
+
}
|
|
776
|
+
const xe = {
|
|
777
|
+
date: { year: "numeric", month: "short", day: "numeric" },
|
|
778
|
+
time: { hour: "2-digit", minute: "2-digit" },
|
|
779
|
+
datetime: {
|
|
780
|
+
year: "numeric",
|
|
781
|
+
month: "short",
|
|
782
|
+
day: "numeric",
|
|
783
|
+
hour: "2-digit",
|
|
784
|
+
minute: "2-digit"
|
|
785
|
+
}
|
|
786
|
+
};
|
|
787
|
+
function nt(t) {
|
|
788
|
+
const { value: e, format: n = "date", options: a } = t;
|
|
789
|
+
if (e == null || e === "") return null;
|
|
790
|
+
const l = fe(e);
|
|
791
|
+
if (n === "relative" && !a) {
|
|
792
|
+
const s = l ? k(e) ?? e : e;
|
|
793
|
+
return /* @__PURE__ */ u(X, { value: s, shape: "bare" });
|
|
794
|
+
}
|
|
795
|
+
const r = a ?? xe[n === "relative" ? "date" : n];
|
|
796
|
+
return /* @__PURE__ */ u(
|
|
797
|
+
X,
|
|
798
|
+
{
|
|
799
|
+
value: e,
|
|
800
|
+
format: "absolute",
|
|
801
|
+
shape: "bare",
|
|
802
|
+
absoluteFormat: l ? { ...r, timeZone: "UTC" } : r
|
|
803
|
+
}
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
function Q(t, e) {
|
|
807
|
+
return typeof t == "function" ? t(e) : t;
|
|
808
|
+
}
|
|
809
|
+
function we(t) {
|
|
810
|
+
return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
|
|
811
|
+
}
|
|
812
|
+
function at(t) {
|
|
813
|
+
const { value: e, data: n, href: a, onClick: l, secondary: r } = t;
|
|
814
|
+
if (!n) return null;
|
|
815
|
+
const s = Q(a, n), o = Q(r, n), m = e == null || e === "" ? "" : String(e), d = [
|
|
816
|
+
"ds:text-[color:var(--primary)]",
|
|
817
|
+
"ds:hover:underline",
|
|
818
|
+
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
819
|
+
"ds:focus-visible:outline-solid",
|
|
820
|
+
"ds:focus-visible:outline-[color:var(--ring)]",
|
|
821
|
+
"ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
822
|
+
"ds:rounded-[var(--radius-sm)]"
|
|
823
|
+
].join(" "), i = (g) => {
|
|
824
|
+
l && (s || g.preventDefault(), g.stopPropagation(), l(n));
|
|
825
|
+
};
|
|
826
|
+
return /* @__PURE__ */ R("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
|
|
827
|
+
s ? /* @__PURE__ */ u(
|
|
828
|
+
"a",
|
|
829
|
+
{
|
|
830
|
+
href: we(s),
|
|
831
|
+
onClick: i,
|
|
832
|
+
className: d,
|
|
833
|
+
children: m
|
|
834
|
+
}
|
|
835
|
+
) : /* @__PURE__ */ u(
|
|
836
|
+
"button",
|
|
837
|
+
{
|
|
838
|
+
type: "button",
|
|
839
|
+
onClick: i,
|
|
840
|
+
className: [
|
|
841
|
+
"ds:appearance-none ds:bg-transparent ds:p-0 ds:text-start",
|
|
842
|
+
d
|
|
843
|
+
].join(" "),
|
|
844
|
+
children: m
|
|
845
|
+
}
|
|
846
|
+
),
|
|
847
|
+
o ? /* @__PURE__ */ u("span", { className: "type-meta ds:text-[color:var(--muted-foreground)]", children: o }) : null
|
|
848
|
+
] });
|
|
849
|
+
}
|
|
850
|
+
export {
|
|
851
|
+
nt as D,
|
|
852
|
+
et as I,
|
|
853
|
+
at as L,
|
|
854
|
+
Xe as N,
|
|
855
|
+
Ye as S,
|
|
856
|
+
tt as T,
|
|
857
|
+
We as U,
|
|
858
|
+
Ue as a,
|
|
859
|
+
He as b,
|
|
860
|
+
Je as c,
|
|
861
|
+
Ge as d,
|
|
862
|
+
Qe as e,
|
|
863
|
+
Ze as f,
|
|
864
|
+
Ke as g,
|
|
865
|
+
k as h
|
|
866
|
+
};
|
|
867
|
+
//# sourceMappingURL=link-cell-renderer-CkNbUsBM.js.map
|