@hi-ui/schema-editable-table 4.0.0-experimental.1

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 (284) hide show
  1. package/README.md +11 -0
  2. package/lib/cjs/body/index.js +110 -0
  3. package/lib/cjs/body/wrapper.js +132 -0
  4. package/lib/cjs/cell/aggregated.js +76 -0
  5. package/lib/cjs/cell/dependency.js +97 -0
  6. package/lib/cjs/cell/editing.js +89 -0
  7. package/lib/cjs/cell/footer.js +64 -0
  8. package/lib/cjs/cell/header.js +76 -0
  9. package/lib/cjs/cell/index.js +204 -0
  10. package/lib/cjs/const.js +35 -0
  11. package/lib/cjs/container/base.js +39 -0
  12. package/lib/cjs/container/bottom.js +86 -0
  13. package/lib/cjs/container/col-group.js +98 -0
  14. package/lib/cjs/container/column-virtual.js +53 -0
  15. package/lib/cjs/container/ctx.js +32 -0
  16. package/lib/cjs/container/full-virtual.js +61 -0
  17. package/lib/cjs/container/hooks.js +102 -0
  18. package/lib/cjs/container/index.js +69 -0
  19. package/lib/cjs/container/row-virtual.js +50 -0
  20. package/lib/cjs/container/wrapper.js +97 -0
  21. package/lib/cjs/ctx.js +32 -0
  22. package/lib/cjs/features/_overrides/aggregated.js +44 -0
  23. package/lib/cjs/features/_overrides/getter.js +61 -0
  24. package/lib/cjs/features/_overrides/grouping.js +40 -0
  25. package/lib/cjs/features/_overrides/overrides.js +43 -0
  26. package/lib/cjs/features/_overrides/row-selection.js +140 -0
  27. package/lib/cjs/features/async-data/getter.js +150 -0
  28. package/lib/cjs/features/async-data/normal.js +145 -0
  29. package/lib/cjs/features/async-data/use-data-fetcher.js +40 -0
  30. package/lib/cjs/features/async-data/use-reset-data.js +91 -0
  31. package/lib/cjs/features/column-grouping/get-grouping-config.js +27 -0
  32. package/lib/cjs/features/column-grouping/use-opts.js +42 -0
  33. package/lib/cjs/features/column-state.js +57 -0
  34. package/lib/cjs/features/filter/bridge.js +114 -0
  35. package/lib/cjs/features/filter/filter-fns/date.js +34 -0
  36. package/lib/cjs/features/filter/filter-fns/index.js +23 -0
  37. package/lib/cjs/features/filter/get-filter-config.js +61 -0
  38. package/lib/cjs/features/filter/index.js +29 -0
  39. package/lib/cjs/features/filter/use-opts.js +88 -0
  40. package/lib/cjs/features/header-actions/components/column-collapsing.js +74 -0
  41. package/lib/cjs/features/header-actions/get-actions.js +77 -0
  42. package/lib/cjs/features/pagination/component.js +89 -0
  43. package/lib/cjs/features/pagination/use-opts.js +98 -0
  44. package/lib/cjs/features/pagination/use-state.js +44 -0
  45. package/lib/cjs/features/row-controller.js +265 -0
  46. package/lib/cjs/features/row-edit/actions.js +65 -0
  47. package/lib/cjs/features/row-edit/hooks.js +29 -0
  48. package/lib/cjs/features/row-expanding/use-opts.js +39 -0
  49. package/lib/cjs/features/row-expanding/wrapper.js +74 -0
  50. package/lib/cjs/features/row-operation/buttons.js +91 -0
  51. package/lib/cjs/features/row-operation/cell.js +43 -0
  52. package/lib/cjs/features/row-operation/index.js +21 -0
  53. package/lib/cjs/features/row-operation/wrapper.js +114 -0
  54. package/lib/cjs/features/row-selection/cell.js +114 -0
  55. package/lib/cjs/features/row-selection/const.js +16 -0
  56. package/lib/cjs/features/row-selection/hooks/index.js +29 -0
  57. package/lib/cjs/features/row-selection/hooks/use-click-select.js +70 -0
  58. package/lib/cjs/features/row-selection/hooks/use-opts.js +120 -0
  59. package/lib/cjs/features/row-selection/hooks/use-set-selected-row-keys.js +48 -0
  60. package/lib/cjs/features/row-selection/hooks/use-sync-hover-style.js +86 -0
  61. package/lib/cjs/features/row-selection/indicator.js +173 -0
  62. package/lib/cjs/features/row-selection/wrapper.js +119 -0
  63. package/lib/cjs/features/setting-bridge.js +56 -0
  64. package/lib/cjs/features/sorter/bridge.js +65 -0
  65. package/lib/cjs/features/sorter/get-sorter-config.js +46 -0
  66. package/lib/cjs/features/sorter/index.js +29 -0
  67. package/lib/cjs/features/sorter/use-opts.js +81 -0
  68. package/lib/cjs/field-bridge/bridge.js +104 -0
  69. package/lib/cjs/field-bridge/index.js +58 -0
  70. package/lib/cjs/field-bridge/toolbar.js +53 -0
  71. package/lib/cjs/footer/index.js +99 -0
  72. package/lib/cjs/footer/use-first-cell-patch.js +42 -0
  73. package/lib/cjs/header/index.js +134 -0
  74. package/lib/cjs/header/validate.js +69 -0
  75. package/lib/cjs/hooks/use-get-fields-value.js +62 -0
  76. package/lib/cjs/hooks/use-global-actions.js +65 -0
  77. package/lib/cjs/hooks/use-global-static.js +158 -0
  78. package/lib/cjs/hooks/use-initial-render.js +30 -0
  79. package/lib/cjs/hooks/use-inner-ctx.js +105 -0
  80. package/lib/cjs/hooks/use-props.js +108 -0
  81. package/lib/cjs/hooks/use-table-columns.js +76 -0
  82. package/lib/cjs/hooks/use-table-meta.js +57 -0
  83. package/lib/cjs/hooks/use-update.js +57 -0
  84. package/lib/cjs/index.js +66 -0
  85. package/lib/cjs/index.scss.js +18 -0
  86. package/lib/cjs/table.js +263 -0
  87. package/lib/cjs/utils/cls.js +19 -0
  88. package/lib/cjs/utils/fixed.js +53 -0
  89. package/lib/cjs/utils/grouping.js +42 -0
  90. package/lib/cjs/utils/state-merge.js +43 -0
  91. package/lib/esm/body/index.js +98 -0
  92. package/lib/esm/body/wrapper.js +120 -0
  93. package/lib/esm/cell/aggregated.js +64 -0
  94. package/lib/esm/cell/dependency.js +90 -0
  95. package/lib/esm/cell/editing.js +76 -0
  96. package/lib/esm/cell/footer.js +52 -0
  97. package/lib/esm/cell/header.js +63 -0
  98. package/lib/esm/cell/index.js +192 -0
  99. package/lib/esm/const.js +24 -0
  100. package/lib/esm/container/base.js +27 -0
  101. package/lib/esm/container/bottom.js +74 -0
  102. package/lib/esm/container/col-group.js +85 -0
  103. package/lib/esm/container/column-virtual.js +41 -0
  104. package/lib/esm/container/ctx.js +19 -0
  105. package/lib/esm/container/full-virtual.js +49 -0
  106. package/lib/esm/container/hooks.js +95 -0
  107. package/lib/esm/container/index.js +57 -0
  108. package/lib/esm/container/row-virtual.js +38 -0
  109. package/lib/esm/container/wrapper.js +83 -0
  110. package/lib/esm/ctx.js +17 -0
  111. package/lib/esm/features/_overrides/aggregated.js +39 -0
  112. package/lib/esm/features/_overrides/getter.js +56 -0
  113. package/lib/esm/features/_overrides/grouping.js +35 -0
  114. package/lib/esm/features/_overrides/overrides.js +38 -0
  115. package/lib/esm/features/_overrides/row-selection.js +135 -0
  116. package/lib/esm/features/async-data/getter.js +143 -0
  117. package/lib/esm/features/async-data/normal.js +133 -0
  118. package/lib/esm/features/async-data/use-data-fetcher.js +34 -0
  119. package/lib/esm/features/async-data/use-reset-data.js +79 -0
  120. package/lib/esm/features/column-grouping/get-grouping-config.js +22 -0
  121. package/lib/esm/features/column-grouping/use-opts.js +36 -0
  122. package/lib/esm/features/column-state.js +51 -0
  123. package/lib/esm/features/filter/bridge.js +102 -0
  124. package/lib/esm/features/filter/filter-fns/date.js +28 -0
  125. package/lib/esm/features/filter/filter-fns/index.js +18 -0
  126. package/lib/esm/features/filter/get-filter-config.js +56 -0
  127. package/lib/esm/features/filter/index.js +24 -0
  128. package/lib/esm/features/filter/use-opts.js +82 -0
  129. package/lib/esm/features/header-actions/components/column-collapsing.js +62 -0
  130. package/lib/esm/features/header-actions/get-actions.js +65 -0
  131. package/lib/esm/features/pagination/component.js +77 -0
  132. package/lib/esm/features/pagination/use-opts.js +91 -0
  133. package/lib/esm/features/pagination/use-state.js +39 -0
  134. package/lib/esm/features/row-controller.js +253 -0
  135. package/lib/esm/features/row-edit/actions.js +53 -0
  136. package/lib/esm/features/row-edit/hooks.js +24 -0
  137. package/lib/esm/features/row-expanding/use-opts.js +33 -0
  138. package/lib/esm/features/row-expanding/wrapper.js +62 -0
  139. package/lib/esm/features/row-operation/buttons.js +79 -0
  140. package/lib/esm/features/row-operation/cell.js +31 -0
  141. package/lib/esm/features/row-operation/index.js +16 -0
  142. package/lib/esm/features/row-operation/wrapper.js +100 -0
  143. package/lib/esm/features/row-selection/cell.js +101 -0
  144. package/lib/esm/features/row-selection/const.js +11 -0
  145. package/lib/esm/features/row-selection/hooks/index.js +24 -0
  146. package/lib/esm/features/row-selection/hooks/use-click-select.js +65 -0
  147. package/lib/esm/features/row-selection/hooks/use-opts.js +114 -0
  148. package/lib/esm/features/row-selection/hooks/use-set-selected-row-keys.js +43 -0
  149. package/lib/esm/features/row-selection/hooks/use-sync-hover-style.js +81 -0
  150. package/lib/esm/features/row-selection/indicator.js +159 -0
  151. package/lib/esm/features/row-selection/wrapper.js +107 -0
  152. package/lib/esm/features/setting-bridge.js +50 -0
  153. package/lib/esm/features/sorter/bridge.js +53 -0
  154. package/lib/esm/features/sorter/get-sorter-config.js +41 -0
  155. package/lib/esm/features/sorter/index.js +24 -0
  156. package/lib/esm/features/sorter/use-opts.js +75 -0
  157. package/lib/esm/field-bridge/bridge.js +92 -0
  158. package/lib/esm/field-bridge/index.js +44 -0
  159. package/lib/esm/field-bridge/toolbar.js +41 -0
  160. package/lib/esm/footer/index.js +87 -0
  161. package/lib/esm/footer/use-first-cell-patch.js +37 -0
  162. package/lib/esm/header/index.js +121 -0
  163. package/lib/esm/header/validate.js +64 -0
  164. package/lib/esm/hooks/use-get-fields-value.js +56 -0
  165. package/lib/esm/hooks/use-global-actions.js +60 -0
  166. package/lib/esm/hooks/use-global-static.js +152 -0
  167. package/lib/esm/hooks/use-initial-render.js +18 -0
  168. package/lib/esm/hooks/use-inner-ctx.js +100 -0
  169. package/lib/esm/hooks/use-props.js +102 -0
  170. package/lib/esm/hooks/use-table-columns.js +70 -0
  171. package/lib/esm/hooks/use-table-meta.js +51 -0
  172. package/lib/esm/hooks/use-update.js +52 -0
  173. package/lib/esm/index.js +38 -0
  174. package/lib/esm/index.scss.js +13 -0
  175. package/lib/esm/table.js +251 -0
  176. package/lib/esm/utils/cls.js +13 -0
  177. package/lib/esm/utils/fixed.js +48 -0
  178. package/lib/esm/utils/grouping.js +36 -0
  179. package/lib/esm/utils/state-merge.js +37 -0
  180. package/lib/types/body/index.d.ts +14 -0
  181. package/lib/types/body/wrapper.d.ts +18 -0
  182. package/lib/types/cell/aggregated.d.ts +35 -0
  183. package/lib/types/cell/custom.d.ts +19 -0
  184. package/lib/types/cell/dependency.d.ts +47 -0
  185. package/lib/types/cell/editing.d.ts +8 -0
  186. package/lib/types/cell/footer.d.ts +5 -0
  187. package/lib/types/cell/header.d.ts +5 -0
  188. package/lib/types/cell/index.d.ts +6 -0
  189. package/lib/types/const.d.ts +11 -0
  190. package/lib/types/container/base.d.ts +2 -0
  191. package/lib/types/container/bottom.d.ts +20 -0
  192. package/lib/types/container/col-group.d.ts +11 -0
  193. package/lib/types/container/column-virtual.d.ts +7 -0
  194. package/lib/types/container/ctx.d.ts +23 -0
  195. package/lib/types/container/full-virtual.d.ts +8 -0
  196. package/lib/types/container/hooks.d.ts +13 -0
  197. package/lib/types/container/index.d.ts +17 -0
  198. package/lib/types/container/row-virtual.d.ts +7 -0
  199. package/lib/types/container/type.d.ts +17 -0
  200. package/lib/types/container/wrapper.d.ts +12 -0
  201. package/lib/types/ctx.d.ts +41 -0
  202. package/lib/types/features/_overrides/aggregated.d.ts +2 -0
  203. package/lib/types/features/_overrides/getter.d.ts +2 -0
  204. package/lib/types/features/_overrides/grouping.d.ts +7 -0
  205. package/lib/types/features/_overrides/index.d.ts +5 -0
  206. package/lib/types/features/_overrides/overrides.d.ts +2 -0
  207. package/lib/types/features/_overrides/row-selection.d.ts +2 -0
  208. package/lib/types/features/async-data/getter.d.ts +9 -0
  209. package/lib/types/features/async-data/group.d.ts +1 -0
  210. package/lib/types/features/async-data/index.d.ts +6 -0
  211. package/lib/types/features/async-data/normal.d.ts +48 -0
  212. package/lib/types/features/async-data/type.d.ts +22 -0
  213. package/lib/types/features/async-data/use-data-fetcher.d.ts +22 -0
  214. package/lib/types/features/async-data/use-reset-data.d.ts +14 -0
  215. package/lib/types/features/column-grouping/get-grouping-config.d.ts +2 -0
  216. package/lib/types/features/column-grouping/index.d.ts +3 -0
  217. package/lib/types/features/column-grouping/use-opts.d.ts +12 -0
  218. package/lib/types/features/column-state.d.ts +15 -0
  219. package/lib/types/features/filter/bridge.d.ts +9 -0
  220. package/lib/types/features/filter/filter-fns/date.d.ts +6 -0
  221. package/lib/types/features/filter/filter-fns/index.d.ts +6 -0
  222. package/lib/types/features/filter/get-filter-config.d.ts +4 -0
  223. package/lib/types/features/filter/index.d.ts +8 -0
  224. package/lib/types/features/filter/use-opts.d.ts +62 -0
  225. package/lib/types/features/header-actions/components/column-collapsing.d.ts +4 -0
  226. package/lib/types/features/header-actions/get-actions.d.ts +13 -0
  227. package/lib/types/features/header-actions/index.d.ts +3 -0
  228. package/lib/types/features/header-actions/type.d.ts +20 -0
  229. package/lib/types/features/pagination/component.d.ts +15 -0
  230. package/lib/types/features/pagination/index.d.ts +4 -0
  231. package/lib/types/features/pagination/use-opts.d.ts +14 -0
  232. package/lib/types/features/pagination/use-state.d.ts +11 -0
  233. package/lib/types/features/row-controller.d.ts +101 -0
  234. package/lib/types/features/row-edit/actions.d.ts +12 -0
  235. package/lib/types/features/row-edit/hooks.d.ts +1 -0
  236. package/lib/types/features/row-edit/index.d.ts +2 -0
  237. package/lib/types/features/row-expanding/index.d.ts +3 -0
  238. package/lib/types/features/row-expanding/use-opts.d.ts +12 -0
  239. package/lib/types/features/row-expanding/wrapper.d.ts +11 -0
  240. package/lib/types/features/row-operation/buttons.d.ts +41 -0
  241. package/lib/types/features/row-operation/cell.d.ts +6 -0
  242. package/lib/types/features/row-operation/index.d.ts +18 -0
  243. package/lib/types/features/row-operation/wrapper.d.ts +3 -0
  244. package/lib/types/features/row-selection/cell.d.ts +62 -0
  245. package/lib/types/features/row-selection/const.d.ts +1 -0
  246. package/lib/types/features/row-selection/hooks/index.d.ts +6 -0
  247. package/lib/types/features/row-selection/hooks/use-click-select.d.ts +1 -0
  248. package/lib/types/features/row-selection/hooks/use-opts.d.ts +15 -0
  249. package/lib/types/features/row-selection/hooks/use-set-selected-row-keys.d.ts +9 -0
  250. package/lib/types/features/row-selection/hooks/use-sync-hover-style.d.ts +5 -0
  251. package/lib/types/features/row-selection/index.d.ts +7 -0
  252. package/lib/types/features/row-selection/indicator.d.ts +8 -0
  253. package/lib/types/features/row-selection/wrapper.d.ts +9 -0
  254. package/lib/types/features/setting-bridge.d.ts +14 -0
  255. package/lib/types/features/sorter/bridge.d.ts +8 -0
  256. package/lib/types/features/sorter/get-sorter-config.d.ts +7 -0
  257. package/lib/types/features/sorter/index.d.ts +8 -0
  258. package/lib/types/features/sorter/use-opts.d.ts +71 -0
  259. package/lib/types/field-bridge/bridge.d.ts +18 -0
  260. package/lib/types/field-bridge/index.d.ts +11 -0
  261. package/lib/types/field-bridge/toolbar.d.ts +9 -0
  262. package/lib/types/footer/index.d.ts +6 -0
  263. package/lib/types/footer/use-first-cell-patch.d.ts +1 -0
  264. package/lib/types/header/index.d.ts +17 -0
  265. package/lib/types/header/validate.d.ts +10 -0
  266. package/lib/types/hooks/use-get-fields-value.d.ts +14 -0
  267. package/lib/types/hooks/use-global-actions.d.ts +24 -0
  268. package/lib/types/hooks/use-global-static.d.ts +83 -0
  269. package/lib/types/hooks/use-initial-render.d.ts +1 -0
  270. package/lib/types/hooks/use-inner-ctx.d.ts +12 -0
  271. package/lib/types/hooks/use-props.d.ts +109 -0
  272. package/lib/types/hooks/use-table-columns.d.ts +11 -0
  273. package/lib/types/hooks/use-table-meta.d.ts +15 -0
  274. package/lib/types/hooks/use-update.d.ts +11 -0
  275. package/lib/types/index.d.ts +32 -0
  276. package/lib/types/table.d.ts +152 -0
  277. package/lib/types/utils/cls.d.ts +4 -0
  278. package/lib/types/utils/fixed.d.ts +11 -0
  279. package/lib/types/utils/grouping.d.ts +6 -0
  280. package/lib/types/utils/index.d.ts +5 -0
  281. package/lib/types/utils/meta.d.ts +8 -0
  282. package/lib/types/utils/state-merge.d.ts +14 -0
  283. package/package.json +90 -0
  284. package/type.d.ts +143 -0
@@ -0,0 +1,100 @@
1
+ /** @LICENSE
2
+ * @hi-ui/schema-editable-table
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/schema/schema-editable-table#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ import { useCallback, useMemo } from 'react';
11
+ import { useLatest } from 'ahooks';
12
+ import { getCellOpFn } from './use-table-meta.js';
13
+
14
+ /**
15
+ * 组装内部上下文
16
+ * @desc 没啥特殊逻辑,完全是Table里代码太多了,精简拆分一下
17
+ */
18
+ function useTableInnerCtx(ctx) {
19
+ var table = ctx.table,
20
+ setDynamicOpts = ctx.setDynamicOpts,
21
+ subscription = ctx.subscription,
22
+ tableContainerRef = ctx.tableContainerRef,
23
+ rowActions = ctx.rowActions,
24
+ rowSelectionState = ctx.rowSelectionState,
25
+ paginationState = ctx.paginationState,
26
+ filterState = ctx.filterState,
27
+ sorterState = ctx.sorterState,
28
+ propsRef = ctx.propsRef,
29
+ globalStaticRef = ctx.globalStaticRef,
30
+ globalActionsRef = ctx.globalActionsRef,
31
+ rerender = ctx.rerender,
32
+ getFieldsValue = ctx.getFieldsValue,
33
+ getGroupedValues = ctx.getGroupedValues;
34
+ var _globalActionsRef$cur = globalActionsRef.current,
35
+ getDataSource = _globalActionsRef$cur.getDataSource,
36
+ updateDataSource = _globalActionsRef$cur.updateDataSource,
37
+ resetDataSource = _globalActionsRef$cur.resetDataSource,
38
+ setDataSource = _globalActionsRef$cur.setDataSource,
39
+ setSelectedRowKeys = _globalActionsRef$cur.setSelectedRowKeys;
40
+ var scrollIntoView = useCallback(function scrollIntoView(behavior) {
41
+ if (behavior === void 0) {
42
+ behavior = 'instant';
43
+ }
44
+ var _a;
45
+ (_a = tableContainerRef.current) === null || _a === void 0 ? void 0 : _a.scrollTo({
46
+ top: 0,
47
+ left: 0,
48
+ behavior: behavior
49
+ });
50
+ }, [tableContainerRef]);
51
+ var exposeCtxValue = function exposeCtxValue() {
52
+ var exposed = Object.assign(Object.assign({
53
+ table: table,
54
+ subscription: subscription,
55
+ rowActions: rowActions,
56
+ rerender: rerender,
57
+ getFieldsValue: getFieldsValue,
58
+ getGroupedValues: getGroupedValues,
59
+ getDataSource: getDataSource,
60
+ updateDataSource: updateDataSource,
61
+ resetDataSource: resetDataSource,
62
+ setDataSource: setDataSource
63
+ }, getCellOpFn(table)), {
64
+ setSelectedRowKeys: setSelectedRowKeys,
65
+ scrollIntoView: scrollIntoView,
66
+ innerRef: getInnerRef()
67
+ });
68
+ return exposed;
69
+ };
70
+ // 内部可能会需要暴露出去的值
71
+ var exposeCtxValueRef = useLatest(exposeCtxValue);
72
+ var ctxValue = useMemo(function () {
73
+ var values = {
74
+ table: table,
75
+ setDynamicOpts: setDynamicOpts,
76
+ subscription: subscription,
77
+ tableContainerRef: tableContainerRef,
78
+ rowActions: rowActions,
79
+ rowSelectionState: rowSelectionState,
80
+ paginationState: paginationState,
81
+ filterState: filterState,
82
+ sorterState: sorterState,
83
+ propsRef: propsRef,
84
+ globalStaticRef: globalStaticRef,
85
+ globalActionsRef: globalActionsRef,
86
+ exposeCtxValueRef: exposeCtxValueRef
87
+ };
88
+ return values;
89
+ }, [table, setDynamicOpts, subscription, tableContainerRef, rowActions, rowSelectionState, paginationState, filterState, sorterState, propsRef, globalStaticRef, globalActionsRef, exposeCtxValueRef]);
90
+ function getInnerRef() {
91
+ return {
92
+ current: ctxValue
93
+ };
94
+ }
95
+ return {
96
+ ctxValue: ctxValue,
97
+ exposeCtxValue: exposeCtxValue
98
+ };
99
+ }
100
+ export { useTableInnerCtx };
@@ -0,0 +1,102 @@
1
+ /** @LICENSE
2
+ * @hi-ui/schema-editable-table
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/schema/schema-editable-table#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ import { useLatest } from 'ahooks';
11
+ import { getBoolConfig } from '@hi-ui/schema-utils';
12
+ import { dftPageSize } from '../features/pagination/use-opts.js';
13
+ import { dftSelectionType } from '../features/row-selection/const.js';
14
+ import { genStaticOptsFromPropsRef } from './use-global-static.js';
15
+ function getNormalizedProps(props) {
16
+ var _a;
17
+ var debugOpts = getBoolConfig(props.debug, {
18
+ debugAll: true
19
+ }, {
20
+ mergeDft: false
21
+ } // 不合并默认值,用户只要传值,就都以用户为准
22
+ );
23
+ // 表头和表尾的 fixed 配置
24
+ var stickyOpts = getBoolConfig(props.sticky,
25
+ // stickyOpts
26
+ {
27
+ header: true,
28
+ footer: true
29
+ }, {
30
+ mergeDft: true
31
+ });
32
+ // 虚拟化配置
33
+ var virtualizeConfig = getBoolConfig(props.virtualize, {
34
+ row: true,
35
+ column: true
36
+ }, {
37
+ mergeDft: true
38
+ });
39
+ var virtualizeOpts = virtualizeConfig ? {
40
+ row: getBoolConfig(virtualizeConfig === null || virtualizeConfig === void 0 ? void 0 : virtualizeConfig.row, {}),
41
+ column: getBoolConfig(virtualizeConfig === null || virtualizeConfig === void 0 ? void 0 : virtualizeConfig.column, {})
42
+ } : undefined;
43
+ // 行选择配置
44
+ var rowSelectionConfig = getBoolConfig(props.rowSelection, {
45
+ type: dftSelectionType
46
+ }, {
47
+ mergeDft: true
48
+ });
49
+ var rowSelectionOpts = rowSelectionConfig ? Object.assign(Object.assign({}, rowSelectionConfig), {
50
+ enableIndicator: getBoolConfig(rowSelectionConfig === null || rowSelectionConfig === void 0 ? void 0 : rowSelectionConfig.enableIndicator, {})
51
+ }) : undefined;
52
+ // 行操作配置
53
+ var rowOperationOpts = getBoolConfig(props.rowOperation, {});
54
+ // 分页配置
55
+ var paginationOpts = getBoolConfig(props.pagination, {
56
+ pageSize: dftPageSize
57
+ }, {
58
+ mergeDft: true
59
+ });
60
+ // 筛选配置
61
+ var filterOpts = getBoolConfig(props.filter, {});
62
+ // 排序配置
63
+ var sorterOpts = getBoolConfig(props.sorter, {
64
+ sortUndefined: 'last'
65
+ }, {
66
+ mergeDft: true
67
+ });
68
+ var sorterTooltipOpts = getBoolConfig(sorterOpts === null || sorterOpts === void 0 ? void 0 : sorterOpts.tooltip, {});
69
+ var nextSorterOpts = sorterOpts ? Object.assign(Object.assign({}, sorterOpts), {
70
+ tooltip: sorterTooltipOpts
71
+ }) : undefined;
72
+ // 列分组配置
73
+ var groupingOpts = getBoolConfig(props.grouping, {});
74
+ // 行展开配置
75
+ // 如果列分组配置存在,则行展开配置默认开启
76
+ var expandingOpts = getBoolConfig((_a = props.expanding) !== null && _a !== void 0 ? _a : !!groupingOpts, {});
77
+ return Object.assign(Object.assign({}, props), {
78
+ subRowKey: props.subRowKey || 'children',
79
+ debug: debugOpts,
80
+ sticky: stickyOpts,
81
+ virtualize: virtualizeOpts,
82
+ rowSelection: rowSelectionOpts,
83
+ rowOperation: rowOperationOpts,
84
+ pagination: paginationOpts,
85
+ filter: filterOpts,
86
+ sorter: nextSorterOpts,
87
+ grouping: groupingOpts,
88
+ expanding: expandingOpts
89
+ });
90
+ }
91
+ function usePropsRef(props) {
92
+ var nextProps = getNormalizedProps(props);
93
+ var propsRef = useLatest(nextProps);
94
+ // 把只依赖 propsRef 的选项配置提前到此处生成
95
+ var staticOpts = genStaticOptsFromPropsRef(propsRef);
96
+ var staticOptsRef = useLatest(staticOpts);
97
+ return {
98
+ propsRef: propsRef,
99
+ staticOptsRef: staticOptsRef
100
+ };
101
+ }
102
+ export { getNormalizedProps, usePropsRef };
@@ -0,0 +1,70 @@
1
+ /** @LICENSE
2
+ * @hi-ui/schema-editable-table
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/schema/schema-editable-table#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ import { useMemo } from 'react';
11
+ import '@hi-ui/use-subscription';
12
+ import 'lodash-es';
13
+ import '@tanstack/react-table';
14
+ import '@hi-ui/schema-utils';
15
+ import '../utils/cls.js';
16
+ import 'ahooks';
17
+ import { getFilterConfig } from '../features/filter/get-filter-config.js';
18
+ import '@hi-ui/schema-table-extensions';
19
+ import { getSorterConfig } from '../features/sorter/get-sorter-config.js';
20
+ import { getGroupingConfig } from '../features/column-grouping/get-grouping-config.js';
21
+ function MapFieldConfigToColumnDef(fields, ctx) {
22
+ var propsRef = ctx.propsRef;
23
+ return fields.map(function (field) {
24
+ var _a, _b;
25
+ var filterConfig = getFilterConfig(field);
26
+ var sorterConfig = getSorterConfig(field, {
27
+ propsRef: propsRef
28
+ });
29
+ var groupingConfig = getGroupingConfig(field);
30
+ // dataIndex 是必填项,否则无法正确渲染表格
31
+ // NOTE header 采用复杂单元格渲染后,dataIndex 必填,否则会直接导致表格崩溃
32
+ // 也就是说,打开下面 [header: field.title,] 这行的注释后,dataIndex 也可以不填[doge]
33
+ if (!field.dataIndex) {
34
+ var fieldName = field._titleText || field.title || field.key;
35
+ console.error("EditableSchemaTable: \u5B57\u6BB5\u3010" + fieldName + "\u3011\u7F3A\u5C11 dataIndex \u5C5E\u6027\uFF0C\u8BF7\u68C0\u67E5\u540E\u8865\u5145\uFF01\n");
36
+ }
37
+ return {
38
+ // header: field.title,
39
+ accessorKey: field.dataIndex,
40
+ size: (_a = field.wrapperProps) === null || _a === void 0 ? void 0 : _a.width,
41
+ columns: field.children ? MapFieldConfigToColumnDef(field.children, ctx) : undefined,
42
+ filterFn: filterConfig === null || filterConfig === void 0 ? void 0 : filterConfig.filterFn,
43
+ sortingFn: sorterConfig === null || sorterConfig === void 0 ? void 0 : sorterConfig.sortingFn,
44
+ sortUndefined: sorterConfig === null || sorterConfig === void 0 ? void 0 : sorterConfig.sortUndefined,
45
+ aggregationFn: groupingConfig === null || groupingConfig === void 0 ? void 0 : groupingConfig.aggregationFn,
46
+ // count
47
+ meta: Object.assign(Object.assign({
48
+ field: field
49
+ }, field.control), {
50
+ filter: filterConfig,
51
+ sorter: sorterConfig,
52
+ grouping: groupingConfig,
53
+ shouldUpdate: (_b = field.payload) === null || _b === void 0 ? void 0 : _b.shouldUpdate
54
+ })
55
+ // TODO 待确认还有其他的能直接透传给 ColumnDef 的属性
56
+ };
57
+ });
58
+ }
59
+
60
+ function useTableColumns(ctx) {
61
+ var propsRef = ctx.propsRef;
62
+ var fields = propsRef.current.fields;
63
+ return useMemo(function () {
64
+ var cols = MapFieldConfigToColumnDef(fields, {
65
+ propsRef: propsRef
66
+ });
67
+ return cols;
68
+ }, [fields, propsRef]);
69
+ }
70
+ export { MapFieldConfigToColumnDef, useTableColumns };
@@ -0,0 +1,51 @@
1
+ /** @LICENSE
2
+ * @hi-ui/schema-editable-table
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/schema/schema-editable-table#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ import { get, isEqual } from 'lodash-es';
11
+ var useTableMeta = function useTableMeta(tableValue, ctx) {
12
+ var updateData = function updateData(rowIndex, columnId, value) {
13
+ var _rowIndex, _patch;
14
+ var patch = (_patch = {}, _patch[rowIndex] = (_rowIndex = {}, _rowIndex[columnId] = value, _rowIndex), _patch);
15
+ // 行编辑模式下,不必检查是否相等,直接写入 draft
16
+ var enableRowEdit = ctx.innerRef.current.globalStaticRef.current.enableRowEdit;
17
+ if (enableRowEdit) {
18
+ tableValue.mergeDraft(patch);
19
+ return;
20
+ }
21
+ // 普通编辑模式
22
+ var allValues = tableValue.getValue();
23
+ var prevValue = get(allValues, [rowIndex, columnId]);
24
+ // 值相等,则不更新
25
+ if (isEqual(prevValue, value)) return;
26
+ tableValue.batchMerge(patch).then(function (result) {
27
+ var _a;
28
+ if (result) {
29
+ (_a = ctx.onValuesChange) === null || _a === void 0 ? void 0 : _a.call(ctx, result.changedValues, result.allValues);
30
+ }
31
+ });
32
+ };
33
+ var getCellValue = function getCellValue(rowIndex, columnId) {
34
+ return get(tableValue.getValue(), [rowIndex, columnId]);
35
+ };
36
+ return {
37
+ subscription: tableValue,
38
+ fieldMap: ctx.fieldMap,
39
+ updateData: updateData,
40
+ getCellValue: getCellValue,
41
+ innerRef: ctx.innerRef
42
+ };
43
+ };
44
+ function getCellOpFn(table) {
45
+ var _a, _b;
46
+ return {
47
+ getCellValue: (_a = table.options.meta) === null || _a === void 0 ? void 0 : _a.getCellValue,
48
+ setCellValue: (_b = table.options.meta) === null || _b === void 0 ? void 0 : _b.updateData
49
+ };
50
+ }
51
+ export { getCellOpFn, useTableMeta };
@@ -0,0 +1,52 @@
1
+ /** @LICENSE
2
+ * @hi-ui/schema-editable-table
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/schema/schema-editable-table#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ import { useRef, useEffect } from 'react';
11
+ import { useUpdate } from '@hi-ui/schema-hooks';
12
+
13
+ /**
14
+ * 监听表格数据变化,并触发重渲染
15
+ * @notice 仅在表格数据发生【全量变化】时触发重渲染
16
+ * @param tableValue 表格数据
17
+ * @returns 重渲染函数
18
+ */
19
+ // NOTE 1. pendingRef存在的意义
20
+ // 避免在同一个微任务周期内,多次触发重渲染
21
+ // 例如在循环中,多次触发 rowActions.addRow()
22
+ // NOTE 2. 重渲染次数
23
+ // 此处内部的 rerender() 会触发一次重渲染
24
+ // 随后 useReactTable 接受到新的数据后,会再次触发一次重渲染
25
+ // 两次重渲染暂不可避免,仅在此处记录
26
+ function useTableUpdate(tableValue) {
27
+ var _useUpdate = useUpdate(),
28
+ forceRerenderFlag = _useUpdate[0],
29
+ rerender = _useUpdate[1];
30
+ var pendingRef = useRef(false);
31
+ useEffect(function () {
32
+ return tableValue.subscribe(function (notification) {
33
+ var _a, _b;
34
+ // 静默更新时,不再执行
35
+ if ((_a = notification.extra) === null || _a === void 0 ? void 0 : _a.silent) return;
36
+ if ((_b = notification.extra) === null || _b === void 0 ? void 0 : _b.complete) {
37
+ if (pendingRef.current) return;
38
+ pendingRef.current = true;
39
+ // 一个微任务周期内仅执行一个重渲染
40
+ Promise.resolve().then(function () {
41
+ pendingRef.current = false;
42
+ rerender();
43
+ });
44
+ }
45
+ });
46
+ }, [tableValue, rerender]);
47
+ return {
48
+ rerender: rerender,
49
+ forceRerenderFlag: forceRerenderFlag
50
+ };
51
+ }
52
+ export { useTableUpdate };
@@ -0,0 +1,38 @@
1
+ /** @LICENSE
2
+ * @hi-ui/schema-editable-table
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/schema/schema-editable-table#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ export { default as Body } from './body/index.js';
11
+ export { default as Header } from './header/index.js';
12
+ export { default as Footer } from './footer/index.js';
13
+ export { default as Cell } from './cell/index.js';
14
+ export { EditableSchemaTable as EditTable, EditableSchemaTable } from './table.js';
15
+ export { useEditableSchemaTableCtx as useEditTableCtx, useEditableSchemaTableCtx } from './ctx.js';
16
+ export { TableContainer } from './container/index.js';
17
+ export { useColumnVirtualizer, useRowVirtualizer } from './container/hooks.js';
18
+ export { BottomRender } from './container/bottom.js';
19
+ export { validateHeaderCell } from './header/validate.js';
20
+ export { useTableSetting } from './features/setting-bridge.js';
21
+ import '@babel/runtime/regenerator';
22
+ import 'tslib';
23
+ import 'react';
24
+ import '@hi-ui/schema-utils';
25
+ import 'ahooks';
26
+ import 'lodash-es';
27
+ import '@hi-ui/schema-hooks';
28
+ export { defineDataFetcher, useDataFetcher } from './features/async-data/use-data-fetcher.js';
29
+ import '@hi-ui/use-subscription';
30
+ import '@tanstack/react-table';
31
+ export { clsPrefix } from './utils/cls.js';
32
+ import '@hi-ui/schema-table-extensions';
33
+ export { ColumnCollapsingAction } from './features/header-actions/components/column-collapsing.js';
34
+ export { TableRowController } from './features/row-controller.js';
35
+ export { normalizeValueFromChange } from './cell/editing.js';
36
+ export { ProEditTable } from './field-bridge/index.js';
37
+ export { default as FooterCell } from './cell/footer.js';
38
+ export { useTableContainer } from './container/ctx.js';
@@ -0,0 +1,13 @@
1
+ /** @LICENSE
2
+ * @hi-ui/schema-editable-table
3
+ * https://github.com/XiaoMi/hiui/tree/master/packages/schema/schema-editable-table#readme
4
+ *
5
+ * Copyright (c) HiUI <mi-hiui@xiaomi.com>.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */
10
+ import __styleInject__ from '@hi-ui/style-inject';
11
+ var css_248z = ".editable-schema-table {width: 100%;height: 100%;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;/* stylelint-disable no-duplicate-selectors */}.editable-schema-table__container {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-orient: vertical;-webkit-box-direction: normal;-ms-flex-direction: column;flex-direction: column;-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;width: 100%;max-height: 100%;background: #fff;border-radius: 2px;position: relative;overflow: auto;-webkit-box-sizing: border-box;box-sizing: border-box;}.editable-schema-table__bottom-container {width: 100%;height: 56px;display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-pack: justify;-ms-flex-pack: justify;justify-content: space-between;-webkit-box-align: center;-ms-flex-align: center;align-items: center;}.editable-schema-table__bottom-container[data-is-bottom-empty=true] {display: none;}.editable-schema-table__bottom-container-right .hi-v5-pagination {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.editable-schema-table__bottom-container-right .hi-v5-pagination__btn button {padding: 0;}.editable-schema-table__bottom-container-right .hi-v5-pagination__total, .editable-schema-table__bottom-container-right .hi-v5-pagination__list, .editable-schema-table__bottom-container-right .hi-v5-pagination__jumper {white-space: nowrap;}.editable-schema-table__bottom-container .editable-schema-table__row-selection-indicator {font-size: 14px;color: var(--hi-v5-color-gray-600, #5f6a7a);}.editable-schema-table table {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;width: 100%;font-size: 14px;border-spacing: 0;table-layout: fixed;}.editable-schema-table table th, .editable-schema-table table td {-webkit-box-sizing: border-box;box-sizing: border-box;}.editable-schema-table table[data-is-selection], .editable-schema-table table[data-is-operation] {position: sticky;z-index: 3;}.editable-schema-table table[data-is-selection] {left: 0;-webkit-box-flex: 0;-ms-flex: 0 0 50px;flex: 0 0 50px;width: 50px;}.editable-schema-table table[data-is-operation] {right: 0;-webkit-box-flex: 0;-ms-flex: 0 0;flex: 0 0;}.editable-schema-table__header-wrapper, .editable-schema-table__body-wrapper, .editable-schema-table__footer-wrapper {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;vertical-align: top;width: -webkit-fit-content;width: -moz-fit-content;width: fit-content;min-width: 100%;}.editable-schema-table__header-wrapper--sticky, .editable-schema-table__footer-wrapper--sticky {position: sticky;z-index: 4;}.editable-schema-table__header-wrapper {background: #fff;}.editable-schema-table__header-wrapper--sticky {top: 0;}.editable-schema-table[data-is-empty=true] .editable-schema-table__body-wrapper {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;position: sticky;left: 0;right: 0;}.editable-schema-table__header {/* stylelint-disable no-descending-specificity */}.editable-schema-table__header-row {height: 40px;background: #fafafa;-webkit-transition: background-color 0.2s;transition: background-color 0.2s;}.editable-schema-table__header-row:hover {background: #f5f5f5;}.editable-schema-table__header .editable-schema-table__header-cell {position: relative;border-bottom-color: #e8e8e8;}.editable-schema-table__header .editable-schema-table__header-cell div {font-weight: 500;color: var(--hi-v5-color-gray-700, #1f2733);}.editable-schema-table__header .editable-schema-table__header-cell[colspan=\"0\"] {display: none;}.editable-schema-table__header-cell-content {position: relative;display: -webkit-box;display: -ms-flexbox;display: flex;height: 24px;line-height: 24px;-webkit-box-sizing: border-box;box-sizing: border-box;}.editable-schema-table__header-cell-content-title {-webkit-box-flex: 0;-ms-flex: 0 1 auto;flex: 0 1 auto;min-width: 0;}.editable-schema-table__header-cell-content-actions {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;height: 100%;-webkit-box-flex: 0;-ms-flex: 0 0 auto;flex: 0 0 auto;position: absolute;right: 0;}.editable-schema-table__header-cell-content[data-actions-count=\"1\"] {padding-right: 24px;}.editable-schema-table__header-cell-content[data-actions-count=\"2\"] {padding-right: 44px;}.editable-schema-table__header-cell-content[data-actions-count=\"3\"] {padding-right: 64px;}.editable-schema-table__header-cell-content[data-actions-count=\"4\"] {padding-right: 84px;}.editable-schema-table__header-cell-content[data-actions-count=\"5\"] {padding-right: 104px;}.editable-schema-table__header-cell-content[data-is-required=true]::before {content: \"*\";color: var(--hi-v5-color-danger-500, var(--hi-v5-color-red-500, #ff5959));margin-right: var(--hi-v5-spacing-2, 4px);}.editable-schema-table__header-cell-content-actions > span {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;-webkit-box-align: center;-ms-flex-align: center;align-items: center;width: 20px;height: 24px;-webkit-box-sizing: border-box;box-sizing: border-box;padding: 4px 2px;color: rgba(0, 0, 0, 0.45);cursor: pointer;font-size: 14px;-webkit-transition: 0.2s;transition: 0.2s;border-radius: 2px;}.editable-schema-table__header-cell-content-actions > span:hover {color: rgba(0, 0, 0, 0.88);background-color: rgba(0, 0, 0, 0.06);}.editable-schema-table__header-cell-content-actions > span[data-active=true] {color: #237ffa;}.editable-schema-table__header-cell-content[data-hover-only=true] .editable-schema-table__header-cell-content-actions {visibility: hidden;opacity: 0;-webkit-transition: opacity 0.2s;transition: opacity 0.2s;}.editable-schema-table__header-cell[data-hovering=true] .editable-schema-table__header-cell-content-actions {visibility: visible;opacity: 1;}.editable-schema-table__body-row {height: 40px;-webkit-transition: all 0.2s;transition: all 0.2s;background-color: #fff;}.editable-schema-table__body-row:hover, .editable-schema-table__body-row[data-hovering] {background-color: #f5f5f5;}.editable-schema-table__body-row:nth-child(even) {background-color: #fafafa;}.editable-schema-table__body .editable-schema-table__body-cell {color: var(--hi-v5-color-gray-700, #1f2733);-webkit-transition: background-color 0.2s;transition: background-color 0.2s;}.editable-schema-table__body .editable-schema-table__body-cell:hover {background-color: #e6f7ff;}.editable-schema-table__body .editable-schema-table__body-cell[rowspan=\"0\"] {display: none;}.editable-schema-table__body-row:first-child .editable-schema-table__body-cell {border-top: none;}.editable-schema-table__body-row[data-has-error] {background-color: #fef0f0;}.editable-schema-table__body-row[data-has-error] .editable-schema-table__body-cell:hover {background-color: #f9e5e5;}.editable-schema-table__body-cell_expanding {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;--editable-schema-table-body-cell-expanding-indent: 14px;}.editable-schema-table__body-cell_expanding[data-text-align=center] {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;--editable-schema-table-body-cell-expanding-indent: 28px;}.editable-schema-table__body-cell_expanding[data-text-align=right] {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;--editable-schema-table-body-cell-expanding-indent: 28px;}.editable-schema-table__body-cell_expanding[data-text-align=right] .editable-schema-table__body-cell_expanding-wrapper {-webkit-box-flex: 1;-ms-flex: 1 1;flex: 1 1;}.editable-schema-table__body-cell_expanding-wrapper {display: -webkit-box;display: -ms-flexbox;display: flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;margin-right: 4px;}.editable-schema-table__body-cell_expanding-indent {display: inline-block;height: 10px;}.editable-schema-table__body-cell_expanding-icon {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;-webkit-box-align: center;-ms-flex-align: center;align-items: center;width: 16px;height: 24px;font-size: 16px;color: var(--hi-v5-color-gray-500, #929aa6);cursor: pointer;}.editable-schema-table__body-cell_expanding-icon svg {-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;-webkit-transition: -webkit-transform 0.3s;transition: -webkit-transform 0.3s;transition: transform 0.3s;transition: transform 0.3s, -webkit-transform 0.3s;}.editable-schema-table__body-cell_expanding-icon[data-is-expanded=true] svg {-webkit-transform: rotate(90deg);transform: rotate(90deg);}.editable-schema-table__footer-wrapper {background: #fff;}.editable-schema-table__footer-wrapper--sticky {bottom: 0;}.editable-schema-table__footer-row {height: 40px;background: #fafafa;-webkit-transition: background-color 0.2s;transition: background-color 0.2s;}.editable-schema-table__footer-row:hover {background: #f5f5f5;}.editable-schema-table__footer .editable-schema-table__footer-cell {position: relative;border-top-color: #e8e8e8;}.editable-schema-table__footer .editable-schema-table__footer-cell div {font-weight: 500;color: var(--hi-v5-color-gray-700, #1f2733);}.editable-schema-table__footer .editable-schema-table__footer-cell:hover {background-color: #e6f7ff;}.editable-schema-table .editable-schema-table__cell--fixed-left, .editable-schema-table .editable-schema-table__cell--fixed-right {position: sticky;z-index: 2;background-color: inherit;}.editable-schema-table__body .editable-schema-table__body-cell span[data-case=readonly][data-field-type=image] {height: 38px;-webkit-box-align: center;-ms-flex-align: center;align-items: center;}.editable-schema-table__body .editable-schema-table__body-cell span[data-case=readonly] .image-preview, .editable-schema-table__body .editable-schema-table__body-cell span[data-case=readonly] .image-preview__item-wrapper,.editable-schema-table__body .editable-schema-table__body-cell span[data-case=readonly] .image-preview img {height: 30px;}.editable-schema-table table th, .editable-schema-table table td {padding: 0 12px;white-space: nowrap;}.editable-schema-table table th[data-text-align=left], .editable-schema-table table td[data-text-align=left] {text-align: left;}.editable-schema-table table th[data-text-align=left] span[data-case=readonly], .editable-schema-table table td[data-text-align=left] span[data-case=readonly] {-webkit-box-pack: start;-ms-flex-pack: start;justify-content: flex-start;}.editable-schema-table table th[data-text-align=center], .editable-schema-table table td[data-text-align=center] {text-align: center;}.editable-schema-table table th[data-text-align=center] span[data-case=readonly], .editable-schema-table table td[data-text-align=center] span[data-case=readonly] {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;}.editable-schema-table table th[data-text-align=right], .editable-schema-table table td[data-text-align=right] {text-align: right;}.editable-schema-table table th[data-text-align=right] span[data-case=readonly], .editable-schema-table table td[data-text-align=right] span[data-case=readonly] {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.editable-schema-table table th[data-has-children=true] {text-align: center;}.editable-schema-table__header-cell-content[data-has-children=true] {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;}.editable-schema-table__header-cell-content[data-text-align=left] {-webkit-box-pack: start;-ms-flex-pack: start;justify-content: flex-start;}.editable-schema-table__header-cell-content[data-text-align=center] {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;}.editable-schema-table__header-cell-content[data-text-align=right] {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.editable-schema-table__body .editable-schema-table__body-cell {padding: 0;}.editable-schema-table__body .editable-schema-table__body-cell:not(:has(*)), .editable-schema-table__body .editable-schema-table__body-cell > span[data-case=simple], .editable-schema-table__body .editable-schema-table__body-cell > span[data-case=default] {padding: 0 12px;}.editable-schema-table__body .editable-schema-table__body-cell > span[data-case=readonly] {display: -webkit-inline-box;display: -ms-inline-flexbox;display: inline-flex;width: 100%;padding: 0 12px;-webkit-box-sizing: border-box;box-sizing: border-box;}.editable-schema-table__body .editable-schema-table__body-cell > span[data-case=expanding] {padding: 0 12px;}.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=left] .hi-v5-input__text,.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=left] .hi-v5-number-input__input {text-align: left;}.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=left] .hi-v5-date-picker__input-selector {-webkit-box-pack: start;-ms-flex-pack: start;justify-content: flex-start;}.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=center] .hi-v5-input__text,.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=center] .hi-v5-number-input__input {text-align: center;}.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=center] .hi-v5-date-picker__input-selector {-webkit-box-pack: center;-ms-flex-pack: center;justify-content: center;}.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=center] .hi-v5-select .hi-v5-mock-input__value {padding-right: 4px;}.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=right] .hi-v5-input__text,.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=right] .hi-v5-number-input__input {text-align: right;}.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=right] .hi-v5-date-picker__input-selector {-webkit-box-pack: end;-ms-flex-pack: end;justify-content: flex-end;}.editable-schema-table__body .editable-schema-table__body-cell[data-text-align=right] .hi-v5-select .hi-v5-mock-input__value {padding-right: 4px;}.editable-schema-table__body .editable-schema-table__body-cell .hi-v5-input,.editable-schema-table__body .editable-schema-table__body-cell .hi-v5-number-input {height: 39px;border: none;background-color: unset;}.editable-schema-table__body .editable-schema-table__body-cell .hi-v5-input__inner,.editable-schema-table__body .editable-schema-table__body-cell .hi-v5-number-input__inner {border: none;background-color: unset;}.editable-schema-table__body .editable-schema-table__body-cell .hi-v5-input__text,.editable-schema-table__body .editable-schema-table__body-cell .hi-v5-number-input__text {padding: 4px 12px;font-family: inherit;}.editable-schema-table__body .editable-schema-table__body-cell .hi-v5-input__input,.editable-schema-table__body .editable-schema-table__body-cell .hi-v5-number-input__input {font-family: inherit;font-size: 14px;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-input__inner {background-color: unset;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-number-input__suffix {position: static;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-select {height: 39px;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-select .hi-v5-mock-input {height: 39px;-webkit-box-sizing: border-box;box-sizing: border-box;padding: 0 11px 0 12px;border: none;background-color: unset;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-check-select {height: 39px;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-check-select .hi-v5-tag-input-mock {height: 100%;border: none;background-color: unset;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-check-select .hi-v5-tag-input-mock__tags {height: auto;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-cascader {height: 39px;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-cascader .hi-v5-mock-input {height: 39px;-webkit-box-sizing: border-box;box-sizing: border-box;padding: 0 11px 0 12px;border: none;background-color: unset;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-check-cascader {height: 39px;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-check-cascader .hi-v5-tag-input-mock {height: 100%;border: none;background-color: unset;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-check-cascader .hi-v5-tag-input-mock__tags {height: auto;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-tree-select {height: 39px;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-tree-select .hi-v5-mock-input {height: 39px;-webkit-box-sizing: border-box;box-sizing: border-box;padding: 0 11px 0 12px;border: none;background-color: unset;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-check-tree-select {height: 39px;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-check-tree-select .hi-v5-tag-input-mock {height: 100%;border: none;background-color: unset;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-check-tree-select .hi-v5-tag-input-mock__tags {height: auto;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-date-picker__picker {border: none;height: 39px;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-date-picker__input-selector {padding: 0 8px 0 7px;}.editable-schema-table__body .editable-schema-table__body-cell > div[data-case=editing] .hi-v5-date-picker .hi-icon {margin-right: 10px;}.editable-schema-table table {border-collapse: separate;}.editable-schema-table table th, .editable-schema-table table td {border-bottom: 1px solid #f0f0f0;}.editable-schema-table[data-is-bordered=true] table th,.editable-schema-table[data-is-bordered=true] table td, .editable-schema-table[data-has-nest-header=true] table th,.editable-schema-table[data-has-nest-header=true] table td {border-left: 1px solid #f0f0f0;}.editable-schema-table[data-is-bordered=true] .editable-schema-table__container, .editable-schema-table[data-has-nest-header=true] .editable-schema-table__container {border-top: 1px solid #f0f0f0;border-right: 1px solid #f0f0f0;}.editable-schema-table[data-has-sticky-footer=true] .editable-schema-table__footer-wrapper td {border-top: 1px solid #f0f0f0;}.editable-schema-table[data-has-sticky-footer=true] .editable-schema-table__body-wrapper tr:last-child td {border-bottom: none;}.editable-schema-table[data-is-empty=true][data-is-bordered=true] .editable-schema-table__container, .editable-schema-table[data-is-empty=true][data-has-nest-header=true] .editable-schema-table__container {border: 1px solid #f0f0f0;}.editable-schema-table[data-is-empty=true][data-is-bordered=true] .editable-schema-table__container table:first-child tr th:first-child, .editable-schema-table[data-is-empty=true][data-has-nest-header=true] .editable-schema-table__container table:first-child tr th:first-child {border-left: none;}.editable-schema-table__cell--last-fixed-left::after, .editable-schema-table[data-has-selection=true][data-has-left-fixed=false] .editable-schema-table__mock-selection::after {content: \"\";position: absolute;top: 0;bottom: 0;width: 30px;pointer-events: none;-webkit-transition: -webkit-box-shadow 0.3s;transition: -webkit-box-shadow 0.3s;transition: box-shadow 0.3s;transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;right: -30px;}.editable-schema-table__cell--first-fixed-right::after, .editable-schema-table[data-has-operation=true][data-has-right-fixed=false] .editable-schema-table__mock-operation::before {content: \"\";position: absolute;top: 0;bottom: 0;width: 30px;pointer-events: none;-webkit-transition: -webkit-box-shadow 0.3s;transition: -webkit-box-shadow 0.3s;transition: box-shadow 0.3s;transition: box-shadow 0.3s, -webkit-box-shadow 0.3s;left: -30px;}.editable-schema-table--scrolling-left .editable-schema-table__cell--first-fixed-right::after, .editable-schema-table[data-has-operation=true][data-has-right-fixed=false] .editable-schema-table--scrolling-left .editable-schema-table__mock-operation::before {-webkit-box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);box-shadow: inset -10px 0 8px -8px rgba(0, 0, 0, 0.15);}.editable-schema-table--scrolling-right .editable-schema-table__cell--last-fixed-left::after, .editable-schema-table[data-has-selection=true][data-has-left-fixed=false] .editable-schema-table--scrolling-right .editable-schema-table__mock-selection::after {-webkit-box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);box-shadow: inset 10px 0 8px -8px rgba(0, 0, 0, 0.15);}";
12
+ __styleInject__(css_248z);
13
+ export { css_248z as default };