@alfadocs/ui-kit 1.16.0 → 1.18.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/{balance-badge-cell-CgkxYO96.js → balance-badge-cell-DNjHODfP.js} +461 -449
- package/dist/_chunks/calendar-workspace-Ca0n_r1v.js +7341 -0
- package/dist/_chunks/{file-manager-DJMeB3V8.js → file-manager-spc3_khe.js} +152 -136
- package/dist/_chunks/{link-cell-renderer-CIASXsVM.js → link-cell-renderer-B-xrUPew.js} +126 -116
- package/dist/_chunks/{signature-field-CEiPe-vX.js → signature-field-0rFODJlW.js} +34 -19
- package/dist/agent-catalog.json +10 -56
- package/dist/agent-i18n/en.json +3 -5
- package/dist/components/data-table/calendar-day.d.ts +26 -0
- package/dist/components/data-table/filters/date-range-filter.d.ts +2 -20
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/patient-table/cell-renderers/transaction-chip-cell.d.ts +6 -0
- package/dist/components/patient-table/columns.d.ts +6 -0
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/patient-table/patient-table.d.ts +6 -0
- package/dist/components/signature-field/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +0 -38
- package/dist/i18n/locales/ar.js +2 -40
- package/dist/i18n/locales/de.d.ts +0 -38
- package/dist/i18n/locales/de.js +2 -40
- package/dist/i18n/locales/el.d.ts +0 -38
- package/dist/i18n/locales/el.js +2 -40
- package/dist/i18n/locales/en.d.ts +0 -38
- package/dist/i18n/locales/en.js +2 -40
- package/dist/i18n/locales/es.d.ts +0 -38
- package/dist/i18n/locales/es.js +2 -40
- package/dist/i18n/locales/fr.d.ts +0 -38
- package/dist/i18n/locales/fr.js +2 -40
- package/dist/i18n/locales/hi.d.ts +0 -38
- package/dist/i18n/locales/hi.js +2 -40
- package/dist/i18n/locales/it.d.ts +0 -38
- package/dist/i18n/locales/it.js +2 -40
- package/dist/i18n/locales/ja.d.ts +0 -38
- package/dist/i18n/locales/ja.js +2 -40
- package/dist/i18n/locales/nl.d.ts +0 -38
- package/dist/i18n/locales/nl.js +2 -40
- package/dist/i18n/locales/pl.d.ts +0 -38
- package/dist/i18n/locales/pl.js +2 -40
- package/dist/i18n/locales/pt.d.ts +0 -38
- package/dist/i18n/locales/pt.js +2 -40
- package/dist/i18n/locales/ro.d.ts +0 -38
- package/dist/i18n/locales/ro.js +2 -40
- package/dist/i18n/locales/ru.d.ts +0 -38
- package/dist/i18n/locales/ru.js +2 -40
- package/dist/i18n/locales/sq.d.ts +0 -38
- package/dist/i18n/locales/sq.js +2 -40
- package/dist/i18n/locales/sv.d.ts +0 -38
- package/dist/i18n/locales/sv.js +2 -40
- package/dist/i18n/locales/tr.d.ts +0 -38
- package/dist/i18n/locales/tr.js +2 -40
- package/dist/i18n/locales/zh.d.ts +0 -38
- package/dist/i18n/locales/zh.js +2 -40
- package/dist/index.js +5 -5
- package/dist/locales/ar.json +2 -40
- package/dist/locales/de.json +2 -40
- package/dist/locales/el.json +2 -40
- package/dist/locales/en.json +2 -40
- package/dist/locales/es.json +2 -40
- package/dist/locales/fr.json +2 -40
- package/dist/locales/hi.json +2 -40
- package/dist/locales/it.json +2 -40
- package/dist/locales/ja.json +2 -40
- package/dist/locales/nl.json +2 -40
- package/dist/locales/pl.json +2 -40
- package/dist/locales/pt.json +2 -40
- package/dist/locales/ro.json +2 -40
- package/dist/locales/ru.json +2 -40
- package/dist/locales/sq.json +2 -40
- package/dist/locales/sv.json +2 -40
- package/dist/locales/tr.json +2 -40
- package/dist/locales/zh.json +2 -40
- package/dist/patterns/calendar/calendar.sheets.d.ts +4 -8
- package/dist/patterns/calendar/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/calendar-workspace-B87-QI8L.js +0 -7606
- package/dist/_chunks/folder-plus-CutOs4DP.js +0 -22
- package/dist/_chunks/signature-CpFNpsVK.js +0 -21
|
@@ -1,37 +1,39 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as k } from "react/jsx-runtime";
|
|
2
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
4
|
import { D as H } from "./date-range-picker-BD8P_rJq.js";
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
import { C as
|
|
5
|
+
import { useTranslation as L } from "react-i18next";
|
|
6
|
+
import { C as J } from "./checkbox-BuZ1u__2.js";
|
|
7
7
|
import { B as E } from "./button-nJaPh_HC.js";
|
|
8
|
-
import { M as
|
|
9
|
-
import { S as
|
|
8
|
+
import { M as Q } from "./multi-select-DYOvx2SJ.js";
|
|
9
|
+
import { S as W } from "./scroll-area-BZOvUhwQ.js";
|
|
10
10
|
import { A as Y } from "./autocomplete-MpBhz-fG.js";
|
|
11
11
|
import { N as M } from "./number-input-Cgu2TtA8.js";
|
|
12
|
-
import { S as
|
|
13
|
-
import { B as
|
|
12
|
+
import { S as ee } from "./select-Bi8zril7.js";
|
|
13
|
+
import { B as te } from "./badge-sTusUqZD.js";
|
|
14
14
|
import { A as j } from "./avatar-BNQNhoyL.js";
|
|
15
15
|
import { T as I } from "./tag-3wgkwwDB.js";
|
|
16
|
-
import { T as
|
|
16
|
+
import { T as ne } from "./tooltip-DvmfrNvB.js";
|
|
17
17
|
import { T as B } from "./timestamp-BV2lC-wV.js";
|
|
18
|
-
const
|
|
18
|
+
const G = /^\d{4}-\d{2}-\d{2}$/, ae = /^(\d{4}-\d{2}-\d{2})/;
|
|
19
19
|
function P(t) {
|
|
20
20
|
if (!t) return null;
|
|
21
21
|
const e = t.getFullYear(), n = String(t.getMonth() + 1).padStart(2, "0"), a = String(t.getDate()).padStart(2, "0");
|
|
22
22
|
return `${e}-${n}-${a}`;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function re(t) {
|
|
25
|
+
return typeof t == "string" && G.test(t);
|
|
26
|
+
}
|
|
27
|
+
function O(t) {
|
|
25
28
|
if (!t) return;
|
|
26
|
-
const e =
|
|
29
|
+
const e = G.test(t) ? new Date(
|
|
27
30
|
Number(t.slice(0, 4)),
|
|
28
31
|
Number(t.slice(5, 7)) - 1,
|
|
29
32
|
Number(t.slice(8, 10))
|
|
30
33
|
) : new Date(t);
|
|
31
34
|
return Number.isNaN(e.getTime()) ? void 0 : e;
|
|
32
35
|
}
|
|
33
|
-
|
|
34
|
-
function re(t) {
|
|
36
|
+
function le(t) {
|
|
35
37
|
if (t == null || t === "")
|
|
36
38
|
return null;
|
|
37
39
|
if (typeof t == "string") {
|
|
@@ -41,24 +43,24 @@ function re(t) {
|
|
|
41
43
|
const e = t instanceof Date ? t : new Date(String(t));
|
|
42
44
|
return Number.isNaN(e.getTime()) ? null : P(e);
|
|
43
45
|
}
|
|
44
|
-
function
|
|
46
|
+
function se(t, e, n) {
|
|
45
47
|
if (!e && !n) return !0;
|
|
46
|
-
const a =
|
|
48
|
+
const a = le(t);
|
|
47
49
|
return !(!a || e && a < e || n && a > n);
|
|
48
50
|
}
|
|
49
|
-
function
|
|
51
|
+
function Ae(t) {
|
|
50
52
|
var c;
|
|
51
53
|
const { model: e, onModelChange: n, getValue: a, doesRowPassOtherFilter: l } = t, r = ((c = t.colDef) == null ? void 0 : c.filterParams) ?? {}, [s, f] = x(() => ({
|
|
52
|
-
from:
|
|
53
|
-
to:
|
|
54
|
+
from: O(e == null ? void 0 : e.dateFrom),
|
|
55
|
+
to: O(e == null ? void 0 : e.dateTo)
|
|
54
56
|
}));
|
|
55
57
|
w(() => {
|
|
56
58
|
f({
|
|
57
|
-
from:
|
|
58
|
-
to:
|
|
59
|
+
from: O(e == null ? void 0 : e.dateFrom),
|
|
60
|
+
to: O(e == null ? void 0 : e.dateTo)
|
|
59
61
|
});
|
|
60
62
|
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]), A({
|
|
61
|
-
doesFilterPass: (i) =>
|
|
63
|
+
doesFilterPass: (i) => se(a(i.node), e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo)
|
|
62
64
|
});
|
|
63
65
|
function u(i) {
|
|
64
66
|
if (f(i), !i.from && !i.to) {
|
|
@@ -88,16 +90,16 @@ function Me(t) {
|
|
|
88
90
|
}
|
|
89
91
|
);
|
|
90
92
|
}
|
|
91
|
-
function
|
|
93
|
+
function qe(t) {
|
|
92
94
|
var u, c;
|
|
93
95
|
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:
|
|
95
|
-
to:
|
|
96
|
+
from: O(e == null ? void 0 : e.dateFrom),
|
|
97
|
+
to: O(e == null ? void 0 : e.dateTo)
|
|
96
98
|
}));
|
|
97
99
|
w(() => {
|
|
98
100
|
s({
|
|
99
|
-
from:
|
|
100
|
-
to:
|
|
101
|
+
from: O(e == null ? void 0 : e.dateFrom),
|
|
102
|
+
to: O(e == null ? void 0 : e.dateTo)
|
|
101
103
|
});
|
|
102
104
|
}, [e == null ? void 0 : e.dateFrom, e == null ? void 0 : e.dateTo]);
|
|
103
105
|
function f(i) {
|
|
@@ -122,28 +124,28 @@ function Ae(t) {
|
|
|
122
124
|
}
|
|
123
125
|
) });
|
|
124
126
|
}
|
|
125
|
-
function
|
|
127
|
+
function R(t) {
|
|
126
128
|
return typeof t == "number" ? `n:${t}` : `s:${t}`;
|
|
127
129
|
}
|
|
128
|
-
const
|
|
129
|
-
function
|
|
130
|
+
const ie = new Intl.Collator(void 0, { numeric: !0 });
|
|
131
|
+
function oe(t, e) {
|
|
130
132
|
if (!t) return [];
|
|
131
133
|
const n = /* @__PURE__ */ new Map();
|
|
132
134
|
return t.forEachNode((a) => {
|
|
133
135
|
const l = e(a);
|
|
134
136
|
if (l == null) return;
|
|
135
|
-
const r = typeof l == "string" || typeof l == "number" ? l : String(l), s =
|
|
137
|
+
const r = typeof l == "string" || typeof l == "number" ? l : String(l), s = R(r);
|
|
136
138
|
n.has(s) || n.set(s, { value: r, label: String(r) });
|
|
137
139
|
}), Array.from(n.values()).sort(
|
|
138
|
-
(a, l) =>
|
|
140
|
+
(a, l) => ie.compare(String(a.label), String(l.label))
|
|
139
141
|
);
|
|
140
142
|
}
|
|
141
|
-
function
|
|
143
|
+
function ue(t, e) {
|
|
142
144
|
return t.length !== e.length ? !1 : t.every(
|
|
143
|
-
(n, a) =>
|
|
145
|
+
(n, a) => R(n.value) === R(e[a].value) && n.label === e[a].label
|
|
144
146
|
);
|
|
145
147
|
}
|
|
146
|
-
function
|
|
148
|
+
function Z(t, e, n) {
|
|
147
149
|
const a = e, l = a !== void 0, [r, s] = x([]), f = X(n);
|
|
148
150
|
return w(() => {
|
|
149
151
|
f.current = n;
|
|
@@ -151,8 +153,8 @@ function G(t, e, n) {
|
|
|
151
153
|
if (l || !t) return;
|
|
152
154
|
const u = () => {
|
|
153
155
|
s((c) => {
|
|
154
|
-
const i =
|
|
155
|
-
return
|
|
156
|
+
const i = oe(t, f.current);
|
|
157
|
+
return ue(c, i) ? c : i;
|
|
156
158
|
});
|
|
157
159
|
};
|
|
158
160
|
return u(), t.addEventListener("modelUpdated", u), t.addEventListener("cellValueChanged", u), () => {
|
|
@@ -160,13 +162,13 @@ function G(t, e, n) {
|
|
|
160
162
|
};
|
|
161
163
|
}, [t, l]), a ?? r;
|
|
162
164
|
}
|
|
163
|
-
function
|
|
164
|
-
const { model: e, onModelChange: n, getValue: a, api: l, options: r, placeholder: s } = t, { t: f } =
|
|
165
|
+
function je(t) {
|
|
166
|
+
const { model: e, onModelChange: n, getValue: a, api: l, options: r, placeholder: s } = t, { t: f } = L("ui"), u = U(
|
|
165
167
|
(m) => a(m),
|
|
166
168
|
[a]
|
|
167
|
-
), c =
|
|
169
|
+
), c = Z(l, r, u), i = z(() => {
|
|
168
170
|
const m = /* @__PURE__ */ new Set(), d = (e == null ? void 0 : e.values) ?? [];
|
|
169
|
-
for (const h of d) m.add(
|
|
171
|
+
for (const h of d) m.add(R(h));
|
|
170
172
|
return m;
|
|
171
173
|
}, [e]), [p, y] = x(i);
|
|
172
174
|
w(() => {
|
|
@@ -177,8 +179,8 @@ function qe(t) {
|
|
|
177
179
|
if (!d || d.length === 0) return !0;
|
|
178
180
|
const h = a(m.node);
|
|
179
181
|
if (h == null) return !1;
|
|
180
|
-
const g = typeof h == "string" || typeof h == "number" ? h : String(h), S =
|
|
181
|
-
return d.some((F) =>
|
|
182
|
+
const g = typeof h == "string" || typeof h == "number" ? h : String(h), S = R(g);
|
|
183
|
+
return d.some((F) => R(F) === S);
|
|
182
184
|
}
|
|
183
185
|
});
|
|
184
186
|
function C(m) {
|
|
@@ -194,7 +196,7 @@ function qe(t) {
|
|
|
194
196
|
}
|
|
195
197
|
const m = [];
|
|
196
198
|
for (const d of c)
|
|
197
|
-
p.has(
|
|
199
|
+
p.has(R(d.value)) && m.push(d.value);
|
|
198
200
|
if (m.length === 0) {
|
|
199
201
|
n(null);
|
|
200
202
|
return;
|
|
@@ -205,22 +207,22 @@ function qe(t) {
|
|
|
205
207
|
y(/* @__PURE__ */ new Set()), n(null);
|
|
206
208
|
}
|
|
207
209
|
const v = s ?? f("dataTable.selectFilter.all");
|
|
208
|
-
return /* @__PURE__ */
|
|
210
|
+
return /* @__PURE__ */ k(
|
|
209
211
|
"div",
|
|
210
212
|
{
|
|
211
213
|
"data-component": "select-filter",
|
|
212
214
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[200px] ds:max-w-[260px]",
|
|
213
215
|
children: [
|
|
214
|
-
/* @__PURE__ */ o(
|
|
216
|
+
/* @__PURE__ */ o(W, { orientation: "vertical", className: "ds:max-h-[240px]", children: /* @__PURE__ */ o(
|
|
215
217
|
"div",
|
|
216
218
|
{
|
|
217
219
|
role: "group",
|
|
218
220
|
"aria-label": v,
|
|
219
221
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
220
222
|
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) => {
|
|
221
|
-
const d =
|
|
223
|
+
const d = R(m.value);
|
|
222
224
|
return /* @__PURE__ */ o(
|
|
223
|
-
|
|
225
|
+
J,
|
|
224
226
|
{
|
|
225
227
|
size: "sm",
|
|
226
228
|
label: m.label,
|
|
@@ -232,7 +234,7 @@ function qe(t) {
|
|
|
232
234
|
})
|
|
233
235
|
}
|
|
234
236
|
) }),
|
|
235
|
-
/* @__PURE__ */
|
|
237
|
+
/* @__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: [
|
|
236
238
|
/* @__PURE__ */ o(E, { intent: "ghost", size: "sm", onClick: b, type: "button", children: f("dataTable.selectFilter.clear") }),
|
|
237
239
|
/* @__PURE__ */ o(E, { intent: "primary", size: "sm", onClick: T, type: "button", children: f("dataTable.selectFilter.apply") })
|
|
238
240
|
] })
|
|
@@ -240,7 +242,7 @@ function qe(t) {
|
|
|
240
242
|
}
|
|
241
243
|
);
|
|
242
244
|
}
|
|
243
|
-
function
|
|
245
|
+
function Ie(t) {
|
|
244
246
|
var T;
|
|
245
247
|
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(
|
|
246
248
|
(b) => l && a ? l.getCellValue({
|
|
@@ -248,7 +250,7 @@ function je(t) {
|
|
|
248
250
|
colKey: a
|
|
249
251
|
}) : void 0,
|
|
250
252
|
[l, a]
|
|
251
|
-
), u =
|
|
253
|
+
), u = Z(
|
|
252
254
|
l,
|
|
253
255
|
s.options,
|
|
254
256
|
f
|
|
@@ -283,7 +285,7 @@ function je(t) {
|
|
|
283
285
|
n({ type: "set", values: v });
|
|
284
286
|
}
|
|
285
287
|
return /* @__PURE__ */ o("div", { "data-component": "select-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ o(
|
|
286
|
-
|
|
288
|
+
Q,
|
|
287
289
|
{
|
|
288
290
|
size: "sm",
|
|
289
291
|
options: p,
|
|
@@ -295,10 +297,10 @@ function je(t) {
|
|
|
295
297
|
}
|
|
296
298
|
) });
|
|
297
299
|
}
|
|
298
|
-
function
|
|
300
|
+
function D(t) {
|
|
299
301
|
return t.trim().toLocaleLowerCase();
|
|
300
302
|
}
|
|
301
|
-
function
|
|
303
|
+
function Be(t) {
|
|
302
304
|
const {
|
|
303
305
|
model: e,
|
|
304
306
|
onModelChange: n,
|
|
@@ -308,7 +310,7 @@ function Ie(t) {
|
|
|
308
310
|
options: s,
|
|
309
311
|
loadOptions: f,
|
|
310
312
|
placeholder: u
|
|
311
|
-
} = t, { t: c } =
|
|
313
|
+
} = t, { t: c } = L("ui"), i = z(() => {
|
|
312
314
|
if (s && s.length > 0) return s;
|
|
313
315
|
if (!l || !r) return [];
|
|
314
316
|
const d = /* @__PURE__ */ new Map();
|
|
@@ -323,8 +325,8 @@ function Ie(t) {
|
|
|
323
325
|
}, [s, l, r, a]), p = z(() => async (d, h) => {
|
|
324
326
|
if (f)
|
|
325
327
|
return (await f(d, h)).map((N) => ({ value: N.value, label: N.label }));
|
|
326
|
-
const g =
|
|
327
|
-
return (g ? i.filter((F) =>
|
|
328
|
+
const g = D(d);
|
|
329
|
+
return (g ? i.filter((F) => D(F.label).includes(g)) : i).slice(0, 50).map((F) => ({ value: F.value, label: F.label }));
|
|
328
330
|
}, [f, i]), [y, C] = x((e == null ? void 0 : e.value) ?? "");
|
|
329
331
|
w(() => {
|
|
330
332
|
C((e == null ? void 0 : e.value) ?? "");
|
|
@@ -335,7 +337,7 @@ function Ie(t) {
|
|
|
335
337
|
const g = a(d.node);
|
|
336
338
|
if (g == null) return !1;
|
|
337
339
|
const S = typeof g == "string" ? g : String(g);
|
|
338
|
-
return
|
|
340
|
+
return D(S) === D(h);
|
|
339
341
|
}
|
|
340
342
|
});
|
|
341
343
|
function T(d) {
|
|
@@ -348,7 +350,7 @@ function Ie(t) {
|
|
|
348
350
|
C(""), n(null);
|
|
349
351
|
}
|
|
350
352
|
const m = u ?? c("dataTable.typeaheadFilter.placeholder");
|
|
351
|
-
return /* @__PURE__ */
|
|
353
|
+
return /* @__PURE__ */ k(
|
|
352
354
|
"div",
|
|
353
355
|
{
|
|
354
356
|
"data-component": "typeahead-filter",
|
|
@@ -371,13 +373,13 @@ function Ie(t) {
|
|
|
371
373
|
}
|
|
372
374
|
);
|
|
373
375
|
}
|
|
374
|
-
function
|
|
376
|
+
function Ve(t) {
|
|
375
377
|
var T, b;
|
|
376
|
-
const { model: e, onModelChange: n, column: a } = t, { t: l } =
|
|
378
|
+
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) => {
|
|
377
379
|
if (f)
|
|
378
380
|
return (await f(v, m)).map((S) => ({ value: S.value, label: S.label }));
|
|
379
|
-
const d =
|
|
380
|
-
return (d ? s.filter((g) =>
|
|
381
|
+
const d = D(v);
|
|
382
|
+
return (d ? s.filter((g) => D(g.label).includes(d)) : s).slice(0, 50).map((g) => ({ value: g.value, label: g.label }));
|
|
381
383
|
}, [f, s]), [i, p] = x((e == null ? void 0 : e.value) ?? "");
|
|
382
384
|
w(() => {
|
|
383
385
|
p((e == null ? void 0 : e.value) ?? "");
|
|
@@ -401,7 +403,7 @@ function Be(t) {
|
|
|
401
403
|
}
|
|
402
404
|
) });
|
|
403
405
|
}
|
|
404
|
-
const
|
|
406
|
+
const ce = [
|
|
405
407
|
"equals",
|
|
406
408
|
"notEqual",
|
|
407
409
|
"greaterThan",
|
|
@@ -412,13 +414,13 @@ const ue = [
|
|
|
412
414
|
"blank",
|
|
413
415
|
"notBlank"
|
|
414
416
|
];
|
|
415
|
-
function
|
|
417
|
+
function V(t) {
|
|
416
418
|
return t !== "blank" && t !== "notBlank";
|
|
417
419
|
}
|
|
418
|
-
function
|
|
420
|
+
function _(t) {
|
|
419
421
|
return t === "inRange";
|
|
420
422
|
}
|
|
421
|
-
function
|
|
423
|
+
function de(t, e, n, a) {
|
|
422
424
|
if (t === "blank") return e === null;
|
|
423
425
|
if (t === "notBlank") return e !== null;
|
|
424
426
|
if (e === null) return !1;
|
|
@@ -445,7 +447,7 @@ function ce(t, e, n, a) {
|
|
|
445
447
|
return !0;
|
|
446
448
|
}
|
|
447
449
|
}
|
|
448
|
-
function
|
|
450
|
+
function fe(t) {
|
|
449
451
|
if (t == null || t === "") return null;
|
|
450
452
|
const e = typeof t == "number" ? t : Number(t);
|
|
451
453
|
return Number.isNaN(e) ? null : e;
|
|
@@ -460,7 +462,7 @@ function _e(t) {
|
|
|
460
462
|
max: s,
|
|
461
463
|
step: f,
|
|
462
464
|
placeholder: u
|
|
463
|
-
} = t, { t: c } =
|
|
465
|
+
} = 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(
|
|
464
466
|
(e == null ? void 0 : e.filterTo) ?? null
|
|
465
467
|
);
|
|
466
468
|
w(() => {
|
|
@@ -472,8 +474,8 @@ function _e(t) {
|
|
|
472
474
|
}, [e, l]), A({
|
|
473
475
|
doesFilterPass: (N) => {
|
|
474
476
|
if (!e) return !0;
|
|
475
|
-
const K =
|
|
476
|
-
return
|
|
477
|
+
const K = fe(a(N.node));
|
|
478
|
+
return de(
|
|
477
479
|
e.type,
|
|
478
480
|
K,
|
|
479
481
|
e.filter ?? null,
|
|
@@ -482,14 +484,14 @@ function _e(t) {
|
|
|
482
484
|
}
|
|
483
485
|
});
|
|
484
486
|
const m = z(
|
|
485
|
-
() =>
|
|
487
|
+
() => ce.map((N) => ({
|
|
486
488
|
value: N,
|
|
487
489
|
label: c(`dataTable.numberFilter.operators.${N}`)
|
|
488
490
|
})),
|
|
489
491
|
[c]
|
|
490
492
|
), d = u ?? c("dataTable.numberFilter.placeholder");
|
|
491
493
|
function h() {
|
|
492
|
-
if (!
|
|
494
|
+
if (!V(p)) {
|
|
493
495
|
n({ type: p, filter: 0 });
|
|
494
496
|
return;
|
|
495
497
|
}
|
|
@@ -497,7 +499,7 @@ function _e(t) {
|
|
|
497
499
|
n(null);
|
|
498
500
|
return;
|
|
499
501
|
}
|
|
500
|
-
if (
|
|
502
|
+
if (_(p)) {
|
|
501
503
|
n({
|
|
502
504
|
type: p,
|
|
503
505
|
filter: C,
|
|
@@ -510,15 +512,15 @@ function _e(t) {
|
|
|
510
512
|
function g() {
|
|
511
513
|
y(l ?? "equals"), T(null), v(null), n(null);
|
|
512
514
|
}
|
|
513
|
-
const S =
|
|
514
|
-
return /* @__PURE__ */
|
|
515
|
+
const S = V(p), F = _(p);
|
|
516
|
+
return /* @__PURE__ */ k(
|
|
515
517
|
"div",
|
|
516
518
|
{
|
|
517
519
|
"data-component": "number-filter",
|
|
518
520
|
className: "ds:flex ds:flex-col ds:gap-[var(--spacing-sm)] ds:p-[var(--spacing-sm)] ds:min-w-[240px]",
|
|
519
521
|
children: [
|
|
520
522
|
/* @__PURE__ */ o(
|
|
521
|
-
|
|
523
|
+
ee,
|
|
522
524
|
{
|
|
523
525
|
size: "sm",
|
|
524
526
|
options: m,
|
|
@@ -542,7 +544,7 @@ function _e(t) {
|
|
|
542
544
|
"aria-label": d
|
|
543
545
|
}
|
|
544
546
|
),
|
|
545
|
-
F && /* @__PURE__ */
|
|
547
|
+
F && /* @__PURE__ */ k("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
546
548
|
/* @__PURE__ */ o(
|
|
547
549
|
M,
|
|
548
550
|
{
|
|
@@ -570,7 +572,7 @@ function _e(t) {
|
|
|
570
572
|
}
|
|
571
573
|
)
|
|
572
574
|
] }),
|
|
573
|
-
/* @__PURE__ */
|
|
575
|
+
/* @__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: [
|
|
574
576
|
/* @__PURE__ */ o(E, { intent: "ghost", size: "sm", onClick: g, type: "button", children: c("dataTable.numberFilter.clear") }),
|
|
575
577
|
/* @__PURE__ */ o(E, { intent: "primary", size: "sm", onClick: h, type: "button", children: c("dataTable.numberFilter.apply") })
|
|
576
578
|
] })
|
|
@@ -578,9 +580,9 @@ function _e(t) {
|
|
|
578
580
|
}
|
|
579
581
|
);
|
|
580
582
|
}
|
|
581
|
-
function
|
|
583
|
+
function $e(t) {
|
|
582
584
|
var i, p;
|
|
583
|
-
const { model: e, onModelChange: n, column: a } = t, { t: l } =
|
|
585
|
+
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);
|
|
584
586
|
return w(() => {
|
|
585
587
|
c((e == null ? void 0 : e.filter) ?? null);
|
|
586
588
|
}, [e == null ? void 0 : e.filter]), w(() => {
|
|
@@ -607,22 +609,22 @@ function Ve(t) {
|
|
|
607
609
|
}
|
|
608
610
|
) });
|
|
609
611
|
}
|
|
610
|
-
function
|
|
612
|
+
function Ue(t) {
|
|
611
613
|
const { value: e, variantMap: n } = t, a = (n == null ? void 0 : n[e]) ?? "neutral";
|
|
612
|
-
return /* @__PURE__ */ o(
|
|
614
|
+
return /* @__PURE__ */ o(te, { variant: a, withDot: !0, size: "sm", children: String(e ?? "") });
|
|
613
615
|
}
|
|
614
|
-
function
|
|
616
|
+
function He(t) {
|
|
615
617
|
const { value: e } = t;
|
|
616
|
-
return e ? /* @__PURE__ */
|
|
618
|
+
return e ? /* @__PURE__ */ k("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
617
619
|
/* @__PURE__ */ o(j, { name: e.name, src: e.src, size: "sm" }),
|
|
618
620
|
/* @__PURE__ */ o("span", { children: e.name })
|
|
619
621
|
] }) : null;
|
|
620
622
|
}
|
|
621
|
-
const
|
|
623
|
+
const pe = {
|
|
622
624
|
sm: "ds:size-8",
|
|
623
625
|
md: "ds:size-10",
|
|
624
626
|
lg: "ds:size-12"
|
|
625
|
-
},
|
|
627
|
+
}, me = {
|
|
626
628
|
square: "ds:rounded-none",
|
|
627
629
|
rounded: "ds:rounded-[var(--radius-md)]",
|
|
628
630
|
circle: "ds:rounded-[var(--radius-full)]"
|
|
@@ -632,14 +634,14 @@ function q(t, e) {
|
|
|
632
634
|
const n = t[e];
|
|
633
635
|
return typeof n == "string" ? n : void 0;
|
|
634
636
|
}
|
|
635
|
-
const
|
|
636
|
-
function
|
|
637
|
+
const ge = /^(?:https?:|data:image\/|\/(?!\/))/i;
|
|
638
|
+
function he(t) {
|
|
637
639
|
if (!t) return;
|
|
638
640
|
const e = t.trim();
|
|
639
641
|
if (e.length !== 0)
|
|
640
|
-
return
|
|
642
|
+
return ge.test(e) ? e : void 0;
|
|
641
643
|
}
|
|
642
|
-
function
|
|
644
|
+
function Ye(t) {
|
|
643
645
|
const {
|
|
644
646
|
data: e,
|
|
645
647
|
srcField: n,
|
|
@@ -649,7 +651,7 @@ function He(t) {
|
|
|
649
651
|
shape: s = "rounded"
|
|
650
652
|
} = t;
|
|
651
653
|
if (!e) return null;
|
|
652
|
-
const f = q(e, n), u =
|
|
654
|
+
const f = q(e, n), u = he(f), c = a ? q(e, a) ?? "" : "", i = l ? q(e, l) : void 0;
|
|
653
655
|
return s === "circle" && i ? /* @__PURE__ */ o(j, { src: u, name: i, size: r }) : u ? /* @__PURE__ */ o(
|
|
654
656
|
"img",
|
|
655
657
|
{
|
|
@@ -657,19 +659,19 @@ function He(t) {
|
|
|
657
659
|
alt: c,
|
|
658
660
|
loading: "lazy",
|
|
659
661
|
decoding: "async",
|
|
660
|
-
className: ["ds:object-cover",
|
|
662
|
+
className: ["ds:object-cover", pe[r], me[s]].join(
|
|
661
663
|
" "
|
|
662
664
|
)
|
|
663
665
|
}
|
|
664
666
|
) : i ? /* @__PURE__ */ o(j, { name: i, size: r }) : null;
|
|
665
667
|
}
|
|
666
|
-
function
|
|
667
|
-
const { value: e, maxVisible: n = 3 } = t, { t: a } =
|
|
668
|
+
function Ge(t) {
|
|
669
|
+
const { value: e, maxVisible: n = 3 } = t, { t: a } = L();
|
|
668
670
|
if (!Array.isArray(e) || e.length === 0) return null;
|
|
669
671
|
const l = e.slice(0, n), r = e.length - n;
|
|
670
|
-
return /* @__PURE__ */
|
|
672
|
+
return /* @__PURE__ */ k("span", { className: "ds:inline-flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-xs)]", children: [
|
|
671
673
|
l.map((s) => /* @__PURE__ */ o(I, { label: s, size: "sm" }, s)),
|
|
672
|
-
r > 0 && /* @__PURE__ */ o(
|
|
674
|
+
r > 0 && /* @__PURE__ */ o(ne, { label: e.slice(n).join(", "), children: /* @__PURE__ */ o(
|
|
673
675
|
I,
|
|
674
676
|
{
|
|
675
677
|
label: a("inputs.multiSelect.overflow", { count: r }),
|
|
@@ -680,7 +682,7 @@ function Ye(t) {
|
|
|
680
682
|
) })
|
|
681
683
|
] });
|
|
682
684
|
}
|
|
683
|
-
const
|
|
685
|
+
const ve = {
|
|
684
686
|
date: { year: "numeric", month: "short", day: "numeric" },
|
|
685
687
|
time: { hour: "2-digit", minute: "2-digit" },
|
|
686
688
|
datetime: {
|
|
@@ -691,22 +693,29 @@ const he = {
|
|
|
691
693
|
minute: "2-digit"
|
|
692
694
|
}
|
|
693
695
|
};
|
|
694
|
-
function
|
|
696
|
+
function Ze(t) {
|
|
695
697
|
const { value: e, format: n = "date", options: a } = t;
|
|
696
|
-
|
|
698
|
+
if (e == null || e === "") return null;
|
|
699
|
+
const l = re(e);
|
|
700
|
+
if (n === "relative" && !a) {
|
|
701
|
+
const s = l ? O(e) ?? e : e;
|
|
702
|
+
return /* @__PURE__ */ o(B, { value: s, shape: "bare" });
|
|
703
|
+
}
|
|
704
|
+
const r = a ?? ve[n === "relative" ? "date" : n];
|
|
705
|
+
return /* @__PURE__ */ o(
|
|
697
706
|
B,
|
|
698
707
|
{
|
|
699
708
|
value: e,
|
|
700
709
|
format: "absolute",
|
|
701
710
|
shape: "bare",
|
|
702
|
-
absoluteFormat:
|
|
711
|
+
absoluteFormat: l ? { ...r, timeZone: "UTC" } : r
|
|
703
712
|
}
|
|
704
713
|
);
|
|
705
714
|
}
|
|
706
715
|
function $(t, e) {
|
|
707
716
|
return typeof t == "function" ? t(e) : t;
|
|
708
717
|
}
|
|
709
|
-
function
|
|
718
|
+
function be(t) {
|
|
710
719
|
return /^(https?:\/\/|\/|#|mailto:|tel:)/i.test(t) ? t : "#";
|
|
711
720
|
}
|
|
712
721
|
function Ke(t) {
|
|
@@ -723,11 +732,11 @@ function Ke(t) {
|
|
|
723
732
|
].join(" "), i = (p) => {
|
|
724
733
|
l && (s || p.preventDefault(), p.stopPropagation(), l(n));
|
|
725
734
|
};
|
|
726
|
-
return /* @__PURE__ */
|
|
735
|
+
return /* @__PURE__ */ k("span", { className: "ds:flex ds:flex-col ds:leading-tight", children: [
|
|
727
736
|
s ? /* @__PURE__ */ o(
|
|
728
737
|
"a",
|
|
729
738
|
{
|
|
730
|
-
href:
|
|
739
|
+
href: be(s),
|
|
731
740
|
onClick: i,
|
|
732
741
|
className: c,
|
|
733
742
|
children: u
|
|
@@ -748,19 +757,20 @@ function Ke(t) {
|
|
|
748
757
|
] });
|
|
749
758
|
}
|
|
750
759
|
export {
|
|
751
|
-
|
|
752
|
-
|
|
760
|
+
Ze as D,
|
|
761
|
+
Ye as I,
|
|
753
762
|
Ke as L,
|
|
754
763
|
_e as N,
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
764
|
+
je as S,
|
|
765
|
+
Ge as T,
|
|
766
|
+
He as U,
|
|
767
|
+
Ae as a,
|
|
768
|
+
qe as b,
|
|
769
|
+
$e as c,
|
|
770
|
+
Ie as d,
|
|
771
|
+
Ue as e,
|
|
772
|
+
Be as f,
|
|
773
|
+
Ve as g,
|
|
774
|
+
O as h
|
|
765
775
|
};
|
|
766
|
-
//# sourceMappingURL=link-cell-renderer-
|
|
776
|
+
//# sourceMappingURL=link-cell-renderer-B-xrUPew.js.map
|