@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,66 @@
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
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, '__esModule', {
13
+ value: true
14
+ });
15
+ var index = require('./body/index.js');
16
+ var index$1 = require('./header/index.js');
17
+ var index$2 = require('./footer/index.js');
18
+ var index$3 = require('./cell/index.js');
19
+ var table = require('./table.js');
20
+ var ctx = require('./ctx.js');
21
+ var index$4 = require('./container/index.js');
22
+ var hooks = require('./container/hooks.js');
23
+ var bottom = require('./container/bottom.js');
24
+ var validate = require('./header/validate.js');
25
+ var settingBridge = require('./features/setting-bridge.js');
26
+ require('@babel/runtime/regenerator');
27
+ require('tslib');
28
+ require('react');
29
+ require('@hi-ui/schema-utils');
30
+ require('ahooks');
31
+ require('lodash-es');
32
+ require('@hi-ui/schema-hooks');
33
+ var useDataFetcher = require('./features/async-data/use-data-fetcher.js');
34
+ require('@hi-ui/use-subscription');
35
+ require('@tanstack/react-table');
36
+ var cls = require('./utils/cls.js');
37
+ require('@hi-ui/schema-table-extensions');
38
+ var columnCollapsing = require('./features/header-actions/components/column-collapsing.js');
39
+ var rowController = require('./features/row-controller.js');
40
+ var editing = require('./cell/editing.js');
41
+ var index$5 = require('./field-bridge/index.js');
42
+ var footer = require('./cell/footer.js');
43
+ var ctx$1 = require('./container/ctx.js');
44
+ exports.Body = index["default"];
45
+ exports.Header = index$1["default"];
46
+ exports.Footer = index$2["default"];
47
+ exports.Cell = index$3["default"];
48
+ exports.EditTable = table.EditableSchemaTable;
49
+ exports.EditableSchemaTable = table.EditableSchemaTable;
50
+ exports.useEditTableCtx = ctx.useEditableSchemaTableCtx;
51
+ exports.useEditableSchemaTableCtx = ctx.useEditableSchemaTableCtx;
52
+ exports.TableContainer = index$4.TableContainer;
53
+ exports.useColumnVirtualizer = hooks.useColumnVirtualizer;
54
+ exports.useRowVirtualizer = hooks.useRowVirtualizer;
55
+ exports.BottomRender = bottom.BottomRender;
56
+ exports.validateHeaderCell = validate.validateHeaderCell;
57
+ exports.useTableSetting = settingBridge.useTableSetting;
58
+ exports.defineDataFetcher = useDataFetcher.defineDataFetcher;
59
+ exports.useDataFetcher = useDataFetcher.useDataFetcher;
60
+ exports.clsPrefix = cls.clsPrefix;
61
+ exports.ColumnCollapsingAction = columnCollapsing.ColumnCollapsingAction;
62
+ exports.TableRowController = rowController.TableRowController;
63
+ exports.normalizeValueFromChange = editing.normalizeValueFromChange;
64
+ exports.ProEditTable = index$5.ProEditTable;
65
+ exports.FooterCell = footer["default"];
66
+ exports.useTableContainer = ctx$1.useTableContainer;
@@ -0,0 +1,18 @@
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
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, '__esModule', {
13
+ value: true
14
+ });
15
+ 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);}";
16
+ var __styleInject__ = require('@hi-ui/style-inject')["default"];
17
+ __styleInject__(css_248z);
18
+ exports["default"] = css_248z;
@@ -0,0 +1,263 @@
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
+ 'use strict';
11
+
12
+ var _typeof = require("@babel/runtime/helpers/typeof");
13
+ Object.defineProperty(exports, '__esModule', {
14
+ value: true
15
+ });
16
+ var React = require('react');
17
+ var reactTable = require('@tanstack/react-table');
18
+ var ahooks = require('ahooks');
19
+ var useSubscription = require('@hi-ui/use-subscription');
20
+ var schemaFields = require('@hi-ui/schema-fields');
21
+ var ctx = require('./ctx.js');
22
+ var cls = require('./utils/cls.js');
23
+ var index$4 = require('./container/index.js');
24
+ var index$5 = require('./header/index.js');
25
+ var index$6 = require('./body/index.js');
26
+ var index$7 = require('./footer/index.js');
27
+ var index$3 = require('./cell/index.js');
28
+ var useProps = require('./hooks/use-props.js');
29
+ var useTableColumns = require('./hooks/use-table-columns.js');
30
+ var useUpdate = require('./hooks/use-update.js');
31
+ var useInnerCtx = require('./hooks/use-inner-ctx.js');
32
+ var useGlobalStatic = require('./hooks/use-global-static.js');
33
+ var useGlobalActions = require('./hooks/use-global-actions.js');
34
+ var useTableMeta = require('./hooks/use-table-meta.js');
35
+ var aggregated = require('./features/_overrides/aggregated.js');
36
+ var getter = require('./features/_overrides/getter.js');
37
+ var overrides = require('./features/_overrides/overrides.js');
38
+ var rowSelection = require('./features/_overrides/row-selection.js');
39
+ var grouping = require('./features/_overrides/grouping.js');
40
+ var getter$1 = require('./features/async-data/getter.js');
41
+ var useGetFieldsValue = require('./hooks/use-get-fields-value.js');
42
+ var columnState = require('./features/column-state.js');
43
+ var rowController = require('./features/row-controller.js');
44
+ var useOpts = require('./features/pagination/use-opts.js');
45
+ require('lodash-es');
46
+ require('@hi-ui/checkbox');
47
+ require('@hi-ui/radio');
48
+ require('@hi-ui/schema-utils');
49
+ var index$2 = require('./features/row-selection/hooks/index.js');
50
+ require('@hi-ui/space');
51
+ require('@hi-ui/switch');
52
+ require('@hi-ui/pagination');
53
+ var useState = require('./features/pagination/use-state.js');
54
+ var index = require('./features/filter/index.js');
55
+ var useOpts$1 = require('./features/filter/use-opts.js');
56
+ var index$1 = require('./features/sorter/index.js');
57
+ var useOpts$2 = require('./features/sorter/use-opts.js');
58
+ require('@hi-ui/icons');
59
+ var useOpts$3 = require('./features/row-expanding/use-opts.js');
60
+ var useOpts$4 = require('./features/column-grouping/use-opts.js');
61
+ require('./index.scss.js');
62
+ var useOpts$5 = require('./features/row-selection/hooks/use-opts.js');
63
+ var header = require('./cell/header.js');
64
+ var footer = require('./cell/footer.js');
65
+ var aggregated$1 = require('./cell/aggregated.js');
66
+ var bottom = require('./container/bottom.js');
67
+ function _interopDefaultCompat(e) {
68
+ return e && _typeof(e) === 'object' && 'default' in e ? e : {
69
+ 'default': e
70
+ };
71
+ }
72
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
73
+
74
+ // @doc-comment-end code-block
75
+ function EditableSchemaTable(props) {
76
+ var _a, _b, _c, _d;
77
+ // propsRef 存在的意义是给内部组件一个统一的 props 引用
78
+ // 避免 props 变化导致的内部 memo 值引用变化
79
+ var _usePropsRef = useProps.usePropsRef(props),
80
+ propsRef = _usePropsRef.propsRef,
81
+ staticOptsRef = _usePropsRef.staticOptsRef;
82
+ // innerRef 存在的意义在于简化发生循环依赖时内部的实例对象的引用方式
83
+ // 例如 useReactTable 需要 useRowSelectionOpts 来初始化行选择功能
84
+ // 而 useRowSelectionOpts 又需要用到 table 实例,如果直接引用,则会报【声明之前已使用的块范围变量】的错误
85
+ var innerRef = React.useRef({});
86
+ // 核心数据订阅
87
+ var tableValue = useSubscription.useSubscription((_b = (_a = props.value) !== null && _a !== void 0 ? _a : props.defaultValue) !== null && _b !== void 0 ? _b : []);
88
+ // 订阅表格级别的数据变化,自动触发重渲染
89
+ var _useTableUpdate = useUpdate.useTableUpdate(tableValue),
90
+ rerender = _useTableUpdate.rerender,
91
+ forceRerenderFlag = _useTableUpdate.forceRerenderFlag;
92
+ // 表格列配置
93
+ var columns = useTableColumns.useTableColumns({
94
+ propsRef: propsRef
95
+ });
96
+ // 初始化列状态
97
+ var initialState = columnState.useInitialColumnState(props);
98
+ // 分页配置
99
+ var _usePaginationState = useState.usePaginationState({
100
+ propsRef: propsRef,
101
+ subscription: tableValue
102
+ }),
103
+ paginationState = _usePaginationState.paginationState;
104
+ var paginationOpts = useOpts.usePaginationOpts({
105
+ innerRef: innerRef,
106
+ staticOptsRef: staticOptsRef
107
+ });
108
+ // 筛选配置
109
+ var _useFilterState = index.useFilterState(),
110
+ filterState = _useFilterState.filterState;
111
+ var filterOpts = useOpts$1.useFilterOpts({
112
+ innerRef: innerRef,
113
+ staticOptsRef: staticOptsRef
114
+ });
115
+ // 排序配置
116
+ var _useSorterState = index$1.useSorterState(),
117
+ sorterState = _useSorterState.sorterState;
118
+ var sorterOpts = useOpts$2.useSorterOpts({
119
+ innerRef: innerRef,
120
+ staticOptsRef: staticOptsRef,
121
+ propsRef: propsRef
122
+ });
123
+ // 行展开配置
124
+ var rowExpandedOpts = useOpts$3.useRowExpandedOpts({
125
+ staticOptsRef: staticOptsRef
126
+ });
127
+ // 列分组配置
128
+ var rowGroupedOpts = useOpts$4.useRowGroupedOpts({
129
+ staticOptsRef: staticOptsRef
130
+ });
131
+ // 表格元数据/操作
132
+ var tableMeta = useTableMeta.useTableMeta(tableValue, {
133
+ fieldMap: props.fieldMap,
134
+ onValuesChange: props.onValuesChange,
135
+ innerRef: innerRef
136
+ });
137
+ // 行选择功能
138
+ var _useRowSelectionState = index$2.useRowSelectionState(),
139
+ rowSelectionState = _useRowSelectionState.rowSelectionState;
140
+ var rowSelectionOpts = useOpts$5.useRowSelectionOpts({
141
+ rowSelection: propsRef.current.rowSelection,
142
+ innerRef: innerRef
143
+ });
144
+ // 动态的 table 选项,会由内部组件主动调用
145
+ var _useSetState = ahooks.useSetState({}),
146
+ dynamicOpts = _useSetState[0],
147
+ setDynamicOpts = _useSetState[1];
148
+ // 核心表格实例
149
+ var table = reactTable.useReactTable(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
150
+ _features: [overrides.OverridesFeature, getter.CustomGetterFeature, rowSelection.CustomRowSelectionFeature, aggregated.CustomAggregatedFeature, grouping.CustomGroupingFeature].concat(propsRef.current.features || []),
151
+ data: tableValue.getValue(),
152
+ columns: columns,
153
+ defaultColumn: Object.assign({
154
+ cell: index$3["default"],
155
+ header: header["default"],
156
+ footer: footer["default"],
157
+ aggregatedCell: (_d = (_c = props.customCell) === null || _c === void 0 ? void 0 : _c.aggregatedCell) !== null && _d !== void 0 ? _d : aggregated$1["default"]
158
+ }, propsRef.current.defaultColumn),
159
+ getCoreRowModel: reactTable.getCoreRowModel(),
160
+ getRowId: props.rowKey ? function (row) {
161
+ return row[props.rowKey];
162
+ } : undefined,
163
+ getSubRows: function getSubRows(row) {
164
+ return row[propsRef.current.subRowKey];
165
+ }
166
+ }, propsRef.current.debug), {
167
+ meta: tableMeta
168
+ }), rowSelectionOpts), paginationOpts), filterOpts), sorterOpts), rowExpandedOpts), rowGroupedOpts), {
169
+ initialState: Object.assign(Object.assign({}, initialState), {
170
+ pagination: Object.assign(Object.assign({}, paginationState.getValue()), paginationOpts.initialState ? paginationOpts.initialState.pagination : {})
171
+ })
172
+ }), dynamicOpts), props.customEngineOpts));
173
+ // 生成全局静态配置
174
+ var _s_ = tableValue; // 没啥用,就是太长了取个别名,防止换行
175
+ var globalStaticRef = useGlobalStatic.useGlobalStatic({
176
+ table: table,
177
+ subscription: _s_,
178
+ propsRef: propsRef,
179
+ staticOptsRef: staticOptsRef
180
+ });
181
+ // 生成全局静态函数
182
+ var globalActionsRef = useGlobalActions.useGlobalStaticActions({
183
+ innerRef: innerRef
184
+ });
185
+ // 虚拟滚动需要知道可滚动的容器元素
186
+ var tableContainerRef = React__default["default"].useRef(null);
187
+ // 行操作控制器
188
+ var enableRowEdit = globalStaticRef.current.enableRowEdit;
189
+ var rowActions = React.useMemo(function () {
190
+ return new rowController.TableRowController(tableValue, {
191
+ rowEdit: enableRowEdit,
192
+ propsRef: propsRef
193
+ });
194
+ }, [tableValue, enableRowEdit, propsRef]);
195
+ // 获取所有可编辑字段的值
196
+ var getFieldsValue = useGetFieldsValue.useGetFieldsValue({
197
+ innerRef: innerRef
198
+ });
199
+ // 获取分组后的所有可编辑字段的值和只读字段的值
200
+ var getGroupedValues = useGetFieldsValue.useGetGroupedValues({
201
+ innerRef: innerRef
202
+ });
203
+ // 组装内部上下文
204
+ var _useTableInnerCtx = useInnerCtx.useTableInnerCtx({
205
+ table: table,
206
+ setDynamicOpts: setDynamicOpts,
207
+ subscription: tableValue,
208
+ tableContainerRef: tableContainerRef,
209
+ rowActions: rowActions,
210
+ rerender: rerender,
211
+ rowSelectionState: rowSelectionState,
212
+ paginationState: paginationState,
213
+ filterState: filterState,
214
+ sorterState: sorterState,
215
+ propsRef: propsRef,
216
+ globalStaticRef: globalStaticRef,
217
+ globalActionsRef: globalActionsRef,
218
+ getFieldsValue: getFieldsValue,
219
+ getGroupedValues: getGroupedValues
220
+ }),
221
+ ctxValue = _useTableInnerCtx.ctxValue,
222
+ exposeCtxValue = _useTableInnerCtx.exposeCtxValue;
223
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
224
+ // @ts-ignore 仅允许此处赋值
225
+ innerRef.current = ctxValue;
226
+ React__default["default"].useImperativeHandle(props.innerCtxRef, exposeCtxValue);
227
+ // 表头和表尾的 fixed 配置
228
+ var stickyOpts = propsRef.current.sticky;
229
+ var TableCtx = ctx.EditableSchemaTableCtx;
230
+ return /*#__PURE__*/React__default["default"].createElement(TableCtx.Provider, {
231
+ value: ctxValue
232
+ }, /*#__PURE__*/React__default["default"].createElement(schemaFields.EditableControlProvider, {
233
+ readonly: props.readonly || enableRowEdit
234
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
235
+ key: props.enableForceRerender ? forceRerenderFlag : undefined,
236
+ className: cls.clsPrefix,
237
+ "data-is-empty": globalStaticRef.current.isEmpty,
238
+ "data-is-bordered": !!props.bordered,
239
+ "data-has-nest-header": globalStaticRef.current.hasNestHeader,
240
+ "data-has-sticky-footer": globalStaticRef.current.hasStickyFooter,
241
+ "data-has-selection": !!props.rowSelection,
242
+ "data-has-operation": !!props.rowOperation,
243
+ "data-has-left-fixed": globalStaticRef.current.hasLeftFixed,
244
+ "data-has-right-fixed": globalStaticRef.current.hasRightFixed,
245
+ "data-has-pagination": globalStaticRef.current.enablePagination
246
+ }, /*#__PURE__*/React__default["default"].createElement("div", {
247
+ className: cls.cls('container'),
248
+ ref: tableContainerRef
249
+ }, /*#__PURE__*/React__default["default"].createElement(index$4.TableContainer, {
250
+ virtualize: propsRef.current.virtualize
251
+ }, /*#__PURE__*/React__default["default"].createElement(index$4.TableContainer.Header, {
252
+ sticky: stickyOpts === null || stickyOpts === void 0 ? void 0 : stickyOpts.header,
253
+ stickyOffset: stickyOpts === null || stickyOpts === void 0 ? void 0 : stickyOpts.headerTop
254
+ }, /*#__PURE__*/React__default["default"].createElement(index$5["default"], null)), /*#__PURE__*/React__default["default"].createElement(index$4.TableContainer.Body, null, /*#__PURE__*/React__default["default"].createElement(index$6["default"], {
255
+ getRowStyle: props.getRowStyle
256
+ })), globalStaticRef.current.showFooter ? ( /*#__PURE__*/React__default["default"].createElement(index$4.TableContainer.Footer, {
257
+ sticky: stickyOpts === null || stickyOpts === void 0 ? void 0 : stickyOpts.footer,
258
+ stickyOffset: stickyOpts === null || stickyOpts === void 0 ? void 0 : stickyOpts.footerBottom
259
+ }, /*#__PURE__*/React__default["default"].createElement(index$7["default"], null))) : null)), /*#__PURE__*/React__default["default"].createElement(bottom.BottomRender, Object.assign({
260
+ key: "bottom-container"
261
+ }, propsRef.current.bottom))), globalStaticRef.current.enableAsyncData ? /*#__PURE__*/React__default["default"].createElement(getter$1.AsyncDataGetter, null) : null));
262
+ }
263
+ exports.EditableSchemaTable = EditableSchemaTable;
@@ -0,0 +1,19 @@
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
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, '__esModule', {
13
+ value: true
14
+ });
15
+ var schemaUtils = require('@hi-ui/schema-utils');
16
+ var clsPrefix = 'editable-schema-table';
17
+ var cls = schemaUtils.createPrefixClassnames(clsPrefix);
18
+ exports.cls = cls;
19
+ exports.clsPrefix = clsPrefix;
@@ -0,0 +1,53 @@
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
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, '__esModule', {
13
+ value: true
14
+ });
15
+ var _const = require('../const.js');
16
+ function getFixedStyles(column, opts) {
17
+ var isPinned = column.getIsPinned();
18
+ if (!isPinned) return {};
19
+ var style = {};
20
+ if (isPinned === 'left') {
21
+ var className = ['fixed-left'];
22
+ // 如果开启行选择,则需要增加偏移量,+1是边框的偏移
23
+ var enableRowSelection = opts.globalStaticRef.current.enableRowSelection;
24
+ var offset = enableRowSelection ? _const.ROW_SELECTION_COL_WIDTH : 0;
25
+ style.left = column.getStart('left') + offset;
26
+ // 增加阴影
27
+ var isLastLeft = column.getIsLastColumn('left');
28
+ if (isLastLeft) className.push('last-fixed-left');
29
+ return {
30
+ className: className,
31
+ style: style
32
+ };
33
+ }
34
+ if (isPinned === 'right') {
35
+ var _className = ['fixed-right'];
36
+ style.right = column.getAfter('right');
37
+ // 如果开启行操作,则需要增加偏移量
38
+ var _opts$globalStaticRef = opts.globalStaticRef.current,
39
+ enableRowOperation = _opts$globalStaticRef.enableRowOperation,
40
+ operationColWidth = _opts$globalStaticRef.operationColWidth;
41
+ var _offset = enableRowOperation ? operationColWidth : 0;
42
+ style.right = column.getAfter('right') + _offset;
43
+ // 增加阴影
44
+ var isFirstRight = column.getIsFirstColumn('right');
45
+ if (isFirstRight) _className.push('first-fixed-right');
46
+ return {
47
+ className: _className,
48
+ style: style
49
+ };
50
+ }
51
+ return {};
52
+ }
53
+ exports.getFixedStyles = getFixedStyles;
@@ -0,0 +1,42 @@
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
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, '__esModule', {
13
+ value: true
14
+ });
15
+ var lodashEs = require('lodash-es');
16
+
17
+ /**
18
+ * 检查值是否为空值(包括null、undefined、'null'、'undefined'和空字符串)
19
+ */
20
+ function isEmptyValue(value) {
21
+ if (lodashEs.isNil(value)) return true;
22
+ if (value === 'null' || value === 'undefined' || value === '') return true;
23
+ return false;
24
+ }
25
+ // 参考了内置的 flattenBy 方法
26
+ // https://github.com/TanStack/table/blob/66fbe3a74b129e700e4667d1d5e1b29dd0a7b723/packages/table-core/src/utils.ts#L115-L134
27
+ function getGroupedLeafRows(rows) {
28
+ var flat = [];
29
+ var recurse = function recurse(subRows) {
30
+ subRows.forEach(function (row) {
31
+ if (!row.getIsGrouped()) flat.push(row);
32
+ var children = row.subRows;
33
+ if (children === null || children === void 0 ? void 0 : children.length) {
34
+ recurse(children);
35
+ }
36
+ });
37
+ };
38
+ recurse(rows);
39
+ return flat;
40
+ }
41
+ exports.getGroupedLeafRows = getGroupedLeafRows;
42
+ exports.isEmptyValue = isEmptyValue;
@@ -0,0 +1,43 @@
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
+ 'use strict';
11
+
12
+ Object.defineProperty(exports, '__esModule', {
13
+ value: true
14
+ });
15
+
16
+ /**
17
+ * 确保状态字段完整性,为被清空的字段添加默认值
18
+ * @param state 变化前的状态
19
+ * @param newState 变化后的状态
20
+ * @param stateKey 要设置默认值的字段名
21
+ * @param defaultValue 字段被清空时的默认值
22
+ * @returns 处理后的状态
23
+ */
24
+ function ensureStateFields(state, newState, stateKey, defaultValue) {
25
+ // 如果没有前一个状态,直接返回新状态
26
+ if (!state || state.length === 0) return newState;
27
+ // 创建新状态的 id 集合
28
+ var newStateIds = new Set(newState.map(function (item) {
29
+ return item.id;
30
+ }));
31
+ // 找出被删除的字段,为它们添加默认值
32
+ var missingItems = state.filter(function (item) {
33
+ return !newStateIds.has(item.id);
34
+ }).map(function (item) {
35
+ var _ref;
36
+ return _ref = {
37
+ id: item.id
38
+ }, _ref[stateKey] = defaultValue, _ref;
39
+ });
40
+ // 合并新状态和缺失字段的默认值
41
+ return [].concat(newState, missingItems);
42
+ }
43
+ exports.ensureStateFields = ensureStateFields;
@@ -0,0 +1,98 @@
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 React from 'react';
11
+ import { useMount } from 'ahooks';
12
+ import { useEditableSchemaTableCtx } from '../ctx.js';
13
+ import '../container/index.js';
14
+ import { cls } from '../utils/cls.js';
15
+ import { BodyCellWrapper } from './wrapper.js';
16
+ import { useTableContainer } from '../container/ctx.js';
17
+ var BodyRow = /*#__PURE__*/React.memo(function BodyRow(props) {
18
+ var _a, _b, _c, _d, _e;
19
+ var row = props.row;
20
+ var _useTableContainer = useTableContainer(),
21
+ virtualize = _useTableContainer.virtualize;
22
+ var _useEditableSchemaTab = useEditableSchemaTableCtx(),
23
+ propsRef = _useEditableSchemaTab.propsRef;
24
+ var realCells = row.getVisibleCells();
25
+ var rowStyle = (_a = props.getRowStyle) === null || _a === void 0 ? void 0 : _a.call(props, row.original, {
26
+ row: row
27
+ });
28
+ var leftCells = row.getLeftVisibleCells();
29
+ var rightCells = row.getRightVisibleCells();
30
+ var centerCells = row.getCenterVisibleCells();
31
+ useMount(function () {
32
+ var _a, _b, _c;
33
+ (_c = (_b = (_a = propsRef.current) === null || _a === void 0 ? void 0 : _a.on) === null || _b === void 0 ? void 0 : _b.rowMounted) === null || _c === void 0 ? void 0 : _c.call(_b, {
34
+ row: row
35
+ });
36
+ });
37
+ return /*#__PURE__*/React.createElement("tr", {
38
+ // tr
39
+ key: row.id,
40
+ style: rowStyle,
41
+ className: cls('body-row'),
42
+ "data-index": row.index,
43
+ "data-id": row.id
44
+ }, leftCells.map(function (cell) {
45
+ return /*#__PURE__*/React.createElement(BodyCellWrapper, {
46
+ key: cell.id,
47
+ cell: cell,
48
+ fixed: true
49
+ });
50
+ }), ((_c = (_b = virtualize === null || virtualize === void 0 ? void 0 : virtualize.colPadding) === null || _b === void 0 ? void 0 : _b.left) !== null && _c !== void 0 ? _c : 0) > 0 && /*#__PURE__*/React.createElement("td", null), ((virtualize === null || virtualize === void 0 ? void 0 : virtualize.columns) || centerCells).map(function (cellOrVirtual) {
51
+ var cell = 'index' in cellOrVirtual ? realCells[cellOrVirtual.index] : cellOrVirtual;
52
+ // 固定列不参与中间部分渲染
53
+ if (cell.column.getIsPinned()) return null;
54
+ return /*#__PURE__*/React.createElement(BodyCellWrapper, {
55
+ key: cell.id,
56
+ cell: cell
57
+ });
58
+ }), ((_e = (_d = virtualize === null || virtualize === void 0 ? void 0 : virtualize.colPadding) === null || _d === void 0 ? void 0 : _d.right) !== null && _e !== void 0 ? _e : 0) > 0 && /*#__PURE__*/React.createElement("td", null), rightCells.map(function (cell) {
59
+ return /*#__PURE__*/React.createElement(BodyCellWrapper, {
60
+ key: cell.id,
61
+ cell: cell,
62
+ fixed: true
63
+ });
64
+ }));
65
+ });
66
+ var Body = /*#__PURE__*/React.memo(function Body(props) {
67
+ var _a, _b, _c, _d, _e, _f, _g, _h;
68
+ var _useEditableSchemaTab2 = useEditableSchemaTableCtx(),
69
+ table = _useEditableSchemaTab2.table;
70
+ var _useTableContainer2 = useTableContainer(),
71
+ virtualize = _useTableContainer2.virtualize;
72
+ var _table$getRowModel = table.getRowModel(),
73
+ realRows = _table$getRowModel.rows;
74
+ return /*#__PURE__*/React.createElement("tbody", {
75
+ className: cls('body', props.className)
76
+ }, ((_b = (_a = virtualize === null || virtualize === void 0 ? void 0 : virtualize.rowPadding) === null || _a === void 0 ? void 0 : _a.top) !== null && _b !== void 0 ? _b : 0) > 0 && ( /*#__PURE__*/React.createElement("tr", {
77
+ className: cls('body-row', 'virtual-spacer', 'virtual-spacer-top')
78
+ }, /*#__PURE__*/React.createElement("td", {
79
+ style: {
80
+ height: (_d = (_c = virtualize === null || virtualize === void 0 ? void 0 : virtualize.rowPadding) === null || _c === void 0 ? void 0 : _c.top) !== null && _d !== void 0 ? _d : 0
81
+ }
82
+ }))), ((virtualize === null || virtualize === void 0 ? void 0 : virtualize.rows) || realRows).map(function (rowOrVirtual) {
83
+ var row = 'id' in rowOrVirtual ? rowOrVirtual : realRows[rowOrVirtual.index];
84
+ if (!row) return null;
85
+ return /*#__PURE__*/React.createElement(BodyRow, {
86
+ key: row.id,
87
+ row: row,
88
+ getRowStyle: props.getRowStyle
89
+ });
90
+ }), ((_f = (_e = virtualize === null || virtualize === void 0 ? void 0 : virtualize.rowPadding) === null || _e === void 0 ? void 0 : _e.bottom) !== null && _f !== void 0 ? _f : 0) > 0 && ( /*#__PURE__*/React.createElement("tr", {
91
+ className: cls('body-row', 'virtual-spacer', 'virtual-spacer-bottom')
92
+ }, /*#__PURE__*/React.createElement("td", {
93
+ style: {
94
+ height: (_h = (_g = virtualize === null || virtualize === void 0 ? void 0 : virtualize.rowPadding) === null || _g === void 0 ? void 0 : _g.bottom) !== null && _h !== void 0 ? _h : 0
95
+ }
96
+ }))));
97
+ });
98
+ export { Body as default };