brutx-ui-vue 0.9.12 → 0.10.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/{AuthCard-DceWwG4l.js → AuthCard-Bw9msjia.js} +1 -1
- package/dist/chunks/{ColorModeSwitcher-Cao4Bif6.js → ColorModeSwitcher-BBz-h37h.js} +2 -2
- package/dist/chunks/{DataTable-CalVv1bw.js → DataTable-BQEJOXJg.js} +119 -110
- package/dist/chunks/{FeedbackForm-DAi_3GQZ.js → FeedbackForm-C7KaYHrs.js} +1 -1
- package/dist/chunks/{Input-BJJxORCq.js → Input-GuHL4o2p.js} +22 -20
- package/dist/chunks/{Pagination-Di0OoJLD.js → Pagination-CvIVOLL7.js} +2 -2
- package/dist/chunks/{Popconfirm-Bu8ZXy8v.js → Popconfirm-CLtr0FZj.js} +1 -1
- package/dist/chunks/{SelectItem-s5QKl0oO.js → SelectItem-fu-SSd1P.js} +13 -11
- package/dist/chunks/{SelectSeparator-BrjF1Ddh.js → SelectSeparator-BxLMpsqa.js} +1 -1
- package/dist/chunks/{Transfer-B0MrM9mL.js → Transfer-Dkn0nIyS.js} +1 -1
- package/dist/chunks/{TreeSelect-CAzZ62MC.js → TreeSelect-DDWP1N_j.js} +1 -1
- package/dist/chunks/{date-picker-C7pKesI1.js → date-picker-5rN7ScKT.js} +1 -1
- package/dist/chunks/{functional-Dc4jt3Ax.js → functional-B8WPv1y-.js} +8 -8
- package/dist/chunks/{useMessage-DUb-n3F8.js → useMessage-CfzIAOkG.js} +52 -52
- package/dist/chunks/useTheme-CS4HqKDz.js +106 -0
- package/dist/components/auth-card/index.js +1 -1
- package/dist/components/color-mode-switcher/index.js +1 -1
- package/dist/components/color-picker/ColorPicker.vue.d.ts +1 -1
- package/dist/components/cookie-consent/CookieConsent.vue.d.ts +1 -1
- package/dist/components/cookie-consent/CookieConsent.vue.d.ts.map +1 -1
- package/dist/components/data-table/DataTable.vue.d.ts +26 -3
- package/dist/components/data-table/DataTable.vue.d.ts.map +1 -1
- package/dist/components/data-table/DataTableColumnFilter.vue.d.ts +2 -1
- package/dist/components/data-table/DataTableColumnFilter.vue.d.ts.map +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/DatePicker.vue.d.ts +1 -1
- package/dist/components/date-picker/DatePickerRange.vue.d.ts +1 -1
- package/dist/components/date-picker/DateTimePicker.vue.d.ts +1 -1
- package/dist/components/date-picker/MonthPicker.vue.d.ts +1 -1
- package/dist/components/date-picker/WeekPicker.vue.d.ts +1 -1
- package/dist/components/date-picker/YearPicker.vue.d.ts +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/dialog/DialogEnhanced.vue.d.ts.map +1 -1
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/feedback-form/FeedbackForm.vue.d.ts +1 -1
- package/dist/components/feedback-form/FeedbackForm.vue.d.ts.map +1 -1
- package/dist/components/feedback-form/index.js +1 -1
- package/dist/components/hardcore-input/HardcoreInput.vue.d.ts +2 -2
- package/dist/components/input/Input.vue.d.ts.map +1 -1
- package/dist/components/input/index.js +1 -1
- package/dist/components/loading/Loading.vue.d.ts +1 -1
- package/dist/components/loading/Loading.vue.d.ts.map +1 -1
- package/dist/components/message/index.js +1 -1
- package/dist/components/pagination/index.js +1 -1
- package/dist/components/popconfirm/index.js +1 -1
- package/dist/components/scratch-card/ScratchCard.vue.d.ts +1 -1
- package/dist/components/select/SelectTrigger.vue.d.ts.map +1 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/toast/ToastContainer.vue.d.ts +1 -1
- package/dist/components/toast/ToastContainer.vue.d.ts.map +1 -1
- package/dist/components/transfer/index.js +1 -1
- package/dist/components/tree-select/index.js +1 -1
- package/dist/composables/destroyFallbacks.d.ts.map +1 -1
- package/dist/composables/destroyFallbacks.js +12 -3
- package/dist/composables/index.d.ts +15 -8
- package/dist/composables/index.d.ts.map +1 -1
- package/dist/composables/useAnimation.d.ts +14 -1
- package/dist/composables/useAnimation.d.ts.map +1 -1
- package/dist/composables/useAnimation.js +8 -7
- package/dist/composables/useAudioEngine.d.ts.map +1 -1
- package/dist/composables/useAudioEngine.js +24 -19
- package/dist/composables/useCanvasInteraction.d.ts +3 -1
- package/dist/composables/useCanvasInteraction.d.ts.map +1 -1
- package/dist/composables/useCanvasInteraction.js +54 -50
- package/dist/composables/useCarousel.d.ts +5 -3
- package/dist/composables/useCarousel.d.ts.map +1 -1
- package/dist/composables/useCarousel.js +47 -44
- package/dist/composables/useCarouselEnhanced.d.ts +3 -3
- package/dist/composables/useCarouselEnhanced.d.ts.map +1 -1
- package/dist/composables/useCarouselEnhanced.js +34 -31
- package/dist/composables/useClearable.d.ts +4 -1
- package/dist/composables/useClearable.d.ts.map +1 -1
- package/dist/composables/useClearable.js +27 -18
- package/dist/composables/useClearableSelection.d.ts +5 -0
- package/dist/composables/useClearableSelection.d.ts.map +1 -1
- package/dist/composables/useClearableSelection.js +6 -1
- package/dist/composables/useClipboard.d.ts +2 -2
- package/dist/composables/useClipboard.d.ts.map +1 -1
- package/dist/composables/useClipboard.js +20 -18
- package/dist/composables/useColorHistory.d.ts.map +1 -1
- package/dist/composables/useColorHistory.js +20 -7
- package/dist/composables/useColorPicker.d.ts.map +1 -1
- package/dist/composables/useColorPicker.js +34 -22
- package/dist/composables/useDataTableFilter.d.ts +8 -3
- package/dist/composables/useDataTableFilter.d.ts.map +1 -1
- package/dist/composables/useDataTableFilter.js +69 -33
- package/dist/composables/useDataTablePagination.d.ts.map +1 -1
- package/dist/composables/useDataTablePagination.js +31 -26
- package/dist/composables/useDataTableSelection.d.ts +2 -1
- package/dist/composables/useDataTableSelection.d.ts.map +1 -1
- package/dist/composables/useDataTableSelection.js +42 -33
- package/dist/composables/useDataTableSort.d.ts +3 -2
- package/dist/composables/useDataTableSort.d.ts.map +1 -1
- package/dist/composables/useDataTableSort.js +48 -32
- package/dist/composables/useDatePicker.d.ts.map +1 -1
- package/dist/composables/useDatePicker.js +4 -4
- package/dist/composables/useDebounce.d.ts.map +1 -1
- package/dist/composables/useDebounce.js +23 -11
- package/dist/composables/useDialog.d.ts.map +1 -1
- package/dist/composables/useDialog.js +11 -4
- package/dist/composables/useDialogEnhanced.d.ts +16 -6
- package/dist/composables/useDialogEnhanced.d.ts.map +1 -1
- package/dist/composables/useDialogEnhanced.js +162 -115
- package/dist/composables/useFormFieldValidation.d.ts +4 -2
- package/dist/composables/useFormFieldValidation.d.ts.map +1 -1
- package/dist/composables/useFormFieldValidation.js +22 -21
- package/dist/composables/useGlitchEffect.d.ts +2 -2
- package/dist/composables/useGlitchEffect.d.ts.map +1 -1
- package/dist/composables/useGlitchEffect.js +40 -40
- package/dist/composables/useKanban.d.ts +9 -8
- package/dist/composables/useKanban.d.ts.map +1 -1
- package/dist/composables/useKanban.js +78 -74
- package/dist/composables/useLocale.d.ts +12 -0
- package/dist/composables/useLocale.d.ts.map +1 -1
- package/dist/composables/useLocale.js +3 -3
- package/dist/composables/useMessage.d.ts +2 -1
- package/dist/composables/useMessage.d.ts.map +1 -1
- package/dist/composables/useMessage.js +1 -1
- package/dist/composables/useMessageBox.d.ts.map +1 -1
- package/dist/composables/useMessageBox.js +3 -1
- package/dist/composables/useReducedMotion.d.ts +1 -1
- package/dist/composables/useReducedMotion.d.ts.map +1 -1
- package/dist/composables/useReducedMotion.js +12 -11
- package/dist/composables/useSelectableTrigger.d.ts.map +1 -1
- package/dist/composables/useSelectableTrigger.js +13 -9
- package/dist/composables/useSelectionDisplayText.d.ts +4 -0
- package/dist/composables/useSelectionDisplayText.d.ts.map +1 -1
- package/dist/composables/useSelectionDisplayText.js +21 -18
- package/dist/composables/useStepper.d.ts +12 -1
- package/dist/composables/useStepper.d.ts.map +1 -1
- package/dist/composables/useStepper.js +26 -26
- package/dist/composables/useTheme.d.ts +1 -1
- package/dist/composables/useTheme.d.ts.map +1 -1
- package/dist/composables/useTheme.js +1 -1
- package/dist/composables/useThrottle.d.ts +6 -2
- package/dist/composables/useThrottle.d.ts.map +1 -1
- package/dist/composables/useThrottle.js +30 -24
- package/dist/composables/useToast.d.ts +3 -2
- package/dist/composables/useToast.d.ts.map +1 -1
- package/dist/composables/useToast.js +52 -49
- package/dist/composables/useTransferPanelSelection.d.ts +8 -2
- package/dist/composables/useTransferPanelSelection.d.ts.map +1 -1
- package/dist/composables/useTransferPanelSelection.js +26 -26
- package/dist/composables/useUpload.d.ts.map +1 -1
- package/dist/composables/useUpload.js +0 -0
- package/dist/index.js +16 -16
- package/dist/preflight.css +6 -7
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/chunks/useTheme-Dqwq8upy.js +0 -97
|
@@ -3,7 +3,7 @@ import { t } from "./icon-size-variants-Cp9lYoRk.js";
|
|
|
3
3
|
import { useLocale as n } from "../composables/useLocale.js";
|
|
4
4
|
import { t as r } from "./Button-BqrvVG21.js";
|
|
5
5
|
import { t as i } from "./Label-XrK3v0Wx.js";
|
|
6
|
-
import { t as a } from "./Input-
|
|
6
|
+
import { t as a } from "./Input-GuHL4o2p.js";
|
|
7
7
|
import { t as o } from "./Card-01h9lLdf.js";
|
|
8
8
|
import { i as s, n as c, r as l, t as u } from "./CardFooter-C6APHurx.js";
|
|
9
9
|
import { t as d } from "./CardContent-DQSu-W_o.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLocale as e } from "../composables/useLocale.js";
|
|
2
2
|
import { t } from "./Button-BqrvVG21.js";
|
|
3
|
-
import { i as n } from "./useTheme-
|
|
4
|
-
import { a as r, n as i, t as a } from "./SelectItem-
|
|
3
|
+
import { i as n } from "./useTheme-CS4HqKDz.js";
|
|
4
|
+
import { a as r, n as i, t as a } from "./SelectItem-fu-SSd1P.js";
|
|
5
5
|
import { Fragment as o, computed as s, createBlock as c, createElementBlock as l, createTextVNode as u, createVNode as d, defineComponent as f, normalizeClass as p, openBlock as m, renderList as h, resolveDynamicComponent as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
6
6
|
import { Monitor as b, Moon as x, Sun as S } from "@lucide/vue";
|
|
7
7
|
import { SelectRoot as C, SelectValue as w } from "reka-ui";
|
|
@@ -4,9 +4,9 @@ import { useLocale as n } from "../composables/useLocale.js";
|
|
|
4
4
|
import { g as r } from "./defaults-1sEDJLoL.js";
|
|
5
5
|
import { t as i } from "./Button-BqrvVG21.js";
|
|
6
6
|
import { t as a } from "./Checkbox-_vRf6_oJ.js";
|
|
7
|
-
import { t as o } from "./Input-
|
|
7
|
+
import { t as o } from "./Input-GuHL4o2p.js";
|
|
8
8
|
import { t as ee } from "./PopoverContent-CLN8H8Od.js";
|
|
9
|
-
import { a as te, n as ne, t as s } from "./SelectItem-
|
|
9
|
+
import { a as te, n as ne, t as s } from "./SelectItem-fu-SSd1P.js";
|
|
10
10
|
import { t as c } from "./data-table-utils-zJhVpzy8.js";
|
|
11
11
|
import { useDataTableSort as l } from "../composables/useDataTableSort.js";
|
|
12
12
|
import { useDataTableFilter as u } from "../composables/useDataTableFilter.js";
|
|
@@ -129,67 +129,68 @@ var Se = I([
|
|
|
129
129
|
},
|
|
130
130
|
emits: ["update:filterState"],
|
|
131
131
|
setup(e, { emit: t }) {
|
|
132
|
-
let r = e, c = t, { t: l } = n();
|
|
133
|
-
function
|
|
134
|
-
|
|
135
|
-
e == null || e === "" ? delete t[r.column.id] : t[r.column.id] = e, c("update:filterState", {
|
|
136
|
-
...r.filterState,
|
|
137
|
-
columns: t
|
|
138
|
-
});
|
|
132
|
+
let r = e, c = t, { t: l } = n(), u = null;
|
|
133
|
+
function d(e) {
|
|
134
|
+
c("update:filterState", { columns: { [r.column.id]: e == null || e === "" ? null : e } });
|
|
139
135
|
}
|
|
140
|
-
let
|
|
136
|
+
let re = m({
|
|
141
137
|
get() {
|
|
142
138
|
let e = r.filterState.columns?.[r.column.id];
|
|
143
139
|
return typeof e == "string" ? e : "";
|
|
144
140
|
},
|
|
145
141
|
set(e) {
|
|
146
|
-
|
|
142
|
+
d(e);
|
|
147
143
|
}
|
|
148
|
-
}),
|
|
144
|
+
}), ie = m({
|
|
149
145
|
get() {
|
|
150
146
|
let e = r.filterState.columns?.[r.column.id];
|
|
151
147
|
return String(e ?? "");
|
|
152
148
|
},
|
|
153
149
|
set(e) {
|
|
154
|
-
|
|
150
|
+
d(e);
|
|
155
151
|
}
|
|
156
152
|
});
|
|
157
|
-
function
|
|
153
|
+
function x(e) {
|
|
158
154
|
let t = r.filterState.columns?.[r.column.id];
|
|
159
155
|
return Array.isArray(t) ? t.includes(e) : !1;
|
|
160
156
|
}
|
|
161
|
-
function
|
|
162
|
-
let
|
|
163
|
-
|
|
157
|
+
function oe() {
|
|
158
|
+
let e = r.filterState.columns?.[r.column.id];
|
|
159
|
+
return Array.isArray(e) ? [...e] : [];
|
|
160
|
+
}
|
|
161
|
+
function S(e, t) {
|
|
162
|
+
let n = [...u ?? oe()];
|
|
163
|
+
if (t === !0 || t === "indeterminate") n.includes(e) || n.push(e);
|
|
164
164
|
else {
|
|
165
|
-
let t =
|
|
166
|
-
t !== -1 &&
|
|
165
|
+
let t = n.indexOf(e);
|
|
166
|
+
t !== -1 && n.splice(t, 1);
|
|
167
167
|
}
|
|
168
|
-
|
|
169
|
-
...r.filterState,
|
|
170
|
-
columns: n
|
|
171
|
-
});
|
|
168
|
+
u = n.length === 0 ? null : n, c("update:filterState", { columns: { [r.column.id]: n.length === 0 ? null : [...n] } });
|
|
172
169
|
}
|
|
173
|
-
function
|
|
170
|
+
function C(e) {
|
|
174
171
|
let t = r.filterState.columns?.[r.column.id];
|
|
175
172
|
return t && typeof t == "object" && !Array.isArray(t) ? t[e] ?? "" : "";
|
|
176
173
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
174
|
+
let E = null;
|
|
175
|
+
k(() => r.filterState.columns?.[r.column.id], () => {
|
|
176
|
+
E = null, u = null;
|
|
177
|
+
});
|
|
178
|
+
function se() {
|
|
179
|
+
let e = r.filterState.columns?.[r.column.id];
|
|
180
|
+
return e && typeof e == "object" && !Array.isArray(e) ? { ...e } : {
|
|
180
181
|
start: null,
|
|
181
182
|
end: null
|
|
182
|
-
}
|
|
183
|
-
...r.filterState,
|
|
184
|
-
columns: n
|
|
185
|
-
});
|
|
183
|
+
};
|
|
186
184
|
}
|
|
187
|
-
function
|
|
188
|
-
let
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
});
|
|
185
|
+
function ce(e, t) {
|
|
186
|
+
let n = {
|
|
187
|
+
...E ?? se(),
|
|
188
|
+
[e]: t || null
|
|
189
|
+
};
|
|
190
|
+
E = n, c("update:filterState", { columns: { [r.column.id]: n } });
|
|
191
|
+
}
|
|
192
|
+
function le() {
|
|
193
|
+
c("update:filterState", { columns: { [r.column.id]: null } });
|
|
193
194
|
}
|
|
194
195
|
return (t, n) => (w(), h(ae, null, {
|
|
195
196
|
default: A(() => [b(f, { "as-child": "" }, {
|
|
@@ -209,15 +210,15 @@ var Se = I([
|
|
|
209
210
|
v("div", L, D(O(l)("dataTable.filterTitle", { label: e.headerLabel })), 1),
|
|
210
211
|
e.column.filterType === "text" ? (w(), h(o, {
|
|
211
212
|
key: 0,
|
|
212
|
-
modelValue:
|
|
213
|
-
"onUpdate:modelValue": n[1] ||= (e) =>
|
|
213
|
+
modelValue: re.value,
|
|
214
|
+
"onUpdate:modelValue": n[1] ||= (e) => re.value = e,
|
|
214
215
|
size: "sm",
|
|
215
216
|
placeholder: O(l)("dataTable.filterSearchPlaceholder"),
|
|
216
217
|
clearable: ""
|
|
217
218
|
}, null, 8, ["modelValue", "placeholder"])) : e.column.filterType === "select" ? (w(), h(O(be), {
|
|
218
219
|
key: 1,
|
|
219
|
-
"model-value":
|
|
220
|
-
"onUpdate:modelValue": n[2] ||= (e) =>
|
|
220
|
+
"model-value": ie.value,
|
|
221
|
+
"onUpdate:modelValue": n[2] ||= (e) => d(e)
|
|
221
222
|
}, {
|
|
222
223
|
default: A(() => [b(te, {
|
|
223
224
|
size: "sm",
|
|
@@ -243,31 +244,31 @@ var Se = I([
|
|
|
243
244
|
key: e.value,
|
|
244
245
|
class: "flex items-center gap-2 cursor-pointer text-xs"
|
|
245
246
|
}, [b(a, {
|
|
246
|
-
checked:
|
|
247
|
+
checked: x(e.value),
|
|
247
248
|
size: "sm",
|
|
248
|
-
"onUpdate:checked": (t) =>
|
|
249
|
+
"onUpdate:checked": (t) => S(e.value, t)
|
|
249
250
|
}, null, 8, ["checked", "onUpdate:checked"]), v("span", null, D(e.label), 1)]))), 128))])) : e.column.filterType === "date-range" ? (w(), _("div", z, [
|
|
250
251
|
b(o, {
|
|
251
|
-
"model-value":
|
|
252
|
+
"model-value": C("start"),
|
|
252
253
|
type: "date",
|
|
253
254
|
size: "sm",
|
|
254
255
|
placeholder: O(l)("dataTable.filterStartDate"),
|
|
255
|
-
"onUpdate:modelValue": n[3] ||= (e) =>
|
|
256
|
+
"onUpdate:modelValue": n[3] ||= (e) => ce("start", e)
|
|
256
257
|
}, null, 8, ["model-value", "placeholder"]),
|
|
257
258
|
v("span", B, D(O(l)("dataTable.filterTo")), 1),
|
|
258
259
|
b(o, {
|
|
259
|
-
"model-value":
|
|
260
|
+
"model-value": C("end"),
|
|
260
261
|
type: "date",
|
|
261
262
|
size: "sm",
|
|
262
263
|
placeholder: O(l)("dataTable.filterEndDate"),
|
|
263
|
-
"onUpdate:modelValue": n[4] ||= (e) =>
|
|
264
|
+
"onUpdate:modelValue": n[4] ||= (e) => ce("end", e)
|
|
264
265
|
}, null, 8, ["model-value", "placeholder"])
|
|
265
266
|
])) : g("", !0),
|
|
266
267
|
v("div", je, [b(i, {
|
|
267
268
|
variant: "default",
|
|
268
269
|
size: "sm",
|
|
269
270
|
class: "h-7 px-2 text-xs border-3 shadow-none",
|
|
270
|
-
onClick:
|
|
271
|
+
onClick: le
|
|
271
272
|
}, {
|
|
272
273
|
default: A(() => [y(D(O(l)("dataTable.filterReset")), 1)]),
|
|
273
274
|
_: 1
|
|
@@ -474,19 +475,30 @@ var Se = I([
|
|
|
474
475
|
let U = m(() => x.columns.filter((e) => !e.hidden)), W = u({
|
|
475
476
|
columns: () => x.columns,
|
|
476
477
|
filterable: () => x.filterable
|
|
477
|
-
})
|
|
478
|
+
});
|
|
479
|
+
function mt(e) {
|
|
480
|
+
e.global !== void 0 && W.setGlobalFilter(e.global);
|
|
481
|
+
for (let [t, n] of Object.entries(e.columns)) if (n == null || n === "") {
|
|
482
|
+
let e = { ...W.filterState.value.columns };
|
|
483
|
+
delete e[t], W.setFilterState({
|
|
484
|
+
...W.filterState.value,
|
|
485
|
+
columns: e
|
|
486
|
+
});
|
|
487
|
+
} else W.setColumnFilter(t, n);
|
|
488
|
+
}
|
|
489
|
+
let G = l({
|
|
478
490
|
columns: () => x.columns,
|
|
479
491
|
sortable: () => x.sortable
|
|
480
|
-
}),
|
|
492
|
+
}), ht = m(() => W.filteredData(x.data)), gt = m(() => G.sortedData(ht.value)), K = re({
|
|
481
493
|
paginated: () => x.paginated,
|
|
482
494
|
pageSize: () => x.pageSize,
|
|
483
|
-
totalItems: () =>
|
|
484
|
-
}), q = m(() => K.paginatedData(
|
|
495
|
+
totalItems: () => ht.value.length
|
|
496
|
+
}), q = m(() => K.paginatedData(gt.value)), J = d({
|
|
485
497
|
selectable: () => x.selectable,
|
|
486
498
|
rowKey: () => x.rowKey,
|
|
487
499
|
displayData: () => q.value,
|
|
488
500
|
data: () => x.data
|
|
489
|
-
}),
|
|
501
|
+
}), _t = m(() => {
|
|
490
502
|
let { column: e, direction: t } = G.sortState.value;
|
|
491
503
|
return e && t ? e : null;
|
|
492
504
|
});
|
|
@@ -504,27 +516,27 @@ var Se = I([
|
|
|
504
516
|
let t = U.value.find((t) => t.id === e);
|
|
505
517
|
!t || t.sortable === !1 || (G.toggleSort(e), F("sort", G.sortState.value.column, G.sortState.value.direction));
|
|
506
518
|
}
|
|
507
|
-
function
|
|
519
|
+
function vt(e) {
|
|
508
520
|
J.toggleRowSelection(e), F("select", J.getSelectedRows());
|
|
509
521
|
}
|
|
510
|
-
function
|
|
522
|
+
function yt() {
|
|
511
523
|
J.toggleAllSelection(), F("select", J.getSelectedRows());
|
|
512
524
|
}
|
|
513
525
|
function Z(e) {
|
|
514
526
|
K.goToPage(e) && F("page-change", K.currentPage.value);
|
|
515
527
|
}
|
|
516
|
-
function
|
|
528
|
+
function bt(e) {
|
|
517
529
|
K.setPageSize(e), F("page-size-change", e);
|
|
518
530
|
}
|
|
519
|
-
function
|
|
531
|
+
function xt(e) {
|
|
520
532
|
F("export", e, J.getSelectedRows());
|
|
521
533
|
}
|
|
522
|
-
function
|
|
534
|
+
function St(e) {
|
|
523
535
|
let t = e.target;
|
|
524
536
|
return t instanceof HTMLElement ? !!t.closest("button, input, [role=\"checkbox\"], [role=\"button\"], a") : !1;
|
|
525
537
|
}
|
|
526
538
|
function Q(e, t) {
|
|
527
|
-
!x.rowClickable ||
|
|
539
|
+
!x.rowClickable || St(t) || F("row-click", e);
|
|
528
540
|
}
|
|
529
541
|
k(() => x.data, (e, t) => {
|
|
530
542
|
e !== t && (J.clearSelection(), K.goToPage(1));
|
|
@@ -540,14 +552,14 @@ var Se = I([
|
|
|
540
552
|
!e.width && !$.has(e.id) && (console.warn(`[BrutxUI] Column "${e.id}" must have an explicit width when virtualScroll is enabled.`), $.add(e.id));
|
|
541
553
|
});
|
|
542
554
|
});
|
|
543
|
-
let
|
|
555
|
+
let Ct = m(() => {
|
|
544
556
|
let e = [];
|
|
545
557
|
return x.expandable && e.push("40px"), x.selectable && e.push("48px"), U.value.forEach((t) => {
|
|
546
558
|
e.push(t.width ? typeof t.width == "number" ? `${t.width}px` : t.width === "auto" ? "1fr" : t.width : "1fr");
|
|
547
559
|
}), e.join(" ");
|
|
548
|
-
}),
|
|
560
|
+
}), wt = m(() => e(Se({ size: x.size }), x.section && "max-w-5xl mx-auto overflow-hidden", x.framed === !1 && "border-0 shadow-none rounded-none", x.class)), Tt = m(() => {
|
|
549
561
|
if (x.virtualScroll?.enabled) return { "--row-height": `${x.virtualScroll.rowHeight ?? 48}px` };
|
|
550
|
-
}),
|
|
562
|
+
}), Et = m(() => e(De())), Dt = m(() => e(Ce(), x.stickyHeader && "sticky top-0 z-10")), Ot = m(() => e(ke())), kt = m(() => e(Oe())), At = m(() => e(Ae()));
|
|
551
563
|
r({
|
|
552
564
|
sort: {
|
|
553
565
|
toggleSort: G.toggleSort,
|
|
@@ -555,12 +567,8 @@ var Se = I([
|
|
|
555
567
|
},
|
|
556
568
|
filter: {
|
|
557
569
|
filterState: W.filterState,
|
|
558
|
-
setGlobalFilter:
|
|
559
|
-
|
|
560
|
-
...W.filterState.value,
|
|
561
|
-
global: e
|
|
562
|
-
};
|
|
563
|
-
}
|
|
570
|
+
setGlobalFilter: W.setGlobalFilter,
|
|
571
|
+
setFilterState: W.setFilterState
|
|
564
572
|
},
|
|
565
573
|
selection: {
|
|
566
574
|
toggleRow: J.toggleRowSelection,
|
|
@@ -584,20 +592,20 @@ var Se = I([
|
|
|
584
592
|
expandedRowKeys: I
|
|
585
593
|
}
|
|
586
594
|
});
|
|
587
|
-
function
|
|
595
|
+
function jt(t) {
|
|
588
596
|
return e(we({
|
|
589
597
|
sortable: x.sortable && t.sortable !== !1,
|
|
590
598
|
align: t.align,
|
|
591
|
-
active:
|
|
599
|
+
active: _t.value === t.id
|
|
592
600
|
}));
|
|
593
601
|
}
|
|
594
|
-
function
|
|
602
|
+
function Mt(t) {
|
|
595
603
|
return e(Te({
|
|
596
604
|
selected: J.selectedRows.value.has(J.getRowKey(t)),
|
|
597
605
|
striped: x.striped
|
|
598
606
|
}), x.rowClickable && "cursor-pointer");
|
|
599
607
|
}
|
|
600
|
-
let
|
|
608
|
+
let Nt = oe({
|
|
601
609
|
props: [
|
|
602
610
|
"cellFn",
|
|
603
611
|
"row",
|
|
@@ -610,49 +618,50 @@ var Se = I([
|
|
|
610
618
|
});
|
|
611
619
|
}
|
|
612
620
|
});
|
|
613
|
-
function
|
|
621
|
+
function Pt(t) {
|
|
614
622
|
return e(Ee({
|
|
615
623
|
align: t.align,
|
|
616
624
|
size: x.size,
|
|
617
625
|
dense: x.dense,
|
|
618
|
-
active:
|
|
626
|
+
active: _t.value === t.id
|
|
619
627
|
}));
|
|
620
628
|
}
|
|
621
629
|
return (e, n) => (w(), _("div", {
|
|
622
|
-
class: S(
|
|
623
|
-
style: C(
|
|
630
|
+
class: S(wt.value),
|
|
631
|
+
style: C(Tt.value),
|
|
624
632
|
role: "grid",
|
|
625
633
|
"aria-label": O(f)("dataTable.label")
|
|
626
634
|
}, [
|
|
627
635
|
E(e.$slots, "header", {}, () => [t.title || t.description ? (w(), _("div", Ne, [t.title ? (w(), _("h2", Pe, D(t.title), 1)) : g("", !0), t.description ? (w(), _("p", Fe, D(t.description), 1)) : g("", !0)])) : g("", !0)]),
|
|
628
636
|
t.filterable || O(ae).toolbar ? (w(), _("div", {
|
|
629
637
|
key: 0,
|
|
630
|
-
class: S(
|
|
638
|
+
class: S(Et.value)
|
|
631
639
|
}, [t.filterable ? (w(), _("div", Ie, [b(o, {
|
|
632
|
-
|
|
633
|
-
"onUpdate:modelValue":
|
|
640
|
+
"model-value": O(W).filterState.value.global,
|
|
641
|
+
"onUpdate:modelValue": O(W).setGlobalFilter,
|
|
634
642
|
size: "sm",
|
|
635
643
|
placeholder: t.filterPlaceholder ?? O(f)("dataTable.filterPlaceholder"),
|
|
636
644
|
"aria-label": t.filterPlaceholder ?? O(f)("dataTable.filterPlaceholder")
|
|
637
645
|
}, null, 8, [
|
|
638
|
-
"
|
|
646
|
+
"model-value",
|
|
647
|
+
"onUpdate:modelValue",
|
|
639
648
|
"placeholder",
|
|
640
649
|
"aria-label"
|
|
641
650
|
])])) : g("", !0), v("div", Le, [E(e.$slots, "toolbar"), t.selectable && O(J).selectedRows.value.size > 0 ? (w(), h(i, {
|
|
642
651
|
key: 0,
|
|
643
652
|
variant: "primary",
|
|
644
653
|
size: "sm",
|
|
645
|
-
onClick: n[
|
|
654
|
+
onClick: n[0] ||= (e) => xt("csv")
|
|
646
655
|
}, {
|
|
647
656
|
default: A(() => [y(D(O(f)("dataTable.exportCsv")), 1)]),
|
|
648
657
|
_: 1
|
|
649
658
|
})) : g("", !0)])], 2)) : g("", !0),
|
|
650
659
|
v("div", Re, [x.virtualScroll?.enabled ? (w(), _("div", ze, [v("div", {
|
|
651
|
-
class: S(
|
|
660
|
+
class: S(Dt.value),
|
|
652
661
|
role: "rowgroup"
|
|
653
662
|
}, [v("div", {
|
|
654
663
|
class: "grid border-b-3 border-brutal",
|
|
655
|
-
style: C({ gridTemplateColumns:
|
|
664
|
+
style: C({ gridTemplateColumns: Ct.value }),
|
|
656
665
|
role: "row"
|
|
657
666
|
}, [
|
|
658
667
|
t.expandable ? (w(), _("div", {
|
|
@@ -664,7 +673,7 @@ var Se = I([
|
|
|
664
673
|
left: "0px",
|
|
665
674
|
zIndex: O(10)
|
|
666
675
|
})
|
|
667
|
-
}, [...n[
|
|
676
|
+
}, [...n[6] ||= [v("span", { class: "sr-only" }, "Expand", -1)]], 4)) : g("", !0),
|
|
668
677
|
t.selectable ? (w(), _("div", {
|
|
669
678
|
key: 1,
|
|
670
679
|
class: "w-12 px-4 py-3 text-center flex items-center justify-center",
|
|
@@ -678,11 +687,11 @@ var Se = I([
|
|
|
678
687
|
checked: O(J).isIndeterminate.value ? "indeterminate" : O(J).isAllSelected.value,
|
|
679
688
|
size: "sm",
|
|
680
689
|
class: "cursor-pointer",
|
|
681
|
-
"onUpdate:checked":
|
|
690
|
+
"onUpdate:checked": yt
|
|
682
691
|
}, null, 8, ["checked"])], 4)) : g("", !0),
|
|
683
692
|
(w(!0), _(p, null, T(U.value, (e) => (w(), _("div", {
|
|
684
693
|
key: e.id,
|
|
685
|
-
class: S([
|
|
694
|
+
class: S([jt(e), "flex items-center"]),
|
|
686
695
|
style: C({
|
|
687
696
|
position: e.fixed ? "sticky" : void 0,
|
|
688
697
|
left: e.fixed === "left" ? `${B(e, "left")}px` : void 0,
|
|
@@ -702,7 +711,7 @@ var Se = I([
|
|
|
702
711
|
x.filterable && e.filterType ? (w(), h(V, {
|
|
703
712
|
key: 0,
|
|
704
713
|
"filter-state": O(W).filterState.value,
|
|
705
|
-
"onUpdate:filterState":
|
|
714
|
+
"onUpdate:filterState": mt,
|
|
706
715
|
column: e,
|
|
707
716
|
"header-label": Y(e)
|
|
708
717
|
}, null, 8, [
|
|
@@ -731,8 +740,8 @@ var Se = I([
|
|
|
731
740
|
class: "w-full max-h-[400px] overflow-y-auto border-3 border-t-0 border-brutal"
|
|
732
741
|
}, {
|
|
733
742
|
default: A(({ index: n }) => [q.value[n] ? (w(), _("div", He, [v("div", {
|
|
734
|
-
class: S(["grid",
|
|
735
|
-
style: C({ gridTemplateColumns:
|
|
743
|
+
class: S(["grid", Mt(q.value[n])]),
|
|
744
|
+
style: C({ gridTemplateColumns: Ct.value }),
|
|
736
745
|
role: "row",
|
|
737
746
|
tabindex: t.rowClickable ? 0 : void 0,
|
|
738
747
|
"aria-selected": O(J).selectedRows.value.has(O(J).getRowKey(q.value[n])) || void 0,
|
|
@@ -778,11 +787,11 @@ var Se = I([
|
|
|
778
787
|
checked: O(J).selectedRows.value.has(O(J).getRowKey(q.value[n])),
|
|
779
788
|
size: "sm",
|
|
780
789
|
class: "cursor-pointer",
|
|
781
|
-
"onUpdate:checked": (e) =>
|
|
790
|
+
"onUpdate:checked": (e) => vt(q.value[n])
|
|
782
791
|
}, null, 8, ["checked", "onUpdate:checked"])], 4)) : g("", !0),
|
|
783
792
|
(w(!0), _(p, null, T(U.value, (t) => (w(), _("div", {
|
|
784
793
|
key: t.id,
|
|
785
|
-
class: S([
|
|
794
|
+
class: S([Pt(t), "flex items-center"]),
|
|
786
795
|
style: C({
|
|
787
796
|
position: t.fixed ? "sticky" : void 0,
|
|
788
797
|
left: t.fixed === "left" ? `${B(t, "left")}px` : void 0,
|
|
@@ -809,7 +818,7 @@ var Se = I([
|
|
|
809
818
|
key: 1,
|
|
810
819
|
row: q.value[n],
|
|
811
820
|
value: O(c)(q.value[n], t)
|
|
812
|
-
}, () => [t.cell ? (w(), h(O(
|
|
821
|
+
}, () => [t.cell ? (w(), h(O(Nt), {
|
|
813
822
|
key: 0,
|
|
814
823
|
"cell-fn": t.cell,
|
|
815
824
|
row: q.value[n],
|
|
@@ -830,9 +839,9 @@ var Se = I([
|
|
|
830
839
|
"dynamic-height"
|
|
831
840
|
])) : (w(), _("div", {
|
|
832
841
|
key: 1,
|
|
833
|
-
class: S(
|
|
842
|
+
class: S(Ot.value),
|
|
834
843
|
role: "rowgroup"
|
|
835
|
-
}, [v("div", Ke, [v("div", qe, [E(e.$slots, "empty", {}, () => [v("span", Je, [b(O(ve), { class: "w-6 h-6" })]), v("p", Ye, D(t.emptyMessage || O(f)("dataTable.noData")), 1)])])])], 2))])) : (w(), _("table", Xe, [v("thead", { class: S(
|
|
844
|
+
}, [v("div", Ke, [v("div", qe, [E(e.$slots, "empty", {}, () => [v("span", Je, [b(O(ve), { class: "w-6 h-6" })]), v("p", Ye, D(t.emptyMessage || O(f)("dataTable.noData")), 1)])])])], 2))])) : (w(), _("table", Xe, [v("thead", { class: S(Dt.value) }, [v("tr", null, [
|
|
836
845
|
t.expandable ? (w(), _("th", {
|
|
837
846
|
key: 0,
|
|
838
847
|
class: "w-10 px-2 py-3 text-center",
|
|
@@ -841,7 +850,7 @@ var Se = I([
|
|
|
841
850
|
left: "0px",
|
|
842
851
|
zIndex: O(10)
|
|
843
852
|
})
|
|
844
|
-
}, [...n[
|
|
853
|
+
}, [...n[7] ||= [v("span", { class: "sr-only" }, "Expand", -1)]], 4)) : g("", !0),
|
|
845
854
|
t.selectable ? (w(), _("th", {
|
|
846
855
|
key: 1,
|
|
847
856
|
class: "w-12 px-4 py-3 text-center",
|
|
@@ -854,11 +863,11 @@ var Se = I([
|
|
|
854
863
|
checked: O(J).isIndeterminate.value ? "indeterminate" : O(J).isAllSelected.value,
|
|
855
864
|
size: "sm",
|
|
856
865
|
class: "cursor-pointer",
|
|
857
|
-
"onUpdate:checked":
|
|
866
|
+
"onUpdate:checked": yt
|
|
858
867
|
}, null, 8, ["checked"])], 4)) : g("", !0),
|
|
859
868
|
(w(!0), _(p, null, T(U.value, (e) => (w(), _("th", {
|
|
860
869
|
key: e.id,
|
|
861
|
-
class: S(
|
|
870
|
+
class: S(jt(e)),
|
|
862
871
|
style: C({
|
|
863
872
|
width: e.width ? typeof e.width == "number" ? `${e.width}px` : e.width : void 0,
|
|
864
873
|
minWidth: e.minWidth ? `${e.minWidth}px` : void 0,
|
|
@@ -881,7 +890,7 @@ var Se = I([
|
|
|
881
890
|
x.filterable && e.filterType ? (w(), h(V, {
|
|
882
891
|
key: 0,
|
|
883
892
|
"filter-state": O(W).filterState.value,
|
|
884
|
-
"onUpdate:filterState":
|
|
893
|
+
"onUpdate:filterState": mt,
|
|
885
894
|
column: e,
|
|
886
895
|
"header-label": Y(e)
|
|
887
896
|
}, null, 8, [
|
|
@@ -901,7 +910,7 @@ var Se = I([
|
|
|
901
910
|
}))])) : g("", !0)
|
|
902
911
|
], 2)], 46, Ze))), 128))
|
|
903
912
|
])], 2), v("tbody", null, [q.value.length > 0 ? (w(!0), _(p, { key: 0 }, T(q.value, (n, r) => (w(), _(p, { key: O(J).getRowKey(n) }, [v("tr", {
|
|
904
|
-
class: S(
|
|
913
|
+
class: S(Mt(n)),
|
|
905
914
|
role: "row",
|
|
906
915
|
tabindex: t.rowClickable ? 0 : void 0,
|
|
907
916
|
"aria-selected": O(J).selectedRows.value.has(O(J).getRowKey(n)) || void 0,
|
|
@@ -947,11 +956,11 @@ var Se = I([
|
|
|
947
956
|
checked: O(J).selectedRows.value.has(O(J).getRowKey(n)),
|
|
948
957
|
size: "sm",
|
|
949
958
|
class: "cursor-pointer",
|
|
950
|
-
"onUpdate:checked": (e) =>
|
|
959
|
+
"onUpdate:checked": (e) => vt(n)
|
|
951
960
|
}, null, 8, ["checked", "onUpdate:checked"])], 4)) : g("", !0),
|
|
952
961
|
(w(!0), _(p, null, T(U.value, (t, a) => de((w(), _("td", {
|
|
953
962
|
key: t.id,
|
|
954
|
-
class: S(
|
|
963
|
+
class: S(Pt(t)),
|
|
955
964
|
style: C({
|
|
956
965
|
position: t.fixed ? "sticky" : void 0,
|
|
957
966
|
left: t.fixed === "left" ? `${B(t, "left")}px` : void 0,
|
|
@@ -980,7 +989,7 @@ var Se = I([
|
|
|
980
989
|
key: 1,
|
|
981
990
|
row: n,
|
|
982
991
|
value: O(c)(n, t)
|
|
983
|
-
}, () => [t.cell ? (w(), h(O(
|
|
992
|
+
}, () => [t.cell ? (w(), h(O(Nt), {
|
|
984
993
|
key: 0,
|
|
985
994
|
"cell-fn": t.cell,
|
|
986
995
|
row: n,
|
|
@@ -999,19 +1008,19 @@ var Se = I([
|
|
|
999
1008
|
index: r
|
|
1000
1009
|
})], 8, nt)])) : g("", !0)], 64))), 128)) : (w(), _("tr", rt, [v("td", {
|
|
1001
1010
|
colspan: U.value.length + +!!t.selectable + +!!t.expandable,
|
|
1002
|
-
class: S(
|
|
1011
|
+
class: S(Ot.value),
|
|
1003
1012
|
role: "gridcell"
|
|
1004
1013
|
}, [E(e.$slots, "empty", {}, () => [v("span", at, [b(O(ve), { class: "w-6 h-6" })]), v("p", ot, D(t.emptyMessage || O(f)("dataTable.noData")), 1)])], 10, it)]))])]))]),
|
|
1005
1014
|
t.paginated ? (w(), _("nav", {
|
|
1006
1015
|
key: 1,
|
|
1007
|
-
class: S(
|
|
1016
|
+
class: S(kt.value),
|
|
1008
1017
|
"aria-label": O(f)("dataTable.pagination")
|
|
1009
1018
|
}, [v("div", ct, [v("span", lt, D(O(f)("dataTable.pageInfo", {
|
|
1010
1019
|
current: O(K).currentPage.value,
|
|
1011
1020
|
total: O(K).totalPages.value
|
|
1012
1021
|
})), 1), b(O(be), {
|
|
1013
1022
|
"model-value": String(O(K).currentPageSize.value),
|
|
1014
|
-
"onUpdate:modelValue": n[
|
|
1023
|
+
"onUpdate:modelValue": n[1] ||= (e) => bt(Number(e))
|
|
1015
1024
|
}, {
|
|
1016
1025
|
default: A(() => [b(te, {
|
|
1017
1026
|
size: "sm",
|
|
@@ -1037,7 +1046,7 @@ var Se = I([
|
|
|
1037
1046
|
size: "icon",
|
|
1038
1047
|
disabled: O(K).currentPage.value === 1,
|
|
1039
1048
|
"aria-label": O(f)("dataTable.firstPage"),
|
|
1040
|
-
onClick: n[
|
|
1049
|
+
onClick: n[2] ||= (e) => Z(1)
|
|
1041
1050
|
}, {
|
|
1042
1051
|
default: A(() => [b(O(ge), { class: "w-4 h-4" })]),
|
|
1043
1052
|
_: 1
|
|
@@ -1047,7 +1056,7 @@ var Se = I([
|
|
|
1047
1056
|
size: "icon",
|
|
1048
1057
|
disabled: O(K).currentPage.value === 1,
|
|
1049
1058
|
"aria-label": O(f)("dataTable.previousPage"),
|
|
1050
|
-
onClick: n[
|
|
1059
|
+
onClick: n[3] ||= (e) => Z(O(K).currentPage.value - 1)
|
|
1051
1060
|
}, {
|
|
1052
1061
|
default: A(() => [b(O(he), { class: "w-4 h-4" })]),
|
|
1053
1062
|
_: 1
|
|
@@ -1057,7 +1066,7 @@ var Se = I([
|
|
|
1057
1066
|
size: "icon",
|
|
1058
1067
|
disabled: O(K).currentPage.value === O(K).totalPages.value,
|
|
1059
1068
|
"aria-label": O(f)("dataTable.nextPage"),
|
|
1060
|
-
onClick: n[
|
|
1069
|
+
onClick: n[4] ||= (e) => Z(O(K).currentPage.value + 1)
|
|
1061
1070
|
}, {
|
|
1062
1071
|
default: A(() => [b(O(P), { class: "w-4 h-4" })]),
|
|
1063
1072
|
_: 1
|
|
@@ -1067,7 +1076,7 @@ var Se = I([
|
|
|
1067
1076
|
size: "icon",
|
|
1068
1077
|
disabled: O(K).currentPage.value === O(K).totalPages.value,
|
|
1069
1078
|
"aria-label": O(f)("dataTable.lastPage"),
|
|
1070
|
-
onClick: n[
|
|
1079
|
+
onClick: n[5] ||= (e) => Z(O(K).totalPages.value)
|
|
1071
1080
|
}, {
|
|
1072
1081
|
default: A(() => [b(O(_e), { class: "w-4 h-4" })]),
|
|
1073
1082
|
_: 1
|
|
@@ -1075,7 +1084,7 @@ var Se = I([
|
|
|
1075
1084
|
])], 10, st)) : g("", !0),
|
|
1076
1085
|
t.loading ? (w(), _("div", {
|
|
1077
1086
|
key: 2,
|
|
1078
|
-
class: S(
|
|
1087
|
+
class: S(At.value)
|
|
1079
1088
|
}, [E(e.$slots, "loading", {}, () => [v("span", dt, [b(O(ye), { class: "w-8 h-8 animate-spin text-brutal-primary" })])])], 2)) : g("", !0),
|
|
1080
1089
|
t.selectable && O(J).selectedRows.value.size > 0 ? (w(), _("div", ft, D(O(f)("dataTable.selectedRows", { count: O(J).selectedRows.value.size })), 1)) : g("", !0),
|
|
1081
1090
|
E(e.$slots, "footer")
|
|
@@ -3,7 +3,7 @@ import { t } from "./icon-size-variants-Cp9lYoRk.js";
|
|
|
3
3
|
import { useLocale as ee } from "../composables/useLocale.js";
|
|
4
4
|
import { t as n } from "./Button-BqrvVG21.js";
|
|
5
5
|
import { t as r } from "./Label-XrK3v0Wx.js";
|
|
6
|
-
import { t as i } from "./Input-
|
|
6
|
+
import { t as i } from "./Input-GuHL4o2p.js";
|
|
7
7
|
import { t as a } from "./Card-01h9lLdf.js";
|
|
8
8
|
import { t as o } from "./Result-C07B_QVp.js";
|
|
9
9
|
import { t as s } from "./Textarea-DENERz-d.js";
|