@itcase/forms 1.0.48 → 1.0.50
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.
- package/dist/css/form/Field/Input/Input.css +10 -0
- package/dist/css/form/Form/Form.css +0 -1
- package/dist/css/form/Form/css/form-notification/form-notification.css +0 -1
- package/dist/css/form/FormField/FormField.css +7 -0
- package/dist/itcase-forms.cjs.js +160 -120
- package/dist/itcase-forms.esm.js +160 -120
- package/package.json +13 -12
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -114,30 +114,33 @@ function FieldWrapperBase(props) {
|
|
|
114
114
|
beforeItem,
|
|
115
115
|
children,
|
|
116
116
|
className,
|
|
117
|
+
dataTour,
|
|
117
118
|
desc,
|
|
118
|
-
descTextSize,
|
|
119
119
|
descTextColor,
|
|
120
|
+
descTextSize,
|
|
120
121
|
descTextWidth,
|
|
121
|
-
divider,
|
|
122
122
|
dividerDirection,
|
|
123
123
|
dividerFill,
|
|
124
124
|
dividerSize,
|
|
125
125
|
dividerWidth,
|
|
126
|
+
errorMessageTextColor,
|
|
127
|
+
errorMessageTextSize,
|
|
128
|
+
errorMessageTextWeight,
|
|
126
129
|
fieldClassName,
|
|
127
130
|
id,
|
|
128
131
|
inputName,
|
|
129
132
|
inputValue,
|
|
133
|
+
isDisabled,
|
|
134
|
+
isHidden,
|
|
130
135
|
isRequired,
|
|
131
136
|
label,
|
|
132
|
-
|
|
137
|
+
labelHidden,
|
|
133
138
|
labelTextColor,
|
|
139
|
+
labelTextSize,
|
|
134
140
|
labelTextWidth,
|
|
135
|
-
errorMessageTextSize,
|
|
136
|
-
errorMessageTextWeight,
|
|
137
|
-
errorMessageTextColor,
|
|
138
141
|
message,
|
|
139
|
-
messageTextSize,
|
|
140
142
|
messageTextColor,
|
|
143
|
+
messageTextSize,
|
|
141
144
|
messageTextWeight,
|
|
142
145
|
metaActive,
|
|
143
146
|
metaError,
|
|
@@ -147,13 +150,11 @@ function FieldWrapperBase(props) {
|
|
|
147
150
|
metaTouched,
|
|
148
151
|
metaValid,
|
|
149
152
|
set,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
isHidden,
|
|
153
|
+
showDivider,
|
|
154
|
+
showErrorsOnSubmit,
|
|
155
|
+
showMessage,
|
|
154
156
|
tag: Tag,
|
|
155
|
-
|
|
156
|
-
showErrorsOnSubmit
|
|
157
|
+
type
|
|
157
158
|
} = props;
|
|
158
159
|
const error = metaError || !metaModifiedSinceLastSubmit && metaSubmitError || false;
|
|
159
160
|
const showError = useMemo(() => {
|
|
@@ -168,8 +169,8 @@ function FieldWrapperBase(props) {
|
|
|
168
169
|
const isModifiedAfterSubmit = !metaError && metaSubmitError && metaModifiedSinceLastSubmit;
|
|
169
170
|
return hasValue && (metaValid || isModifiedAfterSubmit);
|
|
170
171
|
}, [inputValue, metaValid, metaError, metaSubmitError, metaModifiedSinceLastSubmit]);
|
|
171
|
-
const formFieldClass = useMemo(() => clsx(className, showError && 'form__item_state_error', showValid && 'form__item_state_success', isRequired && 'form__item_state_required', metaActive && 'form__item_state_focus', inputValue && 'form__item_state_filled'), [className, showError, showValid, isRequired, metaActive, inputValue]);
|
|
172
|
-
const fieldClass = useMemo(() => clsx(fieldClassName, showError && `${fieldClassName}_state_error`, showValid && `${fieldClassName}_state_success`, metaActive && `${fieldClassName}_state_focus`, inputValue && `${fieldClassName}_state_filled`), [fieldClassName, showError, showValid, metaActive, inputValue]);
|
|
172
|
+
const formFieldClass = useMemo(() => clsx(className, showError && 'form__item_state_error', showValid && 'form__item_state_success', isRequired && 'form__item_state_required', isDisabled && 'form__item_state_disabled', metaActive && 'form__item_state_focus', inputValue && 'form__item_state_filled'), [className, showError, showValid, isRequired, metaActive, inputValue, isDisabled]);
|
|
173
|
+
const fieldClass = useMemo(() => clsx(fieldClassName, showError && `${fieldClassName}_state_error`, showValid && `${fieldClassName}_state_success`, metaActive && `${fieldClassName}_state_focus`, inputValue && `${fieldClassName}_state_filled`, isDisabled && `${fieldClassName}_state_disabled`), [fieldClassName, showError, showValid, metaActive, inputValue, isDisabled]);
|
|
173
174
|
const sizeClass = useDeviceTargetClass(props, {
|
|
174
175
|
prefix: 'form-field_size_',
|
|
175
176
|
propsKey: 'size'
|
|
@@ -202,7 +203,7 @@ function FieldWrapperBase(props) {
|
|
|
202
203
|
styles: formFieldStyles
|
|
203
204
|
} = useStyles(props);
|
|
204
205
|
return /*#__PURE__*/React.createElement(Tag, {
|
|
205
|
-
className: clsx(formFieldClass, 'form__item', 'form-field', type && `form-field_type_${type}`, set && `form-field_set_${set}`, sizeClass, fillClass, shapeClass, isHidden && `form-field_state_hidden`, directionClass, widthClass),
|
|
206
|
+
className: clsx(formFieldClass, 'form__item', 'form-field', type && `form-field_type_${type}`, set && `form-field_set_${set}`, sizeClass, fillClass, shapeClass, isDisabled && `form-field_state_disabled`, isHidden && `form-field_state_hidden`, directionClass, widthClass),
|
|
206
207
|
"data-tour": dataTour,
|
|
207
208
|
style: formFieldStyles
|
|
208
209
|
}, before, (label || labelHidden) && /*#__PURE__*/React.createElement("div", {
|
|
@@ -222,13 +223,13 @@ function FieldWrapperBase(props) {
|
|
|
222
223
|
className: clsx('form-field__content', inputFillClass, inputShapeClass)
|
|
223
224
|
}, /*#__PURE__*/React.createElement("div", {
|
|
224
225
|
className: clsx('form-field__content-inner', fieldClass)
|
|
225
|
-
}, beforeItem, children, afterItem),
|
|
226
|
+
}, beforeItem, children, afterItem), showDivider && /*#__PURE__*/React.createElement(Divider, {
|
|
226
227
|
className: "form-field__item-divider",
|
|
227
228
|
width: dividerWidth,
|
|
228
229
|
direction: dividerDirection,
|
|
229
230
|
size: dividerSize,
|
|
230
231
|
fill: dividerFill
|
|
231
|
-
})),
|
|
232
|
+
})), showMessage && /*#__PURE__*/React.createElement("div", {
|
|
232
233
|
className: "form-field__message"
|
|
233
234
|
}, Boolean(showError) && error && typeof error === 'string' && /*#__PURE__*/React.createElement(Text, {
|
|
234
235
|
className: "form-field__message-item form-field__message-item_type-error",
|
|
@@ -247,10 +248,10 @@ function FieldWrapperBase(props) {
|
|
|
247
248
|
}, '\u00A0')), after);
|
|
248
249
|
}
|
|
249
250
|
FieldWrapperBase.defaultProps = {
|
|
250
|
-
|
|
251
|
-
type: 'normal',
|
|
251
|
+
errorMessageTextColor: 'errorTextSecondary',
|
|
252
252
|
errorMessageTextSize: 's',
|
|
253
|
-
|
|
253
|
+
tag: 'div',
|
|
254
|
+
type: 'normal'
|
|
254
255
|
};
|
|
255
256
|
FieldWrapperBase.propTypes = {
|
|
256
257
|
after: PropTypes.any,
|
|
@@ -260,14 +261,19 @@ FieldWrapperBase.propTypes = {
|
|
|
260
261
|
beforeItem: PropTypes.any,
|
|
261
262
|
children: PropTypes.any,
|
|
262
263
|
className: PropTypes.string,
|
|
264
|
+
dataTour: PropTypes.string,
|
|
263
265
|
desc: PropTypes.string,
|
|
264
|
-
descTextSize: PropTypes.string,
|
|
265
266
|
descTextColor: PropTypes.string,
|
|
267
|
+
descTextSize: PropTypes.string,
|
|
266
268
|
descTextWidth: PropTypes.string,
|
|
267
269
|
dividerDirection: PropTypes.string,
|
|
268
270
|
dividerFill: PropTypes.string,
|
|
269
271
|
dividerSize: PropTypes.string,
|
|
270
272
|
dividerWidth: PropTypes.string,
|
|
273
|
+
errorMessageTextColor: PropTypes.string,
|
|
274
|
+
errorMessageTextSize: PropTypes.string,
|
|
275
|
+
errorMessageTextWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
276
|
+
errorMessageTextWidth: PropTypes.string,
|
|
271
277
|
fieldClassName: PropTypes.string,
|
|
272
278
|
id: PropTypes.string,
|
|
273
279
|
inputName: PropTypes.string,
|
|
@@ -275,18 +281,20 @@ FieldWrapperBase.propTypes = {
|
|
|
275
281
|
inputOnChange: PropTypes.func,
|
|
276
282
|
inputOnFocus: PropTypes.func,
|
|
277
283
|
inputValue: PropTypes.any,
|
|
284
|
+
isDisabled: PropTypes.bool,
|
|
285
|
+
isHidden: PropTypes.bool,
|
|
278
286
|
isRequired: PropTypes.bool,
|
|
279
287
|
itemType: PropTypes.string,
|
|
280
288
|
label: PropTypes.any,
|
|
281
|
-
|
|
289
|
+
labelHidden: PropTypes.string,
|
|
282
290
|
labelTextColor: PropTypes.string,
|
|
291
|
+
labelTextSize: PropTypes.string,
|
|
283
292
|
labelTextWidth: PropTypes.string,
|
|
284
|
-
errorMessageTextSize: PropTypes.string,
|
|
285
|
-
errorMessageTextWidth: PropTypes.string,
|
|
286
|
-
errorMessageTextColor: PropTypes.string,
|
|
287
293
|
message: PropTypes.string,
|
|
288
294
|
messageSize: PropTypes.string,
|
|
289
295
|
messageTextColor: PropTypes.string,
|
|
296
|
+
messageTextSize: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
297
|
+
messageTextWeight: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
290
298
|
messageTextWidth: PropTypes.string,
|
|
291
299
|
metaActive: PropTypes.bool,
|
|
292
300
|
metaError: PropTypes.string,
|
|
@@ -296,7 +304,10 @@ FieldWrapperBase.propTypes = {
|
|
|
296
304
|
metaTouched: PropTypes.bool,
|
|
297
305
|
metaValid: PropTypes.bool,
|
|
298
306
|
set: PropTypes.string,
|
|
307
|
+
showDivider: PropTypes.bool,
|
|
299
308
|
showErrorsOnSubmit: PropTypes.bool,
|
|
309
|
+
showMessage: PropTypes.bool,
|
|
310
|
+
tag: PropTypes.oneOfType([PropTypes.elementType, PropTypes.string]),
|
|
300
311
|
type: PropTypes.string
|
|
301
312
|
};
|
|
302
313
|
function FieldWrapper(props) {
|
|
@@ -314,39 +325,18 @@ function FieldWrapper(props) {
|
|
|
314
325
|
}, []);
|
|
315
326
|
return /*#__PURE__*/React.createElement(FieldWrapperBase, props);
|
|
316
327
|
}
|
|
317
|
-
FieldWrapper.propTypes =
|
|
318
|
-
autoComplete: PropTypes.string,
|
|
319
|
-
children: PropTypes.any,
|
|
320
|
-
className: PropTypes.string,
|
|
321
|
-
fieldClassName: PropTypes.string,
|
|
322
|
-
hint: PropTypes.string,
|
|
323
|
-
inputName: PropTypes.string,
|
|
324
|
-
inputOnBlur: PropTypes.func,
|
|
325
|
-
inputOnChange: PropTypes.func,
|
|
326
|
-
inputOnFocus: PropTypes.func,
|
|
327
|
-
inputValue: PropTypes.any,
|
|
328
|
-
isRequired: PropTypes.bool,
|
|
329
|
-
itemType: PropTypes.string,
|
|
330
|
-
label: PropTypes.any,
|
|
331
|
-
metaActive: PropTypes.bool,
|
|
332
|
-
metaError: PropTypes.string,
|
|
333
|
-
metaModifiedSinceLastSubmit: PropTypes.bool,
|
|
334
|
-
metaSubmitError: PropTypes.string,
|
|
335
|
-
metaSubmitFailed: PropTypes.bool,
|
|
336
|
-
metaTouched: PropTypes.bool,
|
|
337
|
-
metaValid: PropTypes.bool,
|
|
338
|
-
showErrorsOnSubmit: PropTypes.bool
|
|
339
|
-
};
|
|
328
|
+
FieldWrapper.propTypes = FieldWrapperBase.propTypes;
|
|
340
329
|
|
|
341
330
|
const CheckboxField = /*#__PURE__*/React.memo(function CheckboxField(props) {
|
|
342
331
|
const {
|
|
343
|
-
|
|
344
|
-
isRequired,
|
|
345
|
-
onChange,
|
|
332
|
+
classNameGroupItem,
|
|
346
333
|
fieldProps,
|
|
347
334
|
inputProps,
|
|
348
|
-
|
|
349
|
-
|
|
335
|
+
isDisabled,
|
|
336
|
+
isRequired,
|
|
337
|
+
name,
|
|
338
|
+
showMessage,
|
|
339
|
+
onChange
|
|
350
340
|
} = props;
|
|
351
341
|
return /*#__PURE__*/React.createElement(Field, {
|
|
352
342
|
name: name,
|
|
@@ -367,6 +357,7 @@ const CheckboxField = /*#__PURE__*/React.memo(function CheckboxField(props) {
|
|
|
367
357
|
inputName: input.name,
|
|
368
358
|
inputValue: input.checked,
|
|
369
359
|
isRequired: isRequired,
|
|
360
|
+
isDisabled: isDisabled,
|
|
370
361
|
metaActive: meta.active,
|
|
371
362
|
metaError: meta.error,
|
|
372
363
|
metaModifiedSinceLastSubmit: meta.modifiedSinceLastSubmit,
|
|
@@ -375,11 +366,12 @@ const CheckboxField = /*#__PURE__*/React.memo(function CheckboxField(props) {
|
|
|
375
366
|
metaTouched: meta.touched,
|
|
376
367
|
metaValid: meta.valid,
|
|
377
368
|
tag: "label",
|
|
378
|
-
|
|
369
|
+
showMessage: showMessage
|
|
379
370
|
}, fieldProps), /*#__PURE__*/React.createElement(Checkbox, Object.assign({
|
|
380
371
|
autoComplete: "nope",
|
|
381
372
|
checked: input.checked,
|
|
382
373
|
name: input.name,
|
|
374
|
+
isDisabled: isDisabled,
|
|
383
375
|
type: "checkbox",
|
|
384
376
|
onBlur: input.onBlur,
|
|
385
377
|
onChange: onChangeField,
|
|
@@ -388,14 +380,17 @@ const CheckboxField = /*#__PURE__*/React.memo(function CheckboxField(props) {
|
|
|
388
380
|
});
|
|
389
381
|
});
|
|
390
382
|
CheckboxField.defaultProps = {
|
|
391
|
-
|
|
392
|
-
|
|
383
|
+
fieldProps: {},
|
|
384
|
+
inputProps: {}
|
|
393
385
|
};
|
|
394
386
|
CheckboxField.propTypes = {
|
|
387
|
+
classNameGroupItem: PropTypes.string,
|
|
395
388
|
fieldProps: PropTypes.object,
|
|
396
389
|
inputProps: PropTypes.object,
|
|
390
|
+
isDisabled: PropTypes.bool,
|
|
397
391
|
isRequired: PropTypes.bool,
|
|
398
392
|
name: PropTypes.string,
|
|
393
|
+
showMessage: PropTypes.bool,
|
|
399
394
|
onChange: PropTypes.func
|
|
400
395
|
};
|
|
401
396
|
|
|
@@ -403,7 +398,7 @@ const ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
403
398
|
const {
|
|
404
399
|
classNameGroupItem,
|
|
405
400
|
fieldProps,
|
|
406
|
-
|
|
401
|
+
showMessage,
|
|
407
402
|
initialValue,
|
|
408
403
|
inputProps,
|
|
409
404
|
isMultiple,
|
|
@@ -449,6 +444,7 @@ const ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
449
444
|
inputName: input.name,
|
|
450
445
|
inputValue: input.value || [],
|
|
451
446
|
isRequired: isRequired,
|
|
447
|
+
isDisabled: isDisabled,
|
|
452
448
|
label: label,
|
|
453
449
|
messageType: messageType,
|
|
454
450
|
metaActive: meta.active,
|
|
@@ -458,7 +454,7 @@ const ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
458
454
|
metaSubmitFailed: meta.submitFailed,
|
|
459
455
|
metaTouched: meta.touched,
|
|
460
456
|
metaValid: meta.valid,
|
|
461
|
-
|
|
457
|
+
showMessage: showMessage
|
|
462
458
|
}, fieldProps), /*#__PURE__*/React.createElement(Choice, Object.assign({
|
|
463
459
|
className: clsx(meta.active && 'form-choice_state_focus', meta.error && meta.touched && 'form-choice_state_error'),
|
|
464
460
|
options: options,
|
|
@@ -476,7 +472,7 @@ const ChoiceField = /*#__PURE__*/React.memo(function ChoiceField(props) {
|
|
|
476
472
|
ChoiceField.propTypes = {
|
|
477
473
|
classNameGroupItem: PropTypes.string,
|
|
478
474
|
fieldProps: PropTypes.object,
|
|
479
|
-
|
|
475
|
+
showMessage: PropTypes.bool,
|
|
480
476
|
initialValue: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.bool]),
|
|
481
477
|
inputProps: PropTypes.object,
|
|
482
478
|
isMultiple: PropTypes.bool,
|
|
@@ -492,11 +488,12 @@ ChoiceField.propTypes = {
|
|
|
492
488
|
const CustomField = /*#__PURE__*/React.memo(function CustomField(props) {
|
|
493
489
|
const {
|
|
494
490
|
Component,
|
|
491
|
+
isDisabled,
|
|
495
492
|
isRequired,
|
|
496
493
|
name,
|
|
497
494
|
fieldProps,
|
|
498
495
|
classNameGroupItem,
|
|
499
|
-
|
|
496
|
+
showMessage
|
|
500
497
|
} = props;
|
|
501
498
|
return /*#__PURE__*/React.createElement(Field, {
|
|
502
499
|
name: name
|
|
@@ -506,6 +503,7 @@ const CustomField = /*#__PURE__*/React.memo(function CustomField(props) {
|
|
|
506
503
|
}) => /*#__PURE__*/React.createElement(FieldWrapper, Object.assign({
|
|
507
504
|
className: clsx('form-field_type_custom', 'form__item_type_custom', classNameGroupItem),
|
|
508
505
|
fieldClassName: 'form-custom',
|
|
506
|
+
isDisabled: isDisabled,
|
|
509
507
|
inputName: input.name,
|
|
510
508
|
inputValue: input.value,
|
|
511
509
|
isRequired: isRequired,
|
|
@@ -516,8 +514,9 @@ const CustomField = /*#__PURE__*/React.memo(function CustomField(props) {
|
|
|
516
514
|
metaSubmitFailed: meta.submitFailed,
|
|
517
515
|
metaTouched: meta.touched,
|
|
518
516
|
metaValid: meta.valid,
|
|
519
|
-
|
|
517
|
+
showMessage: showMessage
|
|
520
518
|
}, fieldProps), /*#__PURE__*/React.createElement(Component, Object.assign({}, props, {
|
|
519
|
+
isDisabled: isDisabled,
|
|
521
520
|
input: input,
|
|
522
521
|
meta: meta
|
|
523
522
|
}))));
|
|
@@ -527,20 +526,25 @@ CustomField.defaultProps = {
|
|
|
527
526
|
fieldProps: {}
|
|
528
527
|
};
|
|
529
528
|
CustomField.propTypes = {
|
|
530
|
-
|
|
531
|
-
|
|
529
|
+
Component: PropTypes.element,
|
|
530
|
+
classNameGroupItem: PropTypes.string,
|
|
532
531
|
fieldProps: PropTypes.object,
|
|
533
|
-
inputProps: PropTypes.object
|
|
532
|
+
inputProps: PropTypes.object,
|
|
533
|
+
isDisabled: PropTypes.bool,
|
|
534
|
+
isRequired: PropTypes.bool,
|
|
535
|
+
name: PropTypes.string.isRequired,
|
|
536
|
+
showMessage: PropTypes.bool
|
|
534
537
|
};
|
|
535
538
|
|
|
536
539
|
const CodeField = /*#__PURE__*/React.memo(function CodeField(props) {
|
|
537
540
|
const {
|
|
538
541
|
isRequired,
|
|
542
|
+
isDisabled,
|
|
539
543
|
name,
|
|
540
544
|
fieldProps,
|
|
541
545
|
inputProps,
|
|
542
546
|
classNameGroupItem,
|
|
543
|
-
|
|
547
|
+
showMessage
|
|
544
548
|
} = props;
|
|
545
549
|
return /*#__PURE__*/React.createElement(Field, {
|
|
546
550
|
name: name
|
|
@@ -553,6 +557,7 @@ const CodeField = /*#__PURE__*/React.memo(function CodeField(props) {
|
|
|
553
557
|
inputName: input.name,
|
|
554
558
|
inputValue: input.value,
|
|
555
559
|
isRequired: isRequired,
|
|
560
|
+
isDisabled: isDisabled,
|
|
556
561
|
metaActive: meta.active,
|
|
557
562
|
metaError: meta.error,
|
|
558
563
|
metaModifiedSinceLastSubmit: meta.modifiedSinceLastSubmit,
|
|
@@ -560,10 +565,11 @@ const CodeField = /*#__PURE__*/React.memo(function CodeField(props) {
|
|
|
560
565
|
metaSubmitFailed: meta.submitFailed,
|
|
561
566
|
metaTouched: meta.touched,
|
|
562
567
|
metaValid: meta.valid,
|
|
563
|
-
|
|
568
|
+
showMessage: showMessage
|
|
564
569
|
}, fieldProps), /*#__PURE__*/React.createElement(Code, Object.assign({
|
|
565
570
|
autoComplete: "nope",
|
|
566
571
|
name: input.name,
|
|
572
|
+
isDisabled: isDisabled,
|
|
567
573
|
value: input.value,
|
|
568
574
|
onBlur: input.onBlur,
|
|
569
575
|
onChange: input.onChange,
|
|
@@ -575,10 +581,13 @@ CodeField.defaultProps = {
|
|
|
575
581
|
fieldProps: {}
|
|
576
582
|
};
|
|
577
583
|
CodeField.propTypes = {
|
|
578
|
-
|
|
579
|
-
isRequired: PropTypes.bool,
|
|
584
|
+
classNameGroupItem: PropTypes.string,
|
|
580
585
|
fieldProps: PropTypes.object,
|
|
581
|
-
inputProps: PropTypes.object
|
|
586
|
+
inputProps: PropTypes.object,
|
|
587
|
+
isDisabled: PropTypes.bool,
|
|
588
|
+
isRequired: PropTypes.bool,
|
|
589
|
+
name: PropTypes.string.isRequired,
|
|
590
|
+
showMessage: PropTypes.bool
|
|
582
591
|
};
|
|
583
592
|
|
|
584
593
|
function DatePickerField(props) {
|
|
@@ -593,10 +602,11 @@ function DatePickerField(props) {
|
|
|
593
602
|
iconBorderHover,
|
|
594
603
|
iconFill,
|
|
595
604
|
iconFillHover,
|
|
605
|
+
isDisabled,
|
|
596
606
|
iconRevealableShow,
|
|
597
607
|
iconRevealableHide,
|
|
598
608
|
iconShape,
|
|
599
|
-
|
|
609
|
+
showMessage,
|
|
600
610
|
onChange,
|
|
601
611
|
classNameGroupItem
|
|
602
612
|
} = props;
|
|
@@ -618,6 +628,7 @@ function DatePickerField(props) {
|
|
|
618
628
|
inputName: input.name,
|
|
619
629
|
inputValue: input.value || '',
|
|
620
630
|
isRequired: isRequired,
|
|
631
|
+
isDisabled: isDisabled,
|
|
621
632
|
metaActive: meta.active,
|
|
622
633
|
metaError: meta.error,
|
|
623
634
|
metaModifiedSinceLastSubmit: meta.modifiedSinceLastSubmit,
|
|
@@ -625,11 +636,12 @@ function DatePickerField(props) {
|
|
|
625
636
|
metaSubmitFailed: meta.submitFailed,
|
|
626
637
|
metaTouched: meta.touched,
|
|
627
638
|
metaValid: meta.valid,
|
|
628
|
-
|
|
639
|
+
showMessage: showMessage
|
|
629
640
|
}, fieldProps), /*#__PURE__*/React.createElement(DatePickerInput, {
|
|
630
641
|
name: input.name,
|
|
631
642
|
value: input.value || '',
|
|
632
643
|
onBlur: input.onBlur,
|
|
644
|
+
isDisabled: isDisabled,
|
|
633
645
|
onChange: onChangeField,
|
|
634
646
|
onFocus: input.onFocus,
|
|
635
647
|
inputProps: inputProps,
|
|
@@ -762,7 +774,7 @@ const FileInputDropzone = /*#__PURE__*/React.memo(function FileInputDropzone(pro
|
|
|
762
774
|
removeThumbText,
|
|
763
775
|
hintTitle,
|
|
764
776
|
hintDescription,
|
|
765
|
-
|
|
777
|
+
showFilename,
|
|
766
778
|
isPreviews,
|
|
767
779
|
loadingText,
|
|
768
780
|
dropzoneProps = {},
|
|
@@ -952,7 +964,7 @@ const FileInputDropzone = /*#__PURE__*/React.memo(function FileInputDropzone(pro
|
|
|
952
964
|
textColor: thumbNameTextColor,
|
|
953
965
|
textWrap: thumbNameTextWrap,
|
|
954
966
|
textWeight: thumbNameTextWeight
|
|
955
|
-
}, fileErrorText || file.error)),
|
|
967
|
+
}, fileErrorText || file.error)), showFilename && /*#__PURE__*/React.createElement("div", {
|
|
956
968
|
className: "form-dropzone__thumb-name"
|
|
957
969
|
}, /*#__PURE__*/React.createElement(Text, {
|
|
958
970
|
size: thumbNameTextSize,
|
|
@@ -1021,7 +1033,7 @@ FileInputDropzone.propTypes = {
|
|
|
1021
1033
|
inputName: PropTypes.string,
|
|
1022
1034
|
inputValue: PropTypes.any,
|
|
1023
1035
|
isPreviews: PropTypes.bool,
|
|
1024
|
-
|
|
1036
|
+
showFilename: PropTypes.bool,
|
|
1025
1037
|
loadingText: PropTypes.string,
|
|
1026
1038
|
metaError: PropTypes.string,
|
|
1027
1039
|
metaTouched: PropTypes.bool,
|
|
@@ -1070,10 +1082,10 @@ const FileInput = /*#__PURE__*/React.memo(function FileInput(props) {
|
|
|
1070
1082
|
hintDescriptionTextColor,
|
|
1071
1083
|
hintDescriptionTextWrap,
|
|
1072
1084
|
hintDescriptionTextWeight,
|
|
1073
|
-
|
|
1085
|
+
showMessage,
|
|
1074
1086
|
thumbDirection,
|
|
1075
1087
|
hintDescription,
|
|
1076
|
-
|
|
1088
|
+
showFilename,
|
|
1077
1089
|
fileErrorText,
|
|
1078
1090
|
dropzoneProps,
|
|
1079
1091
|
maxFiles,
|
|
@@ -1106,7 +1118,7 @@ const FileInput = /*#__PURE__*/React.memo(function FileInput(props) {
|
|
|
1106
1118
|
metaSubmitFailed: meta.submitFailed,
|
|
1107
1119
|
metaTouched: meta.touched,
|
|
1108
1120
|
metaValid: meta.valid,
|
|
1109
|
-
|
|
1121
|
+
showMessage: showMessage,
|
|
1110
1122
|
width: width
|
|
1111
1123
|
}, fieldProps), /*#__PURE__*/React.createElement(FileInputDropzone, {
|
|
1112
1124
|
dropzoneProps: dropzoneProps,
|
|
@@ -1152,7 +1164,7 @@ const FileInput = /*#__PURE__*/React.memo(function FileInput(props) {
|
|
|
1152
1164
|
errorMessageTextColor: errorMessageTextColor,
|
|
1153
1165
|
isPreviews: isPreviews,
|
|
1154
1166
|
shape: shape,
|
|
1155
|
-
|
|
1167
|
+
showFilename: showFilename,
|
|
1156
1168
|
metaError: meta.error,
|
|
1157
1169
|
metaTouched: meta.touched,
|
|
1158
1170
|
removeThumbText: removeThumbText,
|
|
@@ -1178,7 +1190,7 @@ FileInput.propTypes = {
|
|
|
1178
1190
|
inputClass: PropTypes.string,
|
|
1179
1191
|
isPreviews: PropTypes.bool,
|
|
1180
1192
|
isRequired: PropTypes.bool,
|
|
1181
|
-
|
|
1193
|
+
showFilename: PropTypes.bool,
|
|
1182
1194
|
label: PropTypes.any,
|
|
1183
1195
|
removeThumbText: PropTypes.string,
|
|
1184
1196
|
onAddFiles: PropTypes.func,
|
|
@@ -1203,7 +1215,7 @@ const Group = /*#__PURE__*/React.memo(function Group(props) {
|
|
|
1203
1215
|
messageTextColor,
|
|
1204
1216
|
children,
|
|
1205
1217
|
dataTour,
|
|
1206
|
-
|
|
1218
|
+
showGroupMessage,
|
|
1207
1219
|
name,
|
|
1208
1220
|
showErrorsOnSubmit
|
|
1209
1221
|
} = props;
|
|
@@ -1234,7 +1246,7 @@ const Group = /*#__PURE__*/React.memo(function Group(props) {
|
|
|
1234
1246
|
textWeight: labelTextWeight
|
|
1235
1247
|
}, label)), /*#__PURE__*/React.createElement("div", {
|
|
1236
1248
|
className: "form__group-items"
|
|
1237
|
-
}, children), after),
|
|
1249
|
+
}, children), after), showGroupMessage && /*#__PURE__*/React.createElement(React.Fragment, null, Boolean(showError) && /*#__PURE__*/React.createElement(Text, {
|
|
1238
1250
|
className: "form__group-message form__group-message_type-error",
|
|
1239
1251
|
size: errorMessageTextSize,
|
|
1240
1252
|
textWeight: errorMessageTextWeight,
|
|
@@ -1285,7 +1297,7 @@ const InputField = /*#__PURE__*/React.memo(function InputField(props) {
|
|
|
1285
1297
|
iconRevealableShow,
|
|
1286
1298
|
iconRevealableHide,
|
|
1287
1299
|
iconShape,
|
|
1288
|
-
|
|
1300
|
+
showMessage,
|
|
1289
1301
|
onChange,
|
|
1290
1302
|
classNameGroupItem
|
|
1291
1303
|
} = props;
|
|
@@ -1320,6 +1332,7 @@ const InputField = /*#__PURE__*/React.memo(function InputField(props) {
|
|
|
1320
1332
|
inputName: input.name,
|
|
1321
1333
|
inputValue: input.value || '',
|
|
1322
1334
|
isRequired: isRequired,
|
|
1335
|
+
isDisabled: isDisabled,
|
|
1323
1336
|
metaActive: meta.active,
|
|
1324
1337
|
metaError: meta.error,
|
|
1325
1338
|
metaModifiedSinceLastSubmit: meta.modifiedSinceLastSubmit,
|
|
@@ -1327,7 +1340,7 @@ const InputField = /*#__PURE__*/React.memo(function InputField(props) {
|
|
|
1327
1340
|
metaSubmitFailed: meta.submitFailed,
|
|
1328
1341
|
metaTouched: meta.touched,
|
|
1329
1342
|
metaValid: meta.valid,
|
|
1330
|
-
|
|
1343
|
+
showMessage: showMessage
|
|
1331
1344
|
}, fieldProps), /*#__PURE__*/React.createElement(Input, Object.assign({
|
|
1332
1345
|
className: clsx(meta.active && 'input_state_focus', meta.error && meta.touched && 'input_state_error'),
|
|
1333
1346
|
autoComplete: "nope",
|
|
@@ -1505,14 +1518,15 @@ RadioGroupList.propTypes = {
|
|
|
1505
1518
|
|
|
1506
1519
|
const RadioGroup = /*#__PURE__*/React.memo(function RadioGroup(props) {
|
|
1507
1520
|
const {
|
|
1521
|
+
editableProps,
|
|
1522
|
+
fieldProps,
|
|
1523
|
+
inputProps,
|
|
1524
|
+
isDisabled,
|
|
1508
1525
|
isRequired,
|
|
1509
1526
|
name,
|
|
1510
1527
|
options,
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
inputProps,
|
|
1514
|
-
onChange,
|
|
1515
|
-
hideMessage
|
|
1528
|
+
showMessage,
|
|
1529
|
+
onChange
|
|
1516
1530
|
} = props;
|
|
1517
1531
|
return /*#__PURE__*/React.createElement(Field, {
|
|
1518
1532
|
name: name
|
|
@@ -1525,6 +1539,7 @@ const RadioGroup = /*#__PURE__*/React.memo(function RadioGroup(props) {
|
|
|
1525
1539
|
inputName: input.name,
|
|
1526
1540
|
inputValue: input.value || '',
|
|
1527
1541
|
isRequired: isRequired,
|
|
1542
|
+
isDisabled: isDisabled,
|
|
1528
1543
|
metaActive: meta.active,
|
|
1529
1544
|
metaError: meta.error,
|
|
1530
1545
|
metaModifiedSinceLastSubmit: meta.modifiedSinceLastSubmit,
|
|
@@ -1532,32 +1547,34 @@ const RadioGroup = /*#__PURE__*/React.memo(function RadioGroup(props) {
|
|
|
1532
1547
|
metaSubmitFailed: meta.submitFailed,
|
|
1533
1548
|
metaTouched: meta.touched,
|
|
1534
1549
|
metaValid: meta.valid,
|
|
1535
|
-
|
|
1550
|
+
showMessage: showMessage
|
|
1536
1551
|
}, fieldProps), /*#__PURE__*/React.createElement(RadioGroupList, {
|
|
1537
1552
|
input: input,
|
|
1538
1553
|
options: options,
|
|
1554
|
+
isDisabled: isDisabled,
|
|
1539
1555
|
onChange: onChange,
|
|
1540
1556
|
editableProps: editableProps,
|
|
1541
1557
|
inputProps: inputProps
|
|
1542
1558
|
})));
|
|
1543
1559
|
});
|
|
1544
1560
|
RadioGroup.defaultProps = {
|
|
1545
|
-
fieldProps: {},
|
|
1546
1561
|
editableProps: {},
|
|
1562
|
+
fieldProps: {},
|
|
1547
1563
|
inputProps: {},
|
|
1548
1564
|
options: []
|
|
1549
1565
|
};
|
|
1550
1566
|
RadioGroup.propTypes = {
|
|
1551
|
-
|
|
1567
|
+
editableProps: PropTypes.object,
|
|
1552
1568
|
fieldProps: PropTypes.object,
|
|
1553
1569
|
inputProps: PropTypes.object,
|
|
1554
|
-
|
|
1570
|
+
isDisabled: PropTypes.bool,
|
|
1555
1571
|
isRequired: PropTypes.bool,
|
|
1572
|
+
name: PropTypes.string.isRequired,
|
|
1556
1573
|
options: PropTypes.array,
|
|
1574
|
+
showMessage: PropTypes.bool,
|
|
1557
1575
|
onChange: PropTypes.func
|
|
1558
1576
|
};
|
|
1559
1577
|
|
|
1560
|
-
// const SegmentedField = React.memo(
|
|
1561
1578
|
function SegmentedField(props) {
|
|
1562
1579
|
const {
|
|
1563
1580
|
options,
|
|
@@ -1565,7 +1582,8 @@ function SegmentedField(props) {
|
|
|
1565
1582
|
name,
|
|
1566
1583
|
fieldProps,
|
|
1567
1584
|
inputProps,
|
|
1568
|
-
|
|
1585
|
+
isDisabled,
|
|
1586
|
+
showMessage
|
|
1569
1587
|
} = props;
|
|
1570
1588
|
const {
|
|
1571
1589
|
change
|
|
@@ -1596,6 +1614,7 @@ function SegmentedField(props) {
|
|
|
1596
1614
|
inputName: input.name,
|
|
1597
1615
|
inputValue: input.value || [],
|
|
1598
1616
|
isRequired: isRequired,
|
|
1617
|
+
isDisabled: isDisabled,
|
|
1599
1618
|
metaActive: meta.active,
|
|
1600
1619
|
metaError: meta.error,
|
|
1601
1620
|
metaModifiedSinceLastSubmit: meta.modifiedSinceLastSubmit,
|
|
@@ -1603,26 +1622,27 @@ function SegmentedField(props) {
|
|
|
1603
1622
|
metaSubmitFailed: meta.submitFailed,
|
|
1604
1623
|
metaTouched: meta.touched,
|
|
1605
1624
|
metaValid: meta.valid,
|
|
1606
|
-
|
|
1625
|
+
showMessage: showMessage
|
|
1607
1626
|
}, fieldProps), /*#__PURE__*/React.createElement(Segmented, Object.assign({
|
|
1608
1627
|
segments: options,
|
|
1628
|
+
isDisabled: isDisabled,
|
|
1609
1629
|
setActiveSegment: setActiveSegment,
|
|
1610
1630
|
activeSegment: activeOption
|
|
1611
1631
|
}, inputProps)));
|
|
1612
1632
|
});
|
|
1613
1633
|
}
|
|
1614
|
-
// )
|
|
1615
|
-
|
|
1616
1634
|
SegmentedField.propTypes = {
|
|
1617
|
-
options: PropTypes.array.isRequired,
|
|
1618
|
-
name: PropTypes.string.isRequired,
|
|
1619
1635
|
className: PropTypes.string,
|
|
1636
|
+
fieldProps: PropTypes.object,
|
|
1620
1637
|
inputClass: PropTypes.string,
|
|
1638
|
+
inputProps: PropTypes.object,
|
|
1639
|
+
isDisabled: PropTypes.bool,
|
|
1621
1640
|
isRequired: PropTypes.bool,
|
|
1622
1641
|
label: PropTypes.string,
|
|
1642
|
+
name: PropTypes.string.isRequired,
|
|
1643
|
+
options: PropTypes.array.isRequired,
|
|
1623
1644
|
placeholder: PropTypes.string,
|
|
1624
|
-
|
|
1625
|
-
inputProps: PropTypes.object
|
|
1645
|
+
showMessage: PropTypes.bool
|
|
1626
1646
|
};
|
|
1627
1647
|
|
|
1628
1648
|
function getDefaultValue(options, selectValue) {
|
|
@@ -1647,12 +1667,13 @@ const SelectField = /*#__PURE__*/React.memo(function SelectField(props) {
|
|
|
1647
1667
|
const {
|
|
1648
1668
|
classNameGroupItem,
|
|
1649
1669
|
fieldProps,
|
|
1650
|
-
|
|
1670
|
+
isDisabled,
|
|
1651
1671
|
isRequired,
|
|
1652
1672
|
name,
|
|
1653
1673
|
options,
|
|
1654
1674
|
selectProps,
|
|
1655
1675
|
selectRef,
|
|
1676
|
+
showMessage,
|
|
1656
1677
|
onChange
|
|
1657
1678
|
} = props;
|
|
1658
1679
|
return /*#__PURE__*/React.createElement(Field, {
|
|
@@ -1690,6 +1711,7 @@ const SelectField = /*#__PURE__*/React.memo(function SelectField(props) {
|
|
|
1690
1711
|
inputName: input.name,
|
|
1691
1712
|
inputValue: input.value,
|
|
1692
1713
|
isRequired: isRequired,
|
|
1714
|
+
isDisabled: isDisabled,
|
|
1693
1715
|
metaActive: meta.active,
|
|
1694
1716
|
metaError: meta.error,
|
|
1695
1717
|
metaModifiedSinceLastSubmit: meta.modifiedSinceLastSubmit,
|
|
@@ -1697,36 +1719,43 @@ const SelectField = /*#__PURE__*/React.memo(function SelectField(props) {
|
|
|
1697
1719
|
metaSubmitFailed: meta.submitFailed,
|
|
1698
1720
|
metaTouched: meta.touched,
|
|
1699
1721
|
metaValid: meta.valid,
|
|
1700
|
-
|
|
1722
|
+
showMessage: showMessage
|
|
1701
1723
|
}, fieldProps), /*#__PURE__*/React.createElement(Select, Object.assign({
|
|
1702
1724
|
className: "form-select-item",
|
|
1703
1725
|
instanceId: `id_${input.name}`,
|
|
1704
1726
|
value: selectedOptions,
|
|
1705
1727
|
onChange: onChangeValue,
|
|
1728
|
+
isDisabled: isDisabled,
|
|
1706
1729
|
options: options,
|
|
1707
1730
|
ref: selectRef
|
|
1708
1731
|
}, selectProps)));
|
|
1709
1732
|
});
|
|
1710
1733
|
});
|
|
1711
1734
|
SelectField.propTypes = {
|
|
1712
|
-
|
|
1713
|
-
|
|
1735
|
+
classNameGroupItem: PropTypes.string,
|
|
1736
|
+
fieldProps: PropTypes.object,
|
|
1737
|
+
isDisabled: PropTypes.bool,
|
|
1714
1738
|
isRequired: PropTypes.bool,
|
|
1715
1739
|
label: PropTypes.any,
|
|
1716
1740
|
messageType: PropTypes.string,
|
|
1741
|
+
name: PropTypes.string.isRequired,
|
|
1717
1742
|
options: PropTypes.array,
|
|
1743
|
+
selectProps: PropTypes.object,
|
|
1744
|
+
selectRef: PropTypes.any,
|
|
1745
|
+
showMessage: PropTypes.bool,
|
|
1718
1746
|
onChange: PropTypes.func
|
|
1719
1747
|
};
|
|
1720
1748
|
|
|
1721
1749
|
const SwitchField = /*#__PURE__*/React.memo(function SwitchField(props) {
|
|
1722
1750
|
const {
|
|
1723
|
-
|
|
1724
|
-
isRequired,
|
|
1725
|
-
onChange,
|
|
1751
|
+
classNameGroupItem,
|
|
1726
1752
|
fieldProps,
|
|
1727
1753
|
inputProps,
|
|
1728
|
-
|
|
1729
|
-
|
|
1754
|
+
isDisabled,
|
|
1755
|
+
isRequired,
|
|
1756
|
+
name,
|
|
1757
|
+
showMessage,
|
|
1758
|
+
onChange
|
|
1730
1759
|
} = props;
|
|
1731
1760
|
return /*#__PURE__*/React.createElement(Field, {
|
|
1732
1761
|
name: name,
|
|
@@ -1747,6 +1776,7 @@ const SwitchField = /*#__PURE__*/React.memo(function SwitchField(props) {
|
|
|
1747
1776
|
inputName: input.name,
|
|
1748
1777
|
inputValue: input.checked,
|
|
1749
1778
|
isRequired: isRequired,
|
|
1779
|
+
isDisabled: isDisabled,
|
|
1750
1780
|
metaActive: meta.active,
|
|
1751
1781
|
metaError: meta.error,
|
|
1752
1782
|
metaModifiedSinceLastSubmit: meta.modifiedSinceLastSubmit,
|
|
@@ -1754,10 +1784,11 @@ const SwitchField = /*#__PURE__*/React.memo(function SwitchField(props) {
|
|
|
1754
1784
|
metaSubmitFailed: meta.submitFailed,
|
|
1755
1785
|
metaTouched: meta.touched,
|
|
1756
1786
|
metaValid: meta.valid,
|
|
1757
|
-
|
|
1787
|
+
showMessage: showMessage,
|
|
1758
1788
|
tag: "label"
|
|
1759
1789
|
}, fieldProps), /*#__PURE__*/React.createElement(Switch, Object.assign({
|
|
1760
1790
|
autoComplete: "nope",
|
|
1791
|
+
isDisabled: isDisabled,
|
|
1761
1792
|
checked: input.checked,
|
|
1762
1793
|
name: input.name,
|
|
1763
1794
|
type: "checkbox",
|
|
@@ -1768,25 +1799,29 @@ const SwitchField = /*#__PURE__*/React.memo(function SwitchField(props) {
|
|
|
1768
1799
|
});
|
|
1769
1800
|
});
|
|
1770
1801
|
SwitchField.defaultProps = {
|
|
1771
|
-
|
|
1772
|
-
|
|
1802
|
+
fieldProps: {},
|
|
1803
|
+
inputProps: {}
|
|
1773
1804
|
};
|
|
1774
1805
|
SwitchField.propTypes = {
|
|
1806
|
+
classNameGroupItem: PropTypes.string,
|
|
1775
1807
|
fieldProps: PropTypes.object,
|
|
1776
1808
|
inputProps: PropTypes.object,
|
|
1809
|
+
isDisabled: PropTypes.bool,
|
|
1777
1810
|
isRequired: PropTypes.bool,
|
|
1778
1811
|
name: PropTypes.string,
|
|
1812
|
+
showMessage: PropTypes.bool,
|
|
1779
1813
|
onChange: PropTypes.func
|
|
1780
1814
|
};
|
|
1781
1815
|
|
|
1782
1816
|
const TextareaField = /*#__PURE__*/React.memo(function TextareaField(props) {
|
|
1783
1817
|
const {
|
|
1784
1818
|
isRequired,
|
|
1819
|
+
isDisabled,
|
|
1785
1820
|
name,
|
|
1786
1821
|
fieldProps,
|
|
1787
1822
|
inputProps,
|
|
1788
1823
|
classNameGroupItem,
|
|
1789
|
-
|
|
1824
|
+
showMessage
|
|
1790
1825
|
} = props;
|
|
1791
1826
|
return /*#__PURE__*/React.createElement(Field, {
|
|
1792
1827
|
name: name
|
|
@@ -1799,6 +1834,7 @@ const TextareaField = /*#__PURE__*/React.memo(function TextareaField(props) {
|
|
|
1799
1834
|
inputName: input.name,
|
|
1800
1835
|
inputValue: input.value,
|
|
1801
1836
|
isRequired: isRequired,
|
|
1837
|
+
isDisabled: isDisabled,
|
|
1802
1838
|
metaActive: meta.active,
|
|
1803
1839
|
metaError: meta.error,
|
|
1804
1840
|
metaModifiedSinceLastSubmit: meta.modifiedSinceLastSubmit,
|
|
@@ -1806,11 +1842,12 @@ const TextareaField = /*#__PURE__*/React.memo(function TextareaField(props) {
|
|
|
1806
1842
|
metaSubmitFailed: meta.submitFailed,
|
|
1807
1843
|
metaTouched: meta.touched,
|
|
1808
1844
|
metaValid: meta.valid,
|
|
1809
|
-
|
|
1845
|
+
showMessage: showMessage
|
|
1810
1846
|
}, fieldProps), /*#__PURE__*/React.createElement(Textarea, Object.assign({
|
|
1811
1847
|
autoComplete: "nope",
|
|
1812
1848
|
name: input.name,
|
|
1813
1849
|
value: input.value,
|
|
1850
|
+
isDisabled: isDisabled,
|
|
1814
1851
|
onBlur: input.onBlur,
|
|
1815
1852
|
onChange: input.onChange,
|
|
1816
1853
|
onFocus: input.onFocus
|
|
@@ -1821,10 +1858,13 @@ TextareaField.defaultProps = {
|
|
|
1821
1858
|
fieldProps: {}
|
|
1822
1859
|
};
|
|
1823
1860
|
TextareaField.propTypes = {
|
|
1824
|
-
|
|
1825
|
-
isRequired: PropTypes.bool,
|
|
1861
|
+
classNameGroupItem: PropTypes.string,
|
|
1826
1862
|
fieldProps: PropTypes.object,
|
|
1827
|
-
inputProps: PropTypes.object
|
|
1863
|
+
inputProps: PropTypes.object,
|
|
1864
|
+
isDisabled: PropTypes.bool,
|
|
1865
|
+
isRequired: PropTypes.bool,
|
|
1866
|
+
name: PropTypes.string.isRequired,
|
|
1867
|
+
showMessage: PropTypes.bool
|
|
1828
1868
|
};
|
|
1829
1869
|
|
|
1830
1870
|
const focusOnError = (formElementsList, errors) => {
|
|
@@ -2034,7 +2074,7 @@ function generateField(field, config, props) {
|
|
|
2034
2074
|
}, field, props), Object.entries(field.group).map(([key, value]) => {
|
|
2035
2075
|
const groupProps = {
|
|
2036
2076
|
...value,
|
|
2037
|
-
|
|
2077
|
+
showMessage: field.showMessage,
|
|
2038
2078
|
classNameGroupItem: value.classNameGroupItem || 'form__group-item'
|
|
2039
2079
|
};
|
|
2040
2080
|
return generateField(groupProps, {
|