@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.
- package/LICENSE +568 -568
- package/README.md +111 -111
- package/dist/@kdcloudjs/table.css +1 -1
- package/dist/@kdcloudjs/table.css.map +0 -0
- package/dist/@kdcloudjs/table.js +4095 -2984
- package/dist/@kdcloudjs/table.js.map +1 -1
- package/dist/@kdcloudjs/table.min.css +1 -1
- package/dist/@kdcloudjs/table.min.js +12 -10
- package/dist/@kdcloudjs/table.min.js.map +1 -1
- package/dist/default-theme.js +0 -0
- package/dist/kd-ui-complete.less +777 -777
- package/dist/kd-ui.less +0 -0
- package/dist/theme.js +0 -0
- package/es/_utils/formatUtil.js +1 -5
- package/es/_utils/hooks.js +3 -3
- package/es/_utils/usePopper.js +13 -13
- package/es/locale/locale.js +6 -7
- package/es/style/color/colors.less +1 -1
- package/es/style/core/index.less +1 -1
- package/es/style/core/motion/other.less +27 -27
- package/es/style/core/motion/slide.less +53 -53
- package/es/style/core/motion.less +1 -1
- package/es/style/core/reset.less +185 -185
- package/es/style/index.less +1 -1
- package/es/style/mixins/index.less +18 -18
- package/es/style/mixins/overlay.less +21 -21
- package/es/style/mixins/reset.less +12 -12
- package/es/style/themes/default.less +445 -445
- package/es/table/base/calculations.js +3 -3
- package/es/table/base/empty.js +2 -2
- package/es/table/base/globalStyleComponent.d.ts +4 -0
- package/es/table/base/globalStyleComponent.js +24 -0
- package/es/table/base/header.js +5 -7
- package/es/table/base/helpers/SpanManager.js +1 -2
- package/es/table/base/helpers/TableDOMUtils.js +5 -6
- package/es/table/base/html-table.js +3 -4
- package/es/table/base/loading.js +2 -2
- package/es/table/base/renderTemplates.js +16 -16
- package/es/table/base/styles.d.ts +11 -0
- package/es/table/base/styles.js +18 -7
- package/es/table/base/table.js +18 -20
- package/es/table/base/utils.js +3 -3
- package/es/table/interfaces.d.ts +41 -0
- package/es/table/pipeline/const.d.ts +3 -0
- package/es/table/pipeline/const.js +3 -0
- package/es/table/pipeline/features/columnDrag.js +0 -1
- package/es/table/pipeline/features/columnFilter.js +1 -3
- package/es/table/pipeline/features/columnResizeWidth.js +2 -2
- package/es/table/pipeline/features/contextMenu.js +4 -6
- package/es/table/pipeline/features/featureApi/RowDragApi.d.ts +15 -0
- package/es/table/pipeline/features/featureApi/RowDragApi.js +66 -0
- package/es/table/pipeline/features/featureApi/utils.d.ts +2 -0
- package/es/table/pipeline/features/featureApi/utils.js +10 -0
- package/es/table/pipeline/features/filter/DefaultFilterContent.js +4 -5
- package/es/table/pipeline/features/filter/Filter.js +2 -3
- package/es/table/pipeline/features/rangeSelection.js +10 -10
- package/es/table/pipeline/features/rowDetail.js +2 -2
- package/es/table/pipeline/features/rowDrag.d.ts +12 -12
- package/es/table/pipeline/features/rowDrag.js +605 -192
- package/es/table/pipeline/features/rowGrouping.js +2 -2
- package/es/table/pipeline/features/sort.js +6 -7
- package/es/table/pipeline/features/tips.js +4 -4
- package/es/table/pipeline/features/treeMode.d.ts +1 -0
- package/es/table/pipeline/features/treeMode.js +39 -12
- package/es/table/pipeline/features/treeSelect.js +2 -2
- package/es/table/pipeline/pipeline.d.ts +3 -0
- package/es/table/pipeline/pipeline.js +24 -3
- package/es/table/pivot/cross-table/buildCrossTable.js +6 -8
- package/es/table/pivot/cross-table/cross-table.js +1 -3
- package/es/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
- package/es/table/pivot/cross-tree-table/cross-tree-table.js +8 -11
- package/es/table/pivot/pivot-utils/builders.js +3 -3
- package/es/table/pivot/pivot-utils/convert-utils.js +3 -3
- package/es/table/style/index.less +1 -1
- package/es/table/transforms/autoWidth.js +3 -3
- package/es/table/transforms/columnResize.js +3 -5
- package/es/table/transforms/sort.js +6 -8
- package/es/table/transforms/tips.js +4 -4
- package/es/table/transforms/treeMode.js +6 -8
- package/es/table/utils/buildTree.js +3 -3
- package/es/table/utils/collectNodes.js +3 -3
- package/es/table/utils/exportTableAsExcel.js +3 -3
- package/es/table/utils/getTreeDepth.js +3 -3
- package/es/table/utils/groupBy.js +3 -3
- package/es/table/utils/makeRecursiveMapper.js +3 -3
- package/es/table/utils/mergeCellProps.js +0 -1
- package/es/table/utils/others.js +3 -3
- package/es/table/utils/traverseColumn.js +3 -3
- package/es/table/utils/tree-data-helpers/StrictTreeDataHelper.js +7 -8
- package/es/table/utils/tree-data-helpers/TreeDataHelper.js +4 -5
- package/lib/_utils/arrayUtil.js +2 -3
- package/lib/_utils/formatUtil.js +1 -5
- package/lib/_utils/hooks.js +3 -3
- package/lib/_utils/index.js +2 -3
- package/lib/_utils/type.js +3 -5
- package/lib/_utils/usePopper.js +18 -21
- package/lib/config-provider/ConfigContext.js +1 -2
- package/lib/config-provider/compDefaultProps.js +1 -2
- package/lib/config-provider/configProvider.js +3 -4
- package/lib/config-provider/defaultConfig.js +1 -2
- package/lib/config-provider/index.js +1 -2
- package/lib/locale/index.js +3 -4
- package/lib/locale/locale.js +10 -14
- package/lib/locale/zh-CN.js +1 -2
- package/lib/style/color/colors.less +2 -0
- package/lib/style/components.less +1 -1
- package/lib/style/core/index.less +2 -0
- package/lib/style/core/motion/other.less +28 -0
- package/lib/style/core/motion/slide.less +53 -0
- package/lib/style/core/motion.less +2 -0
- package/lib/style/core/reset.less +186 -0
- package/lib/style/index.css +410 -0
- package/lib/style/index.less +2 -0
- package/lib/style/mixins/index.less +19 -0
- package/lib/style/mixins/overlay.less +22 -0
- package/lib/style/mixins/reset.less +13 -0
- package/lib/style/themes/default.less +445 -0
- package/lib/style/themes/index.less +1 -0
- package/lib/table/base/calculations.js +3 -3
- package/lib/table/base/empty.js +4 -4
- package/lib/table/base/globalStyleComponent.d.ts +4 -0
- package/lib/table/base/globalStyleComponent.js +35 -0
- package/lib/table/base/header.js +5 -7
- package/lib/table/base/helpers/SpanManager.js +3 -5
- package/lib/table/base/helpers/TableDOMUtils.js +7 -9
- package/lib/table/base/helpers/getRichVisibleRectsStream.js +2 -2
- package/lib/table/base/html-table.js +3 -4
- package/lib/table/base/loading.js +2 -2
- package/lib/table/base/renderTemplates.js +18 -18
- package/lib/table/base/styles.d.ts +11 -0
- package/lib/table/base/styles.js +25 -21
- package/lib/table/base/table.js +30 -31
- package/lib/table/base/utils.js +13 -20
- package/lib/table/common-views.js +4 -8
- package/lib/table/interfaces.d.ts +41 -0
- package/lib/table/internals.js +2 -3
- package/lib/table/pipeline/const.d.ts +3 -0
- package/lib/table/pipeline/const.js +9 -0
- package/lib/table/pipeline/features/autoFill.js +3 -6
- package/lib/table/pipeline/features/colGroupExtendable.js +2 -3
- package/lib/table/pipeline/features/columnDrag.js +0 -1
- package/lib/table/pipeline/features/columnFilter.js +1 -3
- package/lib/table/pipeline/features/columnResizeWidth.js +7 -10
- package/lib/table/pipeline/features/contextMenu.js +6 -8
- package/lib/table/pipeline/features/featureApi/RowDragApi.d.ts +15 -0
- package/lib/table/pipeline/features/featureApi/RowDragApi.js +72 -0
- package/lib/table/pipeline/features/featureApi/utils.d.ts +2 -0
- package/lib/table/pipeline/features/featureApi/utils.js +17 -0
- package/lib/table/pipeline/features/filter/DefaultFilterContent.js +7 -9
- package/lib/table/pipeline/features/filter/Filter.js +5 -7
- package/lib/table/pipeline/features/filter/FilterPanel.js +3 -4
- package/lib/table/pipeline/features/filter/util.js +2 -3
- package/lib/table/pipeline/features/footerDataSource.js +1 -2
- package/lib/table/pipeline/features/rangeSelection.js +12 -14
- package/lib/table/pipeline/features/rowDetail.js +2 -2
- package/lib/table/pipeline/features/rowDrag.d.ts +12 -12
- package/lib/table/pipeline/features/rowDrag.js +608 -197
- package/lib/table/pipeline/features/rowGrouping.js +2 -2
- package/lib/table/pipeline/features/sort.js +6 -7
- package/lib/table/pipeline/features/tips.js +4 -4
- package/lib/table/pipeline/features/treeMode.d.ts +1 -0
- package/lib/table/pipeline/features/treeMode.js +41 -14
- package/lib/table/pipeline/features/treeSelect.js +2 -2
- package/lib/table/pipeline/index.js +2 -2
- package/lib/table/pipeline/pipeline.d.ts +3 -0
- package/lib/table/pipeline/pipeline.js +25 -5
- package/lib/table/pivot/cross-table/buildCrossTable.js +6 -8
- package/lib/table/pivot/cross-table/constants.js +1 -2
- package/lib/table/pivot/cross-table/cross-table.js +3 -6
- package/lib/table/pivot/cross-tree-table/buildCrossTreeTable.js +8 -10
- package/lib/table/pivot/cross-tree-table/cross-tree-table.js +9 -13
- package/lib/table/pivot/pivot-utils/builders.js +3 -3
- package/lib/table/pivot/pivot-utils/convert-utils.js +3 -3
- package/lib/table/style/index.css +0 -0
- package/lib/table/style/index.less +1 -0
- package/lib/table/transforms/autoWidth.js +5 -5
- package/lib/table/transforms/columnResize.js +5 -7
- package/lib/table/transforms/sort.js +8 -10
- package/lib/table/transforms/tips.js +4 -4
- package/lib/table/transforms/treeMode.js +8 -10
- package/lib/table/use/useResizeObserver.js +1 -2
- package/lib/table/utils/browserType.js +2 -4
- package/lib/table/utils/buildTree.js +3 -3
- package/lib/table/utils/collectNodes.js +3 -3
- package/lib/table/utils/console.js +2 -3
- package/lib/table/utils/copyToClipboard.js +1 -2
- package/lib/table/utils/exportTableAsExcel.js +3 -3
- package/lib/table/utils/getTreeDepth.js +3 -3
- package/lib/table/utils/groupBy.js +3 -3
- package/lib/table/utils/keyCode.js +1 -2
- package/lib/table/utils/makeRecursiveMapper.js +3 -3
- package/lib/table/utils/mergeCellProps.js +0 -1
- package/lib/table/utils/others.js +4 -5
- package/lib/table/utils/proto.js +1 -2
- package/lib/table/utils/selectColumn.js +2 -4
- package/lib/table/utils/traverseColumn.js +3 -3
- package/lib/table/utils/tree-data-helpers/StrictTreeDataHelper.js +9 -11
- package/lib/table/utils/tree-data-helpers/TreeDataHelper.js +6 -8
- package/package.json +218 -219
package/lib/_utils/usePopper.js
CHANGED
|
@@ -21,31 +21,29 @@ var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
|
21
21
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
22
22
|
var _devwarning = _interopRequireDefault(require("../_utils/devwarning"));
|
|
23
23
|
var _hooks = require("../_utils/hooks");
|
|
24
|
-
function _getRequireWildcardCache(
|
|
25
|
-
function _interopRequireWildcard(
|
|
26
|
-
var Placements = (0, _type.tuple)('top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom');
|
|
27
|
-
exports.
|
|
28
|
-
var
|
|
29
|
-
exports.Triggers = Triggers;
|
|
30
|
-
var getOffsetPos = function getOffsetPos(el) {
|
|
24
|
+
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); }
|
|
25
|
+
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; }
|
|
26
|
+
var Placements = exports.Placements = (0, _type.tuple)('top', 'left', 'right', 'bottom', 'topLeft', 'topRight', 'bottomLeft', 'bottomRight', 'leftTop', 'leftBottom', 'rightTop', 'rightBottom');
|
|
27
|
+
var Triggers = exports.Triggers = (0, _type.tuple)('hover', 'focus', 'click', 'contextMenu');
|
|
28
|
+
var _getOffsetPos = function getOffsetPos(el) {
|
|
31
29
|
var elPos = {
|
|
32
30
|
top: el.offsetTop,
|
|
33
31
|
left: el.offsetLeft
|
|
34
32
|
};
|
|
35
33
|
if (el.offsetParent) {
|
|
36
|
-
var parentPos =
|
|
34
|
+
var parentPos = _getOffsetPos(el.offsetParent);
|
|
37
35
|
elPos.top += parentPos.top;
|
|
38
36
|
elPos.left += parentPos.left;
|
|
39
37
|
}
|
|
40
38
|
return elPos;
|
|
41
39
|
};
|
|
42
|
-
var
|
|
40
|
+
var _getScrollDist = function getScrollDist(el) {
|
|
43
41
|
var elScroll = {
|
|
44
42
|
top: el.scrollTop,
|
|
45
43
|
left: el.scrollLeft
|
|
46
44
|
};
|
|
47
45
|
if (el.parentElement && el.parentElement !== document.body) {
|
|
48
|
-
var parentScroll =
|
|
46
|
+
var parentScroll = _getScrollDist(el.parentElement);
|
|
49
47
|
elScroll.top += parentScroll.top;
|
|
50
48
|
elScroll.left += parentScroll.left;
|
|
51
49
|
}
|
|
@@ -169,15 +167,15 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
169
167
|
right = _locatorRef$current$g.right,
|
|
170
168
|
height = _locatorRef$current$g.height,
|
|
171
169
|
width = _locatorRef$current$g.width;
|
|
172
|
-
var
|
|
173
|
-
containerTop =
|
|
174
|
-
containerLeft =
|
|
175
|
-
var
|
|
176
|
-
locatorTop =
|
|
177
|
-
locatorLeft =
|
|
178
|
-
var
|
|
179
|
-
scrollTop =
|
|
180
|
-
scrollLeft =
|
|
170
|
+
var _getOffsetPos2 = _getOffsetPos(container),
|
|
171
|
+
containerTop = _getOffsetPos2.top,
|
|
172
|
+
containerLeft = _getOffsetPos2.left;
|
|
173
|
+
var _getOffsetPos3 = _getOffsetPos(locatorRef.current),
|
|
174
|
+
locatorTop = _getOffsetPos3.top,
|
|
175
|
+
locatorLeft = _getOffsetPos3.left;
|
|
176
|
+
var _getScrollDist2 = _getScrollDist(locatorRef.current),
|
|
177
|
+
scrollTop = _getScrollDist2.top,
|
|
178
|
+
scrollLeft = _getScrollDist2.left;
|
|
181
179
|
var locatorPos = {
|
|
182
180
|
width: width,
|
|
183
181
|
height: height,
|
|
@@ -494,5 +492,4 @@ function usePopper(locatorElement, popperElement, props) {
|
|
|
494
492
|
var Popper = /*#__PURE__*/_react.default.createElement("div", (0, _extends2.default)({}, popperProps), popperElement);
|
|
495
493
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, Locate, exist && container && /*#__PURE__*/_reactDom.default.createPortal(Popper, container));
|
|
496
494
|
}
|
|
497
|
-
var _default = usePopper;
|
|
498
|
-
exports.default = _default;
|
|
495
|
+
var _default = exports.default = usePopper;
|
|
@@ -12,5 +12,4 @@ var _defaultConfig = _interopRequireDefault(require("./defaultConfig"));
|
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
14
|
var ConfigContext = /*#__PURE__*/(0, _react.createContext)(_defaultConfig.default);
|
|
15
|
-
var _default = ConfigContext;
|
|
16
|
-
exports.default = _default;
|
|
15
|
+
var _default = exports.default = ConfigContext;
|
|
@@ -13,8 +13,8 @@ var _assign = _interopRequireDefault(require("lodash/assign"));
|
|
|
13
13
|
var _ConfigContext = _interopRequireDefault(require("./ConfigContext"));
|
|
14
14
|
var _defaultConfig = _interopRequireDefault(require("./defaultConfig"));
|
|
15
15
|
var _index = _interopRequireWildcard(require("../locale/index"));
|
|
16
|
-
function _getRequireWildcardCache(
|
|
17
|
-
function _interopRequireWildcard(
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
18
|
/**
|
|
19
19
|
* 对外暴露用于注入全局配置属性的Context.Provider
|
|
20
20
|
*/
|
|
@@ -45,5 +45,4 @@ var ConfigProvider = function ConfigProvider(props) {
|
|
|
45
45
|
value: providerValue
|
|
46
46
|
}, props.children);
|
|
47
47
|
};
|
|
48
|
-
var _default = ConfigProvider;
|
|
49
|
-
exports.default = _default;
|
|
48
|
+
var _default = exports.default = ConfigProvider;
|
|
@@ -27,5 +27,4 @@ var _configProvider = _interopRequireDefault(require("./configProvider"));
|
|
|
27
27
|
var _compDefaultProps = _interopRequireDefault(require("./compDefaultProps"));
|
|
28
28
|
var _ConfigContext = _interopRequireDefault(require("./ConfigContext"));
|
|
29
29
|
var _defaultConfig = _interopRequireDefault(require("./defaultConfig"));
|
|
30
|
-
var _default = _configProvider.default;
|
|
31
|
-
exports.default = _default;
|
|
30
|
+
var _default = exports.default = _configProvider.default;
|
package/lib/locale/index.js
CHANGED
|
@@ -20,7 +20,6 @@ Object.defineProperty(exports, "getLangMsg", {
|
|
|
20
20
|
}
|
|
21
21
|
});
|
|
22
22
|
var _locale = _interopRequireWildcard(require("./locale"));
|
|
23
|
-
function _getRequireWildcardCache(
|
|
24
|
-
function _interopRequireWildcard(
|
|
25
|
-
var _default = _locale.default;
|
|
26
|
-
exports.default = _default;
|
|
23
|
+
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); }
|
|
24
|
+
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; }
|
|
25
|
+
var _default = exports.default = _locale.default;
|
package/lib/locale/locale.js
CHANGED
|
@@ -17,9 +17,9 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs3/he
|
|
|
17
17
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/createClass"));
|
|
18
18
|
var _react = _interopRequireDefault(require("react"));
|
|
19
19
|
var _zhCN = _interopRequireDefault(require("./zh-CN"));
|
|
20
|
-
function _createForOfIteratorHelper(
|
|
21
|
-
function _unsupportedIterableToArray(
|
|
22
|
-
function _arrayLikeToArray(
|
|
20
|
+
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; } } }; }
|
|
21
|
+
function _unsupportedIterableToArray(r, a) { if (r) { var _context2; if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = _sliceInstanceProperty2(_context2 = {}.toString.call(r)).call(_context2, 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; } }
|
|
22
|
+
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; }
|
|
23
23
|
var LocaleCache = /*#__PURE__*/function () {
|
|
24
24
|
function LocaleCache(localesData, locale) {
|
|
25
25
|
(0, _classCallCheck2.default)(this, LocaleCache);
|
|
@@ -31,7 +31,7 @@ var LocaleCache = /*#__PURE__*/function () {
|
|
|
31
31
|
* @param {LocaleDataType | string} localeData 语言数据集合 | 语言类型
|
|
32
32
|
* @returns 设置后的语言对应的语言包
|
|
33
33
|
*/
|
|
34
|
-
(0, _createClass2.default)(LocaleCache, [{
|
|
34
|
+
return (0, _createClass2.default)(LocaleCache, [{
|
|
35
35
|
key: "setLocalesData",
|
|
36
36
|
value: function setLocalesData(locale, localeData) {
|
|
37
37
|
var newLocaleData = localeData || this.localesData[locale];
|
|
@@ -68,12 +68,10 @@ var LocaleCache = /*#__PURE__*/function () {
|
|
|
68
68
|
return this.localesData;
|
|
69
69
|
}
|
|
70
70
|
}]);
|
|
71
|
-
return LocaleCache;
|
|
72
71
|
}();
|
|
73
72
|
var localeCacher = new LocaleCache((0, _defineProperty2.default)({}, _zhCN.default.locale, _zhCN.default));
|
|
74
|
-
var _default = localeCacher;
|
|
75
|
-
exports.
|
|
76
|
-
var getLangMsg = function getLangMsg(componentName, labelName, params) {
|
|
73
|
+
var _default = exports.default = localeCacher;
|
|
74
|
+
var getLangMsg = exports.getLangMsg = function getLangMsg(componentName, labelName, params) {
|
|
77
75
|
var _context;
|
|
78
76
|
var localData = localeCacher.getLocalData();
|
|
79
77
|
var msg = localData[(0, _concat.default)(_context = "".concat(componentName, ".")).call(_context, labelName)] || localData["global.".concat(labelName)] || '';
|
|
@@ -84,7 +82,6 @@ var getLangMsg = function getLangMsg(componentName, labelName, params) {
|
|
|
84
82
|
* @param {*} msg
|
|
85
83
|
* @param {*} variables
|
|
86
84
|
*/
|
|
87
|
-
exports.getLangMsg = getLangMsg;
|
|
88
85
|
function analysVariables(msg, variables) {
|
|
89
86
|
var reg = /{[\w\W]*?}/g;
|
|
90
87
|
var matchArr = msg.match(reg) || [];
|
|
@@ -184,18 +181,18 @@ function formatElement(msg, variables) {
|
|
|
184
181
|
var t = item.t,
|
|
185
182
|
v = item.v;
|
|
186
183
|
if (t === 0 && v !== '') {
|
|
187
|
-
elements.push(
|
|
184
|
+
elements.push(/*#__PURE__*/_react.default.createElement("span", {
|
|
188
185
|
key: index
|
|
189
186
|
}, v));
|
|
190
187
|
} else if (t === 1) {
|
|
191
|
-
elements.push(
|
|
188
|
+
elements.push(/*#__PURE__*/_react.default.cloneElement(variables[v], {
|
|
192
189
|
key: index
|
|
193
190
|
}));
|
|
194
191
|
}
|
|
195
192
|
});
|
|
196
193
|
return elements;
|
|
197
194
|
}
|
|
198
|
-
var getCompLangMsg = function getCompLangMsg(compLangMsgParams, customGetLangMsg, localeDate) {
|
|
195
|
+
var getCompLangMsg = exports.getCompLangMsg = function getCompLangMsg(compLangMsgParams, customGetLangMsg, localeDate) {
|
|
199
196
|
var componentName = compLangMsgParams.componentName,
|
|
200
197
|
labels = compLangMsgParams.labels,
|
|
201
198
|
labelParams = compLangMsgParams.labelParams;
|
|
@@ -219,5 +216,4 @@ var getCompLangMsg = function getCompLangMsg(compLangMsgParams, customGetLangMsg
|
|
|
219
216
|
}
|
|
220
217
|
});
|
|
221
218
|
return componentLangMsg;
|
|
222
|
-
};
|
|
223
|
-
exports.getCompLangMsg = getCompLangMsg;
|
|
219
|
+
};
|
package/lib/locale/zh-CN.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import "../table
|
|
1
|
+
@import "../table\style\index.less";
|
|
@@ -0,0 +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
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +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
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
|
2
|
+
|
|
3
|
+
/* normalize.css 和现有产品的结合版本, 根据兼容性进行了调整 */
|
|
4
|
+
/* Document
|
|
5
|
+
========================================================================== */
|
|
6
|
+
|
|
7
|
+
/* Sections
|
|
8
|
+
========================================================================== */
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Remove the margin in all browsers.
|
|
12
|
+
*/
|
|
13
|
+
html,body {
|
|
14
|
+
height: 100%;
|
|
15
|
+
padding: 0;
|
|
16
|
+
margin: 0;
|
|
17
|
+
font-size:12px;
|
|
18
|
+
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
html,body,input, textarea, select, button{
|
|
22
|
+
font-family:"Microsoft YaHei","PingFangSC-Regular","Helvetica Neue", Helvetica, Arial,"Hiragino Sans GB","WenQuanYi Micro Hei", sans-serif;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Remove the gray background on active links in IE 10.
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
a {
|
|
34
|
+
background-color: transparent;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
/* Forms
|
|
39
|
+
========================================================================== */
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
*/
|
|
43
|
+
input {
|
|
44
|
+
padding: 0;
|
|
45
|
+
margin: 0;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* 1. Change the font styles in all browsers.
|
|
49
|
+
* 2. Remove the margin in Firefox and Safari.
|
|
50
|
+
*/
|
|
51
|
+
|
|
52
|
+
button,
|
|
53
|
+
input,
|
|
54
|
+
optgroup,
|
|
55
|
+
select,
|
|
56
|
+
textarea {
|
|
57
|
+
margin: 0; /* 2 */
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Show the overflow in IE.
|
|
62
|
+
* 1. Show the overflow in Edge.
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
button,
|
|
66
|
+
input { /* 1 */
|
|
67
|
+
overflow: visible;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
|
72
|
+
* 1. Remove the inheritance of text transform in Firefox.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
button,
|
|
76
|
+
select { /* 1 */
|
|
77
|
+
text-transform: none;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Correct the inability to style clickable types in iOS and Safari.
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
button,
|
|
85
|
+
[type="button"],
|
|
86
|
+
[type="reset"],
|
|
87
|
+
[type="submit"] {
|
|
88
|
+
-webkit-appearance: button;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Remove the inner border and padding in Firefox.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
button::-moz-focus-inner,
|
|
96
|
+
[type="button"]::-moz-focus-inner,
|
|
97
|
+
[type="reset"]::-moz-focus-inner,
|
|
98
|
+
[type="submit"]::-moz-focus-inner {
|
|
99
|
+
border-style: none;
|
|
100
|
+
padding: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Restore the focus styles unset by the previous rule.
|
|
105
|
+
*/
|
|
106
|
+
|
|
107
|
+
button:-moz-focusring,
|
|
108
|
+
[type="button"]:-moz-focusring,
|
|
109
|
+
[type="reset"]:-moz-focusring,
|
|
110
|
+
[type="submit"]:-moz-focusring {
|
|
111
|
+
outline: 1px dotted ButtonText;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
progress {
|
|
119
|
+
vertical-align: baseline;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Remove the default vertical scrollbar in IE 10+.
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
textarea {
|
|
127
|
+
overflow: auto;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* 1. Add the correct box sizing in IE 10.
|
|
132
|
+
* 2. Remove the padding in IE 10.
|
|
133
|
+
*/
|
|
134
|
+
|
|
135
|
+
[type="checkbox"],
|
|
136
|
+
[type="radio"] {
|
|
137
|
+
box-sizing: border-box; /* 1 */
|
|
138
|
+
padding: 0; /* 2 */
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Correct the cursor style of increment and decrement buttons in Chrome.
|
|
143
|
+
*/
|
|
144
|
+
|
|
145
|
+
[type="number"]::-webkit-inner-spin-button,
|
|
146
|
+
[type="number"]::-webkit-outer-spin-button {
|
|
147
|
+
height: auto;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* 1. Correct the odd appearance in Chrome and Safari.
|
|
152
|
+
* 2. Correct the outline style in Safari.
|
|
153
|
+
*/
|
|
154
|
+
|
|
155
|
+
[type="search"] {
|
|
156
|
+
-webkit-appearance: textfield; /* 1 */
|
|
157
|
+
outline-offset: -2px; /* 2 */
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Remove the inner padding in Chrome and Safari on macOS.
|
|
162
|
+
*/
|
|
163
|
+
|
|
164
|
+
[type="search"]::-webkit-search-decoration {
|
|
165
|
+
-webkit-appearance: none;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
/* Misc
|
|
170
|
+
========================================================================== */
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Add the correct display in IE 10+.
|
|
174
|
+
*/
|
|
175
|
+
|
|
176
|
+
template {
|
|
177
|
+
display: none;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Add the correct display in IE 10.
|
|
182
|
+
*/
|
|
183
|
+
|
|
184
|
+
[hidden] {
|
|
185
|
+
display: none;
|
|
186
|
+
}
|