@bridge-ui/vue 0.8.0 → 0.9.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/ai/skills/bridge-ui-components/SKILL.md +2 -1
- package/dist/Components/Accordion/composables/useAccordion.d.ts +1 -1
- package/dist/Components/ActionFooter/ActionFooter.js +5 -0
- package/dist/Components/ActionFooter/ActionFooter.vue.d.ts +10 -0
- package/dist/Components/ActionFooter/ActionFooter.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/Components/ActionFooter/actionFooter.types.d.ts +107 -0
- package/dist/Components/ActionFooter/composables/useActionFooter.d.ts +35 -0
- package/dist/Components/ActionFooter/composables/useActionFooter.js +53 -0
- package/dist/Components/ActionFooter/index.d.ts +3 -0
- package/dist/Components/ActionFooter/index.js +3 -0
- package/dist/Components/Alert/composables/useAlert.d.ts +1 -1
- package/dist/Components/Autocomplete/Autocomplete.vue.d.ts +2 -2
- package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Autocomplete/autocomplete.types.d.ts +1 -1
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +3 -3
- package/dist/Components/Autocomplete/composables/useAutocomplete.js +1 -1
- package/dist/Components/Badge/composables/useBadge.d.ts +1 -1
- package/dist/Components/BreadcrumbItem/composables/useBreadcrumbItem.d.ts +3 -3
- package/dist/Components/Button/composables/useButton.d.ts +2 -2
- package/dist/Components/ButtonGroup/composables/useButtonGroup.d.ts +1 -1
- package/dist/Components/Calendar/composables/useCalendar.d.ts +1 -1
- package/dist/Components/CalendarDate/composables/useCalendarDate.d.ts +1 -1
- package/dist/Components/CalendarMonth/composables/useCalendarMonth.d.ts +1 -1
- package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +1 -1
- package/dist/Components/CalendarYear/composables/useCalendarYear.d.ts +1 -1
- package/dist/Components/Card/composables/useCard.d.ts +1 -1
- package/dist/Components/Chip/Chip.vue.d.ts +1 -1
- package/dist/Components/Chip/composables/useChip.d.ts +1 -1
- package/dist/Components/ColorField/ColorField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/ColorField/colorField.types.d.ts +1 -1
- package/dist/Components/ColorField/composables/useColorField.d.ts +2 -2
- package/dist/Components/ColorField/composables/useColorField.js +1 -1
- package/dist/Components/ColorPicker/ColorPicker.vue_vue_type_script_setup_true_lang.js +41 -40
- package/dist/Components/ColorPicker/composables/useColorPicker.d.ts +1 -3
- package/dist/Components/ColorPicker/composables/useColorPicker.js +0 -2
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +8 -0
- package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DataTable/composables/useDataTable.d.ts +1 -1
- package/dist/Components/DataTable/composables/useDataTable.js +86 -86
- package/dist/Components/DataTable/composables/useDataTablePagination.d.ts +1 -1
- package/dist/Components/DataTable/dataTable.types.d.ts +22 -4
- package/dist/Components/DateField/DateField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DateField/composables/useDateField.d.ts +2 -2
- package/dist/Components/DateField/composables/useDateField.js +1 -1
- package/dist/Components/DateField/dateField.types.d.ts +1 -1
- package/dist/Components/DatePicker/DatePicker.vue_vue_type_script_setup_true_lang.js +18 -17
- package/dist/Components/DatePicker/composables/useDatePicker.d.ts +1 -3
- package/dist/Components/DatePicker/composables/useDatePicker.js +45 -48
- package/dist/Components/DateRangeField/DateRangeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +2 -2
- package/dist/Components/DateRangeField/composables/useDateRangeField.js +1 -1
- package/dist/Components/DateRangeField/dateRangeField.types.d.ts +1 -1
- package/dist/Components/DateRangePicker/DateRangePicker.vue_vue_type_script_setup_true_lang.js +18 -17
- package/dist/Components/DateRangePicker/composables/useDateRangePicker.d.ts +1 -3
- package/dist/Components/DateRangePicker/composables/useDateRangePicker.js +45 -48
- package/dist/Components/DateTimeField/DateTimeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +2 -2
- package/dist/Components/DateTimeField/composables/useDateTimeField.js +1 -1
- package/dist/Components/DateTimeField/dateTimeField.types.d.ts +1 -1
- package/dist/Components/DateTimePicker/DateTimePicker.vue_vue_type_script_setup_true_lang.js +25 -24
- package/dist/Components/DateTimePicker/composables/useDateTimePicker.d.ts +1 -3
- package/dist/Components/DateTimePicker/composables/useDateTimePicker.js +75 -78
- package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +2 -2
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.js +1 -1
- package/dist/Components/DateTimeRangeField/dateTimeRangeField.types.d.ts +1 -1
- package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +29 -28
- package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.d.ts +1 -3
- package/dist/Components/DateTimeRangePicker/composables/useDateTimeRangePicker.js +84 -87
- package/dist/Components/Drawer/composables/useDrawer.js +75 -72
- package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
- package/dist/Components/ListItem/ListItem.vue.d.ts +1 -1
- package/dist/Components/ListItem/composables/useListItem.d.ts +1 -1
- package/dist/Components/Listbox/Listbox.vue.d.ts +3 -3
- package/dist/Components/Listbox/Listbox.vue_vue_type_script_setup_true_lang.js +69 -71
- package/dist/Components/Listbox/composables/useListbox.d.ts +0 -2
- package/dist/Components/Listbox/composables/useListbox.js +63 -66
- package/dist/Components/Menu/composables/useMenu.js +125 -121
- package/dist/Components/Modal/composables/useModal.js +117 -114
- package/dist/Components/NumberField/composables/useNumberField.d.ts +2 -2
- package/dist/Components/Pagination/composables/usePagination.d.ts +1 -1
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +2 -2
- package/dist/Components/Select/Select.vue.d.ts +2 -2
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/Select/composables/useSelect.d.ts +3 -3
- package/dist/Components/Select/composables/useSelect.js +1 -1
- package/dist/Components/Select/select.types.d.ts +1 -1
- package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
- package/dist/Components/Snackbar/Snackbar.vue_vue_type_script_setup_true_lang.js +31 -28
- package/dist/Components/Snackbar/composables/useSnackbar.d.ts +2 -1
- package/dist/Components/Snackbar/composables/useSnackbar.js +135 -128
- package/dist/Components/Step/composables/useStep.d.ts +1 -1
- package/dist/Components/TextField/composables/useTextField.d.ts +2 -2
- package/dist/Components/Textarea/composables/useTextarea.d.ts +2 -2
- package/dist/Components/TimeField/TimeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/TimeField/composables/useTimeField.d.ts +2 -2
- package/dist/Components/TimeField/composables/useTimeField.js +1 -1
- package/dist/Components/TimeField/timeField.types.d.ts +1 -1
- package/dist/Components/TimePanel/composables/useTimePanel.d.ts +1 -1
- package/dist/Components/TimePicker/TimePicker.vue_vue_type_script_setup_true_lang.js +38 -37
- package/dist/Components/TimePicker/composables/useTimePicker.d.ts +1 -3
- package/dist/Components/TimePicker/composables/useTimePicker.js +54 -57
- package/dist/Components/TimeRangeField/TimeRangeField.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +2 -2
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.js +1 -1
- package/dist/Components/TimeRangeField/timeRangeField.types.d.ts +1 -1
- package/dist/Components/TimeRangePicker/TimeRangePicker.vue_vue_type_script_setup_true_lang.js +61 -60
- package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.d.ts +1 -3
- package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.js +41 -43
- package/dist/Components/ToggleGroup/composables/useToggleGroup.d.ts +1 -1
- package/dist/Components/Tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/Components/Tooltip/composables/useTooltip.d.ts +1 -1
- package/dist/Components/Tooltip/composables/useTooltip.js +6 -1
- package/dist/augments.d.ts +5 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +162 -160
- package/docs/README.md +1 -0
- package/docs/components/ActionFooter.md +85 -0
- package/docs/components/Autocomplete.md +2 -2
- package/docs/components/BridgeUIProvider.md +17 -1
- package/docs/components/ColorField.md +1 -1
- package/docs/components/ColorPicker.md +1 -1
- package/docs/components/DataTable.md +16 -4
- package/docs/components/DateField.md +1 -1
- package/docs/components/DatePicker.md +1 -1
- package/docs/components/DateRangeField.md +1 -1
- package/docs/components/DateRangePicker.md +1 -1
- package/docs/components/DateTimeField.md +1 -1
- package/docs/components/DateTimePicker.md +1 -1
- package/docs/components/DateTimeRangeField.md +1 -1
- package/docs/components/DateTimeRangePicker.md +1 -1
- package/docs/components/Select.md +2 -2
- package/docs/components/TimeField.md +1 -1
- package/docs/components/TimePicker.md +1 -1
- package/docs/components/TimeRangeField.md +1 -1
- package/docs/components/TimeRangePicker.md +1 -1
- package/package.json +2 -2
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import e from "../
|
|
1
|
+
import e from "../ActionFooter/ActionFooter.js";
|
|
2
2
|
import { useColorPicker as t } from "./composables/useColorPicker.js";
|
|
3
|
-
import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a,
|
|
4
|
-
import { cn as
|
|
3
|
+
import { Fragment as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, guardReactiveProps as c, mergeProps as l, normalizeClass as u, normalizeProps as d, normalizeStyle as f, openBlock as p, renderList as m, renderSlot as h, toDisplayString as g, unref as _ } from "vue";
|
|
4
|
+
import { cn as v } from "@bridge-ui/core/Utils";
|
|
5
5
|
//#region src/Components/ColorPicker/ColorPicker.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var y = { class: "min-w-0 truncate text-sm text-dark-700 dark:text-dark-100" }, b = [
|
|
7
7
|
"aria-label",
|
|
8
8
|
"onClick",
|
|
9
9
|
"aria-pressed",
|
|
10
10
|
"disabled"
|
|
11
|
-
],
|
|
11
|
+
], x = /*@__PURE__*/ s({
|
|
12
12
|
inheritAttrs: !1,
|
|
13
13
|
__name: "ColorPicker",
|
|
14
14
|
props: {
|
|
@@ -33,59 +33,60 @@ var x = { class: "min-w-0 truncate text-sm text-dark-700 dark:text-dark-100" },
|
|
|
33
33
|
"cancel",
|
|
34
34
|
"change"
|
|
35
35
|
],
|
|
36
|
-
setup(
|
|
37
|
-
let { merged:
|
|
36
|
+
setup(s, { emit: x }) {
|
|
37
|
+
let { merged: S, hueBind: C, rootBind: w, areaBind: T, alphaBind: E, showAlpha: D, swatchCss: O, footerBind: k, showFooter: A, previewBind: j, contentBind: M, handleApply: N, swatchesBind: P, handleCancel: F, hueThumbBind: I, areaThumbBind: L, alphaFillBind: R, formattedValue: z, alphaThumbBind: B, presetSwatches: V, applyButtonProps: H, isSwatchSelected: U, previewSwatchBind: W, handleSwatchClick: G, swatchButtonClass: K, cancelButtonProps: q, swatchSelectedClass: J, previewSwatchFillBind: Y } = t(s, {
|
|
38
38
|
rounded: "md",
|
|
39
39
|
format: "hex"
|
|
40
|
-
},
|
|
41
|
-
return (t,
|
|
42
|
-
a("div",
|
|
43
|
-
|
|
40
|
+
}, x);
|
|
41
|
+
return (t, s) => (p(), i("div", d(c(_(w))), [a("div", { class: u(_(M)) }, [
|
|
42
|
+
a("div", d(c(_(T))), [
|
|
43
|
+
s[0] ||= a("span", {
|
|
44
44
|
"aria-hidden": "",
|
|
45
45
|
class: "pointer-events-none absolute inset-0",
|
|
46
46
|
style: { backgroundImage: "linear-gradient(to right, #fff, transparent)" }
|
|
47
47
|
}, null, -1),
|
|
48
|
-
|
|
48
|
+
s[1] ||= a("span", {
|
|
49
49
|
"aria-hidden": "",
|
|
50
50
|
class: "pointer-events-none absolute inset-0",
|
|
51
51
|
style: { backgroundImage: "linear-gradient(to top, #000, transparent)" }
|
|
52
52
|
}, null, -1),
|
|
53
|
-
a("span",
|
|
53
|
+
a("span", d(c(_(L))), null, 16)
|
|
54
54
|
], 16),
|
|
55
|
-
a("div",
|
|
56
|
-
|
|
57
|
-
a("div",
|
|
58
|
-
|
|
55
|
+
a("div", d(c(_(C))), [a("span", d(c(_(I))), null, 16)], 16),
|
|
56
|
+
_(D) ? (p(), i("div", d(l({ key: 0 }, _(E))), [a("span", d(c(_(R))), null, 16), a("span", d(c(_(B))), null, 16)], 16)) : r("", !0),
|
|
57
|
+
a("div", d(c(_(j))), [a("span", d(c(_(W))), [a("span", d(c(_(Y))), null, 16)], 16), a("span", y, g(_(z)), 1)], 16),
|
|
58
|
+
_(V).length > 0 ? (p(), i("div", d(l({ key: 1 }, _(P))), [(p(!0), i(n, null, m(_(V), (e) => (p(), i("button", {
|
|
59
59
|
type: "button",
|
|
60
60
|
key: e,
|
|
61
61
|
"aria-label": e,
|
|
62
|
-
onClick: (t) =>
|
|
63
|
-
"aria-pressed":
|
|
64
|
-
disabled:
|
|
65
|
-
class:
|
|
66
|
-
[
|
|
67
|
-
[
|
|
62
|
+
onClick: (t) => _(G)(e),
|
|
63
|
+
"aria-pressed": _(U)(e),
|
|
64
|
+
disabled: _(S).disabled || _(S).readOnly,
|
|
65
|
+
class: u(_(v)({
|
|
66
|
+
[_(K)]: !0,
|
|
67
|
+
[_(J)]: _(U)(e)
|
|
68
68
|
}))
|
|
69
69
|
}, [a("span", {
|
|
70
70
|
"aria-hidden": "",
|
|
71
71
|
class: "absolute inset-0",
|
|
72
|
-
style:
|
|
73
|
-
}, null, 4)], 10,
|
|
74
|
-
], 2),
|
|
75
|
-
apply:
|
|
76
|
-
cancel:
|
|
77
|
-
}, () => [
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
72
|
+
style: f({ backgroundColor: _(O)(e) })
|
|
73
|
+
}, null, 4)], 10, b))), 128))], 16)) : r("", !0)
|
|
74
|
+
], 2), _(A) ? (p(), i("div", d(l({ key: 0 }, _(k))), [h(t.$slots, "footer", {
|
|
75
|
+
apply: _(N),
|
|
76
|
+
cancel: _(F)
|
|
77
|
+
}, () => [o(_(e), {
|
|
78
|
+
onApply: _(N),
|
|
79
|
+
onCancel: _(F),
|
|
80
|
+
"custom-props": {
|
|
81
|
+
applyButton: _(H),
|
|
82
|
+
cancelButton: _(q)
|
|
83
|
+
}
|
|
84
|
+
}, null, 8, [
|
|
85
|
+
"onApply",
|
|
86
|
+
"onCancel",
|
|
87
|
+
"custom-props"
|
|
88
|
+
])])], 16)) : r("", !0)], 16));
|
|
88
89
|
}
|
|
89
90
|
});
|
|
90
91
|
//#endregion
|
|
91
|
-
export {
|
|
92
|
+
export { x as default };
|
|
@@ -22,7 +22,7 @@ export declare function useColorPicker(props: MaybeRefOrGetter<ColorPickerOwnPro
|
|
|
22
22
|
onPointerdown: (event: PointerEvent) => void;
|
|
23
23
|
onPointermove: (event: PointerEvent) => void;
|
|
24
24
|
}>>;
|
|
25
|
-
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<ColorPickerOwnProps, "fill" | "format" | "value" | "classes" | "showFooter" | "customProps" | "
|
|
25
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<ColorPickerOwnProps, "fill" | "format" | "value" | "classes" | "showFooter" | "customProps" | "disabled" | "rounded" | "alpha" | "defaultValue" | "readOnly" | "swatches">>>>;
|
|
26
26
|
areaBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {
|
|
27
27
|
role: string;
|
|
28
28
|
onKeydown: (event: KeyboardEvent) => void;
|
|
@@ -101,8 +101,6 @@ export declare function useColorPicker(props: MaybeRefOrGetter<ColorPickerOwnPro
|
|
|
101
101
|
backgroundColor: string;
|
|
102
102
|
};
|
|
103
103
|
}>;
|
|
104
|
-
applyLabel: import('vue').ComputedRef<string>;
|
|
105
|
-
cancelLabel: import('vue').ComputedRef<string>;
|
|
106
104
|
applyButtonProps: import('vue').ComputedRef<Partial<import('../../Button').ButtonProps> | undefined>;
|
|
107
105
|
cancelButtonProps: import('vue').ComputedRef<Partial<import('../../Button').ButtonProps> | undefined>;
|
|
108
106
|
isSwatchSelected: (value: string) => boolean;
|
|
@@ -238,8 +238,6 @@ function w(f, w, T) {
|
|
|
238
238
|
})),
|
|
239
239
|
swatchSelectedClass: a(() => "ring-2 ring-dark-500 ring-offset-2 ring-offset-white dark:ring-dark-400 dark:ring-offset-dark-900"),
|
|
240
240
|
previewSwatchFillBind: De,
|
|
241
|
-
applyLabel: a(() => D("Apply")),
|
|
242
|
-
cancelLabel: a(() => D("Cancel")),
|
|
243
241
|
applyButtonProps: a(() => j.value?.applyButton),
|
|
244
242
|
cancelButtonProps: a(() => j.value?.cancelButton),
|
|
245
243
|
isSwatchSelected: (e) => p(e, H.value),
|
|
@@ -70,6 +70,14 @@ var _e = { class: "min-w-0 flex-1" }, ve = { class: "flex shrink-0 items-center
|
|
|
70
70
|
rounded: {},
|
|
71
71
|
rows: {},
|
|
72
72
|
selectionMode: {},
|
|
73
|
+
showColumnVisibility: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: !1
|
|
76
|
+
},
|
|
77
|
+
showSearch: {
|
|
78
|
+
type: Boolean,
|
|
79
|
+
default: !1
|
|
80
|
+
},
|
|
73
81
|
size: {},
|
|
74
82
|
stickyHeader: {
|
|
75
83
|
type: [String, Boolean],
|
package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -66,7 +66,7 @@ var O = { class: "relative z-2 inline-flex items-center leading-none" }, k = ["a
|
|
|
66
66
|
"aria-label": y(H)("Filter column"),
|
|
67
67
|
class: h(y(D)({
|
|
68
68
|
"inline-flex size-6 shrink-0 cursor-pointer items-center justify-center rounded-sm leading-none hover:bg-dark-500/10 dark:hover:bg-dark-500/15": !0,
|
|
69
|
-
"
|
|
69
|
+
"bg-dark-500/10 dark:bg-dark-500/15": m.active
|
|
70
70
|
}))
|
|
71
71
|
}, [p(y(n), {
|
|
72
72
|
size: "sm",
|
|
@@ -73,7 +73,7 @@ export declare function useDataTable<T>(props: DataTableOwnProps<T>, libDefaults
|
|
|
73
73
|
rowViews: import('vue').ComputedRef<DataTableRowView<T>[]>;
|
|
74
74
|
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
75
75
|
class: string;
|
|
76
|
-
}, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<DataTableProps<T>, "search" | "columns" | "size" | "classes" | "customProps" | "full" | "
|
|
76
|
+
}, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<DataTableProps<T>, "search" | "columns" | "size" | "classes" | "customProps" | "full" | "loading" | "rounded" | "variant" | "page" | "rows" | "filters" | "expanded" | "hoverable" | "stickyHeader" | "striped" | "columnSearch" | "columnsOverlay" | "columnsShowFooter" | "filterOverlay" | "getRowId" | "hiddenColumns" | "loadingVariant" | "pageCount" | "perPage" | "perPageOptions" | "selection" | "selectionMode" | "showColumnVisibility" | "showSearch" | "sorting" | "totalCount">>>>;
|
|
77
77
|
emptyBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
78
78
|
class: string;
|
|
79
79
|
}, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
@@ -1,58 +1,58 @@
|
|
|
1
1
|
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
2
|
import { computed as r, getCurrentInstance as i, onBeforeUnmount as a, ref as ee, useAttrs as te, useSlots as ne } from "vue";
|
|
3
3
|
import { compact as re, fromPairs as ie, get as o, head as s, isArray as ae, isEmpty as oe, isFunction as c, isNil as se, isString as ce, keyBy as le, map as l, omit as ue } from "es-toolkit/compat";
|
|
4
|
-
import { DATATABLE_EXPAND_COLUMN_ID as u, DATATABLE_SELECTION_COLUMN_ID as d, getDataTableAriaSort as de, getDataTableColumnAccessor as
|
|
5
|
-
import { tableVariantProps as
|
|
6
|
-
import { cn as
|
|
7
|
-
import { getCoreRowModel as
|
|
4
|
+
import { DATATABLE_EXPAND_COLUMN_ID as u, DATATABLE_SELECTION_COLUMN_ID as d, getDataTableAriaSort as de, getDataTableColumnAccessor as fe, getDataTableColumnCssWidth as pe, getDataTableColumnFilterValues as me, getDataTableColumnSearch as he, getDataTableDefaultCellContent as ge, getDataTableFooterLayout as _e, getDataTablePerPageSelectOptions as ve, getDataTableResolvedPageCount as ye, getDataTableResolvedPerPage as be, getDataTableSelectAllState as xe, getDataTableSelectionTotal as Se, getDataTableSortIcon as Ce, getDataTableStickyInsets as we, getDataTableStickyPing as Te, isDataTableClientPaged as Ee, isDataTableColumnFilterable as De, isDataTableColumnFiltered as Oe, isDataTableColumnSearchable as ke, isDataTableColumnSearched as Ae, isDataTableExpandEnabled as je, isDataTablePerPageEnabled as Me, isDataTableSearchEnabled as Ne, isDataTableSelectionEnabled as Pe, isDataTableSelectionMultiple as Fe, isDataTableServerPaged as Ie, isDataTableStickyHeader as Le, isDataTableStickyHeaderBoxed as Re, isDataTableVisibilityEnabled as ze, observeDataTablePaginationInline as Be, resolveDataTableRowId as Ve, rowMatchesDataTableColumnSearch as He, rowMatchesDataTableToolbarSearch as Ue, rowSelectionToIds as We, selectionToRowSelection as Ge, setDataTableColumnFilter as Ke, setDataTableColumnSearch as qe, setDataTableRowSelection as Je, sliceDataTablePage as Ye, toggleDataTableColumnVisibility as Xe, toggleDataTablePageSelection as Ze, toggleDataTableRowExpansion as Qe, toggleDataTableSorting as $e } from "@bridge-ui/core/Domain";
|
|
5
|
+
import { tableVariantProps as et } from "@bridge-ui/core/Tokens";
|
|
6
|
+
import { cn as f, mergeBridgeUILayeredClasses as tt, splitComponentProps as nt } from "@bridge-ui/core/Utils";
|
|
7
|
+
import { getCoreRowModel as p, getFilteredRowModel as m, getSortedRowModel as h, useVueTable as rt } from "@tanstack/vue-table";
|
|
8
8
|
//#region src/Components/DataTable/composables/useDataTable.ts
|
|
9
|
-
var
|
|
9
|
+
var it = /* @__PURE__ */ "full.page.rows.size.search.classes.columns.filters.loading.perPage.rounded.sorting.striped.variant.expanded.getRowId.hoverable.pageCount.selection.showSearch.totalCount.customProps.columnSearch.stickyHeader.filterOverlay.hiddenColumns.selectionMode.columnsOverlay.loadingVariant.perPageOptions.columnsShowFooter.showColumnVisibility".split("."), at = {
|
|
10
10
|
enableHiding: !1,
|
|
11
11
|
enableSorting: !1,
|
|
12
12
|
cell: () => null,
|
|
13
13
|
header: () => null
|
|
14
|
-
},
|
|
15
|
-
function
|
|
16
|
-
let
|
|
17
|
-
bridgeKeys:
|
|
14
|
+
}, ot = [], st = [], ct = [], lt = p(), ut = h(), dt = m();
|
|
15
|
+
function g(p, m, h) {
|
|
16
|
+
let g = te(), _ = ne(), v = i(), y = r(() => nt({
|
|
17
|
+
bridgeKeys: it,
|
|
18
18
|
props: {
|
|
19
|
-
...
|
|
20
|
-
...
|
|
21
|
-
page:
|
|
22
|
-
perPage:
|
|
23
|
-
filters:
|
|
24
|
-
sorting:
|
|
25
|
-
expanded:
|
|
26
|
-
selection:
|
|
27
|
-
columnSearch:
|
|
28
|
-
hiddenColumns:
|
|
19
|
+
...g,
|
|
20
|
+
...p,
|
|
21
|
+
page: h.page.value,
|
|
22
|
+
perPage: h.perPage.value,
|
|
23
|
+
filters: h.filters.value,
|
|
24
|
+
sorting: h.sorting.value,
|
|
25
|
+
expanded: h.expanded.value,
|
|
26
|
+
selection: h.selection.value,
|
|
27
|
+
columnSearch: h.columnSearch.value,
|
|
28
|
+
hiddenColumns: h.hiddenColumns.value
|
|
29
29
|
}
|
|
30
30
|
})), { merged: b, components: ft, entry: pt } = t({
|
|
31
|
-
libDefaults:
|
|
31
|
+
libDefaults: m,
|
|
32
32
|
componentName: "DataTable",
|
|
33
33
|
props: () => y.value.componentProps
|
|
34
34
|
}), x = r(() => b.value.customProps), mt = r(() => ue(y.value.inheritedAttrs, ["children"])), S = n({
|
|
35
35
|
entry: pt,
|
|
36
36
|
props: () => y.value.componentProps
|
|
37
|
-
}), ht = r(() => et
|
|
37
|
+
}), ht = r(() => tt(et, o(ft.value, [
|
|
38
38
|
"Table",
|
|
39
39
|
"tokens",
|
|
40
40
|
"variant"
|
|
41
|
-
]))), C = r(() => o(ht.value, b.value.variant)), w = r(() => b.value.columns ??
|
|
42
|
-
id:
|
|
43
|
-
desc:
|
|
44
|
-
}] : []), vt = r(() => l(
|
|
41
|
+
]))), C = r(() => o(ht.value, b.value.variant)), w = r(() => b.value.columns ?? st), T = r(() => le(w.value, "id")), gt = r(() => b.value.rows ?? ot), E = r(() => Pe(h.selection.value, g["onUpdate:selection"] !== void 0)), _t = r(() => je(h.expanded.value, g["onUpdate:expanded"] !== void 0, _.expanded !== void 0)), D = r(() => ze(h.hiddenColumns.value, g["onUpdate:hiddenColumns"] !== void 0, b.value.showColumnVisibility)), O = r(() => Fe(b.value.selectionMode)), k = r(() => Ie(h.page.value, b.value.pageCount, b.value.totalCount)), A = r(() => Ee(h.page.value, h.perPage.value, b.value.pageCount, b.value.totalCount)), j = r(() => be(h.perPage.value)), M = r(() => Le(b.value.stickyHeader)), N = r(() => Re(b.value.stickyHeader)), P = r(() => h.sorting.value ? [{
|
|
42
|
+
id: h.sorting.value.id,
|
|
43
|
+
desc: h.sorting.value.desc
|
|
44
|
+
}] : []), vt = r(() => l(h.filters.value ?? {}, (e, t) => ({
|
|
45
45
|
id: t,
|
|
46
46
|
value: e
|
|
47
|
-
}))), F = r(() =>
|
|
47
|
+
}))), F = r(() => Ge(h.selection.value)), I = r(() => h.hiddenColumns.value ?? ct), yt = r(() => ie(I.value.map((e) => [e, !1]))), bt = r(() => {
|
|
48
48
|
let e = w.value.map((e) => ({
|
|
49
49
|
id: e.id,
|
|
50
50
|
enableSorting: e.sortable === !0,
|
|
51
51
|
enableHiding: e.hideable !== !1,
|
|
52
|
-
enableColumnFilter:
|
|
52
|
+
enableColumnFilter: De(e),
|
|
53
53
|
header: () => e.header,
|
|
54
54
|
cell: (t) => e.cell?.(t.row.original) ?? null,
|
|
55
|
-
accessorFn: (t) =>
|
|
55
|
+
accessorFn: (t) => fe(t, e),
|
|
56
56
|
filterFn: (e, t, n) => {
|
|
57
57
|
let r = ae(n) ? n : [];
|
|
58
58
|
return oe(r) ? !0 : r.includes(String(e.getValue(t) ?? ""));
|
|
@@ -60,19 +60,19 @@ function _(m, h, g) {
|
|
|
60
60
|
}));
|
|
61
61
|
return re([
|
|
62
62
|
E.value ? {
|
|
63
|
-
...
|
|
63
|
+
...at,
|
|
64
64
|
id: d
|
|
65
65
|
} : void 0,
|
|
66
66
|
_t.value ? {
|
|
67
|
-
...
|
|
67
|
+
...at,
|
|
68
68
|
id: u
|
|
69
69
|
} : void 0,
|
|
70
70
|
...e
|
|
71
71
|
]);
|
|
72
|
-
}), xt =
|
|
72
|
+
}), xt = rt({
|
|
73
73
|
data: gt,
|
|
74
74
|
enableSortingRemoval: !0,
|
|
75
|
-
getCoreRowModel:
|
|
75
|
+
getCoreRowModel: lt,
|
|
76
76
|
get columns() {
|
|
77
77
|
return bt.value;
|
|
78
78
|
},
|
|
@@ -92,19 +92,19 @@ function _(m, h, g) {
|
|
|
92
92
|
return O.value;
|
|
93
93
|
},
|
|
94
94
|
get getSortedRowModel() {
|
|
95
|
-
return k.value ? void 0 :
|
|
95
|
+
return k.value ? void 0 : ut;
|
|
96
96
|
},
|
|
97
97
|
getRowId: (e, t) => Ve(e, t, b.value.getRowId),
|
|
98
98
|
get getFilteredRowModel() {
|
|
99
|
-
return k.value ? void 0 :
|
|
99
|
+
return k.value ? void 0 : dt;
|
|
100
100
|
},
|
|
101
101
|
onRowSelectionChange: (e) => {
|
|
102
102
|
let t = c(e) ? e(F.value) : e;
|
|
103
|
-
|
|
103
|
+
h.selection.value = We(t);
|
|
104
104
|
},
|
|
105
105
|
onSortingChange: (e) => {
|
|
106
106
|
let t = c(e) ? e(P.value) : e, n = s(t);
|
|
107
|
-
|
|
107
|
+
h.sorting.value = n ? {
|
|
108
108
|
id: n.id,
|
|
109
109
|
desc: n.desc
|
|
110
110
|
} : null;
|
|
@@ -126,9 +126,9 @@ function _(m, h, g) {
|
|
|
126
126
|
}), L = r(() => {
|
|
127
127
|
let e = xt.getRowModel().rows;
|
|
128
128
|
if (k.value) return e;
|
|
129
|
-
let t =
|
|
130
|
-
return e.filter((e) => He(e.original, w.value,
|
|
131
|
-
}), R = r(() => A.value ?
|
|
129
|
+
let t = h.search.value ?? "", n = I.value;
|
|
130
|
+
return e.filter((e) => He(e.original, w.value, h.columnSearch.value, n) ? Ue(e.original, w.value, t, n) : !1);
|
|
131
|
+
}), R = r(() => A.value ? Ye(L.value, h.page.value ?? 1, j.value) : L.value), z = r(() => l(R.value, "id")), St = r(() => xe(z.value, h.selection.value ?? [])), B = r(() => {
|
|
132
132
|
let e = (s(xt.getHeaderGroups())?.headers ?? []).map((e) => {
|
|
133
133
|
let t = o(T.value, e.column.id);
|
|
134
134
|
return {
|
|
@@ -139,9 +139,9 @@ function _(m, h, g) {
|
|
|
139
139
|
isExpand: e.column.id === u,
|
|
140
140
|
isSelection: e.column.id === d
|
|
141
141
|
};
|
|
142
|
-
}), t =
|
|
142
|
+
}), t = we(e, M.value ? 20 : 10);
|
|
143
143
|
return e.map((e) => {
|
|
144
|
-
let n = o(t, e.id), r = e.column?.sortable ? de(
|
|
144
|
+
let n = o(t, e.id), r = e.column?.sortable ? de(h.sorting.value ?? null, e.id) : "none";
|
|
145
145
|
return {
|
|
146
146
|
ariaSort: r,
|
|
147
147
|
id: e.id,
|
|
@@ -156,19 +156,19 @@ function _(m, h, g) {
|
|
|
156
156
|
stickyEdge: n?.edge === !0,
|
|
157
157
|
ellipsis: e.column?.ellipsis === !0,
|
|
158
158
|
sortable: e.column?.sortable === !0,
|
|
159
|
-
sortIcon:
|
|
159
|
+
sortIcon: Ce(r),
|
|
160
160
|
hideable: e.column?.hideable !== !1,
|
|
161
161
|
filterOptions: e.column?.filters ?? [],
|
|
162
|
-
filterable:
|
|
163
|
-
searchable:
|
|
162
|
+
filterable: De(e.column),
|
|
163
|
+
searchable: ke(e.column),
|
|
164
164
|
filterMultiple: e.column?.filterMultiple !== !1,
|
|
165
|
-
searchQuery:
|
|
166
|
-
filterValues:
|
|
167
|
-
filterActive:
|
|
165
|
+
searchQuery: he(h.columnSearch.value, e.id),
|
|
166
|
+
filterValues: me(h.filters.value, e.id),
|
|
167
|
+
filterActive: Oe(h.filters.value, e.id) || Ae(h.columnSearch.value, e.id)
|
|
168
168
|
};
|
|
169
169
|
});
|
|
170
170
|
}), V = r(() => {
|
|
171
|
-
let e =
|
|
171
|
+
let e = we(B.value.map((e) => ({
|
|
172
172
|
id: e.id,
|
|
173
173
|
width: e.width,
|
|
174
174
|
sticky: e.sticky,
|
|
@@ -178,10 +178,10 @@ function _(m, h, g) {
|
|
|
178
178
|
return R.value.map((t) => ({
|
|
179
179
|
id: t.id,
|
|
180
180
|
original: t.original,
|
|
181
|
-
expanded: (
|
|
182
|
-
selected: (
|
|
181
|
+
expanded: (h.expanded.value ?? []).includes(t.id),
|
|
182
|
+
selected: (h.selection.value ?? []).includes(t.id),
|
|
183
183
|
cells: t.getVisibleCells().map((n) => {
|
|
184
|
-
let r = o(T.value, n.column.id), i = o(e, n.column.id), a = r ?
|
|
184
|
+
let r = o(T.value, n.column.id), i = o(e, n.column.id), a = r ? fe(t.original, r) : void 0;
|
|
185
185
|
return {
|
|
186
186
|
tooltip: r?.ellipsis === !0 && !se(a) && a !== "" ? String(a) : void 0,
|
|
187
187
|
value: a,
|
|
@@ -195,22 +195,22 @@ function _(m, h, g) {
|
|
|
195
195
|
ellipsis: r?.ellipsis === !0,
|
|
196
196
|
isExpand: n.column.id === u,
|
|
197
197
|
isSelection: n.column.id === d,
|
|
198
|
-
content: r?.cell ? r.cell(t.original) :
|
|
198
|
+
content: r?.cell ? r.cell(t.original) : ge(a)
|
|
199
199
|
};
|
|
200
200
|
})
|
|
201
201
|
}));
|
|
202
|
-
}), Ct = r(() => B.value.length), H = r(() =>
|
|
203
|
-
perPage:
|
|
202
|
+
}), Ct = r(() => B.value.length), H = r(() => Me(h.perPage.value, v?.vnode.props?.["onUpdate:perPage"] !== void 0, !!_.perPage)), U = r(() => ye({
|
|
203
|
+
perPage: h.perPage.value,
|
|
204
204
|
clientPaged: A.value,
|
|
205
205
|
pageCount: b.value.pageCount,
|
|
206
206
|
totalCount: b.value.totalCount,
|
|
207
207
|
filteredCount: L.value.length
|
|
208
|
-
})), W = r(() => E.value), G = r(() => !!
|
|
208
|
+
})), W = r(() => E.value), G = r(() => !!_.pagination || U.value !== void 0), wt = r(() => W.value || G.value || H.value), Tt = r(() => V.value.length === 0), Et = r(() => e(x.value?.root, mt.value, { class: f({ [N.value ? "" : o(S.value, "root") ?? ""]: !0 }) })), Dt = r(() => B.value.some((e) => !!e.stickyStyle)), K = ee({
|
|
209
209
|
end: !1,
|
|
210
210
|
start: !1
|
|
211
211
|
}), q;
|
|
212
212
|
function J(e) {
|
|
213
|
-
let t = e ?
|
|
213
|
+
let t = e ? Te(e.scrollLeft, e.scrollWidth, e.clientWidth) : {
|
|
214
214
|
end: !1,
|
|
215
215
|
start: !1
|
|
216
216
|
};
|
|
@@ -280,15 +280,15 @@ function _(m, h, g) {
|
|
|
280
280
|
body: o(S.value, "body"),
|
|
281
281
|
cell: o(S.value, "cell"),
|
|
282
282
|
head: o(S.value, "head"),
|
|
283
|
-
header:
|
|
283
|
+
header: f({
|
|
284
284
|
"relative z-40": b.value.loading && b.value.loadingVariant === "bar",
|
|
285
285
|
[o(S.value, "header") ?? ""]: !0
|
|
286
286
|
}),
|
|
287
|
-
table:
|
|
287
|
+
table: f({
|
|
288
288
|
"border-separate border-spacing-0": Dt.value && !M.value,
|
|
289
289
|
[o(S.value, "table") ?? ""]: !0
|
|
290
290
|
}),
|
|
291
|
-
root:
|
|
291
|
+
root: f({
|
|
292
292
|
"overflow-auto": N.value,
|
|
293
293
|
[o(S.value, "wrapper") ?? ""]: !0,
|
|
294
294
|
[N.value ? o(S.value, "root") ?? "" : ""]: !0
|
|
@@ -296,7 +296,7 @@ function _(m, h, g) {
|
|
|
296
296
|
}
|
|
297
297
|
}));
|
|
298
298
|
function Ft(e, t = !1) {
|
|
299
|
-
let n =
|
|
299
|
+
let n = pe(e.width, e.isExpand || e.isSelection), r = t && M.value;
|
|
300
300
|
return {
|
|
301
301
|
...n ? {
|
|
302
302
|
width: n,
|
|
@@ -322,7 +322,7 @@ function _(m, h, g) {
|
|
|
322
322
|
return e(x.value?.head, {}, {
|
|
323
323
|
style: Ft(t, !0),
|
|
324
324
|
"aria-sort": t.sortable ? t.ariaSort : void 0,
|
|
325
|
-
class:
|
|
325
|
+
class: f({
|
|
326
326
|
"min-w-0": !0,
|
|
327
327
|
"border-e-0": n,
|
|
328
328
|
"sticky z-20": !!t.stickyStyle,
|
|
@@ -337,7 +337,7 @@ function _(m, h, g) {
|
|
|
337
337
|
let n = t.isSelection || t.isExpand;
|
|
338
338
|
return e(x.value?.cell, {}, {
|
|
339
339
|
style: Ft(t),
|
|
340
|
-
class:
|
|
340
|
+
class: f({
|
|
341
341
|
"min-w-0": !0,
|
|
342
342
|
"border-e-0": n,
|
|
343
343
|
"after:hidden": n,
|
|
@@ -348,33 +348,33 @@ function _(m, h, g) {
|
|
|
348
348
|
})
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
|
-
let Bt = r(() => e(x.value?.toolbar, {}, { class:
|
|
351
|
+
let Bt = r(() => e(x.value?.toolbar, {}, { class: f({
|
|
352
352
|
"flex items-center justify-between gap-3 pb-3": !0,
|
|
353
353
|
[o(S.value, "toolbar") ?? ""]: !0
|
|
354
|
-
}) })), Vt = r(() => e(x.value?.empty, {}, { class:
|
|
354
|
+
}) })), Vt = r(() => e(x.value?.empty, {}, { class: f({
|
|
355
355
|
"w-full": !0,
|
|
356
356
|
[o(S.value, "empty") ?? ""]: !0
|
|
357
|
-
}) })), Ht = r(() => e(x.value?.loading, {}, { class:
|
|
357
|
+
}) })), Ht = r(() => e(x.value?.loading, {}, { class: f({
|
|
358
358
|
"absolute inset-0 z-30 bg-white/50 dark:bg-dark-900/50": !0,
|
|
359
359
|
"flex items-center justify-center": b.value.loadingVariant !== "bar",
|
|
360
360
|
[o(S.value, "loading") ?? ""]: !0
|
|
361
|
-
}) })), Ut = r(() => e({}, {}, { class:
|
|
361
|
+
}) })), Ut = r(() => e({}, {}, { class: f({ "pointer-events-none absolute inset-x-0 top-0 z-40": !0 }) })), Wt = r(() => e({}, {}, { class: f({ "w-fit min-w-0 max-w-full": b.value.full === !1 }) })), Gt = r(() => e(x.value?.footer, {}, { class: f({
|
|
362
362
|
"w-0 min-w-full": b.value.full === !1,
|
|
363
363
|
"border-t border-dark-200 bg-dark-50 px-3 py-2.5 text-sm text-dark-600 dark:border-dark-700 dark:bg-dark-800 dark:text-dark-300": !0,
|
|
364
364
|
[o(S.value, "footer") ?? ""]: !0
|
|
365
|
-
}) })), $ = r(() =>
|
|
365
|
+
}) })), $ = r(() => _e({
|
|
366
366
|
showPager: G.value,
|
|
367
367
|
showPerPage: H.value,
|
|
368
368
|
inline: X.value,
|
|
369
369
|
showSelected: W.value
|
|
370
|
-
})), Kt = r(() => e(x.value?.selected, {}, { class:
|
|
370
|
+
})), Kt = r(() => e(x.value?.selected, {}, { class: f({
|
|
371
371
|
grow: !$.value.stack,
|
|
372
372
|
"whitespace-nowrap text-sm text-dark-500 dark:text-dark-400": !0,
|
|
373
373
|
[o(S.value, "selected") ?? ""]: !0
|
|
374
374
|
}) })), qt = r(() => e({}, {}, {
|
|
375
375
|
onVnodeMounted: Ot,
|
|
376
376
|
onVnodeUnmounted: kt,
|
|
377
|
-
class:
|
|
377
|
+
class: f({
|
|
378
378
|
"flex items-center gap-3 py-3 [&>*]:shrink-0": !0,
|
|
379
379
|
"flex-col": $.value.stack,
|
|
380
380
|
"flex-row": !$.value.stack,
|
|
@@ -388,49 +388,49 @@ function _(m, h, g) {
|
|
|
388
388
|
})
|
|
389
389
|
}));
|
|
390
390
|
function Jt(e) {
|
|
391
|
-
|
|
391
|
+
h.sorting.value = $e(h.sorting.value ?? null, e);
|
|
392
392
|
}
|
|
393
393
|
function Yt(e, t) {
|
|
394
|
-
|
|
394
|
+
h.selection.value = Je(h.selection.value ?? [], e, t, b.value.selectionMode);
|
|
395
395
|
}
|
|
396
396
|
function Xt(e) {
|
|
397
|
-
|
|
397
|
+
h.perPage.value = e, h.page.value !== 1 && (h.page.value = 1);
|
|
398
398
|
}
|
|
399
399
|
function Zt(e) {
|
|
400
|
-
|
|
400
|
+
h.search.value = e, h.page.value !== 1 && (h.page.value = 1);
|
|
401
401
|
}
|
|
402
402
|
let Qt = r(() => ({
|
|
403
|
-
page:
|
|
403
|
+
page: h.page.value ?? 1,
|
|
404
404
|
count: U.value ?? 1,
|
|
405
405
|
onPageChange: (e) => {
|
|
406
|
-
|
|
406
|
+
h.page.value = e;
|
|
407
407
|
}
|
|
408
408
|
})), $t = r(() => ({
|
|
409
409
|
perPage: j.value,
|
|
410
410
|
onPerPageChange: Xt,
|
|
411
|
-
options:
|
|
411
|
+
options: ve(j.value, b.value.perPageOptions)
|
|
412
412
|
})), en = r(() => ({
|
|
413
|
-
selectedCount: (
|
|
414
|
-
totalCount:
|
|
413
|
+
selectedCount: (h.selection.value ?? []).length,
|
|
414
|
+
totalCount: Se({
|
|
415
415
|
totalCount: b.value.totalCount,
|
|
416
416
|
filteredCount: L.value.length
|
|
417
417
|
})
|
|
418
418
|
}));
|
|
419
419
|
function tn(e) {
|
|
420
|
-
|
|
420
|
+
h.selection.value = Ze(h.selection.value ?? [], z.value, e);
|
|
421
421
|
}
|
|
422
422
|
function nn(e, t, n) {
|
|
423
423
|
let r = o(T.value, e);
|
|
424
|
-
r?.filters && r.filters.length > 0 && (
|
|
424
|
+
r?.filters && r.filters.length > 0 && (h.filters.value = Ke(h.filters.value, e, t)), ke(r) && (h.columnSearch.value = qe(h.columnSearch.value, e, n)), h.page.value !== 1 && (h.page.value = 1);
|
|
425
425
|
}
|
|
426
426
|
function rn(e, t) {
|
|
427
|
-
|
|
427
|
+
h.expanded.value = Qe(h.expanded.value ?? [], e, t);
|
|
428
428
|
}
|
|
429
429
|
function an(e, t) {
|
|
430
|
-
|
|
430
|
+
h.hiddenColumns.value = Xe(h.hiddenColumns.value ?? [], e, t, l(w.value, "id"));
|
|
431
431
|
}
|
|
432
432
|
function on(e) {
|
|
433
|
-
|
|
433
|
+
h.hiddenColumns.value = e;
|
|
434
434
|
}
|
|
435
435
|
let sn = r(() => {
|
|
436
436
|
if (!w.value.some((e) => e.summary !== void 0)) return null;
|
|
@@ -458,7 +458,7 @@ function _(m, h, g) {
|
|
|
458
458
|
hideable: e.hideable !== !1,
|
|
459
459
|
hidden: I.value.includes(e.id),
|
|
460
460
|
label: ce(e.header) ? e.header : e.id
|
|
461
|
-
}))), ln = r(() =>
|
|
461
|
+
}))), ln = r(() => Ne(h.search.value, v?.vnode.props?.["onUpdate:search"] !== void 0, _.search !== void 0, b.value.showSearch));
|
|
462
462
|
return {
|
|
463
463
|
merged: b,
|
|
464
464
|
pageIds: z,
|
|
@@ -481,7 +481,7 @@ function _(m, h, g) {
|
|
|
481
481
|
clientPaged: A,
|
|
482
482
|
serverPaged: k,
|
|
483
483
|
showPerPage: H,
|
|
484
|
-
showToolbar: r(() => !!
|
|
484
|
+
showToolbar: r(() => !!_.toolbar || !!_.toolbarActions || D.value || ln.value),
|
|
485
485
|
selectedBind: Kt,
|
|
486
486
|
showSelected: W,
|
|
487
487
|
getHeadAlign: It,
|
|
@@ -513,4 +513,4 @@ function _(m, h, g) {
|
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
515
|
//#endregion
|
|
516
|
-
export {
|
|
516
|
+
export { g as useDataTable };
|
|
@@ -13,7 +13,7 @@ export declare function useDataTablePagination(props: DataTablePaginationOwnProp
|
|
|
13
13
|
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
14
14
|
"aria-label": string;
|
|
15
15
|
class: string;
|
|
16
|
-
}, "class", import('vue').HTMLAttributes | undefined, Omit<DataTablePaginationProps, "size" | "classes" | "customProps" | "
|
|
16
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<DataTablePaginationProps, "size" | "classes" | "customProps" | "disabled" | "rounded" | "modelValue" | "count">>>;
|
|
17
17
|
listBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
18
18
|
class: string;
|
|
19
19
|
}, "class", import('vue').HTMLAttributes | undefined, {}>>;
|