iglooform 2.4.24 → 2.4.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/es/admin-upload/float.js +14 -14
- package/es/admin-upload/index.js +11 -11
- package/es/admin-upload/job-list.js +47 -47
- package/es/admin-upload/modal.js +10 -10
- package/es/alert-message/index.js +7 -7
- package/es/amount/index.js +2 -2
- package/es/back-top/index.js +4 -4
- package/es/button/index.js +9 -9
- package/es/card-detail/card-group.js +6 -6
- package/es/card-detail/card-item.js +5 -5
- package/es/card-detail/card-page.js +5 -5
- package/es/card-detail/card.js +7 -7
- package/es/checkbox/index.js +6 -6
- package/es/claim-list/index.js +19 -19
- package/es/confirmation/index.js +4 -4
- package/es/date-picker/buddhist.js +2 -2
- package/es/date-picker/index.js +9 -9
- package/es/declaration/index.js +5 -5
- package/es/detail-panel/index.js +26 -26
- package/es/documents/index.js +2 -2
- package/es/example/index.js +5 -5
- package/es/filter/checkBox.js +10 -10
- package/es/filter/customize.js +1 -1
- package/es/filter/index.js +43 -43
- package/es/filter/radioBox.js +7 -7
- package/es/filter/rangePicker.js +23 -23
- package/es/filter/style/index.less +10 -2
- package/es/form/addable-section/index.js +33 -18
- package/es/form/addable-section/style/index.less +6 -10
- package/es/form/divider/index.js +1 -1
- package/es/form/element/index.js +17 -17
- package/es/form/elements.js +5 -2
- package/es/form/index.js +7 -7
- package/es/form/login/index.js +6 -6
- package/es/form/page/index.js +8 -8
- package/es/form/pages/index.js +10 -10
- package/es/form/render/index.js +1 -1
- package/es/form/section/index.js +4 -4
- package/es/form/step/index.js +14 -14
- package/es/form/steps/index.js +2 -2
- package/es/free-form/addable-section/index.js +29 -14
- package/es/free-form/addable-section/style/index.less +0 -4
- package/es/free-form/element/index.js +10 -10
- package/es/free-form/index.js +3 -3
- package/es/free-form/page/index.js +15 -15
- package/es/free-form/pages/index.js +2 -2
- package/es/free-form/section/index.js +4 -4
- package/es/free-form/step/index.js +14 -14
- package/es/free-form/steps/index.js +2 -2
- package/es/global-message/index.js +12 -12
- package/es/home-menu/index.js +18 -18
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/input/amount.js +2 -2
- package/es/input/credit-card.js +4 -4
- package/es/input/email.js +1 -1
- package/es/input/expiry-date.js +3 -3
- package/es/input/input-date.js +3 -3
- package/es/input/input-number.js +1 -1
- package/es/input/input.js +1 -1
- package/es/input/otp.js +6 -6
- package/es/input/password.js +4 -4
- package/es/input/phone-number.js +4 -4
- package/es/input/text-area.js +4 -4
- package/es/layout/defaultFooter.js +28 -28
- package/es/layout/defaultHeader.js +6 -6
- package/es/layout/footer.js +66 -66
- package/es/layout/header.js +25 -25
- package/es/layout/index.js +4 -4
- package/es/locale/en-US/messages.json +1 -0
- package/es/locale/id-ID/messages.json +1 -0
- package/es/locale/locale-provider.js +2 -2
- package/es/locale/th-TH/messages.json +1 -0
- package/es/locale/vi-VN/messages.json +1 -0
- package/es/locale/zh-CN/messages.json +1 -0
- package/es/login-page/index.js +16 -16
- package/es/media/index.js +15 -15
- package/es/media/media.js +8 -8
- package/es/media/preview.js +6 -6
- package/es/mobile-insurer-detail/index.js +18 -18
- package/es/mobile-insurer-list/index.js +11 -11
- package/es/modal/index.js +8 -8
- package/es/platform/platform-card/index.js +5 -5
- package/es/platform/switch-platform/index.js +43 -14
- package/es/policy-list/index.js +4 -4
- package/es/policy-list/policy-card.js +32 -32
- package/es/radio/index.d.ts +2 -1
- package/es/radio/index.js +13 -12
- package/es/radio/radio-group-with-other.d.ts +6 -0
- package/es/radio/radio-group-with-other.js +85 -0
- package/es/select/attached-select.js +17 -20
- package/es/select/select.js +6 -9
- package/es/select/time-select.js +20 -20
- package/es/status-box/index.js +2 -2
- package/es/table/index.js +33 -33
- package/es/tabs/index.js +1 -1
- package/es/typography/index.js +10 -3
- package/es/upload/index.js +28 -28
- package/es/upload-photo/index.js +28 -28
- package/es/upload-photo/media.js +4 -4
- package/es/upload-preview/index.js +10 -10
- package/es/upload-preview/media.js +8 -8
- package/es/utils/form-utils.d.ts +1 -1
- package/es/utils/form-utils.js +11 -11
- package/lib/admin-upload/float.js +14 -14
- package/lib/admin-upload/index.js +11 -11
- package/lib/admin-upload/job-list.js +47 -47
- package/lib/admin-upload/modal.js +10 -10
- package/lib/alert-message/index.js +7 -7
- package/lib/amount/index.js +2 -2
- package/lib/back-top/index.js +4 -4
- package/lib/button/index.js +9 -9
- package/lib/card-detail/card-group.js +6 -6
- package/lib/card-detail/card-item.js +5 -5
- package/lib/card-detail/card-page.js +5 -5
- package/lib/card-detail/card.js +7 -7
- package/lib/checkbox/index.js +6 -6
- package/lib/claim-list/index.js +19 -19
- package/lib/confirmation/index.js +4 -4
- package/lib/date-picker/buddhist.js +2 -2
- package/lib/date-picker/index.js +9 -9
- package/lib/declaration/index.js +5 -5
- package/lib/detail-panel/index.js +26 -26
- package/lib/documents/index.js +2 -2
- package/lib/example/index.js +5 -5
- package/lib/filter/checkBox.js +10 -10
- package/lib/filter/customize.js +1 -1
- package/lib/filter/index.js +43 -43
- package/lib/filter/radioBox.js +7 -7
- package/lib/filter/rangePicker.js +23 -23
- package/lib/filter/style/index.less +10 -2
- package/lib/form/addable-section/index.js +37 -17
- package/lib/form/addable-section/style/index.less +6 -10
- package/lib/form/divider/index.js +1 -1
- package/lib/form/element/index.js +17 -17
- package/lib/form/elements.js +5 -1
- package/lib/form/index.js +7 -7
- package/lib/form/login/index.js +6 -6
- package/lib/form/page/index.js +8 -8
- package/lib/form/pages/index.js +10 -10
- package/lib/form/render/index.js +1 -1
- package/lib/form/section/index.js +4 -4
- package/lib/form/step/index.js +14 -14
- package/lib/form/steps/index.js +2 -2
- package/lib/free-form/addable-section/index.js +33 -13
- package/lib/free-form/addable-section/style/index.less +0 -4
- package/lib/free-form/element/index.js +10 -10
- package/lib/free-form/index.js +3 -3
- package/lib/free-form/page/index.js +15 -15
- package/lib/free-form/pages/index.js +2 -2
- package/lib/free-form/section/index.js +4 -4
- package/lib/free-form/step/index.js +14 -14
- package/lib/free-form/steps/index.js +2 -2
- package/lib/global-message/index.js +12 -12
- package/lib/home-menu/index.js +18 -18
- package/lib/index.d.ts +1 -1
- package/lib/index.js +7 -0
- package/lib/input/amount.js +2 -2
- package/lib/input/credit-card.js +4 -4
- package/lib/input/email.js +1 -1
- package/lib/input/expiry-date.js +3 -3
- package/lib/input/input-date.js +3 -3
- package/lib/input/input-number.js +1 -1
- package/lib/input/input.js +1 -1
- package/lib/input/otp.js +6 -6
- package/lib/input/password.js +4 -4
- package/lib/input/phone-number.js +4 -4
- package/lib/input/text-area.js +4 -4
- package/lib/layout/defaultFooter.js +28 -28
- package/lib/layout/defaultHeader.js +6 -6
- package/lib/layout/footer.js +66 -66
- package/lib/layout/header.js +25 -25
- package/lib/layout/index.js +4 -4
- package/lib/locale/en-US/messages.json +1 -0
- package/lib/locale/id-ID/messages.json +1 -0
- package/lib/locale/locale-provider.js +2 -2
- package/lib/locale/th-TH/messages.json +1 -0
- package/lib/locale/vi-VN/messages.json +1 -0
- package/lib/locale/zh-CN/messages.json +1 -0
- package/lib/login-page/index.js +16 -16
- package/lib/media/index.js +15 -15
- package/lib/media/media.js +8 -8
- package/lib/media/preview.js +6 -6
- package/lib/mobile-insurer-detail/index.js +18 -18
- package/lib/mobile-insurer-list/index.js +11 -11
- package/lib/modal/index.js +8 -8
- package/lib/platform/platform-card/index.js +5 -5
- package/lib/platform/switch-platform/index.js +42 -13
- package/lib/policy-list/index.js +4 -4
- package/lib/policy-list/policy-card.js +32 -32
- package/lib/radio/index.d.ts +2 -1
- package/lib/radio/index.js +21 -12
- package/lib/radio/radio-group-with-other.d.ts +6 -0
- package/lib/radio/radio-group-with-other.js +98 -0
- package/lib/select/attached-select.js +16 -19
- package/lib/select/select.js +5 -8
- package/lib/select/time-select.js +20 -20
- package/lib/status-box/index.js +2 -2
- package/lib/table/index.js +33 -33
- package/lib/tabs/index.js +1 -1
- package/lib/typography/index.js +10 -3
- package/lib/upload/index.js +28 -28
- package/lib/upload-photo/index.js +28 -28
- package/lib/upload-photo/media.js +4 -4
- package/lib/upload-preview/index.js +10 -10
- package/lib/upload-preview/media.js +8 -8
- package/lib/utils/form-utils.d.ts +1 -1
- package/lib/utils/form-utils.js +10 -10
- package/package.json +1 -1
package/lib/upload/index.js
CHANGED
|
@@ -527,7 +527,7 @@ var IglooUpload = function IglooUpload(props) {
|
|
|
527
527
|
content: (0, _jsxRuntime.jsx)(_media.default, {
|
|
528
528
|
src: dataUrl,
|
|
529
529
|
type: (0, _tools.classifyType)(type)
|
|
530
|
-
}
|
|
530
|
+
}),
|
|
531
531
|
title: name,
|
|
532
532
|
className: 'igloo-upload-preview-modal',
|
|
533
533
|
maskClosable: true,
|
|
@@ -542,7 +542,7 @@ var IglooUpload = function IglooUpload(props) {
|
|
|
542
542
|
children: [descriptions && (0, _jsxRuntime.jsx)("div", {
|
|
543
543
|
className: "igloo-upload-descriptions",
|
|
544
544
|
children: descriptions
|
|
545
|
-
}
|
|
545
|
+
}), (0, _jsxRuntime.jsx)(Dragger, _objectSpread(_objectSpread({
|
|
546
546
|
action: onUpload
|
|
547
547
|
}, rest), {}, {
|
|
548
548
|
showUploadList: false,
|
|
@@ -557,7 +557,7 @@ var IglooUpload = function IglooUpload(props) {
|
|
|
557
557
|
fontSize: 24,
|
|
558
558
|
color: '#666666'
|
|
559
559
|
}
|
|
560
|
-
}
|
|
560
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
561
561
|
className: "igloo-upload-placeholder",
|
|
562
562
|
children: placeholder || (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
563
563
|
children: [(0, _jsxRuntime.jsx)(_typography.default, {
|
|
@@ -565,7 +565,7 @@ var IglooUpload = function IglooUpload(props) {
|
|
|
565
565
|
children: formatMessage({
|
|
566
566
|
id: 'Drag and drop a file here'
|
|
567
567
|
})
|
|
568
|
-
}
|
|
568
|
+
}), (0, _jsxRuntime.jsx)(_typography.default, {
|
|
569
569
|
level: "body1",
|
|
570
570
|
style: {
|
|
571
571
|
marginLeft: 4
|
|
@@ -573,7 +573,7 @@ var IglooUpload = function IglooUpload(props) {
|
|
|
573
573
|
children: formatMessage({
|
|
574
574
|
id: 'or'
|
|
575
575
|
})
|
|
576
|
-
}
|
|
576
|
+
}), (0, _jsxRuntime.jsx)(_typography.default, {
|
|
577
577
|
level: "body1",
|
|
578
578
|
style: {
|
|
579
579
|
color: _iglootheme.colors.purpleMain,
|
|
@@ -582,19 +582,19 @@ var IglooUpload = function IglooUpload(props) {
|
|
|
582
582
|
children: formatMessage({
|
|
583
583
|
id: 'browse'
|
|
584
584
|
})
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
})
|
|
585
|
+
})]
|
|
586
|
+
})
|
|
587
|
+
})]
|
|
588
|
+
})
|
|
589
|
+
})), !!files.length && (0, _jsxRuntime.jsx)(FileList, {
|
|
590
590
|
files: files,
|
|
591
591
|
limit: limit,
|
|
592
592
|
handleReUpload: handleReUpload,
|
|
593
593
|
handlePreview: handlePreview,
|
|
594
594
|
handleDelete: handleDelete,
|
|
595
595
|
containerRef: containerRef
|
|
596
|
-
}
|
|
597
|
-
}
|
|
596
|
+
})]
|
|
597
|
+
});
|
|
598
598
|
};
|
|
599
599
|
|
|
600
600
|
var FileList = function FileList(_ref7) {
|
|
@@ -634,30 +634,30 @@ var FileList = function FileList(_ref7) {
|
|
|
634
634
|
color: '#999999'
|
|
635
635
|
},
|
|
636
636
|
className: "igloo-upload-preview-item-icon"
|
|
637
|
-
}
|
|
637
|
+
}), status === 'progress' && (0, _jsxRuntime.jsx)(_iglooicon.LoadingOutlined, {
|
|
638
638
|
className: "igloo-upload-preview-item-icon igloo-upload-uploading",
|
|
639
639
|
style: {
|
|
640
640
|
marginRight: 8,
|
|
641
641
|
fontSize: 24,
|
|
642
642
|
color: '#999999'
|
|
643
643
|
}
|
|
644
|
-
}
|
|
644
|
+
}), (0, _jsxRuntime.jsxs)("div", {
|
|
645
645
|
className: "igloo-upload-preview-item-text",
|
|
646
646
|
children: [(0, _jsxRuntime.jsx)("span", {
|
|
647
647
|
className: "igloo-upload-preview-item-name",
|
|
648
648
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
649
649
|
level: "h4",
|
|
650
650
|
children: name
|
|
651
|
-
}
|
|
652
|
-
}
|
|
651
|
+
})
|
|
652
|
+
}), Boolean(size) && (0, _jsxRuntime.jsx)("span", {
|
|
653
653
|
className: "igloo-upload-preview-item-size",
|
|
654
654
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
655
655
|
level: "body1",
|
|
656
656
|
children: (0, _tools.parseFileSize)(size)
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
}
|
|
660
|
-
}
|
|
657
|
+
})
|
|
658
|
+
})]
|
|
659
|
+
})]
|
|
660
|
+
}), status === 'success' && (0, _jsxRuntime.jsxs)("div", {
|
|
661
661
|
className: "igloo-upload-preview-item-operation",
|
|
662
662
|
children: [type && (0, _jsxRuntime.jsx)(_iglooicon.ShowOutlined, {
|
|
663
663
|
style: {
|
|
@@ -669,7 +669,7 @@ var FileList = function FileList(_ref7) {
|
|
|
669
669
|
return handlePreview(index);
|
|
670
670
|
},
|
|
671
671
|
className: 'igloo-upload-preview-item-operation-left-icon'
|
|
672
|
-
}
|
|
672
|
+
}), (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
|
|
673
673
|
style: {
|
|
674
674
|
fontSize: 24,
|
|
675
675
|
color: '#999999',
|
|
@@ -678,8 +678,8 @@ var FileList = function FileList(_ref7) {
|
|
|
678
678
|
onClick: function onClick() {
|
|
679
679
|
return handleDelete(index);
|
|
680
680
|
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
681
|
+
})]
|
|
682
|
+
}), status === 'failed' && (0, _jsxRuntime.jsxs)("div", {
|
|
683
683
|
className: "igloo-upload-preview-item-operation",
|
|
684
684
|
children: [(!limit || index < limit) && (0, _jsxRuntime.jsx)(_iglooicon.RefreshOutlined, {
|
|
685
685
|
style: {
|
|
@@ -691,7 +691,7 @@ var FileList = function FileList(_ref7) {
|
|
|
691
691
|
return handleReUpload(index);
|
|
692
692
|
},
|
|
693
693
|
className: 'igloo-upload-preview-item-operation-left-icon'
|
|
694
|
-
}
|
|
694
|
+
}), (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
|
|
695
695
|
style: {
|
|
696
696
|
fontSize: 24,
|
|
697
697
|
color: '#999999',
|
|
@@ -700,11 +700,11 @@ var FileList = function FileList(_ref7) {
|
|
|
700
700
|
onClick: function onClick() {
|
|
701
701
|
return handleDelete(index);
|
|
702
702
|
}
|
|
703
|
-
}
|
|
704
|
-
}
|
|
703
|
+
})]
|
|
704
|
+
})]
|
|
705
705
|
}, index);
|
|
706
706
|
})
|
|
707
|
-
}
|
|
707
|
+
});
|
|
708
708
|
return /*#__PURE__*/_reactDom.default.createPortal(children, containerRef.current);
|
|
709
709
|
};
|
|
710
710
|
|
|
@@ -733,7 +733,7 @@ IglooUpload.formItemPropsHandler = function (_ref9) {
|
|
|
733
733
|
return (0, _jsxRuntime.jsx)(_uploadPreview.default, {
|
|
734
734
|
label: label,
|
|
735
735
|
files: value
|
|
736
|
-
}
|
|
736
|
+
});
|
|
737
737
|
},
|
|
738
738
|
fullRow: true,
|
|
739
739
|
rules: [{
|
|
@@ -709,7 +709,7 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
709
709
|
content: (0, _jsxRuntime.jsx)(_media.default, {
|
|
710
710
|
src: dataUrl,
|
|
711
711
|
type: type
|
|
712
|
-
}
|
|
712
|
+
}),
|
|
713
713
|
title: name,
|
|
714
714
|
className: 'igloo-upload-photo-preview-modal',
|
|
715
715
|
maskClosable: true,
|
|
@@ -761,8 +761,8 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
761
761
|
fontSize: 24,
|
|
762
762
|
color: '#999999'
|
|
763
763
|
}
|
|
764
|
-
}
|
|
765
|
-
}
|
|
764
|
+
})
|
|
765
|
+
});
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
return (0, _jsxRuntime.jsx)("div", {
|
|
@@ -776,8 +776,8 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
776
776
|
e.stopPropagation();
|
|
777
777
|
handleDelete(index);
|
|
778
778
|
}
|
|
779
|
-
}
|
|
780
|
-
}
|
|
779
|
+
})
|
|
780
|
+
});
|
|
781
781
|
};
|
|
782
782
|
|
|
783
783
|
return (0, _jsxRuntime.jsxs)("div", {
|
|
@@ -801,15 +801,15 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
801
801
|
src: src,
|
|
802
802
|
alt: "",
|
|
803
803
|
className: "".concat(prefix, "-sample-photos-photo")
|
|
804
|
-
}
|
|
804
|
+
}), (0, _jsxRuntime.jsx)("div", {
|
|
805
805
|
className: (0, _classnames6.default)((_classnames = {}, _defineProperty(_classnames, "".concat(prefix, "-sample-photos-good"), type === 'good'), _defineProperty(_classnames, "".concat(prefix, "-sample-photos-bad"), type === 'bad'), _classnames))
|
|
806
|
-
}
|
|
806
|
+
}), label && (0, _jsxRuntime.jsx)("div", {
|
|
807
807
|
className: (0, _classnames6.default)((_classnames2 = {}, _defineProperty(_classnames2, "".concat(prefix, "-sample-photos-label"), true), _defineProperty(_classnames2, "".concat(prefix, "-sample-photos-label-good"), type === 'good'), _defineProperty(_classnames2, "".concat(prefix, "-sample-photos-label-bad"), type === 'bad'), _classnames2)),
|
|
808
808
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
809
809
|
level: "body2",
|
|
810
810
|
children: label
|
|
811
|
-
}
|
|
812
|
-
}
|
|
811
|
+
})
|
|
812
|
+
})]
|
|
813
813
|
}, index);
|
|
814
814
|
}), (0, _jsxRuntime.jsx)(_col.default, {
|
|
815
815
|
className: (0, _classnames6.default)((_classnames3 = {}, _defineProperty(_classnames3, "".concat(prefix, "-sample-descriptions"), true), _defineProperty(_classnames3, "".concat(prefix, "-sample-descriptions-center"), !!md), _classnames3)),
|
|
@@ -817,10 +817,10 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
817
817
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
818
818
|
level: "caption2",
|
|
819
819
|
children: descriptions
|
|
820
|
-
}
|
|
821
|
-
}
|
|
822
|
-
}
|
|
823
|
-
}
|
|
820
|
+
})
|
|
821
|
+
})]
|
|
822
|
+
})
|
|
823
|
+
}), (0, _jsxRuntime.jsx)("input", {
|
|
824
824
|
id: uploadId,
|
|
825
825
|
type: "file",
|
|
826
826
|
style: {
|
|
@@ -831,7 +831,7 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
831
831
|
value: [],
|
|
832
832
|
multiple: true,
|
|
833
833
|
capture: capture
|
|
834
|
-
}
|
|
834
|
+
}), (0, _jsxRuntime.jsxs)(_space.default, {
|
|
835
835
|
className: "".concat(prefix, "-content"),
|
|
836
836
|
size: [16, 16],
|
|
837
837
|
wrap: true,
|
|
@@ -845,16 +845,16 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
845
845
|
fontSize: 24,
|
|
846
846
|
color: '#666666'
|
|
847
847
|
}
|
|
848
|
-
}
|
|
848
|
+
}), (0, _jsxRuntime.jsx)("span", {
|
|
849
849
|
style: {
|
|
850
850
|
marginTop: 6
|
|
851
851
|
},
|
|
852
852
|
children: (0, _jsxRuntime.jsx)(_typography.default, {
|
|
853
853
|
level: "body1",
|
|
854
854
|
children: buttonText || 'Upload'
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
}
|
|
855
|
+
})
|
|
856
|
+
})]
|
|
857
|
+
}), files.map(function (_ref11, index) {
|
|
858
858
|
var _classnames5;
|
|
859
859
|
|
|
860
860
|
var dataUrl = _ref11.dataUrl,
|
|
@@ -879,7 +879,7 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
879
879
|
type: type,
|
|
880
880
|
src: dataUrl,
|
|
881
881
|
className: "".concat(prefix, "-content-preview")
|
|
882
|
-
}
|
|
882
|
+
}), (!limit || index < limit) && masks[index] && (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
883
883
|
children: [status === 'failed' && (0, _jsxRuntime.jsx)("div", {
|
|
884
884
|
className: "".concat(prefix, "-content-mask"),
|
|
885
885
|
onClick: function onClick(e) {
|
|
@@ -890,8 +890,8 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
890
890
|
style: {
|
|
891
891
|
fontSize: 24
|
|
892
892
|
}
|
|
893
|
-
}
|
|
894
|
-
}
|
|
893
|
+
})
|
|
894
|
+
}), status === 'success' && (0, _jsxRuntime.jsx)("div", {
|
|
895
895
|
className: "".concat(prefix, "-content-mask"),
|
|
896
896
|
onClick: function onClick(e) {
|
|
897
897
|
e.stopPropagation();
|
|
@@ -901,14 +901,14 @@ var UploadPhoto = function UploadPhoto(props) {
|
|
|
901
901
|
style: {
|
|
902
902
|
fontSize: 24
|
|
903
903
|
}
|
|
904
|
-
}
|
|
905
|
-
}
|
|
906
|
-
}
|
|
907
|
-
}
|
|
904
|
+
})
|
|
905
|
+
})]
|
|
906
|
+
})]
|
|
907
|
+
})
|
|
908
908
|
}, uid);
|
|
909
909
|
})]
|
|
910
|
-
}
|
|
911
|
-
}
|
|
910
|
+
})]
|
|
911
|
+
});
|
|
912
912
|
};
|
|
913
913
|
|
|
914
914
|
function checkFileList(value) {
|
|
@@ -937,7 +937,7 @@ UploadPhoto.formItemPropsHandler = function (_ref12) {
|
|
|
937
937
|
return (0, _jsxRuntime.jsx)(_uploadPreview.default, {
|
|
938
938
|
files: value,
|
|
939
939
|
label: label
|
|
940
|
-
}
|
|
940
|
+
});
|
|
941
941
|
},
|
|
942
942
|
fullRow: true,
|
|
943
943
|
rules: [{
|
|
@@ -26,7 +26,7 @@ var MediaItem = function MediaItem(_ref) {
|
|
|
26
26
|
maxWidth: 96,
|
|
27
27
|
maxHeight: 96
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
});
|
|
30
30
|
|
|
31
31
|
case 'pdf':
|
|
32
32
|
return (0, _jsxRuntime.jsx)("div", {
|
|
@@ -38,8 +38,8 @@ var MediaItem = function MediaItem(_ref) {
|
|
|
38
38
|
maxWidth: 96,
|
|
39
39
|
maxHeight: 96
|
|
40
40
|
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
43
|
|
|
44
44
|
default:
|
|
45
45
|
return (0, _jsxRuntime.jsx)("img", {
|
|
@@ -49,7 +49,7 @@ var MediaItem = function MediaItem(_ref) {
|
|
|
49
49
|
maxWidth: 96,
|
|
50
50
|
maxHeight: 96
|
|
51
51
|
}
|
|
52
|
-
}
|
|
52
|
+
});
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
|
|
@@ -133,7 +133,7 @@ var UploadPreview = function UploadPreview(_ref) {
|
|
|
133
133
|
|
|
134
134
|
if (!files || !files.length) return (0, _jsxRuntime.jsx)("div", {
|
|
135
135
|
children: "-"
|
|
136
|
-
}
|
|
136
|
+
});
|
|
137
137
|
return (0, _jsxRuntime.jsxs)("div", {
|
|
138
138
|
className: "igloo-upload-preview",
|
|
139
139
|
children: [description || (files.length === 1 ? formatMessage({
|
|
@@ -151,12 +151,12 @@ var UploadPreview = function UploadPreview(_ref) {
|
|
|
151
151
|
style: {
|
|
152
152
|
fontSize: 24
|
|
153
153
|
}
|
|
154
|
-
}
|
|
154
|
+
}), (0, _jsxRuntime.jsxs)(_modal.default, {
|
|
155
155
|
visible: preview,
|
|
156
156
|
title: (0, _jsxRuntime.jsxs)(_typography.default, {
|
|
157
157
|
level: "h4",
|
|
158
158
|
children: [label, " (", current + 1, "/", files.length, ")"]
|
|
159
|
-
}
|
|
159
|
+
}),
|
|
160
160
|
className: "igloo-upload-preview-modal",
|
|
161
161
|
footer: null,
|
|
162
162
|
onCancel: function onCancel() {
|
|
@@ -164,21 +164,21 @@ var UploadPreview = function UploadPreview(_ref) {
|
|
|
164
164
|
},
|
|
165
165
|
forceRender: false,
|
|
166
166
|
children: [(0, _jsxRuntime.jsx)(_button.default, {
|
|
167
|
-
icon: (0, _jsxRuntime.jsx)(_iglooicon.ArrowLeftOutlined, {}
|
|
167
|
+
icon: (0, _jsxRuntime.jsx)(_iglooicon.ArrowLeftOutlined, {}),
|
|
168
168
|
className: (0, _classnames.default)('igloo-upload-preview-modal-button', 'igloo-upload-preview-modal-button-left'),
|
|
169
169
|
onClick: prev,
|
|
170
170
|
disabled: current === 0
|
|
171
|
-
}
|
|
171
|
+
}), src && type && (0, _jsxRuntime.jsx)(_media.default, {
|
|
172
172
|
src: src,
|
|
173
173
|
type: type
|
|
174
|
-
}
|
|
175
|
-
icon: (0, _jsxRuntime.jsx)(_iglooicon.ArrowRightOutlined, {}
|
|
174
|
+
}), (0, _jsxRuntime.jsx)(_button.default, {
|
|
175
|
+
icon: (0, _jsxRuntime.jsx)(_iglooicon.ArrowRightOutlined, {}),
|
|
176
176
|
className: (0, _classnames.default)('igloo-upload-preview-modal-button', 'igloo-upload-preview-modal-button-right'),
|
|
177
177
|
onClick: next,
|
|
178
178
|
disabled: current >= files.length - 1
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
}
|
|
179
|
+
})]
|
|
180
|
+
})]
|
|
181
|
+
});
|
|
182
182
|
};
|
|
183
183
|
|
|
184
184
|
var _default = UploadPreview;
|
|
@@ -73,7 +73,7 @@ var PDF = function PDF(_ref) {
|
|
|
73
73
|
return (0, _jsxRuntime.jsx)("div", {
|
|
74
74
|
className: "igloo-upload-preview-pdf",
|
|
75
75
|
children: pages
|
|
76
|
-
}
|
|
76
|
+
});
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
var Media = function Media(_ref3) {
|
|
@@ -88,20 +88,20 @@ var Media = function Media(_ref3) {
|
|
|
88
88
|
className: "igloo-upload-prevew-not-supported",
|
|
89
89
|
children: [(0, _jsxRuntime.jsx)(_iglooicon.ErrorFilled, {
|
|
90
90
|
className: "igloo-upload-prevew-not-supported-icon"
|
|
91
|
-
}
|
|
91
|
+
}), (0, _jsxRuntime.jsx)(_typography.default, {
|
|
92
92
|
level: "body1",
|
|
93
93
|
className: "igloo-upload-prevew-not-supported-text",
|
|
94
94
|
children: formatMessage({
|
|
95
95
|
id: 'No preview for this file. Only support image, video or PDF file.'
|
|
96
96
|
})
|
|
97
|
-
}
|
|
98
|
-
}
|
|
97
|
+
})]
|
|
98
|
+
});
|
|
99
99
|
|
|
100
100
|
if (type === 'image') {
|
|
101
101
|
children = (0, _jsxRuntime.jsx)("img", {
|
|
102
102
|
className: "igloo-upload-preview-content",
|
|
103
103
|
src: src
|
|
104
|
-
}
|
|
104
|
+
});
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
if (type === 'video') {
|
|
@@ -110,19 +110,19 @@ var Media = function Media(_ref3) {
|
|
|
110
110
|
src: src,
|
|
111
111
|
controls: true,
|
|
112
112
|
autoPlay: true
|
|
113
|
-
}
|
|
113
|
+
});
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
if (type === 'pdf') {
|
|
117
117
|
children = (0, _jsxRuntime.jsx)(PDF, {
|
|
118
118
|
src: src
|
|
119
|
-
}
|
|
119
|
+
});
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
return (0, _jsxRuntime.jsx)("div", {
|
|
123
123
|
className: (0, _classnames.default)('igloo-upload-preview-container', className),
|
|
124
124
|
children: children
|
|
125
|
-
}
|
|
125
|
+
});
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
var _default = Media;
|
|
@@ -38,7 +38,7 @@ export declare const calcFormItemProps: (config: FormItemConfig, extraProps: For
|
|
|
38
38
|
validateTrigger: string[];
|
|
39
39
|
label: JSX.Element | null;
|
|
40
40
|
getValueFromEvent: ((...args: import("rc-field-form/lib/interface").EventArgs) => any) | undefined;
|
|
41
|
-
getValueProps: ((value: any) =>
|
|
41
|
+
getValueProps: ((value: any) => Record<string, unknown>) | undefined;
|
|
42
42
|
extra: JSX.Element | null | undefined;
|
|
43
43
|
help: {} | null | undefined;
|
|
44
44
|
valuePropName: string | undefined;
|
package/lib/utils/form-utils.js
CHANGED
|
@@ -171,7 +171,7 @@ var calcFormItemProps = function calcFormItemProps(config, extraProps, form, par
|
|
|
171
171
|
antdDependencies = config.antdDependencies,
|
|
172
172
|
rest = _objectWithoutProperties(config, _excluded);
|
|
173
173
|
|
|
174
|
-
(0, _invariant.default)(nameProp || type === 'Divider' || type === 'Section' || !type, "name property is required for form item config (type: ".concat(type, ")"));
|
|
174
|
+
(0, _invariant.default)(nameProp || type === 'Divider' || type === 'Section' || type === 'Typography' || !type, "name property is required for form item config (type: ".concat(type, ")"));
|
|
175
175
|
(0, _invariant.default)(!previewFormater || typeof previewFormater === 'function', 'previewFormater property should be a function');
|
|
176
176
|
(0, _invariant.default)(!shouldRender || typeof shouldRender === 'function', 'shouldRender property should be a function');
|
|
177
177
|
|
|
@@ -252,26 +252,26 @@ var calcFormItemProps = function calcFormItemProps(config, extraProps, form, par
|
|
|
252
252
|
children: [(0, _jsxRuntime.jsx)(_typography.default, {
|
|
253
253
|
level: "body1",
|
|
254
254
|
children: label
|
|
255
|
-
}
|
|
255
|
+
}), isRequired && requiredMark && (0, _jsxRuntime.jsx)("span", {
|
|
256
256
|
className: "igloo-form-label-required",
|
|
257
257
|
children: "*"
|
|
258
|
-
}
|
|
258
|
+
}), showOptional && (0, _jsxRuntime.jsxs)("span", {
|
|
259
259
|
className: "igloo-form-label-optional",
|
|
260
|
-
children: ["(", (0, _formattedMessage.default
|
|
261
|
-
id:
|
|
260
|
+
children: ["(", (0, _jsxRuntime.jsx)(_formattedMessage.default, {
|
|
261
|
+
id: "Optional"
|
|
262
262
|
}), ")"]
|
|
263
|
-
}
|
|
264
|
-
}
|
|
263
|
+
})]
|
|
264
|
+
}), extraLabel && (0, _jsxRuntime.jsx)("div", {
|
|
265
265
|
className: "igloo-form-label-extra",
|
|
266
266
|
children: typeof extraLabel === 'function' ? extraLabel(form) : extraLabel
|
|
267
|
-
}
|
|
268
|
-
}
|
|
267
|
+
})]
|
|
268
|
+
}) : null,
|
|
269
269
|
getValueFromEvent: getValueFromEvent || extraGetValueFromEvent,
|
|
270
270
|
getValueProps: getValueProps,
|
|
271
271
|
extra: (extra || extraExtra) && (0, _jsxRuntime.jsx)(_typography.default, {
|
|
272
272
|
level: "caption2",
|
|
273
273
|
children: extra || extraExtra
|
|
274
|
-
}
|
|
274
|
+
}),
|
|
275
275
|
help: help || extraHelp,
|
|
276
276
|
valuePropName: valuePropName || extraValuePropName,
|
|
277
277
|
messageVariables: _objectSpread({
|