iglooform 2.4.23 → 2.4.26

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 (217) hide show
  1. package/es/admin-upload/float.js +14 -14
  2. package/es/admin-upload/index.js +13 -13
  3. package/es/admin-upload/job-list.js +49 -49
  4. package/es/admin-upload/modal.js +10 -10
  5. package/es/alert-message/index.js +9 -9
  6. package/es/amount/index.js +4 -4
  7. package/es/back-top/index.js +6 -6
  8. package/es/button/index.js +11 -11
  9. package/es/card-detail/card-group.js +6 -6
  10. package/es/card-detail/card-item.js +6 -6
  11. package/es/card-detail/card-page.js +5 -5
  12. package/es/card-detail/card.js +9 -9
  13. package/es/card-detail/utils.js +3 -3
  14. package/es/checkbox/index.js +8 -8
  15. package/es/claim-list/index.js +21 -21
  16. package/es/confirmation/index.js +4 -4
  17. package/es/date-picker/buddhist.js +4 -4
  18. package/es/date-picker/index.js +11 -11
  19. package/es/declaration/index.js +7 -7
  20. package/es/detail-panel/index.js +28 -28
  21. package/es/documents/index.js +2 -2
  22. package/es/example/index.js +7 -7
  23. package/es/filter/checkBox.js +10 -10
  24. package/es/filter/customize.js +1 -1
  25. package/es/filter/index.js +46 -46
  26. package/es/filter/radioBox.js +7 -7
  27. package/es/filter/rangePicker.js +23 -23
  28. package/es/filter/style/index.less +10 -2
  29. package/es/form/addable-section/index.js +35 -20
  30. package/es/form/addable-section/style/index.less +6 -10
  31. package/es/form/divider/index.js +3 -3
  32. package/es/form/element/index.js +20 -20
  33. package/es/form/elements.js +5 -2
  34. package/es/form/index.js +9 -9
  35. package/es/form/login/index.js +6 -6
  36. package/es/form/page/index.js +8 -8
  37. package/es/form/pages/index.js +10 -10
  38. package/es/form/render/index.js +1 -1
  39. package/es/form/section/index.js +6 -6
  40. package/es/form/step/index.js +17 -16
  41. package/es/form/steps/index.js +2 -2
  42. package/es/free-form/addable-section/index.js +32 -17
  43. package/es/free-form/addable-section/style/index.less +0 -4
  44. package/es/free-form/element/index.js +13 -13
  45. package/es/free-form/index.js +5 -5
  46. package/es/free-form/page/index.js +17 -17
  47. package/es/free-form/pages/index.js +4 -4
  48. package/es/free-form/section/index.js +7 -7
  49. package/es/free-form/step/index.d.ts +1 -0
  50. package/es/free-form/step/index.js +20 -19
  51. package/es/free-form/steps/index.js +4 -4
  52. package/es/global-message/index.js +13 -13
  53. package/es/home-menu/index.js +18 -18
  54. package/es/index.d.ts +1 -1
  55. package/es/index.js +1 -1
  56. package/es/input/amount.js +4 -4
  57. package/es/input/credit-card.js +6 -6
  58. package/es/input/email.js +3 -3
  59. package/es/input/expiry-date.js +5 -5
  60. package/es/input/input-date.js +3 -3
  61. package/es/input/input-number.js +5 -5
  62. package/es/input/input.js +3 -3
  63. package/es/input/otp.js +8 -8
  64. package/es/input/password.js +6 -6
  65. package/es/input/phone-number.js +4 -4
  66. package/es/input/text-area.js +6 -6
  67. package/es/layout/defaultFooter.js +28 -28
  68. package/es/layout/defaultHeader.js +6 -6
  69. package/es/layout/footer.js +66 -66
  70. package/es/layout/header.js +28 -28
  71. package/es/layout/index.js +6 -6
  72. package/es/locale/en-US/messages.json +1 -0
  73. package/es/locale/id-ID/messages.json +1 -0
  74. package/es/locale/locale-provider.js +4 -4
  75. package/es/locale/th-TH/messages.json +1 -0
  76. package/es/locale/vi-VN/messages.json +1 -0
  77. package/es/locale/zh-CN/messages.json +1 -0
  78. package/es/login-page/index.js +16 -16
  79. package/es/media/index.js +15 -15
  80. package/es/media/media.js +8 -8
  81. package/es/media/preview.js +8 -8
  82. package/es/mobile-insurer-detail/index.js +20 -20
  83. package/es/mobile-insurer-list/index.js +13 -13
  84. package/es/modal/index.js +10 -10
  85. package/es/platform/platform-card/index.d.ts +4 -1
  86. package/es/platform/platform-card/index.js +9 -7
  87. package/es/platform/switch-platform/index.d.ts +4 -1
  88. package/es/platform/switch-platform/index.js +47 -16
  89. package/es/policy-list/index.js +6 -6
  90. package/es/policy-list/policy-card.js +34 -34
  91. package/es/radio/index.d.ts +2 -1
  92. package/es/radio/index.js +15 -14
  93. package/es/radio/radio-group-with-other.d.ts +6 -0
  94. package/es/radio/radio-group-with-other.js +85 -0
  95. package/es/select/attached-select.js +19 -22
  96. package/es/select/select.js +8 -11
  97. package/es/select/time-select.js +20 -20
  98. package/es/status-box/index.js +4 -4
  99. package/es/table/index.js +36 -36
  100. package/es/tabs/index.js +3 -3
  101. package/es/typography/index.js +10 -3
  102. package/es/upload/index.js +31 -31
  103. package/es/upload-photo/index.js +31 -31
  104. package/es/upload-photo/media.js +4 -4
  105. package/es/upload-preview/index.js +10 -10
  106. package/es/upload-preview/media.js +8 -8
  107. package/es/utils/form-utils.d.ts +1 -1
  108. package/es/utils/form-utils.js +13 -13
  109. package/lib/admin-upload/float.js +14 -14
  110. package/lib/admin-upload/index.js +13 -13
  111. package/lib/admin-upload/job-list.js +49 -49
  112. package/lib/admin-upload/modal.js +10 -10
  113. package/lib/alert-message/index.js +9 -9
  114. package/lib/amount/index.js +4 -4
  115. package/lib/back-top/index.js +6 -6
  116. package/lib/button/index.js +11 -11
  117. package/lib/card-detail/card-group.js +6 -6
  118. package/lib/card-detail/card-item.js +6 -6
  119. package/lib/card-detail/card-page.js +5 -5
  120. package/lib/card-detail/card.js +9 -9
  121. package/lib/card-detail/utils.js +3 -3
  122. package/lib/checkbox/index.js +8 -8
  123. package/lib/claim-list/index.js +21 -21
  124. package/lib/confirmation/index.js +4 -4
  125. package/lib/date-picker/buddhist.js +4 -4
  126. package/lib/date-picker/index.js +11 -11
  127. package/lib/declaration/index.js +7 -7
  128. package/lib/detail-panel/index.js +28 -28
  129. package/lib/documents/index.js +2 -2
  130. package/lib/example/index.js +8 -8
  131. package/lib/filter/checkBox.js +10 -10
  132. package/lib/filter/customize.js +1 -1
  133. package/lib/filter/index.js +46 -46
  134. package/lib/filter/radioBox.js +7 -7
  135. package/lib/filter/rangePicker.js +23 -23
  136. package/lib/filter/style/index.less +10 -2
  137. package/lib/form/addable-section/index.js +39 -19
  138. package/lib/form/addable-section/style/index.less +6 -10
  139. package/lib/form/divider/index.js +3 -3
  140. package/lib/form/element/index.js +20 -20
  141. package/lib/form/elements.js +6 -2
  142. package/lib/form/index.js +9 -9
  143. package/lib/form/login/index.js +6 -6
  144. package/lib/form/page/index.js +8 -8
  145. package/lib/form/pages/index.js +10 -10
  146. package/lib/form/render/index.js +1 -1
  147. package/lib/form/section/index.js +6 -6
  148. package/lib/form/step/index.js +17 -16
  149. package/lib/form/steps/index.js +2 -2
  150. package/lib/free-form/addable-section/index.js +36 -16
  151. package/lib/free-form/addable-section/style/index.less +0 -4
  152. package/lib/free-form/element/index.js +13 -13
  153. package/lib/free-form/index.js +5 -5
  154. package/lib/free-form/page/index.js +17 -17
  155. package/lib/free-form/pages/index.js +4 -4
  156. package/lib/free-form/section/index.js +7 -7
  157. package/lib/free-form/step/index.d.ts +1 -0
  158. package/lib/free-form/step/index.js +20 -19
  159. package/lib/free-form/steps/index.js +5 -5
  160. package/lib/global-message/index.js +13 -13
  161. package/lib/home-menu/index.js +18 -18
  162. package/lib/index.d.ts +1 -1
  163. package/lib/index.js +8 -1
  164. package/lib/input/amount.js +4 -4
  165. package/lib/input/credit-card.js +6 -6
  166. package/lib/input/email.js +3 -3
  167. package/lib/input/expiry-date.js +5 -5
  168. package/lib/input/input-date.js +3 -3
  169. package/lib/input/input-number.js +5 -5
  170. package/lib/input/input.js +3 -3
  171. package/lib/input/otp.js +8 -8
  172. package/lib/input/password.js +6 -6
  173. package/lib/input/phone-number.js +4 -4
  174. package/lib/input/text-area.js +6 -6
  175. package/lib/layout/defaultFooter.js +28 -28
  176. package/lib/layout/defaultHeader.js +6 -6
  177. package/lib/layout/footer.js +66 -66
  178. package/lib/layout/header.js +28 -28
  179. package/lib/layout/index.js +6 -6
  180. package/lib/locale/en-US/messages.json +1 -0
  181. package/lib/locale/id-ID/messages.json +1 -0
  182. package/lib/locale/locale-provider.js +4 -4
  183. package/lib/locale/th-TH/messages.json +1 -0
  184. package/lib/locale/vi-VN/messages.json +1 -0
  185. package/lib/locale/zh-CN/messages.json +1 -0
  186. package/lib/login-page/index.js +16 -16
  187. package/lib/media/index.js +15 -15
  188. package/lib/media/media.js +8 -8
  189. package/lib/media/preview.js +8 -8
  190. package/lib/mobile-insurer-detail/index.js +20 -20
  191. package/lib/mobile-insurer-list/index.js +13 -13
  192. package/lib/modal/index.js +10 -10
  193. package/lib/platform/platform-card/index.d.ts +4 -1
  194. package/lib/platform/platform-card/index.js +9 -7
  195. package/lib/platform/switch-platform/index.d.ts +4 -1
  196. package/lib/platform/switch-platform/index.js +46 -15
  197. package/lib/policy-list/index.js +6 -6
  198. package/lib/policy-list/policy-card.js +34 -34
  199. package/lib/radio/index.d.ts +2 -1
  200. package/lib/radio/index.js +23 -14
  201. package/lib/radio/radio-group-with-other.d.ts +6 -0
  202. package/lib/radio/radio-group-with-other.js +98 -0
  203. package/lib/select/attached-select.js +18 -21
  204. package/lib/select/select.js +7 -10
  205. package/lib/select/time-select.js +20 -20
  206. package/lib/status-box/index.js +4 -4
  207. package/lib/table/index.js +36 -36
  208. package/lib/tabs/index.js +3 -3
  209. package/lib/typography/index.js +10 -3
  210. package/lib/upload/index.js +31 -31
  211. package/lib/upload-photo/index.js +31 -31
  212. package/lib/upload-photo/media.js +4 -4
  213. package/lib/upload-preview/index.js +10 -10
  214. package/lib/upload-preview/media.js +8 -8
  215. package/lib/utils/form-utils.d.ts +1 -1
  216. package/lib/utils/form-utils.js +12 -12
  217. package/package.json +1 -1
@@ -5,9 +5,9 @@ import _Row from "antd/es/row";
5
5
  import "antd/es/collapse/style";
6
6
  import _Collapse from "antd/es/collapse";
7
7
 
8
- 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; }
8
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
9
9
 
10
- 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; }
10
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
11
11
 
12
12
  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; }
13
13
 
@@ -112,23 +112,23 @@ var PolicyCard = function PolicyCard(props) {
112
112
  className: classnames({
113
113
  'hide-icon': !extend
114
114
  })
115
- }, void 0), _jsx(ArrowDownOutlined, {
115
+ }), _jsx(ArrowDownOutlined, {
116
116
  className: classnames({
117
117
  'hide-icon': extend
118
118
  })
119
- }, void 0)]
120
- }, void 0), _jsx("div", {
119
+ })]
120
+ }), _jsx("div", {
121
121
  className: "left-logo-container",
122
122
  children: insurerLogo
123
- }, void 0), _jsxs(Typography, {
123
+ }), _jsxs(Typography, {
124
124
  level: "h4",
125
125
  className: "left-title-container",
126
126
  children: [insurerName, " ", insurerType]
127
- }, void 0), _jsx("div", {
127
+ }), _jsx("div", {
128
128
  className: "left-status",
129
- children: _jsx(StatusBox, _objectSpread({}, statusProps), void 0)
130
- }, void 0)]
131
- }, void 0), buttons && buttons.map(function (item, index) {
129
+ children: _jsx(StatusBox, _objectSpread({}, statusProps))
130
+ })]
131
+ }), buttons && buttons.map(function (item, index) {
132
132
  return item.render ? item.render() : _jsx(Button, {
133
133
  icon: item.icon,
134
134
  onClick: function onClick(e) {
@@ -142,13 +142,13 @@ var PolicyCard = function PolicyCard(props) {
142
142
  children: _jsx(Typography, {
143
143
  level: "h4",
144
144
  children: item.label
145
- }, void 0)
145
+ })
146
146
  }, String(item) + index);
147
147
  })]
148
- }, void 0), messageBar && _jsx("div", {
148
+ }), messageBar && _jsx("div", {
149
149
  className: "message-container",
150
- children: _jsx(AlertMessage, _objectSpread({}, messageBar), void 0)
151
- }, void 0), defaultItems && _jsx("div", {
150
+ children: _jsx(AlertMessage, _objectSpread({}, messageBar))
151
+ }), defaultItems && _jsx("div", {
152
152
  className: "container-bottom",
153
153
  children: _jsx(_Row, {
154
154
  gutter: [24, 32],
@@ -172,8 +172,8 @@ var PolicyCard = function PolicyCard(props) {
172
172
  children: _jsx(Typography, {
173
173
  level: "body1",
174
174
  children: title
175
- }, void 0)
176
- }, void 0), textArr.map(function (textItem, index) {
175
+ })
176
+ }), textArr.map(function (textItem, index) {
177
177
  var text = textItem.text,
178
178
  link = textItem.link;
179
179
 
@@ -183,7 +183,7 @@ var PolicyCard = function PolicyCard(props) {
183
183
  children: _jsx(Typography, {
184
184
  level: "body1",
185
185
  children: textItem
186
- }, void 0)
186
+ })
187
187
  }, index);
188
188
  } // 处理link (一个or多个,换行or不换行)
189
189
 
@@ -198,13 +198,13 @@ var PolicyCard = function PolicyCard(props) {
198
198
  children: [_jsx(Typography, {
199
199
  level: "body1",
200
200
  children: text
201
- }, void 0), _jsx(Button, {
201
+ }), _jsx(Button, {
202
202
  onClick: onClick ? function () {
203
203
  return onClick(props);
204
204
  } : function () {},
205
205
  type: "link",
206
206
  children: link.linkText
207
- }, void 0)]
207
+ })]
208
208
  }, index);
209
209
  }
210
210
 
@@ -213,7 +213,7 @@ var PolicyCard = function PolicyCard(props) {
213
213
  children: [_jsx(Typography, {
214
214
  level: "body1",
215
215
  children: text
216
- }, void 0), linkArr.map(function (linkObj, index) {
216
+ }), linkArr.map(function (linkObj, index) {
217
217
  var onClick = linkObj.onClick;
218
218
  return _jsx("div", {
219
219
  style: {
@@ -225,15 +225,15 @@ var PolicyCard = function PolicyCard(props) {
225
225
  } : function () {},
226
226
  type: "link",
227
227
  children: linkObj.linkText
228
- }, void 0)
228
+ })
229
229
  }, index);
230
230
  })]
231
231
  }, index);
232
232
  })]
233
233
  }, index);
234
234
  })
235
- }, void 0)
236
- }, void 0), _jsx(_Collapse, {
235
+ })
236
+ }), _jsx(_Collapse, {
237
237
  className: "igloo-policy-collapse-container",
238
238
  activeKey: extend ? allActiveKeys : [],
239
239
  children: infoGroups.map(function (group, index) {
@@ -247,7 +247,7 @@ var PolicyCard = function PolicyCard(props) {
247
247
  level: "h4",
248
248
  className: "panel-group-section-name",
249
249
  children: sectionName
250
- }, void 0), _jsx(_Row, {
250
+ }), _jsx(_Row, {
251
251
  gutter: [24, 16],
252
252
  children: infoItems.map(function (item, index) {
253
253
  var _item$span = item.span,
@@ -268,8 +268,8 @@ var PolicyCard = function PolicyCard(props) {
268
268
  children: _jsx(Typography, {
269
269
  level: "body1",
270
270
  children: title
271
- }, void 0)
272
- }, void 0), textArr.map(function (textItem, index) {
271
+ })
272
+ }), textArr.map(function (textItem, index) {
273
273
  var text = textItem.text,
274
274
  link = textItem.link;
275
275
 
@@ -279,7 +279,7 @@ var PolicyCard = function PolicyCard(props) {
279
279
  children: _jsx(Typography, {
280
280
  level: "body1",
281
281
  children: textItem
282
- }, void 0)
282
+ })
283
283
  }, index);
284
284
  } // 处理link (一个or多个,换行or不换行)
285
285
 
@@ -294,13 +294,13 @@ var PolicyCard = function PolicyCard(props) {
294
294
  children: [_jsx(Typography, {
295
295
  level: "body1",
296
296
  children: text
297
- }, void 0), _jsx(Button, {
297
+ }), _jsx(Button, {
298
298
  onClick: onClick ? function () {
299
299
  return onClick(props);
300
300
  } : function () {},
301
301
  type: "link",
302
302
  children: link.linkText
303
- }, void 0)]
303
+ })]
304
304
  }, index);
305
305
  }
306
306
 
@@ -309,7 +309,7 @@ var PolicyCard = function PolicyCard(props) {
309
309
  children: [_jsx(Typography, {
310
310
  level: "body1",
311
311
  children: text
312
- }, void 0), linkArr.map(function (linkObj, index) {
312
+ }), linkArr.map(function (linkObj, index) {
313
313
  var onClick = linkObj.onClick;
314
314
  return _jsx("div", {
315
315
  style: {
@@ -321,18 +321,18 @@ var PolicyCard = function PolicyCard(props) {
321
321
  } : function () {},
322
322
  type: "link",
323
323
  children: linkObj.linkText
324
- }, void 0)
324
+ })
325
325
  }, index);
326
326
  })]
327
327
  }, index);
328
328
  })]
329
329
  }, index);
330
330
  })
331
- }, void 0)]
331
+ })]
332
332
  }, index);
333
333
  })
334
- }, void 0)]
335
- }, void 0);
334
+ })]
335
+ });
336
336
  };
337
337
 
338
338
  export default PolicyCard;
@@ -4,7 +4,7 @@ import './style/index.less';
4
4
  import { FormInstance } from 'antd/es/form';
5
5
  declare type Props = RadioProps & IglooComponentProps;
6
6
  declare const IglooRadio: FC<Props>;
7
- interface Option extends RadioProps {
7
+ export interface Option extends RadioProps {
8
8
  extraInfo?: {
9
9
  content: any;
10
10
  shownTrigger: 'unchecked' | 'checked' | 'all';
@@ -19,3 +19,4 @@ export interface IProps extends IglooComponentProps, Omit<RadioGroupProps, 'opti
19
19
  }
20
20
  export declare const RadioGroup: FC<IProps>;
21
21
  export default IglooRadio;
22
+ export { default as RadioGroupWithOther } from './radio-group-with-other';
package/es/radio/index.js CHANGED
@@ -11,9 +11,9 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
11
11
 
12
12
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
13
13
 
14
- 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; }
14
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
15
15
 
16
- 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; }
16
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
17
17
 
18
18
  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; }
19
19
 
@@ -26,7 +26,7 @@ import './style/index.less';
26
26
  import Typography from '../typography';
27
27
 
28
28
  var IglooRadio = function IglooRadio(props) {
29
- return _jsx(_Radio, _objectSpread({}, omit(props, formMethods)), void 0);
29
+ return _jsx(_Radio, _objectSpread({}, omit(props, formMethods)));
30
30
  };
31
31
 
32
32
  IglooRadio.formItemPropsHandler = function () {
@@ -81,11 +81,11 @@ export var RadioGroup = function RadioGroup(_ref) {
81
81
  children: _jsx(Typography, {
82
82
  level: "body1",
83
83
  children: label
84
- }, void 0)
85
- }), void 0), _jsx("div", {
84
+ })
85
+ })), _jsx("div", {
86
86
  className: "igloo-radio-extra",
87
87
  children: extraInfo && (extraInfo.shownTrigger === 'all' || extraInfo.shownTrigger === 'checked' && value === key || extraInfo.shownTrigger === 'unchecked' && value !== key) && extraInfo.content
88
- }, void 0)]
88
+ })]
89
89
  }, key) : _jsx(_Col, {
90
90
  span: 12,
91
91
  className: 'igloo-radio-group-button',
@@ -99,21 +99,22 @@ export var RadioGroup = function RadioGroup(_ref) {
99
99
  children: _jsx(Typography, {
100
100
  level: "body1",
101
101
  children: label
102
- }, void 0)
103
- }, void 0), _jsx(_Radio, {
102
+ })
103
+ }), _jsx(_Radio, {
104
104
  value: key,
105
105
  className: 'igloo-radio-inner-radio'
106
- }, void 0)]
107
- }, void 0)
108
- }), void 0)
106
+ })]
107
+ })
108
+ }))
109
109
  }, key);
110
110
  })
111
- }, void 0)
112
- }), void 0);
111
+ })
112
+ }));
113
113
  };
114
114
 
115
115
  RadioGroup.formItemPropsHandler = function () {
116
116
  return {};
117
117
  };
118
118
 
119
- export default IglooRadio;
119
+ export default IglooRadio;
120
+ export { default as RadioGroupWithOther } from './radio-group-with-other';
@@ -0,0 +1,6 @@
1
+ import { IProps as RadioGroupProps } from './index';
2
+ import { FC } from '../types';
3
+ declare const RadioGroupWithOther: FC<RadioGroupProps & {
4
+ otherOptionLabel: string;
5
+ }>;
6
+ export default RadioGroupWithOther;
@@ -0,0 +1,85 @@
1
+ var _excluded = ["value", "onChange", "options", "otherOptionLabel"];
2
+
3
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
+
5
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
6
+
7
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
8
+
9
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
+
11
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
+
13
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
14
+
15
+ 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; }
16
+
17
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
+
19
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
20
+
21
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
22
+
23
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
24
+
25
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
26
+
27
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
28
+
29
+ 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; }
30
+
31
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
32
+
33
+ import { jsx as _jsx } from "react/jsx-runtime";
34
+ import { useContext, useState } from 'react';
35
+ import { RadioGroup } from './index';
36
+ import { TextArea } from '../input';
37
+ import { LocaleContext } from '../locale';
38
+ var otherKey = 'iglooRadioGroupOther';
39
+
40
+ var RadioGroupWithOther = function RadioGroupWithOther(_ref) {
41
+ var value = _ref.value,
42
+ onChange = _ref.onChange,
43
+ options = _ref.options,
44
+ otherOptionLabel = _ref.otherOptionLabel,
45
+ rest = _objectWithoutProperties(_ref, _excluded);
46
+
47
+ var _useState = useState(false),
48
+ _useState2 = _slicedToArray(_useState, 2),
49
+ otherEnabled = _useState2[0],
50
+ enableOther = _useState2[1];
51
+
52
+ var handleChange = function handleChange(e) {
53
+ onChange && onChange(e);
54
+ };
55
+
56
+ var handleRadioChange = function handleRadioChange(e) {
57
+ enableOther(e.target.value === otherKey);
58
+ onChange && onChange(e);
59
+ };
60
+
61
+ var _useContext = useContext(LocaleContext),
62
+ formatMessage = _useContext.formatMessage;
63
+
64
+ return _jsx("div", {
65
+ className: "igloo-reason-selector",
66
+ children: _jsx(RadioGroup, _objectSpread({
67
+ value: otherEnabled ? otherKey : value,
68
+ onChange: handleRadioChange,
69
+ options: [].concat(_toConsumableArray(options), [{
70
+ label: otherOptionLabel || formatMessage({
71
+ id: 'Other Reason'
72
+ }),
73
+ value: otherKey,
74
+ extraInfo: {
75
+ content: _jsx(TextArea, {
76
+ onChange: handleChange
77
+ }),
78
+ shownTrigger: 'checked'
79
+ }
80
+ }])
81
+ }, rest))
82
+ });
83
+ };
84
+
85
+ export default RadioGroupWithOther;
@@ -2,9 +2,9 @@ import "antd/es/select/style";
2
2
  import _Select from "antd/es/select";
3
3
  var _excluded = ["options", "getOptions", "value", "className", "placeholder", "onDropdownVisibleChange", "children", "showSearch", "filterOption", "optionFilterProp", "multiple", "clearWhenOptionsUpdated"];
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; }
5
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
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; }
7
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
8
 
9
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; }
10
10
 
@@ -32,7 +32,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
32
32
 
33
33
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
34
34
 
35
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
35
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
36
36
  import { useEffect, useState, useContext } from 'react';
37
37
  import omit from 'omit.js';
38
38
  import formMethods from '../utils/form-methods';
@@ -223,10 +223,7 @@ var IglooSelect = function IglooSelect(_ref) {
223
223
  }
224
224
  }, omit(rest, formMethods)), {}, {
225
225
  value: selected,
226
- suffixIcon: _jsxs("div", {
227
- style: {
228
- position: 'relative'
229
- },
226
+ suffixIcon: _jsxs(_Fragment, {
230
227
  children: [_jsx(ArrowDownOutlined, {
231
228
  className: classnames({
232
229
  'igloo-select-arrow': true,
@@ -235,7 +232,7 @@ var IglooSelect = function IglooSelect(_ref) {
235
232
  style: {
236
233
  opacity: dropVisible ? 0 : 1
237
234
  }
238
- }, void 0), _jsx(ArrowUpOutlined, {
235
+ }), _jsx(ArrowUpOutlined, {
239
236
  className: classnames({
240
237
  'igloo-select-arrow': true,
241
238
  'igloo-select-arrow-active': dropVisible
@@ -243,8 +240,8 @@ var IglooSelect = function IglooSelect(_ref) {
243
240
  style: {
244
241
  opacity: dropVisible ? 1 : 0
245
242
  }
246
- }, void 0)]
247
- }, void 0),
243
+ })]
244
+ }),
248
245
  className: classnames('igloo-attached-select', {
249
246
  'igloo-attached-select-open-status': dropVisible
250
247
  }),
@@ -274,12 +271,12 @@ var IglooSelect = function IglooSelect(_ref) {
274
271
  style: {
275
272
  fontSize: 24
276
273
  }
277
- }, void 0),
274
+ }),
278
275
  onKeyDown: function onKeyDown(e) {
279
276
  return e.stopPropagation();
280
277
  }
281
- }, void 0)
282
- }, void 0), _jsxs("div", {
278
+ })
279
+ }), _jsxs("div", {
283
280
  className: "igloo-attached-select-multiple-dropdown-buttons",
284
281
  children: [_jsx(Button, {
285
282
  type: "link",
@@ -291,7 +288,7 @@ var IglooSelect = function IglooSelect(_ref) {
291
288
  children: formatMessage({
292
289
  id: 'Select All'
293
290
  })
294
- }, void 0), _jsx(Button, {
291
+ }), _jsx(Button, {
295
292
  type: "link",
296
293
  onClick: clearAll,
297
294
  disabled: displayOptions.every(function (_ref7) {
@@ -301,9 +298,9 @@ var IglooSelect = function IglooSelect(_ref) {
301
298
  children: formatMessage({
302
299
  id: 'Clear All'
303
300
  })
304
- }, void 0)]
305
- }, void 0), originNode]
306
- }, void 0);
301
+ })]
302
+ }), originNode]
303
+ });
307
304
  },
308
305
  maxTagCount: 0,
309
306
  maxTagPlaceholder: function maxTagPlaceholder(values) {
@@ -333,8 +330,8 @@ var IglooSelect = function IglooSelect(_ref) {
333
330
  style: {
334
331
  marginRight: 8
335
332
  }
336
- }, void 0), label]
337
- }, void 0) : label, _jsx("div", {
333
+ }), label]
334
+ }) : label, _jsx("div", {
338
335
  style: {
339
336
  position: 'absolute',
340
337
  width: '100%',
@@ -343,11 +340,11 @@ var IglooSelect = function IglooSelect(_ref) {
343
340
  top: 0,
344
341
  left: 0
345
342
  }
346
- }, void 0)]
343
+ })]
347
344
  }, value);
348
345
  })
349
- }), void 0)
350
- }, void 0);
346
+ }))
347
+ });
351
348
  };
352
349
 
353
350
  IglooSelect.formItemPropsHandler = function (config) {
@@ -2,9 +2,9 @@ import "antd/es/select/style";
2
2
  import _Select from "antd/es/select";
3
3
  var _excluded = ["options", "value", "className", "placeholder", "children", "onDropdownVisibleChange", "showSearch", "filterOption", "optionFilterProp"];
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; }
5
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
6
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; }
7
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
8
8
 
9
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; }
10
10
 
@@ -24,7 +24,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
24
24
 
25
25
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
26
26
 
27
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
28
28
  import { useContext, useState } from 'react';
29
29
  import omit from 'omit.js';
30
30
  import formMethods from '../utils/form-methods';
@@ -63,10 +63,7 @@ var IglooSelect = function IglooSelect(_ref) {
63
63
  }, omit(rest, formMethods)), {}, {
64
64
  options: children ? void 0 : options,
65
65
  value: value,
66
- suffixIcon: _jsxs("div", {
67
- style: {
68
- position: 'relative'
69
- },
66
+ suffixIcon: _jsxs(_Fragment, {
70
67
  children: [_jsx(ArrowDownOutlined, {
71
68
  className: classnames({
72
69
  'igloo-select-arrow': true,
@@ -75,7 +72,7 @@ var IglooSelect = function IglooSelect(_ref) {
75
72
  style: {
76
73
  opacity: isOpen ? 0 : 1
77
74
  }
78
- }, void 0), _jsx(ArrowUpOutlined, {
75
+ }), _jsx(ArrowUpOutlined, {
79
76
  className: classnames({
80
77
  'igloo-select-arrow': true,
81
78
  'igloo-select-arrow-active': isOpen
@@ -83,8 +80,8 @@ var IglooSelect = function IglooSelect(_ref) {
83
80
  style: {
84
81
  opacity: isOpen ? 1 : 0
85
82
  }
86
- }, void 0)]
87
- }, void 0),
83
+ })]
84
+ }),
88
85
  getPopupContainer: function getPopupContainer(trigger) {
89
86
  return trigger.parentNode;
90
87
  },
@@ -101,7 +98,7 @@ var IglooSelect = function IglooSelect(_ref) {
101
98
  } : void 0),
102
99
  mode: undefined,
103
100
  children: children
104
- }), void 0);
101
+ }));
105
102
  };
106
103
 
107
104
  IglooSelect.OptGroup = OptGroup;
@@ -201,57 +201,57 @@ var IglooTimeSelect = function IglooTimeSelect(props) {
201
201
  onClick: function onClick() {
202
202
  return handleTimeSwitchButton(hourRange, hourValue, setHourVale, 'down');
203
203
  }
204
- }, void 0), _jsx(Input, {
204
+ }), _jsx(Input, {
205
205
  onChange: function onChange(e) {
206
206
  return handleTimeInput(hourRange, e.target.value, setHourVale);
207
207
  },
208
208
  value: hourValue
209
- }, void 0), _jsx(ArrowDownOutlined, {
209
+ }), _jsx(ArrowDownOutlined, {
210
210
  onClick: function onClick() {
211
211
  return handleTimeSwitchButton(hourRange, hourValue, setHourVale, 'up');
212
212
  }
213
- }, void 0)]
214
- }, void 0), _jsx("span", {
213
+ })]
214
+ }), _jsx("span", {
215
215
  children: ":"
216
- }, void 0), _jsxs("div", {
216
+ }), _jsxs("div", {
217
217
  children: [_jsx(ArrowUpOutlined, {
218
218
  onClick: function onClick() {
219
219
  return handleTimeSwitchButton(minuteRange, minuteValue, setMinuteVale, 'down');
220
220
  }
221
- }, void 0), _jsx(Input, {
221
+ }), _jsx(Input, {
222
222
  ref: secondInputRef,
223
223
  onChange: function onChange(e) {
224
224
  return handleTimeInput(minuteRange, e.target.value, setMinuteVale);
225
225
  },
226
226
  value: minuteValue
227
- }, void 0), _jsx(ArrowDownOutlined, {
227
+ }), _jsx(ArrowDownOutlined, {
228
228
  onClick: function onClick() {
229
229
  return handleTimeSwitchButton(minuteRange, minuteValue, setMinuteVale, 'up');
230
230
  }
231
- }, void 0)]
232
- }, void 0), _jsxs("div", {
231
+ })]
232
+ }), _jsxs("div", {
233
233
  children: [_jsx(ArrowUpOutlined, {
234
234
  className: classnames({// 'igloo-hour-select-meridiem-disable': meridiemDisable,
235
235
  }),
236
236
  onClick: function onClick() {
237
237
  return meridiemSwitch(hourValue);
238
238
  }
239
- }, void 0), _jsx("span", {
239
+ }), _jsx("span", {
240
240
  children: _jsx(Typography, {
241
241
  level: "body1",
242
242
  children: meridiem ? 'AM' : 'PM'
243
- }, void 0)
244
- }, void 0), _jsx(ArrowDownOutlined, {
243
+ })
244
+ }), _jsx(ArrowDownOutlined, {
245
245
  className: classnames({// 'igloo-hour-select-meridiem-disable': meridiemDisable,
246
246
  }),
247
247
  onClick: function onClick() {
248
248
  return meridiemSwitch(hourValue);
249
249
  }
250
- }, void 0)]
251
- }, void 0)]
252
- }, void 0)
250
+ })]
251
+ })]
252
+ })
253
253
  }, '0')
254
- }, void 0);
254
+ });
255
255
 
256
256
  return _jsxs("div", {
257
257
  className: "igloo-hour-select",
@@ -272,13 +272,13 @@ var IglooTimeSelect = function IglooTimeSelect(props) {
272
272
  className: classnames('igloo-input', {
273
273
  'igloo-hour-select-input-active': dropDownVisible
274
274
  })
275
- }, void 0)
276
- }, void 0), _jsx(TimeOutlined, {
275
+ })
276
+ }), _jsx(TimeOutlined, {
277
277
  className: classnames({
278
278
  'igloo-hour-select-active': dropDownVisible
279
279
  })
280
- }, void 0)]
281
- }, void 0);
280
+ })]
281
+ });
282
282
  };
283
283
 
284
284
  function checkCard(value) {