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.
Files changed (209) hide show
  1. package/es/admin-upload/float.js +14 -14
  2. package/es/admin-upload/index.js +11 -11
  3. package/es/admin-upload/job-list.js +47 -47
  4. package/es/admin-upload/modal.js +10 -10
  5. package/es/alert-message/index.js +7 -7
  6. package/es/amount/index.js +2 -2
  7. package/es/back-top/index.js +4 -4
  8. package/es/button/index.js +9 -9
  9. package/es/card-detail/card-group.js +6 -6
  10. package/es/card-detail/card-item.js +5 -5
  11. package/es/card-detail/card-page.js +5 -5
  12. package/es/card-detail/card.js +7 -7
  13. package/es/checkbox/index.js +6 -6
  14. package/es/claim-list/index.js +19 -19
  15. package/es/confirmation/index.js +4 -4
  16. package/es/date-picker/buddhist.js +2 -2
  17. package/es/date-picker/index.js +9 -9
  18. package/es/declaration/index.js +5 -5
  19. package/es/detail-panel/index.js +26 -26
  20. package/es/documents/index.js +2 -2
  21. package/es/example/index.js +5 -5
  22. package/es/filter/checkBox.js +10 -10
  23. package/es/filter/customize.js +1 -1
  24. package/es/filter/index.js +43 -43
  25. package/es/filter/radioBox.js +7 -7
  26. package/es/filter/rangePicker.js +23 -23
  27. package/es/filter/style/index.less +10 -2
  28. package/es/form/addable-section/index.js +33 -18
  29. package/es/form/addable-section/style/index.less +6 -10
  30. package/es/form/divider/index.js +1 -1
  31. package/es/form/element/index.js +17 -17
  32. package/es/form/elements.js +5 -2
  33. package/es/form/index.js +7 -7
  34. package/es/form/login/index.js +6 -6
  35. package/es/form/page/index.js +8 -8
  36. package/es/form/pages/index.js +10 -10
  37. package/es/form/render/index.js +1 -1
  38. package/es/form/section/index.js +4 -4
  39. package/es/form/step/index.js +14 -14
  40. package/es/form/steps/index.js +2 -2
  41. package/es/free-form/addable-section/index.js +29 -14
  42. package/es/free-form/addable-section/style/index.less +0 -4
  43. package/es/free-form/element/index.js +10 -10
  44. package/es/free-form/index.js +3 -3
  45. package/es/free-form/page/index.js +15 -15
  46. package/es/free-form/pages/index.js +2 -2
  47. package/es/free-form/section/index.js +4 -4
  48. package/es/free-form/step/index.js +14 -14
  49. package/es/free-form/steps/index.js +2 -2
  50. package/es/global-message/index.js +12 -12
  51. package/es/home-menu/index.js +18 -18
  52. package/es/index.d.ts +1 -1
  53. package/es/index.js +1 -1
  54. package/es/input/amount.js +2 -2
  55. package/es/input/credit-card.js +4 -4
  56. package/es/input/email.js +1 -1
  57. package/es/input/expiry-date.js +3 -3
  58. package/es/input/input-date.js +3 -3
  59. package/es/input/input-number.js +1 -1
  60. package/es/input/input.js +1 -1
  61. package/es/input/otp.js +6 -6
  62. package/es/input/password.js +4 -4
  63. package/es/input/phone-number.js +4 -4
  64. package/es/input/text-area.js +4 -4
  65. package/es/layout/defaultFooter.js +28 -28
  66. package/es/layout/defaultHeader.js +6 -6
  67. package/es/layout/footer.js +66 -66
  68. package/es/layout/header.js +25 -25
  69. package/es/layout/index.js +4 -4
  70. package/es/locale/en-US/messages.json +1 -0
  71. package/es/locale/id-ID/messages.json +1 -0
  72. package/es/locale/locale-provider.js +2 -2
  73. package/es/locale/th-TH/messages.json +1 -0
  74. package/es/locale/vi-VN/messages.json +1 -0
  75. package/es/locale/zh-CN/messages.json +1 -0
  76. package/es/login-page/index.js +16 -16
  77. package/es/media/index.js +15 -15
  78. package/es/media/media.js +8 -8
  79. package/es/media/preview.js +6 -6
  80. package/es/mobile-insurer-detail/index.js +18 -18
  81. package/es/mobile-insurer-list/index.js +11 -11
  82. package/es/modal/index.js +8 -8
  83. package/es/platform/platform-card/index.js +5 -5
  84. package/es/platform/switch-platform/index.js +43 -14
  85. package/es/policy-list/index.js +4 -4
  86. package/es/policy-list/policy-card.js +32 -32
  87. package/es/radio/index.d.ts +2 -1
  88. package/es/radio/index.js +13 -12
  89. package/es/radio/radio-group-with-other.d.ts +6 -0
  90. package/es/radio/radio-group-with-other.js +85 -0
  91. package/es/select/attached-select.js +17 -20
  92. package/es/select/select.js +6 -9
  93. package/es/select/time-select.js +20 -20
  94. package/es/status-box/index.js +2 -2
  95. package/es/table/index.js +33 -33
  96. package/es/tabs/index.js +1 -1
  97. package/es/typography/index.js +10 -3
  98. package/es/upload/index.js +28 -28
  99. package/es/upload-photo/index.js +28 -28
  100. package/es/upload-photo/media.js +4 -4
  101. package/es/upload-preview/index.js +10 -10
  102. package/es/upload-preview/media.js +8 -8
  103. package/es/utils/form-utils.d.ts +1 -1
  104. package/es/utils/form-utils.js +11 -11
  105. package/lib/admin-upload/float.js +14 -14
  106. package/lib/admin-upload/index.js +11 -11
  107. package/lib/admin-upload/job-list.js +47 -47
  108. package/lib/admin-upload/modal.js +10 -10
  109. package/lib/alert-message/index.js +7 -7
  110. package/lib/amount/index.js +2 -2
  111. package/lib/back-top/index.js +4 -4
  112. package/lib/button/index.js +9 -9
  113. package/lib/card-detail/card-group.js +6 -6
  114. package/lib/card-detail/card-item.js +5 -5
  115. package/lib/card-detail/card-page.js +5 -5
  116. package/lib/card-detail/card.js +7 -7
  117. package/lib/checkbox/index.js +6 -6
  118. package/lib/claim-list/index.js +19 -19
  119. package/lib/confirmation/index.js +4 -4
  120. package/lib/date-picker/buddhist.js +2 -2
  121. package/lib/date-picker/index.js +9 -9
  122. package/lib/declaration/index.js +5 -5
  123. package/lib/detail-panel/index.js +26 -26
  124. package/lib/documents/index.js +2 -2
  125. package/lib/example/index.js +5 -5
  126. package/lib/filter/checkBox.js +10 -10
  127. package/lib/filter/customize.js +1 -1
  128. package/lib/filter/index.js +43 -43
  129. package/lib/filter/radioBox.js +7 -7
  130. package/lib/filter/rangePicker.js +23 -23
  131. package/lib/filter/style/index.less +10 -2
  132. package/lib/form/addable-section/index.js +37 -17
  133. package/lib/form/addable-section/style/index.less +6 -10
  134. package/lib/form/divider/index.js +1 -1
  135. package/lib/form/element/index.js +17 -17
  136. package/lib/form/elements.js +5 -1
  137. package/lib/form/index.js +7 -7
  138. package/lib/form/login/index.js +6 -6
  139. package/lib/form/page/index.js +8 -8
  140. package/lib/form/pages/index.js +10 -10
  141. package/lib/form/render/index.js +1 -1
  142. package/lib/form/section/index.js +4 -4
  143. package/lib/form/step/index.js +14 -14
  144. package/lib/form/steps/index.js +2 -2
  145. package/lib/free-form/addable-section/index.js +33 -13
  146. package/lib/free-form/addable-section/style/index.less +0 -4
  147. package/lib/free-form/element/index.js +10 -10
  148. package/lib/free-form/index.js +3 -3
  149. package/lib/free-form/page/index.js +15 -15
  150. package/lib/free-form/pages/index.js +2 -2
  151. package/lib/free-form/section/index.js +4 -4
  152. package/lib/free-form/step/index.js +14 -14
  153. package/lib/free-form/steps/index.js +2 -2
  154. package/lib/global-message/index.js +12 -12
  155. package/lib/home-menu/index.js +18 -18
  156. package/lib/index.d.ts +1 -1
  157. package/lib/index.js +7 -0
  158. package/lib/input/amount.js +2 -2
  159. package/lib/input/credit-card.js +4 -4
  160. package/lib/input/email.js +1 -1
  161. package/lib/input/expiry-date.js +3 -3
  162. package/lib/input/input-date.js +3 -3
  163. package/lib/input/input-number.js +1 -1
  164. package/lib/input/input.js +1 -1
  165. package/lib/input/otp.js +6 -6
  166. package/lib/input/password.js +4 -4
  167. package/lib/input/phone-number.js +4 -4
  168. package/lib/input/text-area.js +4 -4
  169. package/lib/layout/defaultFooter.js +28 -28
  170. package/lib/layout/defaultHeader.js +6 -6
  171. package/lib/layout/footer.js +66 -66
  172. package/lib/layout/header.js +25 -25
  173. package/lib/layout/index.js +4 -4
  174. package/lib/locale/en-US/messages.json +1 -0
  175. package/lib/locale/id-ID/messages.json +1 -0
  176. package/lib/locale/locale-provider.js +2 -2
  177. package/lib/locale/th-TH/messages.json +1 -0
  178. package/lib/locale/vi-VN/messages.json +1 -0
  179. package/lib/locale/zh-CN/messages.json +1 -0
  180. package/lib/login-page/index.js +16 -16
  181. package/lib/media/index.js +15 -15
  182. package/lib/media/media.js +8 -8
  183. package/lib/media/preview.js +6 -6
  184. package/lib/mobile-insurer-detail/index.js +18 -18
  185. package/lib/mobile-insurer-list/index.js +11 -11
  186. package/lib/modal/index.js +8 -8
  187. package/lib/platform/platform-card/index.js +5 -5
  188. package/lib/platform/switch-platform/index.js +42 -13
  189. package/lib/policy-list/index.js +4 -4
  190. package/lib/policy-list/policy-card.js +32 -32
  191. package/lib/radio/index.d.ts +2 -1
  192. package/lib/radio/index.js +21 -12
  193. package/lib/radio/radio-group-with-other.d.ts +6 -0
  194. package/lib/radio/radio-group-with-other.js +98 -0
  195. package/lib/select/attached-select.js +16 -19
  196. package/lib/select/select.js +5 -8
  197. package/lib/select/time-select.js +20 -20
  198. package/lib/status-box/index.js +2 -2
  199. package/lib/table/index.js +33 -33
  200. package/lib/tabs/index.js +1 -1
  201. package/lib/typography/index.js +10 -3
  202. package/lib/upload/index.js +28 -28
  203. package/lib/upload-photo/index.js +28 -28
  204. package/lib/upload-photo/media.js +4 -4
  205. package/lib/upload-preview/index.js +10 -10
  206. package/lib/upload-preview/media.js +8 -8
  207. package/lib/utils/form-utils.d.ts +1 -1
  208. package/lib/utils/form-utils.js +10 -10
  209. package/package.json +1 -1
@@ -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
- }, void 0),
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
- }, void 0), (0, _jsxRuntime.jsx)(Dragger, _objectSpread(_objectSpread({
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
- }, void 0), (0, _jsxRuntime.jsx)("span", {
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
- }, void 0), (0, _jsxRuntime.jsx)(_typography.default, {
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
- }, void 0), (0, _jsxRuntime.jsx)(_typography.default, {
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
- }, void 0)]
586
- }, void 0)
587
- }, void 0)]
588
- }, void 0)
589
- }), void 0), !!files.length && (0, _jsxRuntime.jsx)(FileList, {
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
- }, void 0)]
597
- }, void 0);
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
- }, void 0), status === 'progress' && (0, _jsxRuntime.jsx)(_iglooicon.LoadingOutlined, {
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
- }, void 0), (0, _jsxRuntime.jsxs)("div", {
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
- }, void 0)
652
- }, void 0), Boolean(size) && (0, _jsxRuntime.jsx)("span", {
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
- }, void 0)
658
- }, void 0)]
659
- }, void 0)]
660
- }, void 0), status === 'success' && (0, _jsxRuntime.jsxs)("div", {
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
- }, void 0), (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
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
- }, void 0)]
682
- }, void 0), status === 'failed' && (0, _jsxRuntime.jsxs)("div", {
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
- }, void 0), (0, _jsxRuntime.jsx)(_iglooicon.CrossOutlined, {
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
- }, void 0)]
704
- }, void 0)]
703
+ })]
704
+ })]
705
705
  }, index);
706
706
  })
707
- }, void 0);
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
- }, void 0);
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
- }, void 0),
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
- }, void 0)
765
- }, void 0);
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
- }, void 0)
780
- }, void 0);
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
- }, void 0), (0, _jsxRuntime.jsx)("div", {
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
- }, void 0), label && (0, _jsxRuntime.jsx)("div", {
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
- }, void 0)
812
- }, void 0)]
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
- }, void 0)
821
- }, void 0)]
822
- }, void 0)
823
- }, void 0), (0, _jsxRuntime.jsx)("input", {
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
- }, void 0), (0, _jsxRuntime.jsxs)(_space.default, {
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
- }, void 0), (0, _jsxRuntime.jsx)("span", {
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
- }, void 0)
856
- }, void 0)]
857
- }, void 0), files.map(function (_ref11, index) {
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
- }, void 0), (!limit || index < limit) && masks[index] && (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
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
- }, void 0)
894
- }, void 0), status === 'success' && (0, _jsxRuntime.jsx)("div", {
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
- }, void 0)
905
- }, void 0)]
906
- }, void 0)]
907
- }, void 0)
904
+ })
905
+ })]
906
+ })]
907
+ })
908
908
  }, uid);
909
909
  })]
910
- }, void 0)]
911
- }, void 0);
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
- }, void 0);
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
- }, void 0);
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
- }, void 0)
42
- }, void 0);
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
- }, void 0);
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
- }, void 0);
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
- }, void 0), (0, _jsxRuntime.jsxs)(_modal.default, {
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
- }, void 0),
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, {}, void 0),
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
- }, void 0), src && type && (0, _jsxRuntime.jsx)(_media.default, {
171
+ }), src && type && (0, _jsxRuntime.jsx)(_media.default, {
172
172
  src: src,
173
173
  type: type
174
- }, void 0), (0, _jsxRuntime.jsx)(_button.default, {
175
- icon: (0, _jsxRuntime.jsx)(_iglooicon.ArrowRightOutlined, {}, void 0),
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
- }, void 0)]
180
- }, void 0)]
181
- }, void 0);
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
- }, void 0);
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
- }, void 0), (0, _jsxRuntime.jsx)(_typography.default, {
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
- }, void 0)]
98
- }, void 0);
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
- }, void 0);
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
- }, void 0);
113
+ });
114
114
  }
115
115
 
116
116
  if (type === 'pdf') {
117
117
  children = (0, _jsxRuntime.jsx)(PDF, {
118
118
  src: src
119
- }, void 0);
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
- }, void 0);
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) => object) | undefined;
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;
@@ -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
- }, void 0), isRequired && requiredMark && (0, _jsxRuntime.jsx)("span", {
255
+ }), isRequired && requiredMark && (0, _jsxRuntime.jsx)("span", {
256
256
  className: "igloo-form-label-required",
257
257
  children: "*"
258
- }, void 0), showOptional && (0, _jsxRuntime.jsxs)("span", {
258
+ }), showOptional && (0, _jsxRuntime.jsxs)("span", {
259
259
  className: "igloo-form-label-optional",
260
- children: ["(", (0, _formattedMessage.default)({
261
- id: 'Optional'
260
+ children: ["(", (0, _jsxRuntime.jsx)(_formattedMessage.default, {
261
+ id: "Optional"
262
262
  }), ")"]
263
- }, void 0)]
264
- }, void 0), extraLabel && (0, _jsxRuntime.jsx)("div", {
263
+ })]
264
+ }), extraLabel && (0, _jsxRuntime.jsx)("div", {
265
265
  className: "igloo-form-label-extra",
266
266
  children: typeof extraLabel === 'function' ? extraLabel(form) : extraLabel
267
- }, void 0)]
268
- }, void 0) : null,
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
- }, void 0),
274
+ }),
275
275
  help: help || extraHelp,
276
276
  valuePropName: valuePropName || extraValuePropName,
277
277
  messageVariables: _objectSpread({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iglooform",
3
- "version": "2.4.24",
3
+ "version": "2.4.27",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "build-dev": "dumi build",