@chaoswise/ui 2.3.14 → 2.3.15
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/lib/AbreastLayout/index.js +6 -6
- package/lib/Ace/ace.js +1 -1
- package/lib/Ace/diff.js +1 -1
- package/lib/Ace/split.js +1 -1
- package/lib/AdaptiveLayout/index.js +4 -4
- package/lib/Antd/Drawer.js +4 -4
- package/lib/Antd4Form/FieldList.js +3 -3
- package/lib/Antd4Form/Form.js +1 -1
- package/lib/Antd4Form/FormItem.js +3 -3
- package/lib/Antd4Form/FormItemChildren.js +1 -1
- package/lib/Antd4Form/useForm.js +4 -4
- package/lib/BasicLayout/Breadcrumb.js +3 -3
- package/lib/BasicLayout/Sider.js +3 -3
- package/lib/BasicLayout/index.js +1 -1
- package/lib/CWCascader/Cascader/index.js +3 -3
- package/lib/CWCascader/rc-cascader/Cascader.js +3 -3
- package/lib/CWCascader/rc-cascader/OptionList/Checkbox.js +1 -1
- package/lib/CWCascader/rc-cascader/OptionList/Column.js +5 -5
- package/lib/CWCascader/rc-cascader/OptionList/index.js +6 -7
- package/lib/CWCascader/rc-cascader/OptionList/useActive.js +1 -1
- package/lib/CWCascader/rc-cascader/OptionList/useKeyboard.js +5 -6
- package/lib/CWCascader/rc-cascader/hooks/useDisplayValues.js +1 -1
- package/lib/CWCascader/rc-cascader/hooks/useEntities.js +3 -3
- package/lib/CWCascader/rc-cascader/hooks/useSearchConfig.js +3 -3
- package/lib/CWCascader/rc-cascader/hooks/useSearchOptions.js +3 -3
- package/lib/CWMessage/MessageContent/TabList/index.js +4 -4
- package/lib/CWMessage/MessageContent/index.js +6 -6
- package/lib/CWMessage/index.js +8 -8
- package/lib/CWRadioTabs/index.js +1 -1
- package/lib/CWRangePicker/DropdownMenu/index.js +4 -4
- package/lib/CWRangePicker/Refresh/index.js +4 -4
- package/lib/CWRangePicker/index.js +4 -4
- package/lib/CWRangePicker/utils/index.js +4 -4
- package/lib/CWSelect/DragTag/index.js +1 -1
- package/lib/CWSelect/antd-select.js +1 -1
- package/lib/CWSelect/index.js +4 -4
- package/lib/CWTable/CWTable.js +12 -12
- package/lib/CWTable/EditLine.js +4 -4
- package/lib/CWTable/Filter.js +1 -1
- package/lib/CWTable/FormTable.js +3 -3
- package/lib/CWTable/header.js +1 -1
- package/lib/CWTree/index.js +4 -4
- package/lib/CWTree/index.less +6 -0
- package/lib/CWTree/utils/index.js +3 -3
- package/lib/CWUpload/upload/DragList.js +2 -2
- package/lib/CWUpload/upload/Upload.js +2 -2
- package/lib/CWUpload/upload/UploadList.js +1 -1
- package/lib/CardSelect/index.js +1 -1
- package/lib/ChangeIcon/index.js +1 -1
- package/lib/Checkbox/Checkbox.js +3 -3
- package/lib/Checkbox/Group.js +1 -1
- package/lib/ColorPicker/index.js +4 -4
- package/lib/ConfigProvider/ConfigProvider.js +4 -4
- package/lib/CustomScrollBar/index.js +3 -3
- package/lib/DateRangePicker/RangeDatePicker.js +1 -1
- package/lib/DateRangePicker/RangeDateTimePicker.js +1 -1
- package/lib/DateRangePicker/components/ExtraTimeFooter.js +3 -3
- package/lib/DateRangePicker/utils/index.js +1 -1
- package/lib/Documentation/Tocify.js +1 -1
- package/lib/Documentation/index.js +4 -4
- package/lib/DropdownDatePicker/DropdownMenu/index.js +3 -3
- package/lib/DropdownDatePicker/index.js +4 -4
- package/lib/DropdownDatePicker/utils/index.js +4 -4
- package/lib/EchartsArea/index.js +3 -3
- package/lib/EchartsBar/index.js +3 -3
- package/lib/EchartsBase/index.js +3 -3
- package/lib/EchartsLine/index.js +3 -3
- package/lib/EditableText/index.js +1 -1
- package/lib/ErrorBoundary/history.js +1 -1
- package/lib/ErrorBoundary/index.js +1 -1
- package/lib/FilterDropDown/DragList.js +1 -1
- package/lib/FilterDropDown/index.js +1 -1
- package/lib/Flow/Flow.js +1 -1
- package/lib/Flow/components/PluginWrapper.js +1 -1
- package/lib/Flow/layouts/callChain.js +1 -1
- package/lib/Flow/plugins/CommandLifeCycle.js +1 -1
- package/lib/Flow/plugins/InitSideBarPlugin.js +1 -1
- package/lib/Flow/plugins/InitToolBarPlugin.js +1 -1
- package/lib/Form/FormItem.js +3 -3
- package/lib/FormItemWrapper/index.js +3 -3
- package/lib/Formily/FieldList/index.js +3 -3
- package/lib/Formily/FormItem/index.js +3 -3
- package/lib/Formily/FormItem/items/Upload.js +1 -1
- package/lib/Formily/FormItem/items/shared.js +1 -1
- package/lib/Formily/MegaLayout/index.js +3 -3
- package/lib/Formily/formily/index.js +1 -1
- package/lib/Formily/subscribeFields/index.js +4 -4
- package/lib/GlobalTabs/index.js +3 -3
- package/lib/Header/CommonDropMenu.js +1 -1
- package/lib/Header/CommonIcon.js +3 -3
- package/lib/Header/UserSetting/index.js +1 -1
- package/lib/Header/UserSetting/utils.js +3 -3
- package/lib/Header/index.js +3 -2
- package/lib/IconSelect/components/SearchIcon/index.js +1 -1
- package/lib/IconSelect/index.js +1 -1
- package/lib/Input/InputComponent.js +4 -7
- package/lib/IntersectionInput/index.js +4 -4
- package/lib/Joyride/index.js +4 -4
- package/lib/LayoutBreadcrumb/index.js +3 -3
- package/lib/LayoutWrapper/index.js +1 -1
- package/lib/LazyLoadingTreeSelect/index.js +4 -4
- package/lib/Menu/menu/MenuItem.js +1 -1
- package/lib/Menu/menu/SubMenu.js +1 -1
- package/lib/Menu/menu/index.js +1 -1
- package/lib/Modal/Modal.js +1 -1
- package/lib/Modal/custom-backup/entiretyDrag.js +3 -3
- package/lib/Modal/index.js +3 -3
- package/lib/ModuleFederation/ErrorBoundary/index.js +1 -1
- package/lib/ModuleFederation/react-dynamic-remote-component/RemoteComponent.js +6 -6
- package/lib/ModuleFederation/react-dynamic-remote-component/load-module.js +2 -2
- package/lib/Pagination/index.js +4 -4
- package/lib/PolymerizationSearch/index.js +1 -1
- package/lib/QuickRangePicker/index.js +2 -2
- package/lib/QuickTransfer/DragList.js +1 -1
- package/lib/QuickTransfer/index.js +4 -4
- package/lib/QuickTransfer/utils.js +23 -23
- package/lib/Radio/Group.js +1 -1
- package/lib/Radio/Radio.js +3 -3
- package/lib/RangePicker/components/ExtraTimeFooter.js +3 -3
- package/lib/RangePicker/index.js +2 -2
- package/lib/RangePicker/utils/index.js +1 -1
- package/lib/ReactSelect/customStyles.js +3 -3
- package/lib/ReactSelect/index.js +4 -4
- package/lib/ScrollLoad/index.js +1 -1
- package/lib/SearchBar/index.js +4 -4
- package/lib/SelectBackup/index.js +4 -4
- package/lib/SiderMenu/Item.js +1 -1
- package/lib/SiderMenu/index.js +3 -3
- package/lib/SimplePagination/index.js +4 -4
- package/lib/SingleSpa/import-html/process-tpl.js +1 -1
- package/lib/SingleSpa/import-html/utils.js +2 -2
- package/lib/SingleSpa/index.js +5 -5
- package/lib/SingleSpa/singleSpa/single-spa.dev.js +1 -1
- package/lib/SingleSpa/system/amd.js +1 -1
- package/lib/SingleSpa/system/system.js +1 -1
- package/lib/Tabs/index.js +3 -3
- package/lib/ThemeProvider/main.js +4 -4
- package/lib/ThemeProvider/utils.js +2 -2
- package/lib/TooltipText/index.js +4 -4
- package/lib/TreeList/index.js +2 -2
- package/lib/TreeSelect111/index.js +4 -4
- package/lib/TreeSelect111/utils/index.js +3 -3
- package/lib/Upload-back/index.js +1 -1
- package/lib/WangEditor/release/wangEditor.js +1 -1
- package/lib/WangEditor/usePreview.js +1 -1
- package/lib/WangEditor/wangEditor.js +1 -1
- package/lib/message/index.js +3 -3
- package/lib/noticeManager/globalState.js +1 -1
- package/lib/portalNoticeManager/usePortalDispatchNotice.js +4 -4
- package/lib/useLocale/index.js +3 -3
- package/lib/usePreview/index.js +1 -1
- package/package.json +2 -2
- package/lib/Antd4/notification/index.copy.js +0 -302
- package/lib/Cascaders/Cascader/index.js +0 -208
- package/lib/Cascaders/index.js +0 -17
- package/lib/Cascaders/index.less +0 -1
- package/lib/Cascaders/rc-cascader/Cascader.js +0 -326
- package/lib/Cascaders/rc-cascader/OptionList/Checkbox.js +0 -22
- package/lib/Cascaders/rc-cascader/OptionList/Column.js +0 -203
- package/lib/Cascaders/rc-cascader/OptionList/index.js +0 -213
- package/lib/Cascaders/rc-cascader/OptionList/useActive.js +0 -33
- package/lib/Cascaders/rc-cascader/OptionList/useKeyboard.js +0 -171
- package/lib/Cascaders/rc-cascader/context.js +0 -3
- package/lib/Cascaders/rc-cascader/hooks/useDisplayValues.js +0 -56
- package/lib/Cascaders/rc-cascader/hooks/useEntities.js +0 -34
- package/lib/Cascaders/rc-cascader/hooks/useMissingValues.js +0 -19
- package/lib/Cascaders/rc-cascader/hooks/useRefFunc.js +0 -13
- package/lib/Cascaders/rc-cascader/hooks/useSearchConfig.js +0 -25
- package/lib/Cascaders/rc-cascader/hooks/useSearchOptions.js +0 -72
- package/lib/Cascaders/rc-cascader/index.js +0 -2
- package/lib/Cascaders/rc-cascader/utils/commonUtil.js +0 -54
- package/lib/Cascaders/rc-cascader/utils/treeUtil.js +0 -37
- package/lib/Cascaders/rc-cascader/utils/warningPropsUtil.js +0 -30
- package/lib/Empty/assets/emptyState.png +0 -0
- package/lib/Header/assets/icon2.png +0 -0
- package/lib/Menu/assets/arrow.png +0 -0
- package/lib/Menu/index.less +0 -81
- package/lib/QuickTransfer/CheckList.js +0 -54
- package/lib/QuickTransfer/TopicList.js +0 -153
- package/lib/SiderMenu/assets/arrow.png +0 -0
- package/lib/SiderMenu/assets/logo.svg +0 -58
- package/lib/SiderMenu/assets/rect-logo.png +0 -0
- package/lib/SiderMenu/utils.js +0 -29
package/lib/message/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
import _Icon from "@chaoswise/ui/lib/Antd/Icon";
|
|
3
|
-
function ownKeys(
|
|
4
|
-
function _objectSpread(
|
|
3
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
5
5
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
6
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
7
7
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
3
3
|
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, _toPropertyKey(descriptor.key), descriptor); } }
|
|
4
4
|
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
function _typeof(
|
|
2
|
-
function ownKeys(
|
|
3
|
-
function _objectSpread(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
6
6
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
@@ -8,7 +8,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
8
8
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
9
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
-
function _iterableToArrayLimit(
|
|
11
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { useEffect, useState, useCallback } from 'react';
|
|
14
14
|
var usePortalDispatchNotice = function usePortalDispatchNotice() {
|
package/lib/useLocale/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
function _typeof(
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
import _ConfigProvider from "@chaoswise/ui/lib/ConfigProvider";
|
|
3
3
|
var _excluded = ["locale"];
|
|
4
|
-
function ownKeys(
|
|
5
|
-
function _objectSpread(
|
|
4
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
6
6
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
7
7
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
8
8
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
package/lib/usePreview/index.js
CHANGED
|
@@ -2,7 +2,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
2
2
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
3
3
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
|
-
function _iterableToArrayLimit(
|
|
5
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
/*
|
|
8
8
|
* @Author: andrew.qiao andrew.qiao@cloudwise.com
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaoswise/ui",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.15",
|
|
4
4
|
"description": "公共UI库",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -142,5 +142,5 @@
|
|
|
142
142
|
"access": "public"
|
|
143
143
|
},
|
|
144
144
|
"license": "MIT",
|
|
145
|
-
"gitHead": "
|
|
145
|
+
"gitHead": "d1a0a8a7e4dac01808b43f8bf3c9cafab6798e8d"
|
|
146
146
|
}
|
|
@@ -1,302 +0,0 @@
|
|
|
1
|
-
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
-
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
4
|
-
var __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {
|
|
5
|
-
function adopt(value) {
|
|
6
|
-
return value instanceof P ? value : new P(function (resolve) {
|
|
7
|
-
resolve(value);
|
|
8
|
-
});
|
|
9
|
-
}
|
|
10
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
11
|
-
function fulfilled(value) {
|
|
12
|
-
try {
|
|
13
|
-
step(generator.next(value));
|
|
14
|
-
} catch (e) {
|
|
15
|
-
reject(e);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
function rejected(value) {
|
|
19
|
-
try {
|
|
20
|
-
step(generator["throw"](value));
|
|
21
|
-
} catch (e) {
|
|
22
|
-
reject(e);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
function step(result) {
|
|
26
|
-
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
27
|
-
}
|
|
28
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
import * as React from 'react';
|
|
32
|
-
import Notification from 'rc-notification';
|
|
33
|
-
import CloseOutlined from "@ant-design/icons/es/icons/CloseOutlined";
|
|
34
|
-
import classNames from 'classnames';
|
|
35
|
-
import CheckCircleOutlined from "@ant-design/icons/es/icons/CheckCircleOutlined";
|
|
36
|
-
import CloseCircleOutlined from "@ant-design/icons/es/icons/CloseCircleOutlined";
|
|
37
|
-
import ExclamationCircleOutlined from "@ant-design/icons/es/icons/ExclamationCircleOutlined";
|
|
38
|
-
import InfoCircleOutlined from "@ant-design/icons/es/icons/InfoCircleOutlined";
|
|
39
|
-
import createUseNotification from './hooks/useNotification';
|
|
40
|
-
import ConfigProvider, { globalConfig } from '../config-provider';
|
|
41
|
-
var notificationInstance = {};
|
|
42
|
-
var defaultDuration = 4.5;
|
|
43
|
-
var defaultTop = 24;
|
|
44
|
-
var defaultBottom = 24;
|
|
45
|
-
var defaultPrefixCls = '';
|
|
46
|
-
var defaultPlacement = 'topRight';
|
|
47
|
-
var defaultGetContainer;
|
|
48
|
-
var defaultCloseIcon;
|
|
49
|
-
var rtl = false;
|
|
50
|
-
var maxCount;
|
|
51
|
-
function setNotificationConfig(options) {
|
|
52
|
-
var duration = options.duration,
|
|
53
|
-
placement = options.placement,
|
|
54
|
-
bottom = options.bottom,
|
|
55
|
-
top = options.top,
|
|
56
|
-
getContainer = options.getContainer,
|
|
57
|
-
closeIcon = options.closeIcon,
|
|
58
|
-
prefixCls = options.prefixCls;
|
|
59
|
-
if (prefixCls !== undefined) {
|
|
60
|
-
defaultPrefixCls = prefixCls;
|
|
61
|
-
}
|
|
62
|
-
if (duration !== undefined) {
|
|
63
|
-
defaultDuration = duration;
|
|
64
|
-
}
|
|
65
|
-
if (placement !== undefined) {
|
|
66
|
-
defaultPlacement = placement;
|
|
67
|
-
} else if (options.rtl) {
|
|
68
|
-
defaultPlacement = 'topLeft';
|
|
69
|
-
}
|
|
70
|
-
if (bottom !== undefined) {
|
|
71
|
-
defaultBottom = bottom;
|
|
72
|
-
}
|
|
73
|
-
if (top !== undefined) {
|
|
74
|
-
defaultTop = top;
|
|
75
|
-
}
|
|
76
|
-
if (getContainer !== undefined) {
|
|
77
|
-
defaultGetContainer = getContainer;
|
|
78
|
-
}
|
|
79
|
-
if (closeIcon !== undefined) {
|
|
80
|
-
defaultCloseIcon = closeIcon;
|
|
81
|
-
}
|
|
82
|
-
if (options.rtl !== undefined) {
|
|
83
|
-
rtl = options.rtl;
|
|
84
|
-
}
|
|
85
|
-
if (options.maxCount !== undefined) {
|
|
86
|
-
maxCount = options.maxCount;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function getPlacementStyle(placement) {
|
|
90
|
-
var top = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultTop;
|
|
91
|
-
var bottom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultBottom;
|
|
92
|
-
var style;
|
|
93
|
-
switch (placement) {
|
|
94
|
-
case 'top':
|
|
95
|
-
style = {
|
|
96
|
-
left: '50%',
|
|
97
|
-
transform: 'translateX(-50%)',
|
|
98
|
-
right: 'auto',
|
|
99
|
-
top: top,
|
|
100
|
-
bottom: 'auto'
|
|
101
|
-
};
|
|
102
|
-
break;
|
|
103
|
-
case 'topLeft':
|
|
104
|
-
style = {
|
|
105
|
-
left: 0,
|
|
106
|
-
top: top,
|
|
107
|
-
bottom: 'auto'
|
|
108
|
-
};
|
|
109
|
-
break;
|
|
110
|
-
case 'topRight':
|
|
111
|
-
style = {
|
|
112
|
-
right: 0,
|
|
113
|
-
top: top,
|
|
114
|
-
bottom: 'auto'
|
|
115
|
-
};
|
|
116
|
-
break;
|
|
117
|
-
case 'bottom':
|
|
118
|
-
style = {
|
|
119
|
-
left: '50%',
|
|
120
|
-
transform: 'translateX(-50%)',
|
|
121
|
-
right: 'auto',
|
|
122
|
-
top: 'auto',
|
|
123
|
-
bottom: bottom
|
|
124
|
-
};
|
|
125
|
-
break;
|
|
126
|
-
case 'bottomLeft':
|
|
127
|
-
style = {
|
|
128
|
-
left: 0,
|
|
129
|
-
top: 'auto',
|
|
130
|
-
bottom: bottom
|
|
131
|
-
};
|
|
132
|
-
break;
|
|
133
|
-
default:
|
|
134
|
-
style = {
|
|
135
|
-
right: 0,
|
|
136
|
-
top: 'auto',
|
|
137
|
-
bottom: bottom
|
|
138
|
-
};
|
|
139
|
-
break;
|
|
140
|
-
}
|
|
141
|
-
return style;
|
|
142
|
-
}
|
|
143
|
-
function getNotificationInstance(args, callback) {
|
|
144
|
-
var _args$placement = args.placement,
|
|
145
|
-
placement = _args$placement === void 0 ? defaultPlacement : _args$placement,
|
|
146
|
-
top = args.top,
|
|
147
|
-
bottom = args.bottom,
|
|
148
|
-
_args$getContainer = args.getContainer,
|
|
149
|
-
getContainer = _args$getContainer === void 0 ? defaultGetContainer : _args$getContainer,
|
|
150
|
-
customizePrefixCls = args.prefixCls;
|
|
151
|
-
var _globalConfig = globalConfig(),
|
|
152
|
-
getPrefixCls = _globalConfig.getPrefixCls,
|
|
153
|
-
getIconPrefixCls = _globalConfig.getIconPrefixCls;
|
|
154
|
-
var prefixCls = getPrefixCls('notification', customizePrefixCls || defaultPrefixCls);
|
|
155
|
-
var iconPrefixCls = getIconPrefixCls();
|
|
156
|
-
var cacheKey = "".concat(prefixCls, "-").concat(placement);
|
|
157
|
-
var cacheInstance = notificationInstance[cacheKey];
|
|
158
|
-
if (cacheInstance) {
|
|
159
|
-
Promise.resolve(cacheInstance).then(function (instance) {
|
|
160
|
-
callback({
|
|
161
|
-
prefixCls: "".concat(prefixCls, "-notice"),
|
|
162
|
-
iconPrefixCls: iconPrefixCls,
|
|
163
|
-
instance: instance
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
return;
|
|
167
|
-
}
|
|
168
|
-
var notificationClass = classNames("".concat(prefixCls, "-").concat(placement), _defineProperty({}, "".concat(prefixCls, "-rtl"), rtl === true));
|
|
169
|
-
notificationInstance[cacheKey] = new Promise(function (resolve) {
|
|
170
|
-
Notification.newInstance({
|
|
171
|
-
prefixCls: prefixCls,
|
|
172
|
-
className: notificationClass,
|
|
173
|
-
style: getPlacementStyle(placement, top, bottom),
|
|
174
|
-
getContainer: getContainer,
|
|
175
|
-
maxCount: maxCount
|
|
176
|
-
}, function (notification) {
|
|
177
|
-
resolve(notification);
|
|
178
|
-
callback({
|
|
179
|
-
prefixCls: "".concat(prefixCls, "-notice"),
|
|
180
|
-
iconPrefixCls: iconPrefixCls,
|
|
181
|
-
instance: notification
|
|
182
|
-
});
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
var typeToIcon = {
|
|
187
|
-
success: CheckCircleOutlined,
|
|
188
|
-
info: InfoCircleOutlined,
|
|
189
|
-
error: CloseCircleOutlined,
|
|
190
|
-
warning: ExclamationCircleOutlined
|
|
191
|
-
};
|
|
192
|
-
function getRCNoticeProps(args, prefixCls, iconPrefixCls) {
|
|
193
|
-
var durationArg = args.duration,
|
|
194
|
-
icon = args.icon,
|
|
195
|
-
type = args.type,
|
|
196
|
-
description = args.description,
|
|
197
|
-
message = args.message,
|
|
198
|
-
btn = args.btn,
|
|
199
|
-
onClose = args.onClose,
|
|
200
|
-
onClick = args.onClick,
|
|
201
|
-
key = args.key,
|
|
202
|
-
style = args.style,
|
|
203
|
-
className = args.className,
|
|
204
|
-
_args$closeIcon = args.closeIcon,
|
|
205
|
-
closeIcon = _args$closeIcon === void 0 ? defaultCloseIcon : _args$closeIcon;
|
|
206
|
-
var duration = durationArg === undefined ? defaultDuration : durationArg;
|
|
207
|
-
var iconNode = null;
|
|
208
|
-
if (icon) {
|
|
209
|
-
iconNode = /*#__PURE__*/React.createElement("span", {
|
|
210
|
-
className: "".concat(prefixCls, "-icon")
|
|
211
|
-
}, args.icon);
|
|
212
|
-
} else if (type) {
|
|
213
|
-
iconNode = /*#__PURE__*/React.createElement(typeToIcon[type] || null, {
|
|
214
|
-
className: "".concat(prefixCls, "-icon ").concat(prefixCls, "-icon-").concat(type)
|
|
215
|
-
});
|
|
216
|
-
}
|
|
217
|
-
var closeIconToRender = /*#__PURE__*/React.createElement("span", {
|
|
218
|
-
className: "".concat(prefixCls, "-close-x")
|
|
219
|
-
}, closeIcon || /*#__PURE__*/React.createElement(CloseOutlined, {
|
|
220
|
-
className: "".concat(prefixCls, "-close-icon")
|
|
221
|
-
}));
|
|
222
|
-
var autoMarginTag = !description && iconNode ? /*#__PURE__*/React.createElement("span", {
|
|
223
|
-
className: "".concat(prefixCls, "-message-single-line-auto-margin")
|
|
224
|
-
}) : null;
|
|
225
|
-
return {
|
|
226
|
-
content: /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
227
|
-
iconPrefixCls: iconPrefixCls
|
|
228
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
229
|
-
className: iconNode ? "".concat(prefixCls, "-with-icon") : '',
|
|
230
|
-
role: "alert"
|
|
231
|
-
}, iconNode, /*#__PURE__*/React.createElement("div", {
|
|
232
|
-
className: "".concat(prefixCls, "-message")
|
|
233
|
-
}, autoMarginTag, message), /*#__PURE__*/React.createElement("div", {
|
|
234
|
-
className: "".concat(prefixCls, "-description")
|
|
235
|
-
}, description), btn ? /*#__PURE__*/React.createElement("span", {
|
|
236
|
-
className: "".concat(prefixCls, "-btn")
|
|
237
|
-
}, btn) : null)),
|
|
238
|
-
duration: duration,
|
|
239
|
-
closable: true,
|
|
240
|
-
closeIcon: closeIconToRender,
|
|
241
|
-
onClose: onClose,
|
|
242
|
-
onClick: onClick,
|
|
243
|
-
key: key,
|
|
244
|
-
style: style || {},
|
|
245
|
-
className: classNames(className, _defineProperty({}, "".concat(prefixCls, "-").concat(type), !!type))
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
function notice(args) {
|
|
249
|
-
getNotificationInstance(args, function (_ref) {
|
|
250
|
-
var prefixCls = _ref.prefixCls,
|
|
251
|
-
iconPrefixCls = _ref.iconPrefixCls,
|
|
252
|
-
instance = _ref.instance;
|
|
253
|
-
instance.notice(getRCNoticeProps(args, prefixCls, iconPrefixCls));
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
var api = {
|
|
257
|
-
open: notice,
|
|
258
|
-
close: function close(key) {
|
|
259
|
-
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
260
|
-
return Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
261
|
-
instance.removeNotice(key);
|
|
262
|
-
});
|
|
263
|
-
});
|
|
264
|
-
},
|
|
265
|
-
config: setNotificationConfig,
|
|
266
|
-
destroy: function destroy() {
|
|
267
|
-
Object.keys(notificationInstance).forEach(function (cacheKey) {
|
|
268
|
-
Promise.resolve(notificationInstance[cacheKey]).then(function (instance) {
|
|
269
|
-
instance.destroy();
|
|
270
|
-
});
|
|
271
|
-
delete notificationInstance[cacheKey]; // lgtm[js/missing-await]
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
};
|
|
275
|
-
|
|
276
|
-
['success', 'info', 'warning', 'error'].forEach(function (type) {
|
|
277
|
-
api[type] = function (args) {
|
|
278
|
-
return api.open(_extends(_extends({}, args), {
|
|
279
|
-
type: type
|
|
280
|
-
}));
|
|
281
|
-
};
|
|
282
|
-
});
|
|
283
|
-
api.warn = api.warning;
|
|
284
|
-
api.useNotification = createUseNotification(getNotificationInstance, getRCNoticeProps);
|
|
285
|
-
/** @private test Only function. Not work on production */
|
|
286
|
-
|
|
287
|
-
export var getInstance = function getInstance(cacheKey) {
|
|
288
|
-
return __awaiter(void 0, void 0, void 0, /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
289
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
290
|
-
while (1) {
|
|
291
|
-
switch (_context.prev = _context.next) {
|
|
292
|
-
case 0:
|
|
293
|
-
return _context.abrupt("return", process.env.NODE_ENV === 'test' ? notificationInstance[cacheKey] : null);
|
|
294
|
-
case 1:
|
|
295
|
-
case "end":
|
|
296
|
-
return _context.stop();
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}, _callee);
|
|
300
|
-
}));
|
|
301
|
-
};
|
|
302
|
-
export default api;
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
2
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
3
|
-
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
4
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
5
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
6
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
7
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
8
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
9
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
10
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
|
-
var __rest = this && this.__rest || function (s, e) {
|
|
12
|
-
var t = {};
|
|
13
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
|
|
14
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
15
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
|
|
16
|
-
}
|
|
17
|
-
return t;
|
|
18
|
-
};
|
|
19
|
-
// @ts-nocheck
|
|
20
|
-
import * as React from 'react';
|
|
21
|
-
import classNames from 'classnames';
|
|
22
|
-
import RcCascader from '../rc-cascader';
|
|
23
|
-
import omit from 'rc-util/lib/omit';
|
|
24
|
-
import RightOutlined from '@ant-design/icons/RightOutlined';
|
|
25
|
-
import LoadingOutlined from '@ant-design/icons/LoadingOutlined';
|
|
26
|
-
import LeftOutlined from '@ant-design/icons/LeftOutlined';
|
|
27
|
-
import { useContext } from 'react';
|
|
28
|
-
import devWarning from '../../Antd4/_util/devWarning';
|
|
29
|
-
import { ConfigContext } from '../../Antd4/config-provider';
|
|
30
|
-
import SizeContext from '../../Antd4/config-provider/SizeContext';
|
|
31
|
-
import getIcons from '../../Antd4/select/utils/iconUtil';
|
|
32
|
-
import { getTransitionName, getTransitionDirection } from '../../Antd4/_util/motion';
|
|
33
|
-
import { FormItemInputContext } from '../../Antd4/form4-24-7/context';
|
|
34
|
-
import { getMergedStatus, getStatusClassNames } from '../../Antd4/_util/statusUtils';
|
|
35
|
-
var SHOW_CHILD = RcCascader.SHOW_CHILD,
|
|
36
|
-
SHOW_PARENT = RcCascader.SHOW_PARENT;
|
|
37
|
-
function highlightKeyword(str, lowerKeyword, prefixCls) {
|
|
38
|
-
var cells = str.toLowerCase().split(lowerKeyword).reduce(function (list, cur, index) {
|
|
39
|
-
return index === 0 ? [cur] : [].concat(_toConsumableArray(list), [lowerKeyword, cur]);
|
|
40
|
-
}, []);
|
|
41
|
-
var fillCells = [];
|
|
42
|
-
var start = 0;
|
|
43
|
-
cells.forEach(function (cell, index) {
|
|
44
|
-
var end = start + cell.length;
|
|
45
|
-
var originWorld = str.slice(start, end);
|
|
46
|
-
start = end;
|
|
47
|
-
if (index % 2 === 1) {
|
|
48
|
-
originWorld =
|
|
49
|
-
/*#__PURE__*/
|
|
50
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
51
|
-
React.createElement("span", {
|
|
52
|
-
className: "".concat(prefixCls, "-menu-item-keyword"),
|
|
53
|
-
key: "seperator-".concat(index)
|
|
54
|
-
}, originWorld);
|
|
55
|
-
}
|
|
56
|
-
fillCells.push(originWorld);
|
|
57
|
-
});
|
|
58
|
-
return fillCells;
|
|
59
|
-
}
|
|
60
|
-
var defaultSearchRender = function defaultSearchRender(inputValue, path, prefixCls, fieldNames) {
|
|
61
|
-
var optionList = [];
|
|
62
|
-
// We do lower here to save perf
|
|
63
|
-
var lower = inputValue.toLowerCase();
|
|
64
|
-
path.forEach(function (node, index) {
|
|
65
|
-
if (index !== 0) {
|
|
66
|
-
optionList.push(' / ');
|
|
67
|
-
}
|
|
68
|
-
var label = node[fieldNames.label];
|
|
69
|
-
var type = _typeof(label);
|
|
70
|
-
if (type === 'string' || type === 'number') {
|
|
71
|
-
label = highlightKeyword(String(label), lower, prefixCls);
|
|
72
|
-
}
|
|
73
|
-
optionList.push(label);
|
|
74
|
-
});
|
|
75
|
-
return optionList;
|
|
76
|
-
};
|
|
77
|
-
var Cascader = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
78
|
-
var _classNames2;
|
|
79
|
-
var customizePrefixCls = props.prefixCls,
|
|
80
|
-
customizeSize = props.size,
|
|
81
|
-
className = props.className,
|
|
82
|
-
multiple = props.multiple,
|
|
83
|
-
_props$bordered = props.bordered,
|
|
84
|
-
bordered = _props$bordered === void 0 ? true : _props$bordered,
|
|
85
|
-
transitionName = props.transitionName,
|
|
86
|
-
_props$choiceTransiti = props.choiceTransitionName,
|
|
87
|
-
choiceTransitionName = _props$choiceTransiti === void 0 ? '' : _props$choiceTransiti,
|
|
88
|
-
popupClassName = props.popupClassName,
|
|
89
|
-
dropdownClassName = props.dropdownClassName,
|
|
90
|
-
expandIcon = props.expandIcon,
|
|
91
|
-
placement = props.placement,
|
|
92
|
-
showSearch = props.showSearch,
|
|
93
|
-
_props$allowClear = props.allowClear,
|
|
94
|
-
allowClear = _props$allowClear === void 0 ? true : _props$allowClear,
|
|
95
|
-
notFoundContent = props.notFoundContent,
|
|
96
|
-
direction = props.direction,
|
|
97
|
-
getPopupContainer = props.getPopupContainer,
|
|
98
|
-
customStatus = props.status,
|
|
99
|
-
showArrow = props.showArrow,
|
|
100
|
-
rest = __rest(props, ["prefixCls", "size", "className", "multiple", "bordered", "transitionName", "choiceTransitionName", "popupClassName", "dropdownClassName", "expandIcon", "placement", "showSearch", "allowClear", "notFoundContent", "direction", "getPopupContainer", "status", "showArrow"]);
|
|
101
|
-
var restProps = omit(rest, ['suffixIcon']);
|
|
102
|
-
var _useContext = useContext(ConfigContext),
|
|
103
|
-
getContextPopupContainer = _useContext.getPopupContainer,
|
|
104
|
-
getPrefixCls = _useContext.getPrefixCls,
|
|
105
|
-
renderEmpty = _useContext.renderEmpty,
|
|
106
|
-
rootDirection = _useContext.direction;
|
|
107
|
-
var mergedDirection = direction || rootDirection;
|
|
108
|
-
var isRtl = mergedDirection === 'rtl';
|
|
109
|
-
// =================== Form =====================
|
|
110
|
-
var _useContext2 = useContext(FormItemInputContext),
|
|
111
|
-
contextStatus = _useContext2.status,
|
|
112
|
-
hasFeedback = _useContext2.hasFeedback,
|
|
113
|
-
isFormItemInput = _useContext2.isFormItemInput,
|
|
114
|
-
feedbackIcon = _useContext2.feedbackIcon;
|
|
115
|
-
var mergedStatus = getMergedStatus(contextStatus, customStatus);
|
|
116
|
-
// =================== Warning =====================
|
|
117
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
118
|
-
devWarning(popupClassName === undefined, 'Cascader', '`popupClassName` is deprecated. Please use `dropdownClassName` instead.');
|
|
119
|
-
devWarning(!multiple || !props.displayRender, 'Cascader', '`displayRender` not work on `multiple`. Please use `tagRender` instead.');
|
|
120
|
-
}
|
|
121
|
-
// =================== No Found ====================
|
|
122
|
-
var mergedNotFoundContent = notFoundContent || renderEmpty('Cascader');
|
|
123
|
-
// ==================== Prefix =====================
|
|
124
|
-
var rootPrefixCls = getPrefixCls();
|
|
125
|
-
var prefixCls = getPrefixCls('select', customizePrefixCls);
|
|
126
|
-
var cascaderPrefixCls = getPrefixCls('cascader', customizePrefixCls);
|
|
127
|
-
// =================== Dropdown ====================
|
|
128
|
-
var mergedDropdownClassName = classNames(dropdownClassName || popupClassName, "".concat(cascaderPrefixCls, "-dropdown"), _defineProperty({}, "".concat(cascaderPrefixCls, "-dropdown-rtl"), mergedDirection === 'rtl'));
|
|
129
|
-
// ==================== Search =====================
|
|
130
|
-
var mergedShowSearch = React.useMemo(function () {
|
|
131
|
-
if (!showSearch) {
|
|
132
|
-
return showSearch;
|
|
133
|
-
}
|
|
134
|
-
var searchConfig = {
|
|
135
|
-
render: defaultSearchRender
|
|
136
|
-
};
|
|
137
|
-
if (_typeof(showSearch) === 'object') {
|
|
138
|
-
searchConfig = Object.assign(Object.assign({}, searchConfig), showSearch);
|
|
139
|
-
}
|
|
140
|
-
return searchConfig;
|
|
141
|
-
}, [showSearch]);
|
|
142
|
-
// ===================== Size ======================
|
|
143
|
-
var size = React.useContext(SizeContext);
|
|
144
|
-
var mergedSize = customizeSize || size;
|
|
145
|
-
// ===================== Icon ======================
|
|
146
|
-
var mergedExpandIcon = expandIcon;
|
|
147
|
-
if (!expandIcon) {
|
|
148
|
-
mergedExpandIcon = isRtl ? /*#__PURE__*/React.createElement(LeftOutlined, null) : /*#__PURE__*/React.createElement(RightOutlined, null);
|
|
149
|
-
}
|
|
150
|
-
var loadingIcon = /*#__PURE__*/React.createElement("span", {
|
|
151
|
-
className: "".concat(prefixCls, "-menu-item-loading-icon")
|
|
152
|
-
}, /*#__PURE__*/React.createElement(LoadingOutlined, {
|
|
153
|
-
spin: true
|
|
154
|
-
}));
|
|
155
|
-
// =================== Multiple ====================
|
|
156
|
-
var checkable = React.useMemo(function () {
|
|
157
|
-
return multiple ? /*#__PURE__*/React.createElement("span", {
|
|
158
|
-
className: "".concat(cascaderPrefixCls, "-checkbox-inner")
|
|
159
|
-
}) : false;
|
|
160
|
-
}, [multiple]);
|
|
161
|
-
// ===================== Icons =====================
|
|
162
|
-
var mergedShowArrow = showArrow !== undefined ? showArrow : props.loading || !multiple;
|
|
163
|
-
var _getIcons = getIcons(Object.assign(Object.assign({}, props), {
|
|
164
|
-
hasFeedback: hasFeedback,
|
|
165
|
-
feedbackIcon: feedbackIcon,
|
|
166
|
-
showArrow: mergedShowArrow,
|
|
167
|
-
multiple: multiple,
|
|
168
|
-
prefixCls: prefixCls
|
|
169
|
-
})),
|
|
170
|
-
suffixIcon = _getIcons.suffixIcon,
|
|
171
|
-
removeIcon = _getIcons.removeIcon,
|
|
172
|
-
clearIcon = _getIcons.clearIcon;
|
|
173
|
-
// ===================== Placement =====================
|
|
174
|
-
var getPlacement = function getPlacement() {
|
|
175
|
-
if (placement !== undefined) {
|
|
176
|
-
return placement;
|
|
177
|
-
}
|
|
178
|
-
return direction === 'rtl' ? 'bottomRight' : 'bottomLeft';
|
|
179
|
-
};
|
|
180
|
-
// ==================== Render =====================
|
|
181
|
-
return /*#__PURE__*/React.createElement(RcCascader, Object.assign({
|
|
182
|
-
prefixCls: prefixCls,
|
|
183
|
-
className: classNames(!customizePrefixCls && cascaderPrefixCls, (_classNames2 = {}, _defineProperty(_classNames2, "".concat(prefixCls, "-lg"), mergedSize === 'large'), _defineProperty(_classNames2, "".concat(prefixCls, "-sm"), mergedSize === 'small'), _defineProperty(_classNames2, "".concat(prefixCls, "-rtl"), isRtl), _defineProperty(_classNames2, "".concat(prefixCls, "-borderless"), !bordered), _defineProperty(_classNames2, "".concat(prefixCls, "-in-form-item"), isFormItemInput), _classNames2), getStatusClassNames(prefixCls, mergedStatus, hasFeedback), className)
|
|
184
|
-
}, restProps, {
|
|
185
|
-
direction: mergedDirection,
|
|
186
|
-
placement: getPlacement(),
|
|
187
|
-
notFoundContent: mergedNotFoundContent,
|
|
188
|
-
allowClear: allowClear,
|
|
189
|
-
showSearch: mergedShowSearch,
|
|
190
|
-
expandIcon: mergedExpandIcon,
|
|
191
|
-
inputIcon: suffixIcon,
|
|
192
|
-
removeIcon: removeIcon,
|
|
193
|
-
clearIcon: clearIcon,
|
|
194
|
-
loadingIcon: loadingIcon,
|
|
195
|
-
checkable: checkable,
|
|
196
|
-
dropdownClassName: mergedDropdownClassName,
|
|
197
|
-
dropdownPrefixCls: customizePrefixCls || cascaderPrefixCls,
|
|
198
|
-
choiceTransitionName: getTransitionName(rootPrefixCls, '', choiceTransitionName),
|
|
199
|
-
transitionName: getTransitionName(rootPrefixCls, getTransitionDirection(placement), transitionName),
|
|
200
|
-
getPopupContainer: getPopupContainer || getContextPopupContainer,
|
|
201
|
-
ref: ref,
|
|
202
|
-
showArrow: hasFeedback || showArrow
|
|
203
|
-
}));
|
|
204
|
-
});
|
|
205
|
-
Cascader.displayName = 'Cascader';
|
|
206
|
-
Cascader.SHOW_PARENT = SHOW_PARENT;
|
|
207
|
-
Cascader.SHOW_CHILD = SHOW_CHILD;
|
|
208
|
-
export default Cascader;
|
package/lib/Cascaders/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError("Cannot destructure " + obj); }
|
|
2
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
3
|
-
import React, { forwardRef } from "react";
|
|
4
|
-
import Cascader from "./Cascader";
|
|
5
|
-
import "antd/es/cascader/style/index.less";
|
|
6
|
-
import "../Antd4/cascader/style/index.less";
|
|
7
|
-
import classnames from "classnames";
|
|
8
|
-
import { cloneComProps } from "../utils";
|
|
9
|
-
import "./index.less";
|
|
10
|
-
var Cascaders = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
11
|
-
var rest = _extends({}, (_objectDestructuringEmpty(props), props));
|
|
12
|
-
return /*#__PURE__*/React.createElement(Cascader, _extends({
|
|
13
|
-
ref: ref
|
|
14
|
-
}, rest));
|
|
15
|
-
});
|
|
16
|
-
cloneComProps(Cascader, Cascaders);
|
|
17
|
-
export default Cascaders;
|
package/lib/Cascaders/index.less
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
@import '../Cascader/index.less';
|