iglooform 2.4.8 → 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.
Files changed (182) hide show
  1. package/es/admin-upload/float.js +25 -35
  2. package/es/admin-upload/index.js +18 -25
  3. package/es/admin-upload/job-list.js +83 -113
  4. package/es/admin-upload/modal.js +19 -26
  5. package/es/alert-message/index.js +11 -9
  6. package/es/amount/index.js +10 -5
  7. package/es/back-top/index.js +14 -10
  8. package/es/button/index.js +21 -26
  9. package/es/card-detail/card-group.js +16 -22
  10. package/es/card-detail/card-item.js +15 -20
  11. package/es/card-detail/card-page.js +11 -15
  12. package/es/card-detail/card.js +24 -24
  13. package/es/card-detail/utils.js +3 -4
  14. package/es/checkbox/index.js +23 -22
  15. package/es/claim-list/index.js +51 -68
  16. package/es/confirmation/index.js +5 -7
  17. package/es/date-picker/buddhist.js +1 -1
  18. package/es/date-picker/index.js +10 -4
  19. package/es/declaration/index.js +16 -13
  20. package/es/detail-panel/index.js +67 -83
  21. package/es/documents/index.js +6 -8
  22. package/es/example/index.js +3 -4
  23. package/es/filter/checkBox.js +33 -45
  24. package/es/filter/customize.js +3 -4
  25. package/es/filter/index.js +79 -107
  26. package/es/filter/radioBox.js +23 -31
  27. package/es/filter/rangePicker.js +43 -59
  28. package/es/form/divider/index.js +7 -1
  29. package/es/form/element/index.js +28 -36
  30. package/es/form/element/style/index.less +4 -0
  31. package/es/form/index.js +9 -12
  32. package/es/form/login/index.js +14 -19
  33. package/es/form/page/index.js +17 -23
  34. package/es/form/pages/index.js +22 -30
  35. package/es/form/section/index.js +11 -14
  36. package/es/form/step/index.js +30 -41
  37. package/es/form/steps/index.js +6 -8
  38. package/es/free-form/element/index.js +21 -27
  39. package/es/free-form/element/style/index.less +4 -0
  40. package/es/free-form/index.js +9 -12
  41. package/es/free-form/page/index.js +28 -39
  42. package/es/free-form/pages/index.js +6 -8
  43. package/es/free-form/section/index.js +11 -14
  44. package/es/free-form/step/index.js +30 -41
  45. package/es/free-form/steps/index.js +6 -8
  46. package/es/home-menu/index.js +52 -71
  47. package/es/input/amount.js +10 -5
  48. package/es/input/credit-card.js +7 -1
  49. package/es/input/email.js +8 -1
  50. package/es/input/expiry-date.js +12 -16
  51. package/es/input/input-date.js +12 -16
  52. package/es/input/input-number.js +9 -2
  53. package/es/input/input.js +9 -2
  54. package/es/input/otp.js +17 -15
  55. package/es/input/password.js +12 -6
  56. package/es/input/phone-number.js +6 -8
  57. package/es/input/text-area.js +14 -10
  58. package/es/layout/defaultFooter.js +60 -82
  59. package/es/layout/defaultHeader.js +11 -15
  60. package/es/layout/footer.js +108 -148
  61. package/es/layout/header.js +50 -59
  62. package/es/layout/index.js +16 -12
  63. package/es/locale/locale-provider.js +6 -8
  64. package/es/login-page/index.js +30 -42
  65. package/es/media/index.js +20 -27
  66. package/es/media/media.js +9 -12
  67. package/es/media/preview.js +6 -8
  68. package/es/mobile-insurer-detail/index.js +74 -91
  69. package/es/mobile-insurer-list/index.js +34 -38
  70. package/es/modal/index.js +20 -25
  71. package/es/platform/platform-card/index.js +9 -12
  72. package/es/platform/switch-platform/index.js +24 -32
  73. package/es/policy-list/index.js +9 -12
  74. package/es/policy-list/policy-card.js +119 -153
  75. package/es/radio/index.js +33 -35
  76. package/es/select/attached-select.js +31 -34
  77. package/es/select/select.js +12 -8
  78. package/es/select/time-select.js +12 -16
  79. package/es/status-box/index.js +6 -8
  80. package/es/table/index.js +69 -93
  81. package/es/tabs/index.js +7 -1
  82. package/es/typography/index.js +6 -8
  83. package/es/upload/index.js +48 -66
  84. package/es/upload-photo/index.js +47 -63
  85. package/es/upload-photo/media.js +3 -4
  86. package/es/upload-preview/index.js +9 -12
  87. package/es/upload-preview/media.js +12 -16
  88. package/es/utils/form-utils.js +18 -25
  89. package/lib/admin-upload/float.js +25 -35
  90. package/lib/admin-upload/index.js +18 -25
  91. package/lib/admin-upload/job-list.js +83 -113
  92. package/lib/admin-upload/modal.js +19 -26
  93. package/lib/alert-message/index.js +11 -9
  94. package/lib/amount/index.js +10 -5
  95. package/lib/back-top/index.js +14 -10
  96. package/lib/button/index.js +22 -27
  97. package/lib/card-detail/card-group.js +16 -22
  98. package/lib/card-detail/card-item.js +15 -20
  99. package/lib/card-detail/card-page.js +11 -15
  100. package/lib/card-detail/card.js +24 -24
  101. package/lib/card-detail/index.js +6 -6
  102. package/lib/card-detail/utils.js +4 -5
  103. package/lib/checkbox/index.js +24 -23
  104. package/lib/claim-list/index.js +51 -68
  105. package/lib/confirmation/index.js +5 -7
  106. package/lib/date-picker/buddhist.js +1 -1
  107. package/lib/date-picker/index.js +11 -5
  108. package/lib/declaration/index.js +16 -13
  109. package/lib/detail-panel/index.js +67 -83
  110. package/lib/documents/index.js +6 -8
  111. package/lib/example/index.js +3 -4
  112. package/lib/filter/checkBox.js +33 -45
  113. package/lib/filter/customize.js +3 -4
  114. package/lib/filter/index.js +79 -107
  115. package/lib/filter/radioBox.js +23 -31
  116. package/lib/filter/rangePicker.js +43 -59
  117. package/lib/form/divider/index.js +7 -1
  118. package/lib/form/element/index.js +28 -36
  119. package/lib/form/element/style/index.less +4 -0
  120. package/lib/form/index.js +9 -12
  121. package/lib/form/login/index.js +14 -19
  122. package/lib/form/page/index.js +17 -23
  123. package/lib/form/pages/index.js +22 -30
  124. package/lib/form/section/index.js +11 -14
  125. package/lib/form/step/index.js +30 -41
  126. package/lib/form/steps/index.js +6 -8
  127. package/lib/free-form/element/index.js +21 -27
  128. package/lib/free-form/element/style/index.less +4 -0
  129. package/lib/free-form/index.js +9 -12
  130. package/lib/free-form/page/index.js +28 -39
  131. package/lib/free-form/pages/index.js +6 -8
  132. package/lib/free-form/section/index.js +11 -14
  133. package/lib/free-form/step/index.js +30 -41
  134. package/lib/free-form/steps/index.js +6 -8
  135. package/lib/home-menu/index.js +52 -71
  136. package/lib/index.js +132 -132
  137. package/lib/input/amount.js +10 -5
  138. package/lib/input/credit-card.js +7 -1
  139. package/lib/input/email.js +7 -1
  140. package/lib/input/expiry-date.js +12 -16
  141. package/lib/input/index.js +18 -18
  142. package/lib/input/input-date.js +12 -16
  143. package/lib/input/input-number.js +8 -2
  144. package/lib/input/input.js +8 -2
  145. package/lib/input/otp.js +17 -15
  146. package/lib/input/password.js +11 -6
  147. package/lib/input/phone-number.js +6 -8
  148. package/lib/input/text-area.js +14 -10
  149. package/lib/layout/defaultFooter.js +60 -82
  150. package/lib/layout/defaultHeader.js +11 -15
  151. package/lib/layout/footer.js +108 -148
  152. package/lib/layout/header.js +50 -59
  153. package/lib/layout/index.js +15 -12
  154. package/lib/locale/format-message.js +1 -1
  155. package/lib/locale/index.js +4 -4
  156. package/lib/locale/locale-provider.js +7 -9
  157. package/lib/login-page/index.js +30 -42
  158. package/lib/media/index.js +20 -27
  159. package/lib/media/media.js +9 -12
  160. package/lib/media/preview.js +6 -8
  161. package/lib/mobile-insurer-detail/index.js +74 -91
  162. package/lib/mobile-insurer-list/index.js +34 -38
  163. package/lib/modal/index.js +20 -25
  164. package/lib/platform/platform-card/index.js +9 -12
  165. package/lib/platform/switch-platform/index.js +24 -32
  166. package/lib/policy-list/index.js +9 -12
  167. package/lib/policy-list/policy-card.js +119 -153
  168. package/lib/radio/index.js +33 -35
  169. package/lib/select/attached-select.js +32 -35
  170. package/lib/select/select.js +13 -9
  171. package/lib/select/time-select.js +12 -16
  172. package/lib/status-box/index.js +6 -8
  173. package/lib/table/index.js +69 -93
  174. package/lib/tabs/index.js +8 -2
  175. package/lib/typography/index.js +6 -8
  176. package/lib/upload/index.js +48 -66
  177. package/lib/upload-photo/index.js +47 -63
  178. package/lib/upload-photo/media.js +3 -4
  179. package/lib/upload-preview/index.js +9 -12
  180. package/lib/upload-preview/media.js +12 -16
  181. package/lib/utils/form-utils.js +19 -26
  182. package/package.json +1 -1
@@ -490,65 +490,57 @@ var IglooUpload = function IglooUpload(_ref) {
490
490
  });
491
491
  };
492
492
 
493
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
493
+ return (0, _jsxRuntime.jsxs)("div", {
494
494
  className: (0, _classnames.default)('igloo-upload', className),
495
495
  id: rest.id,
496
- ref: DomRef
497
- }, {
498
- children: [descriptions && (0, _jsxRuntime.jsx)("div", Object.assign({
499
- className: "igloo-upload-descriptions"
500
- }, {
496
+ ref: DomRef,
497
+ children: [descriptions && (0, _jsxRuntime.jsx)("div", {
498
+ className: "igloo-upload-descriptions",
501
499
  children: descriptions
502
- }), void 0), (0, _jsxRuntime.jsx)(Dragger, Object.assign({
500
+ }, void 0), (0, _jsxRuntime.jsx)(Dragger, _objectSpread(_objectSpread({
503
501
  action: onUpload
504
- }, rest, {
502
+ }, rest), {}, {
505
503
  showUploadList: false,
506
504
  className: "igloo-upload-box",
507
505
  customRequest: function customRequest() {},
508
- multiple: true
509
- }, {
510
- children: (0, _jsxRuntime.jsxs)("div", Object.assign({
511
- className: "igloo-upload-box-center"
512
- }, {
506
+ multiple: true,
507
+ children: (0, _jsxRuntime.jsxs)("div", {
508
+ className: "igloo-upload-box-center",
513
509
  children: [(0, _jsxRuntime.jsx)(_iglooicon.UploadOutlined, {
514
510
  style: {
515
511
  marginRight: 16,
516
512
  fontSize: 24,
517
513
  color: '#666666'
518
514
  }
519
- }, void 0), (0, _jsxRuntime.jsx)("span", Object.assign({
520
- className: "igloo-upload-placeholder"
521
- }, {
515
+ }, void 0), (0, _jsxRuntime.jsx)("span", {
516
+ className: "igloo-upload-placeholder",
522
517
  children: placeholder || (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
523
- children: [(0, _jsxRuntime.jsx)(_typography.default, Object.assign({
524
- level: "body1"
525
- }, {
518
+ children: [(0, _jsxRuntime.jsx)(_typography.default, {
519
+ level: "body1",
526
520
  children: formatMessage({
527
521
  id: 'Drag and drop a file here'
528
522
  })
529
- }), void 0), (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
523
+ }, void 0), (0, _jsxRuntime.jsx)(_typography.default, {
530
524
  level: "body1",
531
525
  style: {
532
526
  marginLeft: 4
533
- }
534
- }, {
527
+ },
535
528
  children: formatMessage({
536
529
  id: 'or'
537
530
  })
538
- }), void 0), (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
531
+ }, void 0), (0, _jsxRuntime.jsx)(_typography.default, {
539
532
  level: "body1",
540
533
  style: {
541
534
  color: _iglootheme.colors.purpleMain,
542
535
  marginLeft: 4
543
- }
544
- }, {
536
+ },
545
537
  children: formatMessage({
546
538
  id: 'browse'
547
539
  })
548
- }), void 0)]
540
+ }, void 0)]
549
541
  }, void 0)
550
- }), void 0)]
551
- }), void 0)
542
+ }, void 0)]
543
+ }, void 0)
552
544
  }), void 0), !!files.length && (0, _jsxRuntime.jsx)(FileList, {
553
545
  files: files,
554
546
  limit: limit,
@@ -557,7 +549,7 @@ var IglooUpload = function IglooUpload(_ref) {
557
549
  handleDelete: handleDelete,
558
550
  containerRef: containerRef
559
551
  }, void 0)]
560
- }), void 0);
552
+ }, void 0);
561
553
  };
562
554
 
563
555
  var FileList = function FileList(_ref7) {
@@ -577,22 +569,19 @@ var FileList = function FileList(_ref7) {
577
569
  return setInitDone(true);
578
570
  }, [containerRef.current]);
579
571
  if (!initDone) return null;
580
- var children = (0, _jsxRuntime.jsx)("div", Object.assign({
581
- className: "igloo-upload-preview-list"
582
- }, {
572
+ var children = (0, _jsxRuntime.jsx)("div", {
573
+ className: "igloo-upload-preview-list",
583
574
  children: files.map(function (_ref8, index) {
584
575
  var type = _ref8.type,
585
576
  name = _ref8.name,
586
577
  size = _ref8.size,
587
578
  status = _ref8.status;
588
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
579
+ return (0, _jsxRuntime.jsxs)("div", {
589
580
  className: (0, _classnames.default)('igloo-upload-preview-item', {
590
581
  'igloo-upload-preview-item-failed': status === 'failed'
591
- })
592
- }, {
593
- children: [(0, _jsxRuntime.jsxs)("div", Object.assign({
594
- className: "igloo-upload-preview-item-info"
595
- }, {
582
+ }),
583
+ children: [(0, _jsxRuntime.jsxs)("div", {
584
+ className: "igloo-upload-preview-item-info",
596
585
  children: [status !== 'progress' && (0, _jsxRuntime.jsx)(_iglooicon.FileOutlined, {
597
586
  style: {
598
587
  marginRight: 8,
@@ -607,30 +596,24 @@ var FileList = function FileList(_ref7) {
607
596
  fontSize: 24,
608
597
  color: '#999999'
609
598
  }
610
- }, void 0), (0, _jsxRuntime.jsxs)("div", Object.assign({
611
- className: "igloo-upload-preview-item-text"
612
- }, {
613
- children: [(0, _jsxRuntime.jsx)("span", Object.assign({
614
- className: "igloo-upload-preview-item-name"
615
- }, {
616
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
617
- level: "h4"
618
- }, {
599
+ }, void 0), (0, _jsxRuntime.jsxs)("div", {
600
+ className: "igloo-upload-preview-item-text",
601
+ children: [(0, _jsxRuntime.jsx)("span", {
602
+ className: "igloo-upload-preview-item-name",
603
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
604
+ level: "h4",
619
605
  children: name
620
- }), void 0)
621
- }), void 0), Boolean(size) && (0, _jsxRuntime.jsx)("span", Object.assign({
622
- className: "igloo-upload-preview-item-size"
623
- }, {
624
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
625
- level: "body1"
626
- }, {
606
+ }, void 0)
607
+ }, void 0), Boolean(size) && (0, _jsxRuntime.jsx)("span", {
608
+ className: "igloo-upload-preview-item-size",
609
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
610
+ level: "body1",
627
611
  children: (0, _tools.parseFileSize)(size)
628
- }), void 0)
629
- }), void 0)]
630
- }), void 0)]
631
- }), void 0), status === 'success' && (0, _jsxRuntime.jsxs)("div", Object.assign({
632
- className: "igloo-upload-preview-item-operation"
633
- }, {
612
+ }, void 0)
613
+ }, void 0)]
614
+ }, void 0)]
615
+ }, void 0), status === 'success' && (0, _jsxRuntime.jsxs)("div", {
616
+ className: "igloo-upload-preview-item-operation",
634
617
  children: [type && (0, _jsxRuntime.jsx)(_iglooicon.ShowOutlined, {
635
618
  style: {
636
619
  fontSize: 24,
@@ -651,9 +634,8 @@ var FileList = function FileList(_ref7) {
651
634
  return handleDelete(index);
652
635
  }
653
636
  }, void 0)]
654
- }), void 0), status === 'failed' && (0, _jsxRuntime.jsxs)("div", Object.assign({
655
- className: "igloo-upload-preview-item-operation"
656
- }, {
637
+ }, void 0), status === 'failed' && (0, _jsxRuntime.jsxs)("div", {
638
+ className: "igloo-upload-preview-item-operation",
657
639
  children: [(!limit || index < limit) && (0, _jsxRuntime.jsx)(_iglooicon.RefreshOutlined, {
658
640
  style: {
659
641
  fontSize: 24,
@@ -674,10 +656,10 @@ var FileList = function FileList(_ref7) {
674
656
  return handleDelete(index);
675
657
  }
676
658
  }, void 0)]
677
- }), void 0)]
678
- }), index);
659
+ }, void 0)]
660
+ }, index);
679
661
  })
680
- }), void 0);
662
+ }, void 0);
681
663
  return /*#__PURE__*/_reactDom.default.createPortal(children, containerRef.current);
682
664
  };
683
665
 
@@ -647,55 +647,47 @@ var UploadPhoto = function UploadPhoto(_ref) {
647
647
  }, void 0);
648
648
  };
649
649
 
650
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
650
+ return (0, _jsxRuntime.jsxs)("div", {
651
651
  className: (0, _classnames6.default)(prefix, className),
652
652
  id: id,
653
- ref: DomRef
654
- }, {
655
- children: [Boolean(descriptions || samples.length) && (0, _jsxRuntime.jsx)("div", Object.assign({
656
- className: "".concat(prefix, "-sample")
657
- }, {
658
- children: (0, _jsxRuntime.jsxs)(_row.default, Object.assign({
653
+ ref: DomRef,
654
+ children: [Boolean(descriptions || samples.length) && (0, _jsxRuntime.jsx)("div", {
655
+ className: "".concat(prefix, "-sample"),
656
+ children: (0, _jsxRuntime.jsxs)(_row.default, {
659
657
  gutter: [isMobile ? 16 : 32, 16],
660
- wrap: true
661
- }, {
658
+ wrap: true,
662
659
  children: [Boolean(samples === null || samples === void 0 ? void 0 : samples.length) && samples.map(function (_ref8, index) {
663
660
  var _classnames, _classnames2;
664
661
 
665
662
  var src = _ref8.src,
666
663
  label = _ref8.label,
667
664
  type = _ref8.type;
668
- return (0, _jsxRuntime.jsxs)(_col.default, Object.assign({
669
- span: sampleSpan
670
- }, {
665
+ return (0, _jsxRuntime.jsxs)(_col.default, {
666
+ span: sampleSpan,
671
667
  children: [(0, _jsxRuntime.jsx)("img", {
672
668
  src: src,
673
669
  alt: "",
674
670
  className: "".concat(prefix, "-sample-photos-photo")
675
671
  }, void 0), (0, _jsxRuntime.jsx)("div", {
676
672
  className: (0, _classnames6.default)((_classnames = {}, _defineProperty(_classnames, "".concat(prefix, "-sample-photos-good"), type === 'good'), _defineProperty(_classnames, "".concat(prefix, "-sample-photos-bad"), type === 'bad'), _classnames))
677
- }, void 0), label && (0, _jsxRuntime.jsx)("div", Object.assign({
678
- 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))
679
- }, {
680
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
681
- level: "body2"
682
- }, {
673
+ }, void 0), label && (0, _jsxRuntime.jsx)("div", {
674
+ 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)),
675
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
676
+ level: "body2",
683
677
  children: label
684
- }), void 0)
685
- }), void 0)]
686
- }), index);
687
- }), (0, _jsxRuntime.jsx)(_col.default, Object.assign({
678
+ }, void 0)
679
+ }, void 0)]
680
+ }, index);
681
+ }), (0, _jsxRuntime.jsx)(_col.default, {
688
682
  className: (0, _classnames6.default)((_classnames3 = {}, _defineProperty(_classnames3, "".concat(prefix, "-sample-descriptions"), true), _defineProperty(_classnames3, "".concat(prefix, "-sample-descriptions-center"), !!md), _classnames3)),
689
- span: descriptionSpan
690
- }, {
691
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
692
- level: "caption2"
693
- }, {
683
+ span: descriptionSpan,
684
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
685
+ level: "caption2",
694
686
  children: descriptions
695
- }), void 0)
696
- }), void 0)]
697
- }), void 0)
698
- }), void 0), (0, _jsxRuntime.jsx)("input", {
687
+ }, void 0)
688
+ }, void 0)]
689
+ }, void 0)
690
+ }, void 0), (0, _jsxRuntime.jsx)("input", {
699
691
  id: uploadId,
700
692
  type: "file",
701
693
  style: {
@@ -706,44 +698,39 @@ var UploadPhoto = function UploadPhoto(_ref) {
706
698
  value: [],
707
699
  multiple: true,
708
700
  capture: true
709
- }, void 0), (0, _jsxRuntime.jsxs)(_space.default, Object.assign({
701
+ }, void 0), (0, _jsxRuntime.jsxs)(_space.default, {
710
702
  className: "".concat(prefix, "-content"),
711
703
  size: [16, 16],
712
- wrap: true
713
- }, {
714
- children: [(0, _jsxRuntime.jsxs)("label", Object.assign({
704
+ wrap: true,
705
+ children: [(0, _jsxRuntime.jsxs)("label", {
715
706
  htmlFor: uploadId,
716
707
  className: (0, _classnames6.default)((_classnames4 = {}, _defineProperty(_classnames4, "".concat(prefix, "-content-button"), true), _defineProperty(_classnames4, 'dont-show-error-status', Array.isArray(value) && value.some(function (file) {
717
708
  return typeof file !== 'string' && file.status === 'failed';
718
- })), _classnames4))
719
- }, {
709
+ })), _classnames4)),
720
710
  children: [(0, _jsxRuntime.jsx)(_iglooicon.UploadOutlined, {
721
711
  style: {
722
712
  fontSize: 24,
723
713
  color: '#666666'
724
714
  }
725
- }, void 0), (0, _jsxRuntime.jsx)("span", Object.assign({
715
+ }, void 0), (0, _jsxRuntime.jsx)("span", {
726
716
  style: {
727
717
  marginTop: 6
728
- }
729
- }, {
730
- children: (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
731
- level: "body1"
732
- }, {
718
+ },
719
+ children: (0, _jsxRuntime.jsx)(_typography.default, {
720
+ level: "body1",
733
721
  children: buttonText || 'Upload'
734
- }), void 0)
735
- }), void 0)]
736
- }), void 0), files.map(function (_ref9, index) {
722
+ }, void 0)
723
+ }, void 0)]
724
+ }, void 0), files.map(function (_ref9, index) {
737
725
  var _classnames5;
738
726
 
739
727
  var dataUrl = _ref9.dataUrl,
740
728
  status = _ref9.status,
741
729
  type = _ref9.type,
742
730
  uid = _ref9.uid;
743
- return (0, _jsxRuntime.jsx)(_badge.default, Object.assign({
744
- count: getBadge(status, index, limit)
745
- }, {
746
- children: (0, _jsxRuntime.jsxs)("div", Object.assign({
731
+ return (0, _jsxRuntime.jsx)(_badge.default, {
732
+ count: getBadge(status, index, limit),
733
+ children: (0, _jsxRuntime.jsxs)("div", {
747
734
  className: (0, _classnames6.default)((_classnames5 = {}, _defineProperty(_classnames5, "".concat(prefix, "-content-container"), true), _defineProperty(_classnames5, "".concat(prefix, "-content-error"), status === 'failed'), _classnames5)),
748
735
  onMouseEnter: function onMouseEnter() {
749
736
  return handleMouseEnter(index);
@@ -754,44 +741,41 @@ var UploadPhoto = function UploadPhoto(_ref) {
754
741
  onClick: function onClick(e) {
755
742
  e.stopPropagation();
756
743
  handleTouchEnd(index);
757
- }
758
- }, {
744
+ },
759
745
  children: [(0, _jsxRuntime.jsx)(_media2.default, {
760
746
  type: type,
761
747
  src: dataUrl,
762
748
  className: "".concat(prefix, "-content-preview")
763
749
  }, void 0), (!limit || index < limit) && masks[index] && (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
764
- children: [status === 'failed' && (0, _jsxRuntime.jsx)("div", Object.assign({
750
+ children: [status === 'failed' && (0, _jsxRuntime.jsx)("div", {
765
751
  className: "".concat(prefix, "-content-mask"),
766
752
  onClick: function onClick(e) {
767
753
  e.stopPropagation();
768
754
  handleReUpload(index);
769
- }
770
- }, {
755
+ },
771
756
  children: (0, _jsxRuntime.jsx)(_iglooicon.RefreshOutlined, {
772
757
  style: {
773
758
  fontSize: 24
774
759
  }
775
760
  }, void 0)
776
- }), void 0), status === 'success' && (0, _jsxRuntime.jsx)("div", Object.assign({
761
+ }, void 0), status === 'success' && (0, _jsxRuntime.jsx)("div", {
777
762
  className: "".concat(prefix, "-content-mask"),
778
763
  onClick: function onClick(e) {
779
764
  e.stopPropagation();
780
765
  handlePreview(index);
781
- }
782
- }, {
766
+ },
783
767
  children: (0, _jsxRuntime.jsx)(_iglooicon.ShowOutlined, {
784
768
  style: {
785
769
  fontSize: 24
786
770
  }
787
771
  }, void 0)
788
- }), void 0)]
772
+ }, void 0)]
789
773
  }, void 0)]
790
- }), void 0)
791
- }), uid);
774
+ }, void 0)
775
+ }, uid);
792
776
  })]
793
- }), void 0)]
794
- }), void 0);
777
+ }, void 0)]
778
+ }, void 0);
795
779
  };
796
780
 
797
781
  function checkFileList(value) {
@@ -29,9 +29,8 @@ var MediaItem = function MediaItem(_ref) {
29
29
  }, void 0);
30
30
 
31
31
  case 'pdf':
32
- return (0, _jsxRuntime.jsx)("div", Object.assign({
33
- className: className
34
- }, {
32
+ return (0, _jsxRuntime.jsx)("div", {
33
+ className: className,
35
34
  children: (0, _jsxRuntime.jsx)(_reactPdf.default, {
36
35
  file: src,
37
36
  scale: 0.1,
@@ -40,7 +39,7 @@ var MediaItem = function MediaItem(_ref) {
40
39
  maxHeight: 96
41
40
  }
42
41
  }, void 0)
43
- }), void 0);
42
+ }, void 0);
44
43
 
45
44
  default:
46
45
  return (0, _jsxRuntime.jsx)("img", {
@@ -134,9 +134,8 @@ var UploadPreview = function UploadPreview(_ref) {
134
134
  if (!files || !files.length) return (0, _jsxRuntime.jsx)("div", {
135
135
  children: "-"
136
136
  }, void 0);
137
- return (0, _jsxRuntime.jsxs)("div", Object.assign({
138
- className: "igloo-upload-preview"
139
- }, {
137
+ return (0, _jsxRuntime.jsxs)("div", {
138
+ className: "igloo-upload-preview",
140
139
  children: [description || (files.length === 1 ? formatMessage({
141
140
  id: '1 file attached.'
142
141
  }) : formatMessage({
@@ -152,20 +151,18 @@ var UploadPreview = function UploadPreview(_ref) {
152
151
  style: {
153
152
  fontSize: 24
154
153
  }
155
- }, void 0), (0, _jsxRuntime.jsxs)(_modal.default, Object.assign({
154
+ }, void 0), (0, _jsxRuntime.jsxs)(_modal.default, {
156
155
  visible: preview,
157
- title: (0, _jsxRuntime.jsxs)(_typography.default, Object.assign({
158
- level: "h4"
159
- }, {
156
+ title: (0, _jsxRuntime.jsxs)(_typography.default, {
157
+ level: "h4",
160
158
  children: [label, " (", current + 1, "/", files.length, ")"]
161
- }), void 0),
159
+ }, void 0),
162
160
  className: "igloo-upload-preview-modal",
163
161
  footer: null,
164
162
  onCancel: function onCancel() {
165
163
  return setPreview(false);
166
164
  },
167
- forceRender: false
168
- }, {
165
+ forceRender: false,
169
166
  children: [(0, _jsxRuntime.jsx)(_button.default, {
170
167
  icon: (0, _jsxRuntime.jsx)(_iglooicon.ArrowLeftOutlined, {}, void 0),
171
168
  className: (0, _classnames.default)('igloo-upload-preview-modal-button', 'igloo-upload-preview-modal-button-left'),
@@ -180,8 +177,8 @@ var UploadPreview = function UploadPreview(_ref) {
180
177
  onClick: next,
181
178
  disabled: current >= files.length - 1
182
179
  }, void 0)]
183
- }), void 0)]
184
- }), void 0);
180
+ }, void 0)]
181
+ }, void 0);
185
182
  };
186
183
 
187
184
  var _default = UploadPreview;
@@ -70,11 +70,10 @@ var PDF = function PDF(_ref) {
70
70
  }, i));
71
71
  }
72
72
 
73
- return (0, _jsxRuntime.jsx)("div", Object.assign({
74
- className: "igloo-upload-preview-pdf"
75
- }, {
73
+ return (0, _jsxRuntime.jsx)("div", {
74
+ className: "igloo-upload-preview-pdf",
76
75
  children: pages
77
- }), void 0);
76
+ }, void 0);
78
77
  };
79
78
 
80
79
  var Media = function Media(_ref3) {
@@ -85,20 +84,18 @@ var Media = function Media(_ref3) {
85
84
  var _useContext = (0, _react.useContext)(_localeContext.default),
86
85
  formatMessage = _useContext.formatMessage;
87
86
 
88
- var children = (0, _jsxRuntime.jsxs)("div", Object.assign({
89
- className: "igloo-upload-prevew-not-supported"
90
- }, {
87
+ var children = (0, _jsxRuntime.jsxs)("div", {
88
+ className: "igloo-upload-prevew-not-supported",
91
89
  children: [(0, _jsxRuntime.jsx)(_iglooicon.ErrorFilled, {
92
90
  className: "igloo-upload-prevew-not-supported-icon"
93
- }, void 0), (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
91
+ }, void 0), (0, _jsxRuntime.jsx)(_typography.default, {
94
92
  level: "body1",
95
- className: "igloo-upload-prevew-not-supported-text"
96
- }, {
93
+ className: "igloo-upload-prevew-not-supported-text",
97
94
  children: formatMessage({
98
95
  id: 'No preview for this file. Only support image, video or PDF file.'
99
96
  })
100
- }), void 0)]
101
- }), void 0);
97
+ }, void 0)]
98
+ }, void 0);
102
99
 
103
100
  if (type === 'image') {
104
101
  children = (0, _jsxRuntime.jsx)("img", {
@@ -122,11 +119,10 @@ var Media = function Media(_ref3) {
122
119
  }, void 0);
123
120
  }
124
121
 
125
- return (0, _jsxRuntime.jsx)("div", Object.assign({
126
- className: (0, _classnames.default)('igloo-upload-preview-container', className)
127
- }, {
122
+ return (0, _jsxRuntime.jsx)("div", {
123
+ className: (0, _classnames.default)('igloo-upload-preview-container', className),
128
124
  children: children
129
- }), void 0);
125
+ }, void 0);
130
126
  };
131
127
 
132
128
  var _default = Media;
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.calcShouldRender = exports.calcSelectValue = exports.calcCopyValue = exports.calcDisabled = exports.calcFormItemProps = exports.testAssert = exports.calcNamePath = void 0;
6
+ exports.testAssert = exports.calcShouldRender = exports.calcSelectValue = exports.calcNamePath = exports.calcFormItemProps = exports.calcDisabled = exports.calcCopyValue = void 0;
7
7
 
8
8
  var _jsxRuntime = require("react/jsx-runtime");
9
9
 
@@ -225,40 +225,33 @@ var calcFormItemProps = function calcFormItemProps(config, extraProps, form, par
225
225
  normalize: normalize || extraNormalize,
226
226
  rules: rules,
227
227
  validateTrigger: _toConsumableArray(new Set(validateTriggers)),
228
- label: label ? (0, _jsxRuntime.jsxs)("div", Object.assign({
229
- className: "igloo-form-label"
230
- }, {
231
- children: [(0, _jsxRuntime.jsxs)("div", Object.assign({
232
- className: "igloo-form-label-text"
233
- }, {
234
- children: [(0, _jsxRuntime.jsx)(_typography.default, Object.assign({
235
- level: "body1"
236
- }, {
228
+ label: label ? (0, _jsxRuntime.jsxs)("div", {
229
+ className: "igloo-form-label",
230
+ children: [(0, _jsxRuntime.jsxs)("div", {
231
+ className: "igloo-form-label-text",
232
+ children: [(0, _jsxRuntime.jsx)(_typography.default, {
233
+ level: "body1",
237
234
  children: label
238
- }), void 0), isRequired && requiredMark && (0, _jsxRuntime.jsx)("span", Object.assign({
239
- className: "igloo-form-label-required"
240
- }, {
235
+ }, void 0), isRequired && requiredMark && (0, _jsxRuntime.jsx)("span", {
236
+ className: "igloo-form-label-required",
241
237
  children: "*"
242
- }), void 0), showOptional && (0, _jsxRuntime.jsxs)("span", Object.assign({
243
- className: "igloo-form-label-optional"
244
- }, {
238
+ }, void 0), showOptional && (0, _jsxRuntime.jsxs)("span", {
239
+ className: "igloo-form-label-optional",
245
240
  children: ["(", (0, _formattedMessage.default)({
246
241
  id: 'Optional'
247
242
  }), ")"]
248
- }), void 0)]
249
- }), void 0), extraLabel && (0, _jsxRuntime.jsx)("div", Object.assign({
250
- className: "igloo-form-label-extra"
251
- }, {
243
+ }, void 0)]
244
+ }, void 0), extraLabel && (0, _jsxRuntime.jsx)("div", {
245
+ className: "igloo-form-label-extra",
252
246
  children: typeof extraLabel === 'function' ? extraLabel(form) : extraLabel
253
- }), void 0)]
254
- }), void 0) : null,
247
+ }, void 0)]
248
+ }, void 0) : null,
255
249
  getValueFromEvent: getValueFromEvent || extraGetValueFromEvent,
256
250
  getValueProps: getValueProps,
257
- extra: (extra || extraExtra) && (0, _jsxRuntime.jsx)(_typography.default, Object.assign({
258
- level: "caption2"
259
- }, {
251
+ extra: (extra || extraExtra) && (0, _jsxRuntime.jsx)(_typography.default, {
252
+ level: "caption2",
260
253
  children: extra || extraExtra
261
- }), void 0),
254
+ }, void 0),
262
255
  help: help || extraHelp,
263
256
  valuePropName: valuePropName || extraValuePropName,
264
257
  messageVariables: _objectSpread({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iglooform",
3
- "version": "2.4.8",
3
+ "version": "2.4.9",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "build-dev": "dumi build",