iglooform 2.3.3 → 2.3.7
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/admin-upload/modal.js +1 -1
- package/es/card-detail/card-group.js +2 -1
- package/es/card-detail/card-item.js +7 -0
- package/es/card-detail/card.d.ts +2 -2
- package/es/card-detail/card.js +3 -3
- package/es/card-detail/style/index.less +28 -2
- package/es/card-detail/utils.d.ts +2 -2
- package/es/card-detail/utils.js +24 -11
- package/es/detail-panel/style/index.less +3 -2
- package/es/filter/customize.d.ts +9 -0
- package/es/filter/customize.js +21 -0
- package/es/filter/index.d.ts +6 -4
- package/es/filter/index.js +82 -42
- package/es/filter/style/index.less +1 -1
- package/es/form/context.d.ts +2 -0
- package/es/form/context.js +2 -1
- package/es/form/element/index.js +54 -2
- package/es/form/index.js +63 -13
- package/es/form/page/index.js +31 -2
- package/es/form/pages/index.js +46 -26
- package/es/form/render/index.js +3 -2
- package/es/form/steps/index.js +47 -30
- package/es/free-form/context.d.ts +19 -0
- package/es/free-form/context.js +7 -0
- package/es/free-form/element/index.d.ts +11 -0
- package/es/free-form/element/index.js +262 -0
- package/es/free-form/element/style/index.d.ts +1 -0
- package/es/free-form/element/style/index.js +1 -0
- package/es/free-form/element/style/index.less +116 -0
- package/es/free-form/index.d.ts +7 -0
- package/es/free-form/index.js +203 -0
- package/es/free-form/messages.d.ts +48 -0
- package/es/free-form/messages.js +49 -0
- package/es/free-form/page/index.d.ts +11 -0
- package/es/free-form/page/index.js +144 -0
- package/es/free-form/page/style/index.d.ts +1 -0
- package/es/free-form/page/style/index.js +1 -0
- package/es/free-form/page/style/index.less +55 -0
- package/es/free-form/style/index.d.ts +1 -0
- package/es/free-form/style/index.js +1 -0
- package/es/free-form/style/index.less +40 -0
- package/es/free-form/utils.d.ts +73 -0
- package/es/free-form/utils.js +370 -0
- package/es/global-message/style/index.less +30 -0
- package/es/index.d.ts +3 -0
- package/es/index.js +4 -1
- package/es/input/input-date.js +18 -9
- package/es/input/phone-number.js +9 -9
- package/es/input/style/index.less +17 -14
- package/es/layout/index.js +10 -2
- package/es/layout/style/index.less +2 -0
- package/es/locale/en-US/messages.json +1 -1
- package/es/locale/id-ID/messages.json +1 -1
- package/es/locale/th-TH/messages.json +1 -1
- package/es/locale/vi-VN/messages.json +1 -1
- package/es/locale/zh-CN/messages.json +1 -1
- package/es/media/media.js +0 -1
- package/es/media/preview.js +0 -1
- package/es/select/attached-select.js +2 -2
- package/es/table/index.js +33 -9
- package/es/typography/index.js +2 -2
- package/es/typography/style/index.less +4 -1
- package/es/upload/index.d.ts +3 -3
- package/es/upload/index.js +2 -2
- package/es/upload-photo/index.d.ts +2 -2
- package/es/upload-photo/index.js +2 -2
- package/es/upload-photo/media.js +0 -1
- package/es/upload-preview/media.js +0 -1
- package/lib/admin-upload/modal.js +1 -1
- package/lib/card-detail/card-group.js +2 -1
- package/lib/card-detail/card-item.js +7 -0
- package/lib/card-detail/card.d.ts +2 -2
- package/lib/card-detail/card.js +3 -3
- package/lib/card-detail/style/index.less +28 -2
- package/lib/card-detail/utils.d.ts +2 -2
- package/lib/card-detail/utils.js +25 -12
- package/lib/detail-panel/style/index.less +3 -2
- package/lib/filter/customize.d.ts +9 -0
- package/lib/filter/customize.js +33 -0
- package/lib/filter/index.d.ts +6 -4
- package/lib/filter/index.js +83 -42
- package/lib/filter/style/index.less +1 -1
- package/lib/form/context.d.ts +2 -0
- package/lib/form/context.js +2 -1
- package/lib/form/element/index.js +53 -1
- package/lib/form/index.js +62 -12
- package/lib/form/page/index.js +29 -1
- package/lib/form/pages/index.js +45 -25
- package/lib/form/render/index.js +2 -1
- package/lib/form/steps/index.js +46 -29
- package/lib/free-form/context.d.ts +19 -0
- package/lib/free-form/context.js +19 -0
- package/lib/free-form/element/index.d.ts +11 -0
- package/lib/free-form/element/index.js +288 -0
- package/lib/free-form/element/style/index.d.ts +1 -0
- package/lib/free-form/element/style/index.js +3 -0
- package/lib/free-form/element/style/index.less +116 -0
- package/lib/free-form/index.d.ts +7 -0
- package/lib/free-form/index.js +220 -0
- package/lib/free-form/messages.d.ts +48 -0
- package/lib/free-form/messages.js +56 -0
- package/lib/free-form/page/index.d.ts +11 -0
- package/lib/free-form/page/index.js +164 -0
- package/lib/free-form/page/style/index.d.ts +1 -0
- package/lib/free-form/page/style/index.js +3 -0
- package/lib/free-form/page/style/index.less +55 -0
- package/lib/free-form/style/index.d.ts +1 -0
- package/lib/free-form/style/index.js +3 -0
- package/lib/free-form/style/index.less +40 -0
- package/lib/free-form/utils.d.ts +73 -0
- package/lib/free-form/utils.js +403 -0
- package/lib/global-message/style/index.less +30 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +28 -1
- package/lib/input/input-date.js +18 -9
- package/lib/input/phone-number.js +9 -9
- package/lib/input/style/index.less +17 -14
- package/lib/layout/index.js +10 -2
- package/lib/layout/style/index.less +2 -0
- package/lib/locale/en-US/messages.json +1 -1
- package/lib/locale/id-ID/messages.json +1 -1
- package/lib/locale/th-TH/messages.json +1 -1
- package/lib/locale/vi-VN/messages.json +1 -1
- package/lib/locale/zh-CN/messages.json +1 -1
- package/lib/media/media.js +0 -1
- package/lib/media/preview.js +0 -1
- package/lib/select/attached-select.js +2 -2
- package/lib/table/index.js +32 -8
- package/lib/typography/index.js +2 -2
- package/lib/typography/style/index.less +4 -1
- package/lib/upload/index.d.ts +3 -3
- package/lib/upload/index.js +2 -2
- package/lib/upload-photo/index.d.ts +2 -2
- package/lib/upload-photo/index.js +2 -2
- package/lib/upload-photo/media.js +0 -1
- package/lib/upload-preview/media.js +0 -1
- package/package.json +1 -1
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
.iglooform-global-message {
|
|
2
|
+
min-width: 324px;
|
|
3
|
+
|
|
2
4
|
.ant-message-notice-content {
|
|
3
5
|
padding: 0px;
|
|
6
|
+
|
|
7
|
+
.ant-alert-message {
|
|
8
|
+
text-align: left;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@media screen and (max-width: 768px) {
|
|
14
|
+
.iglooform-global-message .igloo-alert-message {
|
|
15
|
+
max-width: 100%;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media screen and (min-width: 768px) and (max-width: 992px) {
|
|
20
|
+
.iglooform-global-message .igloo-alert-message {
|
|
21
|
+
max-width: 720px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
@media screen and (min-width: 992px) and (max-width: 1200px) {
|
|
26
|
+
.iglooform-global-message .igloo-alert-message {
|
|
27
|
+
max-width: 960px;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@media screen and (min-width: 1200px) {
|
|
32
|
+
.iglooform-global-message .igloo-alert-message {
|
|
33
|
+
max-width: 1140px;
|
|
4
34
|
}
|
|
5
35
|
}
|
package/es/index.d.ts
CHANGED
|
@@ -35,3 +35,6 @@ export { default as MobileInsurerDetail } from './mobile-insurer-detail';
|
|
|
35
35
|
export { default as Layout } from './layout';
|
|
36
36
|
export { default as DetailPanel } from './detail-panel';
|
|
37
37
|
export { default as message } from './global-message';
|
|
38
|
+
export { default as FreeForm } from './free-form';
|
|
39
|
+
export { default as FormItem } from './free-form/element';
|
|
40
|
+
export { default as FormPage } from './free-form/page';
|
package/es/index.js
CHANGED
|
@@ -34,4 +34,7 @@ export { default as ClaimList } from './claim-list';
|
|
|
34
34
|
export { default as MobileInsurerDetail } from './mobile-insurer-detail';
|
|
35
35
|
export { default as Layout } from './layout';
|
|
36
36
|
export { default as DetailPanel } from './detail-panel';
|
|
37
|
-
export { default as message } from './global-message';
|
|
37
|
+
export { default as message } from './global-message';
|
|
38
|
+
export { default as FreeForm } from './free-form';
|
|
39
|
+
export { default as FormItem } from './free-form/element';
|
|
40
|
+
export { default as FormPage } from './free-form/page';
|
package/es/input/input-date.js
CHANGED
|
@@ -94,6 +94,11 @@ var IglooInputDate = function IglooInputDate(props) {
|
|
|
94
94
|
inputValue = _useState4[0],
|
|
95
95
|
setInput = _useState4[1];
|
|
96
96
|
|
|
97
|
+
var _useState5 = useState(false),
|
|
98
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
99
|
+
everInputAll = _useState6[0],
|
|
100
|
+
setEverInputAll = _useState6[1];
|
|
101
|
+
|
|
97
102
|
var formatDeleteSpace = format.replace(/\s+/g, '');
|
|
98
103
|
|
|
99
104
|
var _dealFormat = dealFormat(formatDeleteSpace),
|
|
@@ -107,7 +112,7 @@ var IglooInputDate = function IglooInputDate(props) {
|
|
|
107
112
|
useEffect(function () {
|
|
108
113
|
var _dealFormat3 = dealFormat(formatDeleteSpace),
|
|
109
114
|
_dealFormat4 = _slicedToArray(_dealFormat3, 2),
|
|
110
|
-
|
|
115
|
+
_ = _dealFormat4[0],
|
|
111
116
|
delimiter = _dealFormat4[1];
|
|
112
117
|
|
|
113
118
|
if (!value) return;
|
|
@@ -118,16 +123,19 @@ var IglooInputDate = function IglooInputDate(props) {
|
|
|
118
123
|
useEffect(function () {
|
|
119
124
|
var currentInput = inputValueRef.current.join(delimiter); // 不管值如何 统一交给rule校验
|
|
120
125
|
|
|
121
|
-
|
|
122
|
-
|
|
126
|
+
var allGet = currentInput.length === formatDeleteSpace.length;
|
|
127
|
+
if (!everInputAll && allGet) setEverInputAll(true);
|
|
128
|
+
|
|
129
|
+
if (everInputAll || allGet) {
|
|
130
|
+
onChangeProps && onChangeProps(allGet ? moment(currentInput, formatDeleteSpace).format(format) : undefined);
|
|
123
131
|
}
|
|
124
132
|
}, [inputValue]);
|
|
125
133
|
|
|
126
|
-
function hanldeOnChange(str,
|
|
134
|
+
function hanldeOnChange(str, refArr, index, inputFormat) {
|
|
127
135
|
var valueInput = str.replace(/[^0-9]/gi, '');
|
|
128
136
|
|
|
129
|
-
if (valueInput.length ===
|
|
130
|
-
var formatType =
|
|
137
|
+
if (valueInput.length === inputFormat.length) {
|
|
138
|
+
var formatType = inputFormat[0];
|
|
131
139
|
var timeLimit = sampleLimit[formatType]; // 关于 单个input的限制还是要有的
|
|
132
140
|
|
|
133
141
|
if (timeLimit) {
|
|
@@ -149,10 +157,11 @@ var IglooInputDate = function IglooInputDate(props) {
|
|
|
149
157
|
if (thirdInput.current) thirdInput.current.focus();
|
|
150
158
|
break;
|
|
151
159
|
}
|
|
152
|
-
}
|
|
160
|
+
} // 替换了ref 中 current
|
|
161
|
+
|
|
153
162
|
|
|
154
|
-
|
|
155
|
-
setInput(_toConsumableArray(
|
|
163
|
+
refArr.splice(index, 1, valueInput.slice(0, inputFormat.length));
|
|
164
|
+
setInput(_toConsumableArray(refArr));
|
|
156
165
|
}
|
|
157
166
|
|
|
158
167
|
return _jsx("div", Object.assign({
|
package/es/input/phone-number.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import "antd/es/input
|
|
2
|
-
import
|
|
1
|
+
import "antd/es/input/style";
|
|
2
|
+
import _Input from "antd/es/input";
|
|
3
3
|
|
|
4
4
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
5
5
|
|
|
@@ -78,17 +78,17 @@ var PhoneNumber = function PhoneNumber(_ref) {
|
|
|
78
78
|
'igloo-input-phone-disabled': disabled
|
|
79
79
|
}, className)
|
|
80
80
|
}, {
|
|
81
|
-
children: [leftPart, _jsx(
|
|
81
|
+
children: [leftPart, _jsx(_Input, {
|
|
82
|
+
type: "tel",
|
|
82
83
|
defaultValue: number,
|
|
83
84
|
onChange: function onChange(e) {
|
|
84
|
-
setNumber(e);
|
|
85
|
-
formChangeProps({
|
|
85
|
+
setNumber(e.target.value);
|
|
86
|
+
formChangeProps(e.target.value ? {
|
|
86
87
|
areaCode: selectedCode,
|
|
87
|
-
phoneNumber: e
|
|
88
|
-
});
|
|
88
|
+
phoneNumber: e.target.value
|
|
89
|
+
} : undefined);
|
|
89
90
|
},
|
|
90
|
-
disabled: disabled
|
|
91
|
-
type: "number"
|
|
91
|
+
disabled: disabled
|
|
92
92
|
}, void 0)]
|
|
93
93
|
}), void 0);
|
|
94
94
|
};
|
|
@@ -108,7 +108,7 @@ input[type='number'] {
|
|
|
108
108
|
justify-content: center;
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
.ant-input
|
|
111
|
+
.ant-input {
|
|
112
112
|
border-radius: 0px 3px 3px 0px;
|
|
113
113
|
flex: 1 auto;
|
|
114
114
|
border-top: 0px;
|
|
@@ -117,8 +117,8 @@ input[type='number'] {
|
|
|
117
117
|
border-color: #bdbdbd;
|
|
118
118
|
height: 48px;
|
|
119
119
|
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
&:focus {
|
|
121
|
+
border-color: #bdbdbd;
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
|
|
@@ -237,22 +237,25 @@ input[type='number'] {
|
|
|
237
237
|
|
|
238
238
|
.igloo-phone-number-select,
|
|
239
239
|
.igloo-phone-number-addon-before {
|
|
240
|
-
border
|
|
241
|
-
border-
|
|
242
|
-
border-bottom: 1px solid #bdbdbd;
|
|
243
|
-
border-radius: 3px 0px 0px 3px;
|
|
240
|
+
border: 1px solid #bdbdbd;
|
|
241
|
+
border-right: 0px;
|
|
244
242
|
}
|
|
245
243
|
|
|
246
|
-
.
|
|
247
|
-
border-
|
|
244
|
+
.igloo-phone-number-select {
|
|
245
|
+
border-radius: 3px 0px 0px 3px;
|
|
246
|
+
}
|
|
248
247
|
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
248
|
+
.igloo-phone-number-select {
|
|
249
|
+
.ant-select {
|
|
250
|
+
.ant-select-selector {
|
|
251
|
+
border-color: #bdbdbd;
|
|
252
|
+
}
|
|
254
253
|
}
|
|
255
254
|
}
|
|
255
|
+
|
|
256
|
+
.ant-input {
|
|
257
|
+
border: 1px solid @error-color;
|
|
258
|
+
}
|
|
256
259
|
}
|
|
257
260
|
|
|
258
261
|
.igloo-otp {
|
package/es/layout/index.js
CHANGED
|
@@ -359,10 +359,18 @@ var Layout = function Layout(props) {
|
|
|
359
359
|
className: "footer-bottom"
|
|
360
360
|
}, {
|
|
361
361
|
children: [_jsx("div", {
|
|
362
|
-
children: copyRightRender ? copyRightRender(
|
|
362
|
+
children: copyRightRender ? copyRightRender(_jsxs("div", {
|
|
363
|
+
children: [_jsxs("div", {
|
|
364
|
+
children: ["\xA9 $", new Date().getFullYear(), " Powered by Axinan Pte Ltd."]
|
|
365
|
+
}, void 0), _jsx("div", {
|
|
366
|
+
children: "All Rights Reserved."
|
|
367
|
+
}, void 0)]
|
|
368
|
+
}, void 0)) : _jsxs(Typography, Object.assign({
|
|
363
369
|
level: "body3"
|
|
364
370
|
}, {
|
|
365
|
-
children: "\xA9 ".concat(new Date().getFullYear(), " Powered by Axinan Pte Ltd.
|
|
371
|
+
children: ["\xA9 ".concat(new Date().getFullYear(), " Powered by Axinan Pte Ltd."), _jsx("div", {
|
|
372
|
+
children: "All Rights Reserved."
|
|
373
|
+
}, void 0)]
|
|
366
374
|
}), void 0)
|
|
367
375
|
}, void 0), _jsx("div", {
|
|
368
376
|
children: _jsxs(Typography, Object.assign({
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
align-items: center;
|
|
7
7
|
justify-content: space-between;
|
|
8
8
|
height: 100vh;
|
|
9
|
+
overflow: auto;
|
|
9
10
|
|
|
10
11
|
.igloo-layout-header {
|
|
11
12
|
min-height: 56px;
|
|
@@ -207,6 +208,7 @@
|
|
|
207
208
|
align-items: center;
|
|
208
209
|
justify-content: space-between;
|
|
209
210
|
height: 100vh;
|
|
211
|
+
overflow: auto;
|
|
210
212
|
|
|
211
213
|
& > div {
|
|
212
214
|
width: 100%;
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "1 file imported.",
|
|
4
4
|
"1 file in progress...": "1 file in progress...",
|
|
5
5
|
"Accept": "Accept",
|
|
6
|
+
"Action": "Action",
|
|
6
7
|
"Apply": "Apply",
|
|
7
8
|
"Apply Columns": "Apply Columns",
|
|
8
9
|
"Cancel": "Cancel",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "Submit",
|
|
57
58
|
"The file type is not supported.": "The file type is not supported.",
|
|
58
59
|
"This Month": "This Month",
|
|
59
|
-
"Top": "Top",
|
|
60
60
|
"Unselect All": "Unselect All",
|
|
61
61
|
"Uploading": "Uploading",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "We support CSV or XLSX files (less than 20M each).",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "1 data terunggah",
|
|
4
4
|
"1 file in progress...": "1 data dalam proses",
|
|
5
5
|
"Accept": "Menerima",
|
|
6
|
+
"Action": "Beroperasi",
|
|
6
7
|
"Apply": "Terapkan",
|
|
7
8
|
"Apply Columns": "Terapkan Kolom",
|
|
8
9
|
"Cancel": "Batal",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "Ajukan",
|
|
57
58
|
"The file type is not supported.": "Jenis file tidak didukung.",
|
|
58
59
|
"This Month": "Bulan ini",
|
|
59
|
-
"Top": "Puncak",
|
|
60
60
|
"Unselect All": "Batalkan semua",
|
|
61
61
|
"Uploading": "Mengunggah",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "Kami mendukung file CSV atau XLSX (Ukuran maksimal 20 MB) .",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "นำเข้า 1 ไฟล์",
|
|
4
4
|
"1 file in progress...": "กำลังดำเนินการ 1 ไฟล์...",
|
|
5
5
|
"Accept": "ยอมรับ",
|
|
6
|
+
"Action": "ดำเนินงาน",
|
|
6
7
|
"Apply": "ใช้",
|
|
7
8
|
"Apply Columns": "ใช้คอลัมน์",
|
|
8
9
|
"Cancel": "ยกเลิก",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "ส่ง/ยืนยัน",
|
|
57
58
|
"The file type is not supported.": "ประเภทไฟล์ไม่รองรับ",
|
|
58
59
|
"This Month": "เดือนนี้",
|
|
59
|
-
"Top": "ข้างบน",
|
|
60
60
|
"Unselect All": "ไม่เลือกทั้งหมด",
|
|
61
61
|
"Uploading": "กำลังอัพโหลด",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "เรารองรับ CSV หรือ XLSX ไฟล์ (แต่ละไฟล์ขนาดไฟล์ต้องไม่เกิน 20M)",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "1 tệp được nhập",
|
|
4
4
|
"1 file in progress...": "1 tệp đang được xử lý",
|
|
5
5
|
"Accept": "Chấp nhận",
|
|
6
|
+
"Action": "Chạy",
|
|
6
7
|
"Apply": "Áp dụng",
|
|
7
8
|
"Apply Columns": "Áp dụng Cột",
|
|
8
9
|
"Cancel": "Hủy",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "Gửi",
|
|
57
58
|
"The file type is not supported.": "Loại tệp không được hỗ trợ.",
|
|
58
59
|
"This Month": "Tháng này",
|
|
59
|
-
"Top": "Hàng đầu",
|
|
60
60
|
"Unselect All": "Hủy chọn tất cả",
|
|
61
61
|
"Uploading": "Đang tải lên",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "Hỗ trợ .CSV hoặc .XLSX (file nhỏ hơn 20MB)",
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
"1 file imported.": "1个文件已导入。",
|
|
4
4
|
"1 file in progress...": "1个文件正在处理...",
|
|
5
5
|
"Accept": "接受",
|
|
6
|
+
"Action": "操作",
|
|
6
7
|
"Apply": "应用",
|
|
7
8
|
"Apply Columns": "应用",
|
|
8
9
|
"Cancel": "取消",
|
|
@@ -56,7 +57,6 @@
|
|
|
56
57
|
"Submit": "提交",
|
|
57
58
|
"The file type is not supported.": "不支持上传该类型的文件。",
|
|
58
59
|
"This Month": "当月",
|
|
59
|
-
"Top": "上",
|
|
60
60
|
"Unselect All": "反选",
|
|
61
61
|
"Uploading": "上传中",
|
|
62
62
|
"We support CSV or XLSX files (less than 20M each).": "支持上传20M以内的CSV和XLSX文件",
|
package/es/media/media.js
CHANGED
package/es/media/preview.js
CHANGED
|
@@ -131,8 +131,8 @@ var IglooSelect = function IglooSelect(_ref) {
|
|
|
131
131
|
}, [options]);
|
|
132
132
|
useEffect(function () {
|
|
133
133
|
var setFieldValue = rest.setFieldValue;
|
|
134
|
-
var foundValue =
|
|
135
|
-
return option.value === valueProp;
|
|
134
|
+
var foundValue = originOptions.find(function (option) {
|
|
135
|
+
return Array.isArray(valueProp) ? valueProp.includes(option.value) : option.value === valueProp;
|
|
136
136
|
});
|
|
137
137
|
|
|
138
138
|
if (!foundValue) {
|
package/es/table/index.js
CHANGED
|
@@ -43,7 +43,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
43
43
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
44
44
|
import invariant from 'invariant';
|
|
45
45
|
import moment from 'moment';
|
|
46
|
-
import { useState, useRef, useContext, useEffect } from 'react';
|
|
46
|
+
import { useState, useRef, useContext, useEffect, useReducer } from 'react';
|
|
47
47
|
import Button from '../button';
|
|
48
48
|
import { LocaleContext } from '../locale';
|
|
49
49
|
import Typography from '../typography';
|
|
@@ -63,14 +63,14 @@ var headerStyle = function headerStyle() {
|
|
|
63
63
|
|
|
64
64
|
var filterDefaultShow = function filterDefaultShow(col) {
|
|
65
65
|
return col.filter(function (item) {
|
|
66
|
-
return
|
|
66
|
+
return item.defaultShow !== false && item.customize !== false;
|
|
67
67
|
}).map(function (item) {
|
|
68
68
|
return item.key;
|
|
69
69
|
});
|
|
70
70
|
}; // buttons:all actionButtons, rowData:current row record data, actionButtonsFilter: filter function
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
var getDropDownMenu = function getDropDownMenu(allButtons, rowData, actionButtonsFilter) {
|
|
73
|
+
var getDropDownMenu = function getDropDownMenu(allButtons, rowData, actionButtonsFilter, setActionListVisible, actionIndex) {
|
|
74
74
|
var actionButtons = actionButtonsFilter && typeof actionButtonsFilter === 'function' ? actionButtonsFilter(rowData, allButtons) : allButtons;
|
|
75
75
|
return _jsx(_Space, Object.assign({
|
|
76
76
|
size: 16,
|
|
@@ -83,7 +83,11 @@ var getDropDownMenu = function getDropDownMenu(allButtons, rowData, actionButton
|
|
|
83
83
|
return _jsx(Button, Object.assign({
|
|
84
84
|
type: "text",
|
|
85
85
|
onClick: function onClick(e) {
|
|
86
|
-
|
|
86
|
+
item.onClick(rowData);
|
|
87
|
+
setActionListVisible({
|
|
88
|
+
type: actionIndex,
|
|
89
|
+
value: false
|
|
90
|
+
});
|
|
87
91
|
}
|
|
88
92
|
}, {
|
|
89
93
|
children: _jsx(Typography, Object.assign({
|
|
@@ -164,6 +168,12 @@ function paginationItem(page, type, originalElement) {
|
|
|
164
168
|
}), void 0);
|
|
165
169
|
}
|
|
166
170
|
|
|
171
|
+
function actionListChange(state, action) {
|
|
172
|
+
var type = action.type,
|
|
173
|
+
value = action.value;
|
|
174
|
+
return _objectSpread(_objectSpread({}, state), {}, _defineProperty({}, type, value));
|
|
175
|
+
}
|
|
176
|
+
|
|
167
177
|
var IglooTable = function IglooTable(_ref) {
|
|
168
178
|
var total = _ref.total,
|
|
169
179
|
_ref$page = _ref.page,
|
|
@@ -228,6 +238,11 @@ var IglooTable = function IglooTable(_ref) {
|
|
|
228
238
|
modalSelectedCol = _useState8[0],
|
|
229
239
|
setModalSelectedCol = _useState8[1];
|
|
230
240
|
|
|
241
|
+
var _useReducer = useReducer(actionListChange, {}),
|
|
242
|
+
_useReducer2 = _slicedToArray(_useReducer, 2),
|
|
243
|
+
actionListVisible = _useReducer2[0],
|
|
244
|
+
setActionListVisible = _useReducer2[1];
|
|
245
|
+
|
|
231
246
|
useEffect(function () {
|
|
232
247
|
if (colMax !== null && noCustomize !== true) {
|
|
233
248
|
invariant(colMax >= selectedColKeys.length, 'colmax has less than default select');
|
|
@@ -252,7 +267,7 @@ var IglooTable = function IglooTable(_ref) {
|
|
|
252
267
|
return _jsx("div", {
|
|
253
268
|
children: _jsx(_Checkbox, Object.assign({
|
|
254
269
|
value: item.key,
|
|
255
|
-
disabled: colDisable && colMax ? defaultOptions.length
|
|
270
|
+
disabled: colDisable && colMax ? defaultOptions.length >= colMax && !defaultOptions.includes(item.key) : false
|
|
256
271
|
}, {
|
|
257
272
|
children: _jsx(Typography, Object.assign({
|
|
258
273
|
level: "body1"
|
|
@@ -267,14 +282,23 @@ var IglooTable = function IglooTable(_ref) {
|
|
|
267
282
|
|
|
268
283
|
var actionCol = {
|
|
269
284
|
width: 50 + 32,
|
|
270
|
-
title:
|
|
285
|
+
title: formatMessage({
|
|
286
|
+
id: 'Action'
|
|
287
|
+
}),
|
|
271
288
|
dataIndex: 'action',
|
|
272
289
|
key: 'action',
|
|
273
290
|
align: 'center',
|
|
274
|
-
render: function render(text, record) {
|
|
291
|
+
render: function render(text, record, index) {
|
|
275
292
|
return _jsx(_Popover, Object.assign({
|
|
293
|
+
visible: actionListVisible[index] || false,
|
|
294
|
+
onVisibleChange: function onVisibleChange(visible) {
|
|
295
|
+
setActionListVisible({
|
|
296
|
+
type: index,
|
|
297
|
+
value: visible
|
|
298
|
+
});
|
|
299
|
+
},
|
|
276
300
|
placement: "bottomRight",
|
|
277
|
-
content: getDropDownMenu(actionButtons, record, actionButtonsFilter),
|
|
301
|
+
content: getDropDownMenu(actionButtons, record, actionButtonsFilter, setActionListVisible, index),
|
|
278
302
|
getPopupContainer: function getPopupContainer() {
|
|
279
303
|
return tableRef.current;
|
|
280
304
|
},
|
|
@@ -498,7 +522,7 @@ var IglooTable = function IglooTable(_ref) {
|
|
|
498
522
|
}), void 0), _jsx(Typography, Object.assign({
|
|
499
523
|
level: "body1"
|
|
500
524
|
}, {
|
|
501
|
-
children: modalContent(columns,
|
|
525
|
+
children: modalContent(columns, modalSelectedCol, function (item) {
|
|
502
526
|
setModalSelectedCol(item);
|
|
503
527
|
}, colMax, colDisable)
|
|
504
528
|
}), void 0)]
|