@para-ui/core 4.0.25 → 4.0.27
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/Cascader/index.js +4 -5
- package/ComboSelect/index.js +19 -7
- package/ComboSelect/interface.d.ts +4 -0
- package/CycleSelector/index.d.ts +5 -0
- package/CycleSelector/index.js +24 -15
- package/DatePicker/index.js +1 -2
- package/DynamicMultiBox/index.js +7 -5
- package/Form/index.js +6 -3
- package/FormItem/index.js +6 -3
- package/Image/index.js +2 -3
- package/README.md +6 -0
- package/Selector/index.js +2 -325
- package/SelectorPicker/index.js +1 -0
- package/TimePicker/index.js +1 -2
- package/Transfer/index.js +43 -49
- package/Tree/index.js +8 -5
- package/Upload/index.js +2 -3
- package/_verture/{Portal-5bd49559.js → Portal-5bf66fed.js} +1 -2
- package/_verture/{defineProperty-6f62bb2a.js → defineProperty-f0e15205.js} +10 -2
- package/_verture/{index-93662604.js → index-28edf318.js} +395 -314
- package/_verture/index-8ac46bd9.js +327 -0
- package/_verture/{index-5f205d87.js → index-8ec857b4.js} +2 -3
- package/index.js +6 -6
- package/package.json +1 -1
- package/umd/ComboSelect.js +1 -1
- package/umd/CycleSelector.js +1 -1
- package/umd/DynamicMultiBox.js +1 -1
- package/umd/Form.js +1 -1
- package/umd/FormItem.js +1 -1
- package/_verture/typeof-adeedc13.js +0 -11
- /package/_verture/{index-0eca82dc.js → index-33866394.js} +0 -0
package/Cascader/index.js
CHANGED
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import { C as Cascader } from '../_verture/index-
|
|
2
|
-
export { C as default } from '../_verture/index-
|
|
1
|
+
import { C as Cascader } from '../_verture/index-8ec857b4.js';
|
|
2
|
+
export { C as default } from '../_verture/index-8ec857b4.js';
|
|
3
3
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
|
-
import '../_verture/Portal-
|
|
5
|
+
import '../_verture/Portal-5bf66fed.js';
|
|
6
6
|
import '../_verture/slicedToArray-a8206399.js';
|
|
7
7
|
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
8
8
|
import 'react';
|
|
9
9
|
import 'react-dom';
|
|
10
|
-
import '../_verture/
|
|
10
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
11
11
|
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
12
|
-
import '../_verture/defineProperty-6f62bb2a.js';
|
|
13
12
|
import 'rc-motion';
|
|
14
13
|
import 'clsx';
|
|
15
14
|
import '../_verture/typeof-6ec38efd.js';
|
package/ComboSelect/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import SearchIcon from '@para-ui/icons/Search';
|
|
|
6
6
|
import CloseIcon from '@para-ui/icons/Close';
|
|
7
7
|
import CloseCircleF from '@para-ui/icons/CloseCircleF';
|
|
8
8
|
import Table from '../Table/index.js';
|
|
9
|
-
import { T as Tree } from '../_verture/index-
|
|
9
|
+
import { T as Tree } from '../_verture/index-28edf318.js';
|
|
10
10
|
import { Button } from '../Button/index.js';
|
|
11
11
|
import { D as Dropdown } from '../_verture/index-bde7aabe.js';
|
|
12
12
|
import { Popover } from '../Popover/index.js';
|
|
@@ -56,11 +56,14 @@ import 'rc-pagination';
|
|
|
56
56
|
import '@para-ui/icons/Right';
|
|
57
57
|
import '@para-ui/icons/DoubleLeft';
|
|
58
58
|
import '@para-ui/icons/DoubleRight';
|
|
59
|
+
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
60
|
+
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
61
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
62
|
+
import '../_verture/slicedToArray-a8206399.js';
|
|
63
|
+
import '../_verture/index-8ac46bd9.js';
|
|
64
|
+
import '../_verture/typeof-6ec38efd.js';
|
|
59
65
|
import 'rc-tree';
|
|
60
|
-
import '../_verture/typeof-adeedc13.js';
|
|
61
66
|
import '@para-ui/icons/Document';
|
|
62
|
-
import '../_verture/slicedToArray-a8206399.js';
|
|
63
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
64
67
|
import 'react-dom';
|
|
65
68
|
import '@para-ui/icons/EditFile';
|
|
66
69
|
import '@para-ui/icons/PlusCircle';
|
|
@@ -166,7 +169,9 @@ const ComboSelect = props => {
|
|
|
166
169
|
dropdownMatchSelectWidth = true,
|
|
167
170
|
getPopupContainer,
|
|
168
171
|
maxTagTextLength,
|
|
169
|
-
renderInputContent
|
|
172
|
+
renderInputContent,
|
|
173
|
+
renderTagLabel,
|
|
174
|
+
renderMoreTagLabel
|
|
170
175
|
} = useGlobalProps(props, 'ComboSelect');
|
|
171
176
|
const {
|
|
172
177
|
language,
|
|
@@ -626,6 +631,9 @@ const ComboSelect = props => {
|
|
|
626
631
|
closable = true
|
|
627
632
|
} = item !== null && item !== void 0 ? item : {};
|
|
628
633
|
let displayLabel = item[outputTitle];
|
|
634
|
+
if (renderTagLabel) {
|
|
635
|
+
displayLabel = renderTagLabel(item);
|
|
636
|
+
}
|
|
629
637
|
let isOverflow = false;
|
|
630
638
|
//限制tag文本长度
|
|
631
639
|
if (typeof maxTagTextLength === 'number') {
|
|
@@ -705,7 +713,7 @@ const ComboSelect = props => {
|
|
|
705
713
|
}, {
|
|
706
714
|
children: [list, renderOverTag()]
|
|
707
715
|
}));
|
|
708
|
-
}, [checkList, onChange, checkable, morePos, maxTagTextLength, outputTitle, tagRender, renderInputContent, overLine]);
|
|
716
|
+
}, [checkList, onChange, checkable, morePos, maxTagTextLength, outputTitle, tagRender, renderInputContent, renderTagLabel, overLine]);
|
|
709
717
|
//处理参数
|
|
710
718
|
const getParams = useMemo(() => {
|
|
711
719
|
let P = params || emptyParamsRef.current;
|
|
@@ -913,6 +921,10 @@ const ComboSelect = props => {
|
|
|
913
921
|
const generateMoreTag = () => {
|
|
914
922
|
return checkList.map((item, idx) => {
|
|
915
923
|
if (morePos !== null && morePos > idx) return null;
|
|
924
|
+
let label = item[outputTitle];
|
|
925
|
+
if (renderMoreTagLabel) {
|
|
926
|
+
label = renderMoreTagLabel(item);
|
|
927
|
+
}
|
|
916
928
|
return jsxs("div", Object.assign({
|
|
917
929
|
className: "comboselect-more-item"
|
|
918
930
|
}, {
|
|
@@ -920,7 +932,7 @@ const ComboSelect = props => {
|
|
|
920
932
|
className: "comboselect-more-item-text"
|
|
921
933
|
}, {
|
|
922
934
|
children: jsx(AutoTips, {
|
|
923
|
-
children:
|
|
935
|
+
children: label
|
|
924
936
|
})
|
|
925
937
|
})), jsx("span", Object.assign({
|
|
926
938
|
className: 'comboselect-more-item-remove',
|
|
@@ -150,4 +150,8 @@ export interface ComboSelectProps extends HelperTextDetailProps {
|
|
|
150
150
|
maxTagTextLength?: number;
|
|
151
151
|
/** 自定义渲染输入框内容 */
|
|
152
152
|
renderInputContent?: (options: SelectOpt | SelectOpt[]) => React.ReactNode;
|
|
153
|
+
/** 渲染 tag label */
|
|
154
|
+
renderTagLabel?: (option: SelectOpt) => React.ReactNode;
|
|
155
|
+
/** 渲染 more tag label */
|
|
156
|
+
renderMoreTagLabel?: (option: SelectOpt) => React.ReactNode;
|
|
153
157
|
}
|
package/CycleSelector/index.d.ts
CHANGED
|
@@ -33,6 +33,9 @@ declare type DisabledTimes = {
|
|
|
33
33
|
disabledSeconds?: (hour: number, minute: number) => number[];
|
|
34
34
|
};
|
|
35
35
|
declare type DisabledTime<DateType> = (date: DateType | null) => DisabledTimes;
|
|
36
|
+
export interface CycleSelectorRefProps {
|
|
37
|
+
getTipText: (val?: CycleSelectorValueProps) => React.ReactNode;
|
|
38
|
+
}
|
|
36
39
|
export interface CycleSelectorProps extends HelperTextDetailProps {
|
|
37
40
|
className?: string;
|
|
38
41
|
style?: React.CSSProperties;
|
|
@@ -45,6 +48,8 @@ export interface CycleSelectorProps extends HelperTextDetailProps {
|
|
|
45
48
|
timeType?: 'zone' | 'stamp';
|
|
46
49
|
/** 提示文本自定义渲染 */
|
|
47
50
|
tipRender?: () => React.ReactNode;
|
|
51
|
+
/** 获取组件内部方法 */
|
|
52
|
+
cRef?: React.MutableRefObject<CycleSelectorRefProps>;
|
|
48
53
|
/** 禁用 */
|
|
49
54
|
disabled?: boolean;
|
|
50
55
|
/** 禁用日期 */
|
package/CycleSelector/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
2
|
-
import React__default, { useState, useRef, useEffect } from 'react';
|
|
2
|
+
import React__default, { useState, useRef, useEffect, useImperativeHandle } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import CloseIcon from '@para-ui/icons/Close';
|
|
@@ -27,8 +27,7 @@ import '@para-ui/icons/Forbid';
|
|
|
27
27
|
import '@paraview/lib';
|
|
28
28
|
import '../_verture/tinycolor-ece3542d.js';
|
|
29
29
|
import '@para-ui/icons/Plus';
|
|
30
|
-
import '../_verture/defineProperty-
|
|
31
|
-
import '../_verture/typeof-adeedc13.js';
|
|
30
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
32
31
|
import 'rc-picker';
|
|
33
32
|
import '@para-ui/icons/CloseCircleF';
|
|
34
33
|
import '@para-ui/icons/Calendar';
|
|
@@ -238,6 +237,7 @@ const CycleSelector = props => {
|
|
|
238
237
|
timeType,
|
|
239
238
|
tipRender,
|
|
240
239
|
showPopover,
|
|
240
|
+
cRef,
|
|
241
241
|
onChange
|
|
242
242
|
} = props;
|
|
243
243
|
const {
|
|
@@ -314,6 +314,13 @@ const CycleSelector = props => {
|
|
|
314
314
|
if (showPopover) handlePopoverDefaultValue();
|
|
315
315
|
}
|
|
316
316
|
}, [showPopover]);
|
|
317
|
+
useImperativeHandle(cRef, () => {
|
|
318
|
+
return {
|
|
319
|
+
getTipText: val => {
|
|
320
|
+
return handleText(val, true);
|
|
321
|
+
}
|
|
322
|
+
};
|
|
323
|
+
});
|
|
317
324
|
// 出参
|
|
318
325
|
const handleTimeOut = val => {
|
|
319
326
|
if (!val) return '';
|
|
@@ -476,17 +483,18 @@ const CycleSelector = props => {
|
|
|
476
483
|
handlePopoverDefaultValue();
|
|
477
484
|
};
|
|
478
485
|
// 自定义周期文案提示
|
|
479
|
-
const handleText = () => {
|
|
486
|
+
const handleText = (val, bol) => {
|
|
480
487
|
var _a, _b, _c, _d, _e;
|
|
481
|
-
|
|
488
|
+
const handValue = val ? val : value;
|
|
489
|
+
if ((handValue === null || handValue === void 0 ? void 0 : handValue.cycleType) !== 5 || error) return;
|
|
482
490
|
const text = [];
|
|
483
|
-
const everyText1 = intl('every') +
|
|
491
|
+
const everyText1 = intl('every') + handValue.frequency + intl(handValue.frequencyUnit);
|
|
484
492
|
const timeText = (_a = constData.current.timeDetail) === null || _a === void 0 ? void 0 : _a.hm;
|
|
485
493
|
if (tipRender) return tipRender();
|
|
486
|
-
if (
|
|
494
|
+
if (handValue.frequencyUnit === 'week') {
|
|
487
495
|
const arr = [];
|
|
488
496
|
let str;
|
|
489
|
-
(_b =
|
|
497
|
+
(_b = handValue.executionDay) === null || _b === void 0 ? void 0 : _b.split(',').forEach(item => {
|
|
490
498
|
let index = Number(item) - 1;
|
|
491
499
|
if (index === 0) {
|
|
492
500
|
index = 7;
|
|
@@ -500,12 +508,12 @@ const CycleSelector = props => {
|
|
|
500
508
|
every: everyText1 + arr.join('、'),
|
|
501
509
|
time: timeText
|
|
502
510
|
}));
|
|
503
|
-
} else if (
|
|
511
|
+
} else if (handValue.frequencyUnit === 'month') {
|
|
504
512
|
text.push(intl('text1', {
|
|
505
513
|
every: everyText1,
|
|
506
|
-
time: ((_c = constData.current.monthCycleTypeListMap) === null || _c === void 0 ? void 0 : _c[
|
|
514
|
+
time: ((_c = constData.current.monthCycleTypeListMap) === null || _c === void 0 ? void 0 : _c[handValue.monthCycleType]) + timeText
|
|
507
515
|
}));
|
|
508
|
-
} else if (
|
|
516
|
+
} else if (handValue.frequencyUnit === 'day') {
|
|
509
517
|
text.push(intl('text1', {
|
|
510
518
|
every: everyText1,
|
|
511
519
|
time: timeText
|
|
@@ -520,16 +528,17 @@ const CycleSelector = props => {
|
|
|
520
528
|
time: str.join('') + " " + timeText
|
|
521
529
|
}));
|
|
522
530
|
}
|
|
523
|
-
if (
|
|
531
|
+
if (handValue.endType === 2) {
|
|
524
532
|
text.push(intl('text2', {
|
|
525
|
-
limitNum:
|
|
533
|
+
limitNum: handValue.limitNum
|
|
526
534
|
}));
|
|
527
535
|
}
|
|
528
|
-
if (
|
|
536
|
+
if (handValue.endType === 1) {
|
|
529
537
|
text.push(intl('text3', {
|
|
530
|
-
date: handleTimeEnter(
|
|
538
|
+
date: handleTimeEnter(handValue.endTime, 'YYYY-MM-DD')
|
|
531
539
|
}));
|
|
532
540
|
}
|
|
541
|
+
if (bol) return text;
|
|
533
542
|
return jsxs("p", Object.assign({
|
|
534
543
|
className: 'text-tip'
|
|
535
544
|
}, {
|
package/DatePicker/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import dayjsGenerateConfig from 'rc-picker/es/generate/dayjs';
|
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { Button } from '../Button/index.js';
|
|
4
4
|
import { Tag } from '../Tag/index.js';
|
|
5
|
-
import {
|
|
5
|
+
import { a as _defineProperty } from '../_verture/defineProperty-f0e15205.js';
|
|
6
6
|
import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
7
7
|
import React__default, { forwardRef, useImperativeHandle } from 'react';
|
|
8
8
|
import clsx from 'clsx';
|
|
@@ -35,7 +35,6 @@ import '@para-ui/icons/Close';
|
|
|
35
35
|
import '@para-ui/icons/EditOutline';
|
|
36
36
|
import '../_verture/tinycolor-ece3542d.js';
|
|
37
37
|
import '@para-ui/icons/Plus';
|
|
38
|
-
import '../_verture/typeof-adeedc13.js';
|
|
39
38
|
import '../Help/index.js';
|
|
40
39
|
import '@para-ui/icons/Help';
|
|
41
40
|
|
package/DynamicMultiBox/index.js
CHANGED
|
@@ -70,12 +70,15 @@ import 'rc-pagination';
|
|
|
70
70
|
import '@para-ui/icons/Right';
|
|
71
71
|
import '@para-ui/icons/DoubleLeft';
|
|
72
72
|
import '@para-ui/icons/DoubleRight';
|
|
73
|
-
import '../_verture/index-
|
|
73
|
+
import '../_verture/index-28edf318.js';
|
|
74
|
+
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
75
|
+
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
76
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
77
|
+
import '../_verture/slicedToArray-a8206399.js';
|
|
78
|
+
import '../_verture/index-8ac46bd9.js';
|
|
79
|
+
import '../_verture/typeof-6ec38efd.js';
|
|
74
80
|
import 'rc-tree';
|
|
75
|
-
import '../_verture/typeof-adeedc13.js';
|
|
76
81
|
import '@para-ui/icons/Document';
|
|
77
|
-
import '../_verture/slicedToArray-a8206399.js';
|
|
78
|
-
import '../_verture/unsupportedIterableToArray-cb478f24.js';
|
|
79
82
|
import 'react-dom';
|
|
80
83
|
import '@para-ui/icons/EditFile';
|
|
81
84
|
import '@para-ui/icons/PlusCircle';
|
|
@@ -87,7 +90,6 @@ import '../Tag/index.js';
|
|
|
87
90
|
import '@para-ui/icons/EditOutline';
|
|
88
91
|
import '../_verture/tinycolor-ece3542d.js';
|
|
89
92
|
import '@para-ui/icons/Plus';
|
|
90
|
-
import '../_verture/defineProperty-6f62bb2a.js';
|
|
91
93
|
import 'rc-picker';
|
|
92
94
|
import '@para-ui/icons/Calendar';
|
|
93
95
|
import '@para-ui/icons/Time';
|
package/Form/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { DeepClone } from '@paraview/lib';
|
|
3
3
|
import React__default from 'react';
|
|
4
|
-
import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-
|
|
4
|
+
import { F as FormItem, l as localeJson, v as validate } from '../_verture/index-33866394.js';
|
|
5
5
|
import { $ as $prefixCls } from '../_verture/constant-5317fc89.js';
|
|
6
6
|
import { u as useFormatMessage } from '../_verture/useFormatMessage-1fc7c957.js';
|
|
7
7
|
import '../TextField/index.js';
|
|
@@ -69,9 +69,12 @@ import 'rc-pagination';
|
|
|
69
69
|
import '@para-ui/icons/Right';
|
|
70
70
|
import '@para-ui/icons/DoubleLeft';
|
|
71
71
|
import '@para-ui/icons/DoubleRight';
|
|
72
|
-
import '../_verture/index-
|
|
72
|
+
import '../_verture/index-28edf318.js';
|
|
73
|
+
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
74
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
75
|
+
import '../_verture/index-8ac46bd9.js';
|
|
76
|
+
import '../_verture/typeof-6ec38efd.js';
|
|
73
77
|
import 'rc-tree';
|
|
74
|
-
import '../_verture/typeof-adeedc13.js';
|
|
75
78
|
import '@para-ui/icons/Document';
|
|
76
79
|
import 'react-dom';
|
|
77
80
|
import '@para-ui/icons/EditFile';
|
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-33866394.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
6
|
import '../_verture/constant-5317fc89.js';
|
|
@@ -69,9 +69,12 @@ import 'rc-pagination';
|
|
|
69
69
|
import '@para-ui/icons/Right';
|
|
70
70
|
import '@para-ui/icons/DoubleLeft';
|
|
71
71
|
import '@para-ui/icons/DoubleRight';
|
|
72
|
-
import '../_verture/index-
|
|
72
|
+
import '../_verture/index-28edf318.js';
|
|
73
|
+
import '../_verture/toConsumableArray-8f4c9589.js';
|
|
74
|
+
import '../_verture/defineProperty-f0e15205.js';
|
|
75
|
+
import '../_verture/index-8ac46bd9.js';
|
|
76
|
+
import '../_verture/typeof-6ec38efd.js';
|
|
73
77
|
import 'rc-tree';
|
|
74
|
-
import '../_verture/typeof-adeedc13.js';
|
|
75
78
|
import '@para-ui/icons/Document';
|
|
76
79
|
import 'react-dom';
|
|
77
80
|
import '@para-ui/icons/EditFile';
|
package/Image/index.js
CHANGED
|
@@ -2,10 +2,9 @@ import { _ as __rest } from '../_verture/tslib.es6-55ed4bd2.js';
|
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import React__default, { useState, useRef, useEffect, useContext, useMemo } from 'react';
|
|
5
|
-
import { i as warningOnce, d as wrapperRaf, _ as _objectSpread2, w as warning, c as clsx, P as Portal, K as KeyCode, b as _objectWithoutProperties, a as _extends, j as useMergedState } from '../_verture/Portal-
|
|
6
|
-
import { _ as _defineProperty } from '../_verture/defineProperty-
|
|
5
|
+
import { i as warningOnce, d as wrapperRaf, _ as _objectSpread2, w as warning, c as clsx, P as Portal, K as KeyCode, b as _objectWithoutProperties, a as _extends, j as useMergedState } from '../_verture/Portal-5bf66fed.js';
|
|
6
|
+
import { _ as _typeof, a as _defineProperty } from '../_verture/defineProperty-f0e15205.js';
|
|
7
7
|
import { _ as _slicedToArray } from '../_verture/slicedToArray-a8206399.js';
|
|
8
|
-
import { _ as _typeof } from '../_verture/typeof-adeedc13.js';
|
|
9
8
|
import Dialog from 'rc-dialog';
|
|
10
9
|
import ReactDOM from 'react-dom';
|
|
11
10
|
import CSSMotion from 'rc-motion';
|