@kdcloudjs/table 1.2.0-canary.6 → 1.2.0-canary.6-hotfix.2

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 (254) 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.js +1877 -3363
  5. package/dist/@kdcloudjs/table.js.map +1 -1
  6. package/dist/@kdcloudjs/table.min.css +1 -1
  7. package/dist/@kdcloudjs/table.min.js +16 -16
  8. package/dist/@kdcloudjs/table.min.js.map +1 -1
  9. package/dist/kd-ui-complete.less +777 -777
  10. package/es/_utils/arrayUtil.js +0 -3
  11. package/es/_utils/devwarning.js +0 -1
  12. package/es/_utils/formatUtil.js +35 -96
  13. package/es/_utils/hooks.js +18 -42
  14. package/es/_utils/index.js +0 -2
  15. package/es/_utils/numberUtil.js +32 -55
  16. package/es/_utils/omit.js +0 -2
  17. package/es/_utils/type.js +0 -2
  18. package/es/_utils/usePopper.js +74 -137
  19. package/es/config-provider/compDefaultProps.js +0 -1
  20. package/es/config-provider/configProvider.js +2 -7
  21. package/es/config-provider/defaultConfig.js +0 -1
  22. package/es/index.js +0 -2
  23. package/es/locale/locale.js +5 -43
  24. package/es/style/color/colors.less +1 -1
  25. package/es/style/core/index.less +1 -1
  26. package/es/style/core/motion/other.less +27 -27
  27. package/es/style/core/motion/slide.less +53 -53
  28. package/es/style/core/motion.less +1 -1
  29. package/es/style/core/reset.less +185 -185
  30. package/es/style/index.less +1 -1
  31. package/es/style/mixins/index.less +18 -18
  32. package/es/style/mixins/overlay.less +21 -21
  33. package/es/style/mixins/reset.less +12 -12
  34. package/es/style/themes/default.less +445 -445
  35. package/es/table/base/calculations.js +22 -72
  36. package/es/table/base/colgroup.js +0 -1
  37. package/es/table/base/empty.js +4 -4
  38. package/es/table/base/header.d.ts +2 -1
  39. package/es/table/base/header.js +17 -68
  40. package/es/table/base/helpers/SpanManager.js +3 -9
  41. package/es/table/base/helpers/TableDOMUtils.js +3 -26
  42. package/es/table/base/helpers/__test__/SpanManager.test.js +2 -2
  43. package/es/table/base/helpers/__test__/TableDOMUtils.test.js +0 -1
  44. package/es/table/base/helpers/getRichVisibleRectsStream.js +11 -44
  45. package/es/table/base/helpers/rowHeightManager.js +0 -28
  46. package/es/table/base/html-table.js +15 -36
  47. package/es/table/base/loading.js +6 -8
  48. package/es/table/base/renderTemplates.js +50 -54
  49. package/es/table/base/styles.js +1 -10
  50. package/es/table/base/table.js +116 -189
  51. package/es/table/base/utils.js +14 -54
  52. package/es/table/common-views.js +0 -7
  53. package/es/table/internals.js +0 -13
  54. package/es/table/pipeline/features/autoFill.js +11 -38
  55. package/es/table/pipeline/features/autoRowSpan.js +1 -14
  56. package/es/table/pipeline/features/colGroupExtendable.js +4 -19
  57. package/es/table/pipeline/features/columnDrag.js +41 -95
  58. package/es/table/pipeline/features/columnFilter.js +11 -44
  59. package/es/table/pipeline/features/columnHover.js +1 -7
  60. package/es/table/pipeline/features/columnRangeHover.js +1 -8
  61. package/es/table/pipeline/features/columnResizeWidth.js +11 -37
  62. package/es/table/pipeline/features/contextMenu.js +18 -89
  63. package/es/table/pipeline/features/filter/DefaultFilterContent.js +10 -25
  64. package/es/table/pipeline/features/filter/DefaultFilterIcon.js +1 -1
  65. package/es/table/pipeline/features/filter/Filter.js +25 -48
  66. package/es/table/pipeline/features/filter/FilterPanel.js +11 -25
  67. package/es/table/pipeline/features/filter/util.js +0 -4
  68. package/es/table/pipeline/features/footerDataSource.js +0 -3
  69. package/es/table/pipeline/features/mergeCellHover.js +0 -1
  70. package/es/table/pipeline/features/multiSelect.js +15 -57
  71. package/es/table/pipeline/features/rangeSelection.js +63 -142
  72. package/es/table/pipeline/features/rowDetail.js +2 -41
  73. package/es/table/pipeline/features/rowGrouping.js +2 -35
  74. package/es/table/pipeline/features/singleSelect.js +0 -24
  75. package/es/table/pipeline/features/sort.js +29 -79
  76. package/es/table/pipeline/features/tips.js +0 -6
  77. package/es/table/pipeline/features/treeMode.js +9 -43
  78. package/es/table/pipeline/features/treeSelect.js +0 -26
  79. package/es/table/pipeline/pipeline.js +9 -49
  80. package/es/table/pivot/cross-table/buildCrossTable.js +15 -64
  81. package/es/table/pivot/cross-table/cross-table.js +22 -28
  82. package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +14 -47
  83. package/es/table/pivot/cross-tree-table/cross-tree-table.js +28 -50
  84. package/es/table/pivot/pivot-utils/buildDrillTree.js +10 -23
  85. package/es/table/pivot/pivot-utils/builders.js +31 -71
  86. package/es/table/pivot/pivot-utils/convert-utils.js +13 -39
  87. package/es/table/pivot/pivot-utils/simpleEncode.js +0 -1
  88. package/es/table/style/index.less +1 -1
  89. package/es/table/transforms/autoRowSpan.js +1 -15
  90. package/es/table/transforms/autoWidth.js +10 -32
  91. package/es/table/transforms/buildTree.js +1 -2
  92. package/es/table/transforms/columnHover.js +9 -15
  93. package/es/table/transforms/columnRangeHover.js +12 -19
  94. package/es/table/transforms/columnResize.js +15 -37
  95. package/es/table/transforms/flatten.js +0 -3
  96. package/es/table/transforms/orderField.js +0 -3
  97. package/es/table/transforms/sort.js +36 -88
  98. package/es/table/transforms/tips.js +1 -6
  99. package/es/table/transforms/treeMode.js +30 -69
  100. package/es/table/transforms/visible.js +0 -2
  101. package/es/table/use/useResizeObserver.js +1 -4
  102. package/es/table/utils/applyTransforms.js +0 -1
  103. package/es/table/utils/buildTree.js +4 -19
  104. package/es/table/utils/collectNodes.js +1 -10
  105. package/es/table/utils/console.js +0 -14
  106. package/es/table/utils/copyToClipboard.js +0 -4
  107. package/es/table/utils/element.js +14 -41
  108. package/es/table/utils/exportTableAsExcel.js +4 -40
  109. package/es/table/utils/getTreeDepth.js +1 -9
  110. package/es/table/utils/groupBy.js +1 -10
  111. package/es/table/utils/layeredFilter.js +0 -4
  112. package/es/table/utils/layeredSort.js +0 -5
  113. package/es/table/utils/makeRecursiveMapper.js +1 -12
  114. package/es/table/utils/mergeCellProps.js +6 -13
  115. package/es/table/utils/others.js +3 -16
  116. package/es/table/utils/proto.js +2 -30
  117. package/es/table/utils/smartCompare.js +4 -12
  118. package/es/table/utils/traverseColumn.js +2 -15
  119. package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +1 -22
  120. package/es/table/utils/tree-data-helpers/TreeDataHelper.js +15 -69
  121. package/lib/_utils/arrayUtil.js +0 -5
  122. package/lib/_utils/devwarning.js +0 -5
  123. package/lib/_utils/formatUtil.js +35 -100
  124. package/lib/_utils/hooks.js +18 -53
  125. package/lib/_utils/index.js +0 -6
  126. package/lib/_utils/numberUtil.js +32 -63
  127. package/lib/_utils/omit.js +0 -5
  128. package/lib/_utils/react-children.js +0 -5
  129. package/lib/_utils/type.js +0 -6
  130. package/lib/_utils/usePopper.js +74 -158
  131. package/lib/config-provider/ConfigContext.js +1 -4
  132. package/lib/config-provider/compDefaultProps.js +0 -1
  133. package/lib/config-provider/configProvider.js +3 -18
  134. package/lib/config-provider/defaultConfig.js +0 -5
  135. package/lib/config-provider/index.js +0 -6
  136. package/lib/index.js +2 -8
  137. package/lib/locale/index.js +0 -7
  138. package/lib/locale/locale.js +5 -57
  139. package/lib/style/color/colors.less +1 -1
  140. package/lib/style/components.less +1 -1
  141. package/lib/style/core/index.less +1 -1
  142. package/lib/style/core/motion/other.less +27 -27
  143. package/lib/style/core/motion/slide.less +53 -53
  144. package/lib/style/core/motion.less +1 -1
  145. package/lib/style/core/reset.less +185 -185
  146. package/lib/style/index.less +1 -1
  147. package/lib/style/mixins/index.less +18 -18
  148. package/lib/style/mixins/overlay.less +21 -21
  149. package/lib/style/mixins/reset.less +12 -12
  150. package/lib/style/themes/default.less +445 -445
  151. package/lib/table/base/calculations.js +22 -83
  152. package/lib/table/base/colgroup.js +0 -5
  153. package/lib/table/base/empty.js +4 -16
  154. package/lib/table/base/header.d.ts +2 -1
  155. package/lib/table/base/header.js +17 -78
  156. package/lib/table/base/helpers/SpanManager.js +3 -11
  157. package/lib/table/base/helpers/TableDOMUtils.js +1 -26
  158. package/lib/table/base/helpers/__test__/SpanManager.test.js +2 -4
  159. package/lib/table/base/helpers/__test__/TableDOMUtils.test.js +0 -5
  160. package/lib/table/base/helpers/__test__/rowHeightManager.test.js +0 -1
  161. package/lib/table/base/helpers/getRichVisibleRectsStream.js +11 -62
  162. package/lib/table/base/helpers/rowHeightManager.js +0 -33
  163. package/lib/table/base/html-table.js +15 -46
  164. package/lib/table/base/index.js +0 -2
  165. package/lib/table/base/loading.js +6 -12
  166. package/lib/table/base/renderTemplates.js +51 -68
  167. package/lib/table/base/styles.js +1 -22
  168. package/lib/table/base/table.js +116 -222
  169. package/lib/table/base/utils.js +14 -89
  170. package/lib/table/common-views.js +0 -16
  171. package/lib/table/index.js +0 -13
  172. package/lib/table/internals.js +0 -14
  173. package/lib/table/pipeline/features/autoFill.js +11 -45
  174. package/lib/table/pipeline/features/autoRowSpan.js +1 -19
  175. package/lib/table/pipeline/features/buildTree.js +0 -2
  176. package/lib/table/pipeline/features/colGroupExtendable.js +4 -32
  177. package/lib/table/pipeline/features/columnDrag.js +41 -101
  178. package/lib/table/pipeline/features/columnFilter.js +11 -58
  179. package/lib/table/pipeline/features/columnHover.js +1 -11
  180. package/lib/table/pipeline/features/columnRangeHover.js +1 -13
  181. package/lib/table/pipeline/features/columnResizeWidth.js +11 -53
  182. package/lib/table/pipeline/features/contextMenu.js +18 -113
  183. package/lib/table/pipeline/features/filter/DefaultFilterContent.js +10 -43
  184. package/lib/table/pipeline/features/filter/DefaultFilterIcon.js +1 -4
  185. package/lib/table/pipeline/features/filter/Filter.js +25 -70
  186. package/lib/table/pipeline/features/filter/FilterPanel.js +11 -40
  187. package/lib/table/pipeline/features/filter/index.js +0 -5
  188. package/lib/table/pipeline/features/filter/util.js +0 -7
  189. package/lib/table/pipeline/features/footerDataSource.js +0 -10
  190. package/lib/table/pipeline/features/index.js +0 -22
  191. package/lib/table/pipeline/features/mergeCellHover.js +0 -5
  192. package/lib/table/pipeline/features/multiSelect.js +15 -70
  193. package/lib/table/pipeline/features/rangeSelection.js +63 -159
  194. package/lib/table/pipeline/features/rowDetail.js +2 -65
  195. package/lib/table/pipeline/features/rowGrouping.js +2 -55
  196. package/lib/table/pipeline/features/singleSelect.js +0 -33
  197. package/lib/table/pipeline/features/sort.js +29 -99
  198. package/lib/table/pipeline/features/tips.js +0 -15
  199. package/lib/table/pipeline/features/treeMode.js +9 -64
  200. package/lib/table/pipeline/features/treeSelect.js +0 -34
  201. package/lib/table/pipeline/index.js +0 -8
  202. package/lib/table/pipeline/pipeline.js +9 -58
  203. package/lib/table/pivot/cross-table/buildCrossTable.js +15 -75
  204. package/lib/table/pivot/cross-table/cross-table.js +22 -36
  205. package/lib/table/pivot/cross-table/index.js +0 -4
  206. package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +14 -60
  207. package/lib/table/pivot/cross-tree-table/cross-tree-table.js +28 -60
  208. package/lib/table/pivot/cross-tree-table/index.js +0 -3
  209. package/lib/table/pivot/pivot-utils/buildDrillTree.js +10 -29
  210. package/lib/table/pivot/pivot-utils/builders.js +31 -82
  211. package/lib/table/pivot/pivot-utils/convert-utils.js +13 -57
  212. package/lib/table/pivot/pivot-utils/index.js +0 -7
  213. package/lib/table/pivot/pivot-utils/simpleEncode.js +0 -2
  214. package/lib/table/style/css.js +0 -1
  215. package/lib/table/style/index.js +0 -1
  216. package/lib/table/style/index.less +1 -1
  217. package/lib/table/transforms/autoRowSpan.js +1 -21
  218. package/lib/table/transforms/autoWidth.js +10 -53
  219. package/lib/table/transforms/buildTree.js +1 -4
  220. package/lib/table/transforms/columnHover.js +9 -22
  221. package/lib/table/transforms/columnRangeHover.js +12 -27
  222. package/lib/table/transforms/columnResize.js +15 -56
  223. package/lib/table/transforms/flatten.js +0 -5
  224. package/lib/table/transforms/index.js +0 -12
  225. package/lib/table/transforms/orderField.js +0 -7
  226. package/lib/table/transforms/sort.js +36 -112
  227. package/lib/table/transforms/tips.js +1 -16
  228. package/lib/table/transforms/treeMode.js +30 -96
  229. package/lib/table/transforms/visible.js +0 -7
  230. package/lib/table/transforms/warnTransformsDeprecated.js +0 -4
  231. package/lib/table/use/useResizeObserver.js +1 -8
  232. package/lib/table/utils/applyTransforms.js +0 -2
  233. package/lib/table/utils/buildTree.js +4 -30
  234. package/lib/table/utils/collectNodes.js +1 -15
  235. package/lib/table/utils/console.js +0 -16
  236. package/lib/table/utils/copyToClipboard.js +0 -6
  237. package/lib/table/utils/element.js +14 -46
  238. package/lib/table/utils/exportTableAsExcel.js +4 -49
  239. package/lib/table/utils/getTreeDepth.js +1 -14
  240. package/lib/table/utils/groupBy.js +1 -14
  241. package/lib/table/utils/index.js +0 -20
  242. package/lib/table/utils/isGroupColumn.js +0 -3
  243. package/lib/table/utils/isLeafNode.js +0 -1
  244. package/lib/table/utils/layeredFilter.js +0 -10
  245. package/lib/table/utils/layeredSort.js +0 -10
  246. package/lib/table/utils/makeRecursiveMapper.js +1 -21
  247. package/lib/table/utils/mergeCellProps.js +6 -17
  248. package/lib/table/utils/others.js +3 -31
  249. package/lib/table/utils/proto.js +2 -33
  250. package/lib/table/utils/smartCompare.js +4 -13
  251. package/lib/table/utils/traverseColumn.js +2 -22
  252. package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +1 -30
  253. package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +15 -82
  254. package/package.json +219 -218
@@ -2,13 +2,9 @@ import _typeof from "@babel/runtime-corejs3/helpers/typeof";
2
2
  import _defineProperty from "@babel/runtime-corejs3/helpers/defineProperty";
3
3
  import _classCallCheck from "@babel/runtime-corejs3/helpers/classCallCheck";
4
4
  import _createClass from "@babel/runtime-corejs3/helpers/createClass";
5
-
6
5
  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; } } }; }
7
-
8
6
  function _unsupportedIterableToArray(o, minLen) { var _context2; if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = _sliceInstanceProperty(_context2 = Object.prototype.toString.call(o)).call(_context2, 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); }
9
-
10
7
  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; }
11
-
12
8
  import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
13
9
  import _sliceInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/slice";
14
10
  import _Array$from from "@babel/runtime-corejs3/core-js-stable/array/from";
@@ -16,11 +12,9 @@ import _Symbol from "@babel/runtime-corejs3/core-js-stable/symbol";
16
12
  import _getIteratorMethod from "@babel/runtime-corejs3/core-js/get-iterator-method";
17
13
  import React from 'react';
18
14
  import zhCNData from './zh-CN';
19
-
20
15
  var LocaleCache = /*#__PURE__*/function () {
21
16
  function LocaleCache(localesData, locale) {
22
17
  _classCallCheck(this, LocaleCache);
23
-
24
18
  this.locale = locale || zhCNData.locale;
25
19
  this.localesData = localesData;
26
20
  }
@@ -29,18 +23,14 @@ var LocaleCache = /*#__PURE__*/function () {
29
23
  * @param {LocaleDataType | string} localeData 语言数据集合 | 语言类型
30
24
  * @returns 设置后的语言对应的语言包
31
25
  */
32
-
33
-
34
26
  _createClass(LocaleCache, [{
35
27
  key: "setLocalesData",
36
28
  value: function setLocalesData(locale, localeData) {
37
29
  var newLocaleData = localeData || this.localesData[locale];
38
-
39
30
  if (!newLocaleData) {
40
31
  console.error("\u7F3A\u5C11\u8BED\u8A00".concat(locale, "\u5BF9\u5E94\u7684\u8BED\u8A00\u5305\uFF0C\u8BF7\u68C0\u67E5\u540E\u91CD\u65B0\u8BBE\u7F6E"));
41
32
  return;
42
33
  }
43
-
44
34
  this.locale = locale;
45
35
  this.localesData[locale] = newLocaleData;
46
36
  return localeData;
@@ -48,7 +38,6 @@ var LocaleCache = /*#__PURE__*/function () {
48
38
  /**
49
39
  * 获取当前语言包数据
50
40
  */
51
-
52
41
  }, {
53
42
  key: "getLocalData",
54
43
  value: function getLocalData() {
@@ -57,7 +46,6 @@ var LocaleCache = /*#__PURE__*/function () {
57
46
  /**
58
47
  * 获取当前语言类型
59
48
  */
60
-
61
49
  }, {
62
50
  key: "getLocal",
63
51
  value: function getLocal() {
@@ -66,22 +54,18 @@ var LocaleCache = /*#__PURE__*/function () {
66
54
  /**
67
55
  * 获取所有语言包数据
68
56
  */
69
-
70
57
  }, {
71
58
  key: "getLocalesData",
72
59
  value: function getLocalesData() {
73
60
  return this.localesData;
74
61
  }
75
62
  }]);
76
-
77
63
  return LocaleCache;
78
64
  }();
79
-
80
65
  var localeCacher = new LocaleCache(_defineProperty({}, zhCNData.locale, zhCNData));
81
66
  export default localeCacher;
82
67
  export var getLangMsg = function getLangMsg(componentName, labelName, params) {
83
68
  var _context;
84
-
85
69
  var localData = localeCacher.getLocalData();
86
70
  var msg = localData[_concatInstanceProperty(_context = "".concat(componentName, ".")).call(_context, labelName)] || localData["global.".concat(labelName)] || '';
87
71
  return analysVariables(msg, params);
@@ -91,32 +75,25 @@ export var getLangMsg = function getLangMsg(componentName, labelName, params) {
91
75
  * @param {*} msg
92
76
  * @param {*} variables
93
77
  */
94
-
95
78
  function analysVariables(msg, variables) {
96
79
  var reg = /{[\w\W]*?}/g;
97
80
  var matchArr = msg.match(reg) || [];
98
-
99
81
  var isObject = function isObject(value) {
100
82
  return _typeof(value) === 'object' || typeof value === 'function';
101
83
  };
102
-
103
84
  var getVarName = function getVarName(str) {
104
85
  var len = str.length;
105
86
  return _sliceInstanceProperty(str).call(str, 1, len - 1);
106
87
  };
107
-
108
88
  var stringVar = [];
109
89
  var eleVar = [];
110
-
111
90
  var _iterator = _createForOfIteratorHelper(matchArr),
112
- _step;
113
-
91
+ _step;
114
92
  try {
115
93
  for (_iterator.s(); !(_step = _iterator.n()).done;) {
116
94
  var item = _step.value;
117
95
  var varName = getVarName(item);
118
96
  var value = variables[varName];
119
-
120
97
  if (isObject(value)) {
121
98
  eleVar.push({
122
99
  k: varName,
@@ -134,14 +111,11 @@ function analysVariables(msg, variables) {
134
111
  } finally {
135
112
  _iterator.f();
136
113
  }
137
-
138
114
  msg = formatText(msg, stringVar);
139
115
  var msgArr = [];
140
-
141
116
  if (eleVar.length > 0) {
142
117
  msgArr = formatElement(msg, variables);
143
118
  }
144
-
145
119
  return eleVar.length > 0 ? msgArr : msg;
146
120
  }
147
121
  /**
@@ -149,12 +123,10 @@ function analysVariables(msg, variables) {
149
123
  * @param {*} msg
150
124
  * @param {*} stringVar
151
125
  */
152
-
153
-
154
126
  function formatText(msg, stringVar) {
155
127
  stringVar.forEach(function (item) {
156
128
  var k = item.k,
157
- v = item.v;
129
+ v = item.v;
158
130
  var reg = new RegExp('{' + k + '}', 'g');
159
131
  msg = msg.replace(reg, v);
160
132
  });
@@ -166,8 +138,6 @@ function formatText(msg, stringVar) {
166
138
  * @param {*} eleVar
167
139
  * @param {*} variables
168
140
  */
169
-
170
-
171
141
  function formatElement(msg, variables) {
172
142
  var splitByElement = function splitByElement(msg) {
173
143
  var array = [];
@@ -175,7 +145,6 @@ function formatElement(msg, variables) {
175
145
  t: 0,
176
146
  v: ''
177
147
  }; // 0-string 1-react
178
-
179
148
  var len = msg.length;
180
149
  msg.split('').forEach(function (c, i) {
181
150
  if (c === '{') {
@@ -193,20 +162,17 @@ function formatElement(msg, variables) {
193
162
  } else {
194
163
  item.v = item.v + c;
195
164
  }
196
-
197
165
  if (i === len - 1) {
198
166
  array.push(item);
199
167
  }
200
168
  });
201
169
  return array;
202
170
  };
203
-
204
171
  var elements = [];
205
172
  var eleArr = splitByElement(msg);
206
173
  eleArr.forEach(function (item, index) {
207
174
  var t = item.t,
208
- v = item.v;
209
-
175
+ v = item.v;
210
176
  if (t === 0 && v !== '') {
211
177
  elements.push( /*#__PURE__*/React.createElement("span", {
212
178
  key: index
@@ -219,25 +185,21 @@ function formatElement(msg, variables) {
219
185
  });
220
186
  return elements;
221
187
  }
222
-
223
188
  export var getCompLangMsg = function getCompLangMsg(compLangMsgParams, customGetLangMsg, localeDate) {
224
189
  var componentName = compLangMsgParams.componentName,
225
- labels = compLangMsgParams.labels,
226
- labelParams = compLangMsgParams.labelParams;
190
+ labels = compLangMsgParams.labels,
191
+ labelParams = compLangMsgParams.labelParams;
227
192
  labels = labels || [];
228
193
  labelParams = labelParams || {};
229
194
  localeDate = localeDate || zhCNData;
230
-
231
195
  if (!labels.length) {
232
196
  for (var key in localeDate) {
233
197
  var componentNameAndLabel = key.split('.');
234
-
235
198
  if (componentName === componentNameAndLabel[0] && componentNameAndLabel[1]) {
236
199
  labels.push(componentNameAndLabel[1]);
237
200
  }
238
201
  }
239
202
  }
240
-
241
203
  var componentLangMsg = {};
242
204
  labels.forEach(function (label) {
243
205
  if (customGetLangMsg && typeof customGetLangMsg === 'function') {
@@ -1,2 +1,2 @@
1
- // color palettes
1
+ // color palettes
2
2
  @blue-base: #1890ff;
@@ -1,2 +1,2 @@
1
- @import 'motion';
1
+ @import 'motion';
2
2
  @import 'reset';
@@ -1,28 +1,28 @@
1
- @keyframes loadingcircle {
2
- 100% {
3
- transform: rotate(360deg);
4
- }
5
- }
6
-
7
- @keyframes waveEffect {
8
- 100% {
9
- box-shadow: 0 0 0 6px @theme-color;
10
- }
11
- }
12
-
13
- @keyframes fadeEffect {
14
- 100% {
15
- opacity: 0;
16
- }
17
- }
18
-
19
- @keyframes kdRadioEffect {
20
- 0% {
21
- transform: translateY(-50%) scale(0.5);
22
- opacity: 0;
23
- }
24
- 100% {
25
- transform: translateY(-50%) scale(1);
26
- opacity: 1;
27
- }
1
+ @keyframes loadingcircle {
2
+ 100% {
3
+ transform: rotate(360deg);
4
+ }
5
+ }
6
+
7
+ @keyframes waveEffect {
8
+ 100% {
9
+ box-shadow: 0 0 0 6px @theme-color;
10
+ }
11
+ }
12
+
13
+ @keyframes fadeEffect {
14
+ 100% {
15
+ opacity: 0;
16
+ }
17
+ }
18
+
19
+ @keyframes kdRadioEffect {
20
+ 0% {
21
+ transform: translateY(-50%) scale(0.5);
22
+ opacity: 0;
23
+ }
24
+ 100% {
25
+ transform: translateY(-50%) scale(1);
26
+ opacity: 1;
27
+ }
28
28
  }
@@ -1,53 +1,53 @@
1
- @keyframes kdSlideDownIn {
2
- 0% {
3
- transform: scaleY(0.8);
4
- transform-origin: 50% 0%;
5
- opacity: 0;
6
- }
7
- 100% {
8
- transform: scaleY(1);
9
- transform-origin: 50% 0%;
10
- opacity: 1;
11
- }
12
- }
13
-
14
- @keyframes kdSlideDownOut {
15
- 0% {
16
- transform: scaleY(1);
17
- transform-origin: 50% 0%;
18
- opacity: 1;
19
- }
20
- 100% {
21
- transform: scaleY(0.9);
22
- transform-origin: 50% 0%;
23
- opacity: 0;
24
- }
25
- }
26
-
27
- @keyframes kdSlideUpIn {
28
- 0% {
29
- transform-origin: 50% 100%;
30
- opacity: 0;
31
- }
32
- 5% {
33
- transform: scaleY(0.8);
34
- }
35
- 100% {
36
- transform: scaleY(1);
37
- transform-origin: 50% 100%;
38
- opacity: 1;
39
- }
40
- }
41
-
42
- @keyframes kdSlideUpOut {
43
- 0% {
44
- transform: scaleY(1);
45
- transform-origin: 50% 100%;
46
- opacity: 1;
47
- }
48
- 100% {
49
- transform: scaleY(0.9);
50
- transform-origin: 50% 100%;
51
- opacity: 0;
52
- }
53
- }
1
+ @keyframes kdSlideDownIn {
2
+ 0% {
3
+ transform: scaleY(0.8);
4
+ transform-origin: 50% 0%;
5
+ opacity: 0;
6
+ }
7
+ 100% {
8
+ transform: scaleY(1);
9
+ transform-origin: 50% 0%;
10
+ opacity: 1;
11
+ }
12
+ }
13
+
14
+ @keyframes kdSlideDownOut {
15
+ 0% {
16
+ transform: scaleY(1);
17
+ transform-origin: 50% 0%;
18
+ opacity: 1;
19
+ }
20
+ 100% {
21
+ transform: scaleY(0.9);
22
+ transform-origin: 50% 0%;
23
+ opacity: 0;
24
+ }
25
+ }
26
+
27
+ @keyframes kdSlideUpIn {
28
+ 0% {
29
+ transform-origin: 50% 100%;
30
+ opacity: 0;
31
+ }
32
+ 5% {
33
+ transform: scaleY(0.8);
34
+ }
35
+ 100% {
36
+ transform: scaleY(1);
37
+ transform-origin: 50% 100%;
38
+ opacity: 1;
39
+ }
40
+ }
41
+
42
+ @keyframes kdSlideUpOut {
43
+ 0% {
44
+ transform: scaleY(1);
45
+ transform-origin: 50% 100%;
46
+ opacity: 1;
47
+ }
48
+ 100% {
49
+ transform: scaleY(0.9);
50
+ transform-origin: 50% 100%;
51
+ opacity: 0;
52
+ }
53
+ }
@@ -1,2 +1,2 @@
1
- @import 'motion/other';
1
+ @import 'motion/other';
2
2
  @import 'motion/slide';