@zgfe/business-lib 1.0.21-cdp.6 → 1.0.21-cdp.9
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/es/assets/styles/chunks.less +0 -2
- package/es/attrConditions/components/stringList.js +2 -2
- package/es/cycleTime/demo/index.d.ts +1 -0
- package/es/cycleTime/demo/index.js +3 -1
- package/es/cycleTime/index.d.ts +7 -5
- package/es/cycleTime/index.js +21 -16
- package/es/cycleTime/month.d.ts +2 -1
- package/es/cycleTime/month.js +1 -1
- package/es/cycleTime/styles/month.less +4 -6
- package/es/select/index.js +1 -1
- package/es/select/styles/handle.less +5 -5
- package/es/select/types.d.ts +3 -2
- package/package.json +2 -2
|
@@ -165,7 +165,7 @@ var StringList = function StringList(props) {
|
|
|
165
165
|
multiple: true,
|
|
166
166
|
enableCreate: true,
|
|
167
167
|
theme: props.theme,
|
|
168
|
-
size: "
|
|
168
|
+
size: "middle",
|
|
169
169
|
className: "".concat(classPrefix, "-multi-select"),
|
|
170
170
|
options: [],
|
|
171
171
|
disable: true
|
|
@@ -178,7 +178,7 @@ var StringList = function StringList(props) {
|
|
|
178
178
|
multiple: true,
|
|
179
179
|
enableCreate: true,
|
|
180
180
|
theme: props.theme,
|
|
181
|
-
size: "
|
|
181
|
+
size: "middle",
|
|
182
182
|
disable: props.operate === OperateTypes.IsNull || props.operate === OperateTypes.IsNotNull,
|
|
183
183
|
labelField: "name",
|
|
184
184
|
keyField: "value",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { BizCycleTime } from '@zgfe/business-lib';
|
|
3
|
+
import '@zgfe/business-lib/es/assets/styles/resetAntd.less';
|
|
4
|
+
import { Form } from 'antd';
|
|
3
5
|
export default (function () {
|
|
4
|
-
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(BizCycleTime, null));
|
|
6
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(Form.Item, null, /*#__PURE__*/React.createElement(BizCycleTime, null))));
|
|
5
7
|
});
|
package/es/cycleTime/index.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
|
+
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import './styles/index.less';
|
|
3
|
-
declare enum
|
|
4
|
-
day =
|
|
5
|
-
week =
|
|
6
|
-
month =
|
|
4
|
+
export declare enum CycleTimeUnit {
|
|
5
|
+
day = 1,
|
|
6
|
+
week = 2,
|
|
7
|
+
month = 3
|
|
7
8
|
}
|
|
8
9
|
interface Value {
|
|
9
|
-
unit:
|
|
10
|
+
unit: CycleTimeUnit;
|
|
10
11
|
day?: number[];
|
|
11
12
|
time?: string;
|
|
12
13
|
}
|
|
13
14
|
declare const BizCycleTime: React.FC<{
|
|
14
15
|
multiple?: boolean;
|
|
15
16
|
onChange?: (val: Value) => void;
|
|
17
|
+
size?: SizeType;
|
|
16
18
|
}>;
|
|
17
19
|
export default BizCycleTime;
|
package/es/cycleTime/index.js
CHANGED
|
@@ -15,26 +15,27 @@ import React, { useEffect, useState } from 'react';
|
|
|
15
15
|
import { BizSelect } from '..';
|
|
16
16
|
import MonthDay from './month';
|
|
17
17
|
import './styles/index.less';
|
|
18
|
-
var
|
|
18
|
+
export var CycleTimeUnit;
|
|
19
19
|
|
|
20
|
-
(function (
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
})(
|
|
20
|
+
(function (CycleTimeUnit) {
|
|
21
|
+
CycleTimeUnit[CycleTimeUnit["day"] = 1] = "day";
|
|
22
|
+
CycleTimeUnit[CycleTimeUnit["week"] = 2] = "week";
|
|
23
|
+
CycleTimeUnit[CycleTimeUnit["month"] = 3] = "month";
|
|
24
|
+
})(CycleTimeUnit || (CycleTimeUnit = {}));
|
|
25
25
|
|
|
26
26
|
var BizCycleTime = function BizCycleTime(props) {
|
|
27
|
-
var multiple = props.multiple
|
|
27
|
+
var multiple = props.multiple,
|
|
28
|
+
size = props.size;
|
|
28
29
|
var classPrefix = 'biz-cycle-time';
|
|
29
30
|
var unitList = [{
|
|
30
31
|
label: '每日',
|
|
31
|
-
value:
|
|
32
|
+
value: CycleTimeUnit.day
|
|
32
33
|
}, {
|
|
33
34
|
label: '每周',
|
|
34
|
-
value:
|
|
35
|
+
value: CycleTimeUnit.week
|
|
35
36
|
}, {
|
|
36
37
|
label: '每月',
|
|
37
|
-
value:
|
|
38
|
+
value: CycleTimeUnit.month
|
|
38
39
|
}];
|
|
39
40
|
var days = [];
|
|
40
41
|
|
|
@@ -61,7 +62,7 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
61
62
|
useEffect(function () {
|
|
62
63
|
var res = {
|
|
63
64
|
unit: unit.value,
|
|
64
|
-
day: unit.value ===
|
|
65
|
+
day: unit.value === CycleTimeUnit.month ? dayList === null || dayList === void 0 ? void 0 : dayList.map(function (item) {
|
|
65
66
|
return item.value;
|
|
66
67
|
}) : multiple ? day.map(function (item) {
|
|
67
68
|
return item.value;
|
|
@@ -69,7 +70,7 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
69
70
|
time: time
|
|
70
71
|
};
|
|
71
72
|
|
|
72
|
-
if (unit.value ===
|
|
73
|
+
if (unit.value === CycleTimeUnit.day) {
|
|
73
74
|
delete res.day;
|
|
74
75
|
} else {
|
|
75
76
|
delete res.time;
|
|
@@ -94,29 +95,33 @@ var BizCycleTime = function BizCycleTime(props) {
|
|
|
94
95
|
keyField: "value",
|
|
95
96
|
className: "".concat(classPrefix, "-unit"),
|
|
96
97
|
defaultValue: unit,
|
|
98
|
+
size: size,
|
|
97
99
|
onChange: function onChange(v) {
|
|
98
100
|
setUnit(v);
|
|
99
101
|
}
|
|
100
|
-
}), unit.value ===
|
|
102
|
+
}), unit.value === CycleTimeUnit.day && /*#__PURE__*/React.createElement(DatePicker.TimePicker, {
|
|
101
103
|
className: "".concat(classPrefix, "-hour"),
|
|
104
|
+
size: size,
|
|
102
105
|
onChange: function onChange(time) {
|
|
103
106
|
setTime(time === null || time === void 0 ? void 0 : time.format('hh:mm:ss'));
|
|
104
107
|
}
|
|
105
|
-
}), unit.value ===
|
|
108
|
+
}), unit.value === CycleTimeUnit.week && /*#__PURE__*/React.createElement(BizSelect, {
|
|
106
109
|
options: days,
|
|
107
110
|
labelField: "label",
|
|
108
111
|
keyField: "value",
|
|
112
|
+
size: size,
|
|
109
113
|
multiple: multiple,
|
|
110
114
|
className: "".concat(classPrefix, "-day"),
|
|
111
115
|
onChange: function onChange(v) {
|
|
112
116
|
setDay(v);
|
|
113
117
|
}
|
|
114
|
-
}), unit.value ===
|
|
118
|
+
}), unit.value === CycleTimeUnit.month && /*#__PURE__*/React.createElement(MonthDay, {
|
|
115
119
|
onChange: setDayList
|
|
116
120
|
}));
|
|
117
121
|
};
|
|
118
122
|
|
|
119
123
|
BizCycleTime.defaultProps = {
|
|
120
|
-
multiple: false
|
|
124
|
+
multiple: false,
|
|
125
|
+
size: 'middle'
|
|
121
126
|
};
|
|
122
127
|
export default BizCycleTime;
|
package/es/cycleTime/month.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import './styles/month.less';
|
|
3
3
|
import { BaseOption } from '../utils/type';
|
|
4
|
+
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
4
5
|
declare const MonthDay: React.FC<{
|
|
5
|
-
size?:
|
|
6
|
+
size?: SizeType;
|
|
6
7
|
className?: string;
|
|
7
8
|
onChange?: (days: BaseOption<number>[]) => void;
|
|
8
9
|
}>;
|
package/es/cycleTime/month.js
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
@import '../../assets//styles/inner.less';
|
|
2
2
|
.biz-month-day {
|
|
3
3
|
&-handle {
|
|
4
|
-
.__select-
|
|
4
|
+
.__select-default();
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: row;
|
|
7
7
|
width: 280px;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
.__default-focused();
|
|
11
|
-
}
|
|
8
|
+
padding: @padding-xss - 1 @padding-xss 0 @padding-xss;
|
|
9
|
+
white-space: break-spaces;
|
|
12
10
|
&.large {
|
|
13
11
|
min-height: @height-lg;
|
|
14
12
|
}
|
|
15
|
-
&.
|
|
13
|
+
&.middle {
|
|
16
14
|
min-height: @height-base;
|
|
17
15
|
}
|
|
18
16
|
&.small {
|
package/es/select/index.js
CHANGED
|
@@ -20,18 +20,18 @@
|
|
|
20
20
|
border: none;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
&.
|
|
23
|
+
&.large {
|
|
24
24
|
height: @height-lg;
|
|
25
25
|
font-size: @font-size-lg;
|
|
26
26
|
line-height: @height-lg;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
&.
|
|
29
|
+
&.small {
|
|
30
30
|
height: @height-sm;
|
|
31
31
|
line-height: @height-sm;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
&.
|
|
34
|
+
&.middle {
|
|
35
35
|
height: @height-base;
|
|
36
36
|
line-height: @height-base;
|
|
37
37
|
}
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
height: auto;
|
|
46
46
|
overflow: visible;
|
|
47
47
|
line-height: 1;
|
|
48
|
-
&.
|
|
48
|
+
&.small {
|
|
49
49
|
height: auto;
|
|
50
50
|
min-height: @height-sm;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
&.
|
|
53
|
+
&.middle {
|
|
54
54
|
height: auto;
|
|
55
55
|
min-height: @height-base;
|
|
56
56
|
}
|
package/es/select/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SizeType } from 'antd/es/config-provider/SizeContext';
|
|
1
2
|
import { ReactNode } from 'react';
|
|
2
3
|
export declare namespace BizSelectTypes {
|
|
3
4
|
interface Group {
|
|
@@ -16,7 +17,7 @@ export declare namespace BizSelectTypes {
|
|
|
16
17
|
className?: string;
|
|
17
18
|
type?: 'group' | 'normal';
|
|
18
19
|
theme?: string;
|
|
19
|
-
size?:
|
|
20
|
+
size?: SizeType;
|
|
20
21
|
border?: boolean;
|
|
21
22
|
multiple?: boolean;
|
|
22
23
|
minDropdownWidth?: number;
|
|
@@ -65,7 +66,7 @@ export interface HandlerTypes {
|
|
|
65
66
|
keyField?: string | number;
|
|
66
67
|
disable?: boolean;
|
|
67
68
|
theme?: string;
|
|
68
|
-
size?:
|
|
69
|
+
size?: SizeType;
|
|
69
70
|
border?: boolean;
|
|
70
71
|
onDelete?: (data: BizSelectTypes.Option) => void;
|
|
71
72
|
onSearch?: (val: string) => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zgfe/business-lib",
|
|
3
|
-
"version": "1.0.21-cdp.
|
|
3
|
+
"version": "1.0.21-cdp.9",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"start": "dumi dev",
|
|
6
6
|
"docs:build": "dumi build",
|
|
@@ -58,5 +58,5 @@
|
|
|
58
58
|
"react": "^16.12.0 || ^17.0.0",
|
|
59
59
|
"yorkie": "^2.0.0"
|
|
60
60
|
},
|
|
61
|
-
"gitHead": "
|
|
61
|
+
"gitHead": "dab7c9facdadd1dbab45ef27728d93f9558b6334"
|
|
62
62
|
}
|