iglooform 2.4.5 → 2.4.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/admin-upload/float.js +25 -35
- package/es/admin-upload/index.js +18 -25
- package/es/admin-upload/job-list.js +83 -113
- package/es/admin-upload/modal.js +19 -26
- package/es/alert-message/index.js +11 -9
- package/es/amount/index.js +10 -5
- package/es/back-top/index.js +14 -10
- package/es/button/index.js +21 -26
- package/es/card-detail/card-group.js +16 -22
- package/es/card-detail/card-item.js +15 -20
- package/es/card-detail/card-page.js +11 -15
- package/es/card-detail/card.js +24 -24
- package/es/card-detail/style/index.less +13 -0
- package/es/card-detail/utils.js +3 -4
- package/es/checkbox/index.js +23 -22
- package/es/claim-list/index.js +51 -68
- package/es/confirmation/index.js +5 -7
- package/es/date-picker/buddhist.js +1 -1
- package/es/date-picker/index.js +10 -4
- package/es/declaration/index.js +16 -13
- package/es/detail-panel/index.js +67 -83
- package/es/documents/index.js +6 -8
- package/es/example/index.js +3 -4
- package/es/filter/checkBox.js +33 -45
- package/es/filter/customize.js +3 -4
- package/es/filter/index.js +79 -107
- package/es/filter/radioBox.js +23 -31
- package/es/filter/rangePicker.js +43 -59
- package/es/form/divider/index.js +7 -1
- package/es/form/element/index.js +28 -36
- package/es/form/element/style/index.less +4 -0
- package/es/form/index.js +9 -12
- package/es/form/login/index.js +14 -19
- package/es/form/page/index.js +17 -23
- package/es/form/pages/index.js +22 -30
- package/es/form/section/index.js +11 -14
- package/es/form/step/index.js +30 -41
- package/es/form/steps/index.js +9 -9
- package/es/free-form/element/index.js +21 -27
- package/es/free-form/element/style/index.less +4 -0
- package/es/free-form/index.js +9 -12
- package/es/free-form/page/index.js +28 -39
- package/es/free-form/pages/index.js +6 -8
- package/es/free-form/section/index.js +11 -14
- package/es/free-form/step/index.js +30 -41
- package/es/free-form/steps/index.d.ts +1 -0
- package/es/free-form/steps/index.js +8 -8
- package/es/home-menu/index.js +52 -71
- package/es/input/amount.js +10 -5
- package/es/input/credit-card.js +7 -1
- package/es/input/email.js +8 -1
- package/es/input/expiry-date.js +12 -16
- package/es/input/input-date.js +12 -16
- package/es/input/input-number.js +9 -2
- package/es/input/input.js +9 -2
- package/es/input/otp.js +17 -15
- package/es/input/password.js +12 -6
- package/es/input/phone-number.js +6 -8
- package/es/input/text-area.js +14 -10
- package/es/layout/defaultFooter.js +60 -82
- package/es/layout/defaultHeader.js +11 -15
- package/es/layout/footer.js +111 -151
- package/es/layout/header.js +50 -59
- package/es/layout/index.js +16 -12
- package/es/locale/locale-provider.js +6 -8
- package/es/login-page/index.js +30 -42
- package/es/media/index.js +20 -27
- package/es/media/media.js +9 -12
- package/es/media/preview.js +6 -8
- package/es/mobile-insurer-detail/index.js +74 -91
- package/es/mobile-insurer-list/index.js +34 -38
- package/es/modal/index.js +22 -26
- package/es/modal/style/index.less +13 -4
- package/es/platform/platform-card/index.js +9 -12
- package/es/platform/switch-platform/index.js +24 -32
- package/es/policy-list/index.js +9 -12
- package/es/policy-list/policy-card.js +119 -153
- package/es/radio/index.js +33 -35
- package/es/select/attached-select.js +31 -34
- package/es/select/select.js +12 -8
- package/es/select/time-select.js +12 -16
- package/es/status-box/index.js +6 -8
- package/es/table/index.js +69 -93
- package/es/tabs/index.js +7 -1
- package/es/typography/index.js +6 -8
- package/es/upload/index.js +48 -66
- package/es/upload-photo/index.js +47 -63
- package/es/upload-photo/media.js +3 -4
- package/es/upload-preview/index.js +9 -12
- package/es/upload-preview/media.js +12 -16
- package/es/upload-preview/style/index.less +2 -2
- package/es/utils/form-utils.js +18 -25
- package/lib/admin-upload/float.js +25 -35
- package/lib/admin-upload/index.js +18 -25
- package/lib/admin-upload/job-list.js +83 -113
- package/lib/admin-upload/modal.js +19 -26
- package/lib/alert-message/index.js +11 -9
- package/lib/amount/index.js +10 -5
- package/lib/back-top/index.js +14 -10
- package/lib/button/index.js +22 -27
- package/lib/card-detail/card-group.js +16 -22
- package/lib/card-detail/card-item.js +15 -20
- package/lib/card-detail/card-page.js +11 -15
- package/lib/card-detail/card.js +24 -24
- package/lib/card-detail/index.js +6 -6
- package/lib/card-detail/style/index.less +13 -0
- package/lib/card-detail/utils.js +4 -5
- package/lib/checkbox/index.js +24 -23
- package/lib/claim-list/index.js +51 -68
- package/lib/confirmation/index.js +5 -7
- package/lib/date-picker/buddhist.js +1 -1
- package/lib/date-picker/index.js +11 -5
- package/lib/declaration/index.js +16 -13
- package/lib/detail-panel/index.js +67 -83
- package/lib/documents/index.js +6 -8
- package/lib/example/index.js +3 -4
- package/lib/filter/checkBox.js +33 -45
- package/lib/filter/customize.js +3 -4
- package/lib/filter/index.js +79 -107
- package/lib/filter/radioBox.js +23 -31
- package/lib/filter/rangePicker.js +43 -59
- package/lib/form/divider/index.js +7 -1
- package/lib/form/element/index.js +28 -36
- package/lib/form/element/style/index.less +4 -0
- package/lib/form/index.js +9 -12
- package/lib/form/login/index.js +14 -19
- package/lib/form/page/index.js +17 -23
- package/lib/form/pages/index.js +22 -30
- package/lib/form/section/index.js +11 -14
- package/lib/form/step/index.js +30 -41
- package/lib/form/steps/index.js +9 -9
- package/lib/free-form/element/index.js +21 -27
- package/lib/free-form/element/style/index.less +4 -0
- package/lib/free-form/index.js +9 -12
- package/lib/free-form/page/index.js +28 -39
- package/lib/free-form/pages/index.js +6 -8
- package/lib/free-form/section/index.js +11 -14
- package/lib/free-form/step/index.js +30 -41
- package/lib/free-form/steps/index.d.ts +1 -0
- package/lib/free-form/steps/index.js +8 -8
- package/lib/home-menu/index.js +52 -71
- package/lib/index.js +132 -132
- package/lib/input/amount.js +10 -5
- package/lib/input/credit-card.js +7 -1
- package/lib/input/email.js +7 -1
- package/lib/input/expiry-date.js +12 -16
- package/lib/input/index.js +18 -18
- package/lib/input/input-date.js +12 -16
- package/lib/input/input-number.js +8 -2
- package/lib/input/input.js +8 -2
- package/lib/input/otp.js +17 -15
- package/lib/input/password.js +11 -6
- package/lib/input/phone-number.js +6 -8
- package/lib/input/text-area.js +14 -10
- package/lib/layout/defaultFooter.js +60 -82
- package/lib/layout/defaultHeader.js +11 -15
- package/lib/layout/footer.js +111 -151
- package/lib/layout/header.js +50 -59
- package/lib/layout/index.js +15 -12
- package/lib/locale/format-message.js +1 -1
- package/lib/locale/index.js +4 -4
- package/lib/locale/locale-provider.js +7 -9
- package/lib/login-page/index.js +30 -42
- package/lib/media/index.js +20 -27
- package/lib/media/media.js +9 -12
- package/lib/media/preview.js +6 -8
- package/lib/mobile-insurer-detail/index.js +74 -91
- package/lib/mobile-insurer-list/index.js +34 -38
- package/lib/modal/index.js +22 -26
- package/lib/modal/style/index.less +13 -4
- package/lib/platform/platform-card/index.js +9 -12
- package/lib/platform/switch-platform/index.js +24 -32
- package/lib/policy-list/index.js +9 -12
- package/lib/policy-list/policy-card.js +119 -153
- package/lib/radio/index.js +33 -35
- package/lib/select/attached-select.js +32 -35
- package/lib/select/select.js +13 -9
- package/lib/select/time-select.js +12 -16
- package/lib/status-box/index.js +6 -8
- package/lib/table/index.js +69 -93
- package/lib/tabs/index.js +8 -2
- package/lib/typography/index.js +6 -8
- package/lib/upload/index.js +48 -66
- package/lib/upload-photo/index.js +47 -63
- package/lib/upload-photo/media.js +3 -4
- package/lib/upload-preview/index.js +9 -12
- package/lib/upload-preview/media.js +12 -16
- package/lib/upload-preview/style/index.less +2 -2
- package/lib/utils/form-utils.js +19 -26
- package/package.json +1 -1
package/es/admin-upload/float.js
CHANGED
|
@@ -44,21 +44,17 @@ var Float = function Float(_ref) {
|
|
|
44
44
|
return null;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
return _jsxs("div",
|
|
48
|
-
className: "igloo-admin-upload-float"
|
|
49
|
-
|
|
50
|
-
children: [_jsxs("div", Object.assign({
|
|
47
|
+
return _jsxs("div", {
|
|
48
|
+
className: "igloo-admin-upload-float",
|
|
49
|
+
children: [_jsxs("div", {
|
|
51
50
|
className: "igloo-admin-upload-float-header",
|
|
52
51
|
onClick: function onClick() {
|
|
53
52
|
return setOpen(!open);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
children: [_jsx("div", Object.assign({
|
|
60
|
-
className: "igloo-admin-upload-float-header-icon-box"
|
|
61
|
-
}, {
|
|
53
|
+
},
|
|
54
|
+
children: [_jsxs("div", {
|
|
55
|
+
className: "igloo-admin-upload-float-header-left",
|
|
56
|
+
children: [_jsx("div", {
|
|
57
|
+
className: "igloo-admin-upload-float-header-icon-box",
|
|
62
58
|
children: processingNumber ? _jsx(ProcessingOutlined, {
|
|
63
59
|
className: "igloo-admin-upload-float-header-icon",
|
|
64
60
|
spinning: true,
|
|
@@ -66,31 +62,27 @@ var Float = function Float(_ref) {
|
|
|
66
62
|
}, void 0) : _jsx(CheckOutlined, {
|
|
67
63
|
className: "igloo-admin-upload-float-header-icon"
|
|
68
64
|
}, void 0)
|
|
69
|
-
}
|
|
70
|
-
className: "igloo-admin-upload-float-header-text"
|
|
71
|
-
|
|
72
|
-
children: [_jsx(Typography, Object.assign({
|
|
65
|
+
}, void 0), _jsxs("div", {
|
|
66
|
+
className: "igloo-admin-upload-float-header-text",
|
|
67
|
+
children: [_jsx(Typography, {
|
|
73
68
|
level: "h5",
|
|
74
|
-
wrapElement: "div"
|
|
75
|
-
}, {
|
|
69
|
+
wrapElement: "div",
|
|
76
70
|
children: title || formatMessage({
|
|
77
71
|
id: 'Data Importing Queue'
|
|
78
72
|
})
|
|
79
|
-
}
|
|
73
|
+
}, void 0), formatTips && _jsx(Typography, {
|
|
80
74
|
level: "body3",
|
|
81
75
|
wrapElement: "div",
|
|
82
|
-
className: "igloo-admin-upload-float-header-tips"
|
|
83
|
-
}, {
|
|
76
|
+
className: "igloo-admin-upload-float-header-tips",
|
|
84
77
|
children: formatTips({
|
|
85
78
|
uploading: uploadingNumber,
|
|
86
79
|
processing: processingNumber,
|
|
87
80
|
done: doneNumber
|
|
88
81
|
})
|
|
89
|
-
}
|
|
82
|
+
}, void 0), !formatTips && _jsx(Typography, {
|
|
90
83
|
level: "body3",
|
|
91
84
|
wrapElement: "div",
|
|
92
|
-
className: "igloo-admin-upload-float-header-tips"
|
|
93
|
-
}, {
|
|
85
|
+
className: "igloo-admin-upload-float-header-tips",
|
|
94
86
|
children: processingNumber ? processingNumber === 1 ? formatMessage({
|
|
95
87
|
id: '1 file in progress...'
|
|
96
88
|
}) : formatMessage({
|
|
@@ -106,22 +98,20 @@ var Float = function Float(_ref) {
|
|
|
106
98
|
doneNumber: doneNumber
|
|
107
99
|
}
|
|
108
100
|
})
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
className: "igloo-admin-upload-float-header-right"
|
|
113
|
-
}, {
|
|
101
|
+
}, void 0)]
|
|
102
|
+
}, void 0)]
|
|
103
|
+
}, void 0), _jsxs("div", {
|
|
104
|
+
className: "igloo-admin-upload-float-header-right",
|
|
114
105
|
children: [open ? _jsx(ArrowUpOutlined, {}, void 0) : _jsx(ArrowDownOutlined, {}, void 0), !processingNumber && _jsx(CrossOutlined, {
|
|
115
106
|
className: "igloo-admin-upload-float-header-close",
|
|
116
107
|
onClick: onClose
|
|
117
108
|
}, void 0)]
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
className: "igloo-admin-upload-float-content"
|
|
121
|
-
}, {
|
|
109
|
+
}, void 0)]
|
|
110
|
+
}, void 0), open && _jsx("div", {
|
|
111
|
+
className: "igloo-admin-upload-float-content",
|
|
122
112
|
children: children
|
|
123
|
-
}
|
|
124
|
-
}
|
|
113
|
+
}, void 0)]
|
|
114
|
+
}, void 0);
|
|
125
115
|
};
|
|
126
116
|
|
|
127
117
|
export default Float;
|
package/es/admin-upload/index.js
CHANGED
|
@@ -378,20 +378,18 @@ var AdminUpload = function AdminUpload(_ref) {
|
|
|
378
378
|
setShowFloatComfirm(true);
|
|
379
379
|
};
|
|
380
380
|
|
|
381
|
-
return _jsxs("div",
|
|
382
|
-
className: "igloo-admin-upload"
|
|
383
|
-
|
|
384
|
-
children: [_jsx(Button, Object.assign({
|
|
381
|
+
return _jsxs("div", {
|
|
382
|
+
className: "igloo-admin-upload",
|
|
383
|
+
children: [_jsx(Button, {
|
|
385
384
|
type: buttonType,
|
|
386
385
|
onClick: function onClick() {
|
|
387
386
|
return setShowModal(true);
|
|
388
387
|
},
|
|
389
|
-
icon: _jsx(PublishOutlined, {}, void 0)
|
|
390
|
-
}, {
|
|
388
|
+
icon: _jsx(PublishOutlined, {}, void 0),
|
|
391
389
|
children: buttonText || formatMessage({
|
|
392
390
|
id: 'Import'
|
|
393
391
|
})
|
|
394
|
-
}
|
|
392
|
+
}, void 0), _jsx(Import, {
|
|
395
393
|
title: modalTitle,
|
|
396
394
|
accept: accept,
|
|
397
395
|
visible: showModal,
|
|
@@ -400,8 +398,7 @@ var AdminUpload = function AdminUpload(_ref) {
|
|
|
400
398
|
onClose: function onClose() {
|
|
401
399
|
return setShowModal(false);
|
|
402
400
|
},
|
|
403
|
-
onUpload: handleUpload
|
|
404
|
-
}, {
|
|
401
|
+
onUpload: handleUpload,
|
|
405
402
|
children: _jsx(JobList, {
|
|
406
403
|
uploadJobs: uploadJobs,
|
|
407
404
|
processingJobs: processingJobs,
|
|
@@ -413,15 +410,14 @@ var AdminUpload = function AdminUpload(_ref) {
|
|
|
413
410
|
cancelProcess: handleRemoveJob,
|
|
414
411
|
hideJob: handleRemoveJob
|
|
415
412
|
}, void 0)
|
|
416
|
-
}
|
|
413
|
+
}, void 0), _jsx(Float, {
|
|
417
414
|
title: floatTitle,
|
|
418
415
|
visible: showFloat,
|
|
419
416
|
uploadingNumber: uploadJobs.length,
|
|
420
417
|
processingNumber: processingJobs.length,
|
|
421
418
|
doneNumber: doneJobs.length,
|
|
422
419
|
onClose: handleCloseFloat,
|
|
423
|
-
formatTips: formatTips
|
|
424
|
-
}, {
|
|
420
|
+
formatTips: formatTips,
|
|
425
421
|
children: _jsx(JobList, {
|
|
426
422
|
uploadJobs: uploadJobs,
|
|
427
423
|
processingJobs: processingJobs,
|
|
@@ -433,7 +429,7 @@ var AdminUpload = function AdminUpload(_ref) {
|
|
|
433
429
|
cancelProcess: handleRemoveJob,
|
|
434
430
|
hideJob: handleRemoveJob
|
|
435
431
|
}, void 0)
|
|
436
|
-
}
|
|
432
|
+
}, void 0), _jsx(_Modal, {
|
|
437
433
|
cancelText: formatMessage({
|
|
438
434
|
id: 'Cancel'
|
|
439
435
|
}),
|
|
@@ -464,19 +460,16 @@ var AdminUpload = function AdminUpload(_ref) {
|
|
|
464
460
|
style: {
|
|
465
461
|
fontSize: 24
|
|
466
462
|
}
|
|
467
|
-
}, void 0)
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
children: ["Would you like to close the result panel now? You can go to", ' ', _jsxs(Typography, Object.assign({
|
|
473
|
-
level: "caption1"
|
|
474
|
-
}, {
|
|
463
|
+
}, void 0),
|
|
464
|
+
children: _jsxs(Typography, {
|
|
465
|
+
level: "body1",
|
|
466
|
+
children: ["Would you like to close the result panel now? You can go to", ' ', _jsxs(Typography, {
|
|
467
|
+
level: "caption1",
|
|
475
468
|
children: ["My Account ", '>', " Activity Log"]
|
|
476
|
-
}
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
}
|
|
469
|
+
}, void 0), ' ', "to view this import result after this panel is closed."]
|
|
470
|
+
}, void 0)
|
|
471
|
+
}, void 0)]
|
|
472
|
+
}, void 0);
|
|
480
473
|
};
|
|
481
474
|
|
|
482
475
|
export default AdminUpload;
|
|
@@ -36,27 +36,24 @@ export var JobItem = function JobItem(_ref) {
|
|
|
36
36
|
formatMessage = _useContext.formatMessage;
|
|
37
37
|
|
|
38
38
|
var progress = Number((success_num + fail_num) / total_num * 100).toFixed(2);
|
|
39
|
-
var downloadReport = fail_data_url ? _jsxs(Button,
|
|
39
|
+
var downloadReport = fail_data_url ? _jsxs(Button, {
|
|
40
40
|
type: "link",
|
|
41
|
-
href: fail_data_url
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
level: "h5"
|
|
45
|
-
}, {
|
|
41
|
+
href: fail_data_url,
|
|
42
|
+
children: [_jsx(Typography, {
|
|
43
|
+
level: "h5",
|
|
46
44
|
children: formatMessage({
|
|
47
45
|
id: 'Error Report'
|
|
48
46
|
})
|
|
49
|
-
}
|
|
47
|
+
}, void 0), ' ', _jsx(DownloadOutlined, {
|
|
50
48
|
style: {
|
|
51
49
|
fontSize: 24
|
|
52
50
|
}
|
|
53
51
|
}, void 0)]
|
|
54
|
-
}
|
|
52
|
+
}, void 0) : null;
|
|
55
53
|
|
|
56
|
-
var result = _jsx(Typography,
|
|
54
|
+
var result = _jsx(Typography, {
|
|
57
55
|
level: "caption2",
|
|
58
|
-
wrapElement: "div"
|
|
59
|
-
}, {
|
|
56
|
+
wrapElement: "div",
|
|
60
57
|
children: formatMessage({
|
|
61
58
|
id: 'Result: Success {success_num}; Error {fail_num}',
|
|
62
59
|
values: {
|
|
@@ -64,61 +61,54 @@ export var JobItem = function JobItem(_ref) {
|
|
|
64
61
|
fail_num: fail_num
|
|
65
62
|
}
|
|
66
63
|
})
|
|
67
|
-
}
|
|
64
|
+
}, void 0);
|
|
68
65
|
|
|
69
|
-
return _jsxs("div",
|
|
66
|
+
return _jsxs("div", {
|
|
70
67
|
className: classnames({
|
|
71
68
|
'igloo-job-item': true,
|
|
72
69
|
'igloo-job-item-loading': status === 'Processing'
|
|
73
70
|
}),
|
|
74
71
|
style: {
|
|
75
72
|
borderImage: "linear-gradient(to right, #5858FF, #5858FF ".concat(progress, "%, #CCCCFF ").concat(progress, "%, #CCCCFF 100%) 2")
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
children: [_jsxs(_Space, Object.assign({
|
|
82
|
-
size: 8
|
|
83
|
-
}, {
|
|
73
|
+
},
|
|
74
|
+
children: [_jsxs(_Row, {
|
|
75
|
+
justify: "space-between",
|
|
76
|
+
children: [_jsxs(_Space, {
|
|
77
|
+
size: 8,
|
|
84
78
|
children: [_jsx(ExcelOutlined, {
|
|
85
79
|
className: "igloo-job-item-icon"
|
|
86
|
-
}, void 0), _jsx(Typography,
|
|
80
|
+
}, void 0), _jsx(Typography, {
|
|
87
81
|
level: "h5",
|
|
88
82
|
className: "igloo-job-item-fileName",
|
|
89
83
|
style: {
|
|
90
84
|
maxWidth: size === 'default' ? 260 : 120
|
|
91
85
|
},
|
|
92
|
-
title: origin_file_name
|
|
93
|
-
}, {
|
|
86
|
+
title: origin_file_name,
|
|
94
87
|
children: origin_file_name
|
|
95
|
-
}
|
|
96
|
-
}
|
|
88
|
+
}, void 0)]
|
|
89
|
+
}, void 0), _jsxs("div", {
|
|
97
90
|
style: {
|
|
98
91
|
display: 'flex',
|
|
99
92
|
alignItems: 'center'
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
children: [_jsxs(Typography, Object.assign({
|
|
93
|
+
},
|
|
94
|
+
children: [_jsxs(Typography, {
|
|
103
95
|
level: "body2",
|
|
104
96
|
style: {
|
|
105
97
|
marginRight: 16
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
98
|
+
},
|
|
108
99
|
children: [size !== 'small' && _jsx("span", {
|
|
109
100
|
children: status === 'Processing' ? formatMessage({
|
|
110
101
|
id: 'Data Processing...'
|
|
111
102
|
}) : formatMessage({
|
|
112
103
|
id: 'Data Processed'
|
|
113
104
|
})
|
|
114
|
-
}, void 0), _jsxs("span",
|
|
105
|
+
}, void 0), _jsxs("span", {
|
|
115
106
|
style: {
|
|
116
107
|
marginLeft: 8
|
|
117
|
-
}
|
|
118
|
-
}, {
|
|
108
|
+
},
|
|
119
109
|
children: [progress, "%"]
|
|
120
|
-
}
|
|
121
|
-
}
|
|
110
|
+
}, void 0)]
|
|
111
|
+
}, void 0), _jsx(CrossOutlined, {
|
|
122
112
|
className: "igloo-job-item-icon igloo-job-item-icon-delete",
|
|
123
113
|
onClick: function onClick() {
|
|
124
114
|
return handleHide(job_id);
|
|
@@ -131,22 +121,19 @@ export var JobItem = function JobItem(_ref) {
|
|
|
131
121
|
className: "igloo-job-item-icon igloo-job-item-icon-loading",
|
|
132
122
|
spinning: true
|
|
133
123
|
}, void 0)]
|
|
134
|
-
}
|
|
135
|
-
}
|
|
124
|
+
}, void 0)]
|
|
125
|
+
}, void 0), status === 'Done' && (size === 'default' ? _jsxs(_Row, {
|
|
136
126
|
justify: "space-between",
|
|
137
|
-
className: "igloo-job-item-result"
|
|
138
|
-
}, {
|
|
127
|
+
className: "igloo-job-item-result",
|
|
139
128
|
children: [result, downloadReport]
|
|
140
|
-
}
|
|
141
|
-
className: "igloo-job-item-result"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
justify: "space-between"
|
|
145
|
-
}, {
|
|
129
|
+
}, void 0) : _jsxs("div", {
|
|
130
|
+
className: "igloo-job-item-result",
|
|
131
|
+
children: [result, _jsxs(_Row, {
|
|
132
|
+
justify: "space-between",
|
|
146
133
|
children: [_jsx("div", {}, void 0), downloadReport]
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
}
|
|
134
|
+
}, void 0)]
|
|
135
|
+
}, void 0))]
|
|
136
|
+
}, void 0);
|
|
150
137
|
};
|
|
151
138
|
export var UploadJobItem = function UploadJobItem(_ref2) {
|
|
152
139
|
var uid = _ref2.uid,
|
|
@@ -160,66 +147,57 @@ export var UploadJobItem = function UploadJobItem(_ref2) {
|
|
|
160
147
|
handleReupload = _ref2.handleReupload,
|
|
161
148
|
handleCancel = _ref2.handleCancel;
|
|
162
149
|
|
|
163
|
-
var loadedSize = _jsx(Typography,
|
|
164
|
-
level: "body2"
|
|
165
|
-
}, {
|
|
150
|
+
var loadedSize = _jsx(Typography, {
|
|
151
|
+
level: "body2",
|
|
166
152
|
children: parseFileSize(loadedSizeProp)
|
|
167
|
-
}
|
|
153
|
+
}, void 0);
|
|
168
154
|
|
|
169
|
-
var total = _jsx(Typography,
|
|
170
|
-
level: "body2"
|
|
171
|
-
}, {
|
|
155
|
+
var total = _jsx(Typography, {
|
|
156
|
+
level: "body2",
|
|
172
157
|
children: parseFileSize(totalProp)
|
|
173
|
-
}
|
|
158
|
+
}, void 0);
|
|
174
159
|
|
|
175
|
-
var fileSize = _jsx(Typography,
|
|
160
|
+
var fileSize = _jsx(Typography, {
|
|
176
161
|
level: "body2",
|
|
177
162
|
style: {
|
|
178
163
|
marginRight: 16
|
|
179
|
-
}
|
|
180
|
-
}, {
|
|
164
|
+
},
|
|
181
165
|
children: parseFileSize(fileSizeProp)
|
|
182
|
-
}
|
|
166
|
+
}, void 0);
|
|
183
167
|
|
|
184
|
-
var percent = _jsxs(Typography,
|
|
168
|
+
var percent = _jsxs(Typography, {
|
|
185
169
|
level: "body2",
|
|
186
170
|
style: {
|
|
187
171
|
marginRight: 16
|
|
188
|
-
}
|
|
189
|
-
}, {
|
|
172
|
+
},
|
|
190
173
|
children: [totalProp ? Number(loadedSizeProp / totalProp * 100).toFixed(2) : '-', "%"]
|
|
191
|
-
}
|
|
174
|
+
}, void 0);
|
|
192
175
|
|
|
193
|
-
return _jsxs("div",
|
|
176
|
+
return _jsxs("div", {
|
|
194
177
|
className: classnames({
|
|
195
178
|
'igloo-job-item': true,
|
|
196
179
|
'igloo-job-item-failed': status === 'failed'
|
|
197
|
-
})
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
children: [_jsxs(_Space, Object.assign({
|
|
203
|
-
size: 8
|
|
204
|
-
}, {
|
|
180
|
+
}),
|
|
181
|
+
children: [_jsxs(_Row, {
|
|
182
|
+
justify: "space-between",
|
|
183
|
+
children: [_jsxs(_Space, {
|
|
184
|
+
size: 8,
|
|
205
185
|
children: [_jsx(ExcelOutlined, {
|
|
206
186
|
className: "igloo-job-item-icon"
|
|
207
|
-
}, void 0), _jsx(Typography,
|
|
187
|
+
}, void 0), _jsx(Typography, {
|
|
208
188
|
level: "h5",
|
|
209
189
|
className: "igloo-job-item-fileName",
|
|
210
190
|
style: {
|
|
211
191
|
maxWidth: size === 'default' ? 260 : 120
|
|
212
192
|
},
|
|
213
|
-
title: fileName
|
|
214
|
-
}, {
|
|
193
|
+
title: fileName,
|
|
215
194
|
children: fileName
|
|
216
|
-
}
|
|
217
|
-
}
|
|
195
|
+
}, void 0)]
|
|
196
|
+
}, void 0), _jsxs("div", {
|
|
218
197
|
style: {
|
|
219
198
|
display: 'flex',
|
|
220
199
|
alignItems: 'center'
|
|
221
|
-
}
|
|
222
|
-
}, {
|
|
200
|
+
},
|
|
223
201
|
children: [status === 'failed' ? fileSize : percent, status === 'failed' && !errorMessage && _jsx(RefreshOutlined, {
|
|
224
202
|
className: "igloo-job-item-icon igloo-job-item-icon-reupload",
|
|
225
203
|
style: {
|
|
@@ -254,15 +232,14 @@ export var UploadJobItem = function UploadJobItem(_ref2) {
|
|
|
254
232
|
return handleCancel(uid);
|
|
255
233
|
}
|
|
256
234
|
}, void 0)]
|
|
257
|
-
}
|
|
258
|
-
}
|
|
235
|
+
}, void 0)]
|
|
236
|
+
}, void 0), errorMessage && _jsx(Typography, {
|
|
259
237
|
level: "body2",
|
|
260
238
|
className: "igloo-job-item-error",
|
|
261
|
-
wrapElement: "div"
|
|
262
|
-
}, {
|
|
239
|
+
wrapElement: "div",
|
|
263
240
|
children: errorMessage
|
|
264
|
-
}
|
|
265
|
-
}
|
|
241
|
+
}, void 0)]
|
|
242
|
+
}, void 0);
|
|
266
243
|
};
|
|
267
244
|
|
|
268
245
|
var JobList = function JobList(_ref3) {
|
|
@@ -279,21 +256,18 @@ var JobList = function JobList(_ref3) {
|
|
|
279
256
|
var _useContext2 = useContext(LocaleContext),
|
|
280
257
|
formatMessage = _useContext2.formatMessage;
|
|
281
258
|
|
|
282
|
-
return _jsxs("div",
|
|
283
|
-
className: "igloo-job-list"
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
}, {
|
|
288
|
-
children: [_jsx(Typography, Object.assign({
|
|
259
|
+
return _jsxs("div", {
|
|
260
|
+
className: "igloo-job-list",
|
|
261
|
+
children: [Boolean(uploadJobs === null || uploadJobs === void 0 ? void 0 : uploadJobs.length) && _jsxs("div", {
|
|
262
|
+
className: "igloo-job-list-section",
|
|
263
|
+
children: [_jsx(Typography, {
|
|
289
264
|
level: "body2",
|
|
290
265
|
wrapElement: "div",
|
|
291
|
-
className: "igloo-job-list-section-title"
|
|
292
|
-
}, {
|
|
266
|
+
className: "igloo-job-list-section-title",
|
|
293
267
|
children: formatMessage({
|
|
294
268
|
id: 'Uploading'
|
|
295
269
|
})
|
|
296
|
-
}
|
|
270
|
+
}, void 0), uploadJobs.map(function (props, index) {
|
|
297
271
|
return /*#__PURE__*/_createElement(UploadJobItem, _objectSpread(_objectSpread({}, props), {}, {
|
|
298
272
|
size: size,
|
|
299
273
|
key: index,
|
|
@@ -301,18 +275,16 @@ var JobList = function JobList(_ref3) {
|
|
|
301
275
|
handleReupload: reUpload
|
|
302
276
|
}));
|
|
303
277
|
})]
|
|
304
|
-
}
|
|
305
|
-
className: "igloo-job-list-section"
|
|
306
|
-
|
|
307
|
-
children: [_jsx(Typography, Object.assign({
|
|
278
|
+
}, void 0), Boolean(processingJobs === null || processingJobs === void 0 ? void 0 : processingJobs.length) && _jsxs("div", {
|
|
279
|
+
className: "igloo-job-list-section",
|
|
280
|
+
children: [_jsx(Typography, {
|
|
308
281
|
level: "body2",
|
|
309
282
|
wrapElement: "div",
|
|
310
|
-
className: "igloo-job-list-section-title"
|
|
311
|
-
}, {
|
|
283
|
+
className: "igloo-job-list-section-title",
|
|
312
284
|
children: formatMessage({
|
|
313
285
|
id: 'Processing'
|
|
314
286
|
})
|
|
315
|
-
}
|
|
287
|
+
}, void 0), fetchingFailed && _jsx(AlertMessage, {
|
|
316
288
|
type: "warning",
|
|
317
289
|
message: formatMessage({
|
|
318
290
|
id: 'Processing progress cannot be updated at the moment. Don’t worry! All your file data are still in progress.'
|
|
@@ -326,18 +298,16 @@ var JobList = function JobList(_ref3) {
|
|
|
326
298
|
handleHide: hideJob
|
|
327
299
|
}));
|
|
328
300
|
})]
|
|
329
|
-
}
|
|
330
|
-
className: "igloo-job-list-section"
|
|
331
|
-
|
|
332
|
-
children: [_jsx(Typography, Object.assign({
|
|
301
|
+
}, void 0), Boolean(doneJobs === null || doneJobs === void 0 ? void 0 : doneJobs.length) && _jsxs("div", {
|
|
302
|
+
className: "igloo-job-list-section",
|
|
303
|
+
children: [_jsx(Typography, {
|
|
333
304
|
level: "body2",
|
|
334
305
|
wrapElement: "div",
|
|
335
|
-
className: "igloo-job-list-section-title"
|
|
336
|
-
}, {
|
|
306
|
+
className: "igloo-job-list-section-title",
|
|
337
307
|
children: formatMessage({
|
|
338
308
|
id: 'Result'
|
|
339
309
|
})
|
|
340
|
-
}
|
|
310
|
+
}, void 0), doneJobs.map(function (props, index) {
|
|
341
311
|
return /*#__PURE__*/_createElement(JobItem, _objectSpread(_objectSpread({}, props), {}, {
|
|
342
312
|
key: props.job_id,
|
|
343
313
|
size: size,
|
|
@@ -345,8 +315,8 @@ var JobList = function JobList(_ref3) {
|
|
|
345
315
|
handleHide: hideJob
|
|
346
316
|
}));
|
|
347
317
|
})]
|
|
348
|
-
}
|
|
349
|
-
}
|
|
318
|
+
}, void 0)]
|
|
319
|
+
}, void 0);
|
|
350
320
|
};
|
|
351
321
|
|
|
352
322
|
export default JobList;
|
package/es/admin-upload/modal.js
CHANGED
|
@@ -46,7 +46,7 @@ var Import = function Import(_ref) {
|
|
|
46
46
|
setSource(void 0);
|
|
47
47
|
}
|
|
48
48
|
}, [visible]);
|
|
49
|
-
return _jsx(_Modal,
|
|
49
|
+
return _jsx(_Modal, {
|
|
50
50
|
className: "igloo-admin-upload-modal",
|
|
51
51
|
title: title || 'Import',
|
|
52
52
|
visible: visible,
|
|
@@ -58,12 +58,10 @@ var Import = function Import(_ref) {
|
|
|
58
58
|
fontSize: 24
|
|
59
59
|
}
|
|
60
60
|
}, void 0),
|
|
61
|
-
destroyOnClose: true
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}, {
|
|
66
|
-
children: [_jsxs(_Upload.Dragger, Object.assign({
|
|
61
|
+
destroyOnClose: true,
|
|
62
|
+
children: _jsxs("div", {
|
|
63
|
+
className: "igloo-admin-upload-modal-content",
|
|
64
|
+
children: [_jsxs(_Upload.Dragger, {
|
|
67
65
|
className: "igloo-admin-upload-dragger",
|
|
68
66
|
disabled: !currentSource,
|
|
69
67
|
accept: accept,
|
|
@@ -73,8 +71,7 @@ var Import = function Import(_ref) {
|
|
|
73
71
|
var dataSourceId = currentSource;
|
|
74
72
|
Array.isArray(dataSource) && setSource(undefined);
|
|
75
73
|
return onUpload(file, dataSourceId);
|
|
76
|
-
}
|
|
77
|
-
}, {
|
|
74
|
+
},
|
|
78
75
|
children: [_jsx(ImportFilled, {
|
|
79
76
|
className: "igloo-admin-upload-dragger-icon"
|
|
80
77
|
}, void 0), Array.isArray(dataSource) && _jsx(Select, {
|
|
@@ -90,41 +87,37 @@ var Import = function Import(_ref) {
|
|
|
90
87
|
onChange: function onChange(value) {
|
|
91
88
|
return setSource(value);
|
|
92
89
|
}
|
|
93
|
-
}, void 0), _jsxs(Typography,
|
|
90
|
+
}, void 0), _jsxs(Typography, {
|
|
94
91
|
level: "body1",
|
|
95
92
|
className: "igloo-admin-upload-dargger-title",
|
|
96
|
-
wrapElement: "div"
|
|
97
|
-
}, {
|
|
93
|
+
wrapElement: "div",
|
|
98
94
|
children: [formatMessage({
|
|
99
95
|
id: 'Drag and drop a file here'
|
|
100
96
|
}), ' ', formatMessage({
|
|
101
97
|
id: 'or'
|
|
102
|
-
}), ' ', _jsx(Typography,
|
|
98
|
+
}), ' ', _jsx(Typography, {
|
|
103
99
|
level: "h4",
|
|
104
100
|
style: {
|
|
105
101
|
color: currentSource ? '#5858FF' : '#CCCCFF'
|
|
106
|
-
}
|
|
107
|
-
}, {
|
|
102
|
+
},
|
|
108
103
|
children: formatMessage({
|
|
109
104
|
id: 'browse'
|
|
110
105
|
})
|
|
111
|
-
}
|
|
112
|
-
}
|
|
106
|
+
}, void 0)]
|
|
107
|
+
}, void 0), _jsx(Typography, {
|
|
113
108
|
level: "caption3",
|
|
114
109
|
className: "igloo-admin-upload-dargger-tips",
|
|
115
|
-
wrapElement: "div"
|
|
116
|
-
}, {
|
|
110
|
+
wrapElement: "div",
|
|
117
111
|
children: tips || formatMessage({
|
|
118
112
|
id: 'We support CSV or XLSX files (less than 20M each).'
|
|
119
113
|
})
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
className: "igloo-admin-upload-modal-list"
|
|
123
|
-
}, {
|
|
114
|
+
}, void 0)]
|
|
115
|
+
}, void 0), _jsx("div", {
|
|
116
|
+
className: "igloo-admin-upload-modal-list",
|
|
124
117
|
children: children
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
118
|
+
}, void 0)]
|
|
119
|
+
}, void 0)
|
|
120
|
+
}, void 0);
|
|
128
121
|
};
|
|
129
122
|
|
|
130
123
|
export default Import;
|
|
@@ -2,6 +2,10 @@ import "antd/es/alert/style";
|
|
|
2
2
|
import _Alert from "antd/es/alert";
|
|
3
3
|
var _excluded = ["showIcon", "icon", "type", "className", "style", "description", "message"];
|
|
4
4
|
|
|
5
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
+
|
|
7
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
|
+
|
|
5
9
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
6
10
|
|
|
7
11
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
@@ -54,7 +58,7 @@ var IglooAlertMessage = function IglooAlertMessage(props) {
|
|
|
54
58
|
message = props.message,
|
|
55
59
|
restProps = _objectWithoutProperties(props, _excluded);
|
|
56
60
|
|
|
57
|
-
return _jsx(_Alert,
|
|
61
|
+
return _jsx(_Alert, _objectSpread({
|
|
58
62
|
className: classnames((_classnames = {
|
|
59
63
|
'igloo-alert-message': true
|
|
60
64
|
}, _defineProperty(_classnames, "".concat(prefix, "-").concat(type), true), _defineProperty(_classnames, className, className), _classnames)),
|
|
@@ -62,16 +66,14 @@ var IglooAlertMessage = function IglooAlertMessage(props) {
|
|
|
62
66
|
showIcon: showIcon,
|
|
63
67
|
icon: judgeIconType(icon, type),
|
|
64
68
|
type: type,
|
|
65
|
-
message: _jsx(Typography,
|
|
66
|
-
level: "body2"
|
|
67
|
-
}, {
|
|
69
|
+
message: _jsx(Typography, {
|
|
70
|
+
level: "body2",
|
|
68
71
|
children: message
|
|
69
|
-
}
|
|
70
|
-
description: description && _jsx(Typography,
|
|
71
|
-
level: "body2"
|
|
72
|
-
}, {
|
|
72
|
+
}, void 0),
|
|
73
|
+
description: description && _jsx(Typography, {
|
|
74
|
+
level: "body2",
|
|
73
75
|
children: description
|
|
74
|
-
}
|
|
76
|
+
}, void 0)
|
|
75
77
|
}, restProps), void 0);
|
|
76
78
|
};
|
|
77
79
|
|