@alfadocs/ui-kit-debug 1.20.0 → 1.21.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/{anamnesis-summary-rows-BPSQhxnZ.js → anamnesis-summary-rows-DwjqZgR5.js} +2 -2
- package/dist/_chunks/{anamnesis-summary-rows-BPSQhxnZ.js.map → anamnesis-summary-rows-DwjqZgR5.js.map} +1 -1
- package/dist/_chunks/{antenatal-schedule-timeline-B1k8QkA6.js → antenatal-schedule-timeline-sXfIp5lp.js} +3 -3
- package/dist/_chunks/{antenatal-schedule-timeline-B1k8QkA6.js.map → antenatal-schedule-timeline-sXfIp5lp.js.map} +1 -1
- package/dist/_chunks/{appointment-timeline-DCn0Jx55.js → appointment-timeline-DhHwmHo1.js} +2 -2
- package/dist/_chunks/{appointment-timeline-DCn0Jx55.js.map → appointment-timeline-DhHwmHo1.js.map} +1 -1
- package/dist/_chunks/{balance-badge-cell-BlvFil5p.js → balance-badge-cell-Bh2QbxsZ.js} +47 -46
- package/dist/_chunks/balance-badge-cell-Bh2QbxsZ.js.map +1 -0
- package/dist/_chunks/{booking-DQbo6mQF.js → booking-WXKbA69C.js} +4 -4
- package/dist/_chunks/{booking-DQbo6mQF.js.map → booking-WXKbA69C.js.map} +1 -1
- package/dist/_chunks/{calendar-workspace-D6kipuvT.js → calendar-workspace-CB6KLoF6.js} +4 -4
- package/dist/_chunks/{calendar-workspace-D6kipuvT.js.map → calendar-workspace-CB6KLoF6.js.map} +1 -1
- package/dist/_chunks/{cycle-calculator-DmtYGhqq.js → cycle-calculator-DVgxBfP0.js} +3 -3
- package/dist/_chunks/{cycle-calculator-DmtYGhqq.js.map → cycle-calculator-DVgxBfP0.js.map} +1 -1
- package/dist/_chunks/{data-table-D7nA8OGL.js → data-table-Bw3i0753.js} +252 -248
- package/dist/_chunks/{data-table-D7nA8OGL.js.map → data-table-Bw3i0753.js.map} +1 -1
- package/dist/_chunks/{date-picker-CepI_oI2.js → date-picker-B6NW_PS5.js} +3 -3
- package/dist/_chunks/{date-picker-CepI_oI2.js.map → date-picker-B6NW_PS5.js.map} +1 -1
- package/dist/_chunks/{date-picker-variants-DfuooXEK.js → date-picker-variants-B9NLAfUK.js} +5 -2
- package/dist/_chunks/{date-picker-variants-DfuooXEK.js.map → date-picker-variants-B9NLAfUK.js.map} +1 -1
- package/dist/_chunks/{date-range-picker-BD8P_rJq.js → date-range-picker-TpmECKRh.js} +197 -196
- package/dist/_chunks/date-range-picker-TpmECKRh.js.map +1 -0
- package/dist/_chunks/{date-time-picker-3I2vVKGV.js → date-time-picker-DijEae25.js} +2 -2
- package/dist/_chunks/{date-time-picker-3I2vVKGV.js.map → date-time-picker-DijEae25.js.map} +1 -1
- package/dist/_chunks/{due-date-calculator-BF_Ikofx.js → due-date-calculator-BtgWeFqp.js} +4 -4
- package/dist/_chunks/{due-date-calculator-BF_Ikofx.js.map → due-date-calculator-BtgWeFqp.js.map} +1 -1
- package/dist/_chunks/{file-manager-Bsc8-MQQ.js → file-manager-BdXjZNIc.js} +2 -2
- package/dist/_chunks/{file-manager-Bsc8-MQQ.js.map → file-manager-BdXjZNIc.js.map} +1 -1
- package/dist/_chunks/{gestational-age-calculator-CiOQjzgx.js → gestational-age-calculator-KdMg9z9H.js} +5 -5
- package/dist/_chunks/{gestational-age-calculator-CiOQjzgx.js.map → gestational-age-calculator-KdMg9z9H.js.map} +1 -1
- package/dist/_chunks/{hcg-doubling-CpU7H5rQ.js → hcg-doubling-C2fQxfXd.js} +3 -3
- package/dist/_chunks/{hcg-doubling-CpU7H5rQ.js.map → hcg-doubling-C2fQxfXd.js.map} +1 -1
- package/dist/_chunks/{link-cell-renderer-B-xrUPew.js → link-cell-renderer-tWEOv3Sc.js} +6 -4
- package/dist/_chunks/link-cell-renderer-tWEOv3Sc.js.map +1 -0
- package/dist/_chunks/{parse-MN9bGkrY.js → parse-DPqj4JtD.js} +2 -2
- package/dist/_chunks/{parse-MN9bGkrY.js.map → parse-DPqj4JtD.js.map} +1 -1
- package/dist/_chunks/{patient-details-1QDA-XOO.js → patient-details-DYAmq76G.js} +2 -2
- package/dist/_chunks/{patient-details-1QDA-XOO.js.map → patient-details-DYAmq76G.js.map} +1 -1
- package/dist/_chunks/{pregnancy-dating-D2wchD11.js → pregnancy-dating-m-c05DOI.js} +5 -5
- package/dist/_chunks/{pregnancy-dating-D2wchD11.js.map → pregnancy-dating-m-c05DOI.js.map} +1 -1
- package/dist/_chunks/{radiograph-panel.agent-C3trfWqB.js → radiograph-panel.agent-ByM9M3qm.js} +3 -3
- package/dist/_chunks/{radiograph-panel.agent-C3trfWqB.js.map → radiograph-panel.agent-ByM9M3qm.js.map} +1 -1
- package/dist/_chunks/subDays-HPvBuvq3.js +8 -0
- package/dist/_chunks/{subDays-BLl3y3pd.js.map → subDays-HPvBuvq3.js.map} +1 -1
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/calendar-class-names.d.ts.map +1 -1
- package/dist/components/appointment-timeline/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/data-table.d.ts.map +1 -1
- package/dist/components/data-table/filters/date-range-filter.d.ts.map +1 -1
- package/dist/components/data-table/index.js +2 -2
- package/dist/components/data-table/toolbar.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +6 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/file-manager/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/patient-details/index.js +1 -1
- package/dist/components/patient-table/columns.d.ts +10 -3
- package/dist/components/patient-table/columns.d.ts.map +1 -1
- package/dist/components/patient-table/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/radiograph-panel/index.js +1 -1
- package/dist/index.js +19 -19
- package/dist/patterns/anamnesis/index.js +1 -1
- package/dist/patterns/calendar/index.js +1 -1
- package/package.json +1 -1
- package/dist/_chunks/balance-badge-cell-BlvFil5p.js.map +0 -1
- package/dist/_chunks/date-range-picker-BD8P_rJq.js.map +0 -1
- package/dist/_chunks/link-cell-renderer-B-xrUPew.js.map +0 -1
- package/dist/_chunks/subDays-BLl3y3pd.js +0 -8
|
@@ -50,8 +50,8 @@ const er = [
|
|
|
50
50
|
], tr = Kt("columns-3-cog", er);
|
|
51
51
|
function rr(e) {
|
|
52
52
|
if (!At(e)) return e;
|
|
53
|
-
const t = e,
|
|
54
|
-
return Pt(t, { className:
|
|
53
|
+
const t = e, a = t.props.className ?? "", n = /\bsize-|\bw-|\bh-/.test(a) ? a : `${a} ds:size-4`.trim();
|
|
54
|
+
return Pt(t, { className: n, size: t.props.size ?? 16 });
|
|
55
55
|
}
|
|
56
56
|
const He = Ce(null);
|
|
57
57
|
function V(e) {
|
|
@@ -62,20 +62,20 @@ function V(e) {
|
|
|
62
62
|
);
|
|
63
63
|
return t;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function nr({
|
|
66
66
|
getApi: e,
|
|
67
67
|
selectionCount: t,
|
|
68
|
-
onPrint:
|
|
69
|
-
markColumnsUserTouched:
|
|
68
|
+
onPrint: a,
|
|
69
|
+
markColumnsUserTouched: n,
|
|
70
70
|
children: i
|
|
71
71
|
}) {
|
|
72
72
|
const d = j(
|
|
73
|
-
() => ({ getApi: e, selectionCount: t, onPrint:
|
|
74
|
-
[e, t,
|
|
73
|
+
() => ({ getApi: e, selectionCount: t, onPrint: a, markColumnsUserTouched: n }),
|
|
74
|
+
[e, t, a, n]
|
|
75
75
|
);
|
|
76
76
|
return /* @__PURE__ */ s(He.Provider, { value: d, children: i });
|
|
77
77
|
}
|
|
78
|
-
const
|
|
78
|
+
const ar = [
|
|
79
79
|
"data-table-toolbar",
|
|
80
80
|
// Mobile (<sm) keeps `flex-wrap` so a wide QuickSearch can flow above the
|
|
81
81
|
// Actions cluster on narrow screens. From `sm` (≥640px) we switch to
|
|
@@ -88,23 +88,23 @@ const nr = [
|
|
|
88
88
|
// matching the header-tools layout the Patients / Care Plan List
|
|
89
89
|
// patterns established (the old bg-card + border + shadow bar is gone).
|
|
90
90
|
].join(" "), Ve = $(
|
|
91
|
-
({ className: e, children: t, ...
|
|
91
|
+
({ className: e, children: t, ...a }, n) => /* @__PURE__ */ s(
|
|
92
92
|
"div",
|
|
93
93
|
{
|
|
94
|
-
ref:
|
|
94
|
+
ref: n,
|
|
95
95
|
role: "toolbar",
|
|
96
|
-
className: [
|
|
97
|
-
...
|
|
96
|
+
className: [ar, e ?? ""].join(" ").trim(),
|
|
97
|
+
...a,
|
|
98
98
|
children: t
|
|
99
99
|
}
|
|
100
100
|
)
|
|
101
101
|
);
|
|
102
102
|
Ve.displayName = "DataTable.Toolbar";
|
|
103
103
|
const Ue = $(
|
|
104
|
-
({ className: e, children: t, ...
|
|
104
|
+
({ className: e, children: t, ...a }, n) => /* @__PURE__ */ s(
|
|
105
105
|
"div",
|
|
106
106
|
{
|
|
107
|
-
ref:
|
|
107
|
+
ref: n,
|
|
108
108
|
className: [
|
|
109
109
|
"ds:flex ds:flex-wrap ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
110
110
|
// `grow` lets FilterBar absorb the free space; `min-w-0` lets the
|
|
@@ -114,66 +114,66 @@ const Ue = $(
|
|
|
114
114
|
"ds:grow ds:min-w-0",
|
|
115
115
|
e ?? ""
|
|
116
116
|
].join(" ").trim(),
|
|
117
|
-
...
|
|
117
|
+
...a,
|
|
118
118
|
children: t
|
|
119
119
|
}
|
|
120
120
|
)
|
|
121
121
|
);
|
|
122
122
|
Ue.displayName = "DataTable.Toolbar.FilterBar";
|
|
123
123
|
const Xe = $(
|
|
124
|
-
({ className: e, children: t, ...
|
|
124
|
+
({ className: e, children: t, ...a }, n) => /* @__PURE__ */ s(
|
|
125
125
|
"div",
|
|
126
126
|
{
|
|
127
|
-
ref:
|
|
127
|
+
ref: n,
|
|
128
128
|
className: [
|
|
129
129
|
"ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
130
130
|
"ds:ms-auto",
|
|
131
131
|
e ?? ""
|
|
132
132
|
].join(" ").trim(),
|
|
133
|
-
...
|
|
133
|
+
...a,
|
|
134
134
|
children: t
|
|
135
135
|
}
|
|
136
136
|
)
|
|
137
137
|
);
|
|
138
138
|
Xe.displayName = "DataTable.Toolbar.Actions";
|
|
139
139
|
const Ee = $(
|
|
140
|
-
({ label: e, onExport: t, intent:
|
|
141
|
-
const { t: d } = A(), { getApi:
|
|
142
|
-
const p =
|
|
140
|
+
({ label: e, onExport: t, intent: a = "outline", ...n }, i) => {
|
|
141
|
+
const { t: d } = A(), { getApi: g } = V("DataTable.Toolbar.ExportCsv"), h = D(() => {
|
|
142
|
+
const p = g();
|
|
143
143
|
p && (t ? t(p) : p.exportDataAsCsv());
|
|
144
|
-
}, [
|
|
144
|
+
}, [g, t]);
|
|
145
145
|
return /* @__PURE__ */ s(
|
|
146
146
|
oe,
|
|
147
147
|
{
|
|
148
148
|
ref: i,
|
|
149
149
|
type: "button",
|
|
150
|
-
intent:
|
|
150
|
+
intent: a,
|
|
151
151
|
icon: /* @__PURE__ */ s(ye, { "aria-hidden": !0 }),
|
|
152
152
|
tooltip: e ?? d("dataTable.exportCsv"),
|
|
153
|
-
onClick:
|
|
154
|
-
...
|
|
153
|
+
onClick: h,
|
|
154
|
+
...n
|
|
155
155
|
}
|
|
156
156
|
);
|
|
157
157
|
}
|
|
158
158
|
);
|
|
159
159
|
Ee.displayName = "DataTable.Toolbar.ExportCsv";
|
|
160
|
-
function
|
|
160
|
+
function ne(e, t = [30, 30, 30]) {
|
|
161
161
|
if (typeof document > "u") return t;
|
|
162
|
-
const
|
|
163
|
-
|
|
164
|
-
const
|
|
165
|
-
document.body.removeChild(
|
|
166
|
-
const i =
|
|
162
|
+
const a = document.createElement("span");
|
|
163
|
+
a.style.color = `hsl(var(${e}))`, a.style.position = "absolute", a.style.visibility = "hidden", document.body.appendChild(a);
|
|
164
|
+
const n = getComputedStyle(a).color;
|
|
165
|
+
document.body.removeChild(a);
|
|
166
|
+
const i = n.match(/rgba?\(\s*(\d+)[,\s]+(\d+)[,\s]+(\d+)/i);
|
|
167
167
|
return i ? [Number(i[1]), Number(i[2]), Number(i[3])] : t;
|
|
168
168
|
}
|
|
169
169
|
async function Qe(e, t) {
|
|
170
170
|
if (!e) return;
|
|
171
|
-
const [{ jsPDF:
|
|
171
|
+
const [{ jsPDF: a }, { default: n }] = await Promise.all([
|
|
172
172
|
import("./jspdf.es.min-DaapWjR1.js").then((C) => C.j),
|
|
173
173
|
import("./jspdf.plugin.autotable-CSiDNyPn.js")
|
|
174
|
-
]), d = (e.getColumns() ?? []).filter((C) => C.isVisible()),
|
|
174
|
+
]), d = (e.getColumns() ?? []).filter((C) => C.isVisible()), g = [
|
|
175
175
|
d.map((C) => e.getDisplayNameForColumn(C, null) ?? "")
|
|
176
|
-
],
|
|
176
|
+
], h = [];
|
|
177
177
|
e.forEachNodeAfterFilterAndSort((C) => {
|
|
178
178
|
if (!C.data) return;
|
|
179
179
|
const c = d.map((f) => {
|
|
@@ -184,13 +184,13 @@ async function Qe(e, t) {
|
|
|
184
184
|
});
|
|
185
185
|
return w == null ? "" : String(w);
|
|
186
186
|
});
|
|
187
|
-
|
|
187
|
+
h.push(c);
|
|
188
188
|
});
|
|
189
|
-
const p =
|
|
190
|
-
|
|
191
|
-
head:
|
|
192
|
-
body:
|
|
193
|
-
headStyles: { fillColor: p, textColor:
|
|
189
|
+
const p = ne("--muted", [240, 240, 240]), m = ne("--foreground", [30, 30, 30]), u = ne("--card-foreground", [30, 30, 30]), b = ne("--card", [250, 250, 250]), S = new a({ orientation: "landscape" });
|
|
190
|
+
n(S, {
|
|
191
|
+
head: g,
|
|
192
|
+
body: h,
|
|
193
|
+
headStyles: { fillColor: p, textColor: m },
|
|
194
194
|
bodyStyles: { textColor: u },
|
|
195
195
|
alternateRowStyles: { fillColor: b },
|
|
196
196
|
styles: {
|
|
@@ -201,25 +201,25 @@ async function Qe(e, t) {
|
|
|
201
201
|
}), S.save(t.fileName);
|
|
202
202
|
}
|
|
203
203
|
const De = $(
|
|
204
|
-
({ label: e, onClick: t, fileName:
|
|
205
|
-
const { t:
|
|
206
|
-
const
|
|
204
|
+
({ label: e, onClick: t, fileName: a, intent: n = "outline", ...i }, d) => {
|
|
205
|
+
const { t: g } = A(), { getApi: h } = V("DataTable.Toolbar.ExportPdf"), p = D(() => {
|
|
206
|
+
const m = h();
|
|
207
207
|
if (t) {
|
|
208
|
-
t(
|
|
208
|
+
t(m);
|
|
209
209
|
return;
|
|
210
210
|
}
|
|
211
|
-
Qe(
|
|
212
|
-
fileName:
|
|
211
|
+
Qe(m, {
|
|
212
|
+
fileName: a ?? "data-table-export.pdf"
|
|
213
213
|
});
|
|
214
|
-
}, [
|
|
214
|
+
}, [h, t, a]);
|
|
215
215
|
return /* @__PURE__ */ s(
|
|
216
216
|
oe,
|
|
217
217
|
{
|
|
218
218
|
ref: d,
|
|
219
219
|
type: "button",
|
|
220
|
-
intent:
|
|
220
|
+
intent: n,
|
|
221
221
|
icon: /* @__PURE__ */ s(Ke, { "aria-hidden": !0 }),
|
|
222
|
-
tooltip: e ??
|
|
222
|
+
tooltip: e ?? g("dataTable.exportPdf"),
|
|
223
223
|
onClick: p,
|
|
224
224
|
...i
|
|
225
225
|
}
|
|
@@ -228,31 +228,31 @@ const De = $(
|
|
|
228
228
|
);
|
|
229
229
|
De.displayName = "DataTable.Toolbar.ExportPdf";
|
|
230
230
|
const Ne = $(
|
|
231
|
-
({ label: e, intent: t = "outline", ...
|
|
231
|
+
({ label: e, intent: t = "outline", ...a }, n) => {
|
|
232
232
|
const { t: i } = A(), { onPrint: d } = V("DataTable.Toolbar.Print");
|
|
233
233
|
return /* @__PURE__ */ s(
|
|
234
234
|
oe,
|
|
235
235
|
{
|
|
236
|
-
ref:
|
|
236
|
+
ref: n,
|
|
237
237
|
type: "button",
|
|
238
238
|
intent: t,
|
|
239
239
|
icon: /* @__PURE__ */ s(Vt, { "aria-hidden": !0 }),
|
|
240
240
|
tooltip: e ?? i("dataTable.print"),
|
|
241
241
|
onClick: d,
|
|
242
|
-
...
|
|
242
|
+
...a
|
|
243
243
|
}
|
|
244
244
|
);
|
|
245
245
|
}
|
|
246
246
|
);
|
|
247
247
|
Ne.displayName = "DataTable.Toolbar.Print";
|
|
248
248
|
const Je = ({ placeholder: e, debounceMs: t = 150 }) => {
|
|
249
|
-
const { t:
|
|
250
|
-
return K(() => (
|
|
251
|
-
const
|
|
252
|
-
|
|
249
|
+
const { t: a } = A(), { getApi: n } = V("DataTable.Toolbar.QuickSearch"), [i, d] = G(""), g = B(void 0);
|
|
250
|
+
return K(() => (g.current && window.clearTimeout(g.current), g.current = window.setTimeout(() => {
|
|
251
|
+
const h = n();
|
|
252
|
+
h && h.setGridOption("quickFilterText", i);
|
|
253
253
|
}, t), () => {
|
|
254
|
-
|
|
255
|
-
}), [i, t,
|
|
254
|
+
g.current && window.clearTimeout(g.current);
|
|
255
|
+
}), [i, t, n]), // Slot wrapper caps the search at a sensible legible width on desktop —
|
|
256
256
|
// without this, TextInput's `w-full` lets the QuickSearch absorb the
|
|
257
257
|
// entire FilterBar row and push trailing Actions onto a second line at
|
|
258
258
|
// 1024 / 1280 / 1440. `min-w-0` lets the slot shrink below `24rem` when
|
|
@@ -265,29 +265,29 @@ const Je = ({ placeholder: e, debounceMs: t = 150 }) => {
|
|
|
265
265
|
type: "search",
|
|
266
266
|
size: "sm",
|
|
267
267
|
value: i,
|
|
268
|
-
onChange: (
|
|
269
|
-
placeholder: e ??
|
|
268
|
+
onChange: (h) => d(h.target.value),
|
|
269
|
+
placeholder: e ?? a("dataTable.quickSearch.placeholder", "Search…"),
|
|
270
270
|
startAdornment: /* @__PURE__ */ s(Ie, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
271
271
|
clearable: !0,
|
|
272
272
|
onClear: () => d(""),
|
|
273
|
-
"aria-label":
|
|
273
|
+
"aria-label": a("dataTable.quickSearch.label", "Quick search")
|
|
274
274
|
}
|
|
275
275
|
) });
|
|
276
276
|
};
|
|
277
277
|
Je.displayName = "DataTable.Toolbar.QuickSearch";
|
|
278
278
|
const Fe = $(
|
|
279
|
-
({ onRefresh: e, label: t, intent:
|
|
279
|
+
({ onRefresh: e, label: t, intent: a = "outline", ...n }, i) => {
|
|
280
280
|
const { t: d } = A();
|
|
281
281
|
return /* @__PURE__ */ s(
|
|
282
282
|
oe,
|
|
283
283
|
{
|
|
284
284
|
ref: i,
|
|
285
285
|
type: "button",
|
|
286
|
-
intent:
|
|
286
|
+
intent: a,
|
|
287
287
|
icon: /* @__PURE__ */ s($t, { "aria-hidden": !0 }),
|
|
288
288
|
tooltip: t ?? d("dataTable.refresh", "Refresh"),
|
|
289
289
|
onClick: e,
|
|
290
|
-
...
|
|
290
|
+
...n
|
|
291
291
|
}
|
|
292
292
|
);
|
|
293
293
|
}
|
|
@@ -295,18 +295,18 @@ const Fe = $(
|
|
|
295
295
|
Fe.displayName = "DataTable.Toolbar.Refresh";
|
|
296
296
|
function or(e, t) {
|
|
297
297
|
if (!e || typeof e != "object") return "";
|
|
298
|
-
const
|
|
299
|
-
if (typeof
|
|
300
|
-
const
|
|
301
|
-
return
|
|
298
|
+
const a = e;
|
|
299
|
+
if (typeof a.filter == "string" || typeof a.filter == "number") {
|
|
300
|
+
const n = typeof a.type == "string" ? a.type : "", i = typeof a.filterTo == "string" || typeof a.filterTo == "number" ? String(a.filterTo) : "";
|
|
301
|
+
return n === "inRange" && i ? `${a.filter} – ${i}` : n ? `${t(`dataTable.agGrid.${n}`, n)} ${a.filter}` : String(a.filter);
|
|
302
302
|
}
|
|
303
|
-
return typeof
|
|
303
|
+
return typeof a.dateFrom == "string" ? typeof a.dateTo == "string" && a.dateTo ? `${a.dateFrom} – ${a.dateTo}` : String(a.dateFrom) : Array.isArray(a.values) ? a.values.map(String).join(", ") : "";
|
|
304
304
|
}
|
|
305
305
|
const Ze = () => {
|
|
306
|
-
const { t: e } = A(), { getApi: t } = V("DataTable.Toolbar.FilterChips"), [
|
|
306
|
+
const { t: e } = A(), { getApi: t } = V("DataTable.Toolbar.FilterChips"), [a, n] = G([]), [i, d] = G(""), g = D(() => {
|
|
307
307
|
const u = t();
|
|
308
308
|
if (!u) {
|
|
309
|
-
|
|
309
|
+
n([]), d("");
|
|
310
310
|
return;
|
|
311
311
|
}
|
|
312
312
|
const b = u.getFilterModel() ?? {}, S = u.getColumns() ?? [], C = [];
|
|
@@ -318,14 +318,14 @@ const Ze = () => {
|
|
|
318
318
|
text: or(b[f], e)
|
|
319
319
|
});
|
|
320
320
|
}
|
|
321
|
-
|
|
321
|
+
n(C);
|
|
322
322
|
const c = u.getGridOption("quickFilterText");
|
|
323
323
|
d(typeof c == "string" ? c : "");
|
|
324
324
|
}, [t, e]);
|
|
325
325
|
if (K(() => {
|
|
326
326
|
let u;
|
|
327
|
-
const b = (c) =>
|
|
328
|
-
c.addEventListener("filterChanged", b),
|
|
327
|
+
const b = (c) => g(), S = (c) => {
|
|
328
|
+
c.addEventListener("filterChanged", b), g(), u = () => c.removeEventListener("filterChanged", b);
|
|
329
329
|
}, C = t();
|
|
330
330
|
if (C)
|
|
331
331
|
S(C);
|
|
@@ -337,12 +337,12 @@ const Ze = () => {
|
|
|
337
337
|
u = () => window.clearInterval(c);
|
|
338
338
|
}
|
|
339
339
|
return () => u == null ? void 0 : u();
|
|
340
|
-
}, [t,
|
|
340
|
+
}, [t, g]), a.length + (i ? 1 : 0) === 0) return null;
|
|
341
341
|
function p(u) {
|
|
342
342
|
const b = t();
|
|
343
|
-
b && b.
|
|
343
|
+
b && (b.setColumnFilterModel(u, null), b.onFilterChanged());
|
|
344
344
|
}
|
|
345
|
-
function
|
|
345
|
+
function m() {
|
|
346
346
|
const u = t();
|
|
347
347
|
u && (u.setFilterModel(null), u.setGridOption("quickFilterText", ""), d(""));
|
|
348
348
|
}
|
|
@@ -365,7 +365,7 @@ const Ze = () => {
|
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
367
|
),
|
|
368
|
-
|
|
368
|
+
a.map((u) => /* @__PURE__ */ s(
|
|
369
369
|
We,
|
|
370
370
|
{
|
|
371
371
|
label: u.text ? `${u.headerName}: ${u.text}` : u.headerName,
|
|
@@ -381,7 +381,7 @@ const Ze = () => {
|
|
|
381
381
|
type: "button",
|
|
382
382
|
intent: "ghost",
|
|
383
383
|
size: "sm",
|
|
384
|
-
onClick:
|
|
384
|
+
onClick: m,
|
|
385
385
|
startIcon: /* @__PURE__ */ s($e, { "aria-hidden": !0, className: "ds:size-4" }),
|
|
386
386
|
children: e("dataTable.filterChips.clearAll", "Clear all")
|
|
387
387
|
}
|
|
@@ -394,39 +394,39 @@ Ze.displayName = "DataTable.Toolbar.FilterChips";
|
|
|
394
394
|
const Ye = ({
|
|
395
395
|
field: e,
|
|
396
396
|
options: t,
|
|
397
|
-
label:
|
|
397
|
+
label: a
|
|
398
398
|
}) => {
|
|
399
|
-
const { t:
|
|
400
|
-
function
|
|
401
|
-
|
|
402
|
-
const
|
|
403
|
-
if (
|
|
399
|
+
const { t: n } = A(), { getApi: i } = V("DataTable.Toolbar.FacetFilter"), [d, g] = G(null);
|
|
400
|
+
function h(p) {
|
|
401
|
+
g(p);
|
|
402
|
+
const m = i();
|
|
403
|
+
if (m) {
|
|
404
404
|
if (p === null) {
|
|
405
|
-
|
|
405
|
+
m.setColumnFilterModel(e, null), m.onFilterChanged();
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
-
|
|
408
|
+
m.setColumnFilterModel(e, {
|
|
409
409
|
type: "equals",
|
|
410
410
|
filter: p
|
|
411
|
-
}),
|
|
411
|
+
}), m.onFilterChanged();
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
return /* @__PURE__ */ s(
|
|
415
415
|
"div",
|
|
416
416
|
{
|
|
417
417
|
role: "group",
|
|
418
|
-
"aria-label":
|
|
418
|
+
"aria-label": a ?? n("dataTable.facetFilter.label", "Filter"),
|
|
419
419
|
className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
420
420
|
children: t.map((p) => {
|
|
421
|
-
const
|
|
421
|
+
const m = d === p.value;
|
|
422
422
|
return /* @__PURE__ */ s(
|
|
423
423
|
de,
|
|
424
424
|
{
|
|
425
425
|
type: "button",
|
|
426
426
|
size: "sm",
|
|
427
|
-
intent:
|
|
428
|
-
"aria-pressed":
|
|
429
|
-
onClick: () =>
|
|
427
|
+
intent: m ? "primary" : "secondary",
|
|
428
|
+
"aria-pressed": m,
|
|
429
|
+
onClick: () => h(p.value),
|
|
430
430
|
children: p.label
|
|
431
431
|
},
|
|
432
432
|
String(p.value)
|
|
@@ -439,14 +439,14 @@ Ye.displayName = "DataTable.Toolbar.FacetFilter";
|
|
|
439
439
|
const ir = ["csv", "xlsx", "pdf"];
|
|
440
440
|
async function sr(e, t) {
|
|
441
441
|
if (!e) return;
|
|
442
|
-
const
|
|
442
|
+
const a = await import("./exceljs.min-D2MHbJsF.js").then((f) => f.e), n = new a.Workbook(), i = n.addWorksheet("Sheet1"), g = (e.getColumns() ?? []).filter((f) => f.isVisible());
|
|
443
443
|
i.addRow(
|
|
444
|
-
|
|
444
|
+
g.map(
|
|
445
445
|
(f) => e.getDisplayNameForColumn(f, null) ?? f.getColId()
|
|
446
446
|
)
|
|
447
447
|
), e.forEachNodeAfterFilterAndSort((f) => {
|
|
448
448
|
f.data && i.addRow(
|
|
449
|
-
|
|
449
|
+
g.map((w) => {
|
|
450
450
|
const T = e.getCellValue({
|
|
451
451
|
rowNode: f,
|
|
452
452
|
colKey: w,
|
|
@@ -456,15 +456,15 @@ async function sr(e, t) {
|
|
|
456
456
|
})
|
|
457
457
|
);
|
|
458
458
|
});
|
|
459
|
-
const
|
|
460
|
-
|
|
459
|
+
const h = ne("--muted", [240, 240, 240]), p = ne("--foreground", [30, 30, 30]), m = i.getRow(1), u = ([f, w, T]) => `${f.toString(16).padStart(2, "0")}${w.toString(16).padStart(2, "0")}${T.toString(16).padStart(2, "0")}`.toUpperCase();
|
|
460
|
+
m.eachCell((f) => {
|
|
461
461
|
f.font = { bold: !0, color: { argb: `FF${u(p)}` } }, f.fill = {
|
|
462
462
|
type: "pattern",
|
|
463
463
|
pattern: "solid",
|
|
464
|
-
fgColor: { argb: `FF${u(
|
|
464
|
+
fgColor: { argb: `FF${u(h)}` }
|
|
465
465
|
};
|
|
466
466
|
});
|
|
467
|
-
const b = await
|
|
467
|
+
const b = await n.xlsx.writeBuffer(), S = new Blob([b], {
|
|
468
468
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
|
469
469
|
}), C = URL.createObjectURL(S), c = document.createElement("a");
|
|
470
470
|
c.href = C, c.download = t.fileName, document.body.appendChild(c), c.click(), document.body.removeChild(c), URL.revokeObjectURL(C);
|
|
@@ -479,20 +479,20 @@ function lr() {
|
|
|
479
479
|
return e;
|
|
480
480
|
}
|
|
481
481
|
const ke = $(
|
|
482
|
-
({ children: e, label: t, intent:
|
|
483
|
-
const { t: d } = A(), { getApi:
|
|
484
|
-
return /* @__PURE__ */ s(et.Provider, { value:
|
|
482
|
+
({ children: e, label: t, intent: a = "outline", ...n }, i) => {
|
|
483
|
+
const { t: d } = A(), { getApi: g } = V("DataTable.Toolbar.ExportMenu"), h = j(() => ({ getApi: g }), [g]), p = e ?? ir.map((m) => /* @__PURE__ */ s(Ae, { format: m }, m));
|
|
484
|
+
return /* @__PURE__ */ s(et.Provider, { value: h, children: /* @__PURE__ */ L(he.Root, { children: [
|
|
485
485
|
/* @__PURE__ */ s(he.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
486
486
|
oe,
|
|
487
487
|
{
|
|
488
488
|
ref: i,
|
|
489
489
|
type: "button",
|
|
490
|
-
intent:
|
|
490
|
+
intent: a,
|
|
491
491
|
icon: /* @__PURE__ */ s(ye, { "aria-hidden": !0 }),
|
|
492
492
|
tooltip: t ?? d("dataTable.export.menu", "Export"),
|
|
493
493
|
"aria-label": t ?? d("dataTable.export.menu", "Export"),
|
|
494
494
|
"aria-haspopup": "menu",
|
|
495
|
-
...
|
|
495
|
+
...n
|
|
496
496
|
}
|
|
497
497
|
) }),
|
|
498
498
|
/* @__PURE__ */ s(he.Content, { align: "end", sideOffset: 4, children: p })
|
|
@@ -509,30 +509,30 @@ function cr(e) {
|
|
|
509
509
|
const Ae = ({
|
|
510
510
|
format: e,
|
|
511
511
|
label: t,
|
|
512
|
-
onClick:
|
|
513
|
-
fileName:
|
|
512
|
+
onClick: a,
|
|
513
|
+
fileName: n
|
|
514
514
|
}) => {
|
|
515
|
-
const { t: i } = A(), { getApi: d } = lr(),
|
|
516
|
-
const
|
|
515
|
+
const { t: i } = A(), { getApi: d } = lr(), g = D(() => {
|
|
516
|
+
const h = d();
|
|
517
517
|
if (e === "csv") {
|
|
518
|
-
|
|
518
|
+
h == null || h.exportDataAsCsv();
|
|
519
519
|
return;
|
|
520
520
|
}
|
|
521
521
|
if (e === "pdf") {
|
|
522
|
-
Qe(
|
|
523
|
-
fileName:
|
|
522
|
+
Qe(h, {
|
|
523
|
+
fileName: n ?? "data-table-export.pdf"
|
|
524
524
|
});
|
|
525
525
|
return;
|
|
526
526
|
}
|
|
527
527
|
if (e === "xlsx") {
|
|
528
|
-
sr(
|
|
529
|
-
fileName:
|
|
528
|
+
sr(h, {
|
|
529
|
+
fileName: n ?? "data-table-export.xlsx"
|
|
530
530
|
});
|
|
531
531
|
return;
|
|
532
532
|
}
|
|
533
|
-
|
|
534
|
-
}, [e,
|
|
535
|
-
return /* @__PURE__ */ s(he.Item, { onSelect:
|
|
533
|
+
a == null || a(h);
|
|
534
|
+
}, [e, n, a, d]);
|
|
535
|
+
return /* @__PURE__ */ s(he.Item, { onSelect: g, children: /* @__PURE__ */ L("span", { className: "ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
|
|
536
536
|
cr(e),
|
|
537
537
|
/* @__PURE__ */ s("span", { children: t ?? dr(i, e) })
|
|
538
538
|
] }) });
|
|
@@ -540,37 +540,37 @@ const Ae = ({
|
|
|
540
540
|
Ae.displayName = "DataTable.Toolbar.ExportMenu.Item";
|
|
541
541
|
function ur(e) {
|
|
542
542
|
if (!e) return [];
|
|
543
|
-
const t = (
|
|
543
|
+
const t = (n) => n.getPinned() === "left" ? 0 : n.getPinned() === "right" ? 2 : 1;
|
|
544
544
|
return [...e.getAllGridColumns() ?? []].sort(
|
|
545
|
-
(
|
|
546
|
-
).map((
|
|
547
|
-
colId:
|
|
548
|
-
displayName: e.getDisplayNameForColumn(
|
|
549
|
-
visible:
|
|
550
|
-
}).filter((
|
|
545
|
+
(n, i) => t(n) - t(i)
|
|
546
|
+
).map((n) => n.getColDef().hide === void 0 && n.getColId().startsWith("ag-Grid-") ? null : {
|
|
547
|
+
colId: n.getColId(),
|
|
548
|
+
displayName: e.getDisplayNameForColumn(n, null) || n.getColId(),
|
|
549
|
+
visible: n.isVisible()
|
|
550
|
+
}).filter((n) => n !== null);
|
|
551
551
|
}
|
|
552
552
|
const Pe = $(
|
|
553
|
-
function({ label: t, icon:
|
|
554
|
-
const { t: p } = A(), { getApi:
|
|
553
|
+
function({ label: t, icon: a, footer: n, header: i, intent: d = "outline", ...g }, h) {
|
|
554
|
+
const { t: p } = A(), { getApi: m, markColumnsUserTouched: u } = V(
|
|
555
555
|
"DataTable.Toolbar.ColumnToggle"
|
|
556
556
|
), [b, S] = G(!1), [C, c] = G([]), [f, w] = G(null), [T, R] = G(null);
|
|
557
557
|
K(() => {
|
|
558
|
-
b && c(ur(
|
|
559
|
-
}, [b,
|
|
558
|
+
b && c(ur(m()));
|
|
559
|
+
}, [b, m]);
|
|
560
560
|
const I = D(
|
|
561
561
|
(v, O) => {
|
|
562
|
-
const M =
|
|
562
|
+
const M = m();
|
|
563
563
|
M && (M.setColumnsVisible([v], O), u == null || u([v]), c(
|
|
564
564
|
(F) => F.map(
|
|
565
565
|
(N) => N.colId === v ? { ...N, visible: O } : N
|
|
566
566
|
)
|
|
567
567
|
));
|
|
568
568
|
},
|
|
569
|
-
[
|
|
569
|
+
[m, u]
|
|
570
570
|
), ee = D(
|
|
571
571
|
(v, O) => {
|
|
572
572
|
if (v === O) return;
|
|
573
|
-
const M =
|
|
573
|
+
const M = m();
|
|
574
574
|
if (!M) return;
|
|
575
575
|
c((z) => {
|
|
576
576
|
const E = z.findIndex((Q) => Q.colId === v), ie = z.findIndex((Q) => Q.colId === O);
|
|
@@ -584,20 +584,20 @@ const Pe = $(
|
|
|
584
584
|
const U = M.getAllGridColumns().findIndex((z) => z.getColId() === O);
|
|
585
585
|
U >= 0 && M.moveColumns([v], U);
|
|
586
586
|
},
|
|
587
|
-
[
|
|
587
|
+
[m]
|
|
588
588
|
), _ = t ?? p("dataTable.columnToggle");
|
|
589
589
|
return /* @__PURE__ */ L(me.Root, { open: b, onOpenChange: S, children: [
|
|
590
590
|
/* @__PURE__ */ s(me.Trigger, { asChild: !0, children: /* @__PURE__ */ s(
|
|
591
591
|
oe,
|
|
592
592
|
{
|
|
593
|
-
ref:
|
|
593
|
+
ref: h,
|
|
594
594
|
type: "button",
|
|
595
595
|
intent: d,
|
|
596
|
-
icon:
|
|
596
|
+
icon: a ?? /* @__PURE__ */ s(tr, { "aria-hidden": !0 }),
|
|
597
597
|
tooltip: _,
|
|
598
598
|
"aria-label": _,
|
|
599
599
|
"aria-haspopup": "dialog",
|
|
600
|
-
...
|
|
600
|
+
...g
|
|
601
601
|
}
|
|
602
602
|
) }),
|
|
603
603
|
/* @__PURE__ */ L(
|
|
@@ -668,7 +668,7 @@ const Pe = $(
|
|
|
668
668
|
})
|
|
669
669
|
}
|
|
670
670
|
),
|
|
671
|
-
|
|
671
|
+
n ? /* @__PURE__ */ s("div", { className: "ds:mt-[var(--spacing-xs)] ds:border-t ds:border-[color:var(--border)] ds:pt-[var(--spacing-sm)]", children: n }) : null
|
|
672
672
|
]
|
|
673
673
|
}
|
|
674
674
|
)
|
|
@@ -677,20 +677,20 @@ const Pe = $(
|
|
|
677
677
|
);
|
|
678
678
|
Pe.displayName = "DataTable.Toolbar.ColumnToggle";
|
|
679
679
|
const tt = $(
|
|
680
|
-
({ label: e, icon: t, onClick:
|
|
681
|
-
const { t:
|
|
680
|
+
({ label: e, icon: t, onClick: a, variant: n = "default", size: i = "sm", ...d }, g) => {
|
|
681
|
+
const { t: h } = A(), { getApi: p, selectionCount: m } = V(
|
|
682
682
|
"DataTable.Toolbar.BulkAction"
|
|
683
683
|
);
|
|
684
|
-
return
|
|
684
|
+
return m === 0 ? null : /* @__PURE__ */ L(
|
|
685
685
|
de,
|
|
686
686
|
{
|
|
687
|
-
ref:
|
|
687
|
+
ref: g,
|
|
688
688
|
type: "button",
|
|
689
|
-
intent:
|
|
689
|
+
intent: n === "destructive" ? "destructive" : "secondary",
|
|
690
690
|
size: i,
|
|
691
691
|
startIcon: rr(t),
|
|
692
|
-
onClick: () =>
|
|
693
|
-
"aria-label": `${e} (${
|
|
692
|
+
onClick: () => a(p()),
|
|
693
|
+
"aria-label": `${e} (${h("dataTable.bulkAction", { count: m })})`,
|
|
694
694
|
...d,
|
|
695
695
|
children: [
|
|
696
696
|
/* @__PURE__ */ s("span", { children: e }),
|
|
@@ -699,7 +699,7 @@ const tt = $(
|
|
|
699
699
|
{
|
|
700
700
|
"aria-hidden": "true",
|
|
701
701
|
className: "ds:ms-[var(--spacing-xs)] ds:opacity-80",
|
|
702
|
-
children:
|
|
702
|
+
children: h("dataTable.bulkAction", { count: m })
|
|
703
703
|
}
|
|
704
704
|
)
|
|
705
705
|
]
|
|
@@ -746,20 +746,20 @@ function mr(e) {
|
|
|
746
746
|
sensitivity: "base",
|
|
747
747
|
usage: "search"
|
|
748
748
|
});
|
|
749
|
-
function n
|
|
749
|
+
function a(n, i) {
|
|
750
750
|
if (i.length === 0) return 0;
|
|
751
|
-
if (i.length >
|
|
752
|
-
for (let d = 0; d <=
|
|
753
|
-
if (t.compare(
|
|
751
|
+
if (i.length > n.length) return -1;
|
|
752
|
+
for (let d = 0; d <= n.length - i.length; d += 1)
|
|
753
|
+
if (t.compare(n.slice(d, d + i.length), i) === 0)
|
|
754
754
|
return d;
|
|
755
755
|
return -1;
|
|
756
756
|
}
|
|
757
757
|
return {
|
|
758
|
-
equals: (
|
|
759
|
-
contains: (
|
|
760
|
-
startsWith: (
|
|
761
|
-
endsWith: (
|
|
762
|
-
|
|
758
|
+
equals: (n, i) => t.compare(n, i) === 0,
|
|
759
|
+
contains: (n, i) => a(n, i) !== -1,
|
|
760
|
+
startsWith: (n, i) => i.length <= n.length && t.compare(n.slice(0, i.length), i) === 0,
|
|
761
|
+
endsWith: (n, i) => i.length <= n.length && t.compare(
|
|
762
|
+
n.slice(n.length - i.length),
|
|
763
763
|
i
|
|
764
764
|
) === 0
|
|
765
765
|
};
|
|
@@ -768,16 +768,16 @@ function gr(e) {
|
|
|
768
768
|
return e == null ? null : typeof e == "string" ? e : String(e);
|
|
769
769
|
}
|
|
770
770
|
function hr(e) {
|
|
771
|
-
const { model: t, onModelChange:
|
|
771
|
+
const { model: t, onModelChange: a, getValue: n, placeholder: i, defaultOperator: d } = e, { t: g } = A("ui"), h = (t == null ? void 0 : t.type) ?? d ?? "contains", [p, m] = G(h), [u, b] = G((t == null ? void 0 : t.filter) ?? "");
|
|
772
772
|
K(() => {
|
|
773
|
-
|
|
773
|
+
m((t == null ? void 0 : t.type) ?? d ?? "contains"), b((t == null ? void 0 : t.filter) ?? "");
|
|
774
774
|
}, [t, d]);
|
|
775
775
|
const S = j(() => mr(Xt.language), []);
|
|
776
776
|
_t({
|
|
777
777
|
doesFilterPass: (T) => {
|
|
778
778
|
const R = t;
|
|
779
779
|
if (!R || R.filter === "") return !0;
|
|
780
|
-
const I = gr(
|
|
780
|
+
const I = gr(n(T.node));
|
|
781
781
|
if (I === null) return !1;
|
|
782
782
|
switch (R.type) {
|
|
783
783
|
case "equals":
|
|
@@ -797,20 +797,20 @@ function hr(e) {
|
|
|
797
797
|
});
|
|
798
798
|
function C() {
|
|
799
799
|
if (u.trim() === "") {
|
|
800
|
-
|
|
800
|
+
a(null);
|
|
801
801
|
return;
|
|
802
802
|
}
|
|
803
|
-
|
|
803
|
+
a({ type: p, filter: u });
|
|
804
804
|
}
|
|
805
805
|
function c() {
|
|
806
|
-
b(""),
|
|
806
|
+
b(""), m(d ?? "contains"), a(null);
|
|
807
807
|
}
|
|
808
808
|
const f = fr.map(
|
|
809
809
|
(T) => ({
|
|
810
810
|
value: T,
|
|
811
|
-
label:
|
|
811
|
+
label: g(`dataTable.textFilter.operators.${T}`)
|
|
812
812
|
})
|
|
813
|
-
), w = i ??
|
|
813
|
+
), w = i ?? g("dataTable.textFilter.placeholder");
|
|
814
814
|
return /* @__PURE__ */ L(
|
|
815
815
|
"div",
|
|
816
816
|
{
|
|
@@ -824,9 +824,9 @@ function hr(e) {
|
|
|
824
824
|
options: f,
|
|
825
825
|
value: p,
|
|
826
826
|
onValueChange: (T) => {
|
|
827
|
-
T !== "" &&
|
|
827
|
+
T !== "" && m(T);
|
|
828
828
|
},
|
|
829
|
-
"aria-label":
|
|
829
|
+
"aria-label": g("dataTable.textFilter.operators.contains")
|
|
830
830
|
}
|
|
831
831
|
),
|
|
832
832
|
/* @__PURE__ */ s(
|
|
@@ -844,8 +844,8 @@ function hr(e) {
|
|
|
844
844
|
}
|
|
845
845
|
),
|
|
846
846
|
/* @__PURE__ */ L("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: [
|
|
847
|
-
/* @__PURE__ */ s(de, { intent: "ghost", size: "sm", onClick: c, type: "button", children:
|
|
848
|
-
/* @__PURE__ */ s(de, { intent: "primary", size: "sm", onClick: C, type: "button", children:
|
|
847
|
+
/* @__PURE__ */ s(de, { intent: "ghost", size: "sm", onClick: c, type: "button", children: g("dataTable.textFilter.clear") }),
|
|
848
|
+
/* @__PURE__ */ s(de, { intent: "primary", size: "sm", onClick: C, type: "button", children: g("dataTable.textFilter.apply") })
|
|
849
849
|
] })
|
|
850
850
|
]
|
|
851
851
|
}
|
|
@@ -853,31 +853,31 @@ function hr(e) {
|
|
|
853
853
|
}
|
|
854
854
|
function br(e) {
|
|
855
855
|
var b, S;
|
|
856
|
-
const { model: t, onModelChange:
|
|
856
|
+
const { model: t, onModelChange: a, column: n } = e, { t: i } = A("ui"), d = ((S = (b = n == null ? void 0 : n.getColDef) == null ? void 0 : b.call(n)) == null ? void 0 : S.filterParams) ?? {}, g = d.defaultOperator ?? "contains", h = d.placeholder ?? i("dataTable.textFilter.placeholder"), [p, m] = G((t == null ? void 0 : t.filter) ?? "");
|
|
857
857
|
K(() => {
|
|
858
|
-
|
|
858
|
+
m((t == null ? void 0 : t.filter) ?? "");
|
|
859
859
|
}, [t == null ? void 0 : t.filter]), K(() => {
|
|
860
860
|
if (p === ((t == null ? void 0 : t.filter) ?? "")) return;
|
|
861
861
|
const C = setTimeout(() => {
|
|
862
862
|
if (p === "") {
|
|
863
|
-
t &&
|
|
863
|
+
t && a(null);
|
|
864
864
|
return;
|
|
865
865
|
}
|
|
866
|
-
|
|
866
|
+
a({ type: g, filter: p });
|
|
867
867
|
}, 200);
|
|
868
868
|
return () => clearTimeout(C);
|
|
869
|
-
}, [p,
|
|
869
|
+
}, [p, g, t, a]);
|
|
870
870
|
function u() {
|
|
871
|
-
|
|
871
|
+
m(""), t && a(null);
|
|
872
872
|
}
|
|
873
873
|
return /* @__PURE__ */ s("div", { "data-component": "text-floating-filter", className: "ds:w-full", children: /* @__PURE__ */ s(
|
|
874
874
|
Se,
|
|
875
875
|
{
|
|
876
876
|
size: "sm",
|
|
877
877
|
value: p,
|
|
878
|
-
onChange: (C) =>
|
|
879
|
-
placeholder:
|
|
880
|
-
"aria-label":
|
|
878
|
+
onChange: (C) => m(C.target.value),
|
|
879
|
+
placeholder: h,
|
|
880
|
+
"aria-label": h,
|
|
881
881
|
startAdornment: /* @__PURE__ */ s(Ie, { "aria-hidden": "true", className: "ds:size-4" }),
|
|
882
882
|
endAdornment: p.length > 0 ? /* @__PURE__ */ s(
|
|
883
883
|
"button",
|
|
@@ -899,24 +899,24 @@ function ge(e) {
|
|
|
899
899
|
}
|
|
900
900
|
function xr(e, t = !0) {
|
|
901
901
|
K(() => {
|
|
902
|
-
const
|
|
903
|
-
if (!t || !
|
|
902
|
+
const a = e.current;
|
|
903
|
+
if (!t || !a || typeof MutationObserver > "u") return;
|
|
904
904
|
(() => {
|
|
905
|
-
for (const d of
|
|
905
|
+
for (const d of a.querySelectorAll(Be)) ge(d);
|
|
906
906
|
})();
|
|
907
907
|
const i = new MutationObserver((d) => {
|
|
908
|
-
for (const
|
|
909
|
-
if (
|
|
910
|
-
ge(
|
|
908
|
+
for (const g of d)
|
|
909
|
+
if (g.type === "attributes")
|
|
910
|
+
ge(g.target);
|
|
911
911
|
else
|
|
912
|
-
for (const
|
|
913
|
-
if (
|
|
914
|
-
ge(
|
|
915
|
-
for (const p of
|
|
912
|
+
for (const h of g.addedNodes)
|
|
913
|
+
if (h instanceof Element) {
|
|
914
|
+
ge(h);
|
|
915
|
+
for (const p of h.querySelectorAll(Be))
|
|
916
916
|
ge(p);
|
|
917
917
|
}
|
|
918
918
|
});
|
|
919
|
-
return i.observe(
|
|
919
|
+
return i.observe(a, {
|
|
920
920
|
subtree: !0,
|
|
921
921
|
childList: !0,
|
|
922
922
|
attributes: !0,
|
|
@@ -924,62 +924,62 @@ function xr(e, t = !0) {
|
|
|
924
924
|
}), () => i.disconnect();
|
|
925
925
|
}, [e, t]);
|
|
926
926
|
}
|
|
927
|
-
const
|
|
927
|
+
const ae = "__dsDetailOf", wr = "ds-data-table-expanded-row", rt = "::detail", Tr = 'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])';
|
|
928
928
|
function W(e) {
|
|
929
|
-
return typeof e == "object" && e !== null && typeof e[
|
|
929
|
+
return typeof e == "object" && e !== null && typeof e[ae] == "string";
|
|
930
930
|
}
|
|
931
931
|
function vr(e) {
|
|
932
932
|
return `${e}${rt}`;
|
|
933
933
|
}
|
|
934
|
-
function
|
|
934
|
+
function mn(e) {
|
|
935
935
|
return e.endsWith(rt);
|
|
936
936
|
}
|
|
937
937
|
function Cr(e, t) {
|
|
938
|
-
return { ...e, [
|
|
938
|
+
return { ...e, [ae]: t };
|
|
939
939
|
}
|
|
940
|
-
const
|
|
940
|
+
const nt = Ce(
|
|
941
941
|
null
|
|
942
942
|
);
|
|
943
943
|
function Rr(e) {
|
|
944
944
|
var c;
|
|
945
945
|
const t = Re(
|
|
946
|
-
|
|
947
|
-
), { t:
|
|
946
|
+
nt
|
|
947
|
+
), { t: a } = A(), n = B(null), { data: i, node: d, api: g } = e, h = W(i), p = t == null ? void 0 : t.heights, m = d.id, u = B(t);
|
|
948
948
|
if (u.current = t, K(() => {
|
|
949
|
-
const f =
|
|
950
|
-
if (!f || !
|
|
951
|
-
let w = p.get(
|
|
949
|
+
const f = n.current;
|
|
950
|
+
if (!f || !h || !p || m == null) return;
|
|
951
|
+
let w = p.get(m) ?? 0;
|
|
952
952
|
const T = () => {
|
|
953
953
|
const I = Math.ceil(f.getBoundingClientRect().height);
|
|
954
|
-
I <= 0 || I === w || (w = I, p.set(
|
|
954
|
+
I <= 0 || I === w || (w = I, p.set(m, I), d.setRowHeight(I), g.onRowHeightChanged());
|
|
955
955
|
};
|
|
956
956
|
T();
|
|
957
957
|
const R = new ResizeObserver(T);
|
|
958
958
|
return R.observe(f), () => R.disconnect();
|
|
959
|
-
}, [
|
|
960
|
-
const f =
|
|
961
|
-
if (!f || !w || !
|
|
959
|
+
}, [g, m, p, h, d]), K(() => {
|
|
960
|
+
const f = n.current, w = f == null ? void 0 : f.parentElement;
|
|
961
|
+
if (!f || !w || !h) return;
|
|
962
962
|
const T = (R) => {
|
|
963
963
|
var I, ee;
|
|
964
964
|
R.target !== w || R.defaultPrevented || (R.key === "Escape" ? (R.stopPropagation(), (ee = (I = u.current) == null ? void 0 : I.onExpandedRowChange) == null || ee.call(I, null)) : R.key === "Enter" && (R.preventDefault(), (f.querySelector(Tr) ?? f).focus()));
|
|
965
965
|
};
|
|
966
966
|
return w.addEventListener("keydown", T), () => w.removeEventListener("keydown", T);
|
|
967
|
-
}, [
|
|
967
|
+
}, [h]), !h) {
|
|
968
968
|
const f = t == null ? void 0 : t.fallbackRenderer;
|
|
969
969
|
return f ? /* @__PURE__ */ s(f, { ...e }) : null;
|
|
970
970
|
}
|
|
971
|
-
const b = i[
|
|
971
|
+
const b = i[ae];
|
|
972
972
|
let S;
|
|
973
973
|
if (t != null && t.expanded && t.expanded.id === b)
|
|
974
974
|
S = t.expanded.row;
|
|
975
975
|
else {
|
|
976
|
-
const { [
|
|
976
|
+
const { [ae]: f, ...w } = i;
|
|
977
977
|
S = w;
|
|
978
978
|
}
|
|
979
979
|
return /* @__PURE__ */ L(
|
|
980
980
|
"div",
|
|
981
981
|
{
|
|
982
|
-
ref:
|
|
982
|
+
ref: n,
|
|
983
983
|
role: "gridcell",
|
|
984
984
|
tabIndex: -1,
|
|
985
985
|
"data-component": "data-table-expanded-row",
|
|
@@ -990,7 +990,7 @@ function Rr(e) {
|
|
|
990
990
|
f.key !== "Escape" || f.defaultPrevented || (f.stopPropagation(), (w = t == null ? void 0 : t.onExpandedRowChange) == null || w.call(t, null));
|
|
991
991
|
},
|
|
992
992
|
children: [
|
|
993
|
-
/* @__PURE__ */ s("span", { className: "ds:sr-only", children:
|
|
993
|
+
/* @__PURE__ */ s("span", { className: "ds:sr-only", children: a("dataTable.expandedRow") }),
|
|
994
994
|
(c = t == null ? void 0 : t.renderExpandedRow) == null ? void 0 : c.call(t, S)
|
|
995
995
|
]
|
|
996
996
|
}
|
|
@@ -1277,23 +1277,23 @@ function Nr() {
|
|
|
1277
1277
|
);
|
|
1278
1278
|
}
|
|
1279
1279
|
function Fr(e) {
|
|
1280
|
-
return e.map(({ pinned: t, ...
|
|
1280
|
+
return e.map(({ pinned: t, ...a }) => a);
|
|
1281
1281
|
}
|
|
1282
1282
|
function kr(e) {
|
|
1283
|
-
return e.map(({ hide: t, pinned:
|
|
1283
|
+
return e.map(({ hide: t, pinned: a, ...n }) => n);
|
|
1284
1284
|
}
|
|
1285
1285
|
function Ar(e, t) {
|
|
1286
1286
|
try {
|
|
1287
|
-
const
|
|
1288
|
-
if (!
|
|
1289
|
-
const
|
|
1290
|
-
if (Array.isArray(
|
|
1287
|
+
const a = localStorage.getItem(`data-table-col-state:${e}`);
|
|
1288
|
+
if (!a) return null;
|
|
1289
|
+
const n = JSON.parse(a);
|
|
1290
|
+
if (Array.isArray(n))
|
|
1291
1291
|
return {
|
|
1292
|
-
state: kr(
|
|
1292
|
+
state: kr(n),
|
|
1293
1293
|
touched: []
|
|
1294
1294
|
};
|
|
1295
|
-
if (typeof
|
|
1296
|
-
const i =
|
|
1295
|
+
if (typeof n != "object" || n === null) return null;
|
|
1296
|
+
const i = n;
|
|
1297
1297
|
return i.v !== 2 || !Array.isArray(i.state) ? null : {
|
|
1298
1298
|
state: i.dir === t ? i.state : Fr(i.state),
|
|
1299
1299
|
touched: Array.isArray(i.touched) ? i.touched.filter((d) => typeof d == "string") : []
|
|
@@ -1302,13 +1302,13 @@ function Ar(e, t) {
|
|
|
1302
1302
|
return null;
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
function Pr(e, t,
|
|
1305
|
+
function Pr(e, t, a, n) {
|
|
1306
1306
|
try {
|
|
1307
1307
|
const i = {
|
|
1308
1308
|
v: 2,
|
|
1309
|
-
dir:
|
|
1309
|
+
dir: a,
|
|
1310
1310
|
state: t.getColumnState(),
|
|
1311
|
-
touched: [...
|
|
1311
|
+
touched: [...n]
|
|
1312
1312
|
};
|
|
1313
1313
|
localStorage.setItem(
|
|
1314
1314
|
`data-table-col-state:${e}`,
|
|
@@ -1327,14 +1327,14 @@ const Or = /* @__PURE__ */ new Set([
|
|
|
1327
1327
|
]);
|
|
1328
1328
|
function Mr(e, t) {
|
|
1329
1329
|
const {
|
|
1330
|
-
columnDefs:
|
|
1331
|
-
rowData:
|
|
1330
|
+
columnDefs: a,
|
|
1331
|
+
rowData: n,
|
|
1332
1332
|
rowSelection: i,
|
|
1333
1333
|
pagination: d = !1,
|
|
1334
|
-
paginationPageSize:
|
|
1335
|
-
paginationPageSizeSelector:
|
|
1334
|
+
paginationPageSize: g = 25,
|
|
1335
|
+
paginationPageSizeSelector: h = [10, 25, 50, 100],
|
|
1336
1336
|
gridId: p,
|
|
1337
|
-
onSelectionChanged:
|
|
1337
|
+
onSelectionChanged: m,
|
|
1338
1338
|
onSortChanged: u,
|
|
1339
1339
|
onFilterChanged: b,
|
|
1340
1340
|
noRowsOverlay: S,
|
|
@@ -1444,13 +1444,18 @@ function Mr(e, t) {
|
|
|
1444
1444
|
}
|
|
1445
1445
|
);
|
|
1446
1446
|
Ot(t, () => Te, [Te]), Jt(Sr, Te, p);
|
|
1447
|
-
const ze = z.dir() === "rtl", it =
|
|
1447
|
+
const ze = z.dir() === "rtl", it = n === void 0, st = Zt(), { resolvedTheme: Ge } = Yt(), lt = (Ge === "light-accessible" || Ge === "dark-accessible") && f === "compact" ? "default" : f, dt = j(() => {
|
|
1448
1448
|
if (!i) return;
|
|
1449
1449
|
const r = (o) => !W(o.data);
|
|
1450
|
-
return i === "single" ? {
|
|
1450
|
+
return i === "single" ? {
|
|
1451
|
+
mode: "singleRow",
|
|
1452
|
+
enableClickSelection: !1,
|
|
1453
|
+
isRowSelectable: r
|
|
1454
|
+
} : {
|
|
1451
1455
|
mode: "multiRow",
|
|
1452
1456
|
headerCheckbox: !0,
|
|
1453
1457
|
checkboxes: !0,
|
|
1458
|
+
enableClickSelection: !1,
|
|
1454
1459
|
isRowSelectable: r
|
|
1455
1460
|
};
|
|
1456
1461
|
}, [i]), ue = ze ? "rtl" : "ltr", H = D(
|
|
@@ -1543,19 +1548,19 @@ function Mr(e, t) {
|
|
|
1543
1548
|
},
|
|
1544
1549
|
[q, c == null ? void 0 : c.context]
|
|
1545
1550
|
), J = j(() => {
|
|
1546
|
-
if (!N || v == null || !
|
|
1547
|
-
const r =
|
|
1551
|
+
if (!N || v == null || !n) return null;
|
|
1552
|
+
const r = n.find((o) => Le(o) === v);
|
|
1548
1553
|
return r === void 0 ? null : { id: v, row: r };
|
|
1549
|
-
}, [N, v, Le,
|
|
1550
|
-
if (!J || !
|
|
1551
|
-
const r =
|
|
1554
|
+
}, [N, v, Le, n]), ft = j(() => {
|
|
1555
|
+
if (!J || !n) return n;
|
|
1556
|
+
const r = n.indexOf(J.row), o = Cr(J.row, J.id);
|
|
1552
1557
|
return [
|
|
1553
|
-
...
|
|
1558
|
+
...n.slice(0, r + 1),
|
|
1554
1559
|
o,
|
|
1555
|
-
...
|
|
1560
|
+
...n.slice(r + 1)
|
|
1556
1561
|
];
|
|
1557
|
-
}, [J,
|
|
1558
|
-
(r) => W(r.data) ? vr(r.data[
|
|
1562
|
+
}, [J, n]), mt = D(
|
|
1563
|
+
(r) => W(r.data) ? vr(r.data[ae]) : q(r),
|
|
1559
1564
|
[q]
|
|
1560
1565
|
), gt = D(
|
|
1561
1566
|
(r) => {
|
|
@@ -1575,7 +1580,7 @@ function Mr(e, t) {
|
|
|
1575
1580
|
(re = (P = le.current) == null ? void 0 : P.postSortRows) == null || re.call(P, r);
|
|
1576
1581
|
const { nodes: o } = r, l = o.findIndex((Z) => W(Z.data));
|
|
1577
1582
|
if (l < 0) return;
|
|
1578
|
-
const [y] = o.splice(l, 1), x = y.data[
|
|
1583
|
+
const [y] = o.splice(l, 1), x = y.data[ae], k = o.findIndex((Z) => Z.id === x);
|
|
1579
1584
|
o.splice(k < 0 ? o.length : k + 1, 0, y);
|
|
1580
1585
|
},
|
|
1581
1586
|
[]
|
|
@@ -1627,8 +1632,8 @@ function Mr(e, t) {
|
|
|
1627
1632
|
const r = (l = E.current) == null ? void 0 : l.api;
|
|
1628
1633
|
if (!r) return;
|
|
1629
1634
|
const o = r.getSelectedRows().filter((y) => !W(y));
|
|
1630
|
-
xe(o.length),
|
|
1631
|
-
}, [
|
|
1635
|
+
xe(o.length), m == null || m(o);
|
|
1636
|
+
}, [m]), Ct = D(
|
|
1632
1637
|
(r) => {
|
|
1633
1638
|
var l;
|
|
1634
1639
|
const o = (l = E.current) == null ? void 0 : l.api;
|
|
@@ -1694,7 +1699,7 @@ function Mr(e, t) {
|
|
|
1694
1699
|
"data-print-mode": _ ? "true" : void 0,
|
|
1695
1700
|
children: [
|
|
1696
1701
|
!_ && /* @__PURE__ */ s(
|
|
1697
|
-
|
|
1702
|
+
nr,
|
|
1698
1703
|
{
|
|
1699
1704
|
getApi: Et,
|
|
1700
1705
|
selectionCount: X,
|
|
@@ -1709,7 +1714,7 @@ function Mr(e, t) {
|
|
|
1709
1714
|
ref: ie,
|
|
1710
1715
|
className: [Nt, _ ? "" : T].join(" ").trim(),
|
|
1711
1716
|
children: /* @__PURE__ */ s(
|
|
1712
|
-
|
|
1717
|
+
nt.Provider,
|
|
1713
1718
|
{
|
|
1714
1719
|
value: Tt,
|
|
1715
1720
|
children: /* @__PURE__ */ s(
|
|
@@ -1717,7 +1722,7 @@ function Mr(e, t) {
|
|
|
1717
1722
|
{
|
|
1718
1723
|
ref: E,
|
|
1719
1724
|
theme: "legacy",
|
|
1720
|
-
columnDefs:
|
|
1725
|
+
columnDefs: a,
|
|
1721
1726
|
rowData: ft,
|
|
1722
1727
|
defaultColDef: {
|
|
1723
1728
|
sortable: !0,
|
|
@@ -1737,8 +1742,8 @@ function Mr(e, t) {
|
|
|
1737
1742
|
},
|
|
1738
1743
|
rowSelection: dt,
|
|
1739
1744
|
pagination: kt,
|
|
1740
|
-
paginationPageSize:
|
|
1741
|
-
paginationPageSizeSelector:
|
|
1745
|
+
paginationPageSize: g,
|
|
1746
|
+
paginationPageSizeSelector: h,
|
|
1742
1747
|
paginationNumberFormatter: (r) => new Intl.NumberFormat(z.language).format(r.value),
|
|
1743
1748
|
animateRows: !st,
|
|
1744
1749
|
enableRtl: ze,
|
|
@@ -1749,7 +1754,6 @@ function Mr(e, t) {
|
|
|
1749
1754
|
accentedSort: !0,
|
|
1750
1755
|
multiSortKey: "ctrl",
|
|
1751
1756
|
suppressDragLeaveHidesColumns: !0,
|
|
1752
|
-
suppressRowClickSelection: i ? !0 : void 0,
|
|
1753
1757
|
tooltipShowDelay: 500,
|
|
1754
1758
|
tooltipHideDelay: 5e3,
|
|
1755
1759
|
tooltipInteraction: !0,
|
|
@@ -1796,22 +1800,22 @@ function Mr(e, t) {
|
|
|
1796
1800
|
}
|
|
1797
1801
|
);
|
|
1798
1802
|
}
|
|
1799
|
-
const
|
|
1800
|
-
|
|
1801
|
-
const
|
|
1803
|
+
const at = $(Mr);
|
|
1804
|
+
at.displayName = "DataTable";
|
|
1805
|
+
const gn = Object.assign(at, {
|
|
1802
1806
|
Toolbar: be
|
|
1803
1807
|
});
|
|
1804
1808
|
export {
|
|
1805
|
-
|
|
1809
|
+
gn as D,
|
|
1806
1810
|
wr as E,
|
|
1807
1811
|
hr as T,
|
|
1808
1812
|
br as a,
|
|
1809
1813
|
be as b,
|
|
1810
|
-
|
|
1814
|
+
nr as c,
|
|
1811
1815
|
Sr as d,
|
|
1812
1816
|
Qe as e,
|
|
1813
1817
|
vr as f,
|
|
1814
|
-
|
|
1818
|
+
mn as g,
|
|
1815
1819
|
W as i
|
|
1816
1820
|
};
|
|
1817
|
-
//# sourceMappingURL=data-table-
|
|
1821
|
+
//# sourceMappingURL=data-table-Bw3i0753.js.map
|