@alfadocs/ui-kit 1.10.1 → 1.12.4
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/{actions-cell-renderer-xfSYiTXQ.js → actions-cell-renderer-BCEjn3-f.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-d44s_whc.js → anamnesis-summary-rows-BfhxWPO3.js} +1421 -1418
- package/dist/_chunks/appointment-timeline-DCn0Jx55.js +403 -0
- package/dist/_chunks/{balance-badge-cell-C_Qz76x7.js → balance-badge-cell-BrlikHfT.js} +317 -290
- package/dist/_chunks/booking-CBHKdsZl.js +2906 -0
- package/dist/_chunks/{chart-Bkr1Sh4o.js → chart-C6eHTxkO.js} +2 -2
- package/dist/_chunks/{contact-profile-card-CE9OJKcl.js → contact-profile-card-BMIBr5s9.js} +104 -125
- package/dist/_chunks/{control-room-rail-Cj2iX9h_.js → control-room-rail-iO_BCaq1.js} +2 -2
- package/dist/_chunks/{editable-currency-cell-renderer-zLf_bXvL.js → editable-currency-cell-renderer-B7TVZ5ZJ.js} +2 -2
- package/dist/_chunks/{face-scheme-BfDi4YkW.js → face-scheme-CZaKm6fG.js} +2 -2
- package/dist/_chunks/{file-manager-Df6hyUYg.js → file-manager-Moc7sUFj.js} +3 -3
- package/dist/_chunks/format-price-DNqXPa_q.js +61 -0
- package/dist/_chunks/{header-settings-CVC_davE.js → header-settings-J-ZCAfir.js} +2 -2
- package/dist/_chunks/{icon-button-group-D6SVMteH.js → icon-button-group-VCCod3Hz.js} +154 -145
- package/dist/_chunks/{link-cell-renderer-Cp2MSlJl.js → link-cell-renderer-CenJx-_7.js} +197 -181
- package/dist/_chunks/{marketplace-app-shell-Chfdia7m.js → marketplace-app-shell-DDQXQ8hX.js} +2 -2
- package/dist/_chunks/{notes-panel-e9cJWVRg.js → notes-panel-CymneXtl.js} +93 -91
- package/dist/_chunks/{practice-results-BEsAdW-B.js → practice-results-D7ygCj_W.js} +333 -291
- package/dist/_chunks/{signature-request-CW30B77U.js → signature-request-DVDTKLjM.js} +2 -2
- package/dist/_chunks/{stepper-accordion-BeVMZPuG.js → stepper-accordion-DmVykr5F.js} +91 -88
- package/dist/_chunks/{theme-toggle-DuMhQNFS.js → theme-toggle-uEwoKjl3.js} +2 -2
- package/dist/_chunks/{tool-rail-CHyUmulN.js → tool-rail-8Scslq3X.js} +2 -2
- package/dist/_chunks/{whatsapp-button-Ca9towA4.js → whatsapp-button-CuFIHJzG.js} +27 -19
- package/dist/agent-catalog.json +12 -5
- package/dist/agent-i18n/en.json +4 -3
- package/dist/components/_shared/format-price.d.ts +21 -0
- package/dist/components/_shared/index.d.ts +1 -0
- package/dist/components/_shared/stepper.d.ts +28 -2
- package/dist/components/appointment-card/appointment-card.d.ts +1 -1
- package/dist/components/appointment-timeline/appointment-timeline.d.ts +8 -0
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/booking-types.d.ts +15 -2
- package/dist/components/booking/index.js +1 -1
- package/dist/components/chart/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/control-room-rail/index.js +1 -1
- package/dist/components/data-table/filters/date-range-filter.d.ts +22 -0
- package/dist/components/data-table/index.js +3 -3
- package/dist/components/face-scheme/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button-group/index.js +1 -1
- package/dist/components/notes-panel/index.js +1 -1
- package/dist/components/notes-panel/notes-panel.d.ts +6 -0
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/practice-results/practice-results.d.ts +18 -0
- package/dist/components/stepper-accordion/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/tool-rail/index.js +1 -1
- package/dist/components/tool-rail/tool-rail.d.ts +1 -1
- package/dist/components/whatsapp-button/index.js +1 -1
- package/dist/host-compat.css +7 -1
- package/dist/i18n/locales/ar.d.ts +4 -0
- package/dist/i18n/locales/ar.js +5 -1
- package/dist/i18n/locales/de.d.ts +5 -1
- package/dist/i18n/locales/de.js +6 -2
- package/dist/i18n/locales/el.d.ts +4 -0
- package/dist/i18n/locales/el.js +5 -1
- package/dist/i18n/locales/en.d.ts +4 -0
- package/dist/i18n/locales/en.js +5 -1
- package/dist/i18n/locales/es.d.ts +5 -1
- package/dist/i18n/locales/es.js +6 -2
- package/dist/i18n/locales/fr.d.ts +5 -1
- package/dist/i18n/locales/fr.js +6 -2
- package/dist/i18n/locales/hi.d.ts +4 -0
- package/dist/i18n/locales/hi.js +5 -1
- package/dist/i18n/locales/it.d.ts +4 -0
- package/dist/i18n/locales/it.js +5 -1
- package/dist/i18n/locales/ja.d.ts +4 -0
- package/dist/i18n/locales/ja.js +5 -1
- package/dist/i18n/locales/nl.d.ts +5 -1
- package/dist/i18n/locales/nl.js +6 -2
- package/dist/i18n/locales/pl.d.ts +4 -0
- package/dist/i18n/locales/pl.js +5 -1
- package/dist/i18n/locales/pt.d.ts +5 -1
- package/dist/i18n/locales/pt.js +6 -2
- package/dist/i18n/locales/ro.d.ts +4 -0
- package/dist/i18n/locales/ro.js +5 -1
- package/dist/i18n/locales/ru.d.ts +4 -0
- package/dist/i18n/locales/ru.js +5 -1
- package/dist/i18n/locales/sq.d.ts +4 -0
- package/dist/i18n/locales/sq.js +5 -1
- package/dist/i18n/locales/sv.d.ts +4 -0
- package/dist/i18n/locales/sv.js +5 -1
- package/dist/i18n/locales/tr.d.ts +4 -0
- package/dist/i18n/locales/tr.js +5 -1
- package/dist/i18n/locales/zh.d.ts +4 -0
- package/dist/i18n/locales/zh.js +5 -1
- package/dist/index.js +20 -20
- package/dist/locales/ar.json +5 -1
- package/dist/locales/de.json +6 -2
- package/dist/locales/el.json +5 -1
- package/dist/locales/en.json +5 -1
- package/dist/locales/es.json +6 -2
- package/dist/locales/fr.json +6 -2
- package/dist/locales/hi.json +5 -1
- package/dist/locales/it.json +5 -1
- package/dist/locales/ja.json +5 -1
- package/dist/locales/nl.json +6 -2
- package/dist/locales/pl.json +5 -1
- package/dist/locales/pt.json +6 -2
- package/dist/locales/ro.json +5 -1
- package/dist/locales/ru.json +5 -1
- package/dist/locales/sq.json +5 -1
- package/dist/locales/sv.json +5 -1
- package/dist/locales/tr.json +5 -1
- package/dist/locales/zh.json +5 -1
- package/dist/patterns/anamnesis/anamnesis-config.d.ts +18 -7
- package/dist/patterns/anamnesis/anamnesis-types.d.ts +8 -0
- package/dist/patterns/anamnesis/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 +1 -1
- package/dist/_chunks/appointment-timeline-0mwtpErq.js +0 -388
- package/dist/_chunks/booking-DHkKcUIl.js +0 -2713
- package/dist/_chunks/languages-CGLX6Qpe.js +0 -19
|
@@ -1,48 +1,64 @@
|
|
|
1
1
|
import { jsx as o, jsxs as O } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
2
|
+
import { useState as x, useEffect as w, useCallback as U, useMemo as z, useRef as X } from "react";
|
|
3
3
|
import { useGridFilter as A } from "ag-grid-react";
|
|
4
|
-
import { D as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { C as
|
|
7
|
-
import { B as
|
|
8
|
-
import { M as
|
|
9
|
-
import { S as
|
|
10
|
-
import { A as
|
|
11
|
-
import { N as
|
|
12
|
-
import { S as
|
|
4
|
+
import { D as H } from "./date-range-picker-BD8P_rJq.js";
|
|
5
|
+
import { useTranslation as D } from "react-i18next";
|
|
6
|
+
import { C as Z } from "./checkbox-BuZ1u__2.js";
|
|
7
|
+
import { B as E } from "./button-nJaPh_HC.js";
|
|
8
|
+
import { M as J } from "./multi-select-DqL4o0qV.js";
|
|
9
|
+
import { S as Q } from "./scroll-area-BZOvUhwQ.js";
|
|
10
|
+
import { A as Y } from "./autocomplete-BrONKN8l.js";
|
|
11
|
+
import { N as M } from "./number-input-Cgu2TtA8.js";
|
|
12
|
+
import { S as W } from "./select-BW5ecXlX.js";
|
|
13
13
|
import { B as ee } from "./badge-sTusUqZD.js";
|
|
14
|
-
import { A as
|
|
15
|
-
import { T as
|
|
14
|
+
import { A as j } from "./avatar-BNQNhoyL.js";
|
|
15
|
+
import { T as I } from "./tag-3wgkwwDB.js";
|
|
16
16
|
import { T as te } from "./tooltip-DvmfrNvB.js";
|
|
17
17
|
import { T as B } from "./timestamp-BV2lC-wV.js";
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const ne = /^\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}`;
|
|
20
23
|
}
|
|
21
|
-
function
|
|
24
|
+
function R(t) {
|
|
22
25
|
if (!t) return;
|
|
23
|
-
const e = new Date(
|
|
26
|
+
const e = ne.test(t) ? new Date(
|
|
27
|
+
Number(t.slice(0, 4)),
|
|
28
|
+
Number(t.slice(5, 7)) - 1,
|
|
29
|
+
Number(t.slice(8, 10))
|
|
30
|
+
) : new Date(t);
|
|
24
31
|
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
25
32
|
}
|
|
26
|
-
|
|
33
|
+
const ae = /^(\d{4}-\d{2}-\d{2})/;
|
|
34
|
+
function re(t) {
|
|
35
|
+
if (t == null || t === "")
|
|
36
|
+
return null;
|
|
37
|
+
if (typeof t == "string") {
|
|
38
|
+
const n = ae.exec(t);
|
|
39
|
+
if (n) return n[1];
|
|
40
|
+
}
|
|
41
|
+
const e = t instanceof Date ? t : new Date(String(t));
|
|
42
|
+
return Number.isNaN(e.getTime()) ? null : P(e);
|
|
43
|
+
}
|
|
44
|
+
function le(t, e, n) {
|
|
45
|
+
if (!e && !n) return !0;
|
|
46
|
+
const a = re(t);
|
|
47
|
+
return !(!a || e && a < e || n && a > n);
|
|
48
|
+
}
|
|
49
|
+
function Me(t) {
|
|
27
50
|
var c;
|
|
28
|
-
const { model: e, onModelChange: n, getValue: a, doesRowPassOtherFilter: l } = t, r = ((c = t.colDef) == null ? void 0 : c.filterParams) ?? {}, [s, f] =
|
|
29
|
-
from:
|
|
30
|
-
to:
|
|
51
|
+
const { model: e, onModelChange: n, getValue: a, doesRowPassOtherFilter: l } = t, r = ((c = t.colDef) == null ? void 0 : c.filterParams) ?? {}, [s, f] = x(() => ({
|
|
52
|
+
from: R(e == null ? void 0 : e.dateFrom),
|
|
53
|
+
to: R(e == null ? void 0 : e.dateTo)
|
|
31
54
|
}));
|
|
32
55
|
w(() => {
|
|
33
56
|
f({
|
|
34
|
-
from:
|
|
35
|
-
to:
|
|
57
|
+
from: R(e == null ? void 0 : e.dateFrom),
|
|
58
|
+
to: R(e == null ? void 0 : e.dateTo)
|
|
36
59
|
});
|
|
37
60
|
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]), A({
|
|
38
|
-
doesFilterPass: (i) =>
|
|
39
|
-
const p = F(e == null ? void 0 : e.dateFrom), C = F(e == null ? void 0 : e.dateTo);
|
|
40
|
-
if (!p && !C) return !0;
|
|
41
|
-
const y = a(i.node);
|
|
42
|
-
if (!y) return !1;
|
|
43
|
-
const T = y instanceof Date ? y : F(String(y));
|
|
44
|
-
return !(!T || p && T < p || C && T > C);
|
|
45
|
-
}
|
|
61
|
+
doesFilterPass: (i) => le(a(i.node), e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo)
|
|
46
62
|
});
|
|
47
63
|
function u(i) {
|
|
48
64
|
if (f(i), !i.from && !i.to) {
|
|
@@ -51,8 +67,8 @@ function Le(t) {
|
|
|
51
67
|
}
|
|
52
68
|
n({
|
|
53
69
|
type: "inRange",
|
|
54
|
-
dateFrom:
|
|
55
|
-
dateTo:
|
|
70
|
+
dateFrom: P(i.from),
|
|
71
|
+
dateTo: P(i.to)
|
|
56
72
|
});
|
|
57
73
|
}
|
|
58
74
|
return /* @__PURE__ */ o(
|
|
@@ -61,7 +77,7 @@ function Le(t) {
|
|
|
61
77
|
"data-component": "date-range-filter",
|
|
62
78
|
className: "ds:p-[var(--spacing-sm)] ds:min-w-[280px]",
|
|
63
79
|
children: /* @__PURE__ */ o(
|
|
64
|
-
|
|
80
|
+
H,
|
|
65
81
|
{
|
|
66
82
|
value: s,
|
|
67
83
|
onChange: u,
|
|
@@ -72,16 +88,16 @@ function Le(t) {
|
|
|
72
88
|
}
|
|
73
89
|
);
|
|
74
90
|
}
|
|
75
|
-
function
|
|
91
|
+
function Ae(t) {
|
|
76
92
|
var u, c;
|
|
77
|
-
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] =
|
|
78
|
-
from:
|
|
79
|
-
to:
|
|
93
|
+
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(() => ({
|
|
94
|
+
from: R(e == null ? void 0 : e.dateFrom),
|
|
95
|
+
to: R(e == null ? void 0 : e.dateTo)
|
|
80
96
|
}));
|
|
81
97
|
w(() => {
|
|
82
98
|
s({
|
|
83
|
-
from:
|
|
84
|
-
to:
|
|
99
|
+
from: R(e == null ? void 0 : e.dateFrom),
|
|
100
|
+
to: R(e == null ? void 0 : e.dateTo)
|
|
85
101
|
});
|
|
86
102
|
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]);
|
|
87
103
|
function f(i) {
|
|
@@ -91,12 +107,12 @@ function Ee(t) {
|
|
|
91
107
|
}
|
|
92
108
|
n({
|
|
93
109
|
type: "inRange",
|
|
94
|
-
dateFrom:
|
|
95
|
-
dateTo:
|
|
110
|
+
dateFrom: P(i.from),
|
|
111
|
+
dateTo: P(i.to)
|
|
96
112
|
});
|
|
97
113
|
}
|
|
98
114
|
return /* @__PURE__ */ o("div", { "data-component": "date-range-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ o(
|
|
99
|
-
|
|
115
|
+
H,
|
|
100
116
|
{
|
|
101
117
|
value: r,
|
|
102
118
|
onChange: f,
|
|
@@ -106,37 +122,37 @@ function Ee(t) {
|
|
|
106
122
|
}
|
|
107
123
|
) });
|
|
108
124
|
}
|
|
109
|
-
function
|
|
125
|
+
function k(t) {
|
|
110
126
|
return typeof t == "number" ? `n:${t}` : `s:${t}`;
|
|
111
127
|
}
|
|
112
|
-
const
|
|
113
|
-
function
|
|
128
|
+
const se = new Intl.Collator(void 0, { numeric: !0 });
|
|
129
|
+
function ie(t, e) {
|
|
114
130
|
if (!t) return [];
|
|
115
131
|
const n = /* @__PURE__ */ new Map();
|
|
116
132
|
return t.forEachNode((a) => {
|
|
117
133
|
const l = e(a);
|
|
118
134
|
if (l == null) return;
|
|
119
|
-
const r = typeof l == "string" || typeof l == "number" ? l : String(l), s =
|
|
135
|
+
const r = typeof l == "string" || typeof l == "number" ? l : String(l), s = k(r);
|
|
120
136
|
n.has(s) || n.set(s, { value: r, label: String(r) });
|
|
121
137
|
}), Array.from(n.values()).sort(
|
|
122
|
-
(a, l) =>
|
|
138
|
+
(a, l) => se.compare(String(a.label), String(l.label))
|
|
123
139
|
);
|
|
124
140
|
}
|
|
125
|
-
function
|
|
141
|
+
function oe(t, e) {
|
|
126
142
|
return t.length !== e.length ? !1 : t.every(
|
|
127
|
-
(n, a) =>
|
|
143
|
+
(n, a) => k(n.value) === k(e[a].value) && n.label === e[a].label
|
|
128
144
|
);
|
|
129
145
|
}
|
|
130
|
-
function
|
|
131
|
-
const a = e, l = a !== void 0, [r, s] =
|
|
146
|
+
function G(t, e, n) {
|
|
147
|
+
const a = e, l = a !== void 0, [r, s] = x([]), f = X(n);
|
|
132
148
|
return w(() => {
|
|
133
149
|
f.current = n;
|
|
134
150
|
}), w(() => {
|
|
135
151
|
if (l || !t) return;
|
|
136
152
|
const u = () => {
|
|
137
153
|
s((c) => {
|
|
138
|
-
const i =
|
|
139
|
-
return
|
|
154
|
+
const i = ie(t, f.current);
|
|
155
|
+
return oe(c, i) ? c : i;
|
|
140
156
|
});
|
|
141
157
|
};
|
|
142
158
|
return u(), t.addEventListener("modelUpdated", u), t.addEventListener("cellValueChanged", u), () => {
|
|
@@ -144,29 +160,29 @@ function K(t, e, n) {
|
|
|
144
160
|
};
|
|
145
161
|
}, [t, l]), a ?? r;
|
|
146
162
|
}
|
|
147
|
-
function
|
|
148
|
-
const { model: e, onModelChange: n, getValue: a, api: l, options: r, placeholder: s } = t, { t: f } =
|
|
163
|
+
function qe(t) {
|
|
164
|
+
const { model: e, onModelChange: n, getValue: a, api: l, options: r, placeholder: s } = t, { t: f } = D("ui"), u = U(
|
|
149
165
|
(m) => a(m),
|
|
150
166
|
[a]
|
|
151
|
-
), c =
|
|
167
|
+
), c = G(l, r, u), i = z(() => {
|
|
152
168
|
const m = /* @__PURE__ */ new Set(), d = (e == null ? void 0 : e.values) ?? [];
|
|
153
|
-
for (const h of d) m.add(
|
|
169
|
+
for (const h of d) m.add(k(h));
|
|
154
170
|
return m;
|
|
155
|
-
}, [e]), [p,
|
|
171
|
+
}, [e]), [p, y] = x(i);
|
|
156
172
|
w(() => {
|
|
157
|
-
|
|
173
|
+
y(i);
|
|
158
174
|
}, [i]), A({
|
|
159
175
|
doesFilterPass: (m) => {
|
|
160
176
|
const d = e == null ? void 0 : e.values;
|
|
161
177
|
if (!d || d.length === 0) return !0;
|
|
162
178
|
const h = a(m.node);
|
|
163
179
|
if (h == null) return !1;
|
|
164
|
-
const g = typeof h == "string" || typeof h == "number" ? h : String(h), S =
|
|
165
|
-
return d.some((
|
|
180
|
+
const g = typeof h == "string" || typeof h == "number" ? h : String(h), S = k(g);
|
|
181
|
+
return d.some((F) => k(F) === S);
|
|
166
182
|
}
|
|
167
183
|
});
|
|
168
|
-
function
|
|
169
|
-
|
|
184
|
+
function C(m) {
|
|
185
|
+
y((d) => {
|
|
170
186
|
const h = new Set(d);
|
|
171
187
|
return h.has(m) ? h.delete(m) : h.add(m), h;
|
|
172
188
|
});
|
|
@@ -178,7 +194,7 @@ function Pe(t) {
|
|
|
178
194
|
}
|
|
179
195
|
const m = [];
|
|
180
196
|
for (const d of c)
|
|
181
|
-
p.has(
|
|
197
|
+
p.has(k(d.value)) && m.push(d.value);
|
|
182
198
|
if (m.length === 0) {
|
|
183
199
|
n(null);
|
|
184
200
|
return;
|
|
@@ -186,7 +202,7 @@ function Pe(t) {
|
|
|
186
202
|
n({ type: "set", values: m });
|
|
187
203
|
}
|
|
188
204
|
function b() {
|
|
189
|
-
|
|
205
|
+
y(/* @__PURE__ */ new Set()), n(null);
|
|
190
206
|
}
|
|
191
207
|
const v = s ?? f("dataTable.selectFilter.all");
|
|
192
208
|
return /* @__PURE__ */ O(
|
|
@@ -195,21 +211,21 @@ function Pe(t) {
|
|
|
195
211
|
"data-component": "select-filter",
|
|
196
212
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[200px] ds:max-w-[260px]",
|
|
197
213
|
children: [
|
|
198
|
-
/* @__PURE__ */ o(
|
|
214
|
+
/* @__PURE__ */ o(Q, { orientation: "vertical", className: "ds:max-h-[240px]", children: /* @__PURE__ */ o(
|
|
199
215
|
"div",
|
|
200
216
|
{
|
|
201
217
|
role: "group",
|
|
202
218
|
"aria-label": v,
|
|
203
219
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
204
220
|
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) => {
|
|
205
|
-
const d =
|
|
221
|
+
const d = k(m.value);
|
|
206
222
|
return /* @__PURE__ */ o(
|
|
207
|
-
|
|
223
|
+
Z,
|
|
208
224
|
{
|
|
209
225
|
size: "sm",
|
|
210
226
|
label: m.label,
|
|
211
227
|
checked: p.has(d),
|
|
212
|
-
onCheckedChange: () =>
|
|
228
|
+
onCheckedChange: () => C(d)
|
|
213
229
|
},
|
|
214
230
|
d
|
|
215
231
|
);
|
|
@@ -217,40 +233,40 @@ function Pe(t) {
|
|
|
217
233
|
}
|
|
218
234
|
) }),
|
|
219
235
|
/* @__PURE__ */ O("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: [
|
|
220
|
-
/* @__PURE__ */ o(
|
|
221
|
-
/* @__PURE__ */ o(
|
|
236
|
+
/* @__PURE__ */ o(E, { intent: "ghost", size: "sm", onClick: b, type: "button", children: f("dataTable.selectFilter.clear") }),
|
|
237
|
+
/* @__PURE__ */ o(E, { intent: "primary", size: "sm", onClick: T, type: "button", children: f("dataTable.selectFilter.apply") })
|
|
222
238
|
] })
|
|
223
239
|
]
|
|
224
240
|
}
|
|
225
241
|
);
|
|
226
242
|
}
|
|
227
|
-
function
|
|
243
|
+
function je(t) {
|
|
228
244
|
var T;
|
|
229
|
-
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 =
|
|
245
|
+
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(
|
|
230
246
|
(b) => l && a ? l.getCellValue({
|
|
231
247
|
rowNode: b,
|
|
232
248
|
colKey: a
|
|
233
249
|
}) : void 0,
|
|
234
250
|
[l, a]
|
|
235
|
-
), u =
|
|
251
|
+
), u = G(
|
|
236
252
|
l,
|
|
237
253
|
s.options,
|
|
238
254
|
f
|
|
239
|
-
), c = s.placeholder ?? (typeof (r == null ? void 0 : r.headerName) == "string" ? r.headerName : void 0), i =
|
|
255
|
+
), c = s.placeholder ?? (typeof (r == null ? void 0 : r.headerName) == "string" ? r.headerName : void 0), i = z(() => {
|
|
240
256
|
const b = /* @__PURE__ */ new Map();
|
|
241
257
|
for (const v of u) b.set(String(v.value), v.value);
|
|
242
258
|
return b;
|
|
243
|
-
}, [u]), p =
|
|
259
|
+
}, [u]), p = z(
|
|
244
260
|
() => u.map((b) => ({
|
|
245
261
|
value: String(b.value),
|
|
246
262
|
label: b.label
|
|
247
263
|
})),
|
|
248
264
|
[u]
|
|
249
|
-
),
|
|
265
|
+
), y = z(
|
|
250
266
|
() => ((e == null ? void 0 : e.values) ?? []).map((b) => String(b)),
|
|
251
267
|
[e]
|
|
252
268
|
);
|
|
253
|
-
function
|
|
269
|
+
function C(b) {
|
|
254
270
|
if (b.length === 0) {
|
|
255
271
|
n(null);
|
|
256
272
|
return;
|
|
@@ -267,12 +283,12 @@ function De(t) {
|
|
|
267
283
|
n({ type: "set", values: v });
|
|
268
284
|
}
|
|
269
285
|
return /* @__PURE__ */ o("div", { "data-component": "select-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ o(
|
|
270
|
-
|
|
286
|
+
J,
|
|
271
287
|
{
|
|
272
288
|
size: "sm",
|
|
273
289
|
options: p,
|
|
274
|
-
value:
|
|
275
|
-
onChange:
|
|
290
|
+
value: y,
|
|
291
|
+
onChange: C,
|
|
276
292
|
placeholder: s.placeholder,
|
|
277
293
|
"aria-label": c,
|
|
278
294
|
allowClear: !0
|
|
@@ -282,7 +298,7 @@ function De(t) {
|
|
|
282
298
|
function L(t) {
|
|
283
299
|
return t.trim().toLocaleLowerCase();
|
|
284
300
|
}
|
|
285
|
-
function
|
|
301
|
+
function Ie(t) {
|
|
286
302
|
const {
|
|
287
303
|
model: e,
|
|
288
304
|
onModelChange: n,
|
|
@@ -292,7 +308,7 @@ function Me(t) {
|
|
|
292
308
|
options: s,
|
|
293
309
|
loadOptions: f,
|
|
294
310
|
placeholder: u
|
|
295
|
-
} = t, { t: c } =
|
|
311
|
+
} = t, { t: c } = D("ui"), i = z(() => {
|
|
296
312
|
if (s && s.length > 0) return s;
|
|
297
313
|
if (!l || !r) return [];
|
|
298
314
|
const d = /* @__PURE__ */ new Map();
|
|
@@ -304,14 +320,14 @@ function Me(t) {
|
|
|
304
320
|
}), Array.from(d.values()).sort(
|
|
305
321
|
(h, g) => h.label.localeCompare(g.label)
|
|
306
322
|
);
|
|
307
|
-
}, [s, l, r, a]), p =
|
|
323
|
+
}, [s, l, r, a]), p = z(() => async (d, h) => {
|
|
308
324
|
if (f)
|
|
309
|
-
return (await f(d, h)).map((
|
|
325
|
+
return (await f(d, h)).map((N) => ({ value: N.value, label: N.label }));
|
|
310
326
|
const g = L(d);
|
|
311
|
-
return (g ? i.filter((
|
|
312
|
-
}, [f, i]), [
|
|
327
|
+
return (g ? i.filter((F) => L(F.label).includes(g)) : i).slice(0, 50).map((F) => ({ value: F.value, label: F.label }));
|
|
328
|
+
}, [f, i]), [y, C] = x((e == null ? void 0 : e.value) ?? "");
|
|
313
329
|
w(() => {
|
|
314
|
-
|
|
330
|
+
C((e == null ? void 0 : e.value) ?? "");
|
|
315
331
|
}, [e == null ? void 0 : e.value]), A({
|
|
316
332
|
doesFilterPass: (d) => {
|
|
317
333
|
const h = e == null ? void 0 : e.value;
|
|
@@ -323,13 +339,13 @@ function Me(t) {
|
|
|
323
339
|
}
|
|
324
340
|
});
|
|
325
341
|
function T(d) {
|
|
326
|
-
|
|
342
|
+
C(d.label), n({ type: "equals", value: d.value });
|
|
327
343
|
}
|
|
328
344
|
function b(d) {
|
|
329
|
-
|
|
345
|
+
C(d), d === "" && e && n(null);
|
|
330
346
|
}
|
|
331
347
|
function v() {
|
|
332
|
-
|
|
348
|
+
C(""), n(null);
|
|
333
349
|
}
|
|
334
350
|
const m = u ?? c("dataTable.typeaheadFilter.placeholder");
|
|
335
351
|
return /* @__PURE__ */ O(
|
|
@@ -339,10 +355,10 @@ function Me(t) {
|
|
|
339
355
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
340
356
|
children: [
|
|
341
357
|
/* @__PURE__ */ o(
|
|
342
|
-
|
|
358
|
+
Y,
|
|
343
359
|
{
|
|
344
360
|
size: "sm",
|
|
345
|
-
value:
|
|
361
|
+
value: y,
|
|
346
362
|
onChange: b,
|
|
347
363
|
onSelect: T,
|
|
348
364
|
loadOptions: p,
|
|
@@ -350,42 +366,42 @@ function Me(t) {
|
|
|
350
366
|
"aria-label": m
|
|
351
367
|
}
|
|
352
368
|
),
|
|
353
|
-
/* @__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(
|
|
369
|
+
/* @__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") }) })
|
|
354
370
|
]
|
|
355
371
|
}
|
|
356
372
|
);
|
|
357
373
|
}
|
|
358
|
-
function
|
|
374
|
+
function Be(t) {
|
|
359
375
|
var T, b;
|
|
360
|
-
const { model: e, onModelChange: n, column: a } = t, { t: l } =
|
|
376
|
+
const { model: e, onModelChange: n, column: a } = t, { t: l } = D("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) => {
|
|
361
377
|
if (f)
|
|
362
378
|
return (await f(v, m)).map((S) => ({ value: S.value, label: S.label }));
|
|
363
379
|
const d = L(v);
|
|
364
380
|
return (d ? s.filter((g) => L(g.label).includes(d)) : s).slice(0, 50).map((g) => ({ value: g.value, label: g.label }));
|
|
365
|
-
}, [f, s]), [i, p] =
|
|
381
|
+
}, [f, s]), [i, p] = x((e == null ? void 0 : e.value) ?? "");
|
|
366
382
|
w(() => {
|
|
367
383
|
p((e == null ? void 0 : e.value) ?? "");
|
|
368
384
|
}, [e == null ? void 0 : e.value]);
|
|
369
|
-
function
|
|
385
|
+
function y(v) {
|
|
370
386
|
p(v.label), n({ type: "equals", value: v.value });
|
|
371
387
|
}
|
|
372
|
-
function
|
|
388
|
+
function C(v) {
|
|
373
389
|
p(v), v === "" && e && n(null);
|
|
374
390
|
}
|
|
375
391
|
return /* @__PURE__ */ o("div", { "data-component": "typeahead-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ o(
|
|
376
|
-
|
|
392
|
+
Y,
|
|
377
393
|
{
|
|
378
394
|
size: "sm",
|
|
379
395
|
value: i,
|
|
380
|
-
onChange:
|
|
381
|
-
onSelect:
|
|
396
|
+
onChange: C,
|
|
397
|
+
onSelect: y,
|
|
382
398
|
loadOptions: c,
|
|
383
399
|
placeholder: u,
|
|
384
400
|
"aria-label": u
|
|
385
401
|
}
|
|
386
402
|
) });
|
|
387
403
|
}
|
|
388
|
-
const
|
|
404
|
+
const ue = [
|
|
389
405
|
"equals",
|
|
390
406
|
"notEqual",
|
|
391
407
|
"greaterThan",
|
|
@@ -396,13 +412,13 @@ const le = [
|
|
|
396
412
|
"blank",
|
|
397
413
|
"notBlank"
|
|
398
414
|
];
|
|
399
|
-
function
|
|
415
|
+
function _(t) {
|
|
400
416
|
return t !== "blank" && t !== "notBlank";
|
|
401
417
|
}
|
|
402
|
-
function
|
|
418
|
+
function V(t) {
|
|
403
419
|
return t === "inRange";
|
|
404
420
|
}
|
|
405
|
-
function
|
|
421
|
+
function ce(t, e, n, a) {
|
|
406
422
|
if (t === "blank") return e === null;
|
|
407
423
|
if (t === "notBlank") return e !== null;
|
|
408
424
|
if (e === null) return !1;
|
|
@@ -429,12 +445,12 @@ function se(t, e, n, a) {
|
|
|
429
445
|
return !0;
|
|
430
446
|
}
|
|
431
447
|
}
|
|
432
|
-
function
|
|
448
|
+
function de(t) {
|
|
433
449
|
if (t == null || t === "") return null;
|
|
434
450
|
const e = typeof t == "number" ? t : Number(t);
|
|
435
451
|
return Number.isNaN(e) ? null : e;
|
|
436
452
|
}
|
|
437
|
-
function
|
|
453
|
+
function _e(t) {
|
|
438
454
|
const {
|
|
439
455
|
model: e,
|
|
440
456
|
onModelChange: n,
|
|
@@ -444,57 +460,57 @@ function qe(t) {
|
|
|
444
460
|
max: s,
|
|
445
461
|
step: f,
|
|
446
462
|
placeholder: u
|
|
447
|
-
} = t, { t: c } =
|
|
463
|
+
} = t, { t: c } = D("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(
|
|
448
464
|
(e == null ? void 0 : e.filterTo) ?? null
|
|
449
465
|
);
|
|
450
466
|
w(() => {
|
|
451
467
|
if (e == null) {
|
|
452
|
-
|
|
468
|
+
y(l ?? "equals"), T(null), v(null);
|
|
453
469
|
return;
|
|
454
470
|
}
|
|
455
|
-
|
|
471
|
+
y(e.type), T(e.filter ?? null), v(e.filterTo ?? null);
|
|
456
472
|
}, [e, l]), A({
|
|
457
|
-
doesFilterPass: (
|
|
473
|
+
doesFilterPass: (N) => {
|
|
458
474
|
if (!e) return !0;
|
|
459
|
-
const
|
|
460
|
-
return
|
|
475
|
+
const K = de(a(N.node));
|
|
476
|
+
return ce(
|
|
461
477
|
e.type,
|
|
462
|
-
|
|
478
|
+
K,
|
|
463
479
|
e.filter ?? null,
|
|
464
480
|
e.filterTo ?? null
|
|
465
481
|
);
|
|
466
482
|
}
|
|
467
483
|
});
|
|
468
|
-
const m =
|
|
469
|
-
() =>
|
|
470
|
-
value:
|
|
471
|
-
label: c(`dataTable.numberFilter.operators.${
|
|
484
|
+
const m = z(
|
|
485
|
+
() => ue.map((N) => ({
|
|
486
|
+
value: N,
|
|
487
|
+
label: c(`dataTable.numberFilter.operators.${N}`)
|
|
472
488
|
})),
|
|
473
489
|
[c]
|
|
474
490
|
), d = u ?? c("dataTable.numberFilter.placeholder");
|
|
475
491
|
function h() {
|
|
476
|
-
if (!
|
|
492
|
+
if (!_(p)) {
|
|
477
493
|
n({ type: p, filter: 0 });
|
|
478
494
|
return;
|
|
479
495
|
}
|
|
480
|
-
if (
|
|
496
|
+
if (C === null) {
|
|
481
497
|
n(null);
|
|
482
498
|
return;
|
|
483
499
|
}
|
|
484
|
-
if (
|
|
500
|
+
if (V(p)) {
|
|
485
501
|
n({
|
|
486
502
|
type: p,
|
|
487
|
-
filter:
|
|
503
|
+
filter: C,
|
|
488
504
|
filterTo: b ?? void 0
|
|
489
505
|
});
|
|
490
506
|
return;
|
|
491
507
|
}
|
|
492
|
-
n({ type: p, filter:
|
|
508
|
+
n({ type: p, filter: C });
|
|
493
509
|
}
|
|
494
510
|
function g() {
|
|
495
|
-
|
|
511
|
+
y(l ?? "equals"), T(null), v(null), n(null);
|
|
496
512
|
}
|
|
497
|
-
const S =
|
|
513
|
+
const S = _(p), F = V(p);
|
|
498
514
|
return /* @__PURE__ */ O(
|
|
499
515
|
"div",
|
|
500
516
|
{
|
|
@@ -502,22 +518,22 @@ function qe(t) {
|
|
|
502
518
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
503
519
|
children: [
|
|
504
520
|
/* @__PURE__ */ o(
|
|
505
|
-
|
|
521
|
+
W,
|
|
506
522
|
{
|
|
507
523
|
size: "sm",
|
|
508
524
|
options: m,
|
|
509
525
|
value: p,
|
|
510
|
-
onValueChange: (
|
|
511
|
-
|
|
526
|
+
onValueChange: (N) => {
|
|
527
|
+
N !== "" && y(N);
|
|
512
528
|
},
|
|
513
529
|
"aria-label": c("dataTable.numberFilter.operators.equals")
|
|
514
530
|
}
|
|
515
531
|
),
|
|
516
|
-
S && !
|
|
517
|
-
|
|
532
|
+
S && !F && /* @__PURE__ */ o(
|
|
533
|
+
M,
|
|
518
534
|
{
|
|
519
535
|
size: "sm",
|
|
520
|
-
value:
|
|
536
|
+
value: C,
|
|
521
537
|
onChange: T,
|
|
522
538
|
min: r,
|
|
523
539
|
max: s,
|
|
@@ -526,12 +542,12 @@ function qe(t) {
|
|
|
526
542
|
"aria-label": d
|
|
527
543
|
}
|
|
528
544
|
),
|
|
529
|
-
|
|
545
|
+
F && /* @__PURE__ */ O("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
530
546
|
/* @__PURE__ */ o(
|
|
531
|
-
|
|
547
|
+
M,
|
|
532
548
|
{
|
|
533
549
|
size: "sm",
|
|
534
|
-
value:
|
|
550
|
+
value: C,
|
|
535
551
|
onChange: T,
|
|
536
552
|
min: r,
|
|
537
553
|
max: s,
|
|
@@ -541,7 +557,7 @@ function qe(t) {
|
|
|
541
557
|
}
|
|
542
558
|
),
|
|
543
559
|
/* @__PURE__ */ o(
|
|
544
|
-
|
|
560
|
+
M,
|
|
545
561
|
{
|
|
546
562
|
size: "sm",
|
|
547
563
|
value: b,
|
|
@@ -555,8 +571,8 @@ function qe(t) {
|
|
|
555
571
|
)
|
|
556
572
|
] }),
|
|
557
573
|
/* @__PURE__ */ O("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: [
|
|
558
|
-
/* @__PURE__ */ o(
|
|
559
|
-
/* @__PURE__ */ o(
|
|
574
|
+
/* @__PURE__ */ o(E, { intent: "ghost", size: "sm", onClick: g, type: "button", children: c("dataTable.numberFilter.clear") }),
|
|
575
|
+
/* @__PURE__ */ o(E, { intent: "primary", size: "sm", onClick: h, type: "button", children: c("dataTable.numberFilter.apply") })
|
|
560
576
|
] })
|
|
561
577
|
]
|
|
562
578
|
}
|
|
@@ -564,21 +580,21 @@ function qe(t) {
|
|
|
564
580
|
}
|
|
565
581
|
function Ve(t) {
|
|
566
582
|
var i, p;
|
|
567
|
-
const { model: e, onModelChange: n, column: a } = t, { t: l } =
|
|
583
|
+
const { model: e, onModelChange: n, column: a } = t, { t: l } = D("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);
|
|
568
584
|
return w(() => {
|
|
569
585
|
c((e == null ? void 0 : e.filter) ?? null);
|
|
570
586
|
}, [e == null ? void 0 : e.filter]), w(() => {
|
|
571
587
|
if (u === ((e == null ? void 0 : e.filter) ?? null)) return;
|
|
572
|
-
const
|
|
588
|
+
const y = setTimeout(() => {
|
|
573
589
|
if (u === null || Number.isNaN(u)) {
|
|
574
590
|
n(null);
|
|
575
591
|
return;
|
|
576
592
|
}
|
|
577
593
|
n({ type: s, filter: u });
|
|
578
594
|
}, 200);
|
|
579
|
-
return () => clearTimeout(
|
|
595
|
+
return () => clearTimeout(y);
|
|
580
596
|
}, [u, s]), /* @__PURE__ */ o("div", { "data-component": "number-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ o(
|
|
581
|
-
|
|
597
|
+
M,
|
|
582
598
|
{
|
|
583
599
|
size: "sm",
|
|
584
600
|
value: u,
|
|
@@ -591,22 +607,22 @@ function Ve(t) {
|
|
|
591
607
|
}
|
|
592
608
|
) });
|
|
593
609
|
}
|
|
594
|
-
function
|
|
610
|
+
function $e(t) {
|
|
595
611
|
const { value: e, variantMap: n } = t, a = (n == null ? void 0 : n[e]) ?? "neutral";
|
|
596
612
|
return /* @__PURE__ */ o(ee, { variant: a, withDot: !0, size: "sm", children: String(e ?? "") });
|
|
597
613
|
}
|
|
598
|
-
function
|
|
614
|
+
function Ue(t) {
|
|
599
615
|
const { value: e } = t;
|
|
600
616
|
return e ? /* @__PURE__ */ O("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
601
|
-
/* @__PURE__ */ o(
|
|
617
|
+
/* @__PURE__ */ o(j, { name: e.name, src: e.src, size: "sm" }),
|
|
602
618
|
/* @__PURE__ */ o("span", { children: e.name })
|
|
603
619
|
] }) : null;
|
|
604
620
|
}
|
|
605
|
-
const
|
|
621
|
+
const fe = {
|
|
606
622
|
sm: "ds:size-8",
|
|
607
623
|
md: "ds:size-10",
|
|
608
624
|
lg: "ds:size-12"
|
|
609
|
-
},
|
|
625
|
+
}, pe = {
|
|
610
626
|
square: "ds:rounded-none",
|
|
611
627
|
rounded: "ds:rounded-[var(--radius-md)]",
|
|
612
628
|
circle: "ds:rounded-[var(--radius-full)]"
|
|
@@ -616,14 +632,14 @@ function q(t, e) {
|
|
|
616
632
|
const n = t[e];
|
|
617
633
|
return typeof n == "string" ? n : void 0;
|
|
618
634
|
}
|
|
619
|
-
const
|
|
620
|
-
function
|
|
635
|
+
const me = /^(?:https?:|data:image\/|\/(?!\/))/i;
|
|
636
|
+
function ge(t) {
|
|
621
637
|
if (!t) return;
|
|
622
638
|
const e = t.trim();
|
|
623
639
|
if (e.length !== 0)
|
|
624
|
-
return
|
|
640
|
+
return me.test(e) ? e : void 0;
|
|
625
641
|
}
|
|
626
|
-
function
|
|
642
|
+
function He(t) {
|
|
627
643
|
const {
|
|
628
644
|
data: e,
|
|
629
645
|
srcField: n,
|
|
@@ -633,28 +649,28 @@ function Ie(t) {
|
|
|
633
649
|
shape: s = "rounded"
|
|
634
650
|
} = t;
|
|
635
651
|
if (!e) return null;
|
|
636
|
-
const f = q(e, n), u =
|
|
637
|
-
return s === "circle" && i ? /* @__PURE__ */ o(
|
|
652
|
+
const f = q(e, n), u = ge(f), c = a ? q(e, a) ?? "" : "", i = l ? q(e, l) : void 0;
|
|
653
|
+
return s === "circle" && i ? /* @__PURE__ */ o(j, { src: u, name: i, size: r }) : u ? /* @__PURE__ */ o(
|
|
638
654
|
"img",
|
|
639
655
|
{
|
|
640
656
|
src: u,
|
|
641
657
|
alt: c,
|
|
642
658
|
loading: "lazy",
|
|
643
659
|
decoding: "async",
|
|
644
|
-
className: ["ds:object-cover",
|
|
660
|
+
className: ["ds:object-cover", fe[r], pe[s]].join(
|
|
645
661
|
" "
|
|
646
662
|
)
|
|
647
663
|
}
|
|
648
|
-
) : i ? /* @__PURE__ */ o(
|
|
664
|
+
) : i ? /* @__PURE__ */ o(j, { name: i, size: r }) : null;
|
|
649
665
|
}
|
|
650
|
-
function
|
|
651
|
-
const { value: e, maxVisible: n = 3 } = t, { t: a } =
|
|
666
|
+
function Ye(t) {
|
|
667
|
+
const { value: e, maxVisible: n = 3 } = t, { t: a } = D();
|
|
652
668
|
if (!Array.isArray(e) || e.length === 0) return null;
|
|
653
669
|
const l = e.slice(0, n), r = e.length - n;
|
|
654
670
|
return /* @__PURE__ */ O("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
655
|
-
l.map((s) => /* @__PURE__ */ o(
|
|
671
|
+
l.map((s) => /* @__PURE__ */ o(I, { label: s, size: "sm" }, s)),
|
|
656
672
|
r > 0 && /* @__PURE__ */ o(te, { label: e.slice(n).join(", "), children: /* @__PURE__ */ o(
|
|
657
|
-
|
|
673
|
+
I,
|
|
658
674
|
{
|
|
659
675
|
label: a("inputs.multiSelect.overflow", { count: r }),
|
|
660
676
|
size: "sm",
|
|
@@ -664,7 +680,7 @@ function _e(t) {
|
|
|
664
680
|
) })
|
|
665
681
|
] });
|
|
666
682
|
}
|
|
667
|
-
const
|
|
683
|
+
const he = {
|
|
668
684
|
date: { year: "numeric", month: "short", day: "numeric" },
|
|
669
685
|
time: { hour: "2-digit", minute: "2-digit" },
|
|
670
686
|
datetime: {
|
|
@@ -675,7 +691,7 @@ const fe = {
|
|
|
675
691
|
minute: "2-digit"
|
|
676
692
|
}
|
|
677
693
|
};
|
|
678
|
-
function
|
|
694
|
+
function Ge(t) {
|
|
679
695
|
const { value: e, format: n = "date", options: a } = t;
|
|
680
696
|
return e == null || e === "" ? null : n === "relative" && !a ? /* @__PURE__ */ o(B, { value: e, shape: "bare" }) : /* @__PURE__ */ o(
|
|
681
697
|
B,
|
|
@@ -683,20 +699,20 @@ function Ue(t) {
|
|
|
683
699
|
value: e,
|
|
684
700
|
format: "absolute",
|
|
685
701
|
shape: "bare",
|
|
686
|
-
absoluteFormat: a ??
|
|
702
|
+
absoluteFormat: a ?? he[n === "relative" ? "date" : n]
|
|
687
703
|
}
|
|
688
704
|
);
|
|
689
705
|
}
|
|
690
|
-
function
|
|
706
|
+
function $(t, e) {
|
|
691
707
|
return typeof t == "function" ? t(e) : t;
|
|
692
708
|
}
|
|
693
|
-
function
|
|
709
|
+
function ve(t) {
|
|
694
710
|
return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
|
|
695
711
|
}
|
|
696
|
-
function
|
|
712
|
+
function Ke(t) {
|
|
697
713
|
const { value: e, data: n, href: a, onClick: l, secondary: r } = t;
|
|
698
714
|
if (!n) return null;
|
|
699
|
-
const s =
|
|
715
|
+
const s = $(a, n), f = $(r, n), u = e == null || e === "" ? "" : String(e), c = [
|
|
700
716
|
"ds:text-[color:var(--primary)]",
|
|
701
717
|
"ds:hover:underline",
|
|
702
718
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)]",
|
|
@@ -711,7 +727,7 @@ function He(t) {
|
|
|
711
727
|
s ? /* @__PURE__ */ o(
|
|
712
728
|
"a",
|
|
713
729
|
{
|
|
714
|
-
href:
|
|
730
|
+
href: ve(s),
|
|
715
731
|
onClick: i,
|
|
716
732
|
className: c,
|
|
717
733
|
children: u
|
|
@@ -732,19 +748,19 @@ function He(t) {
|
|
|
732
748
|
] });
|
|
733
749
|
}
|
|
734
750
|
export {
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
751
|
+
Ge as D,
|
|
752
|
+
He as I,
|
|
753
|
+
Ke as L,
|
|
754
|
+
_e as N,
|
|
755
|
+
qe as S,
|
|
756
|
+
Ye as T,
|
|
757
|
+
Ue as U,
|
|
758
|
+
Me as a,
|
|
759
|
+
Ae as b,
|
|
744
760
|
Ve as c,
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
761
|
+
je as d,
|
|
762
|
+
$e as e,
|
|
763
|
+
Ie as f,
|
|
764
|
+
Be as g
|
|
749
765
|
};
|
|
750
|
-
//# sourceMappingURL=link-cell-renderer-
|
|
766
|
+
//# sourceMappingURL=link-cell-renderer-CenJx-_7.js.map
|