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