@kdcloudjs/table 1.2.1-canary.7-hotfix.1 → 1.2.2-canary.10

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 (199) hide show
  1. package/LICENSE +568 -568
  2. package/README.md +111 -111
  3. package/dist/@kdcloudjs/table.css +1 -1
  4. package/dist/@kdcloudjs/table.css.map +0 -0
  5. package/dist/@kdcloudjs/table.js +4095 -2984
  6. package/dist/@kdcloudjs/table.js.map +1 -1
  7. package/dist/@kdcloudjs/table.min.css +1 -1
  8. package/dist/@kdcloudjs/table.min.js +12 -10
  9. package/dist/@kdcloudjs/table.min.js.map +1 -1
  10. package/dist/default-theme.js +0 -0
  11. package/dist/kd-ui-complete.less +777 -777
  12. package/dist/kd-ui.less +0 -0
  13. package/dist/theme.js +0 -0
  14. package/es/_utils/formatUtil.js +1 -5
  15. package/es/_utils/hooks.js +3 -3
  16. package/es/_utils/usePopper.js +13 -13
  17. package/es/locale/locale.js +6 -7
  18. package/es/style/color/colors.less +1 -1
  19. package/es/style/core/index.less +1 -1
  20. package/es/style/core/motion/other.less +27 -27
  21. package/es/style/core/motion/slide.less +53 -53
  22. package/es/style/core/motion.less +1 -1
  23. package/es/style/core/reset.less +185 -185
  24. package/es/style/index.less +1 -1
  25. package/es/style/mixins/index.less +18 -18
  26. package/es/style/mixins/overlay.less +21 -21
  27. package/es/style/mixins/reset.less +12 -12
  28. package/es/style/themes/default.less +445 -445
  29. package/es/table/base/calculations.js +3 -3
  30. package/es/table/base/empty.js +2 -2
  31. package/es/table/base/globalStyleComponent.d.ts +4 -0
  32. package/es/table/base/globalStyleComponent.js +24 -0
  33. package/es/table/base/header.js +5 -7
  34. package/es/table/base/helpers/SpanManager.js +1 -2
  35. package/es/table/base/helpers/TableDOMUtils.js +5 -6
  36. package/es/table/base/html-table.js +3 -4
  37. package/es/table/base/loading.js +2 -2
  38. package/es/table/base/renderTemplates.js +16 -16
  39. package/es/table/base/styles.d.ts +11 -0
  40. package/es/table/base/styles.js +18 -7
  41. package/es/table/base/table.js +18 -20
  42. package/es/table/base/utils.js +3 -3
  43. package/es/table/interfaces.d.ts +41 -0
  44. package/es/table/pipeline/const.d.ts +3 -0
  45. package/es/table/pipeline/const.js +3 -0
  46. package/es/table/pipeline/features/columnDrag.js +0 -1
  47. package/es/table/pipeline/features/columnFilter.js +1 -3
  48. package/es/table/pipeline/features/columnResizeWidth.js +2 -2
  49. package/es/table/pipeline/features/contextMenu.js +4 -6
  50. package/es/table/pipeline/features/featureApi/RowDragApi.d.ts +15 -0
  51. package/es/table/pipeline/features/featureApi/RowDragApi.js +66 -0
  52. package/es/table/pipeline/features/featureApi/utils.d.ts +2 -0
  53. package/es/table/pipeline/features/featureApi/utils.js +10 -0
  54. package/es/table/pipeline/features/filter/DefaultFilterContent.js +4 -5
  55. package/es/table/pipeline/features/filter/Filter.js +2 -3
  56. package/es/table/pipeline/features/rangeSelection.js +10 -10
  57. package/es/table/pipeline/features/rowDetail.js +2 -2
  58. package/es/table/pipeline/features/rowDrag.d.ts +12 -12
  59. package/es/table/pipeline/features/rowDrag.js +605 -192
  60. package/es/table/pipeline/features/rowGrouping.js +2 -2
  61. package/es/table/pipeline/features/sort.js +6 -7
  62. package/es/table/pipeline/features/tips.js +4 -4
  63. package/es/table/pipeline/features/treeMode.d.ts +1 -0
  64. package/es/table/pipeline/features/treeMode.js +39 -12
  65. package/es/table/pipeline/features/treeSelect.js +2 -2
  66. package/es/table/pipeline/pipeline.d.ts +3 -0
  67. package/es/table/pipeline/pipeline.js +24 -3
  68. package/es/table/pivot/cross-table/buildCrossTable.js +6 -8
  69. package/es/table/pivot/cross-table/cross-table.js +1 -3
  70. package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
  71. package/es/table/pivot/cross-tree-table/cross-tree-table.js +8 -11
  72. package/es/table/pivot/pivot-utils/builders.js +3 -3
  73. package/es/table/pivot/pivot-utils/convert-utils.js +3 -3
  74. package/es/table/style/index.less +1 -1
  75. package/es/table/transforms/autoWidth.js +3 -3
  76. package/es/table/transforms/columnResize.js +3 -5
  77. package/es/table/transforms/sort.js +6 -8
  78. package/es/table/transforms/tips.js +4 -4
  79. package/es/table/transforms/treeMode.js +6 -8
  80. package/es/table/utils/buildTree.js +3 -3
  81. package/es/table/utils/collectNodes.js +3 -3
  82. package/es/table/utils/exportTableAsExcel.js +3 -3
  83. package/es/table/utils/getTreeDepth.js +3 -3
  84. package/es/table/utils/groupBy.js +3 -3
  85. package/es/table/utils/makeRecursiveMapper.js +3 -3
  86. package/es/table/utils/mergeCellProps.js +0 -1
  87. package/es/table/utils/others.js +3 -3
  88. package/es/table/utils/traverseColumn.js +3 -3
  89. package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +7 -8
  90. package/es/table/utils/tree-data-helpers/TreeDataHelper.js +4 -5
  91. package/lib/_utils/arrayUtil.js +2 -3
  92. package/lib/_utils/formatUtil.js +1 -5
  93. package/lib/_utils/hooks.js +3 -3
  94. package/lib/_utils/index.js +2 -3
  95. package/lib/_utils/type.js +3 -5
  96. package/lib/_utils/usePopper.js +18 -21
  97. package/lib/config-provider/ConfigContext.js +1 -2
  98. package/lib/config-provider/compDefaultProps.js +1 -2
  99. package/lib/config-provider/configProvider.js +3 -4
  100. package/lib/config-provider/defaultConfig.js +1 -2
  101. package/lib/config-provider/index.js +1 -2
  102. package/lib/locale/index.js +3 -4
  103. package/lib/locale/locale.js +10 -14
  104. package/lib/locale/zh-CN.js +1 -2
  105. package/lib/style/color/colors.less +2 -0
  106. package/lib/style/components.less +1 -1
  107. package/lib/style/core/index.less +2 -0
  108. package/lib/style/core/motion/other.less +28 -0
  109. package/lib/style/core/motion/slide.less +53 -0
  110. package/lib/style/core/motion.less +2 -0
  111. package/lib/style/core/reset.less +186 -0
  112. package/lib/style/index.css +410 -0
  113. package/lib/style/index.less +2 -0
  114. package/lib/style/mixins/index.less +19 -0
  115. package/lib/style/mixins/overlay.less +22 -0
  116. package/lib/style/mixins/reset.less +13 -0
  117. package/lib/style/themes/default.less +445 -0
  118. package/lib/style/themes/index.less +1 -0
  119. package/lib/table/base/calculations.js +3 -3
  120. package/lib/table/base/empty.js +4 -4
  121. package/lib/table/base/globalStyleComponent.d.ts +4 -0
  122. package/lib/table/base/globalStyleComponent.js +35 -0
  123. package/lib/table/base/header.js +5 -7
  124. package/lib/table/base/helpers/SpanManager.js +3 -5
  125. package/lib/table/base/helpers/TableDOMUtils.js +7 -9
  126. package/lib/table/base/helpers/getRichVisibleRectsStream.js +2 -2
  127. package/lib/table/base/html-table.js +3 -4
  128. package/lib/table/base/loading.js +2 -2
  129. package/lib/table/base/renderTemplates.js +18 -18
  130. package/lib/table/base/styles.d.ts +11 -0
  131. package/lib/table/base/styles.js +25 -21
  132. package/lib/table/base/table.js +30 -31
  133. package/lib/table/base/utils.js +13 -20
  134. package/lib/table/common-views.js +4 -8
  135. package/lib/table/interfaces.d.ts +41 -0
  136. package/lib/table/internals.js +2 -3
  137. package/lib/table/pipeline/const.d.ts +3 -0
  138. package/lib/table/pipeline/const.js +9 -0
  139. package/lib/table/pipeline/features/autoFill.js +3 -6
  140. package/lib/table/pipeline/features/colGroupExtendable.js +2 -3
  141. package/lib/table/pipeline/features/columnDrag.js +0 -1
  142. package/lib/table/pipeline/features/columnFilter.js +1 -3
  143. package/lib/table/pipeline/features/columnResizeWidth.js +7 -10
  144. package/lib/table/pipeline/features/contextMenu.js +6 -8
  145. package/lib/table/pipeline/features/featureApi/RowDragApi.d.ts +15 -0
  146. package/lib/table/pipeline/features/featureApi/RowDragApi.js +72 -0
  147. package/lib/table/pipeline/features/featureApi/utils.d.ts +2 -0
  148. package/lib/table/pipeline/features/featureApi/utils.js +17 -0
  149. package/lib/table/pipeline/features/filter/DefaultFilterContent.js +7 -9
  150. package/lib/table/pipeline/features/filter/Filter.js +5 -7
  151. package/lib/table/pipeline/features/filter/FilterPanel.js +3 -4
  152. package/lib/table/pipeline/features/filter/util.js +2 -3
  153. package/lib/table/pipeline/features/footerDataSource.js +1 -2
  154. package/lib/table/pipeline/features/rangeSelection.js +12 -14
  155. package/lib/table/pipeline/features/rowDetail.js +2 -2
  156. package/lib/table/pipeline/features/rowDrag.d.ts +12 -12
  157. package/lib/table/pipeline/features/rowDrag.js +608 -197
  158. package/lib/table/pipeline/features/rowGrouping.js +2 -2
  159. package/lib/table/pipeline/features/sort.js +6 -7
  160. package/lib/table/pipeline/features/tips.js +4 -4
  161. package/lib/table/pipeline/features/treeMode.d.ts +1 -0
  162. package/lib/table/pipeline/features/treeMode.js +41 -14
  163. package/lib/table/pipeline/features/treeSelect.js +2 -2
  164. package/lib/table/pipeline/index.js +2 -2
  165. package/lib/table/pipeline/pipeline.d.ts +3 -0
  166. package/lib/table/pipeline/pipeline.js +25 -5
  167. package/lib/table/pivot/cross-table/buildCrossTable.js +6 -8
  168. package/lib/table/pivot/cross-table/constants.js +1 -2
  169. package/lib/table/pivot/cross-table/cross-table.js +3 -6
  170. package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
  171. package/lib/table/pivot/cross-tree-table/cross-tree-table.js +9 -13
  172. package/lib/table/pivot/pivot-utils/builders.js +3 -3
  173. package/lib/table/pivot/pivot-utils/convert-utils.js +3 -3
  174. package/lib/table/style/index.css +0 -0
  175. package/lib/table/style/index.less +1 -0
  176. package/lib/table/transforms/autoWidth.js +5 -5
  177. package/lib/table/transforms/columnResize.js +5 -7
  178. package/lib/table/transforms/sort.js +8 -10
  179. package/lib/table/transforms/tips.js +4 -4
  180. package/lib/table/transforms/treeMode.js +8 -10
  181. package/lib/table/use/useResizeObserver.js +1 -2
  182. package/lib/table/utils/browserType.js +2 -4
  183. package/lib/table/utils/buildTree.js +3 -3
  184. package/lib/table/utils/collectNodes.js +3 -3
  185. package/lib/table/utils/console.js +2 -3
  186. package/lib/table/utils/copyToClipboard.js +1 -2
  187. package/lib/table/utils/exportTableAsExcel.js +3 -3
  188. package/lib/table/utils/getTreeDepth.js +3 -3
  189. package/lib/table/utils/groupBy.js +3 -3
  190. package/lib/table/utils/keyCode.js +1 -2
  191. package/lib/table/utils/makeRecursiveMapper.js +3 -3
  192. package/lib/table/utils/mergeCellProps.js +0 -1
  193. package/lib/table/utils/others.js +4 -5
  194. package/lib/table/utils/proto.js +1 -2
  195. package/lib/table/utils/selectColumn.js +2 -4
  196. package/lib/table/utils/traverseColumn.js +3 -3
  197. package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +9 -11
  198. package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +6 -8
  199. package/package.json +218 -219
@@ -0,0 +1,445 @@
1
+ @kd-prefix: kd;
2
+
3
+ /* ----------- color ——————---- start */
4
+ @theme-color: #5582f3; // 主题色
5
+ // 使用hsb/hsv 计算色值
6
+ @hsv-h: hsvhue(@theme-color); // 色相
7
+ @hsv-s: hsvsaturation(@theme-color); // 饱和度
8
+ @hsv-v: hsvvalue(@theme-color); // 明度
9
+
10
+ @theme-color-disabled: hsv(@hsv-h, max(5%, (@hsv-s - 54%)), min((@hsv-v + 24%), 100%)); // 禁用色
11
+ @theme-color-hover: hsv(@hsv-h, max(5%, (@hsv-s - 18%)), min((@hsv-v + 8%), 100%)); // 悬浮色
12
+ @theme-color-click: hsv(@hsv-h, min((@hsv-s + 8%), 100%), max(5%, (@hsv-v - 16%))); // 点击色
13
+ @theme-color-active-light: hsv(@hsv-h, max(5%, (@hsv-s - 90%)), min((@hsv-v + 40%), 100%)); // 浅色选中
14
+ @theme-color-active-dark: @theme-color; // 深色选中
15
+ @hover-color: #f5f5f5; // 中性的悬停色
16
+ @disabled-contain-bg: #f5f5f5; // 容器失效背景色
17
+ @success-color: #1ba854; // 成功色(深)
18
+ @success-bg-color: #f2fff5; // 成功反馈浮层的底色
19
+ @success-border-color: #6dd18e; // 成功反馈浮层的容器边框色
20
+ @warning-color: #ff991c; // 警示色(深)
21
+ @warning-bg-color: #fffbf2; // 警示反馈浮层的底色
22
+ @warning-border-color: #ffcb78; // 警示反馈浮层的容器边框色
23
+ @error-color: #fb2323; // 失败色(深)
24
+ @error-bg-color: #fff2f4; // 失败反馈浮层的底色
25
+ @error-border-color: #ff8088; // 失败反馈浮层的容器边框色
26
+ @ongoing-color: #276ff5; // 进行中(深)
27
+ @ongoing-bg-color: #f2f9ff; // 进行中反馈浮层的底色
28
+ @ongoing-border-color: #85b8ff; // 进行中反馈浮层的容器边框色
29
+ @disabled-color: #b2b2b2; // 失效色
30
+ @disabled-border-color: #ccc; // 失效边框色
31
+ @end-color: #666; // 暂停或者终止等状态标签色
32
+ @link-color: #0e5fd8; // 链接色
33
+ @link-color-hover: #3987ed; // 链接色或辅助色(悬浮)
34
+ @link-color-active: #0041b0; // 链接色或辅助色(点击)
35
+ @primary-text-color: #212121; // 一级文本
36
+ @primary-text-color2: rgba(255, 255, 255, 1); // 一级文本
37
+ @secondary-text-color: #666; // 二级文本
38
+ @secondary-text-color2: rgba(255, 255, 255, 0.65); // 二级文本
39
+ @third-text-color: #999; // 三级文本
40
+ @third-text-color2: rgba(255, 255, 255, 0.4); // 三级文本
41
+ @placeholder-text-color: #ccc; // 占位符文本
42
+ @placeholder-text-color2: rgba(255, 255, 255, 0.3); // 占位符文本
43
+ @bg: #fff; // 底色白背景
44
+ @bg2: #f2f2f2; // 底色灰背景
45
+ @contain-bg: #fafafa; // 容器内的灰背景
46
+ @radius-size: 2px; // 圆角值
47
+ @input-color: #999; // 线型录入的默认态
48
+ @strong-border-color: #d9d9d9; // 强线条 --带操作
49
+ @strong-border-color-1: #d9d9d9; // 强线条 --分割内容/容器包裹线
50
+ @weak-border-color: #e5e5e5; // 弱线条 -- 需要多层级时
51
+ // @shadow-on-hover: ; // 悬停时阴影
52
+ @white: #fff;
53
+ @dirList: left, top, bottom, right;
54
+ /* ----------- color ——————---- end */
55
+
56
+ /* ----------- font ——————---- start */
57
+ @font-size: 14px;
58
+ @font-weight: 400;
59
+ @small-font-size: 12px;
60
+ @middle-font-size: 14px;
61
+ @large-font-size: 16px;
62
+ @xlarge-font-size: 18px;
63
+ /* ----------- font ——————---- end */
64
+
65
+ @radius-size: 2px; // 圆角值
66
+
67
+ /* ----------- zIndex ——————---- start */
68
+ /*
69
+ 普通组件内部自身层级应设置在0-100间
70
+ */
71
+ @zIndex-below: -1; // 置于下层
72
+ @zIndex-popper: 1000; // 弹出层
73
+ @zIndex-dialog: 1050; // 对话框
74
+ @zIndex-masker: 3000; // 遮罩层 (loading等)
75
+ @zIndex-apex: 9999; // 顶层 (notify)
76
+ /* ----------- zIndex ——————---- end */
77
+
78
+ /* ----------- transition ——————---- start */
79
+ @transition-duration: 0.3s;
80
+ /* ----------- transition ——————---- end */
81
+
82
+ /* ----------- Button ——————---- start */
83
+ @btn-border-width: 1px;
84
+ @btn-border-style: solid;
85
+ @btn-primary-font-color: @white; // 基础文字颜色
86
+ @btn-primary-background-color: @theme-color; // 基础背景颜色
87
+ @btn-primary-border-color: @theme-color; // 基础边框颜色
88
+
89
+ @btn-ghost-font-color: @secondary-text-color; // 幽灵按钮文字颜色
90
+ @btn-ghost-background-color: transparent; // 幽灵背景颜色
91
+ @btn-ghost-border-color: @strong-border-color; //幽灵边框颜色
92
+
93
+ @btn-second-font-color: fade(@secondary-text-color, 65%); // 次要文字颜色
94
+ @btn-second-background-color: fade(@white, 65%); // 次要背景颜色
95
+ @btn-second-border-color: fade(@strong-border-color, 65%); // 次要边框颜色
96
+
97
+ @btn-link-font-color: @link-color; // 链接文字颜色
98
+
99
+ @btn-disabled-font-color: @white; // 禁用状态 文字颜色
100
+ @btn-disabled-background-color: @disabled-contain-bg; // 禁用状态 背景颜色
101
+ @btn-disabled-border-color: @strong-border-color; // 禁用状态 边框颜色
102
+
103
+ @btn-danger-font-color: @white; // 危险状态 文字颜色
104
+ @btn-danger-background-color: @error-color; // 危险状态 背景颜色
105
+ @btn-danger-border-color: @error-color; // 危险状态 边框颜色
106
+
107
+ @btn-small-font-size: @small-font-size; // 小号 文字大小
108
+ @btn-small-height: 24px; // 小号 高度
109
+ @btn-small-min-width: 60px; // 小号 最小宽度
110
+ @btn-small-padding-vertical: 3px; // 小号 内间距 纵向
111
+ @btn-small-padding-horizontal: 8px; // 小号 内间距 横向
112
+
113
+ @btn-middle-font-size: @small-font-size; // 中号 文字大小
114
+ @btn-middle-height: 28px; // 中号 高度
115
+ @btn-middle-min-width: 60px; // 中号 最小宽度
116
+ @btn-middle-padding-vertical: 5px; // 中号 内间距 纵向
117
+ @btn-middle-padding-horizontal: 8px; // 中号 内间距 纵向
118
+
119
+ @btn-large-font-size: @large-font-size; // 大号 文字大小
120
+ @btn-large-height: 32px; // 大号 高度
121
+ @btn-large-min-width: 80px; // 大号 最小宽度
122
+ @btn-large-padding-vertical: 6px; // 大号 内间距 纵向
123
+ @btn-large-padding-horizontal: 8px; // 大号 内间距 横向
124
+ @btn-transition-fn: cubic-bezier(0.075, 0.82, 0.165, 1);
125
+ /* ----------- Button ——————---- end */
126
+
127
+ /* ----------- Collapse ——————---- start */
128
+ @collapse-border-width: 1px;
129
+ @collapse-border-color: @strong-border-color-1;
130
+ @collapse-icon-margin-right: 6px;
131
+ @collapse-header-font-color: @primary-text-color;
132
+ @collapse-header-font-size: @font-size;
133
+ @collapse-content-font-color: @primary-text-color;
134
+ @collapse-content-font-size: @font-size;
135
+ @collapse-content-padding: 10px 0px 0px 20px;
136
+ @collapse-disabled-color: @disabled-color;
137
+
138
+ /* ----------- Collapse ——————---- end */
139
+
140
+ /* ----------- Switch ——————---- start */
141
+ @switch-small-font-size: @small-font-size;
142
+ @switch-small-line-height: 14px;
143
+ @switch-small-height: 14px;
144
+ @switch-small-min-width: 28px;
145
+ @switch-small-border-radius: 7px;
146
+ @switch-large-font-size: @small-font-size;
147
+ @switch-large-line-height: 20px;
148
+ @switch-large-height: 20px;
149
+ @switch-large-min-width: 40px;
150
+ @switch-large-border-radius: 10px;
151
+ @switch-on-color: @theme-color;
152
+ @switch-off-color: #999;
153
+ @switch-disabled-bg: @disabled-color;
154
+ @switch-loading-color: @ongoing-color;
155
+ @switch-font-color: @white;
156
+ @switch-inner-small-font-size: @small-font-size;
157
+ @switch-inner-margin: 0 5px 0 16px;
158
+ @switch-inner-checked-margin: 0 16px 0 5px;
159
+ @switch-inner-large-margin: 0 5px 0 21px;
160
+ @switch-inner-large-checked-margin: 0 21px 0 5px;
161
+ /* ----------- Switch ——————---- end */
162
+
163
+ /* ----------- Input ——————---- start */
164
+ @input-placeholder-color: @third-text-color;
165
+ @input-font-color: @secondary-text-color;
166
+ @input-focus-color: @primary-text-color;
167
+ @input-background-color: @white;
168
+ @input-border-width: 1px;
169
+ @input-width: 230px;
170
+
171
+ @input-small-font-size: @small-font-size; // 小号 文字大小
172
+ @input-small-height: 20px; // 小号 高度
173
+ @input-small-padding-vertical: 3px; // 小号 内间距 纵向
174
+ @input-small-padding-horizontal: 9px; // 小号 内间距 横向
175
+
176
+ @input-middle-font-size: @middle-font-size; // 中号 文字大小
177
+ @input-middle-height: 30px; // 中号 高度
178
+ @input-middle-padding-vertical: 5px; // 中号 内间距 纵向
179
+ @input-middle-padding-horizontal: 9px; // 中号 内间距 纵向
180
+
181
+ @input-large-font-size: @large-font-size; // 大号 文字大小
182
+ @input-large-height: 36px; // 大号 高度
183
+ @input-large-padding-vertical: 8px; // 大号 内间距 纵向
184
+ @input-large-padding-horizontal: 9px; // 大号 内间距 横向
185
+ /* ----------- Input ——————---- end */
186
+
187
+ /* ----------- InputNumber ——————---- start */
188
+ @inputNumber-embedStepBtn-bg-color: #f6f7f9;
189
+ /* ----------- InputNumber ——————---- end */
190
+
191
+ /* ----------- checkbox ——————---- start */
192
+ @checkbox-font-size: @small-font-size; //默认字体大小
193
+ @checkbox-font-color: @primary-text-color;
194
+ @checkbox-border-color: @strong-border-color;
195
+ @checkbox-checked-border-color: @theme-color-active-dark;
196
+ @checkbox-checked-font-color: @theme-color-active-dark;
197
+ @checkbox-bg-color: @bg;
198
+ @checkbox-disabled-bg-color: @disabled-color;
199
+ @checkbox-small-size-height: 32px; // 小尺寸复选框
200
+ @checkbox-middle-size-height: 36px; // 中尺寸复选框
201
+ @checkbox-large-size-height: 40px; // 大尺寸复选框
202
+ @checkbox-border-width: 1px; // 边框类型边框大小
203
+ @checkbox-group-margin-right: 8px; // 按钮组的间距
204
+ @checkbox-default-padding: 0; // 默认类型复选框内边距
205
+ @checkbox-default-input-margin-right: 8px; // 勾选输入框与右侧内容间距
206
+ @checkbox-default-input-height: 16px; // 勾选输入框高度
207
+ @checkbox-default-input-width: 16px; // 勾选输入框宽度
208
+ @checkbox-default-input-border-radius: 4px; // 勾选输入框圆角
209
+ @checkbox-default-input-border-width: 1px; // 勾选输入框边框大小
210
+ @checkbox-default-input-icon-color: #fff; // 勾选输入框边勾勾图标颜色
211
+ @checkbox-default-input-icon-size: 12px; // 勾选输入框勾勾图标大小
212
+ @checkbox-square-padding: 0 20px; // 边框类型内边距
213
+ @checkbox-square-triangle-height: 18px; // 边框类型右下角三角高度
214
+ @checkbox-square-triangle-width: 18px; // 边框类型右下角三角宽度
215
+ @checkbox-square-input-icon-color: #fff; // 边框类型三角内勾选输入框勾勾图标颜色
216
+ @checkbox-square-input-icon-size: 9px; // 边框类型三角内勾选输入框勾勾图标大小
217
+ /* ----------- checkbox ——————---- end */
218
+
219
+ /* ----------- Radio ——————---- start */
220
+ @radio-font-size: @small-font-size;
221
+ @radio-font-color: @primary-text-color;
222
+ @radio-border-width: 1px;
223
+ @radio-margin-right: 8px;
224
+ @radio-transition-fn: cubic-bezier(0.075, 0.82, 0.165, 1);
225
+ @radio-circle-size: 13px;
226
+ @radio-square-height: 32px;
227
+ @radio-square-padding: 0 20px;
228
+ @radio-button-height: 24px;
229
+ @radio-button-padding: 0 18px;
230
+ /* ----------- Radio ——————---- end */
231
+
232
+ /* ----------- icon ——————---- start */
233
+ @icon-css-prefix: kdicon;
234
+ /* ----------- icon ——————---- end */
235
+
236
+ /* ----------- Popconfirm ——————---- start */
237
+ @popconfirm-icon-size: 17px;
238
+ @popconfirm-min-width: 164px;
239
+ @popconfirm-max-width: 500px;
240
+ @popconfirm-min-height: 98px;
241
+ @popconfirm-max-height: 400px;
242
+ @popconfirm-title-line-height: 21px;
243
+ @popconfirm-color: @primary-text-color;
244
+ @popconfirm-font-size: @small-font-size;
245
+ @popconfirm-title-font-size: @middle-font-size;
246
+ @popconfirm-vertical-gap: 16px;
247
+ @popconfirm-horizontal-gap: 16px;
248
+ @popconfirm-background-color: @white;
249
+ @popconfirm-box-shadow-blur: 6px;
250
+ @popconfirm-transition-fn: cubic-bezier(0.25, 1, 0.5, 1);
251
+ @popconfirm-duration: 0.2s;
252
+ /* ----------- Popconfirm ——————---- end */
253
+
254
+ /* ----------- Popover ——————---- start */
255
+ @popover-min-width: 164px;
256
+ @popover-max-width: 500px;
257
+ @popover-min-height: 98px;
258
+ @popover-max-height: 400px;
259
+ @popover-title-line-height: 21px;
260
+ @popover-color: @primary-text-color;
261
+ @popover-font-size: @small-font-size;
262
+ @popover-title-font-size: @middle-font-size;
263
+ @popover-vertical-gap: 16px;
264
+ @popover-horizontal-gap: 16px;
265
+ @popover-background-color: @white;
266
+ @popover-box-shadow-blur: 6px;
267
+ @popover-transition-fn: cubic-bezier(0.25, 1, 0.5, 1);
268
+ @popover-duration: 0.2s;
269
+ /* ----------- Popover ——————---- end */
270
+
271
+ /* ----------- Progress ——————---- start */
272
+ @progress-remaining-color: #e5e5e5;
273
+ @progress-default-color: @ongoing-color;
274
+ @progress-success-color: @success-color;
275
+ @progress-failure-color: @error-color;
276
+ @progress-border-radius: 100px;
277
+ @progress-line-stroke-width: 8px;
278
+ @progress-line-text-width: 3em;
279
+ @progress-line-icon-font-size: 16px;
280
+ @progress-line-text-font-size: 16px;
281
+ @progress-line-special-text-font-size: 16px;
282
+ @progress-line-text-margin-left: 8px;
283
+ @progress-circle-stroke-width: 4px;
284
+ @progress-transition-fn: cubic-bezier(0.66, 0, 0.34, 1);
285
+ @progress-circle-text-font-size: 28px;
286
+ @progress-circle-percent-line-height: 48px;
287
+ @progress-circle-unit-line-height: 18px;
288
+ @progress-circle-unit-font-size: 12px;
289
+ @progress-circle-unit-margin-top: 18px;
290
+ @progress-circle-icon-font-size: 48px;
291
+ /* ----------- Progress ——————---- end */
292
+
293
+ /* ----------- Pagination ——————---- start */
294
+ @pagination-size: 24px;
295
+ @pagination-nicety-size: 30px;
296
+ @pagination-button-gap: 8px;
297
+ @pagination-hover-color: @theme-color;
298
+ @pagination-font-size: @small-font-size;
299
+ @pagination-icon-size: @large-font-size;
300
+ @pagination-font-color: @secondary-text-color;
301
+ @pagination-button-color: @secondary-text-color;
302
+ @pagination-button-disabled-color: @disabled-border-color;
303
+ @pagination-button-disabled-background-color: @disabled-contain-bg;
304
+ /* ----------- Pagination ——————---- end */
305
+
306
+ /* ----------- Timeline ——————---- start */
307
+ @timeline-width: 1px;
308
+ @timeline-dot-size: 12px;
309
+ @timeline-line-height: 18px;
310
+ @timeline-color: @weak-border-color;
311
+ @timeline-dot-border-width: 2px;
312
+ @timeline-dot-color: @theme-color;
313
+ @timeline-dot-bg: @white;
314
+ @timeline-item-padding-bottom: 26px;
315
+ /* ----------- Timeline ——————---- end */
316
+
317
+ /* ----------- Tabs ——————---- start */
318
+ @tabs-font-color: @secondary-text-color;
319
+ @tabs-border-color: @strong-border-color;
320
+ @tabPane-font-size: @font-size;
321
+ @tabPane-font-color-active: @theme-color;
322
+ @tabPane-font-color-hover: @theme-color;
323
+ @tabPane-font-color-disabled: @disabled-color;
324
+ @tab-line-color-active: @theme-color;
325
+ @tabs-card-bg: @disabled-contain-bg;
326
+ @tabs-height: 48px;
327
+ @tabs-border-width: 1px;
328
+ @tab-pane-height: 48px;
329
+ @tab-pane-line-height: 48px;
330
+ @tab-pane-margin-right: 24px;
331
+ @tab-transition-fn: cubic-bezier(0.42, 0, 1, 1);
332
+ /* ----------- Tabs ——————---- end */
333
+
334
+ /* ----------- Select ——————---- start */
335
+ @select-dropdown-bg: @bg;
336
+ @select-item-active-bg: #F5F5F5;
337
+ @select-dropdown-height: 22px;
338
+ @select-list-font-size: 12px;// 下拉列表文字大小
339
+ @select-large-font-size: 16px; // 大号字体
340
+ @select-middle-font-size: 14px; // 中号高度
341
+ @select-small-font-size: 12px; // 小号高度
342
+ @select-dropdown-line-height: 22px;
343
+ @select-item-selected-color: #276FF5;
344
+ @select-item-selected-bg: #F2F9FF;
345
+ @select-font-color: #212121;
346
+ @select-large-height: 36px; // 大号高度 lh:28px
347
+ @select-middle-height: 30px; // 中号高度lh:22px
348
+ @select-small-height: 20px; // 小号高度lh:12px
349
+ @select-large-line-height: 28px;
350
+ @select-middle-line-height: 22px;
351
+ @select-small-line-height: 12px;
352
+
353
+ /* ----------- Select ——————---- end */
354
+ /* ----------- Rate ——————---- start */
355
+ @rate-selected-color: #fdc200;
356
+ @rate-not-selected-color: #d9d9d9;
357
+ @rate-icon-margin: 10px;
358
+ @rate-small-font-size: @small-font-size;
359
+ @rate-middle-font-size: @middle-font-size;
360
+ @rate-large-font-size: @large-font-size;
361
+ /* ----------- Rate ——————---- end */
362
+
363
+ /* ----------- Dropdown ——————---- start */
364
+ @dropdown-menu-min-width: 136px;
365
+ @dropdown-menu-max-width: 320px;
366
+ @dropdown-menu-max-height: 336px;
367
+ @dropdown-menu-gap: 8px;
368
+ @dropdown-line-height: 18px;
369
+ @dropdown-color: @primary-text-color;
370
+ @dropdown-divided-color: @weak-border-color;
371
+ @dropdown-hover-bg-color: @disabled-contain-bg;
372
+ @dropdown-active-bg-color: @theme-color-active-light;
373
+ @dropdown-font-size: @small-font-size;
374
+ @dropdown-item-vertical-gap: 7px;
375
+ @dropdown-item-horizontal-gap: 12px;
376
+ @dropdown-box-shadow-blur: 10px;
377
+ @dropdown-transition-fn: cubic-bezier(0.25, 1, 0.5, 1);
378
+ @dropdown-duration: 0.2s;
379
+ /* ----------- Dropdown ——————---- end */
380
+
381
+ /* ----------- Tooltip ——————---- start */
382
+ @tooltip-width: 267px;
383
+ @tooltip-line-height: 18px;
384
+ @tooltip-color: @primary-text-color;
385
+ @tooltip-font-size: @small-font-size;
386
+ @tooltip-vertical-gap: 8px;
387
+ @tooltip-horizontal-gap: 12px;
388
+ @tooltip-background-color: @white;
389
+ @tooltip-box-shadow-blur: 6px;
390
+ /* ----------- Tooltip ——————---- end */
391
+
392
+ /* ----------- Transfer ——————---- start */
393
+ @transfer-disabled-bg: @disabled-contain-bg;
394
+ @transfer-border-color: @strong-border-color;
395
+ @transfer-padding-base: 14px;
396
+ @transfer-font-size-base: 12px;
397
+ @transfer-list-item-height: 32px;
398
+ @transfer-list-content-height: @transfer-list-item-height * 10;
399
+ @transfer-list-item-hover-bg: @hover-color;
400
+ @transfer-list-item-checked: @theme-color;
401
+ @transfer-list-item-disabled: @disabled-color;
402
+ @transfer-header-bg: #f5f5f5;
403
+ @transfer-header-height: 36px;
404
+ @transfer-search-height: 32px;
405
+ @transfer-search-prefix-icon-color: @theme-color;
406
+ @transfer-search-suffix-icon-color: #bbb;
407
+ @transfer-pagination-height: 36px;
408
+ /* ----------- Transfer ——————---- end */
409
+
410
+ /* ----------- Alert ——————---- start */
411
+ @success-alert-bg-color: @success-bg-color; // 反馈浮层成功提示的背景色
412
+ @warning-alert-bg-color: @warning-bg-color; // 反馈浮层警告提示的背景色
413
+ @error-alert-bg-color: @error-bg-color; // 反馈浮层错误提示的背景色
414
+ @info-alert-bg-color: @ongoing-bg-color; // 反馈浮层一般提示的背景色
415
+ @alert-transition-fn: cubic-bezier(0.32, 0.94, 0.6, 1);
416
+ /* ----------- Alert ——————---- end */
417
+
418
+ /* ----------- Split-Panel ——————---- start */
419
+ @split-panel-trigger-border-color: #ccc;
420
+ @split-panel-trigger-arrow-color: #a7b5d3;
421
+ @split-panel-trigger-arrow-hover-color: @theme-color;
422
+ @split-panel-trigger-line-width: 1px;
423
+ @split-panel-trigger-line-color: @split-panel-trigger-border-color;
424
+ /* ----------- Split-Panel ——————---- end */
425
+
426
+ /* ----------- Modal ——————---- start */
427
+ @confirm-modal-title-icon-bg: @ongoing-bg-color; // 提示弹窗的背景色
428
+ @warning-modal-title-icon-bg: @warning-bg-color; // 警告弹窗的背景色
429
+ @error-modal-title-icon-bg: @error-bg-color; // 反馈浮层错误提示的背景色
430
+ /* ----------- Modal ——————---- end */
431
+
432
+ /* ----------- Steps ——————---- start */
433
+ @steps-transition-fn: cubic-bezier(0.48, 0.04, 0.52, 0.96);
434
+ /* ----------- Steps ——————---- end */
435
+ /* ----------- Tag ——————---- start */
436
+ @tag-font-size: 12px;
437
+ @tag-border-radius: 10px;
438
+ @tag-height: 18px;
439
+ @tag-process-color: @ongoing-color;
440
+ @tag-success-color: @success-color;
441
+ @tag-warning-color: @warning-color;
442
+ @tag-error-color: @error-color;
443
+ @tag-end-color: @end-color;
444
+ @tag-expired-color: @disabled-color;
445
+ /* ----------- Tag ——————---- end */
@@ -0,0 +1 @@
1
+ @import './default.less';
@@ -21,9 +21,9 @@ var _typeof2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/ty
21
21
  var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
22
22
  var _utils = require("../utils");
23
23
  var _utils2 = require("./utils");
24
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
25
- function _unsupportedIterableToArray(o, minLen) { var _context10; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty2(_context10 = Object.prototype.toString.call(o)).call(_context10, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
26
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
24
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
25
+ function _unsupportedIterableToArray(r, a) { if (r) { var _context10; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty2(_context10 = {}.toString.call(r)).call(_context10, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
26
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
27
27
  function resolveVirtualEnabled(virtualEnum, defaultValue) {
28
28
  if (virtualEnum == null || virtualEnum === 'auto') {
29
29
  return defaultValue;
@@ -12,8 +12,8 @@ var _classnames = _interopRequireDefault(require("classnames"));
12
12
  var _react = _interopRequireWildcard(require("react"));
13
13
  var _colgroup = require("./colgroup");
14
14
  var _styles = require("./styles");
15
- function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
16
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
17
  var DefaultEmptyContent = /*#__PURE__*/_react.default.memo(function () {
18
18
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("img", {
19
19
  alt: "empty-image",
@@ -43,8 +43,8 @@ function EmptyHtmlTable(_ref) {
43
43
  style: {
44
44
  height: emptyCellHeight !== null && emptyCellHeight !== void 0 ? emptyCellHeight : 200
45
45
  }
46
- })))), show && /*#__PURE__*/_react.default.createElement("div", {
46
+ })))), show && (/*#__PURE__*/_react.default.createElement("div", {
47
47
  className: _styles.Classes.emptyWrapper,
48
48
  key: "empty"
49
- }, /*#__PURE__*/_react.default.createElement(EmptyContent, null)));
49
+ }, /*#__PURE__*/_react.default.createElement(EmptyContent, null))));
50
50
  }
@@ -0,0 +1,4 @@
1
+ import { PureComponent } from 'react';
2
+ export default class GlobalStyleComponent extends PureComponent {
3
+ render(): JSX.Element;
4
+ }
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
4
+ var _Reflect$construct = require("@babel/runtime-corejs3/core-js-stable/reflect/construct");
5
+ var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
6
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
7
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
8
+ Object.defineProperty(exports, "__esModule", {
9
+ value: true
10
+ });
11
+ exports.default = void 0;
12
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/classCallCheck"));
13
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
14
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/possibleConstructorReturn"));
15
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/getPrototypeOf"));
16
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/inherits"));
17
+ var _react = _interopRequireWildcard(require("react"));
18
+ var _styles = require("./styles");
19
+ function _getRequireWildcardCache(e) { if ("function" != typeof _WeakMap) return null; var r = new _WeakMap(), t = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
20
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && _Object$getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? _Object$getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
21
+ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
22
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
23
+ var GlobalStyleComponent = exports.default = /*#__PURE__*/function (_PureComponent) {
24
+ function GlobalStyleComponent() {
25
+ (0, _classCallCheck2.default)(this, GlobalStyleComponent);
26
+ return _callSuper(this, GlobalStyleComponent, arguments);
27
+ }
28
+ (0, _inherits2.default)(GlobalStyleComponent, _PureComponent);
29
+ return (0, _createClass2.default)(GlobalStyleComponent, [{
30
+ key: "render",
31
+ value: function render() {
32
+ return /*#__PURE__*/_react.default.createElement(_styles.GlobalStyle, null);
33
+ }
34
+ }]);
35
+ }(_react.PureComponent);
@@ -19,9 +19,9 @@ var _classnames = _interopRequireDefault(require("classnames"));
19
19
  var _react = _interopRequireDefault(require("react"));
20
20
  var _utils = require("../utils");
21
21
  var _styles = require("./styles");
22
- function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && _getIteratorMethod(o) || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
23
- function _unsupportedIterableToArray(o, minLen) { var _context6; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context6 = Object.prototype.toString.call(o)).call(_context6, 8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
24
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
22
+ function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof _Symbol && _getIteratorMethod(r) || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n = 0, F = function F() {}; return { s: F, n: function n() { return _n >= r.length ? { done: !0 } : { done: !1, value: r[_n++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t.return || t.return(); } finally { if (u) throw o; } } }; }
23
+ function _unsupportedIterableToArray(r, a) { if (r) { var _context6; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty(_context6 = {}.toString.call(r)).call(_context6, 8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? _Array$from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
24
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
25
25
  function range(n) {
26
26
  var array = [];
27
27
  for (var i = 0; i < n; i++) {
@@ -207,7 +207,6 @@ function TableHeader(_ref2) {
207
207
  var leftFlatCount = flat.left.length;
208
208
  var rightFlatCount = flat.right.length;
209
209
  var thead = (0, _map.default)(_context4 = headerRenderInfo.leveled).call(_context4, function (wrappedCols, level) {
210
- var _cx2;
211
210
  var _wrappedCols = (0, _concat.default)(wrappedCols).call(wrappedCols);
212
211
  // 左中右区域渲染,分组列可能单独位于一个区域,此时其他区域也需要适配分组的高度
213
212
  // rowspan 需要空白的列头去占位, 需要补充额外的空白列头
@@ -222,7 +221,6 @@ function TableHeader(_ref2) {
222
221
  var headerCells = (0, _map.default)(_wrappedCols).call(_wrappedCols, function (wrapped, index) {
223
222
  var _a, _b, _c;
224
223
  if (wrapped.type === 'normal') {
225
- var _cx;
226
224
  var colIndex = wrapped.colIndex,
227
225
  colSpan = wrapped.colSpan,
228
226
  isLeaf = wrapped.isLeaf,
@@ -241,7 +239,7 @@ function TableHeader(_ref2) {
241
239
  var cell = /*#__PURE__*/_react.default.createElement("th", (0, _extends2.default)({
242
240
  key: colIndex
243
241
  }, headerCellProps, {
244
- className: (0, _classnames.default)(_styles.Classes.tableHeaderCell, headerCellProps.className, (_cx = {}, (0, _defineProperty2.default)(_cx, _styles.Classes.first, colIndex === 0), (0, _defineProperty2.default)(_cx, _styles.Classes.last, colIndex + colSpan === fullFlatCount), (0, _defineProperty2.default)(_cx, _styles.Classes.lockLeft, colIndex < leftFlatCount || theaderPosition === 'left'), (0, _defineProperty2.default)(_cx, _styles.Classes.lockRight, colIndex >= fullFlatCount - rightFlatCount || theaderPosition === 'right'), (0, _defineProperty2.default)(_cx, _styles.Classes.leaf, wrapped.isLeaf), _cx)),
242
+ className: (0, _classnames.default)(_styles.Classes.tableHeaderCell, headerCellProps.className, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _styles.Classes.first, colIndex === 0), _styles.Classes.last, colIndex + colSpan === fullFlatCount), _styles.Classes.lockLeft, colIndex < leftFlatCount || theaderPosition === 'left'), _styles.Classes.lockRight, colIndex >= fullFlatCount - rightFlatCount || theaderPosition === 'right'), _styles.Classes.leaf, wrapped.isLeaf)),
245
243
  colSpan: colSpan,
246
244
  rowSpan: isLeaf ? rowCount - level : undefined,
247
245
  style: (0, _extends2.default)((0, _extends2.default)({
@@ -271,7 +269,7 @@ function TableHeader(_ref2) {
271
269
  });
272
270
  return /*#__PURE__*/_react.default.createElement("tr", {
273
271
  key: level,
274
- className: (0, _classnames.default)(_styles.Classes.tableHeaderRow, (_cx2 = {}, (0, _defineProperty2.default)(_cx2, _styles.Classes.first, level === 0), (0, _defineProperty2.default)(_cx2, _styles.Classes.last, level === rowCount - 1), _cx2))
272
+ className: (0, _classnames.default)(_styles.Classes.tableHeaderRow, (0, _defineProperty2.default)((0, _defineProperty2.default)({}, _styles.Classes.first, level === 0), _styles.Classes.last, level === rowCount - 1))
275
273
  }, headerCells);
276
274
  });
277
275
  var colgroup = (0, _map.default)(_context5 = (0, _flat.default)(headerRenderInfo)).call(_context5, function (wrapped) {
@@ -11,12 +11,12 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpe
11
11
  /** 在表格的单元格的渲染过程中,先渲染的单元格的 colSpan/rowSpan 会影响到后续单元格是否被渲染
12
12
  * `SpanManager` 会在内部维护一份状态来记录最近渲染单元格的 colSpan/rowSpan,
13
13
  * 方便后续的单元格快速判断 "是否需要跳过渲染" */
14
- var SpanManager = /*#__PURE__*/function () {
14
+ var SpanManager = exports.default = /*#__PURE__*/function () {
15
15
  function SpanManager() {
16
16
  (0, _classCallCheck2.default)(this, SpanManager);
17
17
  this.rects = [];
18
18
  }
19
- (0, _createClass2.default)(SpanManager, [{
19
+ return (0, _createClass2.default)(SpanManager, [{
20
20
  key: "testSkip",
21
21
  value: function testSkip(rowIndex, colIndex) {
22
22
  return this.rects.some(function (_ref) {
@@ -46,6 +46,4 @@ var SpanManager = /*#__PURE__*/function () {
46
46
  });
47
47
  }
48
48
  }]);
49
- return SpanManager;
50
- }();
51
- exports.default = SpanManager;
49
+ }();