@hi-ui/hiui 2.15.10 → 2.15.11
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/CHANGELOG.md +3 -0
- package/es/_util/warning.js +2 -2
- package/es/alert/__test__/index.test.js +67 -0
- package/es/alert/index.js +147 -6
- package/es/alert/style/index.css +1 -1
- package/es/badge/index.js +87 -9
- package/es/badge/style/index.css +1 -1
- package/es/badge/style/index.js +0 -0
- package/es/button/Button.js +51 -59
- package/es/button/ButtonGroup.js +31 -23
- package/es/button/IconLoading.js +2 -2
- package/es/button/__test__/index.test.js +29 -0
- package/es/button/index.js +2 -3
- package/es/button/style/index.css +1 -1
- package/es/card/index.js +42 -54
- package/es/card/style/index.css +1 -1
- package/es/cascader/Cascader.js +116 -181
- package/es/cascader/__test__/index.test.js +283 -0
- package/es/cascader/index.js +2 -5
- package/es/cascader/menu.js +155 -0
- package/es/cascader/style/cascader.css +1 -1
- package/es/cascader/style/menu.css +1 -1
- package/es/checkbox/{checkbox-legacy/Base.js → Base.js} +31 -46
- package/es/checkbox/CheckBox.js +185 -0
- package/es/checkbox/index.js +4 -13
- package/es/checkbox/style/index.css +1 -1
- package/es/collapse/__test__/index.test.js +58 -0
- package/es/collapse/index.js +93 -79
- package/es/collapse/style/index.css +1 -1
- package/es/confirm/index.js +50 -37
- package/es/context/index.js +37 -39
- package/es/counter/__test__/index.test.js +52 -0
- package/es/counter/index.js +270 -6
- package/es/counter/style/index.css +1 -1
- package/es/date-picker/BasePicker.js +288 -374
- package/es/date-picker/Calender.js +90 -326
- package/es/date-picker/DatePanel.js +186 -175
- package/es/date-picker/DatePicker.js +51 -151
- package/es/date-picker/DateRangePanel.js +181 -253
- package/es/date-picker/Modal.js +25 -15
- package/es/date-picker/Time.js +336 -230
- package/es/date-picker/TimePanel.js +32 -27
- package/es/date-picker/TimePeriodPanel.js +32 -21
- package/es/date-picker/TimePicker.js +40 -42
- package/es/date-picker/TimeRangePanel.js +42 -32
- package/es/date-picker/Type.js +1 -5
- package/es/date-picker/WeekRangePanel.js +150 -237
- package/es/date-picker/constants.js +28 -14
- package/es/date-picker/dateUtil.js +52 -221
- package/es/date-picker/index.js +2 -5
- package/es/date-picker/style/index.css +1 -1
- package/es/date-picker/util.js +8 -101
- package/es/dropdown/Dropdown.js +199 -193
- package/es/dropdown/{tests → __test__}/index.test.js +2 -2
- package/es/dropdown/index.js +4 -73
- package/es/dropdown/style/index.css +1 -1
- package/es/dropdown/style/index.js +2 -0
- package/es/ficon/index.js +23 -13
- package/es/form/index.js +171 -6
- package/es/form/{Item.js → item.js} +53 -53
- package/es/form/style/index.css +1 -1
- package/es/grid/index.js +37 -25
- package/es/icon/index.js +32 -21
- package/es/index.js +9 -61
- package/es/input/index.js +345 -28
- package/es/input/style/index.css +1 -1
- package/es/input/util.js +18 -26
- package/es/lib/withDragDropContext.js +2 -2
- package/es/loading/index.js +129 -5
- package/es/loading/style/index.css +0 -0
- package/es/loading/style/index.js +0 -0
- package/es/locales/en-US.js +11 -45
- package/es/locales/index.js +2 -16
- package/es/locales/zh-CN.js +12 -46
- package/es/menu/Item.js +41 -32
- package/es/menu/ItemGroup.js +81 -0
- package/es/menu/SubMenu.js +74 -55
- package/es/menu/Title.js +42 -36
- package/es/menu/index.js +419 -12
- package/es/menu/style/index.css +1 -1
- package/es/modal/__test__/index.test.js +123 -0
- package/es/modal/index.js +61 -77
- package/es/modal/style/index.css +1 -1
- package/es/nav-menu/NavMenu.js +45 -31
- package/es/nav-menu/__test__/index.test.js +2 -2
- package/es/nav-menu/index.js +2 -2
- package/es/notification/__test__/index.test.js +56 -0
- package/es/notification/index.js +231 -68
- package/es/notification/style/index.css +1 -1
- package/es/notification/style/index.js +0 -0
- package/es/pagination/Pager.js +8 -6
- package/es/pagination/Pagination.js +115 -124
- package/es/pagination/__test__/index.test.js +140 -0
- package/es/pagination/index.js +8 -9
- package/es/pagination/style/index.css +1 -1
- package/es/panel/index.js +33 -23
- package/es/popover/__test__/index.test.js +2 -2
- package/es/popover/index.js +69 -71
- package/es/popper/index.js +54 -64
- package/es/popper/style/index.css +1 -1
- package/es/progress/BarProgress.js +43 -109
- package/es/progress/CircleProgress.js +10 -9
- package/es/progress/DashboardProgress.js +9 -7
- package/es/progress/index.js +100 -8
- package/es/progress/style/index.css +1 -1
- package/es/radio/{radio-legacy/__test__ → __test__}/index.test.js +10 -10
- package/es/radio/index.js +216 -10
- package/es/radio/style/index.css +1 -1
- package/es/rate/Icons.js +2 -2
- package/es/rate/Rate.js +90 -65
- package/es/rate/__test__/index.test.js +54 -0
- package/es/rate/index.js +2 -5
- package/es/rate/style/index.css +1 -1
- package/es/select/Option.js +93 -0
- package/es/select/Select.js +253 -325
- package/es/select/SelectDropdown.js +63 -215
- package/es/select/SelectInput.js +54 -88
- package/es/select/__test__/index.test.js +429 -0
- package/es/select/index.js +4 -6
- package/es/select/style/select-dropdown.css +1 -1
- package/es/select/style/select-input.css +1 -1
- package/es/stepper/index.js +127 -21
- package/es/stepper/style/index.css +1 -1
- package/es/style/color/colors.css +0 -0
- package/es/style/icon/diyIcon.css +1 -1
- package/es/style/icon/index.css +1 -1
- 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/{__tests__ → __test__}/index.test.js +2 -31
- package/es/switch/index.js +36 -24
- package/es/switch/style/index.css +1 -1
- package/es/table/__test__/index.test.js +73 -0
- package/es/table/{Body.js → body.js} +52 -36
- package/es/table/checkbox/index.js +36 -33
- package/es/table/clickOuterside.js +115 -0
- package/es/table/{Footer.js → footer.js} +41 -24
- package/es/table/{Header.js → header.js} +54 -41
- package/es/table/index.js +300 -262
- package/es/table/menu/index.js +34 -32
- package/es/table/pover.js +154 -0
- 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/table/tableContent.js +120 -0
- package/es/tabs/ItemDropdown.js +51 -39
- package/es/tabs/TabPane.js +35 -25
- package/es/tabs/Tabs.js +91 -98
- package/es/tabs/index.js +3 -9
- package/es/tabs/style/index.css +1 -1
- package/es/timeline/__test__/index.test.js +49 -0
- package/es/timeline/foldingItem.js +82 -0
- package/es/timeline/index.js +127 -203
- package/es/timeline/style/index.css +1 -1
- package/es/tooltip/__test__/index.test.js +67 -0
- package/es/tooltip/index.js +39 -86
- package/es/tooltip/style/index.css +1 -1
- package/es/transfer/Item.js +44 -53
- package/es/transfer/__test__/index.test.js +11 -0
- package/es/transfer/index.js +443 -4
- package/es/transfer/style/index.css +1 -1
- package/es/tree/Tree.js +86 -76
- package/es/tree/TreeDivider.js +3 -3
- package/es/tree/TreeItem.js +108 -204
- package/es/tree/TreeNode.js +318 -457
- package/es/tree/index.js +2 -9
- package/es/tree/style/index.css +1 -1
- package/es/tree/util.js +257 -9
- package/es/upload/{upload-legacy/Preview.js → Preview.js} +39 -33
- package/es/upload/Upload.js +193 -289
- package/es/upload/UploadAvatar.js +58 -44
- package/es/upload/UploadClick.js +45 -49
- package/es/upload/UploadDrag.js +43 -44
- package/es/upload/UploadPhoto.js +55 -70
- package/es/upload/UploadPictureCard.js +44 -39
- package/es/upload/index.js +71 -8
- package/es/upload/style/index.css +1 -1
- package/es/upload/tool.js +1 -0
- package/package.json +4 -1
- package/es/_util/SwitchVersion.js +0 -44
- package/es/_util/depreactedPropsCompat.js +0 -58
- package/es/_util/index.js +0 -32
- package/es/alert/Alert.js +0 -134
- package/es/alert/__tests__/index.test.js +0 -88
- package/es/badge/Badge.js +0 -90
- package/es/badge/__tests__/index.test.js +0 -82
- package/es/breadcrumb/__tests__/index.test.js +0 -61
- package/es/breadcrumb/index.js +0 -93
- package/es/breadcrumb/style/index.css +0 -1
- package/es/button/__tests__/index.test.js +0 -219
- package/es/card/__tests__/index.test.js +0 -169
- package/es/carousel/__tests__/index.test.js +0 -104
- package/es/carousel/index.js +0 -227
- package/es/carousel/style/index.css +0 -1
- package/es/carousel/style/index.js +0 -3
- package/es/cascader/Menu.js +0 -174
- package/es/cascader/__tests__/index.test.js +0 -389
- package/es/checkbox/Checkbox.js +0 -144
- package/es/checkbox/Group.js +0 -202
- package/es/checkbox/__tests__/index.test.js +0 -226
- package/es/checkbox/checkbox-legacy/CheckBox.js +0 -165
- package/es/checkbox/checkbox-legacy/index.js +0 -15
- package/es/checkbox/checkbox-legacy/style/index.css +0 -1
- package/es/checkbox/checkbox-legacy/style/index.js +0 -3
- package/es/collapse/__tests__/index.test.js +0 -111
- package/es/counter/Counter.js +0 -343
- package/es/counter/__tests__/index.test.js +0 -134
- package/es/counter/counter-legacy/index.js +0 -271
- package/es/date-picker/TimeList.js +0 -254
- package/es/date-picker/YMRangePanel.js +0 -372
- package/es/date-picker/__tests__/index.test.js +0 -961
- package/es/date-picker/datepicker-legacy/BasePicker.js +0 -519
- package/es/date-picker/datepicker-legacy/Calender.js +0 -430
- package/es/date-picker/datepicker-legacy/DatePanel.js +0 -463
- package/es/date-picker/datepicker-legacy/DatePicker.js +0 -107
- package/es/date-picker/datepicker-legacy/DateRangePanel.js +0 -496
- package/es/date-picker/datepicker-legacy/Modal.js +0 -71
- package/es/date-picker/datepicker-legacy/Time.js +0 -413
- package/es/date-picker/datepicker-legacy/TimePanel.js +0 -93
- package/es/date-picker/datepicker-legacy/TimePeriodPanel.js +0 -126
- package/es/date-picker/datepicker-legacy/TimePicker.js +0 -82
- package/es/date-picker/datepicker-legacy/TimeRangePanel.js +0 -98
- package/es/date-picker/datepicker-legacy/Type.js +0 -31
- package/es/date-picker/datepicker-legacy/WeekRangePanel.js +0 -345
- package/es/date-picker/datepicker-legacy/constants.js +0 -79
- package/es/date-picker/datepicker-legacy/dateUtil.js +0 -258
- package/es/date-picker/datepicker-legacy/index.js +0 -15
- package/es/date-picker/datepicker-legacy/local.js +0 -11
- package/es/date-picker/datepicker-legacy/style/index.css +0 -1
- package/es/date-picker/datepicker-legacy/style/index.js +0 -3
- package/es/date-picker/datepicker-legacy/style/timepicker.css +0 -1
- package/es/date-picker/datepicker-legacy/util.js +0 -60
- package/es/date-picker/toLunar.js +0 -172
- package/es/dropdown/DropdownButton.js +0 -106
- package/es/dropdown/DropdownMenu.js +0 -111
- package/es/dropdown/DropdownMenuItem.js +0 -178
- package/es/dropdown/__tests__/index.test.js +0 -317
- package/es/dropdown/utils.js +0 -35
- package/es/form/Form.js +0 -184
- package/es/form/__tests__/index.test.js +0 -575
- package/es/grid/__tests__/index.test.js +0 -104
- package/es/input/Input.js +0 -412
- package/es/input/__tests__/index.test.js +0 -381
- package/es/input/input-legacy/index.js +0 -353
- package/es/input/input-legacy/util.js +0 -176
- package/es/loading/Loading.js +0 -181
- package/es/loading/__tests__/index.test.js +0 -110
- package/es/locales/zh-Hant-HK.js +0 -121
- package/es/locales/zh-Hant-TW.js +0 -123
- package/es/menu/Menu.js +0 -422
- package/es/menu/__tests__/index.test.js +0 -279
- package/es/message/__tests__/index.test.js +0 -75
- package/es/message/index.js +0 -58
- package/es/message/style/index.css +0 -1
- package/es/message/style/index.js +0 -5
- package/es/modal/__tests__/index.test.js +0 -178
- package/es/nav-menu/__tests__/index.test.js +0 -27
- package/es/notice/Notice.js +0 -142
- package/es/notice/NoticeContainer.js +0 -113
- package/es/notice/__tests__/index.test.js +0 -174
- package/es/notice/index.js +0 -66
- package/es/notice/style/index.css +0 -1
- package/es/notice/style/index.js +0 -5
- package/es/notification/HandleNotification/index.js +0 -224
- package/es/notification/HandleNotification/style/index.css +0 -1
- package/es/notification/HandleNotification/style/index.js +0 -5
- package/es/notification/__tests__/index.test.js +0 -118
- package/es/pagination/__tests__/index.test.js +0 -248
- package/es/popover/__tests__/index.test.js +0 -152
- package/es/preview/index.js +0 -527
- package/es/preview/style/index.css +0 -1
- package/es/preview/style/index.js +0 -3
- package/es/progress/Progress.js +0 -110
- package/es/progress/__tests__/index.test.js +0 -131
- package/es/radio/Group.js +0 -203
- package/es/radio/Radio.js +0 -151
- package/es/radio/__tests__/index.test.js +0 -128
- package/es/radio/radio-legacy/index.js +0 -222
- package/es/radio/radio-legacy/style/index.css +0 -1
- package/es/radio/radio-legacy/style/index.js +0 -3
- package/es/rate/__tests__/index.test.js +0 -124
- package/es/select/__tests__/index.test.js +0 -505
- package/es/select/select-legacy/Option.js +0 -81
- package/es/select/select-legacy/Select.js +0 -710
- package/es/select/select-legacy/SelectDropdown.js +0 -164
- package/es/select/select-legacy/SelectInput.js +0 -312
- package/es/select/select-legacy/common.js +0 -19
- package/es/select/select-legacy/index.js +0 -16
- package/es/stepper/Stepper.js +0 -151
- package/es/stepper/__tests__/index.test.js +0 -161
- package/es/table/ClickOuterside.js +0 -103
- package/es/table/TableContent.js +0 -109
- package/es/table/__tests__/index.test.js +0 -133
- package/es/table/checkbox/style/index.css +0 -1
- package/es/table/checkbox/style/index.js +0 -3
- package/es/tabs/__tests__/index.test.js +0 -333
- package/es/tabs/tabs-legacy/ItemDropdown.js +0 -170
- package/es/tabs/tabs-legacy/TabPane.js +0 -78
- package/es/tabs/tabs-legacy/Tabs.js +0 -299
- package/es/tabs/tabs-legacy/index.js +0 -18
- package/es/tabs/tabs-legacy/style/index.css +0 -1
- package/es/tabs/tabs-legacy/style/index.js +0 -3
- package/es/tag/__tests__/index.test.js +0 -46
- package/es/tag/index.js +0 -94
- package/es/tag/style/index.css +0 -1
- package/es/tag/style/index.js +0 -3
- package/es/timeline/__tests__/index.test.js +0 -198
- package/es/tooltip/__tests__/index.test.js +0 -170
- package/es/transfer/Transfer.js +0 -566
- package/es/transfer/__tests__/index.test.js +0 -210
- package/es/tree/IconLoading.js +0 -38
- package/es/tree/__tests__/index.test.js +0 -603
- package/es/tree/tree-legacy/Tree.js +0 -337
- package/es/tree/tree-legacy/TreeDivider.js +0 -25
- package/es/tree/tree-legacy/TreeItem.js +0 -333
- package/es/tree/tree-legacy/TreeNode.js +0 -719
- package/es/tree/tree-legacy/index.js +0 -13
- package/es/tree/tree-legacy/style/index.css +0 -1
- package/es/tree/tree-legacy/style/index.js +0 -3
- package/es/tree/tree-legacy/util.js +0 -434
- package/es/upload/__tests__/index.test.js +0 -760
- package/es/upload/main.js +0 -91
- package/es/upload/upload-legacy/Upload.js +0 -435
- package/es/upload/upload-legacy/UploadAvatar.js +0 -322
- package/es/upload/upload-legacy/UploadClick.js +0 -125
- package/es/upload/upload-legacy/UploadDrag.js +0 -180
- package/es/upload/upload-legacy/UploadPhoto.js +0 -183
- package/es/upload/upload-legacy/UploadPictureCard.js +0 -126
- package/es/upload/upload-legacy/index.js +0 -75
- package/es/upload/upload-legacy/style/index.css +0 -1
- package/es/upload/upload-legacy/style/index.js +0 -5
- package/es/upload/upload-legacy/tool.js +0 -84
- package/es/watermark/index.js +0 -101
- package/es/watermark/watermark.js +0 -252
- /package/es/checkbox/{checkbox-legacy/common.js → common.js} +0 -0
- /package/es/{breadcrumb/style → style}/index.js +0 -0
- /package/es/upload/{upload-legacy/style → style}/preview.css +0 -0
- /package/es/upload/{upload-legacy/style → style}/preview.js +0 -0
package/es/loading/index.js
CHANGED
|
@@ -1,18 +1,142 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports["default"] = void 0;
|
|
9
7
|
|
|
10
|
-
var
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
11
13
|
|
|
12
|
-
var
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
15
|
|
|
14
16
|
require("./style/index");
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
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
|
+
}
|
|
17
139
|
|
|
140
|
+
Loading.open = open;
|
|
141
|
+
var _default = Loading;
|
|
18
142
|
exports["default"] = _default;
|
|
File without changes
|
|
File without changes
|
package/es/locales/en-US.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _default = {
|
|
3
|
+
module.exports = {
|
|
8
4
|
misc: {
|
|
9
5
|
components: 'Basic Components'
|
|
10
6
|
},
|
|
@@ -12,14 +8,12 @@ var _default = {
|
|
|
12
8
|
ok: 'OK',
|
|
13
9
|
to: 'to',
|
|
14
10
|
placeholder: 'Select Date',
|
|
15
|
-
placeholderTimeperiod: 'Select Date Time',
|
|
16
11
|
dateChoose: 'Select Date',
|
|
17
12
|
timeChoose: 'Select Time',
|
|
18
13
|
undefinedType: 'undefined type',
|
|
19
14
|
lastWeek: 'Nearly week',
|
|
20
15
|
lastMonth: 'Nearly month',
|
|
21
16
|
lastThreeMonth: 'Nearly three months',
|
|
22
|
-
lastSixMonth: 'Nearly six months',
|
|
23
17
|
lastYear: 'Nearly year',
|
|
24
18
|
month: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
|
25
19
|
monthShort: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
@@ -29,12 +23,9 @@ var _default = {
|
|
|
29
23
|
month: 'Select Month',
|
|
30
24
|
year: 'Select Year',
|
|
31
25
|
time: 'Select Time',
|
|
32
|
-
daterange:
|
|
33
|
-
yearrange: ['Select Start Year', 'Select End Year'],
|
|
34
|
-
monthrange: ['Select Start Month', 'Select End Month'],
|
|
26
|
+
daterange: 'Select Date',
|
|
35
27
|
week: 'Select Week',
|
|
36
|
-
weekrange:
|
|
37
|
-
timeperiod: ['Select Start Date Time', 'Select Start End Time']
|
|
28
|
+
weekrange: 'Select Week'
|
|
38
29
|
},
|
|
39
30
|
timePeriod: 'Period',
|
|
40
31
|
hours: 'H',
|
|
@@ -45,12 +36,13 @@ var _default = {
|
|
|
45
36
|
}
|
|
46
37
|
},
|
|
47
38
|
pagination: {
|
|
48
|
-
total:
|
|
49
|
-
|
|
39
|
+
total: function total(_total) {
|
|
40
|
+
return 'Total ' + _total + ' items';
|
|
41
|
+
},
|
|
50
42
|
item: '',
|
|
51
43
|
itemPerPage: 'Items per page',
|
|
52
44
|
"goto": 'Goto',
|
|
53
|
-
page: ''
|
|
45
|
+
page: 'page'
|
|
54
46
|
},
|
|
55
47
|
cascader: {
|
|
56
48
|
placeholder: 'Please select',
|
|
@@ -58,17 +50,9 @@ var _default = {
|
|
|
58
50
|
},
|
|
59
51
|
select: {
|
|
60
52
|
placeholder: 'Please select',
|
|
61
|
-
|
|
62
|
-
searchPlaceholder: 'Please search',
|
|
53
|
+
noFoundTip: 'Not found',
|
|
63
54
|
checkAll: 'Check all'
|
|
64
55
|
},
|
|
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
|
-
},
|
|
72
56
|
upload: {
|
|
73
57
|
buttonText: 'Upload',
|
|
74
58
|
uploadSuccess: 'Success',
|
|
@@ -78,7 +62,6 @@ var _default = {
|
|
|
78
62
|
drag: 'Drag and drop files for uploading',
|
|
79
63
|
dragTips: 'Please click or drag and drop file upload',
|
|
80
64
|
dragTipsLimited: 'The number has reached the upper limit',
|
|
81
|
-
preview: 'Preview',
|
|
82
65
|
modalTiptitle: 'Upload failed',
|
|
83
66
|
modalTiptxt: 'The upload file exceeds the specified upload file size',
|
|
84
67
|
modalBtn: 'I know',
|
|
@@ -98,25 +81,8 @@ var _default = {
|
|
|
98
81
|
form: {
|
|
99
82
|
colon: ':'
|
|
100
83
|
},
|
|
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
|
-
},
|
|
114
84
|
table: {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
hide: 'hide',
|
|
118
|
-
meanValue: 'mean value',
|
|
119
|
-
emptyText: 'No Data'
|
|
85
|
+
checkAll: 'Check All',
|
|
86
|
+
expand: 'Expand'
|
|
120
87
|
}
|
|
121
|
-
};
|
|
122
|
-
exports["default"] = _default;
|
|
88
|
+
};
|
package/es/locales/index.js
CHANGED
|
@@ -1,25 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
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
|
-
|
|
18
7
|
var _default = {
|
|
19
|
-
'zh-CN':
|
|
20
|
-
'
|
|
21
|
-
'en-US': _enUS["default"],
|
|
22
|
-
'zh-Hant-HK': _zhHantHK["default"],
|
|
23
|
-
'zh-Hant-TW': _zhHantTW["default"]
|
|
8
|
+
'zh-CN': require('./zh-CN'),
|
|
9
|
+
'en-US': require('./en-US')
|
|
24
10
|
};
|
|
25
11
|
exports["default"] = _default;
|
package/es/locales/zh-CN.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var _default = {
|
|
3
|
+
module.exports = {
|
|
8
4
|
misc: {
|
|
9
5
|
components: '基础组件'
|
|
10
6
|
},
|
|
@@ -12,14 +8,12 @@ var _default = {
|
|
|
12
8
|
ok: '确认',
|
|
13
9
|
to: '至',
|
|
14
10
|
placeholder: '请选择日期',
|
|
15
|
-
placeholderTimeperiod: '请选择日期时间',
|
|
16
11
|
dateChoose: '日期选择',
|
|
17
12
|
timeChoose: '时间选择',
|
|
18
13
|
undefinedType: '类型未定义',
|
|
19
14
|
lastWeek: '近一周',
|
|
20
15
|
lastMonth: '近一月',
|
|
21
16
|
lastThreeMonth: '近三月',
|
|
22
|
-
lastSixMonth: '近半年',
|
|
23
17
|
lastYear: '近一年',
|
|
24
18
|
month: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
|
|
25
19
|
monthShort: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
|
@@ -29,12 +23,9 @@ var _default = {
|
|
|
29
23
|
month: '请选择月',
|
|
30
24
|
year: '请选择年',
|
|
31
25
|
time: '请选择时间',
|
|
32
|
-
daterange:
|
|
33
|
-
yearrange: ['开始年', '结束年'],
|
|
34
|
-
monthrange: ['开始月', '结束月'],
|
|
26
|
+
daterange: '请选择日期',
|
|
35
27
|
week: '请选择周',
|
|
36
|
-
weekrange:
|
|
37
|
-
timeperiod: ['开始日期时间', '结束日期时间']
|
|
28
|
+
weekrange: '请选择周'
|
|
38
29
|
},
|
|
39
30
|
year: '年',
|
|
40
31
|
timePeriod: '时间段',
|
|
@@ -46,11 +37,12 @@ var _default = {
|
|
|
46
37
|
}
|
|
47
38
|
},
|
|
48
39
|
pagination: {
|
|
49
|
-
total:
|
|
50
|
-
|
|
40
|
+
total: function total(_total) {
|
|
41
|
+
return '共 ' + _total + ' 条';
|
|
42
|
+
},
|
|
51
43
|
item: '条',
|
|
52
|
-
itemPerPage: '
|
|
53
|
-
"goto": '
|
|
44
|
+
itemPerPage: '每页',
|
|
45
|
+
"goto": '跳至',
|
|
54
46
|
page: '页'
|
|
55
47
|
},
|
|
56
48
|
cascader: {
|
|
@@ -59,17 +51,9 @@ var _default = {
|
|
|
59
51
|
},
|
|
60
52
|
select: {
|
|
61
53
|
placeholder: '请选择',
|
|
62
|
-
|
|
63
|
-
searchPlaceholder: '搜索',
|
|
54
|
+
noFoundTip: '无匹配数据',
|
|
64
55
|
checkAll: '全选'
|
|
65
56
|
},
|
|
66
|
-
transfer: {
|
|
67
|
-
checkAll: '全选',
|
|
68
|
-
items: '项',
|
|
69
|
-
searchPlaceholder: '搜索',
|
|
70
|
-
emptyContent: '暂无数据',
|
|
71
|
-
limit: '数量达上限,无法添加'
|
|
72
|
-
},
|
|
73
57
|
upload: {
|
|
74
58
|
buttonText: '本地上传',
|
|
75
59
|
uploadSuccess: '上传成功',
|
|
@@ -79,7 +63,6 @@ var _default = {
|
|
|
79
63
|
drag: '拖拽文件上传',
|
|
80
64
|
dragTips: '请点击或拖拽文件上传',
|
|
81
65
|
dragTipsLimited: '数量已达上限',
|
|
82
|
-
preview: '预览',
|
|
83
66
|
modalTiptitle: '上传失败',
|
|
84
67
|
modalTiptxt: '该上传文件超过指定上传文件大小',
|
|
85
68
|
modalBtn: '我知道了',
|
|
@@ -99,25 +82,8 @@ var _default = {
|
|
|
99
82
|
form: {
|
|
100
83
|
colon: ':'
|
|
101
84
|
},
|
|
102
|
-
tree: {
|
|
103
|
-
addNode: '添加节点',
|
|
104
|
-
addChildNode: '添加子节点',
|
|
105
|
-
edit: '编辑节点',
|
|
106
|
-
del: '删除',
|
|
107
|
-
confirm: '确认',
|
|
108
|
-
cancel: '取消',
|
|
109
|
-
nodePlaceholder: '请输入节点名称',
|
|
110
|
-
searchPlaceholder: '关键词搜索',
|
|
111
|
-
searchEmptyResult: '未找到搜索结果',
|
|
112
|
-
modalTitle: '提示',
|
|
113
|
-
delTips: '删除节点将删除所有子节点,确定删除吗?'
|
|
114
|
-
},
|
|
115
85
|
table: {
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
hide: '隐藏',
|
|
119
|
-
meanValue: '均值',
|
|
120
|
-
emptyText: '暂无数据'
|
|
86
|
+
checkAll: '多选',
|
|
87
|
+
expand: '展开'
|
|
121
88
|
}
|
|
122
|
-
};
|
|
123
|
-
exports["default"] = _default;
|
|
89
|
+
};
|
package/es/menu/Item.js
CHANGED
|
@@ -1,51 +1,60 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
-
|
|
7
3
|
Object.defineProperty(exports, "__esModule", {
|
|
8
4
|
value: true
|
|
9
5
|
});
|
|
10
6
|
exports["default"] = void 0;
|
|
11
7
|
|
|
12
|
-
var
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
13
|
|
|
14
|
-
var
|
|
14
|
+
var _Title = _interopRequireDefault(require("./Title"));
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
19
19
|
|
|
20
|
-
var
|
|
20
|
+
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; }
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
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); }
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
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); } }
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
29
29
|
|
|
30
|
-
function
|
|
30
|
+
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); }
|
|
31
31
|
|
|
32
|
-
function
|
|
32
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
33
|
|
|
34
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (
|
|
34
|
+
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); }; }
|
|
35
35
|
|
|
36
|
-
function
|
|
36
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
37
|
+
|
|
38
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
39
|
+
|
|
40
|
+
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; } }
|
|
41
|
+
|
|
42
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
43
|
+
|
|
44
|
+
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; }
|
|
37
45
|
|
|
38
46
|
var Item = /*#__PURE__*/function (_Component) {
|
|
39
|
-
(
|
|
47
|
+
_inherits(Item, _Component);
|
|
40
48
|
|
|
41
49
|
var _super = _createSuper(Item);
|
|
42
50
|
|
|
43
51
|
function Item() {
|
|
44
|
-
(
|
|
52
|
+
_classCallCheck(this, Item);
|
|
53
|
+
|
|
45
54
|
return _super.apply(this, arguments);
|
|
46
55
|
}
|
|
47
56
|
|
|
48
|
-
(
|
|
57
|
+
_createClass(Item, [{
|
|
49
58
|
key: "render",
|
|
50
59
|
value: function render() {
|
|
51
60
|
var _this$props = this.props,
|
|
@@ -53,14 +62,12 @@ var Item = /*#__PURE__*/function (_Component) {
|
|
|
53
62
|
disabled = _this$props.disabled,
|
|
54
63
|
_onClick = _this$props.onClick,
|
|
55
64
|
level = _this$props.level,
|
|
56
|
-
placement = _this$props.placement,
|
|
57
65
|
activeIndex = _this$props.activeIndex,
|
|
58
66
|
id = _this$props.id,
|
|
59
67
|
icon = _this$props.icon,
|
|
60
68
|
index = _this$props.index,
|
|
61
|
-
data = _this$props.data
|
|
62
|
-
|
|
63
|
-
var isActive = activeIndex === index;
|
|
69
|
+
data = _this$props.data;
|
|
70
|
+
var isActive = activeIndex.indexOf(index) === 0;
|
|
64
71
|
var cls = (0, _classnames["default"])('hi-menu-item', 'hi-menu-item__title', 'hi-menu__title', "hi-menu--".concat(level), {
|
|
65
72
|
'hi-menu-item--disabled': disabled,
|
|
66
73
|
'hi-menu-item--active': isActive
|
|
@@ -77,17 +84,17 @@ var Item = /*#__PURE__*/function (_Component) {
|
|
|
77
84
|
}
|
|
78
85
|
}, /*#__PURE__*/_react["default"].createElement(_Title["default"], {
|
|
79
86
|
icon: icon,
|
|
80
|
-
content: children
|
|
81
|
-
placement: placement,
|
|
82
|
-
level: level,
|
|
83
|
-
mini: mini
|
|
87
|
+
content: children
|
|
84
88
|
}));
|
|
85
89
|
}
|
|
86
90
|
}]);
|
|
91
|
+
|
|
87
92
|
return Item;
|
|
88
93
|
}(_react.Component);
|
|
89
94
|
|
|
90
|
-
Item
|
|
95
|
+
_defineProperty(Item, "componentName", 'MenuItem');
|
|
96
|
+
|
|
97
|
+
_defineProperty(Item, "propTypes", {
|
|
91
98
|
id: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].number]),
|
|
92
99
|
icon: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node]),
|
|
93
100
|
level: _propTypes["default"].number,
|
|
@@ -95,10 +102,12 @@ Item.propTypes = {
|
|
|
95
102
|
onClick: _propTypes["default"].func,
|
|
96
103
|
disabled: _propTypes["default"].bool,
|
|
97
104
|
activeIndex: _propTypes["default"].string
|
|
98
|
-
};
|
|
99
|
-
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
_defineProperty(Item, "defaultProps", {
|
|
100
108
|
disabled: false,
|
|
101
109
|
activeIndex: ''
|
|
102
|
-
};
|
|
110
|
+
});
|
|
111
|
+
|
|
103
112
|
var _default = Item;
|
|
104
113
|
exports["default"] = _default;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _MixinMenu2 = _interopRequireDefault(require("./MixinMenu"));
|
|
15
|
+
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
18
|
+
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); }
|
|
19
|
+
|
|
20
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
+
|
|
22
|
+
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); } }
|
|
23
|
+
|
|
24
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
|
25
|
+
|
|
26
|
+
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); }
|
|
27
|
+
|
|
28
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
29
|
+
|
|
30
|
+
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); }; }
|
|
31
|
+
|
|
32
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
|
33
|
+
|
|
34
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
35
|
+
|
|
36
|
+
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; } }
|
|
37
|
+
|
|
38
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
|
+
|
|
40
|
+
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; }
|
|
41
|
+
|
|
42
|
+
var ItemGroup = /*#__PURE__*/function (_MixinMenu) {
|
|
43
|
+
_inherits(ItemGroup, _MixinMenu);
|
|
44
|
+
|
|
45
|
+
var _super = _createSuper(ItemGroup);
|
|
46
|
+
|
|
47
|
+
function ItemGroup() {
|
|
48
|
+
_classCallCheck(this, ItemGroup);
|
|
49
|
+
|
|
50
|
+
return _super.apply(this, arguments);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
_createClass(ItemGroup, [{
|
|
54
|
+
key: "render",
|
|
55
|
+
value: function render() {
|
|
56
|
+
var title = this.props.title;
|
|
57
|
+
|
|
58
|
+
var _this$renderChildren = this.renderChildren(this.props.children, ItemGroup.componentName),
|
|
59
|
+
children = _this$renderChildren.children;
|
|
60
|
+
|
|
61
|
+
var cls = (0, _classnames["default"])('hi-menu-group');
|
|
62
|
+
return /*#__PURE__*/_react["default"].createElement("li", {
|
|
63
|
+
className: cls
|
|
64
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
65
|
+
className: "hi-menu-group__title"
|
|
66
|
+
}, title), /*#__PURE__*/_react["default"].createElement("ul", {
|
|
67
|
+
className: "hi-menu-group__content"
|
|
68
|
+
}, children));
|
|
69
|
+
}
|
|
70
|
+
}]);
|
|
71
|
+
|
|
72
|
+
return ItemGroup;
|
|
73
|
+
}(_MixinMenu2["default"]);
|
|
74
|
+
|
|
75
|
+
exports["default"] = ItemGroup;
|
|
76
|
+
|
|
77
|
+
_defineProperty(ItemGroup, "componentName", 'ItemGroup');
|
|
78
|
+
|
|
79
|
+
_defineProperty(ItemGroup, "propTypes", {
|
|
80
|
+
title: _propTypes["default"].oneOfType([_propTypes["default"].string, _propTypes["default"].node])
|
|
81
|
+
});
|