@para-ui/core 4.0.24 → 4.0.26
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 +14 -14
- package/Cascader/index.js +2 -2
- package/ComboSelect/index.js +1 -1
- package/CycleSelector/index.d.ts +19 -2
- package/CycleSelector/index.js +64 -15
- package/DynamicMultiBox/index.js +1 -1
- package/Form/index.js +2 -2
- package/FormItem/index.js +2 -2
- package/FunctionModal/index.js +2 -2
- package/README.md +10 -0
- package/Selector/index.js +325 -2
- package/SelectorPicker/index.js +0 -1
- package/Switch/index.js +2 -2
- package/Tree/index.js +2 -2
- package/Upload/index.js +479 -756
- package/index.js +4 -5
- package/package.json +1 -1
- package/umd/AutoTips.js +1 -1
- package/umd/Breadcrumbs.js +1 -1
- package/umd/Button.js +1 -1
- package/umd/ButtonGroup.js +1 -1
- package/umd/Cascader.js +1 -1
- package/umd/ComboSelect.js +1 -1
- package/umd/CopyText.js +1 -1
- package/umd/CycleSelector.js +2 -2
- package/umd/DatePicker.js +1 -1
- package/umd/Descriptions.js +1 -1
- package/umd/Desktop.js +1 -1
- package/umd/Drawer.js +1 -1
- package/umd/DynamicMultiBox.js +1 -1
- package/umd/Form.js +1 -1
- package/umd/FormItem.js +1 -1
- package/umd/FunctionModal.js +1 -1
- package/umd/InputLang.js +1 -1
- package/umd/Menu.js +1 -1
- package/umd/Modal.js +1 -1
- package/umd/MultiBox.js +1 -1
- package/umd/OperateBtn.js +1 -1
- package/umd/PageHeader.js +1 -1
- package/umd/Pagination.js +1 -1
- package/umd/PopConfirm.js +1 -1
- package/umd/PopMenu.js +1 -1
- package/umd/QuickReply.js +1 -1
- package/umd/Search.js +1 -1
- package/umd/Select.js +1 -1
- package/umd/SelectInput.js +1 -1
- package/umd/Selector.js +1 -1
- package/umd/SelectorPicker.js +1 -1
- package/umd/SingleBox.js +1 -1
- package/umd/Stepper.js +1 -1
- package/umd/Table.js +1 -1
- package/umd/Tabs.js +1 -1
- package/umd/Tag.js +1 -1
- package/umd/TextField.js +1 -1
- package/umd/TimePicker.js +1 -1
- package/umd/Title.js +1 -1
- package/umd/ToggleButton.js +1 -1
- package/umd/Transfer.js +1 -1
- package/umd/Tree.js +1 -1
- package/umd/Upload.js +1 -1
- package/_verture/index-8ac46bd9.js +0 -327
- /package/_verture/{index-8cfd01fd.js → index-3d0397db.js} +0 -0
- /package/_verture/{index-2a6adf4d.js → index-5f205d87.js} +0 -0
- /package/_verture/{index-bbe5660a.js → index-93662604.js} +0 -0
- /package/_verture/{modalContext-0c08a396.js → modalContext-c57b51b7.js} +0 -0
package/AutoTips/index.js
CHANGED
|
@@ -66,7 +66,7 @@ const AutoTipsMultiline = props => {
|
|
|
66
66
|
addWidth = offsetWidth; // 重置宽度
|
|
67
67
|
// 最后一个字
|
|
68
68
|
if (i === singleWordRefs.current.length - 1) {
|
|
69
|
-
if (lineArr.length < constData.current.line
|
|
69
|
+
if (lineArr.length < constData.current.line) {
|
|
70
70
|
// 没超出行数
|
|
71
71
|
lineArr.push(children.slice(linePos, children.length));
|
|
72
72
|
} else {
|
|
@@ -226,20 +226,20 @@ const AutoTips = props => {
|
|
|
226
226
|
if (className) str += " ".concat(className);
|
|
227
227
|
return str;
|
|
228
228
|
};
|
|
229
|
-
return jsx(
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
return jsx(Tooltip, Object.assign({
|
|
230
|
+
arrow: arrow,
|
|
231
|
+
title: tTips,
|
|
232
|
+
placement: placement,
|
|
233
|
+
interactive: interactive,
|
|
234
|
+
boundariesElement: 'viewport',
|
|
235
|
+
overlayClassName: "".concat($prefixCls, "-auto-tips-tooltip"),
|
|
236
|
+
maxWidth: tipMaxWidth
|
|
234
237
|
}, {
|
|
235
|
-
children: jsx(
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
boundariesElement: 'viewport',
|
|
241
|
-
overlayClassName: "".concat($prefixCls, "-auto-tips-tooltip"),
|
|
242
|
-
maxWidth: tipMaxWidth
|
|
238
|
+
children: jsx("div", Object.assign({
|
|
239
|
+
ref: tipsElm,
|
|
240
|
+
className: handClass(),
|
|
241
|
+
onMouseOver: mouseHover,
|
|
242
|
+
style: style
|
|
243
243
|
}, {
|
|
244
244
|
children: jsx("div", Object.assign({
|
|
245
245
|
className: "auto-tips-content",
|
package/Cascader/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Cascader } from '../_verture/index-
|
|
2
|
-
export { C as default } from '../_verture/index-
|
|
1
|
+
import { C as Cascader } from '../_verture/index-5f205d87.js';
|
|
2
|
+
export { C as default } from '../_verture/index-5f205d87.js';
|
|
3
3
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import '../_verture/Portal-5bd49559.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-93662604.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';
|
package/CycleSelector/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import { HelperTextDetailProps } from "../HelperText";
|
|
|
9
9
|
import './index.scss';
|
|
10
10
|
export interface CycleSelectorValueProps {
|
|
11
11
|
/** 开始时间 */
|
|
12
|
-
startTime?: string;
|
|
12
|
+
startTime?: string | number;
|
|
13
13
|
/** 周期类型:0:不重复,1:每天重复,2:每周重复,3:每月重复,4:每年重复,5:自定义 */
|
|
14
14
|
cycleType?: number;
|
|
15
15
|
/** 周期频率 */
|
|
@@ -25,7 +25,7 @@ export interface CycleSelectorValueProps {
|
|
|
25
25
|
/** 当结束方式是限定次数,限定的重复执行次数 */
|
|
26
26
|
limitNum?: number;
|
|
27
27
|
/** 当结束方式是限定时间,结束执行的日期 */
|
|
28
|
-
endTime?: string;
|
|
28
|
+
endTime?: string | number;
|
|
29
29
|
}
|
|
30
30
|
declare type DisabledTimes = {
|
|
31
31
|
disabledHours?: () => number[];
|
|
@@ -33,16 +33,33 @@ 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;
|
|
39
42
|
value: CycleSelectorValueProps;
|
|
43
|
+
/** 时间格式
|
|
44
|
+
* undefined:YYYY-MM-DD HH:mm:ss
|
|
45
|
+
* zone: YYYY-MM-DD[T]HH:mm:ss[Z]
|
|
46
|
+
* stamp: 时间戳
|
|
47
|
+
* */
|
|
48
|
+
timeType?: 'zone' | 'stamp';
|
|
49
|
+
/** 提示文本自定义渲染 */
|
|
50
|
+
tipRender?: () => React.ReactNode;
|
|
51
|
+
/** 获取组件内部方法 */
|
|
52
|
+
cRef?: React.MutableRefObject<CycleSelectorRefProps>;
|
|
40
53
|
/** 禁用 */
|
|
41
54
|
disabled?: boolean;
|
|
42
55
|
/** 禁用日期 */
|
|
43
56
|
disabledDate?: (date: Dayjs) => boolean;
|
|
44
57
|
/** 禁用时间 */
|
|
45
58
|
disabledTime?: DisabledTime<Dayjs>;
|
|
59
|
+
/** 显示弹窗
|
|
60
|
+
* 不传:组件里面控制
|
|
61
|
+
* */
|
|
62
|
+
showPopover?: boolean;
|
|
46
63
|
onChange: (val: CycleSelectorValueProps) => void;
|
|
47
64
|
}
|
|
48
65
|
declare const CycleSelector: FunctionComponent<CycleSelectorProps>;
|
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';
|
|
@@ -235,6 +235,10 @@ const CycleSelector = props => {
|
|
|
235
235
|
helperText,
|
|
236
236
|
disabledDate,
|
|
237
237
|
disabledTime,
|
|
238
|
+
timeType,
|
|
239
|
+
tipRender,
|
|
240
|
+
showPopover,
|
|
241
|
+
cRef,
|
|
238
242
|
onChange
|
|
239
243
|
} = props;
|
|
240
244
|
const {
|
|
@@ -300,10 +304,43 @@ const CycleSelector = props => {
|
|
|
300
304
|
useEffect(() => {
|
|
301
305
|
const valC = value ? Object.assign({}, value) : {};
|
|
302
306
|
if (!valC.startTime) valC.cycleType = 0;
|
|
307
|
+
if (valC.startTime) valC.startTime = handleTimeEnter(valC.startTime, 'YYYY-MM-DD HH:mm');
|
|
308
|
+
if (valC.endTime) valC.endTime = handleTimeEnter(valC.endTime, 'YYYY-MM-DD');
|
|
303
309
|
setValueCom(valC);
|
|
304
310
|
constData.current.valueCom = valC;
|
|
305
311
|
handleSelectData();
|
|
306
312
|
}, [value, language]);
|
|
313
|
+
useEffect(() => {
|
|
314
|
+
if (showPopover !== undefined) {
|
|
315
|
+
if (showPopover) handlePopoverDefaultValue();
|
|
316
|
+
}
|
|
317
|
+
}, [showPopover]);
|
|
318
|
+
useImperativeHandle(cRef, () => {
|
|
319
|
+
return {
|
|
320
|
+
getTipText: val => {
|
|
321
|
+
return handleText(val, true);
|
|
322
|
+
}
|
|
323
|
+
};
|
|
324
|
+
});
|
|
325
|
+
// 出参
|
|
326
|
+
const handleTimeOut = val => {
|
|
327
|
+
if (!val) return '';
|
|
328
|
+
if (timeType === 'zone') {
|
|
329
|
+
// 时区
|
|
330
|
+
return new Date(val).toISOString();
|
|
331
|
+
}
|
|
332
|
+
if (timeType === 'stamp') {
|
|
333
|
+
// 时间戳
|
|
334
|
+
return new Date(val).getTime();
|
|
335
|
+
}
|
|
336
|
+
return val;
|
|
337
|
+
};
|
|
338
|
+
// 入参
|
|
339
|
+
const handleTimeEnter = (val, format) => {
|
|
340
|
+
if (!val) return '';
|
|
341
|
+
const timeVal = new Date(val).toLocaleString();
|
|
342
|
+
return dayjs(timeVal).format(format);
|
|
343
|
+
};
|
|
307
344
|
// 处理下拉框选择
|
|
308
345
|
const handleSelectData = () => {
|
|
309
346
|
var _a, _b;
|
|
@@ -434,7 +471,10 @@ const CycleSelector = props => {
|
|
|
434
471
|
delete constData.current.valueCom.limitNum;
|
|
435
472
|
delete constData.current.valueCom.executionDay;
|
|
436
473
|
}
|
|
437
|
-
|
|
474
|
+
const val = cancel ? Object.assign({}, constData.current.value) : Object.assign({}, constData.current.valueCom);
|
|
475
|
+
if (val.startTime) val.startTime = handleTimeOut(val.startTime);
|
|
476
|
+
if (val.endTime) val.endTime = handleTimeOut(val.endTime);
|
|
477
|
+
onChange(val);
|
|
438
478
|
};
|
|
439
479
|
const onVisibleChange = bol => {
|
|
440
480
|
if (!bol) cancelPopover();
|
|
@@ -444,16 +484,18 @@ const CycleSelector = props => {
|
|
|
444
484
|
handlePopoverDefaultValue();
|
|
445
485
|
};
|
|
446
486
|
// 自定义周期文案提示
|
|
447
|
-
const handleText = () => {
|
|
487
|
+
const handleText = (val, bol) => {
|
|
448
488
|
var _a, _b, _c, _d, _e;
|
|
449
|
-
|
|
489
|
+
const handValue = val ? val : value;
|
|
490
|
+
if ((handValue === null || handValue === void 0 ? void 0 : handValue.cycleType) !== 5 || error) return;
|
|
450
491
|
const text = [];
|
|
451
|
-
const everyText1 = intl('every') +
|
|
492
|
+
const everyText1 = intl('every') + handValue.frequency + intl(handValue.frequencyUnit);
|
|
452
493
|
const timeText = (_a = constData.current.timeDetail) === null || _a === void 0 ? void 0 : _a.hm;
|
|
453
|
-
if (
|
|
494
|
+
if (tipRender) return tipRender();
|
|
495
|
+
if (handValue.frequencyUnit === 'week') {
|
|
454
496
|
const arr = [];
|
|
455
497
|
let str;
|
|
456
|
-
(_b =
|
|
498
|
+
(_b = handValue.executionDay) === null || _b === void 0 ? void 0 : _b.split(',').forEach(item => {
|
|
457
499
|
let index = Number(item) - 1;
|
|
458
500
|
if (index === 0) {
|
|
459
501
|
index = 7;
|
|
@@ -467,12 +509,12 @@ const CycleSelector = props => {
|
|
|
467
509
|
every: everyText1 + arr.join('、'),
|
|
468
510
|
time: timeText
|
|
469
511
|
}));
|
|
470
|
-
} else if (
|
|
512
|
+
} else if (handValue.frequencyUnit === 'month') {
|
|
471
513
|
text.push(intl('text1', {
|
|
472
514
|
every: everyText1,
|
|
473
|
-
time: ((_c = constData.current.monthCycleTypeListMap) === null || _c === void 0 ? void 0 : _c[
|
|
515
|
+
time: ((_c = constData.current.monthCycleTypeListMap) === null || _c === void 0 ? void 0 : _c[handValue.monthCycleType]) + timeText
|
|
474
516
|
}));
|
|
475
|
-
} else if (
|
|
517
|
+
} else if (handValue.frequencyUnit === 'day') {
|
|
476
518
|
text.push(intl('text1', {
|
|
477
519
|
every: everyText1,
|
|
478
520
|
time: timeText
|
|
@@ -487,16 +529,17 @@ const CycleSelector = props => {
|
|
|
487
529
|
time: str.join('') + " " + timeText
|
|
488
530
|
}));
|
|
489
531
|
}
|
|
490
|
-
if (
|
|
532
|
+
if (handValue.endType === 2) {
|
|
491
533
|
text.push(intl('text2', {
|
|
492
|
-
limitNum:
|
|
534
|
+
limitNum: handValue.limitNum
|
|
493
535
|
}));
|
|
494
536
|
}
|
|
495
|
-
if (
|
|
537
|
+
if (handValue.endType === 1) {
|
|
496
538
|
text.push(intl('text3', {
|
|
497
|
-
date:
|
|
539
|
+
date: handleTimeEnter(handValue.endTime, 'YYYY-MM-DD')
|
|
498
540
|
}));
|
|
499
541
|
}
|
|
542
|
+
if (bol) return text;
|
|
500
543
|
return jsxs("p", Object.assign({
|
|
501
544
|
className: 'text-tip'
|
|
502
545
|
}, {
|
|
@@ -748,13 +791,19 @@ const CycleSelector = props => {
|
|
|
748
791
|
}
|
|
749
792
|
}*/
|
|
750
793
|
};
|
|
794
|
+
const handleOpen = () => {
|
|
795
|
+
if (showPopover !== undefined) {
|
|
796
|
+
return showPopover;
|
|
797
|
+
}
|
|
798
|
+
return open;
|
|
799
|
+
};
|
|
751
800
|
return jsxs("div", Object.assign({
|
|
752
801
|
className: clsx("".concat($prefixCls, "-cycle-selector"), className),
|
|
753
802
|
style: style
|
|
754
803
|
}, {
|
|
755
804
|
children: [jsx(Popover, Object.assign({
|
|
756
805
|
content: handleContent(),
|
|
757
|
-
open:
|
|
806
|
+
open: handleOpen(),
|
|
758
807
|
placement: "bottomRight",
|
|
759
808
|
overlayClassName: "".concat($prefixCls, "-cycle-selector-popover"),
|
|
760
809
|
onVisibleChange: onVisibleChange
|
package/DynamicMultiBox/index.js
CHANGED
|
@@ -70,7 +70,7 @@ 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-93662604.js';
|
|
74
74
|
import 'rc-tree';
|
|
75
75
|
import '../_verture/typeof-adeedc13.js';
|
|
76
76
|
import '@para-ui/icons/Document';
|
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-3d0397db.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,7 +69,7 @@ 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-93662604.js';
|
|
73
73
|
import 'rc-tree';
|
|
74
74
|
import '../_verture/typeof-adeedc13.js';
|
|
75
75
|
import '@para-ui/icons/Document';
|
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-3d0397db.js';
|
|
4
4
|
import 'clsx';
|
|
5
5
|
import '../Label/index.js';
|
|
6
6
|
import '../_verture/constant-5317fc89.js';
|
|
@@ -69,7 +69,7 @@ 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-93662604.js';
|
|
73
73
|
import 'rc-tree';
|
|
74
74
|
import '../_verture/typeof-adeedc13.js';
|
|
75
75
|
import '@para-ui/icons/Document';
|
package/FunctionModal/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { u as useModal } from '../_verture/modalContext-
|
|
2
|
-
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-
|
|
1
|
+
import { u as useModal } from '../_verture/modalContext-c57b51b7.js';
|
|
2
|
+
export { F as FunctionModalProvider, u as default, a as useClose } from '../_verture/modalContext-c57b51b7.js';
|
|
3
3
|
import '../_verture/tslib.es6-55ed4bd2.js';
|
|
4
4
|
import 'react/jsx-runtime';
|
|
5
5
|
import 'react';
|
package/README.md
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
## 版本: 4.0.26
|
|
2
|
+
【周期选择器-CycleSelector】增加cRef参数,用来获取组件内部方法
|
|
3
|
+
|
|
4
|
+
## 版本: 4.0.25
|
|
5
|
+
【超出省略-AutoTips】修复未超出,只多出的最后一行一个字符出现浮层
|
|
6
|
+
【超出省略-AutoTips】更换Tooltip层级
|
|
7
|
+
【周期选择器-CycleSelector】增加时间类型timeType参数
|
|
8
|
+
【周期选择器-CycleSelector】增加提示文本自定义渲染tipRender参数
|
|
9
|
+
【周期选择器-CycleSelector】增加显示弹窗showPopover参数
|
|
10
|
+
|
|
1
11
|
## 版本: 4.0.24
|
|
2
12
|
【超出省略-AutoTips】修复多行超出省略,丢失只多出的最后一个字符
|
|
3
13
|
【表单-Form】修复输入框输入丢失焦点问题
|