@hi-ui/hiui 2.15.11 → 2.15.12
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/es/_util/SwitchVersion.js +40 -0
- package/es/_util/depreactedPropsCompat.js +58 -0
- package/es/_util/index.js +31 -0
- package/es/_util/warning.js +2 -2
- package/es/alert/Alert.js +126 -0
- package/es/alert/__tests__/index.test.js +84 -0
- package/es/alert/index.js +6 -147
- package/es/alert/style/index.css +1 -1
- package/es/badge/Badge.js +82 -0
- package/es/badge/__tests__/index.test.js +82 -0
- package/es/badge/index.js +9 -87
- package/es/badge/style/index.css +1 -1
- package/es/badge/style/index.js +0 -0
- package/es/breadcrumb/__tests__/index.test.js +61 -0
- package/es/breadcrumb/index.js +85 -0
- package/es/breadcrumb/style/index.css +1 -0
- package/es/button/Button.js +62 -60
- package/es/button/ButtonGroup.js +24 -40
- package/es/button/IconLoading.js +6 -6
- package/es/button/__tests__/index.test.js +221 -0
- package/es/button/index.js +3 -2
- package/es/button/style/index.css +1 -1
- package/es/card/__tests__/index.test.js +179 -0
- package/es/card/index.js +61 -57
- package/es/card/style/index.css +1 -1
- package/es/carousel/__tests__/index.test.js +104 -0
- package/es/carousel/index.js +219 -0
- package/es/carousel/style/index.css +1 -0
- package/es/carousel/style/index.js +3 -0
- package/es/cascader/Cascader.js +190 -133
- package/es/cascader/Menu.js +168 -0
- package/es/cascader/__tests__/index.test.js +392 -0
- package/es/cascader/index.js +5 -2
- package/es/cascader/style/cascader.css +1 -1
- package/es/cascader/style/menu.css +1 -1
- package/es/checkbox/Checkbox.js +136 -0
- package/es/checkbox/Group.js +194 -0
- package/es/checkbox/__tests__/index.test.js +226 -0
- package/es/checkbox/checkbox-legacy/Base.js +212 -0
- package/es/checkbox/checkbox-legacy/CheckBox.js +157 -0
- package/es/checkbox/checkbox-legacy/index.js +15 -0
- package/es/checkbox/checkbox-legacy/style/index.css +1 -0
- package/es/checkbox/checkbox-legacy/style/index.js +3 -0
- package/es/checkbox/index.js +13 -4
- package/es/checkbox/style/index.css +1 -1
- package/es/collapse/__tests__/index.test.js +111 -0
- package/es/collapse/index.js +88 -110
- package/es/collapse/style/index.css +1 -1
- package/es/confirm/index.js +39 -60
- package/es/context/index.js +45 -51
- package/es/counter/Counter.js +339 -0
- package/es/counter/__tests__/index.test.js +134 -0
- package/es/counter/counter-legacy/index.js +267 -0
- package/es/counter/index.js +6 -270
- package/es/counter/style/index.css +1 -1
- package/es/date-picker/BasePicker.js +380 -302
- package/es/date-picker/Calender.js +326 -98
- package/es/date-picker/DatePanel.js +194 -213
- package/es/date-picker/DatePicker.js +143 -47
- package/es/date-picker/DateRangePanel.js +272 -208
- package/es/date-picker/Modal.js +18 -32
- package/es/date-picker/Time.js +231 -345
- package/es/date-picker/TimeList.js +246 -0
- package/es/date-picker/TimePanel.js +28 -41
- package/es/date-picker/TimePeriodPanel.js +27 -46
- package/es/date-picker/TimePicker.js +44 -46
- package/es/date-picker/TimeRangePanel.js +33 -51
- package/es/date-picker/Type.js +5 -1
- package/es/date-picker/WeekRangePanel.js +254 -175
- package/es/date-picker/YMRangePanel.js +364 -0
- package/es/date-picker/__tests__/index.test.js +956 -0
- package/es/date-picker/constants.js +14 -28
- package/es/date-picker/dateUtil.js +221 -52
- package/es/date-picker/datepicker-legacy/BasePicker.js +511 -0
- package/es/date-picker/datepicker-legacy/Calender.js +422 -0
- package/es/date-picker/datepicker-legacy/DatePanel.js +455 -0
- package/es/date-picker/datepicker-legacy/DatePicker.js +103 -0
- package/es/date-picker/datepicker-legacy/DateRangePanel.js +488 -0
- package/es/date-picker/datepicker-legacy/Modal.js +67 -0
- package/es/date-picker/datepicker-legacy/Time.js +405 -0
- package/es/date-picker/datepicker-legacy/TimePanel.js +85 -0
- package/es/date-picker/datepicker-legacy/TimePeriodPanel.js +118 -0
- package/es/date-picker/datepicker-legacy/TimePicker.js +78 -0
- package/es/date-picker/datepicker-legacy/TimeRangePanel.js +90 -0
- package/es/date-picker/datepicker-legacy/Type.js +31 -0
- package/es/date-picker/datepicker-legacy/WeekRangePanel.js +337 -0
- package/es/date-picker/datepicker-legacy/constants.js +79 -0
- package/es/date-picker/datepicker-legacy/dateUtil.js +258 -0
- package/es/date-picker/datepicker-legacy/index.js +15 -0
- package/es/date-picker/datepicker-legacy/local.js +11 -0
- package/es/date-picker/datepicker-legacy/style/index.css +1 -0
- package/es/date-picker/datepicker-legacy/style/index.js +3 -0
- package/es/date-picker/datepicker-legacy/style/timepicker.css +1 -0
- package/es/date-picker/datepicker-legacy/util.js +60 -0
- package/es/date-picker/index.js +5 -2
- package/es/date-picker/style/index.css +1 -1
- package/es/date-picker/toLunar.js +172 -0
- package/es/date-picker/util.js +101 -8
- package/es/dropdown/Dropdown.js +191 -203
- package/es/dropdown/DropdownButton.js +102 -0
- package/es/dropdown/DropdownMenu.js +107 -0
- package/es/dropdown/DropdownMenuItem.js +172 -0
- package/es/dropdown/__tests__/index.test.js +313 -0
- package/es/dropdown/index.js +69 -4
- package/es/dropdown/style/index.css +1 -1
- package/es/dropdown/style/index.js +0 -2
- package/es/dropdown/{__test__ → tests}/index.test.js +7 -7
- package/es/dropdown/utils.js +35 -0
- package/es/ficon/index.js +16 -30
- package/es/form/Form.js +176 -0
- package/es/form/{item.js → Item.js} +52 -60
- package/es/form/__tests__/index.test.js +571 -0
- package/es/form/index.js +6 -171
- package/es/form/style/index.css +1 -1
- package/es/grid/__tests__/index.test.js +100 -0
- package/es/grid/index.js +36 -56
- package/es/icon/index.js +23 -38
- package/es/index.js +61 -9
- package/es/input/Input.js +400 -0
- package/es/input/__tests__/index.test.js +376 -0
- package/es/input/index.js +26 -347
- package/es/input/input-legacy/index.js +341 -0
- package/es/input/input-legacy/util.js +176 -0
- package/es/input/style/index.css +1 -1
- package/es/input/util.js +26 -18
- package/es/lib/withDragDropContext.js +2 -2
- package/es/loading/Loading.js +173 -0
- package/es/loading/__tests__/index.test.js +110 -0
- package/es/loading/index.js +5 -129
- package/es/loading/style/index.css +0 -0
- package/es/loading/style/index.js +0 -0
- package/es/locales/en-US.js +45 -9
- package/es/locales/index.js +16 -2
- package/es/locales/zh-CN.js +46 -10
- package/es/locales/zh-Hant-HK.js +123 -0
- package/es/locales/zh-Hant-TW.js +125 -0
- package/es/menu/Item.js +34 -51
- package/es/menu/Menu.js +414 -0
- package/es/menu/SubMenu.js +63 -90
- package/es/menu/Title.js +37 -51
- package/es/menu/__tests__/index.test.js +274 -0
- package/es/menu/index.js +12 -419
- package/es/menu/style/index.css +1 -1
- package/es/message/__tests__/index.test.js +71 -0
- package/es/message/index.js +58 -0
- package/es/message/style/index.css +1 -0
- package/es/message/style/index.js +5 -0
- package/es/modal/__tests__/index.test.js +178 -0
- package/es/modal/index.js +85 -77
- package/es/modal/style/index.css +1 -1
- package/es/nav-menu/NavMenu.js +44 -61
- package/es/nav-menu/__test__/index.test.js +8 -8
- package/es/nav-menu/__tests__/index.test.js +23 -0
- package/es/nav-menu/index.js +2 -2
- package/es/notice/Notice.js +136 -0
- package/es/notice/NoticeContainer.js +107 -0
- package/es/notice/__tests__/index.test.js +174 -0
- package/es/notice/index.js +66 -0
- package/es/notice/style/index.css +1 -0
- package/es/notice/style/index.js +5 -0
- package/es/notification/HandleNotification/index.js +216 -0
- package/es/notification/HandleNotification/style/index.css +1 -0
- package/es/notification/HandleNotification/style/index.js +5 -0
- package/es/notification/__tests__/index.test.js +114 -0
- package/es/notification/index.js +68 -231
- package/es/notification/style/index.css +1 -1
- package/es/notification/style/index.js +0 -0
- package/es/pagination/Pager.js +7 -9
- package/es/pagination/Pagination.js +134 -133
- package/es/pagination/__tests__/index.test.js +244 -0
- package/es/pagination/index.js +9 -8
- package/es/pagination/style/index.css +1 -1
- package/es/panel/index.js +28 -46
- package/es/popover/__test__/index.test.js +10 -10
- package/es/popover/__tests__/index.test.js +152 -0
- package/es/popover/index.js +77 -83
- package/es/popper/index.js +68 -64
- package/es/popper/style/index.css +1 -1
- package/es/preview/index.js +529 -0
- package/es/preview/style/index.css +1 -0
- package/es/preview/style/index.js +3 -0
- package/es/progress/BarProgress.js +107 -43
- package/es/progress/CircleProgress.js +13 -14
- package/es/progress/DashboardProgress.js +11 -13
- package/es/progress/Progress.js +102 -0
- package/es/progress/__tests__/index.test.js +131 -0
- package/es/progress/index.js +8 -100
- package/es/progress/style/index.css +1 -1
- package/es/radio/Group.js +199 -0
- package/es/radio/Radio.js +147 -0
- package/es/radio/__tests__/index.test.js +127 -0
- package/es/radio/index.js +10 -216
- package/es/radio/{__test__ → radio-legacy/__test__}/index.test.js +13 -13
- package/es/radio/radio-legacy/index.js +214 -0
- package/es/radio/radio-legacy/style/index.css +1 -0
- package/es/radio/radio-legacy/style/index.js +3 -0
- package/es/radio/style/index.css +1 -1
- package/es/rate/Icons.js +70 -70
- package/es/rate/Rate.js +75 -108
- package/es/rate/__tests__/index.test.js +124 -0
- package/es/rate/index.js +5 -2
- package/es/rate/style/index.css +1 -1
- package/es/select/Select.js +330 -265
- package/es/select/SelectDropdown.js +223 -79
- package/es/select/SelectInput.js +120 -91
- package/es/select/__tests__/index.test.js +505 -0
- package/es/select/index.js +6 -4
- package/es/select/select-legacy/Option.js +78 -0
- package/es/select/select-legacy/Select.js +702 -0
- package/es/select/select-legacy/SelectDropdown.js +157 -0
- package/es/select/select-legacy/SelectInput.js +308 -0
- package/es/select/select-legacy/common.js +19 -0
- package/es/select/select-legacy/index.js +16 -0
- package/es/select/style/select-dropdown.css +1 -1
- package/es/select/style/select-input.css +1 -1
- package/es/stepper/Stepper.js +147 -0
- package/es/stepper/__tests__/index.test.js +161 -0
- package/es/stepper/index.js +21 -127
- package/es/stepper/style/index.css +1 -1
- package/es/style/icon/diyIcon.css +1 -1
- package/es/style/icon/index.css +1 -1
- package/es/switch/__tests__/index.test.js +68 -0
- package/es/switch/index.js +26 -46
- package/es/switch/style/index.css +1 -1
- package/es/table/Body.js +294 -0
- package/es/table/ClickOuterside.js +95 -0
- package/es/table/Footer.js +171 -0
- package/es/table/Header.js +320 -0
- package/es/table/TableContent.js +101 -0
- package/es/table/__tests__/index.test.js +129 -0
- package/es/table/checkbox/index.js +36 -47
- package/es/table/checkbox/style/index.css +1 -0
- package/es/table/checkbox/style/index.js +3 -0
- package/es/table/index.js +269 -314
- package/es/table/menu/index.js +34 -44
- package/es/table/prefix.js +2 -2
- package/es/table/style/Table.css +1 -1
- package/es/table/style/index.css +1 -1
- package/es/tabs/ItemDropdown.js +45 -65
- package/es/tabs/TabPane.js +26 -44
- package/es/tabs/Tabs.js +110 -111
- package/es/tabs/__tests__/index.test.js +329 -0
- package/es/tabs/index.js +9 -3
- package/es/tabs/style/index.css +1 -1
- package/es/tabs/tabs-legacy/ItemDropdown.js +162 -0
- package/es/tabs/tabs-legacy/TabPane.js +70 -0
- package/es/tabs/tabs-legacy/Tabs.js +291 -0
- package/es/tabs/tabs-legacy/index.js +18 -0
- package/es/tabs/tabs-legacy/style/index.css +1 -0
- package/es/tabs/tabs-legacy/style/index.js +3 -0
- package/es/tag/__tests__/index.test.js +46 -0
- package/es/tag/index.js +86 -0
- package/es/tag/style/index.css +1 -0
- package/es/tag/style/index.js +3 -0
- package/es/timeline/__tests__/index.test.js +198 -0
- package/es/timeline/index.js +206 -136
- package/es/timeline/style/index.css +1 -1
- package/es/tooltip/__tests__/index.test.js +166 -0
- package/es/tooltip/index.js +93 -52
- package/es/tooltip/style/index.css +1 -1
- package/es/transfer/Item.js +73 -71
- package/es/transfer/Transfer.js +558 -0
- package/es/transfer/__tests__/index.test.js +210 -0
- package/es/transfer/index.js +4 -443
- package/es/transfer/style/index.css +1 -1
- package/es/tree/IconLoading.js +38 -0
- package/es/tree/Tree.js +94 -111
- package/es/tree/TreeDivider.js +6 -6
- package/es/tree/TreeItem.js +217 -123
- package/es/tree/TreeNode.js +472 -333
- package/es/tree/__tests__/index.test.js +599 -0
- package/es/tree/index.js +9 -2
- package/es/tree/style/index.css +1 -1
- package/es/tree/tree-legacy/Tree.js +330 -0
- package/es/tree/tree-legacy/TreeDivider.js +25 -0
- package/es/tree/tree-legacy/TreeItem.js +326 -0
- package/es/tree/tree-legacy/TreeNode.js +711 -0
- package/es/tree/tree-legacy/index.js +13 -0
- package/es/tree/tree-legacy/style/index.css +1 -0
- package/es/tree/tree-legacy/style/index.js +3 -0
- package/es/tree/tree-legacy/util.js +434 -0
- package/es/tree/util.js +8 -256
- package/es/upload/Upload.js +292 -200
- package/es/upload/UploadAvatar.js +61 -79
- package/es/upload/UploadClick.js +62 -60
- package/es/upload/UploadDrag.js +63 -66
- package/es/upload/UploadPhoto.js +86 -75
- package/es/upload/UploadPictureCard.js +53 -60
- package/es/upload/__tests__/index.test.js +760 -0
- package/es/upload/index.js +8 -71
- package/es/upload/main.js +83 -0
- package/es/upload/style/index.css +1 -1
- package/es/upload/tool.js +0 -1
- package/es/upload/{Preview.js → upload-legacy/Preview.js} +48 -62
- package/es/upload/upload-legacy/Upload.js +431 -0
- package/es/upload/upload-legacy/UploadAvatar.js +318 -0
- package/es/upload/upload-legacy/UploadClick.js +121 -0
- package/es/upload/upload-legacy/UploadDrag.js +176 -0
- package/es/upload/upload-legacy/UploadPhoto.js +179 -0
- package/es/upload/upload-legacy/UploadPictureCard.js +122 -0
- package/es/upload/upload-legacy/index.js +67 -0
- package/es/upload/upload-legacy/style/index.css +1 -0
- package/es/upload/upload-legacy/style/index.js +5 -0
- package/es/upload/upload-legacy/tool.js +84 -0
- package/es/watermark/index.js +97 -0
- package/es/watermark/watermark.js +263 -0
- package/package.json +1 -1
- package/es/alert/__test__/index.test.js +0 -67
- package/es/button/__test__/index.test.js +0 -29
- package/es/cascader/__test__/index.test.js +0 -283
- package/es/cascader/menu.js +0 -155
- package/es/checkbox/Base.js +0 -205
- package/es/checkbox/CheckBox.js +0 -185
- package/es/collapse/__test__/index.test.js +0 -58
- package/es/counter/__test__/index.test.js +0 -52
- package/es/menu/ItemGroup.js +0 -81
- package/es/modal/__test__/index.test.js +0 -123
- package/es/notification/__test__/index.test.js +0 -56
- package/es/pagination/__test__/index.test.js +0 -140
- package/es/rate/__test__/index.test.js +0 -54
- package/es/select/Option.js +0 -93
- package/es/select/__test__/index.test.js +0 -429
- package/es/style/color/colors.css +0 -0
- package/es/style/index.css +0 -0
- package/es/style/mixins/colors.css +0 -0
- package/es/style/mixins/index.css +0 -0
- package/es/style/theme/dark.css +0 -0
- package/es/style/theme/default.css +0 -0
- package/es/switch/__test__/index.test.js +0 -39
- package/es/table/__test__/index.test.js +0 -73
- package/es/table/body.js +0 -318
- package/es/table/clickOuterside.js +0 -115
- package/es/table/footer.js +0 -196
- package/es/table/header.js +0 -337
- package/es/table/pover.js +0 -154
- package/es/table/tableContent.js +0 -120
- package/es/timeline/__test__/index.test.js +0 -49
- package/es/timeline/foldingItem.js +0 -82
- package/es/tooltip/__test__/index.test.js +0 -67
- package/es/transfer/__test__/index.test.js +0 -11
- /package/es/{style → breadcrumb/style}/index.js +0 -0
- /package/es/checkbox/{common.js → checkbox-legacy/common.js} +0 -0
- /package/es/upload/{style → upload-legacy/style}/preview.css +0 -0
- /package/es/upload/{style → upload-legacy/style}/preview.js +0 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
|
|
4
|
+
|
|
5
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "__esModule", {
|
|
8
|
+
value: true
|
|
9
|
+
});
|
|
10
|
+
exports["default"] = void 0;
|
|
11
|
+
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
|
+
|
|
14
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
15
|
+
|
|
16
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
+
|
|
18
|
+
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
+
|
|
20
|
+
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
+
|
|
22
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
23
|
+
|
|
24
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
25
|
+
|
|
26
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
+
|
|
28
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
29
|
+
|
|
30
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
31
|
+
|
|
32
|
+
var loadingInstance = {};
|
|
33
|
+
var prefixCls = 'hi-loading';
|
|
34
|
+
|
|
35
|
+
var Loading =
|
|
36
|
+
/*#__PURE__*/
|
|
37
|
+
function (_Component) {
|
|
38
|
+
(0, _inherits2["default"])(Loading, _Component);
|
|
39
|
+
|
|
40
|
+
function Loading() {
|
|
41
|
+
(0, _classCallCheck2["default"])(this, Loading);
|
|
42
|
+
return (0, _possibleConstructorReturn2["default"])(this, (0, _getPrototypeOf2["default"])(Loading).apply(this, arguments));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
(0, _createClass2["default"])(Loading, [{
|
|
46
|
+
key: "render",
|
|
47
|
+
value: function render() {
|
|
48
|
+
var _classNames;
|
|
49
|
+
|
|
50
|
+
var _this$props = this.props,
|
|
51
|
+
size = _this$props.size,
|
|
52
|
+
full = _this$props.full,
|
|
53
|
+
content = _this$props.content,
|
|
54
|
+
children = _this$props.children,
|
|
55
|
+
target = _this$props.target,
|
|
56
|
+
visible = _this$props.visible;
|
|
57
|
+
var mountNode = target || (full ? document.body : '');
|
|
58
|
+
var iconCls = (0, _classnames["default"])("".concat(prefixCls, "__icon"), "".concat(prefixCls, "__icon--").concat(size));
|
|
59
|
+
var maskCls = (0, _classnames["default"])("".concat(prefixCls, "__mask"), (_classNames = {}, (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "__mask--global"), full), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "__mask--part"), !full), (0, _defineProperty2["default"])(_classNames, "".concat(prefixCls, "__mask--hide"), visible === false), _classNames));
|
|
60
|
+
return _react["default"].createElement(PortalWrapper, {
|
|
61
|
+
mountNode: mountNode
|
|
62
|
+
}, children, _react["default"].createElement("div", {
|
|
63
|
+
className: maskCls
|
|
64
|
+
}, _react["default"].createElement("div", {
|
|
65
|
+
className: "".concat(prefixCls, "__outter")
|
|
66
|
+
}, _react["default"].createElement("div", {
|
|
67
|
+
className: iconCls
|
|
68
|
+
}, _react["default"].createElement("div", null), _react["default"].createElement("div", null)), _react["default"].createElement("div", {
|
|
69
|
+
className: "".concat(prefixCls, "__text")
|
|
70
|
+
}, content))));
|
|
71
|
+
}
|
|
72
|
+
}]);
|
|
73
|
+
return Loading;
|
|
74
|
+
}(_react.Component);
|
|
75
|
+
|
|
76
|
+
Loading.propTypes = {
|
|
77
|
+
size: _propTypes["default"].oneOf(['large', 'default', 'small']),
|
|
78
|
+
full: _propTypes["default"].bool,
|
|
79
|
+
visible: _propTypes["default"].bool,
|
|
80
|
+
content: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].element]),
|
|
81
|
+
target: _propTypes["default"].any,
|
|
82
|
+
duration: _propTypes["default"].number
|
|
83
|
+
};
|
|
84
|
+
Loading.defaultProps = {
|
|
85
|
+
size: 'default'
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
function PortalWrapper(_ref) {
|
|
89
|
+
var mountNode = _ref.mountNode,
|
|
90
|
+
children = _ref.children;
|
|
91
|
+
return mountNode ? _reactDom["default"].createPortal(children, mountNode) : _react["default"].createElement("div", {
|
|
92
|
+
className: "".concat(prefixCls, "__wrapper")
|
|
93
|
+
}, children);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function open(target) {
|
|
97
|
+
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
98
|
+
content = _ref2.content,
|
|
99
|
+
key = _ref2.key,
|
|
100
|
+
duration = _ref2.duration,
|
|
101
|
+
size = _ref2.size;
|
|
102
|
+
|
|
103
|
+
var renderNode = document.createElement('div');
|
|
104
|
+
var mountNode = target || document.body;
|
|
105
|
+
mountNode.nodeName !== 'BODY' && (window.getComputedStyle(mountNode).position === 'absolute' || mountNode.style.setProperty('position', 'relative'));
|
|
106
|
+
var full = !target;
|
|
107
|
+
|
|
108
|
+
_reactDom["default"].render(_react["default"].createElement(Loading, {
|
|
109
|
+
content: content,
|
|
110
|
+
full: full,
|
|
111
|
+
visible: true,
|
|
112
|
+
target: mountNode,
|
|
113
|
+
size: size
|
|
114
|
+
}), renderNode);
|
|
115
|
+
|
|
116
|
+
loadingInstance[key] = renderNode;
|
|
117
|
+
|
|
118
|
+
if (!isNaN(duration) && duration > 0) {
|
|
119
|
+
setTimeout(function () {
|
|
120
|
+
_reactDom["default"].unmountComponentAtNode(renderNode);
|
|
121
|
+
|
|
122
|
+
renderNode = undefined;
|
|
123
|
+
}, duration);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function deprecatedOpen() {
|
|
128
|
+
var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
129
|
+
target = _ref3.target,
|
|
130
|
+
tip = _ref3.tip;
|
|
131
|
+
|
|
132
|
+
var renderNode = document.createElement('div');
|
|
133
|
+
var mountNode = target || document.body;
|
|
134
|
+
mountNode.nodeName !== 'BODY' && (window.getComputedStyle(mountNode).position === 'absolute' || mountNode.style.setProperty('position', 'relative'));
|
|
135
|
+
var full = !target;
|
|
136
|
+
|
|
137
|
+
_reactDom["default"].render(_react["default"].createElement(Loading, {
|
|
138
|
+
tip: tip,
|
|
139
|
+
full: full,
|
|
140
|
+
show: true,
|
|
141
|
+
target: mountNode
|
|
142
|
+
}), renderNode);
|
|
143
|
+
|
|
144
|
+
function close() {
|
|
145
|
+
renderNode && _reactDom["default"].unmountComponentAtNode(renderNode);
|
|
146
|
+
renderNode = undefined;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
return {
|
|
150
|
+
close: close
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function openWrapper(target, options) {
|
|
155
|
+
if (arguments.length >= 2) {
|
|
156
|
+
open(target, options);
|
|
157
|
+
} else {
|
|
158
|
+
return deprecatedOpen(target);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
function close(key) {
|
|
163
|
+
if (loadingInstance[key]) {
|
|
164
|
+
_reactDom["default"].unmountComponentAtNode(loadingInstance[key]);
|
|
165
|
+
|
|
166
|
+
loadingInstance[key].parentNode && loadingInstance[key].parentNode.removeChild(loadingInstance[key]);
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
Loading.open = openWrapper;
|
|
171
|
+
Loading.close = close;
|
|
172
|
+
var _default = Loading;
|
|
173
|
+
exports["default"] = _default;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
5
|
+
var _react = _interopRequireDefault(require("react"));
|
|
6
|
+
|
|
7
|
+
var _enzyme = require("enzyme");
|
|
8
|
+
|
|
9
|
+
var _Loading3 = _interopRequireDefault(require("../Loading"));
|
|
10
|
+
|
|
11
|
+
/* eslint-env jest */
|
|
12
|
+
describe('Loading', function () {
|
|
13
|
+
describe('PropTypes', function () {
|
|
14
|
+
it('size', function () {
|
|
15
|
+
var sizes = ['small', 'default', 'large'];
|
|
16
|
+
var wrapper = (0, _enzyme.mount)(_react["default"].createElement("div", null, sizes.map(function (size, index) {
|
|
17
|
+
return _react["default"].createElement(_Loading3["default"], {
|
|
18
|
+
size: size,
|
|
19
|
+
key: index
|
|
20
|
+
});
|
|
21
|
+
}), _react["default"].createElement(_Loading3["default"], null)));
|
|
22
|
+
expect(wrapper.find('.hi-loading__icon--small')).toHaveLength(1);
|
|
23
|
+
expect(wrapper.find('.hi-loading__icon--large')).toHaveLength(1);
|
|
24
|
+
expect(wrapper.find('.hi-loading__icon--default')).toHaveLength(2);
|
|
25
|
+
wrapper.unmount();
|
|
26
|
+
});
|
|
27
|
+
it('content', function () {
|
|
28
|
+
var wrapper = (0, _enzyme.mount)(_react["default"].createElement(_Loading3["default"], {
|
|
29
|
+
content: "Loading..."
|
|
30
|
+
}));
|
|
31
|
+
expect(wrapper.find('.hi-loading__text').text()).toEqual('Loading...');
|
|
32
|
+
wrapper.unmount();
|
|
33
|
+
});
|
|
34
|
+
it('visible', function () {
|
|
35
|
+
var wrapper = (0, _enzyme.mount)(_react["default"].createElement(_Loading3["default"], null));
|
|
36
|
+
expect(wrapper.find('.hi-loading__mask--hide')).toHaveLength(0);
|
|
37
|
+
wrapper.setProps({
|
|
38
|
+
visible: false
|
|
39
|
+
});
|
|
40
|
+
expect(wrapper.find('.hi-loading__mask--hide')).toHaveLength(1);
|
|
41
|
+
wrapper.unmount();
|
|
42
|
+
});
|
|
43
|
+
it('full', function () {
|
|
44
|
+
var wrapper = (0, _enzyme.mount)(_react["default"].createElement(_Loading3["default"], {
|
|
45
|
+
full: true
|
|
46
|
+
}));
|
|
47
|
+
expect(document.querySelectorAll('.hi-loading__mask--global')).toHaveLength(1);
|
|
48
|
+
wrapper.unmount();
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe('Methods', function () {
|
|
52
|
+
it('open&close', function () {
|
|
53
|
+
_Loading3["default"].open(null, {
|
|
54
|
+
key: 1
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
expect(document.querySelectorAll('.hi-loading__mask--global')).toHaveLength(1);
|
|
58
|
+
|
|
59
|
+
_Loading3["default"].close(1);
|
|
60
|
+
|
|
61
|
+
expect(document.querySelectorAll('.hi-loading__mask--global')).toHaveLength(0);
|
|
62
|
+
var container = document.createElement('div');
|
|
63
|
+
container.className = 'demo';
|
|
64
|
+
document.body.appendChild(container);
|
|
65
|
+
|
|
66
|
+
_Loading3["default"].open(container, {
|
|
67
|
+
key: 2
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
expect(document.querySelectorAll('.hi-loading__mask--part')).toHaveLength(1);
|
|
71
|
+
|
|
72
|
+
_Loading3["default"].close(2);
|
|
73
|
+
|
|
74
|
+
expect(document.querySelectorAll('.hi-loading__mask--part')).toHaveLength(0);
|
|
75
|
+
jest.useFakeTimers();
|
|
76
|
+
|
|
77
|
+
_Loading3["default"].open(container, {
|
|
78
|
+
key: 3,
|
|
79
|
+
duration: 3000
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
expect(setTimeout).toHaveBeenLastCalledWith(expect.any(Function), 3000);
|
|
83
|
+
expect(document.querySelectorAll('.hi-loading__mask--part')).toHaveLength(1);
|
|
84
|
+
jest.runAllTimers();
|
|
85
|
+
expect(document.querySelectorAll('.hi-loading__mask--part')).toHaveLength(0);
|
|
86
|
+
jest.useRealTimers();
|
|
87
|
+
});
|
|
88
|
+
it('deprecatedOpen', function () {
|
|
89
|
+
(0, _enzyme.mount)(_react["default"].createElement("div", {
|
|
90
|
+
className: "container"
|
|
91
|
+
}));
|
|
92
|
+
|
|
93
|
+
var _Loading = _Loading3["default"].open();
|
|
94
|
+
|
|
95
|
+
expect(document.querySelectorAll('.hi-loading__mask--global')).toHaveLength(1);
|
|
96
|
+
|
|
97
|
+
_Loading.close();
|
|
98
|
+
|
|
99
|
+
expect(document.querySelectorAll('.hi-loading__mask--global')).toHaveLength(0);
|
|
100
|
+
|
|
101
|
+
var _Loading2 = _Loading3["default"].open({
|
|
102
|
+
target: document.querySelector('.container')
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
expect(document.querySelectorAll('.hi-loading__mask')).toHaveLength(1);
|
|
106
|
+
|
|
107
|
+
_Loading2.close();
|
|
108
|
+
});
|
|
109
|
+
});
|
|
110
|
+
});
|
package/es/loading/index.js
CHANGED
|
@@ -1,142 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
7
9
|
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
10
|
+
var _Loading = _interopRequireDefault(require("./Loading"));
|
|
13
11
|
|
|
14
|
-
var
|
|
12
|
+
var _util = require("../_util");
|
|
15
13
|
|
|
16
14
|
require("./style/index");
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
21
|
-
|
|
22
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (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; }
|
|
23
|
-
|
|
24
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
25
|
-
|
|
26
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
-
|
|
28
|
-
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
29
|
-
|
|
30
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
31
|
-
|
|
32
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
33
|
-
|
|
34
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
-
|
|
36
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
37
|
-
|
|
38
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
39
|
-
|
|
40
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
-
|
|
42
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
|
-
|
|
44
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
|
-
|
|
46
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
47
|
-
|
|
48
|
-
var prefixCls = 'hi-loading';
|
|
49
|
-
|
|
50
|
-
var Loading = /*#__PURE__*/function (_Component) {
|
|
51
|
-
_inherits(Loading, _Component);
|
|
52
|
-
|
|
53
|
-
var _super = _createSuper(Loading);
|
|
54
|
-
|
|
55
|
-
function Loading() {
|
|
56
|
-
_classCallCheck(this, Loading);
|
|
57
|
-
|
|
58
|
-
return _super.apply(this, arguments);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
_createClass(Loading, [{
|
|
62
|
-
key: "render",
|
|
63
|
-
value: function render() {
|
|
64
|
-
var _classNames;
|
|
65
|
-
|
|
66
|
-
var _this$props = this.props,
|
|
67
|
-
size = _this$props.size,
|
|
68
|
-
full = _this$props.full,
|
|
69
|
-
tip = _this$props.tip,
|
|
70
|
-
show = _this$props.show,
|
|
71
|
-
children = _this$props.children,
|
|
72
|
-
target = _this$props.target;
|
|
73
|
-
var mountNode = target || (full ? document.body : '');
|
|
74
|
-
var iconCls = (0, _classnames["default"])("".concat(prefixCls, "__icon"), "".concat(prefixCls, "__icon--").concat(size));
|
|
75
|
-
var maskCls = (0, _classnames["default"])("".concat(prefixCls, "__mask"), (_classNames = {}, _defineProperty(_classNames, "".concat(prefixCls, "__mask--global"), full), _defineProperty(_classNames, "".concat(prefixCls, "__mask--part"), !full), _defineProperty(_classNames, "".concat(prefixCls, "__mask--hide"), show === false), _classNames));
|
|
76
|
-
return /*#__PURE__*/_react["default"].createElement(PortalWrapper, {
|
|
77
|
-
mountNode: mountNode
|
|
78
|
-
}, children, /*#__PURE__*/_react["default"].createElement("div", {
|
|
79
|
-
className: maskCls
|
|
80
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
81
|
-
className: "".concat(prefixCls, "__outter")
|
|
82
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
83
|
-
className: iconCls
|
|
84
|
-
}, /*#__PURE__*/_react["default"].createElement("div", null), /*#__PURE__*/_react["default"].createElement("div", null)), /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
|
-
className: "".concat(prefixCls, "__text")
|
|
86
|
-
}, tip))));
|
|
87
|
-
}
|
|
88
|
-
}]);
|
|
89
|
-
|
|
90
|
-
return Loading;
|
|
91
|
-
}(_react.Component);
|
|
92
|
-
|
|
93
|
-
_defineProperty(Loading, "propTypes", {
|
|
94
|
-
size: _propTypes["default"].oneOf(['large', 'default', 'small']),
|
|
95
|
-
full: _propTypes["default"].bool,
|
|
96
|
-
show: _propTypes["default"].bool,
|
|
97
|
-
tip: _propTypes["default"].string,
|
|
98
|
-
target: _propTypes["default"].any
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
_defineProperty(Loading, "defaultProps", {
|
|
102
|
-
size: 'default'
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
function PortalWrapper(_ref) {
|
|
106
|
-
var mountNode = _ref.mountNode,
|
|
107
|
-
children = _ref.children;
|
|
108
|
-
return mountNode ? /*#__PURE__*/_reactDom["default"].createPortal(children, mountNode) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
109
|
-
className: "".concat(prefixCls, "__wrapper")
|
|
110
|
-
}, children);
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
function open() {
|
|
114
|
-
var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
|
|
115
|
-
target = _ref2.target,
|
|
116
|
-
tip = _ref2.tip;
|
|
117
|
-
|
|
118
|
-
var renderNode = document.createElement('div');
|
|
119
|
-
var mountNode = target || document.body;
|
|
120
|
-
window.getComputedStyle(mountNode).position === 'absolute' || mountNode.style.setProperty('position', 'relative');
|
|
121
|
-
var full = !target;
|
|
122
|
-
|
|
123
|
-
_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(Loading, {
|
|
124
|
-
tip: tip,
|
|
125
|
-
full: full,
|
|
126
|
-
show: true,
|
|
127
|
-
target: mountNode
|
|
128
|
-
}), renderNode);
|
|
129
|
-
|
|
130
|
-
function close() {
|
|
131
|
-
renderNode && _reactDom["default"].unmountComponentAtNode(renderNode);
|
|
132
|
-
renderNode = undefined;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
return {
|
|
136
|
-
close: close
|
|
137
|
-
};
|
|
138
|
-
}
|
|
16
|
+
var _default = (0, _util.depreactedPropsCompat)(['visible', 'show'])(_Loading["default"]);
|
|
139
17
|
|
|
140
|
-
Loading.open = open;
|
|
141
|
-
var _default = Loading;
|
|
142
18
|
exports["default"] = _default;
|
|
File without changes
|
|
File without changes
|
package/es/locales/en-US.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _default = {
|
|
4
8
|
misc: {
|
|
5
9
|
components: 'Basic Components'
|
|
6
10
|
},
|
|
@@ -8,12 +12,14 @@ module.exports = {
|
|
|
8
12
|
ok: 'OK',
|
|
9
13
|
to: 'to',
|
|
10
14
|
placeholder: 'Select Date',
|
|
15
|
+
placeholderTimeperiod: 'Select Date Time',
|
|
11
16
|
dateChoose: 'Select Date',
|
|
12
17
|
timeChoose: 'Select Time',
|
|
13
18
|
undefinedType: 'undefined type',
|
|
14
19
|
lastWeek: 'Nearly week',
|
|
15
20
|
lastMonth: 'Nearly month',
|
|
16
21
|
lastThreeMonth: 'Nearly three months',
|
|
22
|
+
lastSixMonth: 'Nearly six months',
|
|
17
23
|
lastYear: 'Nearly year',
|
|
18
24
|
month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
19
25
|
monthShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
@@ -23,9 +29,12 @@ module.exports = {
|
|
|
23
29
|
month: 'Select Month',
|
|
24
30
|
year: 'Select Year',
|
|
25
31
|
time: 'Select Time',
|
|
26
|
-
daterange: 'Select Date',
|
|
32
|
+
daterange: ['Select Start Date', 'Select End Date'],
|
|
33
|
+
yearrange: ['Select Start Year', 'Select End Year'],
|
|
34
|
+
monthrange: ['Select Start Month', 'Select End Month'],
|
|
27
35
|
week: 'Select Week',
|
|
28
|
-
weekrange: 'Select Week'
|
|
36
|
+
weekrange: ['Select Start Week', 'Select End Week'],
|
|
37
|
+
timeperiod: ['Select Start Date Time', 'Select Start End Time']
|
|
29
38
|
},
|
|
30
39
|
timePeriod: 'Period',
|
|
31
40
|
hours: 'H',
|
|
@@ -36,13 +45,12 @@ module.exports = {
|
|
|
36
45
|
}
|
|
37
46
|
},
|
|
38
47
|
pagination: {
|
|
39
|
-
total:
|
|
40
|
-
|
|
41
|
-
},
|
|
48
|
+
total: ['Total', 'items'],
|
|
49
|
+
simple: ['The', 'page', '', 'pages', 'items'],
|
|
42
50
|
item: '',
|
|
43
51
|
itemPerPage: 'Items per page',
|
|
44
52
|
"goto": 'Goto',
|
|
45
|
-
page: '
|
|
53
|
+
page: ''
|
|
46
54
|
},
|
|
47
55
|
cascader: {
|
|
48
56
|
placeholder: 'Please select',
|
|
@@ -50,9 +58,17 @@ module.exports = {
|
|
|
50
58
|
},
|
|
51
59
|
select: {
|
|
52
60
|
placeholder: 'Please select',
|
|
53
|
-
|
|
61
|
+
emptyContent: 'Not found',
|
|
62
|
+
searchPlaceholder: 'Please search',
|
|
54
63
|
checkAll: 'Check all'
|
|
55
64
|
},
|
|
65
|
+
transfer: {
|
|
66
|
+
checkAll: 'Check all',
|
|
67
|
+
items: 'items',
|
|
68
|
+
searchPlaceholder: 'Please search',
|
|
69
|
+
emptyContent: 'No data',
|
|
70
|
+
limit: 'Reached limit, unable to add'
|
|
71
|
+
},
|
|
56
72
|
upload: {
|
|
57
73
|
buttonText: 'Upload',
|
|
58
74
|
uploadSuccess: 'Success',
|
|
@@ -62,6 +78,7 @@ module.exports = {
|
|
|
62
78
|
drag: 'Drag and drop files for uploading',
|
|
63
79
|
dragTips: 'Please click or drag and drop file upload',
|
|
64
80
|
dragTipsLimited: 'The number has reached the upper limit',
|
|
81
|
+
preview: 'Preview',
|
|
65
82
|
modalTiptitle: 'Upload failed',
|
|
66
83
|
modalTiptxt: 'The upload file exceeds the specified upload file size',
|
|
67
84
|
modalBtn: 'I know',
|
|
@@ -81,8 +98,27 @@ module.exports = {
|
|
|
81
98
|
form: {
|
|
82
99
|
colon: ':'
|
|
83
100
|
},
|
|
101
|
+
tree: {
|
|
102
|
+
addNode: 'Add Node',
|
|
103
|
+
addChildNode: 'Add Child Node',
|
|
104
|
+
edit: 'Edit Node',
|
|
105
|
+
del: 'Delete',
|
|
106
|
+
confirm: 'Confirm',
|
|
107
|
+
cancel: 'Cancel',
|
|
108
|
+
nodePlaceholder: 'Please enter the node name',
|
|
109
|
+
searchPlaceholder: 'Keyword search',
|
|
110
|
+
searchEmptyResult: 'No serach results',
|
|
111
|
+
modalTitle: 'Warning',
|
|
112
|
+
delTips: 'Deleting a node will delete all child nodes, are you sure to delete this node?'
|
|
113
|
+
},
|
|
84
114
|
table: {
|
|
115
|
+
highlight: 'highlight',
|
|
116
|
+
freeze: 'freeze',
|
|
117
|
+
hide: 'hide',
|
|
118
|
+
meanValue: 'mean value',
|
|
119
|
+
emptyText: 'No Data',
|
|
85
120
|
checkAll: 'Check All',
|
|
86
121
|
expand: 'Expand'
|
|
87
122
|
}
|
|
88
|
-
};
|
|
123
|
+
};
|
|
124
|
+
exports["default"] = _default;
|
package/es/locales/index.js
CHANGED
|
@@ -1,11 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _zhCN = _interopRequireDefault(require("./zh-CN"));
|
|
11
|
+
|
|
12
|
+
var _enUS = _interopRequireDefault(require("./en-US"));
|
|
13
|
+
|
|
14
|
+
var _zhHantHK = _interopRequireDefault(require("./zh-Hant-HK"));
|
|
15
|
+
|
|
16
|
+
var _zhHantTW = _interopRequireDefault(require("./zh-Hant-TW"));
|
|
17
|
+
|
|
7
18
|
var _default = {
|
|
8
|
-
'zh-CN':
|
|
9
|
-
'
|
|
19
|
+
'zh-CN': _zhCN["default"],
|
|
20
|
+
'zh-Hans': _zhCN["default"],
|
|
21
|
+
'en-US': _enUS["default"],
|
|
22
|
+
'zh-Hant-HK': _zhHantHK["default"],
|
|
23
|
+
'zh-Hant-TW': _zhHantTW["default"]
|
|
10
24
|
};
|
|
11
25
|
exports["default"] = _default;
|