ep-craft 0.1.32 → 0.1.34

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 (205) hide show
  1. package/dist/components/button/index.d.ts +12 -0
  2. package/dist/components/button-group/index.d.ts +3 -2
  3. package/dist/components/button-group/index.js +7 -3
  4. package/dist/components/button-group/src/button-group.d.ts +48 -0
  5. package/dist/components/button-group/src/button-group.js +7 -0
  6. package/dist/components/button-group/src/button-group.vue.d.ts +16 -0
  7. package/dist/components/button-group/src/button-group.vue.js +42 -0
  8. package/dist/components/button-group/src/button-group2.vue.js +4 -0
  9. package/dist/components/checkbox/index.js +6 -5
  10. package/dist/components/collection/index.d.ts +8 -0
  11. package/dist/components/collection/src/collection-item.vue.d.ts +2 -0
  12. package/dist/components/collection/src/collection-item.vue.js +10 -0
  13. package/dist/components/collection/src/collection-item2.vue.js +8 -0
  14. package/dist/components/collection/src/collection.d.ts +39 -0
  15. package/dist/components/collection/src/collection.js +52 -0
  16. package/dist/components/collection/src/collection.vue.d.ts +2 -0
  17. package/dist/components/collection/src/collection.vue.js +10 -0
  18. package/dist/components/collection/src/collection2.vue.js +7 -0
  19. package/dist/components/collection/src/tokens.d.ts +18 -0
  20. package/dist/components/divider/index.d.ts +24 -2
  21. package/dist/components/divider/index.js +8 -3
  22. package/dist/components/divider/src/divider.d.ts +30 -0
  23. package/dist/components/divider/src/divider.js +34 -0
  24. package/dist/components/divider/src/divider.vue.d.ts +24 -0
  25. package/dist/components/divider/src/divider.vue.js +39 -0
  26. package/dist/components/divider/src/divider2.vue.js +4 -0
  27. package/dist/components/dropdown/index.d.ts +3017 -3
  28. package/dist/components/dropdown/index.js +23 -3
  29. package/dist/components/dropdown/src/dropdown-item-impl.vue.d.ts +79 -0
  30. package/dist/components/dropdown/src/dropdown-item-impl.vue.js +40 -0
  31. package/dist/components/dropdown/src/dropdown-item-impl2.vue.js +68 -0
  32. package/dist/components/dropdown/src/dropdown-item.vue.d.ts +169 -0
  33. package/dist/components/dropdown/src/dropdown-item.vue.js +35 -0
  34. package/dist/components/dropdown/src/dropdown-item2.vue.js +63 -0
  35. package/dist/components/dropdown/src/dropdown-menu.vue.d.ts +27 -0
  36. package/dist/components/dropdown/src/dropdown-menu.vue.js +24 -0
  37. package/dist/components/dropdown/src/dropdown-menu2.vue.js +75 -0
  38. package/dist/components/dropdown/src/dropdown.d.ts +200 -0
  39. package/dist/components/dropdown/src/dropdown.js +201 -0
  40. package/dist/components/dropdown/src/dropdown.vue.d.ts +1126 -0
  41. package/dist/components/dropdown/src/dropdown.vue.js +127 -0
  42. package/dist/components/dropdown/src/dropdown2.vue.js +127 -0
  43. package/dist/components/dropdown/src/instance.d.ts +2 -0
  44. package/dist/components/dropdown/src/tokens.d.ts +13 -0
  45. package/dist/components/dropdown/src/tokens.js +5 -0
  46. package/dist/components/dropdown/src/useDropdown.d.ts +5 -0
  47. package/dist/components/dropdown/src/useDropdown.js +15 -0
  48. package/dist/components/dropdown-item/index.d.ts +1 -4
  49. package/dist/components/dropdown-menu/index.d.ts +1 -4
  50. package/dist/components/index.js +129 -131
  51. package/dist/components/popover/index.d.ts +121 -3
  52. package/dist/components/popover/index.js +19 -4
  53. package/dist/components/popover/src/directive.d.ts +4 -0
  54. package/dist/components/popover/src/directive.js +15 -0
  55. package/dist/components/popover/src/popover.d.ts +291 -0
  56. package/dist/components/popover/src/popover.js +168 -0
  57. package/dist/components/popover/src/popover.vue.d.ts +53 -0
  58. package/dist/components/popover/src/popover.vue.js +125 -0
  59. package/dist/components/popover/src/popover2.vue.js +4 -0
  60. package/dist/components/progress/index.d.ts +35 -2
  61. package/dist/components/progress/index.js +10 -4
  62. package/dist/components/progress/src/progress.d.ts +97 -0
  63. package/dist/components/progress/src/progress.js +104 -0
  64. package/dist/components/progress/src/progress.vue.d.ts +30 -0
  65. package/dist/components/progress/src/progress.vue.js +179 -0
  66. package/dist/components/progress/src/progress2.vue.js +4 -0
  67. package/dist/components/roving-focus-group/index.d.ts +14 -0
  68. package/dist/components/roving-focus-group/index.js +15 -0
  69. package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.d.ts +50 -0
  70. package/dist/components/roving-focus-group/src/roving-focus-group-impl.vue.js +10 -0
  71. package/dist/components/roving-focus-group/src/roving-focus-group-impl2.vue.js +115 -0
  72. package/dist/components/roving-focus-group/src/roving-focus-group.d.ts +56 -0
  73. package/dist/components/roving-focus-group/src/roving-focus-group.js +43 -0
  74. package/dist/components/roving-focus-group/src/roving-focus-group.vue.d.ts +67 -0
  75. package/dist/components/roving-focus-group/src/roving-focus-group.vue.js +13 -0
  76. package/dist/components/roving-focus-group/src/roving-focus-group2.vue.js +21 -0
  77. package/dist/components/roving-focus-group/src/roving-focus-item.vue.d.ts +43 -0
  78. package/dist/components/roving-focus-group/src/roving-focus-item.vue.js +20 -0
  79. package/dist/components/roving-focus-group/src/roving-focus-item2.vue.js +78 -0
  80. package/dist/components/roving-focus-group/src/tokens.d.ts +28 -0
  81. package/dist/components/roving-focus-group/src/tokens.js +5 -0
  82. package/dist/components/roving-focus-group/src/utils.d.ts +8 -0
  83. package/dist/components/roving-focus-group/src/utils.js +28 -0
  84. package/dist/components/table/index.d.ts +56 -3
  85. package/dist/components/table/index.js +20 -4
  86. package/dist/components/table/src/composables/use-scrollbar.d.ts +6 -0
  87. package/dist/components/table/src/composables/use-scrollbar.js +24 -0
  88. package/dist/components/table/src/config.d.ts +87 -0
  89. package/dist/components/table/src/config.js +210 -0
  90. package/dist/components/table/src/filter-panel.vue.d.ts +837 -0
  91. package/dist/components/table/src/filter-panel.vue.js +130 -0
  92. package/dist/components/table/src/filter-panel2.vue.js +155 -0
  93. package/dist/components/table/src/h-helper.d.ts +13 -0
  94. package/dist/components/table/src/h-helper.js +30 -0
  95. package/dist/components/table/src/layout-observer.d.ts +8 -0
  96. package/dist/components/table/src/layout-observer.js +49 -0
  97. package/dist/components/table/src/store/current.d.ts +15 -0
  98. package/dist/components/table/src/store/current.js +45 -0
  99. package/dist/components/table/src/store/expand.d.ts +14 -0
  100. package/dist/components/table/src/store/expand.js +55 -0
  101. package/dist/components/table/src/store/helper.d.ts +548 -0
  102. package/dist/components/table/src/store/helper.js +61 -0
  103. package/dist/components/table/src/store/index.d.ts +1107 -0
  104. package/dist/components/table/src/store/index.js +123 -0
  105. package/dist/components/table/src/store/tree.d.ts +27 -0
  106. package/dist/components/table/src/store/tree.js +153 -0
  107. package/dist/components/table/src/store/watcher.d.ts +88 -0
  108. package/dist/components/table/src/store/watcher.js +483 -0
  109. package/dist/components/table/src/table/defaults.d.ts +560 -0
  110. package/dist/components/table/src/table/defaults.js +236 -0
  111. package/dist/components/table/src/table/key-render-helper.d.ts +2 -0
  112. package/dist/components/table/src/table/key-render-helper.js +18 -0
  113. package/dist/components/table/src/table/style-helper.d.ts +51 -0
  114. package/dist/components/table/src/table/style-helper.js +169 -0
  115. package/dist/components/table/src/table/utils-helper.d.ts +16 -0
  116. package/dist/components/table/src/table/utils-helper.js +36 -0
  117. package/dist/components/table/src/table-body/defaults.d.ts +39 -0
  118. package/dist/components/table/src/table-body/defaults.js +25 -0
  119. package/dist/components/table/src/table-body/events-helper.d.ts +19 -0
  120. package/dist/components/table/src/table-body/events-helper.js +126 -0
  121. package/dist/components/table/src/table-body/index.d.ts +84 -0
  122. package/dist/components/table/src/table-body/index.js +77 -0
  123. package/dist/components/table/src/table-body/render-helper.d.ts +18 -0
  124. package/dist/components/table/src/table-body/render-helper.js +188 -0
  125. package/dist/components/table/src/table-body/styles-helper.d.ts +15 -0
  126. package/dist/components/table/src/table-body/styles-helper.js +98 -0
  127. package/dist/components/table/src/table-body/td-wrapper.vue.d.ts +33 -0
  128. package/dist/components/table/src/table-body/td-wrapper.vue.js +26 -0
  129. package/dist/components/table/src/table-body/td-wrapper2.vue.js +4 -0
  130. package/dist/components/table/src/table-column/defaults.d.ts +348 -0
  131. package/dist/components/table/src/table-column/defaults.js +152 -0
  132. package/dist/components/table/src/table-column/index.d.ts +2 -0
  133. package/dist/components/table/src/table-column/index.vue.d.ts +32 -0
  134. package/dist/components/table/src/table-column/index.vue.js +161 -0
  135. package/dist/components/table/src/table-column/index2.vue.js +4 -0
  136. package/dist/components/table/src/table-column/render-helper.d.ts +17 -0
  137. package/dist/components/table/src/table-column/render-helper.js +116 -0
  138. package/dist/components/table/src/table-column/watcher-helper.d.ts +8 -0
  139. package/dist/components/table/src/table-column/watcher-helper.js +85 -0
  140. package/dist/components/table/src/table-footer/index.d.ts +79 -0
  141. package/dist/components/table/src/table-footer/index.js +110 -0
  142. package/dist/components/table/src/table-footer/mapState-helper.d.ts +9 -0
  143. package/dist/components/table/src/table-footer/mapState-helper.js +16 -0
  144. package/dist/components/table/src/table-footer/style-helper.d.ts +9 -0
  145. package/dist/components/table/src/table-footer/style-helper.js +42 -0
  146. package/dist/components/table/src/table-header/event-helper.d.ts +14 -0
  147. package/dist/components/table/src/table-header/event-helper.js +113 -0
  148. package/dist/components/table/src/table-header/index.d.ts +361 -0
  149. package/dist/components/table/src/table-header/index.js +255 -0
  150. package/dist/components/table/src/table-header/style.helper.d.ts +10 -0
  151. package/dist/components/table/src/table-header/style.helper.js +73 -0
  152. package/dist/components/table/src/table-header/utils-helper.d.ts +10 -0
  153. package/dist/components/table/src/table-header/utils-helper.js +45 -0
  154. package/dist/components/table/src/table-layout.d.ts +37 -0
  155. package/dist/components/table/src/table-layout.js +144 -0
  156. package/dist/components/table/src/table.vue.d.ts +734 -0
  157. package/dist/components/table/src/table.vue.js +443 -0
  158. package/dist/components/table/src/table2.vue.js +4 -0
  159. package/dist/components/table/src/tableColumn.d.ts +2 -0
  160. package/dist/components/table/src/tokens.d.ts +3 -0
  161. package/dist/components/table/src/tokens.js +4 -0
  162. package/dist/components/table/src/util.d.ts +55 -0
  163. package/dist/components/table/src/util.js +310 -0
  164. package/dist/components/table-column/index.d.ts +40 -3
  165. package/dist/components/table-column/index.js +6 -3
  166. package/dist/components/upload/index.d.ts +45 -2
  167. package/dist/components/upload/index.js +23 -4
  168. package/dist/components/upload/src/ajax.d.ts +9 -0
  169. package/dist/components/upload/src/ajax.js +58 -0
  170. package/dist/components/upload/src/constants.d.ts +5 -0
  171. package/dist/components/upload/src/constants.js +4 -0
  172. package/dist/components/upload/src/upload-content.d.ts +136 -0
  173. package/dist/components/upload/src/upload-content.js +53 -0
  174. package/dist/components/upload/src/upload-content.vue.d.ts +38 -0
  175. package/dist/components/upload/src/upload-content.vue.js +186 -0
  176. package/dist/components/upload/src/upload-content2.vue.js +4 -0
  177. package/dist/components/upload/src/upload-dragger.d.ts +22 -0
  178. package/dist/components/upload/src/upload-dragger.js +19 -0
  179. package/dist/components/upload/src/upload-dragger.vue.d.ts +19 -0
  180. package/dist/components/upload/src/upload-dragger.vue.js +91 -0
  181. package/dist/components/upload/src/upload-dragger2.vue.js +4 -0
  182. package/dist/components/upload/src/upload-list.d.ts +45 -0
  183. package/dist/components/upload/src/upload-list.js +39 -0
  184. package/dist/components/upload/src/upload-list.vue.d.ts +28 -0
  185. package/dist/components/upload/src/upload-list.vue.js +182 -0
  186. package/dist/components/upload/src/upload-list2.vue.js +4 -0
  187. package/dist/components/upload/src/upload.d.ts +361 -0
  188. package/dist/components/upload/src/upload.js +216 -0
  189. package/dist/components/upload/src/upload.vue.d.ts +64 -0
  190. package/dist/components/upload/src/upload.vue.js +150 -0
  191. package/dist/components/upload/src/upload2.vue.js +4 -0
  192. package/dist/components/upload/src/use-handlers.d.ts +60 -0
  193. package/dist/components/upload/src/use-handlers.js +111 -0
  194. package/dist/directives/mousewheel/index.js +28 -0
  195. package/dist/ep-craft.js +277 -236
  196. package/dist/index.d.ts +67 -0
  197. package/dist/utils/dom/event.js +12 -11
  198. package/dist/utils/objects.js +10 -9
  199. package/dist/utils/vue/install.js +21 -18
  200. package/dist/utils/vue/refs.js +8 -0
  201. package/dist/vendored-components.d.ts +1 -1
  202. package/dist/vendored-components.js +44 -4
  203. package/package.json +1 -1
  204. package/dist/components/dropdown-item/index.js +0 -6
  205. package/dist/components/dropdown-menu/index.js +0 -6
@@ -0,0 +1,236 @@
1
+ import "vue";
2
+ import "@vue/shared";
3
+ import "lodash-unified";
4
+ import "@vueuse/core";
5
+ import "@element-plus/icons-vue";
6
+ import { useSizeProp as e } from "../../../../hooks/use-size/index.js";
7
+ import "@popperjs/core";
8
+ import "../../../../hooks/use-z-index/index.js";
9
+ import "../../../../hooks/use-delayed-toggle/index.js";
10
+ import "../../../../hooks/use-aria/index.js";
11
+ import "../../../../hooks/use-model-toggle/index.js";
12
+ import "../../../../hooks/use-empty-values/index.js";
13
+ const s = {
14
+ /**
15
+ * @description table data
16
+ */
17
+ data: {
18
+ type: Array,
19
+ default: () => []
20
+ },
21
+ /**
22
+ * @description size of Table
23
+ */
24
+ size: e,
25
+ width: [String, Number],
26
+ /**
27
+ * @description table's height. By default it has an `auto` height. If its value is a number, the height is measured in pixels; if its value is a string, the value will be assigned to element's style.height, the height is affected by external styles
28
+ */
29
+ height: [String, Number],
30
+ /**
31
+ * @description table's max-height. The legal value is a number or the height in px
32
+ */
33
+ maxHeight: [String, Number],
34
+ /**
35
+ * @description whether width of column automatically fits its container
36
+ */
37
+ fit: {
38
+ type: Boolean,
39
+ default: !0
40
+ },
41
+ /**
42
+ * @description whether Table is striped
43
+ */
44
+ stripe: Boolean,
45
+ /**
46
+ * @description whether Table has vertical border
47
+ */
48
+ border: Boolean,
49
+ /**
50
+ * @description key of row data, used for optimizing rendering. Required if `reserve-selection` is on or display tree data. When its type is String, multi-level access is supported, e.g. `user.info.id`, but `user.info[0].id` is not supported, in which case `Function` should be used
51
+ */
52
+ rowKey: [String, Function],
53
+ /**
54
+ * @description whether Table header is visible
55
+ */
56
+ showHeader: {
57
+ type: Boolean,
58
+ default: !0
59
+ },
60
+ /**
61
+ * @description whether to display a summary row
62
+ */
63
+ showSummary: Boolean,
64
+ /**
65
+ * @description displayed text for the first column of summary row
66
+ */
67
+ sumText: String,
68
+ /**
69
+ * @description custom summary method
70
+ */
71
+ summaryMethod: Function,
72
+ /**
73
+ * @description function that returns custom class names for a row, or a string assigning class names for every row
74
+ */
75
+ rowClassName: [String, Function],
76
+ /**
77
+ * @description function that returns custom style for a row, or an object assigning custom style for every row
78
+ */
79
+ rowStyle: [Object, Function],
80
+ /**
81
+ * @description function that returns custom class names for a cell, or a string assigning class names for every cell
82
+ */
83
+ cellClassName: [String, Function],
84
+ /**
85
+ * @description function that returns custom style for a cell, or an object assigning custom style for every cell
86
+ */
87
+ cellStyle: [Object, Function],
88
+ /**
89
+ * @description function that returns custom class names for a row in table header, or a string assigning class names for every row in table header
90
+ */
91
+ headerRowClassName: [String, Function],
92
+ /**
93
+ * @description function that returns custom style for a row in table header, or an object assigning custom style for every row in table header
94
+ */
95
+ headerRowStyle: [Object, Function],
96
+ /**
97
+ * @description function that returns custom class names for a cell in table header, or a string assigning class names for every cell in table header
98
+ */
99
+ headerCellClassName: [String, Function],
100
+ /**
101
+ * @description function that returns custom style for a cell in table header, or an object assigning custom style for every cell in table header
102
+ */
103
+ headerCellStyle: [Object, Function],
104
+ /**
105
+ * @description whether current row is highlighted
106
+ */
107
+ highlightCurrentRow: Boolean,
108
+ /**
109
+ * @description key of current row, a set only prop
110
+ */
111
+ currentRowKey: [String, Number],
112
+ /**
113
+ * @description displayed text when data is empty. You can customize this area with `#empty`
114
+ */
115
+ emptyText: String,
116
+ /**
117
+ * @description set expanded rows by this prop, prop's value is the keys of expand rows, you should set row-key before using this prop
118
+ */
119
+ expandRowKeys: Array,
120
+ /**
121
+ * @description whether expand all rows by default, works when the table has a column type="expand" or contains tree structure data
122
+ */
123
+ defaultExpandAll: Boolean,
124
+ /**
125
+ * @description enable expandable rows, works when the table has a column type="expand"
126
+ */
127
+ rowExpandable: {
128
+ type: Function
129
+ },
130
+ /**
131
+ * @description set the default sort column and order. property `prop` is used to set default sort column, property `order` is used to set default sort order
132
+ */
133
+ defaultSort: Object,
134
+ /**
135
+ * @description the `effect` of the overflow tooltip
136
+ */
137
+ tooltipEffect: String,
138
+ /**
139
+ * @description the options for the overflow tooltip, [see the following tooltip component](tooltip.html#attributes)
140
+ */
141
+ tooltipOptions: Object,
142
+ /**
143
+ * @description method that returns rowspan and colspan
144
+ */
145
+ spanMethod: Function,
146
+ /**
147
+ * @description controls the behavior of master checkbox in multi-select tables when only some rows are selected (but not all). If true, all rows will be selected, else deselected
148
+ */
149
+ selectOnIndeterminate: {
150
+ type: Boolean,
151
+ default: !0
152
+ },
153
+ /**
154
+ * @description horizontal indentation of tree data
155
+ */
156
+ indent: {
157
+ type: Number,
158
+ default: 16
159
+ },
160
+ /**
161
+ * @description configuration for rendering nested data
162
+ */
163
+ treeProps: {
164
+ type: Object,
165
+ default: () => ({
166
+ hasChildren: "hasChildren",
167
+ children: "children",
168
+ checkStrictly: !1
169
+ })
170
+ },
171
+ /**
172
+ * @description whether to lazy loading data
173
+ */
174
+ lazy: Boolean,
175
+ /**
176
+ * @description method for loading child row data, only works when `lazy` is true
177
+ */
178
+ load: Function,
179
+ style: {
180
+ type: [String, Object, Array, Boolean],
181
+ default: () => ({})
182
+ },
183
+ className: {
184
+ type: String,
185
+ default: ""
186
+ },
187
+ /**
188
+ * @description sets the algorithm used to lay out table cells, rows, and columns
189
+ */
190
+ tableLayout: {
191
+ type: String,
192
+ default: "fixed"
193
+ },
194
+ /**
195
+ * @description always show scrollbar
196
+ */
197
+ scrollbarAlwaysOn: Boolean,
198
+ /**
199
+ * @description ensure main axis minimum-size doesn't follow the content
200
+ */
201
+ flexible: Boolean,
202
+ /**
203
+ * @description whether to hide extra content and show them in a tooltip when hovering on the cell.It will affect all the table columns
204
+ */
205
+ showOverflowTooltip: {
206
+ type: [Boolean, Object],
207
+ default: void 0
208
+ },
209
+ /**
210
+ * @description function that formats cell tooltip content, works when `show-overflow-tooltip` is `true`
211
+ */
212
+ tooltipFormatter: Function,
213
+ appendFilterPanelTo: String,
214
+ scrollbarTabindex: {
215
+ type: [Number, String],
216
+ default: void 0
217
+ },
218
+ /**
219
+ * @description whether to allow drag the last column
220
+ */
221
+ allowDragLastColumn: {
222
+ type: Boolean,
223
+ default: !0
224
+ },
225
+ /**
226
+ * @description whether to preserve expanded row content in DOM when collapsed
227
+ */
228
+ preserveExpandedContent: Boolean,
229
+ /**
230
+ * @description whether to use native scrollbars
231
+ */
232
+ nativeScrollbar: Boolean
233
+ };
234
+ export {
235
+ s as tableProps
236
+ };
@@ -0,0 +1,2 @@
1
+ import type { DefaultRow, Table } from './defaults';
2
+ export default function useKeyRender<T extends DefaultRow>(table: Table<T>): void;
@@ -0,0 +1,18 @@
1
+ import { onMounted as u, onUnmounted as d } from "vue";
2
+ function l(t) {
3
+ let e;
4
+ const n = () => {
5
+ const o = t.vnode.el.querySelector(".hidden-columns"), r = { childList: !0, subtree: !0 }, s = t.store.states.updateOrderFns;
6
+ e = new MutationObserver(() => {
7
+ s.forEach((c) => c());
8
+ }), e.observe(o, r);
9
+ };
10
+ u(() => {
11
+ n();
12
+ }), d(() => {
13
+ e == null || e.disconnect();
14
+ });
15
+ }
16
+ export {
17
+ l as default
18
+ };
@@ -0,0 +1,51 @@
1
+ import type { DefaultRow, RenderExpanded, Table, TableProps } from './defaults';
2
+ import type { Store } from '../store';
3
+ import type TableLayout from '../table-layout';
4
+ declare function useStyle<T extends DefaultRow>(props: TableProps<T>, layout: TableLayout<T>, store: Store<T>, table: Table<T>): {
5
+ isHidden: import("vue").Ref<boolean, boolean>;
6
+ renderExpanded: import("vue").Ref<RenderExpanded<T> | null, RenderExpanded<T> | null>;
7
+ setDragVisible: (visible: boolean) => void;
8
+ isGroup: import("vue").Ref<boolean, boolean>;
9
+ handleMouseLeave: () => void;
10
+ handleHeaderFooterMousewheel: (_event: WheelEvent, data: any) => void;
11
+ tableSize: import("vue").ComputedRef<"" | "small" | "default" | "large">;
12
+ emptyBlockStyle: import("vue").ComputedRef<{
13
+ width: string;
14
+ height: string;
15
+ } | undefined>;
16
+ resizeProxyVisible: import("vue").Ref<boolean, boolean>;
17
+ bodyWidth: import("vue").ComputedRef<string>;
18
+ resizeState: import("vue").Ref<{
19
+ width: null | number;
20
+ height: null | number;
21
+ headerHeight: null | number;
22
+ }, {
23
+ width: null | number;
24
+ height: null | number;
25
+ headerHeight: null | number;
26
+ } | {
27
+ width: null | number;
28
+ height: null | number;
29
+ headerHeight: null | number;
30
+ }>;
31
+ doLayout: () => void;
32
+ tableBodyStyles: import("vue").ComputedRef<{
33
+ width: string;
34
+ }>;
35
+ tableLayout: import("vue").ComputedRef<"fixed" | "auto">;
36
+ scrollbarViewStyle: {
37
+ display: string;
38
+ verticalAlign: string;
39
+ };
40
+ scrollbarStyle: import("vue").ComputedRef<{
41
+ height: string;
42
+ maxHeight?: undefined;
43
+ } | {
44
+ maxHeight: string;
45
+ height?: undefined;
46
+ } | {
47
+ height?: undefined;
48
+ maxHeight?: undefined;
49
+ }>;
50
+ };
51
+ export default useStyle;
@@ -0,0 +1,169 @@
1
+ import { ref as n, watch as x, unref as N, watchEffect as J, computed as h, onMounted as Q, nextTick as Z } from "vue";
2
+ import { useEventListener as V, useResizeObserver as A } from "@vueuse/core";
3
+ import "../../../form/index.js";
4
+ import { useFormSize as ee } from "../../../form/src/hooks/use-form-common-props.js";
5
+ function le(r, o, a, i) {
6
+ const F = n(!1), K = n(null), p = n(!1), X = (e) => {
7
+ p.value = e;
8
+ }, c = n({
9
+ width: null,
10
+ height: null,
11
+ headerHeight: null
12
+ }), k = n(!1), P = {
13
+ display: "inline-block",
14
+ verticalAlign: "middle"
15
+ }, w = n(), L = n(0), y = n(0), d = n(0), g = n(0), R = n(0);
16
+ x(
17
+ () => r.height,
18
+ (e) => {
19
+ o.setHeight(e ?? null);
20
+ },
21
+ { immediate: !0 }
22
+ ), x(
23
+ () => r.maxHeight,
24
+ (e) => {
25
+ o.setMaxHeight(e ?? null);
26
+ },
27
+ { immediate: !0 }
28
+ ), x(
29
+ () => [r.currentRowKey, a.states.rowKey],
30
+ ([e, t]) => {
31
+ !N(t) || !N(e) || a.setCurrentRowKey(`${e}`);
32
+ },
33
+ {
34
+ immediate: !0
35
+ }
36
+ ), x(
37
+ () => r.data,
38
+ (e) => {
39
+ i.store.commit("setData", e);
40
+ },
41
+ {
42
+ immediate: !0,
43
+ deep: !0
44
+ }
45
+ ), J(() => {
46
+ r.expandRowKeys && a.setExpandRowKeysAdapter(r.expandRowKeys);
47
+ });
48
+ const q = () => {
49
+ i.store.commit("setHoverRow", null), i.hoverState && (i.hoverState = null);
50
+ }, D = (e, t) => {
51
+ const { pixelX: s, pixelY: f } = t;
52
+ Math.abs(s) >= Math.abs(f) && (i.refs.bodyWrapper.scrollLeft += t.pixelX / 5);
53
+ }, C = h(() => r.height || r.maxHeight || a.states.fixedColumns.value.length > 0 || a.states.rightFixedColumns.value.length > 0), U = h(() => ({
54
+ width: o.bodyWidth.value ? `${o.bodyWidth.value}px` : ""
55
+ })), W = () => {
56
+ C.value && o.updateElsHeight(), o.updateColumnsWidth(), !(typeof window > "u") && requestAnimationFrame($);
57
+ };
58
+ Q(async () => {
59
+ await Z(), a.updateColumns(), b(), requestAnimationFrame(W);
60
+ const e = i.vnode.el, t = i.refs.headerWrapper;
61
+ r.flexible && e && e.parentElement && (e.parentElement.style.minWidth = "0"), c.value = {
62
+ width: w.value = e.offsetWidth,
63
+ height: e.offsetHeight,
64
+ headerHeight: r.showHeader && t ? t.offsetHeight : null
65
+ }, a.states.columns.value.forEach((s) => {
66
+ s.filteredValue && s.filteredValue.length && i.store.commit("filterChange", {
67
+ column: s,
68
+ values: s.filteredValue,
69
+ silent: !0
70
+ });
71
+ }), i.$ready = !0;
72
+ });
73
+ const Y = (e, t) => {
74
+ if (!e) return;
75
+ const s = Array.from(e.classList).filter(
76
+ (f) => !f.startsWith("is-scrolling-")
77
+ );
78
+ s.push(o.scrollX.value ? t : "is-scrolling-none"), e.className = s.join(" ");
79
+ }, m = (e) => {
80
+ const { tableWrapper: t } = i.refs;
81
+ Y(t, e);
82
+ }, _ = (e) => {
83
+ const { tableWrapper: t } = i.refs;
84
+ return !!(t && t.classList.contains(e));
85
+ }, $ = function() {
86
+ if (!i.refs.scrollBarRef) return;
87
+ if (!o.scrollX.value) {
88
+ const l = "is-scrolling-none";
89
+ _(l) || m(l);
90
+ return;
91
+ }
92
+ const e = i.refs.scrollBarRef.wrapRef;
93
+ if (!e) return;
94
+ const { scrollLeft: t, offsetWidth: s, scrollWidth: f } = e, { headerWrapper: v, footerWrapper: u } = i.refs;
95
+ v && (v.scrollLeft = t), u && (u.scrollLeft = t);
96
+ const H = f - s - 1;
97
+ t >= H ? m("is-scrolling-right") : m(t === 0 ? "is-scrolling-left" : "is-scrolling-middle");
98
+ }, b = () => {
99
+ i.refs.scrollBarRef && (i.refs.scrollBarRef.wrapRef && V(
100
+ i.refs.scrollBarRef.wrapRef,
101
+ "scroll",
102
+ $,
103
+ {
104
+ passive: !0
105
+ }
106
+ ), r.fit ? A(i.vnode.el, S) : V(window, "resize", S), A(i.refs.tableInnerWrapper, () => {
107
+ var e, t;
108
+ S(), (t = (e = i.refs) == null ? void 0 : e.scrollBarRef) == null || t.update();
109
+ }));
110
+ }, S = () => {
111
+ var E, B, z, M;
112
+ const e = i.vnode.el;
113
+ if (!i.$ready || !e) return;
114
+ let t = !1;
115
+ const {
116
+ width: s,
117
+ height: f,
118
+ headerHeight: v
119
+ } = c.value, u = w.value = e.offsetWidth;
120
+ s !== u && (t = !0);
121
+ const H = e.offsetHeight;
122
+ (r.height || C.value) && f !== H && (t = !0);
123
+ const l = r.tableLayout === "fixed" ? i.refs.headerWrapper : (E = i.refs.tableHeaderRef) == null ? void 0 : E.$el;
124
+ r.showHeader && (l == null ? void 0 : l.offsetHeight) !== v && (t = !0), L.value = ((B = i.refs.tableWrapper) == null ? void 0 : B.scrollHeight) || 0, d.value = (l == null ? void 0 : l.scrollHeight) || 0, g.value = ((z = i.refs.footerWrapper) == null ? void 0 : z.offsetHeight) || 0, R.value = ((M = i.refs.appendWrapper) == null ? void 0 : M.offsetHeight) || 0, y.value = L.value - d.value - g.value - R.value, t && (c.value = {
125
+ width: u,
126
+ height: H,
127
+ headerHeight: r.showHeader && (l == null ? void 0 : l.offsetHeight) || 0
128
+ }, W());
129
+ }, j = ee(), G = h(() => {
130
+ const { bodyWidth: e, scrollY: t, gutterWidth: s } = o;
131
+ return e.value ? `${e.value - (t.value ? s : 0)}px` : "";
132
+ }), I = h(() => r.maxHeight ? "fixed" : r.tableLayout), O = h(() => {
133
+ if (r.data && r.data.length) return;
134
+ let e = "100%";
135
+ r.height && y.value && (e = `${y.value}px`);
136
+ const t = w.value;
137
+ return {
138
+ width: t ? `${t}px` : "",
139
+ height: e
140
+ };
141
+ }), T = h(() => r.height ? {
142
+ height: "100%"
143
+ } : r.maxHeight ? Number.isNaN(Number(r.maxHeight)) ? {
144
+ maxHeight: `calc(${r.maxHeight} - ${d.value + g.value}px)`
145
+ } : {
146
+ maxHeight: `${+r.maxHeight - d.value - g.value}px`
147
+ } : {});
148
+ return {
149
+ isHidden: F,
150
+ renderExpanded: K,
151
+ setDragVisible: X,
152
+ isGroup: k,
153
+ handleMouseLeave: q,
154
+ handleHeaderFooterMousewheel: D,
155
+ tableSize: j,
156
+ emptyBlockStyle: O,
157
+ resizeProxyVisible: p,
158
+ bodyWidth: G,
159
+ resizeState: c,
160
+ doLayout: W,
161
+ tableBodyStyles: U,
162
+ tableLayout: I,
163
+ scrollbarViewStyle: P,
164
+ scrollbarStyle: T
165
+ };
166
+ }
167
+ export {
168
+ le as default
169
+ };
@@ -0,0 +1,16 @@
1
+ import type { Store } from '../store';
2
+ import type { DefaultRow } from './defaults';
3
+ declare function useUtils<T extends DefaultRow>(store: Store<T>): {
4
+ setCurrentRow: (row?: T) => void;
5
+ getSelectionRows: () => T[];
6
+ getHalfSelectionRows: () => T[];
7
+ toggleRowSelection: (row: T, selected?: boolean, ignoreSelectable?: boolean) => void;
8
+ clearSelection: () => void;
9
+ clearFilter: (columnKeys?: string[] | string) => void;
10
+ toggleAllSelection: () => void;
11
+ toggleRowExpansion: (row: T, expanded?: boolean) => void;
12
+ clearSort: () => void;
13
+ sort: (prop: string, order: string) => void;
14
+ updateKeyChildren: (key: string, data: T[]) => void;
15
+ };
16
+ export default useUtils;
@@ -0,0 +1,36 @@
1
+ function d(e) {
2
+ return {
3
+ setCurrentRow: (t) => {
4
+ e.commit("setCurrentRow", t);
5
+ },
6
+ getSelectionRows: () => e.getSelectionRows(),
7
+ getHalfSelectionRows: () => e.getHalfSelectionRows(),
8
+ toggleRowSelection: (t, l, o = !0) => {
9
+ e.toggleRowSelection(t, l, !1, o), e.updateAllSelected();
10
+ },
11
+ clearSelection: () => {
12
+ e.clearSelection();
13
+ },
14
+ clearFilter: (t) => {
15
+ e.clearFilter(t);
16
+ },
17
+ toggleAllSelection: () => {
18
+ e.commit("toggleAllSelection");
19
+ },
20
+ toggleRowExpansion: (t, l) => {
21
+ e.toggleRowExpansionAdapter(t, l);
22
+ },
23
+ clearSort: () => {
24
+ e.clearSort();
25
+ },
26
+ sort: (t, l) => {
27
+ e.commit("sort", { prop: t, order: l });
28
+ },
29
+ updateKeyChildren: (t, l) => {
30
+ e.updateKeyChildren(t, l);
31
+ }
32
+ };
33
+ }
34
+ export {
35
+ d as default
36
+ };
@@ -0,0 +1,39 @@
1
+ import type { PropType } from 'vue';
2
+ import type { Store } from '../store';
3
+ import type { ColumnCls, ColumnStyle, DefaultRow, Table } from '../table/defaults';
4
+ import type { TableOverflowTooltipOptions } from '../util';
5
+ interface TableBodyProps<T extends DefaultRow> {
6
+ store: Store<T>;
7
+ stripe?: boolean;
8
+ context: Table<T>;
9
+ rowClassName: ColumnCls<T>;
10
+ rowStyle: ColumnStyle<T>;
11
+ fixed: string;
12
+ highlight: boolean;
13
+ tooltipEffect?: string;
14
+ tooltipOptions?: TableOverflowTooltipOptions;
15
+ }
16
+ declare const defaultProps: {
17
+ store: {
18
+ required: boolean;
19
+ type: PropType<TableBodyProps<any>["store"]>;
20
+ };
21
+ stripe: BooleanConstructor;
22
+ tooltipEffect: StringConstructor;
23
+ tooltipOptions: {
24
+ type: PropType<TableBodyProps<any>["tooltipOptions"]>;
25
+ };
26
+ context: {
27
+ default: () => {};
28
+ type: PropType<TableBodyProps<any>["context"]>;
29
+ };
30
+ rowClassName: PropType<TableBodyProps<any>["rowClassName"]>;
31
+ rowStyle: PropType<TableBodyProps<any>["rowStyle"]>;
32
+ fixed: {
33
+ type: StringConstructor;
34
+ default: string;
35
+ };
36
+ highlight: BooleanConstructor;
37
+ };
38
+ export type { TableBodyProps };
39
+ export default defaultProps;
@@ -0,0 +1,25 @@
1
+ const t = {
2
+ store: {
3
+ required: !0,
4
+ type: Object
5
+ },
6
+ stripe: Boolean,
7
+ tooltipEffect: String,
8
+ tooltipOptions: {
9
+ type: Object
10
+ },
11
+ context: {
12
+ default: () => ({}),
13
+ type: Object
14
+ },
15
+ rowClassName: [String, Function],
16
+ rowStyle: [Object, Function],
17
+ fixed: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ highlight: Boolean
22
+ };
23
+ export {
24
+ t as default
25
+ };
@@ -0,0 +1,19 @@
1
+ import type { TableBodyProps } from './defaults';
2
+ import type { TableOverflowTooltipOptions } from '../util';
3
+ import type { DefaultRow } from '../table/defaults';
4
+ declare function useEvents<T extends DefaultRow>(props: Partial<TableBodyProps<T>>): {
5
+ handleDoubleClick: (event: MouseEvent, row: T) => void;
6
+ handleClick: (event: PointerEvent, row: T) => void;
7
+ handleContextMenu: (event: PointerEvent, row: T) => void;
8
+ handleMouseEnter: import("lodash-unified").DebouncedFunc<(index: number) => void>;
9
+ handleMouseLeave: import("lodash-unified").DebouncedFunc<() => void>;
10
+ handleCellMouseEnter: (event: MouseEvent, row: T, tooltipOptions: TableOverflowTooltipOptions) => void;
11
+ handleCellMouseLeave: (event: MouseEvent) => void;
12
+ tooltipContent: import("vue").Ref<string, string>;
13
+ tooltipTrigger: import("vue").Ref<import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
14
+ [key: string]: any;
15
+ }>, import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
16
+ [key: string]: any;
17
+ }>>;
18
+ };
19
+ export default useEvents;