iglooform 2.4.20 → 2.4.21

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.
@@ -307,7 +307,9 @@ var Element = function Element(_ref) {
307
307
  className: "igloo-element-preview-value",
308
308
  children: [error && !!error.length && _jsx(AlertFilled, {
309
309
  className: "igloo-element-preview-value-icon"
310
- }, void 0), previewFormater ? previewFormater(value, form) : value || '-']
310
+ }, void 0), _jsx("div", {
311
+ children: previewFormater ? previewFormater(value, form) : JSON.stringify(value)
312
+ }, void 0)]
311
313
  }, void 0)]
312
314
  }, void 0)
313
315
  }), void 0)
@@ -262,7 +262,9 @@ var Element = function Element(props) {
262
262
  className: "igloo-freeform-element-preview-value",
263
263
  children: [error && !!error.length && _jsx(AlertFilled, {
264
264
  className: "igloo-freeform-element-preview-value-icon"
265
- }, void 0), previewFormater ? previewFormater(value, form) : value || '-']
265
+ }, void 0), _jsx("div", {
266
+ children: previewFormater ? previewFormater(value, form) : JSON.stringify(value)
267
+ }, void 0)]
266
268
  }, void 0)]
267
269
  }, void 0)
268
270
  }), void 0)
@@ -214,7 +214,8 @@ function checkCard(value, cardRules) {
214
214
  }
215
215
 
216
216
  IglooCredit.formItemPropsHandler = function (config) {
217
- var cardConfig = config.cardConfig;
217
+ var _config$cardConfig = config.cardConfig,
218
+ cardConfig = _config$cardConfig === void 0 ? [] : _config$cardConfig;
218
219
  return {
219
220
  rules: [{
220
221
  validator: function validator(_, value) {
@@ -280,7 +280,12 @@ IglooExpiryDate.formItemPropsHandler = function (config) {
280
280
  validator: function validator(_, value) {
281
281
  return checkTime(value, check);
282
282
  }
283
- }]
283
+ }],
284
+ previewFormater: function previewFormater(_ref2) {
285
+ var year = _ref2.year,
286
+ month = _ref2.month;
287
+ return "".concat(month, "/").concat(year);
288
+ }
284
289
  };
285
290
  };
286
291
 
@@ -336,7 +336,9 @@ var Element = function Element(_ref) {
336
336
  className: "igloo-element-preview-value",
337
337
  children: [error && !!error.length && (0, _jsxRuntime.jsx)(_iglooicon.AlertFilled, {
338
338
  className: "igloo-element-preview-value-icon"
339
- }, void 0), previewFormater ? previewFormater(value, form) : value || '-']
339
+ }, void 0), (0, _jsxRuntime.jsx)("div", {
340
+ children: previewFormater ? previewFormater(value, form) : JSON.stringify(value)
341
+ }, void 0)]
340
342
  }, void 0)]
341
343
  }, void 0)
342
344
  }), void 0)
@@ -288,7 +288,9 @@ var Element = function Element(props) {
288
288
  className: "igloo-freeform-element-preview-value",
289
289
  children: [error && !!error.length && (0, _jsxRuntime.jsx)(_iglooicon.AlertFilled, {
290
290
  className: "igloo-freeform-element-preview-value-icon"
291
- }, void 0), previewFormater ? previewFormater(value, form) : value || '-']
291
+ }, void 0), (0, _jsxRuntime.jsx)("div", {
292
+ children: previewFormater ? previewFormater(value, form) : JSON.stringify(value)
293
+ }, void 0)]
292
294
  }, void 0)]
293
295
  }, void 0)
294
296
  }), void 0)
@@ -229,7 +229,8 @@ function checkCard(value, cardRules) {
229
229
  }
230
230
 
231
231
  IglooCredit.formItemPropsHandler = function (config) {
232
- var cardConfig = config.cardConfig;
232
+ var _config$cardConfig = config.cardConfig,
233
+ cardConfig = _config$cardConfig === void 0 ? [] : _config$cardConfig;
233
234
  return {
234
235
  rules: [{
235
236
  validator: function validator(_, value) {
@@ -296,7 +296,12 @@ IglooExpiryDate.formItemPropsHandler = function (config) {
296
296
  validator: function validator(_, value) {
297
297
  return checkTime(value, check);
298
298
  }
299
- }]
299
+ }],
300
+ previewFormater: function previewFormater(_ref2) {
301
+ var year = _ref2.year,
302
+ month = _ref2.month;
303
+ return "".concat(month, "/").concat(year);
304
+ }
300
305
  };
301
306
  };
302
307
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iglooform",
3
- "version": "2.4.20",
3
+ "version": "2.4.21",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "build-dev": "dumi build",