@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.
Files changed (203) hide show
  1. package/css/presets/antdv.css +20 -0
  2. package/css/presets/element-plus.css +20 -0
  3. package/css/style.css +341 -0
  4. package/css/tailwind3-utilities.css +301 -0
  5. package/css/tailwind3.css +40 -0
  6. package/css/tailwind4.css +40 -0
  7. package/dist/core/src/components/Tooltip.d.ts +1 -1
  8. package/dist/core/src/components/Tooltip.d.ts.map +1 -1
  9. package/dist/core/src/components/Tooltip.mjs +49 -46
  10. package/dist/core/src/components/Tooltip.test.d.ts +2 -0
  11. package/dist/core/src/components/Tooltip.test.d.ts.map +1 -0
  12. package/dist/core/src/components/VirtualList/VirtualList.d.ts +3 -3
  13. package/dist/core/src/components/VirtualList/VirtualList.d.ts.map +1 -1
  14. package/dist/core/src/components/VirtualList/VirtualList.mjs +183 -177
  15. package/dist/core/src/components/VirtualList/hooks/useChildren.d.ts +2 -2
  16. package/dist/core/src/components/VirtualList/hooks/useChildren.d.ts.map +1 -1
  17. package/dist/core/src/components/VirtualList/hooks/useChildren.mjs +12 -12
  18. package/dist/core/src/components/VirtualList/hooks/useGetSize.d.ts +1 -1
  19. package/dist/core/src/components/VirtualList/hooks/useGetSize.d.ts.map +1 -1
  20. package/dist/core/src/components/VirtualList/hooks/useGetSize.mjs +1 -1
  21. package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts +2 -2
  22. package/dist/core/src/components/VirtualList/hooks/useHeights.d.ts.map +1 -1
  23. package/dist/core/src/components/VirtualList/hooks/useHeights.mjs +36 -36
  24. package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.d.ts.map +1 -1
  25. package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.mjs +11 -11
  26. package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.test.d.ts +2 -0
  27. package/dist/core/src/components/VirtualList/hooks/useMobileTouchMove.test.d.ts.map +1 -0
  28. package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts +1 -1
  29. package/dist/core/src/components/VirtualList/hooks/useScrollTo.d.ts.map +1 -1
  30. package/dist/core/src/components/VirtualList/hooks/useScrollTo.mjs +30 -30
  31. package/dist/core/src/index.d.ts +1 -1
  32. package/dist/core/src/index.d.ts.map +1 -1
  33. package/dist/core/src/utils/types.d.ts +39 -1
  34. package/dist/core/src/utils/types.d.ts.map +1 -1
  35. package/dist/css/presets/antdv.css +20 -0
  36. package/dist/css/presets/element-plus.css +20 -0
  37. package/dist/css/style.css +341 -0
  38. package/dist/css/tailwind3-utilities.css +301 -0
  39. package/dist/css/tailwind3.css +40 -0
  40. package/dist/css/tailwind4.css +40 -0
  41. package/dist/icons/src/ColumnHeightOutlinedIcon.d.ts +3 -0
  42. package/dist/icons/src/ColumnHeightOutlinedIcon.d.ts.map +1 -0
  43. package/dist/icons/src/ColumnHeightOutlinedIcon.mjs +9 -0
  44. package/dist/icons/src/FullscreenExitOutlinedIcon.d.ts +3 -0
  45. package/dist/icons/src/FullscreenExitOutlinedIcon.d.ts.map +1 -0
  46. package/dist/icons/src/FullscreenExitOutlinedIcon.mjs +9 -0
  47. package/dist/icons/src/FullscreenOutlinedIcon.d.ts +3 -0
  48. package/dist/icons/src/FullscreenOutlinedIcon.d.ts.map +1 -0
  49. package/dist/icons/src/FullscreenOutlinedIcon.mjs +9 -0
  50. package/dist/icons/src/ReloadOutlinedIcon.d.ts +3 -0
  51. package/dist/icons/src/ReloadOutlinedIcon.d.ts.map +1 -0
  52. package/dist/icons/src/ReloadOutlinedIcon.mjs +9 -0
  53. package/dist/icons/src/SettingOutlinedIcon.d.ts +3 -0
  54. package/dist/icons/src/SettingOutlinedIcon.d.ts.map +1 -0
  55. package/dist/icons/src/SettingOutlinedIcon.mjs +9 -0
  56. package/dist/icons/src/index.d.ts +5 -0
  57. package/dist/icons/src/index.d.ts.map +1 -1
  58. package/dist/index.d.ts +0 -28
  59. package/dist/index.full.mjs +6070 -4427
  60. package/dist/index.mjs +115 -87
  61. package/dist/table/src/components/FilterDropdown.d.ts +1 -1
  62. package/dist/table/src/components/Table.d.ts +31 -4
  63. package/dist/table/src/components/Table.d.ts.map +1 -1
  64. package/dist/table/src/components/Table.mjs +514 -475
  65. package/dist/table/src/components/TableBody.d.ts.map +1 -1
  66. package/dist/table/src/components/TableBody.mjs +37 -36
  67. package/dist/table/src/components/TableCell.d.ts.map +1 -1
  68. package/dist/table/src/components/TableCell.mjs +95 -83
  69. package/dist/table/src/components/TableColumnSettings.d.ts +41 -0
  70. package/dist/table/src/components/TableColumnSettings.d.ts.map +1 -0
  71. package/dist/table/src/components/TableColumnSettings.mjs +360 -0
  72. package/dist/table/src/components/TableColumnSettings.test.d.ts +2 -0
  73. package/dist/table/src/components/TableColumnSettings.test.d.ts.map +1 -0
  74. package/dist/table/src/components/TableCopyButton.d.ts +41 -0
  75. package/dist/table/src/components/TableCopyButton.d.ts.map +1 -0
  76. package/dist/table/src/components/TableCopyButton.mjs +94 -0
  77. package/dist/table/src/components/TableEnterprise.test.d.ts +2 -0
  78. package/dist/table/src/components/TableEnterprise.test.d.ts.map +1 -0
  79. package/dist/table/src/components/TableHeaderCell.d.ts.map +1 -1
  80. package/dist/table/src/components/TableHeaderCell.mjs +284 -241
  81. package/dist/table/src/components/TableSelectionAlert.d.ts +50 -0
  82. package/dist/table/src/components/TableSelectionAlert.d.ts.map +1 -0
  83. package/dist/table/src/components/TableSelectionAlert.mjs +86 -0
  84. package/dist/table/src/components/TableSelectionAlert.test.d.ts +2 -0
  85. package/dist/table/src/components/TableSelectionAlert.test.d.ts.map +1 -0
  86. package/dist/table/src/components/TableToolbar.d.ts +87 -0
  87. package/dist/table/src/components/TableToolbar.d.ts.map +1 -0
  88. package/dist/table/src/components/TableToolbar.mjs +265 -0
  89. package/dist/table/src/components/TableToolbar.test.d.ts +2 -0
  90. package/dist/table/src/components/TableToolbar.test.d.ts.map +1 -0
  91. package/dist/table/src/components/VTable.vue.d.ts.map +1 -1
  92. package/dist/table/src/components/VTable.vue.mjs +24 -15
  93. package/dist/table/src/components/VTableColumnSettings.vue.d.ts +20 -0
  94. package/dist/table/src/components/VTableColumnSettings.vue.d.ts.map +1 -0
  95. package/dist/table/src/components/VTableColumnSettings.vue.mjs +42 -0
  96. package/dist/table/src/components/VTableColumnSettings.vue2.mjs +4 -0
  97. package/dist/table/src/components/VTableSelectionAlert.vue.d.ts +19 -0
  98. package/dist/table/src/components/VTableSelectionAlert.vue.d.ts.map +1 -0
  99. package/dist/table/src/components/VTableSelectionAlert.vue.mjs +54 -0
  100. package/dist/table/src/components/VTableSelectionAlert.vue2.mjs +4 -0
  101. package/dist/table/src/components/VTableSummary.d.ts +15 -75
  102. package/dist/table/src/components/VTableSummary.d.ts.map +1 -1
  103. package/dist/table/src/components/VTableSummary.mjs +7 -7
  104. package/dist/table/src/components/VTableToolbar.vue.d.ts +27 -0
  105. package/dist/table/src/components/VTableToolbar.vue.d.ts.map +1 -0
  106. package/dist/table/src/components/VTableToolbar.vue.mjs +108 -0
  107. package/dist/table/src/components/VTableToolbar.vue2.mjs +4 -0
  108. package/dist/table/src/components/VirtualTableBody.d.ts.map +1 -1
  109. package/dist/table/src/components/VirtualTableBody.mjs +2 -3
  110. package/dist/table/src/composables/useColumnState.d.ts +32 -0
  111. package/dist/table/src/composables/useColumnState.d.ts.map +1 -0
  112. package/dist/table/src/composables/useColumnState.mjs +107 -0
  113. package/dist/table/src/composables/useColumnState.test.d.ts +2 -0
  114. package/dist/table/src/composables/useColumnState.test.d.ts.map +1 -0
  115. package/dist/table/src/composables/useExpand.d.ts.map +1 -1
  116. package/dist/table/src/composables/useExpand.mjs +28 -30
  117. package/dist/table/src/composables/useFilter.d.ts.map +1 -1
  118. package/dist/table/src/composables/useFilter.mjs +28 -25
  119. package/dist/table/src/composables/usePagination.d.ts +1 -0
  120. package/dist/table/src/composables/usePagination.d.ts.map +1 -1
  121. package/dist/table/src/composables/usePagination.mjs +35 -34
  122. package/dist/table/src/composables/useSelection.d.ts.map +1 -1
  123. package/dist/table/src/composables/useSelection.mjs +136 -126
  124. package/dist/table/src/composables/useTableRequest.d.ts +4 -0
  125. package/dist/table/src/composables/useTableRequest.d.ts.map +1 -0
  126. package/dist/table/src/composables/useTableRequest.mjs +127 -0
  127. package/dist/table/src/composables/useTableRequest.test.d.ts +2 -0
  128. package/dist/table/src/composables/useTableRequest.test.d.ts.map +1 -0
  129. package/dist/table/src/context.d.ts +9 -2
  130. package/dist/table/src/context.d.ts.map +1 -1
  131. package/dist/table/src/index.d.ts +25 -88
  132. package/dist/table/src/index.d.ts.map +1 -1
  133. package/dist/table/src/index.mjs +12 -12
  134. package/dist/table/src/types/column-settings.d.ts +31 -0
  135. package/dist/table/src/types/column-settings.d.ts.map +1 -0
  136. package/dist/table/src/types/column-state.typecheck.d.ts +2 -0
  137. package/dist/table/src/types/column-state.typecheck.d.ts.map +1 -0
  138. package/dist/table/src/types/column.d.ts +15 -3
  139. package/dist/table/src/types/column.d.ts.map +1 -1
  140. package/dist/table/src/types/index.d.ts +2 -0
  141. package/dist/table/src/types/index.d.ts.map +1 -1
  142. package/dist/table/src/types/presentation.d.ts +24 -0
  143. package/dist/table/src/types/presentation.d.ts.map +1 -0
  144. package/dist/table/src/types/request.d.ts +65 -0
  145. package/dist/table/src/types/request.d.ts.map +1 -0
  146. package/dist/table/src/types/request.typecheck.d.ts +13 -0
  147. package/dist/table/src/types/request.typecheck.d.ts.map +1 -0
  148. package/dist/table/src/types/selection-alert.d.ts +30 -0
  149. package/dist/table/src/types/selection-alert.d.ts.map +1 -0
  150. package/dist/table/src/types/selection-alert.typecheck.d.ts +12 -0
  151. package/dist/table/src/types/selection-alert.typecheck.d.ts.map +1 -0
  152. package/dist/table/src/types/table.d.ts +12 -1
  153. package/dist/table/src/types/table.d.ts.map +1 -1
  154. package/dist/table/src/types/toolbar.d.ts +58 -0
  155. package/dist/table/src/types/toolbar.d.ts.map +1 -0
  156. package/dist/table/src/utils/cell.d.ts +4 -0
  157. package/dist/table/src/utils/cell.d.ts.map +1 -1
  158. package/dist/table/src/utils/cell.mjs +49 -45
  159. package/dist/table/src/utils/columnSettings.d.ts +22 -0
  160. package/dist/table/src/utils/columnSettings.d.ts.map +1 -0
  161. package/dist/table/src/utils/columnSettings.mjs +107 -0
  162. package/dist/table/src/utils/columnSettings.test.d.ts +2 -0
  163. package/dist/table/src/utils/columnSettings.test.d.ts.map +1 -0
  164. package/dist/table/src/utils/manual.d.ts +3 -0
  165. package/dist/table/src/utils/manual.d.ts.map +1 -0
  166. package/dist/table/src/utils/manual.mjs +6 -0
  167. package/dist/table/src/utils/valueEnum.d.ts +7 -0
  168. package/dist/table/src/utils/valueEnum.d.ts.map +1 -0
  169. package/dist/table/src/utils/valueEnum.mjs +23 -0
  170. package/dist/theme/src/augment.d.ts +4 -0
  171. package/dist/theme/src/augment.d.ts.map +1 -1
  172. package/dist/theme/src/column-settings.d.ts +160 -0
  173. package/dist/theme/src/column-settings.d.ts.map +1 -0
  174. package/dist/theme/src/column-settings.mjs +84 -0
  175. package/dist/theme/src/index.d.ts +12 -0
  176. package/dist/theme/src/index.d.ts.map +1 -1
  177. package/dist/theme/src/presets/antdv/table-locale.d.ts +10 -0
  178. package/dist/theme/src/presets/antdv/table-locale.d.ts.map +1 -1
  179. package/dist/theme/src/presets/antdv/table-locale.mjs +2 -0
  180. package/dist/theme/src/presets/antdv/table.d.ts +4 -0
  181. package/dist/theme/src/presets/antdv/table.d.ts.map +1 -1
  182. package/dist/theme/src/presets/antdv/table.mjs +4 -0
  183. package/dist/theme/src/presets/element-plus/table-locale.d.ts +10 -0
  184. package/dist/theme/src/presets/element-plus/table-locale.d.ts.map +1 -1
  185. package/dist/theme/src/presets/element-plus/table-locale.mjs +2 -0
  186. package/dist/theme/src/presets/element-plus/table.d.ts +4 -0
  187. package/dist/theme/src/presets/element-plus/table.d.ts.map +1 -1
  188. package/dist/theme/src/presets/element-plus/table.mjs +4 -0
  189. package/dist/theme/src/presets/index.d.ts.map +1 -1
  190. package/dist/theme/src/presets/index.mjs +100 -67
  191. package/dist/theme/src/presets/types.d.ts +3 -0
  192. package/dist/theme/src/presets/types.d.ts.map +1 -1
  193. package/dist/theme/src/selection-alert.d.ts +54 -0
  194. package/dist/theme/src/selection-alert.d.ts.map +1 -0
  195. package/dist/theme/src/selection-alert.mjs +36 -0
  196. package/dist/theme/src/toolbar.d.ts +105 -0
  197. package/dist/theme/src/toolbar.d.ts.map +1 -0
  198. package/dist/theme/src/toolbar.mjs +57 -0
  199. package/dist/vtable-guild/src/augment.d.ts +18 -0
  200. package/dist/vtable-guild/src/augment.d.ts.map +1 -0
  201. package/dist/vtable-guild/src/index.d.ts +1 -0
  202. package/dist/vtable-guild/src/index.d.ts.map +1 -1
  203. 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,4 @@
1
+ import f from "./VTableColumnSettings.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -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
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./VTableSelectionAlert.vue.mjs";
2
+ export {
3
+ f as default
4
+ };
@@ -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 _default: {
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
- }>> & Readonly<{}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
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
- }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & {
43
- Row: import('vue').DefineComponent<{}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
44
- Cell: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
45
- index: {
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 _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;AAKnE,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAA;;;;kBAMpB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;kBAAtB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;cAAtB,QAAQ,CAAC,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBvD,wBAGE"}
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 o, watch as i } from "vue";
2
- import { TABLE_CONTEXT_KEY as l } from "../context.mjs";
3
- import n from "./VTableSummaryRow.mjs";
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 = o(l, {});
17
- return i(() => e.fixed, (a) => {
18
- m.registerSummaryFixed?.(a ?? !1);
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: n,
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
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./VTableToolbar.vue.mj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N(t, l, e.rowKey);
117
117
  }
118
- function k(t) {
119
- const l = e.dataSource.indexOf(t);
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,2 @@
1
+ export {};
2
+ //# sourceMappingURL=useColumnState.test.d.ts.map
@@ -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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