@para-ui/core 3.0.33 → 3.0.35
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/AutoTips/index.js +29 -5
- package/Breadcrumbs/index.js +1 -0
- package/ComboSelect/index.js +1 -1
- package/Form/index.js +2 -2
- package/FormItem/index.js +2 -2
- package/README.md +10 -0
- package/Selector/index.js +8 -4
- package/Selector/interface.d.ts +4 -0
- package/Tag/index.js +1 -0
- package/Tree/index.js +2 -2
- package/_verture/{index-c5be57f2.js → index-291a16a8.js} +0 -0
- package/_verture/{index-e836322d.js → index-c50e7727.js} +0 -0
- package/index.js +2 -2
- package/package.json +2 -2
- package/umd/AutoTips.js +4 -4
- package/umd/Breadcrumbs.js +4 -4
- package/umd/ComboSelect.js +2 -2
- package/umd/DatePicker.js +2 -2
- package/umd/Desktop.js +2 -2
- package/umd/Form.js +2 -2
- package/umd/FormItem.js +2 -2
- package/umd/InputLang.js +2 -2
- package/umd/MultiBox.js +4 -4
- package/umd/OperateBtn.js +2 -2
- package/umd/Pagination.js +2 -2
- package/umd/Search.js +2 -2
- package/umd/Select.js +2 -2
- package/umd/SelectInput.js +4 -4
- package/umd/Selector.js +3 -3
- package/umd/SelectorPicker.js +2 -2
- package/umd/SingleBox.js +7 -7
- package/umd/Table.js +2 -2
- package/umd/Tag.js +4 -4
- package/umd/TextField.js +4 -4
- package/umd/TimePicker.js +3 -3
- package/umd/Transfer.js +4 -4
- package/umd/Tree.js +2 -2
package/AutoTips/index.js
CHANGED
|
@@ -3,13 +3,14 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useRef, useState, useEffect } from 'react';
|
|
4
4
|
import { Tooltip } from '../Tooltip/index.js';
|
|
5
5
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
6
|
+
import { isIE } from '@paraview/lib';
|
|
6
7
|
import { s as styleInject } from '../_verture/style-inject.es-300983ab.js';
|
|
7
8
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
8
9
|
import 'rc-tooltip';
|
|
9
10
|
import 'rc-tooltip/lib/placements';
|
|
10
11
|
import 'clsx';
|
|
11
12
|
|
|
12
|
-
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-auto-tips {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-auto-tips > .auto-tips-content {\n display: inline;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.paraui-v3-auto-tips-tooltip .component-tooltip-inner {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
|
|
13
|
+
var css_248z = "@charset \"UTF-8\";\n/**\n* @author linhd\n* @date 2021/11/1 20:28\n* @description 文字隐藏...\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-auto-tips {\n max-width: 100%;\n display: block;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-auto-tips > .auto-tips-content {\n display: inline;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.paraui-v3-auto-tips.paraui-v3-auto-tips-safari > .auto-tips-content::before {\n content: \"\";\n display: block;\n}\n\n.paraui-v3-auto-tips-tooltip .component-tooltip-inner {\n max-height: calc(100vh - 25px);\n overflow: auto;\n}";
|
|
13
14
|
styleInject(css_248z);
|
|
14
15
|
|
|
15
16
|
var AutoTips = function AutoTips(props) {
|
|
@@ -42,11 +43,26 @@ var AutoTips = function AutoTips(props) {
|
|
|
42
43
|
var val = '';
|
|
43
44
|
var tipsEle = tipsElm.current;
|
|
44
45
|
var tipsEleRect = tipsEle.getBoundingClientRect();
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
var textEleRect = textElm.current.getBoundingClientRect();
|
|
47
|
+
if (tipsElm.current) {
|
|
48
|
+
if (isIE()) {
|
|
49
|
+
if (tipsEleRect.width > textEleRect.width) {
|
|
50
|
+
if (tips) {
|
|
51
|
+
val = tips;
|
|
52
|
+
} else {
|
|
53
|
+
val = beyondText ? tipsEle.innerText : children;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
48
56
|
} else {
|
|
49
|
-
|
|
57
|
+
// mac:safari,firefox,chrome
|
|
58
|
+
// windows: firefox,chrome
|
|
59
|
+
if (textEleRect.width > tipsEleRect.width) {
|
|
60
|
+
if (tips) {
|
|
61
|
+
val = tips;
|
|
62
|
+
} else {
|
|
63
|
+
val = beyondText ? tipsEle.innerText : children;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
50
66
|
}
|
|
51
67
|
}
|
|
52
68
|
setTTips(val);
|
|
@@ -56,9 +72,17 @@ var AutoTips = function AutoTips(props) {
|
|
|
56
72
|
if (tipMaxWidth) return tipMaxWidth;
|
|
57
73
|
return tipsElm && tipsElm.current ? tipsElm.current.offsetWidth : 0;
|
|
58
74
|
};
|
|
75
|
+
// 判断浏览器是否是safari
|
|
76
|
+
var isSafari = function isSafari() {
|
|
77
|
+
var userAgent = navigator.userAgent;
|
|
78
|
+
if (userAgent.indexOf("Safari") > -1) {
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
};
|
|
59
82
|
// 处理class
|
|
60
83
|
var handClass = function handClass() {
|
|
61
84
|
var str = $prefixCls + '-auto-tips';
|
|
85
|
+
if (isSafari()) str += ' ' + $prefixCls + '-auto-tips-safari';
|
|
62
86
|
if (className) str += ' ' + className;
|
|
63
87
|
return str;
|
|
64
88
|
};
|
package/Breadcrumbs/index.js
CHANGED
package/ComboSelect/index.js
CHANGED
|
@@ -8,7 +8,7 @@ import SearchIcon from '@para-ui/icons/Search';
|
|
|
8
8
|
import CloseIcon from '@para-ui/icons/Close';
|
|
9
9
|
import CloseCircle from '@para-ui/icons/CloseCircle';
|
|
10
10
|
import Table from '../Table/index.js';
|
|
11
|
-
import { T as Tree } from '../_verture/index-
|
|
11
|
+
import { T as Tree } from '../_verture/index-c50e7727.js';
|
|
12
12
|
import { Button } from '../Button/index.js';
|
|
13
13
|
import { D as Dropdown } from '../_verture/index-be4faaee.js';
|
|
14
14
|
import { Popover } from '../Popover/index.js';
|
package/Form/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { _ as _slicedToArray } from '../_verture/slicedToArray-77980792.js';
|
|
|
3
3
|
import { jsx } from 'react/jsx-runtime';
|
|
4
4
|
import { DeepClone } from '@paraview/lib';
|
|
5
5
|
import React__default from 'react';
|
|
6
|
-
import { F as FormItem, v as validate } from '../_verture/index-
|
|
6
|
+
import { F as FormItem, v as validate } from '../_verture/index-291a16a8.js';
|
|
7
7
|
import { $ as $prefixCls } from '../_verture/constant-66aa48a1.js';
|
|
8
8
|
import '../TextField/index.js';
|
|
9
9
|
import '../_verture/typeof-498dd2b1.js';
|
|
@@ -68,7 +68,7 @@ import '@para-ui/icons/Left';
|
|
|
68
68
|
import 'rc-pagination';
|
|
69
69
|
import '@para-ui/icons/Right';
|
|
70
70
|
import '@para-ui/icons/DoubleRight';
|
|
71
|
-
import '../_verture/index-
|
|
71
|
+
import '../_verture/index-c50e7727.js';
|
|
72
72
|
import 'rc-tree';
|
|
73
73
|
import '@para-ui/icons/Document';
|
|
74
74
|
import 'react-dom';
|
package/FormItem/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react/jsx-runtime';
|
|
2
2
|
import 'react';
|
|
3
|
-
export { F as default } from '../_verture/index-
|
|
3
|
+
export { F as default } from '../_verture/index-291a16a8.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
6
|
import '../_verture/constant-66aa48a1.js';
|
|
@@ -68,7 +68,7 @@ import '@para-ui/icons/Left';
|
|
|
68
68
|
import 'rc-pagination';
|
|
69
69
|
import '@para-ui/icons/Right';
|
|
70
70
|
import '@para-ui/icons/DoubleRight';
|
|
71
|
-
import '../_verture/index-
|
|
71
|
+
import '../_verture/index-c50e7727.js';
|
|
72
72
|
import 'rc-tree';
|
|
73
73
|
import '@para-ui/icons/Document';
|
|
74
74
|
import 'react-dom';
|
package/README.md
CHANGED
package/Selector/index.js
CHANGED
|
@@ -87,6 +87,7 @@ var SelectorNode = function SelectorNode(props) {
|
|
|
87
87
|
mainTitle = props.mainTitle,
|
|
88
88
|
subTitle = props.subTitle,
|
|
89
89
|
tag = props.tag,
|
|
90
|
+
tagStyle = props.tagStyle,
|
|
90
91
|
detail = props.detail,
|
|
91
92
|
detailRender = props.detailRender,
|
|
92
93
|
leftRender = props.leftRender,
|
|
@@ -243,7 +244,8 @@ var SelectorNode = function SelectorNode(props) {
|
|
|
243
244
|
children: subTitle
|
|
244
245
|
})
|
|
245
246
|
})), tag && jsx("span", Object.assign({
|
|
246
|
-
className: "tag"
|
|
247
|
+
className: "tag",
|
|
248
|
+
style: tagStyle
|
|
247
249
|
}, {
|
|
248
250
|
children: tag
|
|
249
251
|
}))]
|
|
@@ -263,7 +265,8 @@ var SelectorNode = function SelectorNode(props) {
|
|
|
263
265
|
children: mainTitle
|
|
264
266
|
})
|
|
265
267
|
})), tag && jsx("span", Object.assign({
|
|
266
|
-
className: "tag"
|
|
268
|
+
className: "tag",
|
|
269
|
+
style: tagStyle
|
|
267
270
|
}, {
|
|
268
271
|
children: tag
|
|
269
272
|
}))]
|
|
@@ -547,7 +550,7 @@ var SelectorMainContent = function SelectorMainContent(props) {
|
|
|
547
550
|
/** 节点类型 */
|
|
548
551
|
if (item.leaf !== undefined) json.nodeMode = item.leaf ? 'leaf' : 'branch';
|
|
549
552
|
/** 渲染字段 */
|
|
550
|
-
var arr = ['img', 'mainTitle', 'subTitle', 'tag'];
|
|
553
|
+
var arr = ['img', 'mainTitle', 'subTitle', 'tag', 'tagStyle'];
|
|
551
554
|
for (var i = 0, l = arr.length; i < l; i++) {
|
|
552
555
|
var key = arr[i];
|
|
553
556
|
json[key] = item[key];
|
|
@@ -980,7 +983,8 @@ var SelectorData = function SelectorData(props) {
|
|
|
980
983
|
onClose: function onClose() {
|
|
981
984
|
return _onClose && _onClose(item, index);
|
|
982
985
|
},
|
|
983
|
-
disabled: handDisabled(itemConfig)
|
|
986
|
+
disabled: handDisabled(itemConfig),
|
|
987
|
+
tagStyle: item.tagStyle
|
|
984
988
|
};
|
|
985
989
|
if (selectRenderItem) {
|
|
986
990
|
json.leftRender = function () {
|
package/Selector/interface.d.ts
CHANGED
|
@@ -61,6 +61,8 @@ export interface SelectorAnyJson {
|
|
|
61
61
|
subTitle?: ReactNode;
|
|
62
62
|
/** 标签 */
|
|
63
63
|
tag?: ReactNode;
|
|
64
|
+
/** 标签样式 */
|
|
65
|
+
tagStyle?: React.CSSProperties;
|
|
64
66
|
/** 下级字段 */
|
|
65
67
|
children?: SelectorAnyJson[];
|
|
66
68
|
/** 禁用 */
|
|
@@ -168,6 +170,8 @@ export interface SelectorNodeProps {
|
|
|
168
170
|
subTitle?: ReactNode;
|
|
169
171
|
/** 标签 */
|
|
170
172
|
tag?: ReactNode;
|
|
173
|
+
/** 标签样式 */
|
|
174
|
+
tagStyle?: React.CSSProperties;
|
|
171
175
|
/** 详情 */
|
|
172
176
|
detail?: boolean;
|
|
173
177
|
/** 详情渲染 */
|
package/Tag/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import Plus from '@para-ui/icons/Plus';
|
|
|
14
14
|
import '../Tooltip/index.js';
|
|
15
15
|
import 'rc-tooltip';
|
|
16
16
|
import 'rc-tooltip/lib/placements';
|
|
17
|
+
import '@paraview/lib';
|
|
17
18
|
|
|
18
19
|
var css_248z = "@charset \"UTF-8\";\n/**\n* @author Hanz\n* @date 2022/1/12 上午9:43\n* @description\n*/\n/**\n* @author Hanz\n* @date 2021/10/20 下午2:08\n* @description color\n*/\n.paraui-v3-tag {\n display: inline-flex;\n justify-content: center;\n align-items: center;\n max-width: 100%;\n height: 24px;\n margin: 0 8px 8px 0;\n padding: 0 12px;\n font-size: 12px;\n color: rgb(46, 55, 67);\n white-space: nowrap;\n background: rgba(171, 176, 185, 0.2);\n border-radius: 4px;\n /*&.paraui-v3-tag-small {\n line-height: 24px;\n\n &.paraui-v3-tag-bordered {\n line-height: 22px;\n }\n }*/\n}\n.paraui-v3-tag.paraui-v3-tag-bordered {\n border: 1px solid rgba(171, 176, 185, 0.2);\n line-height: 22px;\n}\n.paraui-v3-tag.paraui-v3-tag-large {\n line-height: 28px;\n}\n.paraui-v3-tag.paraui-v3-tag-large.paraui-v3-tag-bordered {\n line-height: 26px;\n}\n.paraui-v3-tag > svg {\n color: inherit;\n font-size: 16px;\n}\n.paraui-v3-tag .tag-close-icon {\n margin-left: 4px;\n color: inherit;\n font-size: 16px;\n cursor: pointer;\n}\n.paraui-v3-tag .tag-close-icon:hover {\n color: inherit;\n}\n.paraui-v3-tag > svg + .paraui-v3-auto-tips {\n margin-left: 4px;\n}\n.paraui-v3-tag.paraui-v3-tag-has-color, .paraui-v3-tag.paraui-v3-tag-has-color svg, .paraui-v3-tag.paraui-v3-tag-has-color svg:hover {\n color: inherit;\n}\n.paraui-v3-tag.paraui-v3-tag-blue {\n color: rgb(54, 102, 214);\n background-color: rgba(54, 102, 214, 0.05);\n}\n.paraui-v3-tag.paraui-v3-tag-green {\n color: rgb(83, 195, 27);\n background-color: rgba(83, 195, 27, 0.05);\n}\n.paraui-v3-tag.paraui-v3-tag-yellow {\n color: rgb(255, 161, 80);\n background-color: rgba(255, 161, 80, 0.05);\n}\n.paraui-v3-tag.paraui-v3-tag-red {\n color: rgb(235, 96, 84);\n background-color: rgba(235, 96, 84, 0.05);\n}\n.paraui-v3-tag.paraui-v3-tag-hidden {\n display: none;\n}\n\n.paraui-v3-tag-group {\n display: flex;\n align-items: center;\n flex-flow: row wrap;\n}\n.paraui-v3-tag-group .tag-group-input {\n width: 78px;\n height: 24px;\n align-self: flex-start;\n font-size: 12px;\n color: rgb(46, 55, 67);\n text-indent: 8px;\n border: 1px solid rgba(171, 176, 185, 0.4);\n border-radius: 4px;\n}\n.paraui-v3-tag-group .tag-group-input .tag-group-input-large {\n height: 28px;\n}\n.paraui-v3-tag-group .tag-group-new .tag-group-new-icon {\n padding: 0 5px;\n}";
|
|
19
20
|
styleInject(css_248z);
|
package/Tree/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { T as Tree } from '../_verture/index-
|
|
2
|
-
export { T as default } from '../_verture/index-
|
|
1
|
+
import { T as Tree } from '../_verture/index-c50e7727.js';
|
|
2
|
+
export { T as default } from '../_verture/index-c50e7727.js';
|
|
3
3
|
import '../_verture/toConsumableArray-87c7d895.js';
|
|
4
4
|
import '../_verture/slicedToArray-77980792.js';
|
|
5
5
|
import '../_verture/defineProperty-62acccfc.js';
|
|
File without changes
|
|
File without changes
|
package/index.js
CHANGED
|
@@ -20,7 +20,7 @@ export { Drawer } from './Drawer/index.js';
|
|
|
20
20
|
export { D as Dropdown } from './_verture/index-be4faaee.js';
|
|
21
21
|
export { default as Empty } from './Empty/index.js';
|
|
22
22
|
export { default as Form } from './Form/index.js';
|
|
23
|
-
export { F as FormItem } from './_verture/index-
|
|
23
|
+
export { F as FormItem } from './_verture/index-291a16a8.js';
|
|
24
24
|
export { u as FunctionModal, F as FunctionModalProvider, a as useClose } from './_verture/modalContext-c749e1c6.js';
|
|
25
25
|
export { default as GlobalContext, changeConfirmLocale, getConfirmLocale } from './GlobalContext/index.js';
|
|
26
26
|
export { default as Help } from './Help/index.js';
|
|
@@ -68,7 +68,7 @@ export { Title } from './Title/index.js';
|
|
|
68
68
|
export { ToggleButton, ToggleButtonGroup } from './ToggleButton/index.js';
|
|
69
69
|
export { Tooltip } from './Tooltip/index.js';
|
|
70
70
|
export { SSortablejs, Transfer } from './Transfer/index.js';
|
|
71
|
-
export { T as Tree } from './_verture/index-
|
|
71
|
+
export { T as Tree } from './_verture/index-c50e7727.js';
|
|
72
72
|
export { default as Upload } from './Upload/index.js';
|
|
73
73
|
import './_verture/slicedToArray-77980792.js';
|
|
74
74
|
import 'react/jsx-runtime';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@para-ui/core",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.35",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
7
7
|
"description": "Powered by Para FED",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"http://192.168.3.1:10000",
|
|
163
163
|
"http://192.168.2.83:10000",
|
|
164
164
|
"http://10.10.2.48:10000",
|
|
165
|
-
"http://10.10.2.252:
|
|
165
|
+
"http://10.10.2.252:10000"
|
|
166
166
|
]
|
|
167
167
|
}
|
|
168
168
|
}
|