@chaoswise/ui 2.5.0 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CWCascader/rc-cascader/Cascader.js +3 -3
- package/lib/CWCascader/rc-cascader/OptionList/index.js +1 -1
- package/lib/CWCascader/rc-cascader/OptionList/useActive.js +1 -1
- package/lib/CWCascader/rc-cascader/OptionList/useKeyboard.js +1 -1
- package/lib/CWCascader/rc-cascader/hooks/useEntities.js +1 -1
- package/lib/CWTree/index.js +10 -5
- package/lib/ConfigProvider/useLocale.js +2 -1
- package/lib/Mention/index.js +3 -3
- package/lib/Menu/index.js +0 -8
- package/lib/Select/index.js +3 -4
- package/lib/Tree/index.js +3 -4
- package/package.json +5 -2
|
@@ -12,9 +12,9 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
14
14
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
15
|
-
import { BaseSelect } from "rc-cascader
|
|
16
|
-
import useId from "rc-cascader/
|
|
17
|
-
import { conductCheck } from "rc-cascader/
|
|
15
|
+
import { BaseSelect } from "rc-select-cascader";
|
|
16
|
+
import useId from "rc-select-cascader/lib/hooks/useId";
|
|
17
|
+
import { conductCheck } from "rc-tree-cascader/lib/utils/conductUtil";
|
|
18
18
|
import useMergedState from "rc-util/lib/hooks/useMergedState";
|
|
19
19
|
import * as React from "react";
|
|
20
20
|
import CascaderContext from "./context";
|
|
@@ -17,7 +17,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
17
17
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
18
18
|
/* eslint-disable default-case */
|
|
19
19
|
import classNames from 'classnames';
|
|
20
|
-
import { useBaseProps } from 'rc-cascader
|
|
20
|
+
import { useBaseProps } from 'rc-select-cascader';
|
|
21
21
|
import * as React from 'react';
|
|
22
22
|
import CascaderContext from '../context';
|
|
23
23
|
import { getFullPathKeys, isLeaf, scrollIntoParentView, toPathKey, toPathKeys, toPathValueStr } from '../utils/commonUtil';
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import * as React from 'react';
|
|
8
8
|
import CascaderContext from '../context';
|
|
9
|
-
import { useBaseProps } from 'rc-cascader
|
|
9
|
+
import { useBaseProps } from 'rc-select-cascader';
|
|
10
10
|
/**
|
|
11
11
|
* Control the active open options path.
|
|
12
12
|
*/
|
|
@@ -8,7 +8,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
8
|
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; }
|
|
9
9
|
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; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import { useBaseProps } from 'rc-cascader
|
|
11
|
+
import { useBaseProps } from 'rc-select-cascader';
|
|
12
12
|
import KeyCode from 'rc-util/lib/KeyCode';
|
|
13
13
|
import * as React from 'react';
|
|
14
14
|
import { SEARCH_MARK } from '../hooks/useSearchOptions';
|
|
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import * as React from 'react';
|
|
8
|
-
import { convertDataToEntities } from 'rc-cascader/
|
|
8
|
+
import { convertDataToEntities } from 'rc-tree-cascader/lib/utils/treeUtil';
|
|
9
9
|
import { VALUE_SPLIT } from '../utils/commonUtil';
|
|
10
10
|
/** Lazy parse options data into conduct-able info to avoid perf issue in single mode */
|
|
11
11
|
export default (function (options, fieldNames) {
|
package/lib/CWTree/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import _useLocale2 from "@chaoswise/ui/lib/useLocale";
|
|
|
9
9
|
import _Menu from "@chaoswise/ui/lib/Menu";
|
|
10
10
|
import "antd/es/tree/style";
|
|
11
11
|
import _Tree from "antd/es/tree";
|
|
12
|
-
var _excluded = ["children", "treeData", "menuData", "extendType", "onClickMenu", "menuStyle", "menuRender", "extraFooter", "tooltipPlacement", "searchValue", "multiple", "selectedKeys", "defaultSelectedKeys", "onSelect", "searchHighlight", "draggable", "isDrawer", "searchHighlightStyle", "className", "caseSensitive", "onExpand", "renderItem"],
|
|
12
|
+
var _excluded = ["children", "treeData", "menuData", "extendType", "onClickMenu", "menuStyle", "menuRender", "extraFooter", "tooltipPlacement", "searchValue", "multiple", "selectedKeys", "defaultSelectedKeys", "onSelect", "searchHighlight", "draggable", "isDrawer", "searchHighlightStyle", "className", "caseSensitive", "onExpand", "renderItem", "useTooltipText"],
|
|
13
13
|
_excluded2 = ["icon", "title", "key", "children"];
|
|
14
14
|
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); }
|
|
15
15
|
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; }
|
|
@@ -77,6 +77,8 @@ function CWTree(_ref) {
|
|
|
77
77
|
_ref$onExpand = _ref.onExpand,
|
|
78
78
|
onExpand = _ref$onExpand === void 0 ? function () {} : _ref$onExpand,
|
|
79
79
|
renderItem = _ref.renderItem,
|
|
80
|
+
_ref$useTooltipText = _ref.useTooltipText,
|
|
81
|
+
useTooltipText = _ref$useTooltipText === void 0 ? true : _ref$useTooltipText,
|
|
80
82
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
81
83
|
var _useState = useState(""),
|
|
82
84
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -120,6 +122,9 @@ function CWTree(_ref) {
|
|
|
120
122
|
if (!treeData) {
|
|
121
123
|
return [];
|
|
122
124
|
}
|
|
125
|
+
if (!searchHighlight) {
|
|
126
|
+
return treeData;
|
|
127
|
+
}
|
|
123
128
|
return createTree(treeData, searchValue, caseSensitive, rest.checkable);
|
|
124
129
|
}, [searchHighlight, treeData, searchValue, rest.checkable, caseSensitive]);
|
|
125
130
|
function buildMenu(array) {
|
|
@@ -195,9 +200,9 @@ function CWTree(_ref) {
|
|
|
195
200
|
className: "cw-tree-treenode-content"
|
|
196
201
|
}, /*#__PURE__*/React.createElement("span", {
|
|
197
202
|
className: "cw-tree-treenode-title"
|
|
198
|
-
}, /*#__PURE__*/React.createElement(_TooltipText, {
|
|
203
|
+
}, useTooltipText ? /*#__PURE__*/React.createElement(_TooltipText, {
|
|
199
204
|
placement: tooltipPlacement ? tooltipPlacement : "bottomLeft"
|
|
200
|
-
}, title)), isDrawer && draggable && _showExtend === key && /*#__PURE__*/React.createElement("span", {
|
|
205
|
+
}, title) : title), isDrawer && draggable && _showExtend === key && /*#__PURE__*/React.createElement("span", {
|
|
201
206
|
className: classnames("cw-tree-treenode-drag-icon")
|
|
202
207
|
}, /*#__PURE__*/React.createElement(_Tooltip, {
|
|
203
208
|
title: formatMessage(localeObj["dragMove"])
|
|
@@ -251,10 +256,10 @@ function CWTree(_ref) {
|
|
|
251
256
|
className: "cw-tree-treenode-content"
|
|
252
257
|
}, /*#__PURE__*/React.createElement("span", {
|
|
253
258
|
className: "cw-tree-treenode-title"
|
|
254
|
-
}, /*#__PURE__*/React.createElement(_TooltipText, {
|
|
259
|
+
}, useTooltipText ? /*#__PURE__*/React.createElement(_TooltipText, {
|
|
255
260
|
title: title,
|
|
256
261
|
placement: "top"
|
|
257
|
-
}, _title))),
|
|
262
|
+
}, _title) : _title)),
|
|
258
263
|
originTitle: title,
|
|
259
264
|
key: key
|
|
260
265
|
}, props), children && creatTreeNode(children));
|
|
@@ -2,7 +2,8 @@ import { useContext } from 'react';
|
|
|
2
2
|
import { intlContext } from './ConfigProvider';
|
|
3
3
|
var useLocale = function useLocale() {
|
|
4
4
|
var _useContext = useContext(intlContext),
|
|
5
|
-
locale = _useContext.locale,
|
|
5
|
+
_useContext$locale = _useContext.locale,
|
|
6
|
+
locale = _useContext$locale === void 0 ? "zh_CN" : _useContext$locale,
|
|
6
7
|
setLocale = _useContext.setLocale,
|
|
7
8
|
locales = _useContext.locales;
|
|
8
9
|
return {
|
package/lib/Mention/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import "antd/es/
|
|
2
|
-
import
|
|
3
|
-
export default
|
|
1
|
+
import "antd/es/mention/style";
|
|
2
|
+
import _Mention from "antd/es/mention";
|
|
3
|
+
export default _Mention;
|
package/lib/Menu/index.js
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
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); }
|
|
2
|
-
/*
|
|
3
|
-
* @Author: andrew.qiao andrew.qiao@cloudwise.com
|
|
4
|
-
* @Date: 2022-05-19 18:52:13
|
|
5
|
-
* @LastEditors: andrew.qiao andrew.qiao@cloudwise.com
|
|
6
|
-
* @LastEditTime: 2023-02-28 16:26:57
|
|
7
|
-
* @FilePath: /change_01/aops_web_commons/packages/ui/components/Menu/index.js
|
|
8
|
-
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
9
|
-
*/
|
|
10
2
|
import React, { forwardRef } from "react";
|
|
11
3
|
import Menu from "./menu";
|
|
12
4
|
import 'antd/es/menu/style/index.less';
|
package/lib/Select/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "antd/es/
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export default _TreeSelect;
|
|
1
|
+
import "antd/es/select/style";
|
|
2
|
+
import _Select from "antd/es/select";
|
|
3
|
+
export default _Select;
|
package/lib/Tree/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import "antd/es/tree
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export default _TreeSelect;
|
|
1
|
+
import "antd/es/tree/style";
|
|
2
|
+
import _Tree from "antd/es/tree";
|
|
3
|
+
export default _Tree;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chaoswise/ui",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.2",
|
|
4
4
|
"description": "公共UI库",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui",
|
|
@@ -92,10 +92,13 @@
|
|
|
92
92
|
"rc-cascader": "~3.9.0",
|
|
93
93
|
"rc-field-form": "~1.27.0",
|
|
94
94
|
"rc-input-number": "~7.3.0",
|
|
95
|
+
"rc-menu": "7.5.5",
|
|
95
96
|
"rc-notification": "^4.5.7",
|
|
96
97
|
"rc-picker": "^2.6.4",
|
|
97
98
|
"rc-select": "^10.2.4",
|
|
99
|
+
"rc-select-cascader": "npm:rc-select@14.3.0",
|
|
98
100
|
"rc-tabs": "^11.10.0",
|
|
101
|
+
"rc-tree-cascader": "npm:rc-tree@5.7.12",
|
|
99
102
|
"rc-util": "^5.20.0",
|
|
100
103
|
"re-resizable": "^6.9.0",
|
|
101
104
|
"react-color": "^2.19.3",
|
|
@@ -143,5 +146,5 @@
|
|
|
143
146
|
"access": "public"
|
|
144
147
|
},
|
|
145
148
|
"license": "MIT",
|
|
146
|
-
"gitHead": "
|
|
149
|
+
"gitHead": "646f9c71e2d0f20bfdb4c6ce430ccad0562d5304"
|
|
147
150
|
}
|