@vtable-guild/vtable-guild 2.8.0 → 2.9.0-alpha.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/css/presets/antdv.css +20 -0
- package/css/presets/element-plus.css +20 -0
- package/css/style.css +341 -0
- package/css/tailwind3-utilities.css +301 -0
- package/css/tailwind3.css +40 -0
- package/css/tailwind4.css +40 -0
- package/dist/core/src/components/Tooltip.d.ts +1 -1
- package/dist/core/src/components/Tooltip.d.ts.map +1 -1
- package/dist/core/src/components/Tooltip.mjs +49 -46
- package/dist/core/src/components/Tooltip.test.d.ts +2 -0
- package/dist/core/src/components/Tooltip.test.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/VirtualList.d.ts +3 -3
- package/dist/core/src/components/VirtualList/VirtualList.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/VirtualList.mjs +183 -177
- package/dist/core/src/components/VirtualList/hooks/useChildren.d.ts +2 -2
- package/dist/core/src/components/VirtualList/hooks/useChildren.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/hooks/useChildren.mjs +12 -12
- package/dist/core/src/components/VirtualList/hooks/useGetSize.d.ts +1 -1
- package/dist/core/src/components/VirtualList/hooks/useGetSize.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/hooks/useGetSize.mjs +1 -1
- package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts +2 -2
- package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/hooks/useHeights.mjs +36 -36
- package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.mjs +11 -11
- package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.test.d.ts +2 -0
- package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.test.d.ts.map +1 -0
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts +1 -1
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts.map +1 -1
- package/dist/core/src/components/VirtualList/hooks/useScrollTo.mjs +30 -30
- package/dist/core/src/index.d.ts +1 -1
- package/dist/core/src/index.d.ts.map +1 -1
- package/dist/core/src/utils/types.d.ts +39 -1
- package/dist/core/src/utils/types.d.ts.map +1 -1
- package/dist/css/presets/antdv.css +20 -0
- package/dist/css/presets/element-plus.css +20 -0
- package/dist/css/style.css +341 -0
- package/dist/css/tailwind3-utilities.css +301 -0
- package/dist/css/tailwind3.css +40 -0
- package/dist/css/tailwind4.css +40 -0
- package/dist/icons/src/ColumnHeightOutlinedIcon.d.ts +3 -0
- package/dist/icons/src/ColumnHeightOutlinedIcon.d.ts.map +1 -0
- package/dist/icons/src/ColumnHeightOutlinedIcon.mjs +9 -0
- package/dist/icons/src/FullscreenExitOutlinedIcon.d.ts +3 -0
- package/dist/icons/src/FullscreenExitOutlinedIcon.d.ts.map +1 -0
- package/dist/icons/src/FullscreenExitOutlinedIcon.mjs +9 -0
- package/dist/icons/src/FullscreenOutlinedIcon.d.ts +3 -0
- package/dist/icons/src/FullscreenOutlinedIcon.d.ts.map +1 -0
- package/dist/icons/src/FullscreenOutlinedIcon.mjs +9 -0
- package/dist/icons/src/ReloadOutlinedIcon.d.ts +3 -0
- package/dist/icons/src/ReloadOutlinedIcon.d.ts.map +1 -0
- package/dist/icons/src/ReloadOutlinedIcon.mjs +9 -0
- package/dist/icons/src/SettingOutlinedIcon.d.ts +3 -0
- package/dist/icons/src/SettingOutlinedIcon.d.ts.map +1 -0
- package/dist/icons/src/SettingOutlinedIcon.mjs +9 -0
- package/dist/icons/src/index.d.ts +5 -0
- package/dist/icons/src/index.d.ts.map +1 -1
- package/dist/index.d.ts +0 -28
- package/dist/index.full.mjs +6070 -4427
- package/dist/index.mjs +115 -87
- package/dist/table/src/components/FilterDropdown.d.ts +1 -1
- package/dist/table/src/components/Table.d.ts +31 -4
- package/dist/table/src/components/Table.d.ts.map +1 -1
- package/dist/table/src/components/Table.mjs +514 -475
- package/dist/table/src/components/TableBody.d.ts.map +1 -1
- package/dist/table/src/components/TableBody.mjs +37 -36
- package/dist/table/src/components/TableCell.d.ts.map +1 -1
- package/dist/table/src/components/TableCell.mjs +95 -83
- package/dist/table/src/components/TableColumnSettings.d.ts +41 -0
- package/dist/table/src/components/TableColumnSettings.d.ts.map +1 -0
- package/dist/table/src/components/TableColumnSettings.mjs +360 -0
- package/dist/table/src/components/TableColumnSettings.test.d.ts +2 -0
- package/dist/table/src/components/TableColumnSettings.test.d.ts.map +1 -0
- package/dist/table/src/components/TableCopyButton.d.ts +41 -0
- package/dist/table/src/components/TableCopyButton.d.ts.map +1 -0
- package/dist/table/src/components/TableCopyButton.mjs +94 -0
- package/dist/table/src/components/TableEnterprise.test.d.ts +2 -0
- package/dist/table/src/components/TableEnterprise.test.d.ts.map +1 -0
- package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
- package/dist/table/src/components/TableHeaderCell.mjs +284 -241
- package/dist/table/src/components/TableSelectionAlert.d.ts +50 -0
- package/dist/table/src/components/TableSelectionAlert.d.ts.map +1 -0
- package/dist/table/src/components/TableSelectionAlert.mjs +86 -0
- package/dist/table/src/components/TableSelectionAlert.test.d.ts +2 -0
- package/dist/table/src/components/TableSelectionAlert.test.d.ts.map +1 -0
- package/dist/table/src/components/TableToolbar.d.ts +87 -0
- package/dist/table/src/components/TableToolbar.d.ts.map +1 -0
- package/dist/table/src/components/TableToolbar.mjs +265 -0
- package/dist/table/src/components/TableToolbar.test.d.ts +2 -0
- package/dist/table/src/components/TableToolbar.test.d.ts.map +1 -0
- package/dist/table/src/components/VTable.vue.d.ts.map +1 -1
- package/dist/table/src/components/VTable.vue.mjs +24 -15
- package/dist/table/src/components/VTableColumnSettings.vue.d.ts +20 -0
- package/dist/table/src/components/VTableColumnSettings.vue.d.ts.map +1 -0
- package/dist/table/src/components/VTableColumnSettings.vue.mjs +42 -0
- package/dist/table/src/components/VTableColumnSettings.vue2.mjs +4 -0
- package/dist/table/src/components/VTableSelectionAlert.vue.d.ts +19 -0
- package/dist/table/src/components/VTableSelectionAlert.vue.d.ts.map +1 -0
- package/dist/table/src/components/VTableSelectionAlert.vue.mjs +54 -0
- package/dist/table/src/components/VTableSelectionAlert.vue2.mjs +4 -0
- package/dist/table/src/components/VTableSummary.d.ts +15 -75
- package/dist/table/src/components/VTableSummary.d.ts.map +1 -1
- package/dist/table/src/components/VTableSummary.mjs +7 -7
- package/dist/table/src/components/VTableToolbar.vue.d.ts +27 -0
- package/dist/table/src/components/VTableToolbar.vue.d.ts.map +1 -0
- package/dist/table/src/components/VTableToolbar.vue.mjs +108 -0
- package/dist/table/src/components/VTableToolbar.vue2.mjs +4 -0
- package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
- package/dist/table/src/components/VirtualTableBody.mjs +2 -3
- package/dist/table/src/composables/useColumnState.d.ts +32 -0
- package/dist/table/src/composables/useColumnState.d.ts.map +1 -0
- package/dist/table/src/composables/useColumnState.mjs +107 -0
- package/dist/table/src/composables/useColumnState.test.d.ts +2 -0
- package/dist/table/src/composables/useColumnState.test.d.ts.map +1 -0
- package/dist/table/src/composables/useExpand.d.ts.map +1 -1
- package/dist/table/src/composables/useExpand.mjs +28 -30
- package/dist/table/src/composables/useFilter.d.ts.map +1 -1
- package/dist/table/src/composables/useFilter.mjs +28 -25
- package/dist/table/src/composables/usePagination.d.ts +1 -0
- package/dist/table/src/composables/usePagination.d.ts.map +1 -1
- package/dist/table/src/composables/usePagination.mjs +35 -34
- package/dist/table/src/composables/useSelection.d.ts.map +1 -1
- package/dist/table/src/composables/useSelection.mjs +136 -126
- package/dist/table/src/composables/useTableRequest.d.ts +4 -0
- package/dist/table/src/composables/useTableRequest.d.ts.map +1 -0
- package/dist/table/src/composables/useTableRequest.mjs +127 -0
- package/dist/table/src/composables/useTableRequest.test.d.ts +2 -0
- package/dist/table/src/composables/useTableRequest.test.d.ts.map +1 -0
- package/dist/table/src/context.d.ts +9 -2
- package/dist/table/src/context.d.ts.map +1 -1
- package/dist/table/src/index.d.ts +25 -88
- package/dist/table/src/index.d.ts.map +1 -1
- package/dist/table/src/index.mjs +12 -12
- package/dist/table/src/types/column-settings.d.ts +31 -0
- package/dist/table/src/types/column-settings.d.ts.map +1 -0
- package/dist/table/src/types/column-state.typecheck.d.ts +2 -0
- package/dist/table/src/types/column-state.typecheck.d.ts.map +1 -0
- package/dist/table/src/types/column.d.ts +15 -3
- package/dist/table/src/types/column.d.ts.map +1 -1
- package/dist/table/src/types/index.d.ts +2 -0
- package/dist/table/src/types/index.d.ts.map +1 -1
- package/dist/table/src/types/presentation.d.ts +24 -0
- package/dist/table/src/types/presentation.d.ts.map +1 -0
- package/dist/table/src/types/request.d.ts +65 -0
- package/dist/table/src/types/request.d.ts.map +1 -0
- package/dist/table/src/types/request.typecheck.d.ts +13 -0
- package/dist/table/src/types/request.typecheck.d.ts.map +1 -0
- package/dist/table/src/types/selection-alert.d.ts +30 -0
- package/dist/table/src/types/selection-alert.d.ts.map +1 -0
- package/dist/table/src/types/selection-alert.typecheck.d.ts +12 -0
- package/dist/table/src/types/selection-alert.typecheck.d.ts.map +1 -0
- package/dist/table/src/types/table.d.ts +12 -1
- package/dist/table/src/types/table.d.ts.map +1 -1
- package/dist/table/src/types/toolbar.d.ts +58 -0
- package/dist/table/src/types/toolbar.d.ts.map +1 -0
- package/dist/table/src/utils/cell.d.ts +4 -0
- package/dist/table/src/utils/cell.d.ts.map +1 -1
- package/dist/table/src/utils/cell.mjs +49 -45
- package/dist/table/src/utils/columnSettings.d.ts +22 -0
- package/dist/table/src/utils/columnSettings.d.ts.map +1 -0
- package/dist/table/src/utils/columnSettings.mjs +107 -0
- package/dist/table/src/utils/columnSettings.test.d.ts +2 -0
- package/dist/table/src/utils/columnSettings.test.d.ts.map +1 -0
- package/dist/table/src/utils/manual.d.ts +3 -0
- package/dist/table/src/utils/manual.d.ts.map +1 -0
- package/dist/table/src/utils/manual.mjs +6 -0
- package/dist/table/src/utils/valueEnum.d.ts +7 -0
- package/dist/table/src/utils/valueEnum.d.ts.map +1 -0
- package/dist/table/src/utils/valueEnum.mjs +23 -0
- package/dist/theme/src/augment.d.ts +4 -0
- package/dist/theme/src/augment.d.ts.map +1 -1
- package/dist/theme/src/column-settings.d.ts +160 -0
- package/dist/theme/src/column-settings.d.ts.map +1 -0
- package/dist/theme/src/column-settings.mjs +84 -0
- package/dist/theme/src/index.d.ts +12 -0
- package/dist/theme/src/index.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table-locale.d.ts +10 -0
- package/dist/theme/src/presets/antdv/table-locale.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table-locale.mjs +2 -0
- package/dist/theme/src/presets/antdv/table.d.ts +4 -0
- package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
- package/dist/theme/src/presets/antdv/table.mjs +4 -0
- package/dist/theme/src/presets/element-plus/table-locale.d.ts +10 -0
- package/dist/theme/src/presets/element-plus/table-locale.d.ts.map +1 -1
- package/dist/theme/src/presets/element-plus/table-locale.mjs +2 -0
- package/dist/theme/src/presets/element-plus/table.d.ts +4 -0
- package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
- package/dist/theme/src/presets/element-plus/table.mjs +4 -0
- package/dist/theme/src/presets/index.d.ts.map +1 -1
- package/dist/theme/src/presets/index.mjs +100 -67
- package/dist/theme/src/presets/types.d.ts +3 -0
- package/dist/theme/src/presets/types.d.ts.map +1 -1
- package/dist/theme/src/selection-alert.d.ts +54 -0
- package/dist/theme/src/selection-alert.d.ts.map +1 -0
- package/dist/theme/src/selection-alert.mjs +36 -0
- package/dist/theme/src/toolbar.d.ts +105 -0
- package/dist/theme/src/toolbar.d.ts.map +1 -0
- package/dist/theme/src/toolbar.mjs +57 -0
- package/dist/vtable-guild/src/augment.d.ts +18 -0
- package/dist/vtable-guild/src/augment.d.ts.map +1 -0
- package/dist/vtable-guild/src/index.d.ts +1 -0
- package/dist/vtable-guild/src/index.d.ts.map +1 -1
- package/package.json +4 -3
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { defineComponent as i, createBlock as a, openBlock as p, unref as u, mergeProps as m, createSlots as d, withCtx as c, renderSlot as f, normalizeProps as b, guardReactiveProps as g } from "vue";
|
|
2
|
+
import C from "./TableColumnSettings.mjs";
|
|
3
|
+
const P = /* @__PURE__ */ i({
|
|
4
|
+
name: "VTableColumnSettings",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "VTableColumnSettings",
|
|
7
|
+
props: {
|
|
8
|
+
columns: {},
|
|
9
|
+
size: {},
|
|
10
|
+
disabled: { type: Boolean },
|
|
11
|
+
options: {},
|
|
12
|
+
locale: {},
|
|
13
|
+
ui: {},
|
|
14
|
+
class: {},
|
|
15
|
+
getPopupContainer: { type: Function }
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:columns", "update:size", "reset"],
|
|
18
|
+
setup(s, { emit: r }) {
|
|
19
|
+
const l = s, n = r;
|
|
20
|
+
function z(o) {
|
|
21
|
+
return o;
|
|
22
|
+
}
|
|
23
|
+
return (o, e) => (p(), a(u(C), m({ ...o.$attrs, ...l }, {
|
|
24
|
+
"onUpdate:columns": e[0] || (e[0] = (t) => n("update:columns", t)),
|
|
25
|
+
"onUpdate:size": e[1] || (e[1] = (t) => n("update:size", t)),
|
|
26
|
+
onReset: e[2] || (e[2] = (t) => n("reset"))
|
|
27
|
+
}), d({ _: 2 }, [
|
|
28
|
+
o.$slots.columnLabel ? {
|
|
29
|
+
name: "columnLabel",
|
|
30
|
+
fn: c((t) => [
|
|
31
|
+
f(o.$slots, "columnLabel", b(g(
|
|
32
|
+
t
|
|
33
|
+
)))
|
|
34
|
+
]),
|
|
35
|
+
key: "0"
|
|
36
|
+
} : void 0
|
|
37
|
+
]), 1040));
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
export {
|
|
41
|
+
P as default
|
|
42
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Key } from '../types/column';
|
|
2
|
+
import { TableSelectionAlertProps, TableSelectionAlertSlots } from '../types/selection-alert';
|
|
3
|
+
declare const _default: <TRecord extends object = Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
4
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
5
|
+
readonly onClear?: ((selectedRowKeys: readonly Key[], selectedRows: readonly TRecord[]) => any) | undefined;
|
|
6
|
+
readonly "onUpdate:selectedRowKeys"?: ((keys: Key[]) => any) | undefined;
|
|
7
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onClear" | "onUpdate:selectedRowKeys"> & TableSelectionAlertProps<TRecord> & Partial<{}>> & import('vue').PublicProps;
|
|
8
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: Readonly<TableSelectionAlertSlots<TRecord>> & TableSelectionAlertSlots<TRecord>;
|
|
11
|
+
emit: ((evt: "clear", selectedRowKeys: readonly Key[], selectedRows: readonly TRecord[]) => void) & ((evt: "update:selectedRowKeys", keys: Key[]) => void);
|
|
12
|
+
}>) => import('vue').VNode & {
|
|
13
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
14
|
+
};
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_PrettifyLocal<T> = {
|
|
17
|
+
[K in keyof T]: T[K];
|
|
18
|
+
} & {};
|
|
19
|
+
//# sourceMappingURL=VTableSelectionAlert.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VTableSelectionAlert.vue.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/VTableSelectionAlert.vue"],"names":[],"mappings":"AAqDA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AAC1C,OAAO,KAAK,EAAE,wBAAwB,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAA;yBAEjF,OAAO,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAoHO,mBAAmB,CAAC;;;8MAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;EAIP,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA/HzE,wBA+H4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { defineComponent as f, createBlock as m, openBlock as u, unref as y, mergeProps as w, createSlots as R, withCtx as n, renderSlot as s, normalizeProps as a, guardReactiveProps as r } from "vue";
|
|
2
|
+
import B from "./TableSelectionAlert.mjs";
|
|
3
|
+
const $ = /* @__PURE__ */ f({
|
|
4
|
+
name: "VTableSelectionAlert",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "VTableSelectionAlert",
|
|
7
|
+
props: {
|
|
8
|
+
selectedRowKeys: {},
|
|
9
|
+
selectedRows: {},
|
|
10
|
+
alwaysShow: { type: Boolean },
|
|
11
|
+
disabled: { type: Boolean },
|
|
12
|
+
loading: { type: Boolean },
|
|
13
|
+
showClear: { type: Boolean, default: !0 },
|
|
14
|
+
locale: {},
|
|
15
|
+
ui: {},
|
|
16
|
+
class: {}
|
|
17
|
+
},
|
|
18
|
+
emits: ["update:selectedRowKeys", "clear"],
|
|
19
|
+
setup(i, { emit: c }) {
|
|
20
|
+
const p = i, l = c;
|
|
21
|
+
function S(e) {
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
function d(e, t) {
|
|
25
|
+
l("clear", e, t);
|
|
26
|
+
}
|
|
27
|
+
return (e, t) => (u(), m(y(B), w({ ...e.$attrs, ...p }, {
|
|
28
|
+
"onUpdate:selectedRowKeys": t[0] || (t[0] = (o) => l("update:selectedRowKeys", o)),
|
|
29
|
+
onClear: d
|
|
30
|
+
}), R({ _: 2 }, [
|
|
31
|
+
e.$slots.info ? {
|
|
32
|
+
name: "info",
|
|
33
|
+
fn: n((o) => [
|
|
34
|
+
s(e.$slots, "info", a(r(
|
|
35
|
+
o
|
|
36
|
+
)))
|
|
37
|
+
]),
|
|
38
|
+
key: "0"
|
|
39
|
+
} : void 0,
|
|
40
|
+
e.$slots.actions ? {
|
|
41
|
+
name: "actions",
|
|
42
|
+
fn: n((o) => [
|
|
43
|
+
s(e.$slots, "actions", a(r(
|
|
44
|
+
o
|
|
45
|
+
)))
|
|
46
|
+
]),
|
|
47
|
+
key: "1"
|
|
48
|
+
} : void 0
|
|
49
|
+
]), 1040));
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
export {
|
|
53
|
+
$ as default
|
|
54
|
+
};
|
|
@@ -1,85 +1,25 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { default as VTableSummaryRow } from './VTableSummaryRow';
|
|
3
|
+
import { default as VTableSummaryCell } from './VTableSummaryCell';
|
|
2
4
|
export type SummaryFixed = boolean | 'top' | 'bottom';
|
|
3
|
-
declare const
|
|
4
|
-
new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('vue').ExtractPropTypes<{
|
|
5
|
-
fixed: {
|
|
6
|
-
type: PropType<SummaryFixed>;
|
|
7
|
-
default: undefined;
|
|
8
|
-
};
|
|
9
|
-
}>> & Readonly<{}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
10
|
-
[key: string]: any;
|
|
11
|
-
}>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
|
|
12
|
-
fixed: SummaryFixed;
|
|
13
|
-
}, true, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
14
|
-
P: {};
|
|
15
|
-
B: {};
|
|
16
|
-
D: {};
|
|
17
|
-
C: {};
|
|
18
|
-
M: {};
|
|
19
|
-
Defaults: {};
|
|
20
|
-
}, Readonly<import('vue').ExtractPropTypes<{
|
|
21
|
-
fixed: {
|
|
22
|
-
type: PropType<SummaryFixed>;
|
|
23
|
-
default: undefined;
|
|
24
|
-
};
|
|
25
|
-
}>> & Readonly<{}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
26
|
-
[key: string]: any;
|
|
27
|
-
}>[] | undefined, {}, {}, {}, {
|
|
28
|
-
fixed: SummaryFixed;
|
|
29
|
-
}>;
|
|
30
|
-
__isFragment?: never;
|
|
31
|
-
__isTeleport?: never;
|
|
32
|
-
__isSuspense?: never;
|
|
33
|
-
} & import('vue').ComponentOptionsBase<Readonly<import('vue').ExtractPropTypes<{
|
|
5
|
+
declare const VTableSummary: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
34
6
|
fixed: {
|
|
35
7
|
type: PropType<SummaryFixed>;
|
|
36
8
|
default: undefined;
|
|
37
9
|
};
|
|
38
|
-
}
|
|
10
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
39
11
|
[key: string]: any;
|
|
40
|
-
}>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
|
|
12
|
+
}>[] | undefined, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
13
|
+
fixed: {
|
|
14
|
+
type: PropType<SummaryFixed>;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
}>> & Readonly<{}>, {
|
|
41
18
|
fixed: SummaryFixed;
|
|
42
|
-
}, {},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
type: NumberConstructor;
|
|
47
|
-
required: true;
|
|
48
|
-
};
|
|
49
|
-
colSpan: {
|
|
50
|
-
type: NumberConstructor;
|
|
51
|
-
default: number;
|
|
52
|
-
};
|
|
53
|
-
rowSpan: {
|
|
54
|
-
type: NumberConstructor;
|
|
55
|
-
default: undefined;
|
|
56
|
-
};
|
|
57
|
-
align: {
|
|
58
|
-
type: PropType<import('../../../vtable-guild/src/index.ts').AlignType>;
|
|
59
|
-
default: undefined;
|
|
60
|
-
};
|
|
61
|
-
}>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
62
|
-
index: {
|
|
63
|
-
type: NumberConstructor;
|
|
64
|
-
required: true;
|
|
65
|
-
};
|
|
66
|
-
colSpan: {
|
|
67
|
-
type: NumberConstructor;
|
|
68
|
-
default: number;
|
|
69
|
-
};
|
|
70
|
-
rowSpan: {
|
|
71
|
-
type: NumberConstructor;
|
|
72
|
-
default: undefined;
|
|
73
|
-
};
|
|
74
|
-
align: {
|
|
75
|
-
type: PropType<import('../../../vtable-guild/src/index.ts').AlignType>;
|
|
76
|
-
default: undefined;
|
|
77
|
-
};
|
|
78
|
-
}>> & Readonly<{}>, {
|
|
79
|
-
align: import('../../../vtable-guild/src/index.ts').AlignType;
|
|
80
|
-
colSpan: number;
|
|
81
|
-
rowSpan: number;
|
|
82
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
19
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
20
|
+
declare const SummaryWithSubcomponents: typeof VTableSummary & {
|
|
21
|
+
Row: typeof VTableSummaryRow;
|
|
22
|
+
Cell: typeof VTableSummaryCell;
|
|
83
23
|
};
|
|
84
|
-
export default
|
|
24
|
+
export default SummaryWithSubcomponents;
|
|
85
25
|
//# sourceMappingURL=VTableSummary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VTableSummary.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/VTableSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;
|
|
1
|
+
{"version":3,"file":"VTableSummary.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/VTableSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,QAAQ,EAAE,MAAM,KAAK,CAAA;AAEnE,OAAO,gBAAgB,MAAM,oBAAoB,CAAA;AACjD,OAAO,iBAAiB,MAAM,qBAAqB,CAAA;AAEnD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;AAErD,QAAA,MAAM,aAAa;;cAIc,QAAQ,CAAC,YAAY,CAAC;;;;;;;cAAtB,QAAQ,CAAC,YAAY,CAAC;;;;;4EAiBrD,CAAA;AAGF,QAAA,MAAM,wBAAwB,EAAE,OAAO,aAAa,GAAG;IACrD,GAAG,EAAE,OAAO,gBAAgB,CAAA;IAC5B,IAAI,EAAE,OAAO,iBAAiB,CAAA;CAI9B,CAAA;AAEF,eAAe,wBAAwB,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as r, inject as
|
|
2
|
-
import { TABLE_CONTEXT_KEY as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as r, inject as a, watch as n } from "vue";
|
|
2
|
+
import { TABLE_CONTEXT_KEY as i } from "../context.mjs";
|
|
3
|
+
import l from "./VTableSummaryRow.mjs";
|
|
4
4
|
import u from "./VTableSummaryCell.mjs";
|
|
5
5
|
const f = /* @__PURE__ */ r({
|
|
6
6
|
name: "VTableSummary",
|
|
@@ -13,15 +13,15 @@ const f = /* @__PURE__ */ r({
|
|
|
13
13
|
setup(e, {
|
|
14
14
|
slots: t
|
|
15
15
|
}) {
|
|
16
|
-
const m =
|
|
17
|
-
return
|
|
18
|
-
m.registerSummaryFixed?.(
|
|
16
|
+
const m = a(i, {});
|
|
17
|
+
return n(() => e.fixed, (o) => {
|
|
18
|
+
m.registerSummaryFixed?.(o ?? !1);
|
|
19
19
|
}, {
|
|
20
20
|
immediate: !0
|
|
21
21
|
}), () => t.default?.();
|
|
22
22
|
}
|
|
23
23
|
}), b = Object.assign(f, {
|
|
24
|
-
Row:
|
|
24
|
+
Row: l,
|
|
25
25
|
Cell: u
|
|
26
26
|
});
|
|
27
27
|
export {
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ColumnsType } from '../types';
|
|
2
|
+
import { TableColumnSettingsSize } from '../types/column-settings';
|
|
3
|
+
import { TableToolbarProps, TableToolbarSlots } from '../types/toolbar';
|
|
4
|
+
declare const _default: <TRecord extends object = Record<string, unknown>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
5
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
6
|
+
readonly onSearch?: ((value: string) => any) | undefined;
|
|
7
|
+
readonly onReset?: (() => any) | undefined;
|
|
8
|
+
readonly onClearSearch?: (() => any) | undefined;
|
|
9
|
+
readonly onReload?: (() => any) | undefined;
|
|
10
|
+
readonly "onUpdate:columns"?: ((columns: ColumnsType<TRecord>) => any) | undefined;
|
|
11
|
+
readonly "onUpdate:size"?: ((size: TableColumnSettingsSize) => any) | undefined;
|
|
12
|
+
readonly "onUpdate:searchValue"?: ((value: string) => any) | undefined;
|
|
13
|
+
readonly onFullscreenChange?: ((active: boolean) => any) | undefined;
|
|
14
|
+
readonly onFullscreenError?: ((error: unknown) => any) | undefined;
|
|
15
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onReset" | "onUpdate:columns" | "onUpdate:size" | "onReload" | "onSearch" | "onClearSearch" | "onUpdate:searchValue" | "onFullscreenChange" | "onFullscreenError"> & TableToolbarProps<TRecord> & Partial<{}>> & import('vue').PublicProps;
|
|
16
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
|
17
|
+
attrs: any;
|
|
18
|
+
slots: Readonly<TableToolbarSlots<TRecord>> & TableToolbarSlots<TRecord>;
|
|
19
|
+
emit: ((evt: "search", value: string) => void) & ((evt: "reset") => void) & ((evt: "clearSearch") => void) & ((evt: "reload") => void) & ((evt: "update:columns", columns: ColumnsType<TRecord>) => void) & ((evt: "update:size", size: TableColumnSettingsSize) => void) & ((evt: "update:searchValue", value: string) => void) & ((evt: "fullscreenChange", active: boolean) => void) & ((evt: "fullscreenError", error: unknown) => void);
|
|
20
|
+
}>) => import('vue').VNode & {
|
|
21
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
22
|
+
};
|
|
23
|
+
export default _default;
|
|
24
|
+
type __VLS_PrettifyLocal<T> = {
|
|
25
|
+
[K in keyof T]: T[K];
|
|
26
|
+
} & {};
|
|
27
|
+
//# sourceMappingURL=VTableToolbar.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"VTableToolbar.vue.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/VTableToolbar.vue"],"names":[],"mappings":"AAsGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAC3C,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AACvE,OAAO,KAAK,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;yBAE3D,OAAO,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAiOO,mBAAmB,CAAC;;;;;;;;;;mUAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;;EAIP,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA5OzE,wBA4O4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { defineComponent as m, createBlock as d, openBlock as f, unref as $, mergeProps as y, createSlots as b, withCtx as t, renderSlot as n, normalizeProps as r, guardReactiveProps as a } from "vue";
|
|
2
|
+
import g from "./TableToolbar.mjs";
|
|
3
|
+
const S = /* @__PURE__ */ m({
|
|
4
|
+
name: "VTableToolbar",
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "VTableToolbar",
|
|
7
|
+
props: {
|
|
8
|
+
title: { type: [Object, String, Number, Boolean, null, Array] },
|
|
9
|
+
columns: {},
|
|
10
|
+
size: {},
|
|
11
|
+
options: { type: [Boolean, Object], default: void 0 },
|
|
12
|
+
loading: { type: Boolean },
|
|
13
|
+
search: { type: [Boolean, Object] },
|
|
14
|
+
searchValue: {},
|
|
15
|
+
multipleLine: { type: Boolean },
|
|
16
|
+
disabled: { type: Boolean },
|
|
17
|
+
fullscreenTarget: {},
|
|
18
|
+
columnSettings: {},
|
|
19
|
+
locale: {},
|
|
20
|
+
ui: {},
|
|
21
|
+
class: {}
|
|
22
|
+
},
|
|
23
|
+
emits: ["update:columns", "update:size", "reset", "reload", "update:searchValue", "search", "clearSearch", "fullscreenChange", "fullscreenError"],
|
|
24
|
+
setup(i, { emit: u }) {
|
|
25
|
+
const p = i, l = u;
|
|
26
|
+
function v(s) {
|
|
27
|
+
return s;
|
|
28
|
+
}
|
|
29
|
+
return (s, o) => (f(), d($(g), y({ ...s.$attrs, ...p }, {
|
|
30
|
+
"onUpdate:columns": o[0] || (o[0] = (e) => l("update:columns", e)),
|
|
31
|
+
"onUpdate:size": o[1] || (o[1] = (e) => l("update:size", e)),
|
|
32
|
+
onReset: o[2] || (o[2] = (e) => l("reset")),
|
|
33
|
+
onReload: o[3] || (o[3] = (e) => l("reload")),
|
|
34
|
+
"onUpdate:searchValue": o[4] || (o[4] = (e) => l("update:searchValue", e)),
|
|
35
|
+
onSearch: o[5] || (o[5] = (e) => l("search", e)),
|
|
36
|
+
onClearSearch: o[6] || (o[6] = (e) => l("clearSearch")),
|
|
37
|
+
onFullscreenChange: o[7] || (o[7] = (e) => l("fullscreenChange", e)),
|
|
38
|
+
onFullscreenError: o[8] || (o[8] = (e) => l("fullscreenError", e))
|
|
39
|
+
}), b({ _: 2 }, [
|
|
40
|
+
s.$slots.title ? {
|
|
41
|
+
name: "title",
|
|
42
|
+
fn: t((e) => [
|
|
43
|
+
n(s.$slots, "title", r(a(
|
|
44
|
+
e
|
|
45
|
+
)))
|
|
46
|
+
]),
|
|
47
|
+
key: "0"
|
|
48
|
+
} : void 0,
|
|
49
|
+
s.$slots.actions ? {
|
|
50
|
+
name: "actions",
|
|
51
|
+
fn: t((e) => [
|
|
52
|
+
n(s.$slots, "actions", r(a(
|
|
53
|
+
e
|
|
54
|
+
)))
|
|
55
|
+
]),
|
|
56
|
+
key: "1"
|
|
57
|
+
} : void 0,
|
|
58
|
+
s.$slots.settings ? {
|
|
59
|
+
name: "settings",
|
|
60
|
+
fn: t((e) => [
|
|
61
|
+
n(s.$slots, "settings", r(a(
|
|
62
|
+
e
|
|
63
|
+
)))
|
|
64
|
+
]),
|
|
65
|
+
key: "2"
|
|
66
|
+
} : void 0,
|
|
67
|
+
s.$slots.columnLabel ? {
|
|
68
|
+
name: "columnLabel",
|
|
69
|
+
fn: t((e) => [
|
|
70
|
+
n(s.$slots, "columnLabel", r(a(
|
|
71
|
+
e
|
|
72
|
+
)))
|
|
73
|
+
]),
|
|
74
|
+
key: "3"
|
|
75
|
+
} : void 0,
|
|
76
|
+
s.$slots.search ? {
|
|
77
|
+
name: "search",
|
|
78
|
+
fn: t((e) => [
|
|
79
|
+
n(s.$slots, "search", r(a(
|
|
80
|
+
e
|
|
81
|
+
)))
|
|
82
|
+
]),
|
|
83
|
+
key: "4"
|
|
84
|
+
} : void 0,
|
|
85
|
+
s.$slots.filter ? {
|
|
86
|
+
name: "filter",
|
|
87
|
+
fn: t((e) => [
|
|
88
|
+
n(s.$slots, "filter", r(a(
|
|
89
|
+
e
|
|
90
|
+
)))
|
|
91
|
+
]),
|
|
92
|
+
key: "5"
|
|
93
|
+
} : void 0,
|
|
94
|
+
s.$slots.extra ? {
|
|
95
|
+
name: "extra",
|
|
96
|
+
fn: t((e) => [
|
|
97
|
+
n(s.$slots, "extra", r(a(
|
|
98
|
+
e
|
|
99
|
+
)))
|
|
100
|
+
]),
|
|
101
|
+
key: "6"
|
|
102
|
+
} : void 0
|
|
103
|
+
]), 1040));
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
export {
|
|
107
|
+
S as default
|
|
108
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualTableBody.d.ts","sourceRoot":"","sources":["../../../../../table/src/components/VirtualTableBody.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,QAAQ,EAAE,MAAM,KAAK,CAAA;AAElD,OAAO,KAAK,EAAW,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AAQpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAA;AAGpE,OAAO,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAK/C,KAAK,sBAAsB,GAAG,iBAAiB,GAAG;IAChD,IAAI,EAAE,MAAM,CAAA;CACb,CAAA;;;cAQgC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;;;;cACtC,QAAQ,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAO3C,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;;;;cAEhC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;;;;;;;;;;;IAK3F,wCAAwC;;;;;IAExC;;;OAGG;;;;;IAEH,qCAAqC;;cACJ,QAAQ,CAAC,aAAa,GAAG,IAAI,CAAC;;;IAC/D,gEAAgE;;cAE5C,QAAQ,CAAC,CAAC,IAAI,EAAE,sBAAsB,KAAK,IAAI,CAAC;;;;cAIvC,QAAQ,CAAC,OAAO,GAAG,U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AAsB,KAAK,IAAI;+BAhBT,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,GAAG;;;;;;AAb7F,wBAmaE"}
|
|
@@ -115,9 +115,8 @@ const qe = /* @__PURE__ */ U({
|
|
|
115
115
|
function V(t, l) {
|
|
116
116
|
return N(t, l, e.rowKey);
|
|
117
117
|
}
|
|
118
|
-
function k(t) {
|
|
119
|
-
|
|
120
|
-
return N(t, l, e.rowKey);
|
|
118
|
+
function k(t, l) {
|
|
119
|
+
return N(t, l ?? e.dataSource.indexOf(t), e.rowKey);
|
|
121
120
|
}
|
|
122
121
|
const q = w(() => {
|
|
123
122
|
const t = e.columnMetrics?.total;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { MaybeRefOrGetter } from 'vue';
|
|
2
|
+
import { ColumnsType } from '../types';
|
|
3
|
+
export interface TableColumnStateValue {
|
|
4
|
+
visible?: boolean;
|
|
5
|
+
/** Pinning and ordering belong to top-level columns/groups. */
|
|
6
|
+
fixed?: 'left' | 'right' | false;
|
|
7
|
+
order?: number;
|
|
8
|
+
}
|
|
9
|
+
/** Keys are the stable column paths returned by this helper's state. */
|
|
10
|
+
export type TableColumnState = Record<string, TableColumnStateValue>;
|
|
11
|
+
export interface UseColumnStateOptions {
|
|
12
|
+
defaultValue?: TableColumnState;
|
|
13
|
+
storageKey?: string;
|
|
14
|
+
storageType?: 'localStorage' | 'sessionStorage';
|
|
15
|
+
version?: string | number;
|
|
16
|
+
/** Optional application storage adapter. Only serializable state is stored. */
|
|
17
|
+
storage?: Pick<Storage, 'getItem' | 'setItem' | 'removeItem'>;
|
|
18
|
+
onError?: (error: unknown) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Compose controlled columns with serializable preferences. The source owns column definitions;
|
|
22
|
+
* assigning columns records preferences without serializing or replacing renderers and sorters.
|
|
23
|
+
*/
|
|
24
|
+
export declare function useColumnState<T extends object>(source: MaybeRefOrGetter<ColumnsType<T>>, options?: UseColumnStateOptions): {
|
|
25
|
+
columns: import('vue').WritableComputedRef<ColumnsType<T>, ColumnsType<T>>;
|
|
26
|
+
state: import('vue').ComputedRef<TableColumnState>;
|
|
27
|
+
setState: (value: TableColumnState) => void;
|
|
28
|
+
reset: () => void;
|
|
29
|
+
restore: () => void;
|
|
30
|
+
save: () => void;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=useColumnState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useColumnState.d.ts","sourceRoot":"","sources":["../../../../../table/src/composables/useColumnState.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,gBAAgB,EACtB,MAAM,KAAK,CAAA;AACZ,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAW3C,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,KAAK,CAAA;IAChC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,wEAAwE;AACxE,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAA;AAEpE,MAAM,WAAW,qBAAqB;IACpC,YAAY,CAAC,EAAE,gBAAgB,CAAA;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,cAAc,GAAG,gBAAgB,CAAA;IAC/C,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IACzB,+EAA+E;IAC/E,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,EAAE,SAAS,GAAG,SAAS,GAAG,YAAY,CAAC,CAAA;IAC7D,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAA;CACnC;AAqCD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,EAC7C,MAAM,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,EACxC,OAAO,GAAE,qBAA0B;;;sBAyFV,gBAAgB;;;;EAY1C"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { shallowRef as k, watch as j, toValue as p, computed as O, getCurrentInstance as N, onMounted as D } from "vue";
|
|
2
|
+
import { settingsEntries as g, columnFixedRegion as m, setColumnFixed as F, isColumnSettingDisabled as J, moveSettingColumn as M, setColumnVisibility as R } from "../utils/columnSettings.mjs";
|
|
3
|
+
function S(u) {
|
|
4
|
+
const e = {};
|
|
5
|
+
function s(f, i = !1) {
|
|
6
|
+
f.forEach((c, l) => {
|
|
7
|
+
const d = m(c.column);
|
|
8
|
+
e[c.id] = {
|
|
9
|
+
visible: c.column.visible !== !1,
|
|
10
|
+
...!i && d !== "mixed" ? { fixed: d ?? !1, order: l } : {}
|
|
11
|
+
}, s(c.children, !0);
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
return s(g(u)), e;
|
|
15
|
+
}
|
|
16
|
+
function a(u) {
|
|
17
|
+
const e = {};
|
|
18
|
+
if (!u || typeof u != "object" || Array.isArray(u)) return e;
|
|
19
|
+
for (const [s, f] of Object.entries(u)) {
|
|
20
|
+
if (!s.startsWith("/") || !f || typeof f != "object" || Array.isArray(f)) continue;
|
|
21
|
+
const i = f;
|
|
22
|
+
e[s] = {
|
|
23
|
+
...typeof i.visible == "boolean" ? { visible: i.visible } : {},
|
|
24
|
+
...i.fixed === !1 || i.fixed === "left" || i.fixed === "right" ? { fixed: i.fixed } : {},
|
|
25
|
+
...typeof i.order == "number" && Number.isSafeInteger(i.order) && i.order >= 0 ? { order: i.order } : {}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
return e;
|
|
29
|
+
}
|
|
30
|
+
function q(u, e = {}) {
|
|
31
|
+
const s = k(a(e.defaultValue)), f = {};
|
|
32
|
+
j(
|
|
33
|
+
() => S(p(u)),
|
|
34
|
+
(t) => {
|
|
35
|
+
for (const [r, b] of Object.entries(t))
|
|
36
|
+
r in f || (f[r] = b);
|
|
37
|
+
},
|
|
38
|
+
{ immediate: !0, deep: !0, flush: "sync" }
|
|
39
|
+
);
|
|
40
|
+
function i(t) {
|
|
41
|
+
let r = p(u);
|
|
42
|
+
const b = g(r);
|
|
43
|
+
for (const n of b) {
|
|
44
|
+
const o = t[n.id];
|
|
45
|
+
n.column.hideInSetting || !o || o.fixed === void 0 || m(n.column) !== (o.fixed || void 0) && (r = F(r, n.id, o.fixed || void 0));
|
|
46
|
+
}
|
|
47
|
+
const x = g(r).filter((n) => !n.column.hideInSetting).sort((n, o) => (t[n.id]?.order ?? 1 / 0) - (t[o.id]?.order ?? 1 / 0));
|
|
48
|
+
for (let n = x.length - 1; n >= 0; n--) {
|
|
49
|
+
const o = x[n], E = g(r), C = m(o.column), K = x.filter(
|
|
50
|
+
(h) => m(h.column) === C
|
|
51
|
+
), I = E.filter(
|
|
52
|
+
(h) => m(h.column) === C
|
|
53
|
+
)[K.indexOf(o)];
|
|
54
|
+
I && !J(o.column, "order") && (r = M(r, o.id, I.id));
|
|
55
|
+
}
|
|
56
|
+
const w = /* @__PURE__ */ new Map();
|
|
57
|
+
for (const [n, o] of Object.entries(t))
|
|
58
|
+
o.visible !== void 0 && w.set(n, o.visible);
|
|
59
|
+
return R(r, w);
|
|
60
|
+
}
|
|
61
|
+
const c = O({
|
|
62
|
+
get: () => i(s.value),
|
|
63
|
+
set: (t) => {
|
|
64
|
+
s.value = S(t);
|
|
65
|
+
}
|
|
66
|
+
}), l = O(() => S(c.value)), d = () => {
|
|
67
|
+
if (e.storage) return e.storage;
|
|
68
|
+
if (!(typeof window > "u"))
|
|
69
|
+
return window[e.storageType ?? "localStorage"];
|
|
70
|
+
};
|
|
71
|
+
function y() {
|
|
72
|
+
if (e.storageKey)
|
|
73
|
+
try {
|
|
74
|
+
d()?.setItem(
|
|
75
|
+
e.storageKey,
|
|
76
|
+
JSON.stringify({
|
|
77
|
+
version: e.version ?? 1,
|
|
78
|
+
state: l.value
|
|
79
|
+
})
|
|
80
|
+
);
|
|
81
|
+
} catch (t) {
|
|
82
|
+
e.onError?.(t);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
function v() {
|
|
86
|
+
if (e.storageKey)
|
|
87
|
+
try {
|
|
88
|
+
const t = d()?.getItem(e.storageKey);
|
|
89
|
+
if (!t) return;
|
|
90
|
+
const r = JSON.parse(t);
|
|
91
|
+
if (!r || typeof r != "object" || r.version !== (e.version ?? 1)) return;
|
|
92
|
+
s.value = { ...a(e.defaultValue), ...a(r.state) };
|
|
93
|
+
} catch (t) {
|
|
94
|
+
e.onError?.(t);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
function V(t) {
|
|
98
|
+
s.value = a(t);
|
|
99
|
+
}
|
|
100
|
+
function A() {
|
|
101
|
+
s.value = { ...f, ...a(e.defaultValue) }, y();
|
|
102
|
+
}
|
|
103
|
+
return N() ? D(v) : v(), j(l, y, { deep: !0 }), { columns: c, state: l, setState: V, reset: A, restore: v, save: y };
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
q as useColumnState
|
|
107
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useColumnState.test.d.ts","sourceRoot":"","sources":["../../../../../table/src/composables/useColumnState.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useExpand.d.ts","sourceRoot":"","sources":["../../../../../table/src/composables/useExpand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,WAAW,EAAE,MAAM,KAAK,CAAA;AAC5D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AACnC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,CAAC,GAAG,EAAE,GAAG,KAAK,OAAO,CAAA;IACjC,YAAY,EAAE,CAAC,MAAM,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