@para-ui/core 3.0.2-beta → 3.0.4
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/Breadcrumbs/index.d.ts +14 -0
- package/Breadcrumbs/index.js +210 -156
- package/Breadcrumbs/lang/en_US.d.ts +4 -0
- package/Breadcrumbs/lang/index.d.ts +9 -0
- package/Breadcrumbs/lang/zh_CN.d.ts +4 -0
- package/Button/index.js +9 -3
- package/ButtonGroup/index.js +1 -1
- package/Cascader/index.js +1 -1
- package/Checkbox/index.js +1 -1
- package/ComboSelect/index.js +17 -11
- package/DatePicker/generatePicker/index.d.ts +11 -2
- package/DatePicker/index.js +46 -34
- package/Desktop/index.js +1 -1
- package/Drawer/index.js +1 -1
- package/Empty/index.js +1 -1
- package/Form/index.js +3 -3
- package/FormItem/index.js +3 -3
- package/FunctionModal/index.js +3 -3
- package/Modal/index.js +1 -1
- package/OperateBtn/index.js +1 -1
- package/PageHeader/index.js +1 -1
- package/Pagination/index.js +1 -1
- package/PopConfirm/index.js +1 -1
- package/Popover/index.js +2 -16
- package/Querying/index.js +1 -1
- package/README.md +27 -4
- package/Search/index.js +1 -1
- package/Select/index.js +1 -1
- package/SelectInput/index.js +1 -1
- package/Selector/index.js +129 -32
- package/Selector/interface.d.ts +11 -1
- package/Selector/lang/en_US.d.ts +1 -0
- package/Selector/lang/index.d.ts +2 -0
- package/Selector/lang/zh_CN.d.ts +1 -0
- package/SelectorPicker/index.js +2 -1
- package/Table/index.js +11 -9
- package/Table/interface.d.ts +2 -0
- package/Tabs/index.js +1 -1
- package/TimePicker/index.js +1 -1
- package/ToggleButton/index.js +1 -1
- package/Tooltip/index.js +49 -7
- package/Tooltip/interface.d.ts +2 -0
- package/Transfer/index.d.ts +19 -4
- package/Transfer/index.js +183 -102
- package/Transfer/lang/en_US.d.ts +2 -0
- package/Transfer/lang/index.d.ts +4 -0
- package/Transfer/lang/zh_CN.d.ts +2 -0
- package/Tree/index.js +3 -3
- package/Upload/ImgCrop/EasyCrop.d.ts +1 -1
- package/Upload/ImgCrop/interface.d.ts +5 -0
- package/Upload/index.js +7 -3
- package/_verture/{index-08b7101b.js → index-4b4ee8b5.js} +0 -0
- package/_verture/{index-df70784b.js → index-e0508c99.js} +1 -1
- package/_verture/{modalContext-7b378e49.js → modalContext-4bce2dae.js} +0 -0
- package/_verture/{useFormatMessage-ac9d6acf.js → useFormatMessage-f4452258.js} +6 -4
- package/index.js +6 -5
- package/package.json +1 -1
package/OperateBtn/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import 'rc-tooltip/lib/placements';
|
|
|
19
19
|
import '@para-ui/icons/Down';
|
|
20
20
|
import '../Dropdown/index.js';
|
|
21
21
|
import 'rc-dropdown';
|
|
22
|
-
import '../_verture/useFormatMessage-
|
|
22
|
+
import '../_verture/useFormatMessage-f4452258.js';
|
|
23
23
|
import '@para-ui/core/GlobalContext';
|
|
24
24
|
|
|
25
25
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2022/4/13 10:48 AM\n* @description 表格操作按钮\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-operate-btn {\n font-family: -apple-system, BlinkMacSystemFont, Helvetica Neue, PingFang SC, Microsoft YaHei, Source Han Sans SC, Noto Sans CJK SC, WenQuanYi Micro Hei, sans-serif;\n font-size: 14px;\n font-weight: 400;\n display: flex;\n align-items: center;\n}\n.paraui-v3-operate-btn > .operate-btn-line {\n display: inline-block;\n width: 1px;\n background-color: rgba(54, 102, 214, 0.2);\n margin: 0 12px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-small > .operate-btn-line {\n height: 12px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-small button svg {\n font-size: 18px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-medium > .operate-btn-line {\n height: 14px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-medium button svg {\n font-size: 24px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-large > .operate-btn-line {\n height: 16px;\n}\n.paraui-v3-operate-btn.paraui-v3-operate-btn-large button > svg {\n font-size: 28px;\n}\n\n.paraui-v3-operate-btn-popover .operate-btn-list {\n padding: 8px 0;\n}\n.paraui-v3-operate-btn-popover .operate-btn-list > .operate-btn-list-item {\n padding: 0 12px;\n max-width: 120px;\n cursor: pointer;\n color: rgb(46, 55, 67);\n line-height: 36px;\n text-align: left;\n}\n.paraui-v3-operate-btn-popover .operate-btn-list > .operate-btn-list-item:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-operate-btn-popover .operate-btn-list > .operate-btn-list-item-disabled {\n cursor: not-allowed;\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-operate-btn-popover .operate-btn-list > .operate-btn-list-item-danger {\n color: rgb(235, 96, 84);\n}";
|
package/PageHeader/index.js
CHANGED
|
@@ -20,7 +20,7 @@ import '@para-ui/icons/LoadingF';
|
|
|
20
20
|
import '@para-ui/icons/Forbid';
|
|
21
21
|
import '../Dropdown/index.js';
|
|
22
22
|
import 'rc-dropdown';
|
|
23
|
-
import '../_verture/useFormatMessage-
|
|
23
|
+
import '../_verture/useFormatMessage-f4452258.js';
|
|
24
24
|
import '@para-ui/core/GlobalContext';
|
|
25
25
|
|
|
26
26
|
var MenuItemPopper = function MenuItemPopper(props) {
|
package/Pagination/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import NavigateBefore from '@para-ui/icons/Left';
|
|
|
8
8
|
import Right from '@para-ui/icons/Right';
|
|
9
9
|
import Select from '../Select/index.js';
|
|
10
10
|
import { TextField } from '../TextField/index.js';
|
|
11
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
11
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-f4452258.js';
|
|
12
12
|
import GlobalContext from '@para-ui/core/GlobalContext';
|
|
13
13
|
import { $ as $prefixCls, a as $rcPrefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
14
14
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
package/PopConfirm/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import WarningCircleF from '@para-ui/icons/WarningCircleF';
|
|
|
9
9
|
import { Button } from '../Button/index.js';
|
|
10
10
|
import { Tooltip } from '../Tooltip/index.js';
|
|
11
11
|
import clsx from 'clsx';
|
|
12
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
12
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-f4452258.js';
|
|
13
13
|
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
14
14
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
15
15
|
import '../_verture/typeof-498dd2b1.js';
|
package/Popover/index.js
CHANGED
|
@@ -15,20 +15,7 @@ styleInject(css_248z);
|
|
|
15
15
|
var Popover = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
16
16
|
var title = props.title,
|
|
17
17
|
content = props.content,
|
|
18
|
-
restProps = __rest(props, ["title", "content"]);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
var getPopupContainer = function getPopupContainer(triggerNode) {
|
|
22
|
-
var container;
|
|
23
|
-
|
|
24
|
-
if (!props.getPopupContainer) {
|
|
25
|
-
container = document.body;
|
|
26
|
-
} else {
|
|
27
|
-
container = props.getPopupContainer(triggerNode) || document.body;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
return container;
|
|
31
|
-
}; //浮层
|
|
18
|
+
restProps = __rest(props, ["title", "content"]); //浮层
|
|
32
19
|
|
|
33
20
|
|
|
34
21
|
var getOverlay = function getOverlay(prefixCls) {
|
|
@@ -53,8 +40,7 @@ var Popover = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
53
40
|
overlayClassName: clsx("".concat($prefixCls, "-popover"), props.overlayClassName),
|
|
54
41
|
ref: ref,
|
|
55
42
|
title: getOverlay(prefixCls),
|
|
56
|
-
transitionName: "".concat($rcPrefixCls, "-popover-zoom-big")
|
|
57
|
-
getPopupContainer: getPopupContainer
|
|
43
|
+
transitionName: "".concat($rcPrefixCls, "-popover-zoom-big")
|
|
58
44
|
}));
|
|
59
45
|
});
|
|
60
46
|
Popover.displayName = 'Popover';
|
package/Querying/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
3
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-f4452258.js';
|
|
4
4
|
import { $ as $prefixCls } from '../_verture/constant-bf34e6fa.js';
|
|
5
5
|
import { u as useGlobalProps } from '../_verture/useGlobalProps-af9a2af6.js';
|
|
6
6
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
package/README.md
CHANGED
|
@@ -1,13 +1,36 @@
|
|
|
1
|
-
## 版本: 3.0.
|
|
1
|
+
## 版本: 3.0.4
|
|
2
2
|
|
|
3
|
-
para-ui/core@3.0.
|
|
4
|
-
|
|
3
|
+
para-ui/core@3.0.4 发布
|
|
4
|
+
【RangePicker】增加shortcuts与shortcutsPlacement属性,支持快捷选择
|
|
5
|
+
【Button】禁用时提示文字无箭头且位于下方
|
|
6
|
+
【国际化】国际化支持zh-CN/en-US
|
|
7
|
+
【Breadcrumbs】重构面包屑
|
|
8
|
+
|
|
9
|
+
## 版本: 3.0.3
|
|
10
|
+
|
|
11
|
+
para-ui/core@3.0.3 发布
|
|
12
|
+
样式隔离问题已验证
|
|
13
|
+
【Table】修复表格第1页不显示问题
|
|
14
|
+
【Table】加载更多定位到底部
|
|
15
|
+
【Table】内容列新增自定义className
|
|
16
|
+
【Checkbox】修复选中样式错误
|
|
17
|
+
【Transfer】穿梭款补全状态,优化
|
|
18
|
+
【Tooltip】使用followCursor属性时,提示内容位于光标下方
|
|
5
19
|
|
|
6
20
|
## 版本: 3.0.2
|
|
7
21
|
|
|
8
22
|
para-ui/core@3.0.2 发布
|
|
23
|
+
样式隔离问题已验证
|
|
24
|
+
【Selector】修改选择器搜索可以点击下级
|
|
25
|
+
【Tooltip】增加followCursor属性
|
|
26
|
+
【Upload.ImgCrop】裁剪时开启无限制拖动,增加fixedCropSize属性
|
|
27
|
+
|
|
28
|
+
## 版本: 3.0.2-beta
|
|
29
|
+
|
|
30
|
+
para-ui/core@3.0.2-beta 发布
|
|
31
|
+
验证样式隔离问题
|
|
9
32
|
【AutoBox】修改下拉浮层
|
|
10
|
-
【
|
|
33
|
+
【Selector】选择器修改自定义id,数据渲染失败
|
|
11
34
|
【Table】表格新增记住列
|
|
12
35
|
【Table】修改表格表头样式
|
|
13
36
|
【Table】允许全局统一改变参数
|
package/Search/index.js
CHANGED
|
@@ -29,7 +29,7 @@ import '../Dropdown/index.js';
|
|
|
29
29
|
import 'rc-dropdown';
|
|
30
30
|
import '@para-ui/icons/Forbid';
|
|
31
31
|
import '@para-ui/icons/Down';
|
|
32
|
-
import '../_verture/useFormatMessage-
|
|
32
|
+
import '../_verture/useFormatMessage-f4452258.js';
|
|
33
33
|
|
|
34
34
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-search {\n display: flex;\n width: 100%;\n}\n.paraui-v3-search > .search-text-field {\n padding: 0;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: none;\n margin-right: 8px;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 16px;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-within > .right-icon:hover > svg {\n color: rgba(54, 102, 214, 0.8);\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 8px;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-after {\n padding: 0;\n background-color: white;\n}\n.paraui-v3-search > .search-text-field > .text-field-content > .text-field-content-after .search-button {\n border: 0;\n}\n.paraui-v3-search.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: flex;\n}\n.paraui-v3-search.paraui-v3-search-value > .search-text-field > .text-field-content > .text-field-content-within > .right-icon {\n display: flex;\n}\n.paraui-v3-search .search-button > .paraui-v3-button-icon {\n margin-right: 0;\n}\n.paraui-v3-search .search-button > .paraui-v3-button-icon > svg {\n font-size: 16px;\n}\n.paraui-v3-search .search-button > .paraui-v3-button-label {\n margin-left: 4px;\n}\n.paraui-v3-search.paraui-v3-search-outside > .search-button {\n margin-left: 16px;\n}\n.paraui-v3-search.paraui-v3-search-inside .search-button {\n padding: 0 8px;\n}\n.paraui-v3-search.paraui-v3-search-inside .search-button svg {\n font-size: 20px;\n}\n.paraui-v3-search.paraui-v3-search-btntext .search-button svg {\n font-size: 16px;\n}\n.paraui-v3-search.paraui-v3-search-small > .search-text-field > .text-field-content > .text-field-content-after .search-button {\n height: 26px;\n}\n.paraui-v3-search.paraui-v3-search-small.paraui-v3-search-inside.paraui-v3-search-no-btntext .search-button svg {\n font-size: 16px;\n}\n.paraui-v3-search.paraui-v3-search-small.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 16px;\n}\n.paraui-v3-search.paraui-v3-search-small.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 4px;\n}\n.paraui-v3-search.paraui-v3-search-medium > .search-text-field > .text-field-content > .text-field-content-after .search-button {\n height: 30px;\n}\n.paraui-v3-search.paraui-v3-search-medium.paraui-v3-search-inside.search-no-btntext .search-button svg {\n font-size: 18px;\n}\n.paraui-v3-search.paraui-v3-search-medium.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 18px;\n}\n.paraui-v3-search.paraui-v3-search-medium.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 6px;\n}\n.paraui-v3-search.paraui-v3-search-large > .search-text-field > .text-field-content > .text-field-content-after .search-button {\n height: 34px;\n}\n.paraui-v3-search.paraui-v3-search-large.paraui-v3-search-inside.search-no-btntext .search-button svg {\n font-size: 20px;\n}\n.paraui-v3-search.paraui-v3-search-large.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .right-icon > svg {\n font-size: 20px;\n}\n.paraui-v3-search.paraui-v3-search-large.paraui-v3-search-right-icon-exist > .search-text-field > .text-field-content > .text-field-content-within > .clean-up-icon {\n margin-right: 8px;\n}";
|
|
35
35
|
styleInject(css_248z);
|
package/Select/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import CloseCircle from '@para-ui/icons/CloseCircle';
|
|
|
14
14
|
import Down from '@para-ui/icons/Down';
|
|
15
15
|
import Check from '@para-ui/icons/Check';
|
|
16
16
|
import SearchIcon from '@para-ui/icons/Search';
|
|
17
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
17
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-f4452258.js';
|
|
18
18
|
import AutoTips from '../AutoTips/index.js';
|
|
19
19
|
import { Loading } from '../Loading/index.js';
|
|
20
20
|
import { Popover } from '../Popover/index.js';
|
package/SelectInput/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import '../_verture/typeof-498dd2b1.js';
|
|
|
8
8
|
import 'react';
|
|
9
9
|
import '../Empty/index.js';
|
|
10
10
|
import 'clsx';
|
|
11
|
-
import '../_verture/useFormatMessage-
|
|
11
|
+
import '../_verture/useFormatMessage-f4452258.js';
|
|
12
12
|
import '@para-ui/core/GlobalContext';
|
|
13
13
|
import '../_verture/useGlobalProps-af9a2af6.js';
|
|
14
14
|
import '../_verture/style-inject.es-300983ab.js';
|
package/Selector/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import Empty from '../Empty/index.js';
|
|
|
17
17
|
import SearchIcon from '@para-ui/icons/Search';
|
|
18
18
|
import Refresh from '@para-ui/icons/Refresh';
|
|
19
19
|
import { ArrayToObject, Get, Post, Cancel } from '@paraview/lib';
|
|
20
|
-
import { u as useFormatMessage } from '../_verture/useFormatMessage-
|
|
20
|
+
import { u as useFormatMessage } from '../_verture/useFormatMessage-f4452258.js';
|
|
21
21
|
import { u as useGlobalProps } from '../_verture/useGlobalProps-af9a2af6.js';
|
|
22
22
|
import '../Label/index.js';
|
|
23
23
|
import '../Help/index.js';
|
|
@@ -41,6 +41,7 @@ import '@para-ui/icons/Forbid';
|
|
|
41
41
|
import '@para-ui/icons/Down';
|
|
42
42
|
import '@para-ui/core/GlobalContext';
|
|
43
43
|
import '@para-ui/icons/More';
|
|
44
|
+
import '@para-ui/icons/Return';
|
|
44
45
|
|
|
45
46
|
var css_248z$3 = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n/**\n* @author linhd\n* @date 2022/8/12 5:28 PM\n* @description 全局css前缀\n*/\n.paraui-v3-selector-node {\n display: flex;\n justify-content: space-between;\n align-items: center;\n cursor: pointer;\n}\n.paraui-v3-selector-node:hover {\n background-color: rgba(171, 176, 185, 0.12);\n}\n.paraui-v3-selector-node > .selector-node-left {\n display: flex;\n align-items: center;\n flex: 1;\n overflow: hidden;\n padding-right: 16px;\n}\n.paraui-v3-selector-node > .selector-node-left > .selector-node-radio {\n margin-right: 8px;\n display: flex;\n align-items: center;\n padding: 0;\n}\n.paraui-v3-selector-node > .selector-node-left > .selector-node-radio .radio-box {\n top: 0;\n}\n.paraui-v3-selector-node > .selector-node-left > .selector-node-check {\n margin-right: 8px;\n display: flex;\n align-items: center;\n padding: 0;\n}\n.paraui-v3-selector-node > .selector-node-left > .selector-node-check .checkbox-box {\n top: 0;\n}\n.paraui-v3-selector-node > .selector-node-left > .node-img {\n display: inline-block;\n width: 30px;\n height: 30px;\n margin-right: 8px;\n}\n.paraui-v3-selector-node > .selector-node-left > .node-img img {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-branch {\n height: 36px;\n padding: 0 16px;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-branch > .selector-node-left > .main-title {\n font-size: 14px;\n color: rgb(46, 55, 67);\n white-space: nowrap;\n height: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-branch > .selector-node-left > .sub-title {\n margin-left: 8px;\n font-size: 14px;\n color: rgba(46, 55, 67, 0.4);\n white-space: nowrap;\n height: 20px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-branch > .selector-node-left > .tag {\n margin-left: 8px;\n background-color: rgba(54, 102, 214, 0.05);\n color: rgb(54, 102, 214);\n border-radius: 2px;\n font-size: 12px;\n padding: 0px 6px;\n white-space: nowrap;\n height: 17px;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-leaf {\n padding: 6px 16px;\n height: 48px;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-leaf > .selector-node-left > .title-box {\n flex: 1;\n overflow: hidden;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-leaf > .selector-node-left > .title-box > .main-title-box {\n display: flex;\n white-space: nowrap;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-leaf > .selector-node-left > .title-box > .main-title-box > .main-title {\n font-size: 14px;\n color: rgb(46, 55, 67);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-leaf > .selector-node-left > .title-box > .main-title-box > .tag {\n margin-left: 8px;\n background-color: rgba(54, 102, 214, 0.05);\n color: rgb(54, 102, 214);\n border-radius: 2px;\n font-size: 12px;\n padding: 1px 6px;\n white-space: nowrap;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-leaf > .selector-node-left > .title-box > .sub-title {\n font-size: 12px;\n color: rgba(46, 55, 67, 0.4);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.paraui-v3-selector-node > .selector-node-right {\n display: flex;\n align-items: center;\n height: 100%;\n}\n.paraui-v3-selector-node > .selector-node-right > .detail {\n font-size: 14px;\n color: rgb(54, 102, 214);\n white-space: nowrap;\n padding: 0 4px;\n cursor: pointer;\n height: 24px;\n line-height: 24px;\n border-radius: 2px;\n}\n.paraui-v3-selector-node > .selector-node-right > .detail:hover {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-selector-node > .selector-node-right > .line {\n border-left: 1px solid rgba(171, 176, 185, 0.2);\n margin: 0 8px;\n content: \"\";\n display: inline-block;\n height: 12px;\n}\n.paraui-v3-selector-node > .selector-node-right > .lower-child {\n font-size: 14px;\n color: rgb(54, 102, 214);\n white-space: nowrap;\n padding: 0 4px;\n cursor: pointer;\n height: 24px;\n line-height: 24px;\n border-radius: 2px;\n}\n.paraui-v3-selector-node > .selector-node-right > .lower-child:hover {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-selector-node > .selector-node-right > .close {\n display: flex;\n align-items: center;\n color: rgb(54, 102, 214);\n white-space: nowrap;\n padding: 0 4px;\n cursor: pointer;\n height: 24px;\n line-height: 24px;\n border-radius: 2px;\n}\n.paraui-v3-selector-node > .selector-node-right > .close:hover {\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-selector-node > .selector-node-right > .close:hover > svg {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-selector-node > .selector-node-right > .close > svg {\n font-size: 16px;\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-edit > .selector-node-right > .detail, .paraui-v3-selector-node.paraui-v3-selector-node-edit > .selector-node-right > .lower-child {\n color: rgba(46, 55, 67, 0.7);\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-edit > .selector-node-right > .detail:hover, .paraui-v3-selector-node.paraui-v3-selector-node-edit > .selector-node-right > .lower-child:hover {\n color: rgb(54, 102, 214);\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-disabled {\n cursor: not-allowed;\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-disabled.paraui-v3-selector-node-branch > .selector-node-left > .main-title {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-disabled.paraui-v3-selector-node-leaf > .selector-node-left > .title-box > .main-title-box > .main-title {\n color: rgba(46, 55, 67, 0.4);\n}\n.paraui-v3-selector-node.paraui-v3-selector-node-disabled > .selector-node-right > .lower-child {\n cursor: not-allowed;\n color: rgba(46, 55, 67, 0.4);\n}\n\n.paraui-v3-selector-detail .selector-detail-popover-content.selector-detail-popover-content-loading {\n min-width: 100px;\n min-height: 50px;\n}";
|
|
46
47
|
styleInject(css_248z$3);
|
|
@@ -314,7 +315,8 @@ var en = {
|
|
|
314
315
|
selectAll: 'Select all',
|
|
315
316
|
seeMore: 'See more',
|
|
316
317
|
selected: 'Selected',
|
|
317
|
-
pleaseEnter: 'Please enter'
|
|
318
|
+
pleaseEnter: 'Please enter',
|
|
319
|
+
searchResult: 'Search result'
|
|
318
320
|
};
|
|
319
321
|
|
|
320
322
|
var zh = {
|
|
@@ -322,7 +324,8 @@ var zh = {
|
|
|
322
324
|
selectAll: '全选',
|
|
323
325
|
seeMore: '查看更多',
|
|
324
326
|
selected: '已选',
|
|
325
|
-
pleaseEnter: '请输入'
|
|
327
|
+
pleaseEnter: '请输入',
|
|
328
|
+
searchResult: '搜索结果'
|
|
326
329
|
};
|
|
327
330
|
|
|
328
331
|
var localeJson = {
|
|
@@ -701,6 +704,8 @@ var SelectorMain = function SelectorMain(props) {
|
|
|
701
704
|
groupType = props.groupType,
|
|
702
705
|
groupRange = props.groupRange,
|
|
703
706
|
search = props.search,
|
|
707
|
+
_props$searchVal = props.searchVal,
|
|
708
|
+
searchVal = _props$searchVal === void 0 ? '' : _props$searchVal,
|
|
704
709
|
searchPlaceholder = props.searchPlaceholder,
|
|
705
710
|
searchTrigger = props.searchTrigger,
|
|
706
711
|
searchLoading = props.searchLoading,
|
|
@@ -734,6 +739,12 @@ var SelectorMain = function SelectorMain(props) {
|
|
|
734
739
|
searchTimer: null,
|
|
735
740
|
searchStr: ''
|
|
736
741
|
});
|
|
742
|
+
useEffect(function () {
|
|
743
|
+
if (!searchVal) return;
|
|
744
|
+
constData.current.searchStr = searchVal.val;
|
|
745
|
+
setSearchStr(searchVal.val);
|
|
746
|
+
if (searchVal.val !== '') setShowSearch(true);
|
|
747
|
+
}, [searchVal]);
|
|
737
748
|
/** 改变搜索框 */
|
|
738
749
|
|
|
739
750
|
var changeSearch = function changeSearch(val) {
|
|
@@ -796,6 +807,22 @@ var SelectorMain = function SelectorMain(props) {
|
|
|
796
807
|
})
|
|
797
808
|
});
|
|
798
809
|
};
|
|
810
|
+
/** 点击下级
|
|
811
|
+
* @param isSearch {boolean}
|
|
812
|
+
* */
|
|
813
|
+
|
|
814
|
+
|
|
815
|
+
var onLevelCom = function onLevelCom(isSearch) {
|
|
816
|
+
return function (item) {
|
|
817
|
+
if (isSearch) {
|
|
818
|
+
constData.current.searchStr = '';
|
|
819
|
+
setSearchStr('');
|
|
820
|
+
setShowSearch(false);
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
onLevel && onLevel(item, isSearch);
|
|
824
|
+
};
|
|
825
|
+
};
|
|
799
826
|
/** 渲染列表 */
|
|
800
827
|
|
|
801
828
|
|
|
@@ -820,7 +847,7 @@ var SelectorMain = function SelectorMain(props) {
|
|
|
820
847
|
breadcrumbsList: breadcrumbsList,
|
|
821
848
|
fieldConfig: fieldConfig,
|
|
822
849
|
onClickBreadcrumbs: onClickBreadcrumbs,
|
|
823
|
-
onLevel:
|
|
850
|
+
onLevel: onLevelCom(false),
|
|
824
851
|
onSelect: onSelect,
|
|
825
852
|
onLoad: onLoad,
|
|
826
853
|
onAllCheck: onAllCheck
|
|
@@ -847,7 +874,8 @@ var SelectorMain = function SelectorMain(props) {
|
|
|
847
874
|
groupType: groupRange === 'search' || groupRange === 'searchList' ? groupType : undefined,
|
|
848
875
|
fieldConfig: fieldConfig,
|
|
849
876
|
loading: searchLoading,
|
|
850
|
-
onSelect: onSelect
|
|
877
|
+
onSelect: onSelect,
|
|
878
|
+
onLevel: onLevelCom(true)
|
|
851
879
|
}, "search");
|
|
852
880
|
};
|
|
853
881
|
/** 处理loading */
|
|
@@ -1235,21 +1263,29 @@ var Selector = function Selector(props) {
|
|
|
1235
1263
|
setSearchLoading = _useState12[1]; // 搜索loading
|
|
1236
1264
|
|
|
1237
1265
|
|
|
1238
|
-
var _useState13 = useState(
|
|
1266
|
+
var _useState13 = useState({
|
|
1267
|
+
val: ''
|
|
1268
|
+
}),
|
|
1239
1269
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
1240
|
-
|
|
1241
|
-
|
|
1270
|
+
searchVal = _useState14[0],
|
|
1271
|
+
setSearchVal = _useState14[1]; // 搜索值
|
|
1242
1272
|
|
|
1243
1273
|
|
|
1244
|
-
var _useState15 = useState(
|
|
1274
|
+
var _useState15 = useState([]),
|
|
1245
1275
|
_useState16 = _slicedToArray(_useState15, 2),
|
|
1246
|
-
|
|
1247
|
-
|
|
1276
|
+
searchList = _useState16[0],
|
|
1277
|
+
setSearchList = _useState16[1]; // 搜索数据
|
|
1248
1278
|
|
|
1249
|
-
|
|
1279
|
+
|
|
1280
|
+
var _useState17 = useState(true),
|
|
1250
1281
|
_useState18 = _slicedToArray(_useState17, 2),
|
|
1251
|
-
|
|
1252
|
-
|
|
1282
|
+
loadingCom = _useState18[0],
|
|
1283
|
+
setLoadingCom = _useState18[1];
|
|
1284
|
+
|
|
1285
|
+
var _useState19 = useState(),
|
|
1286
|
+
_useState20 = _slicedToArray(_useState19, 2),
|
|
1287
|
+
refreshCom = _useState20[0],
|
|
1288
|
+
setRefreshCom = _useState20[1];
|
|
1253
1289
|
|
|
1254
1290
|
var constData = useRef({
|
|
1255
1291
|
/** 对象集合 所有的 */
|
|
@@ -1267,7 +1303,7 @@ var Selector = function Selector(props) {
|
|
|
1267
1303
|
/** 当前选中值的mapping */
|
|
1268
1304
|
selectValueJson: {},
|
|
1269
1305
|
|
|
1270
|
-
/** 面包屑数据 */
|
|
1306
|
+
/** 面包屑数据 带根/搜索 */
|
|
1271
1307
|
breadcrumbsList: [],
|
|
1272
1308
|
|
|
1273
1309
|
/** 接口id */
|
|
@@ -1287,7 +1323,13 @@ var Selector = function Selector(props) {
|
|
|
1287
1323
|
reqTimer: null,
|
|
1288
1324
|
|
|
1289
1325
|
/** 页数 */
|
|
1290
|
-
page: 1
|
|
1326
|
+
page: 1,
|
|
1327
|
+
|
|
1328
|
+
/** 搜索值 */
|
|
1329
|
+
searchVal: '',
|
|
1330
|
+
|
|
1331
|
+
/** 搜索点了下级,记录搜索前的面包屑,null说明没有储存过 */
|
|
1332
|
+
beforeSearchBreadcrumbs: null
|
|
1291
1333
|
}); // 常量
|
|
1292
1334
|
|
|
1293
1335
|
constData.current.reqParams.size = size;
|
|
@@ -1613,18 +1655,29 @@ var Selector = function Selector(props) {
|
|
|
1613
1655
|
/** 点击下级,添加面包屑 */
|
|
1614
1656
|
|
|
1615
1657
|
|
|
1616
|
-
var onLevelAddBreadcrumbs = function onLevelAddBreadcrumbs(item) {
|
|
1617
|
-
breadcrumbsList
|
|
1658
|
+
var onLevelAddBreadcrumbs = function onLevelAddBreadcrumbs(item, isSearch) {
|
|
1659
|
+
var arr = _toConsumableArray(breadcrumbsList);
|
|
1660
|
+
|
|
1661
|
+
if (isSearch) {
|
|
1662
|
+
arr = [];
|
|
1663
|
+
|
|
1664
|
+
if (constData.current.beforeSearchBreadcrumbs === null) {
|
|
1665
|
+
// 记录搜索之前的面包屑
|
|
1666
|
+
constData.current.beforeSearchBreadcrumbs = _toConsumableArray(breadcrumbsList);
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
|
|
1670
|
+
arr.push({
|
|
1618
1671
|
label: item.mainTitle,
|
|
1619
1672
|
value: item.key || ''
|
|
1620
1673
|
});
|
|
1621
|
-
setBreadcrumbsList(
|
|
1674
|
+
setBreadcrumbsList(arr);
|
|
1622
1675
|
};
|
|
1623
1676
|
/** 点击下级 */
|
|
1624
1677
|
|
|
1625
1678
|
|
|
1626
|
-
var onLevelCom = function onLevelCom(item) {
|
|
1627
|
-
onLevelAddBreadcrumbs(item);
|
|
1679
|
+
var onLevelCom = function onLevelCom(item, isSearch) {
|
|
1680
|
+
onLevelAddBreadcrumbs(item, isSearch);
|
|
1628
1681
|
|
|
1629
1682
|
if (isReqLocalData) {
|
|
1630
1683
|
// 本地数据
|
|
@@ -1916,14 +1969,25 @@ var Selector = function Selector(props) {
|
|
|
1916
1969
|
|
|
1917
1970
|
|
|
1918
1971
|
var handBreadcrumbsList = function handBreadcrumbsList() {
|
|
1919
|
-
var arr = _toConsumableArray(breadcrumbsList);
|
|
1972
|
+
var arr = _toConsumableArray(breadcrumbsList); // 根路径
|
|
1973
|
+
|
|
1920
1974
|
|
|
1921
1975
|
var oneItem = breadcrumbsHead || {
|
|
1922
1976
|
label: intl({
|
|
1923
1977
|
id: 'root'
|
|
1924
1978
|
}),
|
|
1925
1979
|
value: '_paraui_first_floor'
|
|
1926
|
-
};
|
|
1980
|
+
}; // 具有搜索结果的上下级
|
|
1981
|
+
|
|
1982
|
+
if (constData.current.searchVal) {
|
|
1983
|
+
arr.unshift({
|
|
1984
|
+
label: props.searchBreadcrumbs ? props.searchBreadcrumbs : intl({
|
|
1985
|
+
id: 'searchResult'
|
|
1986
|
+
}),
|
|
1987
|
+
value: '_paraui_search'
|
|
1988
|
+
});
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1927
1991
|
if (showbreadcrumbsHead) arr.unshift(oneItem);
|
|
1928
1992
|
constData.current.breadcrumbsList = arr;
|
|
1929
1993
|
return arr;
|
|
@@ -1956,7 +2020,27 @@ var Selector = function Selector(props) {
|
|
|
1956
2020
|
}
|
|
1957
2021
|
|
|
1958
2022
|
var keyStr = item.value || '';
|
|
1959
|
-
var oneValue = breadcrumbsHead ? breadcrumbsHead.value : '_paraui_first_floor'; //
|
|
2023
|
+
var oneValue = breadcrumbsHead ? breadcrumbsHead.value : '_paraui_first_floor'; // 点击搜索结果,显示上一次的搜索
|
|
2024
|
+
|
|
2025
|
+
if (item.value === '_paraui_search') {
|
|
2026
|
+
setSearchVal({
|
|
2027
|
+
val: constData.current.searchVal
|
|
2028
|
+
});
|
|
2029
|
+
setBreadcrumbsList(_toConsumableArray(constData.current.beforeSearchBreadcrumbs || []));
|
|
2030
|
+
return;
|
|
2031
|
+
} // 点击根路径且具有搜索面包屑
|
|
2032
|
+
|
|
2033
|
+
|
|
2034
|
+
if (constData.current.beforeSearchBreadcrumbs && item.value === oneValue) {
|
|
2035
|
+
// 清空搜索态
|
|
2036
|
+
constData.current.searchVal = '';
|
|
2037
|
+
constData.current.beforeSearchBreadcrumbs = null;
|
|
2038
|
+
setSearchVal({
|
|
2039
|
+
val: ''
|
|
2040
|
+
});
|
|
2041
|
+
handBreadcrumbsList();
|
|
2042
|
+
} // 设置面包屑
|
|
2043
|
+
|
|
1960
2044
|
|
|
1961
2045
|
if (keyStr === oneValue) {
|
|
1962
2046
|
// 第一层
|
|
@@ -1988,7 +2072,9 @@ var Selector = function Selector(props) {
|
|
|
1988
2072
|
|
|
1989
2073
|
handInitCurrent();
|
|
1990
2074
|
};
|
|
1991
|
-
/** 搜索回调
|
|
2075
|
+
/** 搜索回调
|
|
2076
|
+
* @param bol 搜索框为空的情况下,触发搜索
|
|
2077
|
+
* */
|
|
1992
2078
|
|
|
1993
2079
|
|
|
1994
2080
|
var onSearchCom = function onSearchCom(val, bol) {
|
|
@@ -1998,14 +2084,24 @@ var Selector = function Selector(props) {
|
|
|
1998
2084
|
while (1) {
|
|
1999
2085
|
switch (_context4.prev = _context4.next) {
|
|
2000
2086
|
case 0:
|
|
2087
|
+
constData.current.searchVal = val;
|
|
2088
|
+
|
|
2001
2089
|
if (!(val === '')) {
|
|
2002
|
-
_context4.next =
|
|
2090
|
+
_context4.next = 7;
|
|
2003
2091
|
break;
|
|
2004
2092
|
}
|
|
2005
2093
|
|
|
2006
2094
|
setSearchList([]);
|
|
2007
2095
|
setSearchLoading(false);
|
|
2008
2096
|
|
|
2097
|
+
if (constData.current.beforeSearchBreadcrumbs) {
|
|
2098
|
+
// 从搜索恢复到正常列表
|
|
2099
|
+
constData.current.breadcrumbsList = _toConsumableArray(constData.current.beforeSearchBreadcrumbs);
|
|
2100
|
+
setBreadcrumbsList(_toConsumableArray(constData.current.beforeSearchBreadcrumbs));
|
|
2101
|
+
constData.current.beforeSearchBreadcrumbs = null;
|
|
2102
|
+
refreshFunc();
|
|
2103
|
+
}
|
|
2104
|
+
|
|
2009
2105
|
if (bol) {
|
|
2010
2106
|
// 当前页刷新
|
|
2011
2107
|
refreshFunc();
|
|
@@ -2013,23 +2109,23 @@ var Selector = function Selector(props) {
|
|
|
2013
2109
|
|
|
2014
2110
|
return _context4.abrupt("return");
|
|
2015
2111
|
|
|
2016
|
-
case
|
|
2112
|
+
case 7:
|
|
2017
2113
|
if (!onSearch) {
|
|
2018
|
-
_context4.next =
|
|
2114
|
+
_context4.next = 15;
|
|
2019
2115
|
break;
|
|
2020
2116
|
}
|
|
2021
2117
|
|
|
2022
2118
|
setSearchLoading(true);
|
|
2023
|
-
_context4.next =
|
|
2119
|
+
_context4.next = 11;
|
|
2024
2120
|
return onSearch(val);
|
|
2025
2121
|
|
|
2026
|
-
case
|
|
2122
|
+
case 11:
|
|
2027
2123
|
result = _context4.sent;
|
|
2028
|
-
arr = convertTree(result || [],
|
|
2124
|
+
arr = convertTree(result || [], false, true);
|
|
2029
2125
|
setSearchList(arr);
|
|
2030
2126
|
setSearchLoading(false);
|
|
2031
2127
|
|
|
2032
|
-
case
|
|
2128
|
+
case 15:
|
|
2033
2129
|
case "end":
|
|
2034
2130
|
return _context4.stop();
|
|
2035
2131
|
}
|
|
@@ -2115,6 +2211,7 @@ var Selector = function Selector(props) {
|
|
|
2115
2211
|
searchTrigger: searchTrigger,
|
|
2116
2212
|
searchPlaceholder: searchPlaceholder,
|
|
2117
2213
|
searchLoading: searchLoading,
|
|
2214
|
+
searchVal: searchVal,
|
|
2118
2215
|
disabled: disabled,
|
|
2119
2216
|
loading: loadingCom,
|
|
2120
2217
|
searchList: searchList,
|
package/Selector/interface.d.ts
CHANGED
|
@@ -84,6 +84,10 @@ export interface SelectorConstData {
|
|
|
84
84
|
reqTimer: any;
|
|
85
85
|
/** 页码 */
|
|
86
86
|
page: number;
|
|
87
|
+
/** 搜索值 */
|
|
88
|
+
searchVal: string;
|
|
89
|
+
/** 搜索点了下级,记录搜索前的面包屑 null说明没有储存过 */
|
|
90
|
+
beforeSearchBreadcrumbs: BreadcrumbsListItem[] | null;
|
|
87
91
|
[name: string]: any;
|
|
88
92
|
}
|
|
89
93
|
/** 字段配置,对应数据字段 */
|
|
@@ -173,6 +177,12 @@ export interface SelectorMainProps {
|
|
|
173
177
|
breadcrumbsList?: BreadcrumbsListItem[];
|
|
174
178
|
/** 搜索 */
|
|
175
179
|
search?: boolean;
|
|
180
|
+
/** 搜索面包屑 */
|
|
181
|
+
searchBreadcrumbs?: ReactNode;
|
|
182
|
+
/** 搜索值 */
|
|
183
|
+
searchVal?: {
|
|
184
|
+
val: string;
|
|
185
|
+
};
|
|
176
186
|
/** 搜索Placeholder */
|
|
177
187
|
searchPlaceholder?: ReactNode;
|
|
178
188
|
/** 搜索触发方式 */
|
|
@@ -208,7 +218,7 @@ export interface SelectorMainProps {
|
|
|
208
218
|
/** 选择事件 */
|
|
209
219
|
onSelect?: (item: SelectorAnyJson) => void;
|
|
210
220
|
/** 点击下级 */
|
|
211
|
-
onLevel?: (item: SelectorAnyJson) => void;
|
|
221
|
+
onLevel?: (item: SelectorAnyJson, isSearch?: boolean) => void;
|
|
212
222
|
/** 查看更多 */
|
|
213
223
|
onLoad?: () => void;
|
|
214
224
|
/** 点击全选 */
|
package/Selector/lang/en_US.d.ts
CHANGED
package/Selector/lang/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ declare const _default: {
|
|
|
5
5
|
seeMore: string;
|
|
6
6
|
selected: string;
|
|
7
7
|
pleaseEnter: string;
|
|
8
|
+
searchResult: string;
|
|
8
9
|
};
|
|
9
10
|
en: {
|
|
10
11
|
root: string;
|
|
@@ -12,6 +13,7 @@ declare const _default: {
|
|
|
12
13
|
seeMore: string;
|
|
13
14
|
selected: string;
|
|
14
15
|
pleaseEnter: string;
|
|
16
|
+
searchResult: string;
|
|
15
17
|
};
|
|
16
18
|
};
|
|
17
19
|
export default _default;
|
package/Selector/lang/zh_CN.d.ts
CHANGED
package/SelectorPicker/index.js
CHANGED
|
@@ -37,10 +37,11 @@ import '../_verture/useGlobalProps-af9a2af6.js';
|
|
|
37
37
|
import '@para-ui/core/GlobalContext';
|
|
38
38
|
import '../Button/index.js';
|
|
39
39
|
import '@para-ui/icons/Forbid';
|
|
40
|
-
import '../_verture/useFormatMessage-
|
|
40
|
+
import '../_verture/useFormatMessage-f4452258.js';
|
|
41
41
|
import '@para-ui/icons/Search';
|
|
42
42
|
import '../Breadcrumbs/index.js';
|
|
43
43
|
import '@para-ui/icons/More';
|
|
44
|
+
import '@para-ui/icons/Return';
|
|
44
45
|
import '../Empty/index.js';
|
|
45
46
|
import '@para-ui/icons/Refresh';
|
|
46
47
|
|