iglooform 2.4.12 → 2.4.16

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.
@@ -64,6 +64,9 @@ var Excample = function Excample(_ref) {
64
64
  }, {
65
65
  label: 'zh-CN',
66
66
  value: 'zh-CN'
67
+ }, {
68
+ label: 'zh-TW',
69
+ value: 'zh-TW'
67
70
  }];
68
71
 
69
72
  var _children$props = children.props,
@@ -88,6 +88,7 @@ var IglooCredit = function IglooCredit(props) {
88
88
  _props$cardConfig = props.cardConfig,
89
89
  cardConfig = _props$cardConfig === void 0 ? [] : _props$cardConfig,
90
90
  formChangeProps = props.onChange,
91
+ setFieldError = props.setFieldError,
91
92
  value = props.value;
92
93
 
93
94
  var _useState = useState(''),
@@ -147,30 +148,43 @@ var IglooCredit = function IglooCredit(props) {
147
148
  function handleOnChange(value, cardRules, formOnChange) {
148
149
  var pureNumInput = value.replace(/[^0-9]/gi, '');
149
150
 
150
- if (pureNumInput.length === formValue.length && !isNaN(Number(value.substr(value.length - 1, 1)))) {
151
+ if (pureNumInput.length === formValue.length && value[value.length - 1] === '') {
151
152
  // 删除了空格,得删除一个数字
152
153
  pureNumInput = pureNumInput.substring(0, pureNumInput.length - 1);
153
154
  }
154
155
 
155
156
  setFormValue(pureNumInput);
156
- formOnChange && formOnChange(pureNumInput); // 未必是16位
157
- // if (pureNumInput.length === 17) {
158
- // return
159
- // }
160
-
161
157
  judgeCardType(pureNumInput, cardRules);
162
- setSeparateValue(separatePureNum(pureNumInput));
163
- } // 处理初始化
158
+ setSeparateValue(separatePureNum(pureNumInput)); // 空值校验
159
+
160
+ if (!pureNumInput) {
161
+ formOnChange && formOnChange(pureNumInput);
162
+ return;
163
+ }
164
+
165
+ for (var i = 0; i < cardRules.length; i++) {
166
+ var reg = cardRules[i].reg;
167
+ var regObj = new RegExp(reg);
164
168
 
169
+ if (regObj.test(pureNumInput)) {
170
+ formOnChange && formOnChange(pureNumInput);
171
+ return;
172
+ }
173
+ }
174
+
175
+ setFieldError && setFieldError(formatMessage({
176
+ id: 'Credit card must be {typeNames} or {finalName}',
177
+ values: getErrorMessage(cardRules)
178
+ }));
179
+ }
165
180
 
166
181
  useEffect(function () {
167
182
  if (value) {
168
183
  handleOnChange(value, [].concat(_toConsumableArray(cardConfig), defaultCheck), formChangeProps);
169
184
  }
170
- }, []);
185
+ }, [value]);
171
186
  return _jsx(_Input, _objectSpread(_objectSpread({}, omit(props, [].concat(_toConsumableArray(formMethods), ['cardConfig']))), {}, {
172
187
  suffix: cardIcon,
173
- // type="number"
174
188
  className: classnames(className, 'igloo-input', 'igloo-input-credit-card'),
175
189
  value: inputSeparate,
176
190
  onChange: function onChange(e) {
@@ -67,8 +67,12 @@ var IglooExpiryDate = function IglooExpiryDate(props) {
67
67
  var onChangeProps = props.onChange,
68
68
  setFieldError = props.setFieldError,
69
69
  _props$value = props.value,
70
- value = _props$value === void 0 ? {} : _props$value,
71
- disabled = props.disabled;
70
+ value = _props$value === void 0 ? {
71
+ year: undefined,
72
+ month: undefined
73
+ } : _props$value,
74
+ disabled = props.disabled,
75
+ check = props.check;
72
76
 
73
77
  var _useState = useState(false),
74
78
  _useState2 = _slicedToArray(_useState, 2),
@@ -80,11 +84,6 @@ var IglooExpiryDate = function IglooExpiryDate(props) {
80
84
  var secondInput = useRef(null);
81
85
  var formatDeleteSpace = dateFormater.replace(/\s+/g, '');
82
86
 
83
- var _useState3 = useState(false),
84
- _useState4 = _slicedToArray(_useState3, 2),
85
- everInputAll = _useState4[0],
86
- setEverInputAll = _useState4[1];
87
-
88
87
  var _dealFormat = dealFormat(formatDeleteSpace),
89
88
  _dealFormat2 = _slicedToArray(_dealFormat, 2),
90
89
  timeInputArr = _dealFormat2[0],
@@ -95,29 +94,34 @@ var IglooExpiryDate = function IglooExpiryDate(props) {
95
94
 
96
95
  var inputValueRef = useRef({});
97
96
 
98
- var _useState5 = useState({}),
99
- _useState6 = _slicedToArray(_useState5, 2),
100
- inputValue = _useState6[0],
101
- setInput = _useState6[1];
97
+ var _useState3 = useState({}),
98
+ _useState4 = _slicedToArray(_useState3, 2),
99
+ inputValue = _useState4[0],
100
+ setInput = _useState4[1];
102
101
 
103
102
  useEffect(function () {
104
103
  if (!value) return;
105
104
  setInput(value);
106
105
  inputValueRef.current = value;
107
- }, []);
106
+ }, [value.year, value.month]);
108
107
  useEffect(function () {
108
+ if (JSON.stringify(inputValue) === '{}') return;
109
109
  var _inputValueRef$curren = inputValueRef.current,
110
110
  year = _inputValueRef$curren.year,
111
- month = _inputValueRef$curren.month; // 不管值如何 统一交给rule校验
112
-
113
- var allGet = year && month ? year.length === 2 && month.length === 2 : false;
114
- if (!everInputAll && allGet) setEverInputAll(true);
115
-
116
- if (everInputAll) {
117
- onChangeProps && onChangeProps({
118
- year: year,
119
- month: month
120
- });
111
+ month = _inputValueRef$curren.month;
112
+ var value = {
113
+ year: year,
114
+ month: month
115
+ };
116
+ var userCheck = check ? check(value) : true;
117
+ var compCheck = year && month ? year.length === 2 && month.length === 2 && Number(month) <= 12 : false;
118
+
119
+ if (userCheck && compCheck) {
120
+ onChangeProps && onChangeProps(value);
121
+ } else {
122
+ setFieldError && setFieldError(formatMessage({
123
+ id: 'Please enter a valid date.'
124
+ }));
121
125
  }
122
126
  }, [inputValue]);
123
127
 
@@ -30,7 +30,7 @@ import { LocaleContext } from '../locale';
30
30
  import classnames from 'classnames';
31
31
  import moment from 'moment';
32
32
  import './style/index';
33
- var dateFormater = 'DD / MM / YYYY'; // momentjs format中能出现的合法字符
33
+ var dateFormat = 'DD / MM / YYYY'; // momentjs format中能出现的合法字符
34
34
 
35
35
  var momentLetterArr = ['A', 'a', 'd', 'D', 'H', 'h', 'm', 'M', 'Q', 's', 'w', 'X', 'Y', ' ']; // 对于每一个input的输入做一个简单的时间限制
36
36
 
@@ -72,7 +72,7 @@ var getTextWidth = function getTextWidth(str) {
72
72
  var IglooInputDate = function IglooInputDate(props) {
73
73
  // format除去空格
74
74
  var _props$format = props.format,
75
- format = _props$format === void 0 ? dateFormater : _props$format,
75
+ format = _props$format === void 0 ? dateFormat : _props$format,
76
76
  onChangeProps = props.onChange,
77
77
  setFieldError = props.setFieldError,
78
78
  disabled = props.disabled,
@@ -94,11 +94,6 @@ var IglooInputDate = function IglooInputDate(props) {
94
94
  inputValue = _useState4[0],
95
95
  setInput = _useState4[1];
96
96
 
97
- var _useState5 = useState(false),
98
- _useState6 = _slicedToArray(_useState5, 2),
99
- everInputAll = _useState6[0],
100
- setEverInputAll = _useState6[1];
101
-
102
97
  var formatDeleteSpace = format.replace(/\s+/g, '');
103
98
 
104
99
  var _dealFormat = dealFormat(formatDeleteSpace),
@@ -110,24 +105,23 @@ var IglooInputDate = function IglooInputDate(props) {
110
105
  formatMessage = _useContext.formatMessage;
111
106
 
112
107
  useEffect(function () {
113
- var _dealFormat3 = dealFormat(formatDeleteSpace),
114
- _dealFormat4 = _slicedToArray(_dealFormat3, 2),
115
- _ = _dealFormat4[0],
116
- delimiter = _dealFormat4[1];
117
-
118
108
  if (!value) return;
119
- var init = value.replace(/\s+/g, '').split(delimiter);
109
+ var init = value.split(delimiter);
120
110
  setInput(init);
121
111
  inputValueRef.current = init;
122
- }, []);
112
+ }, [value]);
123
113
  useEffect(function () {
124
- var currentInput = inputValueRef.current.join(delimiter); // 不管值如何 统一交给rule校验
125
-
126
- var allGet = currentInput.length === formatDeleteSpace.length;
127
- if (!everInputAll && allGet) setEverInputAll(true);
128
-
129
- if (everInputAll || allGet) {
130
- onChangeProps && onChangeProps(allGet ? moment(currentInput, formatDeleteSpace).format(format) : 'notValid');
114
+ if (!inputValue.length) return;
115
+ var currentInput = inputValueRef.current.join(delimiter);
116
+ var available = moment(currentInput.replace(/\s+/g, ''), formatDeleteSpace, true).isValid();
117
+ var value = moment(currentInput, formatDeleteSpace).format(format);
118
+
119
+ if (available) {
120
+ onChangeProps && onChangeProps(value);
121
+ } else {
122
+ setFieldError && setFieldError(formatMessage({
123
+ id: 'Please enter a valid date.'
124
+ }));
131
125
  }
132
126
  }, [inputValue]);
133
127
 
@@ -214,7 +208,7 @@ var IglooInputDate = function IglooInputDate(props) {
214
208
  className: "igloo-input-date-picker-input",
215
209
  placeholder: item,
216
210
  ref: ref,
217
- value: inputValue[index],
211
+ value: (inputValue[index] || '').replace(/\s+/g, ''),
218
212
  onBlur: function onBlur(e) {
219
213
  return autoZero(e.target.value, inputValueRef.current, index, item);
220
214
  },
@@ -239,7 +233,7 @@ var IglooInputDate = function IglooInputDate(props) {
239
233
  ref: ref,
240
234
  bordered: false,
241
235
  maxLength: item.length,
242
- value: inputValue[index],
236
+ value: (inputValue[index] || '').replace(/\s+/g, ''),
243
237
  onBlur: function onBlur(e) {
244
238
  return autoZero(e.target.value, inputValueRef.current, index, item);
245
239
  },
@@ -275,7 +269,7 @@ function checkTime(value, format) {
275
269
 
276
270
  IglooInputDate.formItemPropsHandler = function (config) {
277
271
  var _config$format = config.format,
278
- format = _config$format === void 0 ? dateFormater : _config$format;
272
+ format = _config$format === void 0 ? dateFormat : _config$format;
279
273
  return {
280
274
  rules: [{
281
275
  validator: function validator(_, value) {
@@ -14,7 +14,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
14
14
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
15
15
 
16
16
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
17
- import { useState, useContext } from 'react';
17
+ import { useState, useContext, useEffect } from 'react';
18
18
  import classnames from 'classnames';
19
19
  import invariant from 'invariant';
20
20
  import Select from '../select';
@@ -28,7 +28,6 @@ var PhoneNumber = function PhoneNumber(_ref) {
28
28
  disabled = _ref.disabled,
29
29
  value = _ref.value,
30
30
  formChangeProps = _ref.onChange,
31
- setFieldValue = _ref.setFieldValue,
32
31
  style = _ref.style;
33
32
 
34
33
  var _useContext = useContext(LocaleContext),
@@ -50,6 +49,9 @@ var PhoneNumber = function PhoneNumber(_ref) {
50
49
  number = _useState4[0],
51
50
  setNumber = _useState4[1];
52
51
 
52
+ useEffect(function () {
53
+ setNumber(value ? value.phoneNumber : undefined);
54
+ }, [value]);
53
55
  var leftPart = Array.isArray(areaCode) ? _jsx(Select, {
54
56
  disabled: disabled,
55
57
  onChange: function onChange(e) {
@@ -78,7 +80,7 @@ var PhoneNumber = function PhoneNumber(_ref) {
78
80
  }, className),
79
81
  children: [leftPart, _jsx(_Input, {
80
82
  type: "tel",
81
- defaultValue: number,
83
+ value: number,
82
84
  onChange: function onChange(e) {
83
85
  setNumber(e.target.value);
84
86
  formChangeProps(e.target.value ? {
@@ -15,11 +15,13 @@ import zh from './zh-CN';
15
15
  import id from './id-ID';
16
16
  import vi from './vi-VN';
17
17
  import th from './th-TH';
18
+ import zhTW from './zh-TW';
18
19
  import antdId from 'antd/es/locale/id_ID';
19
20
  import antdEn from 'antd/es/locale/en_US';
20
21
  import antdZh from 'antd/es/locale/zh_CN';
21
22
  import antdVi from 'antd/es/locale/vi_VN';
22
23
  import antdTH from 'antd/es/locale/th_TH';
24
+ import antdZhTw from 'antd/es/locale/zh_TW';
23
25
  import antdDefault from 'antd/es/locale/default';
24
26
  import { staticLang } from './format-message';
25
27
  export var locales = {
@@ -27,14 +29,16 @@ export var locales = {
27
29
  'id-ID': id,
28
30
  'zh-CN': zh,
29
31
  'vi-VN': vi,
30
- 'th-TH': th
32
+ 'th-TH': th,
33
+ 'zh-TW': zhTW
31
34
  };
32
35
  var antdLocale = {
33
36
  'en-US': _objectSpread(_objectSpread({}, antdDefault), antdEn),
34
37
  'id-ID': _objectSpread(_objectSpread({}, antdDefault), antdId),
35
38
  'zh-CN': _objectSpread(_objectSpread({}, antdDefault), antdZh),
36
39
  'vi-VN': _objectSpread(_objectSpread({}, antdDefault), antdVi),
37
- 'th-TH': _objectSpread(_objectSpread({}, antdDefault), antdTH)
40
+ 'th-TH': _objectSpread(_objectSpread({}, antdDefault), antdTH),
41
+ 'zh-TW': _objectSpread(_objectSpread({}, antdDefault), antdZhTw)
38
42
  };
39
43
 
40
44
  var LocaleProvider = function LocaleProvider(_ref) {
@@ -0,0 +1,76 @@
1
+ {
2
+ "1 file attached.": "1 file terlampir.",
3
+ "1 file imported.": "1 data terunggah",
4
+ "1 file in progress...": "1 data dalam proses",
5
+ "Accept": "Menerima",
6
+ "Action": "Beroperasi",
7
+ "Add": "Menambahkan",
8
+ "Apply": "Terapkan",
9
+ "Apply Columns": "Terapkan Kolom",
10
+ "Cancel": "Batal",
11
+ "Clear All": "Bersihkan semua",
12
+ "Click to cancel sorting": "Klik untuk membatalkan penyortiran",
13
+ "Click to sort ascending": "Klik untuk mengurutkan menaik",
14
+ "Click to sort descending": "Klik untuk mengurutkan secara turun",
15
+ "Close Result Panel": "Tutup Panel Hasil",
16
+ "Continue": "Lanjutkan",
17
+ "Credit card must be {typeNames} or {finalName}": "Jenis kartu kredit harus {typeNames} atau {finalName}",
18
+ "Custom": "Perubahan",
19
+ "Customize Columns": "Kolom yang diubah",
20
+ "Data Importing Queue": "Antrian Data Impor",
21
+ "Data Processed": "Data Terproses",
22
+ "Data Processing...": "Data Diproses",
23
+ "Date": "Tanggal",
24
+ "Drag and drop a file here": "Geser dan Letakkan Dokumen disini",
25
+ "Edit": "Ubah",
26
+ "Error Report": "Laporan Kesalahan",
27
+ "Filter": "Saring",
28
+ "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "Saya menyatakan bahwa pernyataan yang saya jelaskan di atas adalah benar. Selanjutnya saya nyatakan bahwa kerugian yang terjadi merupakan ketidaksengajaan, dan terjadi tanpa perencanaan atau hasil musyawarah dengan pihak lain.",
29
+ "Import": "Impor",
30
+ "It is recommended to select no more than {colMax} metrics to ensure the default visibility of each column input.": "Direkomendasikan untuk memilih tidak lebih dari {colMax} metrik untuk memastikan sudut pandang default dari setiap isi kolom.",
31
+ "Last 7 Days": "7 hari terakhir",
32
+ "Last Day": "hari terakhir",
33
+ "Last Month": "Bulan Lalu",
34
+ "Log in": "Masuk",
35
+ "Next": "Selanjutnya",
36
+ "No preview for this file. Only support image, video or PDF file.": "Tidak ada pratinjau untuk file ini. Hanya mendukung file gambar, video atau PDF.",
37
+ "Numbers only, please omit \" \" or \"-\".": "Angka saja, harap hilangkan \" \" atau \"-\".",
38
+ "OK": "oke",
39
+ "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "Jika Anda puas dengan apa yang telah disampaikan, dan Anda telah memeriksa deklarasi tersebut, silakan lanjutkan dan ajukan klaim Anda.",
40
+ "Optional": "Pilihan",
41
+ "Please enter a valid date.": "Silakan tulis tanggal valid",
42
+ "Please enter a valid time.": "Harap masukkan waktu yang valid",
43
+ "Please select": "Silahkan pilih",
44
+ "Please select a file type": "Silakan pilih tipe dokumen",
45
+ "Please take a moment to review what you’ve told us above.": "Mohon luangkan waktu sejenak untuk meninjau ulang seluruh data yang Anda telah sampaikan sebelumnya .",
46
+ "Previous": "Sebelumnya",
47
+ "Processing": "Sedang diproses",
48
+ "Processing progress cannot be updated at the moment. Don’t worry! All your file data are still in progress.": "Perkembangan terkait proses belum dapat diperbarui saat ini. Jangan khawatir! Semua data Anda masih dalam proses .",
49
+ "Quantity of files should be less than {limit}": "Jumlah dokumen tidak bisa lebih dari {limit}",
50
+ "Reject": "Menolak",
51
+ "Remove": "Menghapus",
52
+ "Resend OTP": "Kirim ulang OTP",
53
+ "Resend in": "Kirim ulang",
54
+ "Reset All Filters": "Setel ulang filter",
55
+ "Result": "Hasil",
56
+ "Result: Success {success_num}; Error {fail_num}": "Hasil: Sukses {success_num}; Kesalahan {fail_num}",
57
+ "Rows per page": "Baris per halaman",
58
+ "Select All": "Pilih Semua",
59
+ "Send OTP": "Kirim OTP",
60
+ "Submit": "Ajukan",
61
+ "The file type is not supported.": "Jenis file tidak didukung.",
62
+ "This Month": "Bulan ini",
63
+ "Unselect All": "Batalkan semua",
64
+ "Uploading": "Mengunggah",
65
+ "We support CSV or XLSX files (less than 20M each).": "Kami mendukung file CSV atau XLSX (Ukuran maksimal 20 MB) .",
66
+ "Yes, Close": "Ya, Tutup",
67
+ "browse": "Telusuri",
68
+ "or": "atau",
69
+ "{beginIndex}-{endIndex} of {total}": "{beginIndex}-{endIndex} dari {total}",
70
+ "{canInputNum} characters left": "{canInputNum} sisa karakter",
71
+ "{canInputNum} characters over": "{canInputNum} kelebihan karakter",
72
+ "{count} files attached.": "{count} file terlampir.",
73
+ "{currentStep} of {allSteps}": "{currentStep} dari {allSteps}",
74
+ "{doneNumber} files imported.": "{doneNumber} data terunggah.",
75
+ "{processingNumber} files in progress...": "{processingNumber} data dalam proses..."
76
+ }
@@ -0,0 +1,2 @@
1
+ declare const messages: any;
2
+ export default messages;
@@ -0,0 +1,3 @@
1
+ var messages = require('./zh-TW/messages.json');
2
+
3
+ export default messages;
@@ -79,6 +79,7 @@
79
79
  transition: 0s !important;
80
80
  border-radius: 0px !important;
81
81
  border: 1px solid #eeeeee !important;
82
+ font-weight: 500;
82
83
  &:hover {
83
84
  color: @primary-color;
84
85
  }
@@ -86,7 +87,6 @@
86
87
  .ant-tabs-tab-active {
87
88
  border: 0px !important;
88
89
  background-color: white !important;
89
- font-weight: 500;
90
90
  &::after {
91
91
  position: absolute;
92
92
  width: 100%;
package/es/types.d.ts CHANGED
@@ -54,6 +54,7 @@ export interface FormItemExtraConfig extends FormItemProps {
54
54
  phoneNumber?: number | string;
55
55
  mergeRules?: boolean;
56
56
  dependencies?: NamePath[];
57
+ antdDependencies?: NamePath[];
57
58
  asserts?: FormItemAssert[];
58
59
  shouldRender?: (form?: FormInstance) => boolean;
59
60
  ignore?: boolean;
@@ -45,6 +45,7 @@ export declare const calcFormItemProps: (config: FormItemConfig, extraProps: For
45
45
  messageVariables: {
46
46
  label: string;
47
47
  };
48
+ dependencies: NamePath[] | undefined;
48
49
  };
49
50
  elementProps: {
50
51
  [key: string]: any;
@@ -1,4 +1,4 @@
1
- var _excluded = ["type", "name", "required", "requiredAsserts", "showOptional", "rules", "initialValue", "normalize", "mergeRules", "getValueFromEvent", "getValueProps", "extra", "help", "label", "previewLabel", "extraLabel", "copyValue", "selectValue", "span", "halfRow", "fullRow", "valuePropName", "dependencies", "asserts", "messageVariables", "requiredMessage", "previewFormater", "disabled", "ignore", "shouldRender", "valueFormater"],
1
+ var _excluded = ["type", "name", "required", "requiredAsserts", "showOptional", "rules", "initialValue", "normalize", "mergeRules", "getValueFromEvent", "getValueProps", "extra", "help", "label", "previewLabel", "extraLabel", "copyValue", "selectValue", "span", "halfRow", "fullRow", "valuePropName", "dependencies", "asserts", "messageVariables", "requiredMessage", "previewFormater", "disabled", "ignore", "shouldRender", "valueFormater", "antdDependencies"],
2
2
  _excluded2 = ["initialValue", "normalize", "rules", "extra", "help", "getValueFromEvent", "span", "valuePropName", "fullRow", "halfRow", "messageVariables", "requiredMessage", "previewFormater", "valueFormater", "required", "requiredMark", "className"];
3
3
 
4
4
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
@@ -150,6 +150,7 @@ export var calcFormItemProps = function calcFormItemProps(config, extraProps, fo
150
150
  ignore = config.ignore,
151
151
  shouldRender = config.shouldRender,
152
152
  valueFormater = config.valueFormater,
153
+ antdDependencies = config.antdDependencies,
153
154
  rest = _objectWithoutProperties(config, _excluded);
154
155
 
155
156
  invariant(nameProp || type === 'Divider' || type === 'Section' || !type, "name property is required for form item config (type: ".concat(type, ")"));
@@ -257,7 +258,8 @@ export var calcFormItemProps = function calcFormItemProps(config, extraProps, fo
257
258
  valuePropName: valuePropName || extraValuePropName,
258
259
  messageVariables: _objectSpread({
259
260
  label: label
260
- }, messageVariables || extraMessageVariables)
261
+ }, messageVariables || extraMessageVariables),
262
+ dependencies: antdDependencies
261
263
  },
262
264
  elementProps: elementProps,
263
265
  display: !ignore && calcShouldRender(dependencies, asserts, shouldRender, form),
@@ -86,6 +86,9 @@ var Excample = function Excample(_ref) {
86
86
  }, {
87
87
  label: 'zh-CN',
88
88
  value: 'zh-CN'
89
+ }, {
90
+ label: 'zh-TW',
91
+ value: 'zh-TW'
89
92
  }];
90
93
 
91
94
  var _children$props = children.props,
@@ -103,6 +103,7 @@ var IglooCredit = function IglooCredit(props) {
103
103
  _props$cardConfig = props.cardConfig,
104
104
  cardConfig = _props$cardConfig === void 0 ? [] : _props$cardConfig,
105
105
  formChangeProps = props.onChange,
106
+ setFieldError = props.setFieldError,
106
107
  value = props.value;
107
108
 
108
109
  var _useState = (0, _react.useState)(''),
@@ -162,30 +163,43 @@ var IglooCredit = function IglooCredit(props) {
162
163
  function handleOnChange(value, cardRules, formOnChange) {
163
164
  var pureNumInput = value.replace(/[^0-9]/gi, '');
164
165
 
165
- if (pureNumInput.length === formValue.length && !isNaN(Number(value.substr(value.length - 1, 1)))) {
166
+ if (pureNumInput.length === formValue.length && value[value.length - 1] === '') {
166
167
  // 删除了空格,得删除一个数字
167
168
  pureNumInput = pureNumInput.substring(0, pureNumInput.length - 1);
168
169
  }
169
170
 
170
171
  setFormValue(pureNumInput);
171
- formOnChange && formOnChange(pureNumInput); // 未必是16位
172
- // if (pureNumInput.length === 17) {
173
- // return
174
- // }
175
-
176
172
  judgeCardType(pureNumInput, cardRules);
177
- setSeparateValue(separatePureNum(pureNumInput));
178
- } // 处理初始化
173
+ setSeparateValue(separatePureNum(pureNumInput)); // 空值校验
174
+
175
+ if (!pureNumInput) {
176
+ formOnChange && formOnChange(pureNumInput);
177
+ return;
178
+ }
179
+
180
+ for (var i = 0; i < cardRules.length; i++) {
181
+ var reg = cardRules[i].reg;
182
+ var regObj = new RegExp(reg);
179
183
 
184
+ if (regObj.test(pureNumInput)) {
185
+ formOnChange && formOnChange(pureNumInput);
186
+ return;
187
+ }
188
+ }
189
+
190
+ setFieldError && setFieldError(formatMessage({
191
+ id: 'Credit card must be {typeNames} or {finalName}',
192
+ values: getErrorMessage(cardRules)
193
+ }));
194
+ }
180
195
 
181
196
  (0, _react.useEffect)(function () {
182
197
  if (value) {
183
198
  handleOnChange(value, [].concat(_toConsumableArray(cardConfig), defaultCheck), formChangeProps);
184
199
  }
185
- }, []);
200
+ }, [value]);
186
201
  return (0, _jsxRuntime.jsx)(_input.default, _objectSpread(_objectSpread({}, (0, _omit.default)(props, [].concat(_toConsumableArray(_formMethods.default), ['cardConfig']))), {}, {
187
202
  suffix: cardIcon,
188
- // type="number"
189
203
  className: (0, _classnames.default)(className, 'igloo-input', 'igloo-input-credit-card'),
190
204
  value: inputSeparate,
191
205
  onChange: function onChange(e) {
@@ -83,8 +83,12 @@ var IglooExpiryDate = function IglooExpiryDate(props) {
83
83
  var onChangeProps = props.onChange,
84
84
  setFieldError = props.setFieldError,
85
85
  _props$value = props.value,
86
- value = _props$value === void 0 ? {} : _props$value,
87
- disabled = props.disabled;
86
+ value = _props$value === void 0 ? {
87
+ year: undefined,
88
+ month: undefined
89
+ } : _props$value,
90
+ disabled = props.disabled,
91
+ check = props.check;
88
92
 
89
93
  var _useState = (0, _react.useState)(false),
90
94
  _useState2 = _slicedToArray(_useState, 2),
@@ -96,11 +100,6 @@ var IglooExpiryDate = function IglooExpiryDate(props) {
96
100
  var secondInput = (0, _react.useRef)(null);
97
101
  var formatDeleteSpace = dateFormater.replace(/\s+/g, '');
98
102
 
99
- var _useState3 = (0, _react.useState)(false),
100
- _useState4 = _slicedToArray(_useState3, 2),
101
- everInputAll = _useState4[0],
102
- setEverInputAll = _useState4[1];
103
-
104
103
  var _dealFormat = dealFormat(formatDeleteSpace),
105
104
  _dealFormat2 = _slicedToArray(_dealFormat, 2),
106
105
  timeInputArr = _dealFormat2[0],
@@ -111,29 +110,34 @@ var IglooExpiryDate = function IglooExpiryDate(props) {
111
110
 
112
111
  var inputValueRef = (0, _react.useRef)({});
113
112
 
114
- var _useState5 = (0, _react.useState)({}),
115
- _useState6 = _slicedToArray(_useState5, 2),
116
- inputValue = _useState6[0],
117
- setInput = _useState6[1];
113
+ var _useState3 = (0, _react.useState)({}),
114
+ _useState4 = _slicedToArray(_useState3, 2),
115
+ inputValue = _useState4[0],
116
+ setInput = _useState4[1];
118
117
 
119
118
  (0, _react.useEffect)(function () {
120
119
  if (!value) return;
121
120
  setInput(value);
122
121
  inputValueRef.current = value;
123
- }, []);
122
+ }, [value.year, value.month]);
124
123
  (0, _react.useEffect)(function () {
124
+ if (JSON.stringify(inputValue) === '{}') return;
125
125
  var _inputValueRef$curren = inputValueRef.current,
126
126
  year = _inputValueRef$curren.year,
127
- month = _inputValueRef$curren.month; // 不管值如何 统一交给rule校验
128
-
129
- var allGet = year && month ? year.length === 2 && month.length === 2 : false;
130
- if (!everInputAll && allGet) setEverInputAll(true);
131
-
132
- if (everInputAll) {
133
- onChangeProps && onChangeProps({
134
- year: year,
135
- month: month
136
- });
127
+ month = _inputValueRef$curren.month;
128
+ var value = {
129
+ year: year,
130
+ month: month
131
+ };
132
+ var userCheck = check ? check(value) : true;
133
+ var compCheck = year && month ? year.length === 2 && month.length === 2 && Number(month) <= 12 : false;
134
+
135
+ if (userCheck && compCheck) {
136
+ onChangeProps && onChangeProps(value);
137
+ } else {
138
+ setFieldError && setFieldError(formatMessage({
139
+ id: 'Please enter a valid date.'
140
+ }));
137
141
  }
138
142
  }, [inputValue]);
139
143
 
@@ -47,7 +47,7 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
47
47
 
48
48
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
49
49
 
50
- var dateFormater = 'DD / MM / YYYY'; // momentjs format中能出现的合法字符
50
+ var dateFormat = 'DD / MM / YYYY'; // momentjs format中能出现的合法字符
51
51
 
52
52
  var momentLetterArr = ['A', 'a', 'd', 'D', 'H', 'h', 'm', 'M', 'Q', 's', 'w', 'X', 'Y', ' ']; // 对于每一个input的输入做一个简单的时间限制
53
53
 
@@ -89,7 +89,7 @@ var getTextWidth = function getTextWidth(str) {
89
89
  var IglooInputDate = function IglooInputDate(props) {
90
90
  // format除去空格
91
91
  var _props$format = props.format,
92
- format = _props$format === void 0 ? dateFormater : _props$format,
92
+ format = _props$format === void 0 ? dateFormat : _props$format,
93
93
  onChangeProps = props.onChange,
94
94
  setFieldError = props.setFieldError,
95
95
  disabled = props.disabled,
@@ -111,11 +111,6 @@ var IglooInputDate = function IglooInputDate(props) {
111
111
  inputValue = _useState4[0],
112
112
  setInput = _useState4[1];
113
113
 
114
- var _useState5 = (0, _react.useState)(false),
115
- _useState6 = _slicedToArray(_useState5, 2),
116
- everInputAll = _useState6[0],
117
- setEverInputAll = _useState6[1];
118
-
119
114
  var formatDeleteSpace = format.replace(/\s+/g, '');
120
115
 
121
116
  var _dealFormat = dealFormat(formatDeleteSpace),
@@ -127,24 +122,23 @@ var IglooInputDate = function IglooInputDate(props) {
127
122
  formatMessage = _useContext.formatMessage;
128
123
 
129
124
  (0, _react.useEffect)(function () {
130
- var _dealFormat3 = dealFormat(formatDeleteSpace),
131
- _dealFormat4 = _slicedToArray(_dealFormat3, 2),
132
- _ = _dealFormat4[0],
133
- delimiter = _dealFormat4[1];
134
-
135
125
  if (!value) return;
136
- var init = value.replace(/\s+/g, '').split(delimiter);
126
+ var init = value.split(delimiter);
137
127
  setInput(init);
138
128
  inputValueRef.current = init;
139
- }, []);
129
+ }, [value]);
140
130
  (0, _react.useEffect)(function () {
141
- var currentInput = inputValueRef.current.join(delimiter); // 不管值如何 统一交给rule校验
142
-
143
- var allGet = currentInput.length === formatDeleteSpace.length;
144
- if (!everInputAll && allGet) setEverInputAll(true);
145
-
146
- if (everInputAll || allGet) {
147
- onChangeProps && onChangeProps(allGet ? (0, _moment.default)(currentInput, formatDeleteSpace).format(format) : 'notValid');
131
+ if (!inputValue.length) return;
132
+ var currentInput = inputValueRef.current.join(delimiter);
133
+ var available = (0, _moment.default)(currentInput.replace(/\s+/g, ''), formatDeleteSpace, true).isValid();
134
+ var value = (0, _moment.default)(currentInput, formatDeleteSpace).format(format);
135
+
136
+ if (available) {
137
+ onChangeProps && onChangeProps(value);
138
+ } else {
139
+ setFieldError && setFieldError(formatMessage({
140
+ id: 'Please enter a valid date.'
141
+ }));
148
142
  }
149
143
  }, [inputValue]);
150
144
 
@@ -231,7 +225,7 @@ var IglooInputDate = function IglooInputDate(props) {
231
225
  className: "igloo-input-date-picker-input",
232
226
  placeholder: item,
233
227
  ref: ref,
234
- value: inputValue[index],
228
+ value: (inputValue[index] || '').replace(/\s+/g, ''),
235
229
  onBlur: function onBlur(e) {
236
230
  return autoZero(e.target.value, inputValueRef.current, index, item);
237
231
  },
@@ -256,7 +250,7 @@ var IglooInputDate = function IglooInputDate(props) {
256
250
  ref: ref,
257
251
  bordered: false,
258
252
  maxLength: item.length,
259
- value: inputValue[index],
253
+ value: (inputValue[index] || '').replace(/\s+/g, ''),
260
254
  onBlur: function onBlur(e) {
261
255
  return autoZero(e.target.value, inputValueRef.current, index, item);
262
256
  },
@@ -292,7 +286,7 @@ function checkTime(value, format) {
292
286
 
293
287
  IglooInputDate.formItemPropsHandler = function (config) {
294
288
  var _config$format = config.format,
295
- format = _config$format === void 0 ? dateFormater : _config$format;
289
+ format = _config$format === void 0 ? dateFormat : _config$format;
296
290
  return {
297
291
  rules: [{
298
292
  validator: function validator(_, value) {
@@ -44,7 +44,6 @@ var PhoneNumber = function PhoneNumber(_ref) {
44
44
  disabled = _ref.disabled,
45
45
  value = _ref.value,
46
46
  formChangeProps = _ref.onChange,
47
- setFieldValue = _ref.setFieldValue,
48
47
  style = _ref.style;
49
48
 
50
49
  var _useContext = (0, _react.useContext)(_locale.LocaleContext),
@@ -66,6 +65,9 @@ var PhoneNumber = function PhoneNumber(_ref) {
66
65
  number = _useState4[0],
67
66
  setNumber = _useState4[1];
68
67
 
68
+ (0, _react.useEffect)(function () {
69
+ setNumber(value ? value.phoneNumber : undefined);
70
+ }, [value]);
69
71
  var leftPart = Array.isArray(areaCode) ? (0, _jsxRuntime.jsx)(_select.default, {
70
72
  disabled: disabled,
71
73
  onChange: function onChange(e) {
@@ -94,7 +96,7 @@ var PhoneNumber = function PhoneNumber(_ref) {
94
96
  }, className),
95
97
  children: [leftPart, (0, _jsxRuntime.jsx)(_input.default, {
96
98
  type: "tel",
97
- defaultValue: number,
99
+ value: number,
98
100
  onChange: function onChange(e) {
99
101
  setNumber(e.target.value);
100
102
  formChangeProps(e.target.value ? {
@@ -25,6 +25,8 @@ var _viVN = _interopRequireDefault(require("./vi-VN"));
25
25
 
26
26
  var _thTH = _interopRequireDefault(require("./th-TH"));
27
27
 
28
+ var _zhTW = _interopRequireDefault(require("./zh-TW"));
29
+
28
30
  var _id_ID = _interopRequireDefault(require("antd/es/locale/id_ID"));
29
31
 
30
32
  var _en_US = _interopRequireDefault(require("antd/es/locale/en_US"));
@@ -35,6 +37,8 @@ var _vi_VN = _interopRequireDefault(require("antd/es/locale/vi_VN"));
35
37
 
36
38
  var _th_TH = _interopRequireDefault(require("antd/es/locale/th_TH"));
37
39
 
40
+ var _zh_TW = _interopRequireDefault(require("antd/es/locale/zh_TW"));
41
+
38
42
  var _default2 = _interopRequireDefault(require("antd/es/locale/default"));
39
43
 
40
44
  var _formatMessage = require("./format-message");
@@ -52,7 +56,8 @@ var locales = {
52
56
  'id-ID': _idID.default,
53
57
  'zh-CN': _zhCN.default,
54
58
  'vi-VN': _viVN.default,
55
- 'th-TH': _thTH.default
59
+ 'th-TH': _thTH.default,
60
+ 'zh-TW': _zhTW.default
56
61
  };
57
62
  exports.locales = locales;
58
63
  var antdLocale = {
@@ -60,7 +65,8 @@ var antdLocale = {
60
65
  'id-ID': _objectSpread(_objectSpread({}, _default2.default), _id_ID.default),
61
66
  'zh-CN': _objectSpread(_objectSpread({}, _default2.default), _zh_CN.default),
62
67
  'vi-VN': _objectSpread(_objectSpread({}, _default2.default), _vi_VN.default),
63
- 'th-TH': _objectSpread(_objectSpread({}, _default2.default), _th_TH.default)
68
+ 'th-TH': _objectSpread(_objectSpread({}, _default2.default), _th_TH.default),
69
+ 'zh-TW': _objectSpread(_objectSpread({}, _default2.default), _zh_TW.default)
64
70
  };
65
71
 
66
72
  var LocaleProvider = function LocaleProvider(_ref) {
@@ -0,0 +1,76 @@
1
+ {
2
+ "1 file attached.": "1 file terlampir.",
3
+ "1 file imported.": "1 data terunggah",
4
+ "1 file in progress...": "1 data dalam proses",
5
+ "Accept": "Menerima",
6
+ "Action": "Beroperasi",
7
+ "Add": "Menambahkan",
8
+ "Apply": "Terapkan",
9
+ "Apply Columns": "Terapkan Kolom",
10
+ "Cancel": "Batal",
11
+ "Clear All": "Bersihkan semua",
12
+ "Click to cancel sorting": "Klik untuk membatalkan penyortiran",
13
+ "Click to sort ascending": "Klik untuk mengurutkan menaik",
14
+ "Click to sort descending": "Klik untuk mengurutkan secara turun",
15
+ "Close Result Panel": "Tutup Panel Hasil",
16
+ "Continue": "Lanjutkan",
17
+ "Credit card must be {typeNames} or {finalName}": "Jenis kartu kredit harus {typeNames} atau {finalName}",
18
+ "Custom": "Perubahan",
19
+ "Customize Columns": "Kolom yang diubah",
20
+ "Data Importing Queue": "Antrian Data Impor",
21
+ "Data Processed": "Data Terproses",
22
+ "Data Processing...": "Data Diproses",
23
+ "Date": "Tanggal",
24
+ "Drag and drop a file here": "Geser dan Letakkan Dokumen disini",
25
+ "Edit": "Ubah",
26
+ "Error Report": "Laporan Kesalahan",
27
+ "Filter": "Saring",
28
+ "I declare that the statements I have described above are true. I further declare that the loss occured was accidental, without planning or consensus with other parties.": "Saya menyatakan bahwa pernyataan yang saya jelaskan di atas adalah benar. Selanjutnya saya nyatakan bahwa kerugian yang terjadi merupakan ketidaksengajaan, dan terjadi tanpa perencanaan atau hasil musyawarah dengan pihak lain.",
29
+ "Import": "Impor",
30
+ "It is recommended to select no more than {colMax} metrics to ensure the default visibility of each column input.": "Direkomendasikan untuk memilih tidak lebih dari {colMax} metrik untuk memastikan sudut pandang default dari setiap isi kolom.",
31
+ "Last 7 Days": "7 hari terakhir",
32
+ "Last Day": "hari terakhir",
33
+ "Last Month": "Bulan Lalu",
34
+ "Log in": "Masuk",
35
+ "Next": "Selanjutnya",
36
+ "No preview for this file. Only support image, video or PDF file.": "Tidak ada pratinjau untuk file ini. Hanya mendukung file gambar, video atau PDF.",
37
+ "Numbers only, please omit \" \" or \"-\".": "Angka saja, harap hilangkan \" \" atau \"-\".",
38
+ "OK": "oke",
39
+ "Once you’re happy with the above, and you’ve checked the declaration, please go ahead and submit your claim.": "Jika Anda puas dengan apa yang telah disampaikan, dan Anda telah memeriksa deklarasi tersebut, silakan lanjutkan dan ajukan klaim Anda.",
40
+ "Optional": "Pilihan",
41
+ "Please enter a valid date.": "Silakan tulis tanggal valid",
42
+ "Please enter a valid time.": "Harap masukkan waktu yang valid",
43
+ "Please select": "Silahkan pilih",
44
+ "Please select a file type": "Silakan pilih tipe dokumen",
45
+ "Please take a moment to review what you’ve told us above.": "Mohon luangkan waktu sejenak untuk meninjau ulang seluruh data yang Anda telah sampaikan sebelumnya .",
46
+ "Previous": "Sebelumnya",
47
+ "Processing": "Sedang diproses",
48
+ "Processing progress cannot be updated at the moment. Don’t worry! All your file data are still in progress.": "Perkembangan terkait proses belum dapat diperbarui saat ini. Jangan khawatir! Semua data Anda masih dalam proses .",
49
+ "Quantity of files should be less than {limit}": "Jumlah dokumen tidak bisa lebih dari {limit}",
50
+ "Reject": "Menolak",
51
+ "Remove": "Menghapus",
52
+ "Resend OTP": "Kirim ulang OTP",
53
+ "Resend in": "Kirim ulang",
54
+ "Reset All Filters": "Setel ulang filter",
55
+ "Result": "Hasil",
56
+ "Result: Success {success_num}; Error {fail_num}": "Hasil: Sukses {success_num}; Kesalahan {fail_num}",
57
+ "Rows per page": "Baris per halaman",
58
+ "Select All": "Pilih Semua",
59
+ "Send OTP": "Kirim OTP",
60
+ "Submit": "Ajukan",
61
+ "The file type is not supported.": "Jenis file tidak didukung.",
62
+ "This Month": "Bulan ini",
63
+ "Unselect All": "Batalkan semua",
64
+ "Uploading": "Mengunggah",
65
+ "We support CSV or XLSX files (less than 20M each).": "Kami mendukung file CSV atau XLSX (Ukuran maksimal 20 MB) .",
66
+ "Yes, Close": "Ya, Tutup",
67
+ "browse": "Telusuri",
68
+ "or": "atau",
69
+ "{beginIndex}-{endIndex} of {total}": "{beginIndex}-{endIndex} dari {total}",
70
+ "{canInputNum} characters left": "{canInputNum} sisa karakter",
71
+ "{canInputNum} characters over": "{canInputNum} kelebihan karakter",
72
+ "{count} files attached.": "{count} file terlampir.",
73
+ "{currentStep} of {allSteps}": "{currentStep} dari {allSteps}",
74
+ "{doneNumber} files imported.": "{doneNumber} data terunggah.",
75
+ "{processingNumber} files in progress...": "{processingNumber} data dalam proses..."
76
+ }
@@ -0,0 +1,2 @@
1
+ declare const messages: any;
2
+ export default messages;
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var messages = require('./zh-TW/messages.json');
9
+
10
+ var _default = messages;
11
+ exports.default = _default;
@@ -79,6 +79,7 @@
79
79
  transition: 0s !important;
80
80
  border-radius: 0px !important;
81
81
  border: 1px solid #eeeeee !important;
82
+ font-weight: 500;
82
83
  &:hover {
83
84
  color: @primary-color;
84
85
  }
@@ -86,7 +87,6 @@
86
87
  .ant-tabs-tab-active {
87
88
  border: 0px !important;
88
89
  background-color: white !important;
89
- font-weight: 500;
90
90
  &::after {
91
91
  position: absolute;
92
92
  width: 100%;
package/lib/types.d.ts CHANGED
@@ -54,6 +54,7 @@ export interface FormItemExtraConfig extends FormItemProps {
54
54
  phoneNumber?: number | string;
55
55
  mergeRules?: boolean;
56
56
  dependencies?: NamePath[];
57
+ antdDependencies?: NamePath[];
57
58
  asserts?: FormItemAssert[];
58
59
  shouldRender?: (form?: FormInstance) => boolean;
59
60
  ignore?: boolean;
@@ -45,6 +45,7 @@ export declare const calcFormItemProps: (config: FormItemConfig, extraProps: For
45
45
  messageVariables: {
46
46
  label: string;
47
47
  };
48
+ dependencies: NamePath[] | undefined;
48
49
  };
49
50
  elementProps: {
50
51
  [key: string]: any;
@@ -13,7 +13,7 @@ var _typography = _interopRequireDefault(require("../typography"));
13
13
 
14
14
  var _formattedMessage = _interopRequireDefault(require("../locale/formatted-message"));
15
15
 
16
- var _excluded = ["type", "name", "required", "requiredAsserts", "showOptional", "rules", "initialValue", "normalize", "mergeRules", "getValueFromEvent", "getValueProps", "extra", "help", "label", "previewLabel", "extraLabel", "copyValue", "selectValue", "span", "halfRow", "fullRow", "valuePropName", "dependencies", "asserts", "messageVariables", "requiredMessage", "previewFormater", "disabled", "ignore", "shouldRender", "valueFormater"],
16
+ var _excluded = ["type", "name", "required", "requiredAsserts", "showOptional", "rules", "initialValue", "normalize", "mergeRules", "getValueFromEvent", "getValueProps", "extra", "help", "label", "previewLabel", "extraLabel", "copyValue", "selectValue", "span", "halfRow", "fullRow", "valuePropName", "dependencies", "asserts", "messageVariables", "requiredMessage", "previewFormater", "disabled", "ignore", "shouldRender", "valueFormater", "antdDependencies"],
17
17
  _excluded2 = ["initialValue", "normalize", "rules", "extra", "help", "getValueFromEvent", "span", "valuePropName", "fullRow", "halfRow", "messageVariables", "requiredMessage", "previewFormater", "valueFormater", "required", "requiredMark", "className"];
18
18
 
19
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -168,6 +168,7 @@ var calcFormItemProps = function calcFormItemProps(config, extraProps, form, par
168
168
  ignore = config.ignore,
169
169
  shouldRender = config.shouldRender,
170
170
  valueFormater = config.valueFormater,
171
+ antdDependencies = config.antdDependencies,
171
172
  rest = _objectWithoutProperties(config, _excluded);
172
173
 
173
174
  (0, _invariant.default)(nameProp || type === 'Divider' || type === 'Section' || !type, "name property is required for form item config (type: ".concat(type, ")"));
@@ -275,7 +276,8 @@ var calcFormItemProps = function calcFormItemProps(config, extraProps, form, par
275
276
  valuePropName: valuePropName || extraValuePropName,
276
277
  messageVariables: _objectSpread({
277
278
  label: label
278
- }, messageVariables || extraMessageVariables)
279
+ }, messageVariables || extraMessageVariables),
280
+ dependencies: antdDependencies
279
281
  },
280
282
  elementProps: elementProps,
281
283
  display: !ignore && calcShouldRender(dependencies, asserts, shouldRender, form),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "iglooform",
3
- "version": "2.4.12",
3
+ "version": "2.4.16",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "build-dev": "dumi build",