@bonlineza/luxity-lib 2.36.1-beta.4 → 2.36.1
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/Accordion.js +116 -76
- package/AddInterest.js +777 -440
- package/AddProductInterest.js +644 -485
- package/BrandSelector.js +336 -176
- package/Checkbox.js +101 -68
- package/CheckboxButton.js +124 -79
- package/CommunicationPreferenceOptionsRenderer.js +169 -159
- package/CommunicationPreferenceSection.js +178 -166
- package/CommunicationPreferences.js +427 -549
- package/ConditionSelector.js +336 -174
- package/CountryCodeSelect.js +10 -7
- package/CurrencyInputFormatter.js +56 -29
- package/CurrencySelect.js +49 -23
- package/DropdownSelector.js +92 -68
- package/GALink.js +16 -6
- package/GenderSelector.js +142 -88
- package/GraphQLDropdownSelector.js +1511 -933
- package/GraphQLMultiSelector.js +274 -141
- package/IconHeader.js +25 -11
- package/IconWrapper.js +7 -3
- package/InterestCatSelector.js +74 -34
- package/InterestItem.js +187 -103
- package/Interests.js +1466 -917
- package/InterestsSubheading.js +10 -5
- package/InvertedTextButton.js +63 -27
- package/LuxityAppSideNav.js +22 -19
- package/LuxityDesktopHeader.js +663 -549
- package/LuxityFooter.js +325 -434
- package/LuxityGraphQLDropdownSelector.js +1543 -949
- package/LuxityGraphQLMultiselector.js +321 -167
- package/LuxityMobileHeader.js +807 -681
- package/LuxityPageReady.js +136 -74
- package/LuxityProductInterestItem.js +175 -97
- package/LuxitySideNav.js +310 -382
- package/MaterialSelector.js +1550 -955
- package/ModelSelector.js +1550 -955
- package/NotificationDropDown.js +221 -122
- package/Notify.js +1 -0
- package/OutlinePrimaryButton.js +58 -26
- package/PriceRangeSelector.js +281 -168
- package/PrimaryButton.js +58 -26
- package/RadioButtons.js +140 -114
- package/RangeSlider.js +242 -152
- package/RareStepFooter.js +41 -27
- package/RareStepHeader.js +190 -139
- package/ReactSelectWrapper.js +1 -0
- package/SecondaryButton.js +58 -26
- package/ShoeSizeRangeSelector.js +260 -162
- package/ShoeSizeSelector.js +263 -158
- package/SimpleErrorBoundary.js +106 -59
- package/StyleSelector.js +336 -176
- package/TextButton.js +58 -26
- package/Tooltip.js +39 -17
- package/Tracking.js +1 -0
- package/WrapperButton.js +43 -20
- package/build/bundle.css +1 -1
- package/build/bundle.js +2973 -2457
- package/package.json +2 -3
- package/svg/Accessories.js +13 -6
- package/svg/Account.js +13 -6
- package/svg/Add.js +13 -6
- package/svg/ArrowRight.js +13 -6
- package/svg/Bags.js +13 -6
- package/svg/BurgerMenu.js +13 -6
- package/svg/Calendar.js +13 -6
- package/svg/CalendarCircled.js +13 -6
- package/svg/CheckCircled.js +13 -6
- package/svg/Close.js +13 -6
- package/svg/Clothing.js +13 -6
- package/svg/Dot.js +13 -6
- package/svg/Edit.js +13 -6
- package/svg/Eye.js +13 -6
- package/svg/FileAttach.js +13 -6
- package/svg/FileAttachCircled.js +13 -6
- package/svg/LightBulb.js +13 -6
- package/svg/Logo.js +13 -6
- package/svg/LuxityMenu.js +13 -6
- package/svg/Minus.js +13 -6
- package/svg/MobileAvatar.js +13 -6
- package/svg/MyOrder.js +13 -6
- package/svg/MyPayment.js +13 -6
- package/svg/MyProfile.js +14 -8
- package/svg/MySale.js +13 -6
- package/svg/Notification.js +13 -6
- package/svg/PointerDown.js +13 -6
- package/svg/Search.js +13 -6
- package/svg/Shoes.js +13 -6
- package/svg/SvgWrapper.js +7 -3
- package/svg/Trash.js +13 -6
- package/svg/Watches.js +13 -6
|
@@ -8,38 +8,66 @@
|
|
|
8
8
|
styled = styled && Object.prototype.hasOwnProperty.call(styled, 'default') ? styled['default'] : styled;
|
|
9
9
|
|
|
10
10
|
function _extends() {
|
|
11
|
-
|
|
12
|
-
for (var
|
|
13
|
-
var
|
|
14
|
-
|
|
11
|
+
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
12
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
13
|
+
var source = arguments[i];
|
|
14
|
+
|
|
15
|
+
for (var key in source) {
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
17
|
+
target[key] = source[key];
|
|
18
|
+
}
|
|
19
|
+
}
|
|
15
20
|
}
|
|
16
|
-
|
|
17
|
-
|
|
21
|
+
|
|
22
|
+
return target;
|
|
23
|
+
};
|
|
24
|
+
return _extends.apply(this, arguments);
|
|
18
25
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
|
|
27
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
28
|
+
if (source == null) return {};
|
|
29
|
+
var target = {};
|
|
30
|
+
var sourceKeys = Object.keys(source);
|
|
31
|
+
var key, i;
|
|
32
|
+
|
|
33
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
34
|
+
key = sourceKeys[i];
|
|
35
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
36
|
+
target[key] = source[key];
|
|
27
37
|
}
|
|
28
|
-
|
|
38
|
+
|
|
39
|
+
return target;
|
|
29
40
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
41
|
+
|
|
42
|
+
function _objectWithoutProperties(source, excluded) {
|
|
43
|
+
if (source == null) return {};
|
|
44
|
+
|
|
45
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
46
|
+
|
|
47
|
+
var key, i;
|
|
48
|
+
|
|
49
|
+
if (Object.getOwnPropertySymbols) {
|
|
50
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
51
|
+
|
|
52
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
53
|
+
key = sourceSymbolKeys[i];
|
|
54
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
55
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
56
|
+
target[key] = source[key];
|
|
57
|
+
}
|
|
36
58
|
}
|
|
37
|
-
|
|
59
|
+
|
|
60
|
+
return target;
|
|
38
61
|
}
|
|
39
|
-
|
|
40
|
-
|
|
62
|
+
|
|
63
|
+
function _taggedTemplateLiteral(strings, raw) {
|
|
64
|
+
if (!raw) {
|
|
65
|
+
raw = strings.slice(0);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
return Object.freeze(Object.defineProperties(strings, {
|
|
41
69
|
raw: {
|
|
42
|
-
value: Object.freeze(
|
|
70
|
+
value: Object.freeze(raw)
|
|
43
71
|
}
|
|
44
72
|
}));
|
|
45
73
|
}
|
|
@@ -78,14 +106,13 @@
|
|
|
78
106
|
function cloneObject(data) {
|
|
79
107
|
let copy;
|
|
80
108
|
const isArray = Array.isArray(data);
|
|
81
|
-
const isFileListInstance = typeof FileList !== 'undefined' ? data instanceof FileList : false;
|
|
82
109
|
if (data instanceof Date) {
|
|
83
110
|
copy = new Date(data);
|
|
84
111
|
}
|
|
85
112
|
else if (data instanceof Set) {
|
|
86
113
|
copy = new Set(data);
|
|
87
114
|
}
|
|
88
|
-
else if (!(isWeb && (data instanceof Blob ||
|
|
115
|
+
else if (!(isWeb && (data instanceof Blob || data instanceof FileList)) &&
|
|
89
116
|
(isArray || isObject(data))) {
|
|
90
117
|
copy = isArray ? [] : {};
|
|
91
118
|
if (!isArray && !isPlainObject(data)) {
|
|
@@ -109,50 +136,18 @@
|
|
|
109
136
|
|
|
110
137
|
var isUndefined = (val) => val === undefined;
|
|
111
138
|
|
|
112
|
-
var get = (
|
|
113
|
-
if (!path || !isObject(
|
|
139
|
+
var get = (obj, path, defaultValue) => {
|
|
140
|
+
if (!path || !isObject(obj)) {
|
|
114
141
|
return defaultValue;
|
|
115
142
|
}
|
|
116
|
-
const result = compact(path.split(/[,[\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key],
|
|
117
|
-
return isUndefined(result) || result ===
|
|
118
|
-
? isUndefined(
|
|
143
|
+
const result = compact(path.split(/[,[\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], obj);
|
|
144
|
+
return isUndefined(result) || result === obj
|
|
145
|
+
? isUndefined(obj[path])
|
|
119
146
|
? defaultValue
|
|
120
|
-
:
|
|
147
|
+
: obj[path]
|
|
121
148
|
: result;
|
|
122
149
|
};
|
|
123
150
|
|
|
124
|
-
var isBoolean = (value) => typeof value === 'boolean';
|
|
125
|
-
|
|
126
|
-
var isKey = (value) => /^\w*$/.test(value);
|
|
127
|
-
|
|
128
|
-
var stringToPath = (input) => compact(input.replace(/["|']|\]/g, '').split(/\.|\[/));
|
|
129
|
-
|
|
130
|
-
var set = (object, path, value) => {
|
|
131
|
-
let index = -1;
|
|
132
|
-
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
133
|
-
const length = tempPath.length;
|
|
134
|
-
const lastIndex = length - 1;
|
|
135
|
-
while (++index < length) {
|
|
136
|
-
const key = tempPath[index];
|
|
137
|
-
let newValue = value;
|
|
138
|
-
if (index !== lastIndex) {
|
|
139
|
-
const objValue = object[key];
|
|
140
|
-
newValue =
|
|
141
|
-
isObject(objValue) || Array.isArray(objValue)
|
|
142
|
-
? objValue
|
|
143
|
-
: !isNaN(+tempPath[index + 1])
|
|
144
|
-
? []
|
|
145
|
-
: {};
|
|
146
|
-
}
|
|
147
|
-
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
148
|
-
return;
|
|
149
|
-
}
|
|
150
|
-
object[key] = newValue;
|
|
151
|
-
object = object[key];
|
|
152
|
-
}
|
|
153
|
-
return object;
|
|
154
|
-
};
|
|
155
|
-
|
|
156
151
|
const EVENTS = {
|
|
157
152
|
BLUR: 'blur',
|
|
158
153
|
FOCUS_OUT: 'focusout',
|
|
@@ -231,13 +226,15 @@
|
|
|
231
226
|
|
|
232
227
|
var convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);
|
|
233
228
|
|
|
234
|
-
var shouldSubscribeByName = (name, signalName, exact) =>
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
229
|
+
var shouldSubscribeByName = (name, signalName, exact) => exact && signalName
|
|
230
|
+
? name === signalName ||
|
|
231
|
+
(Array.isArray(name) &&
|
|
232
|
+
name.some((currentName) => currentName && exact && currentName === signalName))
|
|
233
|
+
: !name ||
|
|
234
|
+
!signalName ||
|
|
235
|
+
name === signalName ||
|
|
236
|
+
convertToArrayPayload(name).some((currentName) => currentName &&
|
|
237
|
+
(currentName.startsWith(signalName) ||
|
|
241
238
|
signalName.startsWith(currentName)));
|
|
242
239
|
|
|
243
240
|
function useSubscribe(props) {
|
|
@@ -295,7 +292,6 @@
|
|
|
295
292
|
isLoading: false,
|
|
296
293
|
dirtyFields: false,
|
|
297
294
|
touchedFields: false,
|
|
298
|
-
validatingFields: false,
|
|
299
295
|
isValidating: false,
|
|
300
296
|
isValid: false,
|
|
301
297
|
errors: false,
|
|
@@ -320,7 +316,7 @@
|
|
|
320
316
|
_mounted.current = false;
|
|
321
317
|
};
|
|
322
318
|
}, [control]);
|
|
323
|
-
return
|
|
319
|
+
return getProxyFormState(formState, control, _localProxyFormState.current, false);
|
|
324
320
|
}
|
|
325
321
|
|
|
326
322
|
var isString = (value) => typeof value === 'string';
|
|
@@ -346,7 +342,7 @@
|
|
|
346
342
|
*
|
|
347
343
|
* @example
|
|
348
344
|
* ```tsx
|
|
349
|
-
* const {
|
|
345
|
+
* const { watch } = useForm();
|
|
350
346
|
* const values = useWatch({
|
|
351
347
|
* name: "fieldName"
|
|
352
348
|
* control,
|
|
@@ -372,6 +368,33 @@
|
|
|
372
368
|
return value;
|
|
373
369
|
}
|
|
374
370
|
|
|
371
|
+
var isKey = (value) => /^\w*$/.test(value);
|
|
372
|
+
|
|
373
|
+
var stringToPath = (input) => compact(input.replace(/["|']|\]/g, '').split(/\.|\[/));
|
|
374
|
+
|
|
375
|
+
function set(object, path, value) {
|
|
376
|
+
let index = -1;
|
|
377
|
+
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
378
|
+
const length = tempPath.length;
|
|
379
|
+
const lastIndex = length - 1;
|
|
380
|
+
while (++index < length) {
|
|
381
|
+
const key = tempPath[index];
|
|
382
|
+
let newValue = value;
|
|
383
|
+
if (index !== lastIndex) {
|
|
384
|
+
const objValue = object[key];
|
|
385
|
+
newValue =
|
|
386
|
+
isObject(objValue) || Array.isArray(objValue)
|
|
387
|
+
? objValue
|
|
388
|
+
: !isNaN(+tempPath[index + 1])
|
|
389
|
+
? []
|
|
390
|
+
: {};
|
|
391
|
+
}
|
|
392
|
+
object[key] = newValue;
|
|
393
|
+
object = object[key];
|
|
394
|
+
}
|
|
395
|
+
return object;
|
|
396
|
+
}
|
|
397
|
+
|
|
375
398
|
/**
|
|
376
399
|
* Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.
|
|
377
400
|
*
|
|
@@ -409,79 +432,17 @@
|
|
|
409
432
|
const formState = useFormState({
|
|
410
433
|
control,
|
|
411
434
|
name,
|
|
412
|
-
exact: true,
|
|
413
435
|
});
|
|
414
436
|
const _registerProps = React__default.useRef(control.register(name, {
|
|
415
437
|
...props.rules,
|
|
416
438
|
value,
|
|
417
|
-
...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),
|
|
418
439
|
}));
|
|
419
|
-
|
|
420
|
-
invalid: {
|
|
421
|
-
enumerable: true,
|
|
422
|
-
get: () => !!get(formState.errors, name),
|
|
423
|
-
},
|
|
424
|
-
isDirty: {
|
|
425
|
-
enumerable: true,
|
|
426
|
-
get: () => !!get(formState.dirtyFields, name),
|
|
427
|
-
},
|
|
428
|
-
isTouched: {
|
|
429
|
-
enumerable: true,
|
|
430
|
-
get: () => !!get(formState.touchedFields, name),
|
|
431
|
-
},
|
|
432
|
-
isValidating: {
|
|
433
|
-
enumerable: true,
|
|
434
|
-
get: () => !!get(formState.validatingFields, name),
|
|
435
|
-
},
|
|
436
|
-
error: {
|
|
437
|
-
enumerable: true,
|
|
438
|
-
get: () => get(formState.errors, name),
|
|
439
|
-
},
|
|
440
|
-
}), [formState, name]);
|
|
441
|
-
const field = React__default.useMemo(() => ({
|
|
442
|
-
name,
|
|
443
|
-
value,
|
|
444
|
-
...(isBoolean(disabled) || formState.disabled
|
|
445
|
-
? { disabled: formState.disabled || disabled }
|
|
446
|
-
: {}),
|
|
447
|
-
onChange: (event) => _registerProps.current.onChange({
|
|
448
|
-
target: {
|
|
449
|
-
value: getEventValue(event),
|
|
450
|
-
name: name,
|
|
451
|
-
},
|
|
452
|
-
type: EVENTS.CHANGE,
|
|
453
|
-
}),
|
|
454
|
-
onBlur: () => _registerProps.current.onBlur({
|
|
455
|
-
target: {
|
|
456
|
-
value: get(control._formValues, name),
|
|
457
|
-
name: name,
|
|
458
|
-
},
|
|
459
|
-
type: EVENTS.BLUR,
|
|
460
|
-
}),
|
|
461
|
-
ref: (elm) => {
|
|
462
|
-
const field = get(control._fields, name);
|
|
463
|
-
if (field && elm) {
|
|
464
|
-
field._f.ref = {
|
|
465
|
-
focus: () => elm.focus(),
|
|
466
|
-
select: () => elm.select(),
|
|
467
|
-
setCustomValidity: (message) => elm.setCustomValidity(message),
|
|
468
|
-
reportValidity: () => elm.reportValidity(),
|
|
469
|
-
};
|
|
470
|
-
}
|
|
471
|
-
},
|
|
472
|
-
}), [
|
|
473
|
-
name,
|
|
474
|
-
control._formValues,
|
|
475
|
-
disabled,
|
|
476
|
-
formState.disabled,
|
|
477
|
-
value,
|
|
478
|
-
control._fields,
|
|
479
|
-
]);
|
|
440
|
+
_registerProps.current = control.register(name, props.rules);
|
|
480
441
|
React__default.useEffect(() => {
|
|
481
442
|
const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;
|
|
482
443
|
const updateMounted = (name, value) => {
|
|
483
444
|
const field = get(control._fields, name);
|
|
484
|
-
if (field
|
|
445
|
+
if (field) {
|
|
485
446
|
field._f.mount = value;
|
|
486
447
|
}
|
|
487
448
|
};
|
|
@@ -493,7 +454,6 @@
|
|
|
493
454
|
set(control._formValues, name, value);
|
|
494
455
|
}
|
|
495
456
|
}
|
|
496
|
-
!isArrayField && control.register(name);
|
|
497
457
|
return () => {
|
|
498
458
|
(isArrayField
|
|
499
459
|
? _shouldUnregisterField && !control._state.action
|
|
@@ -509,11 +469,57 @@
|
|
|
509
469
|
name,
|
|
510
470
|
});
|
|
511
471
|
}, [disabled, name, control]);
|
|
512
|
-
return
|
|
513
|
-
field
|
|
472
|
+
return {
|
|
473
|
+
field: {
|
|
474
|
+
name,
|
|
475
|
+
value,
|
|
476
|
+
disabled,
|
|
477
|
+
onChange: React__default.useCallback((event) => _registerProps.current.onChange({
|
|
478
|
+
target: {
|
|
479
|
+
value: getEventValue(event),
|
|
480
|
+
name: name,
|
|
481
|
+
},
|
|
482
|
+
type: EVENTS.CHANGE,
|
|
483
|
+
}), [name]),
|
|
484
|
+
onBlur: React__default.useCallback(() => _registerProps.current.onBlur({
|
|
485
|
+
target: {
|
|
486
|
+
value: get(control._formValues, name),
|
|
487
|
+
name: name,
|
|
488
|
+
},
|
|
489
|
+
type: EVENTS.BLUR,
|
|
490
|
+
}), [name, control]),
|
|
491
|
+
ref: (elm) => {
|
|
492
|
+
const field = get(control._fields, name);
|
|
493
|
+
if (field && elm) {
|
|
494
|
+
field._f.ref = {
|
|
495
|
+
focus: () => elm.focus(),
|
|
496
|
+
select: () => elm.select(),
|
|
497
|
+
setCustomValidity: (message) => elm.setCustomValidity(message),
|
|
498
|
+
reportValidity: () => elm.reportValidity(),
|
|
499
|
+
};
|
|
500
|
+
}
|
|
501
|
+
},
|
|
502
|
+
},
|
|
514
503
|
formState,
|
|
515
|
-
fieldState,
|
|
516
|
-
|
|
504
|
+
fieldState: Object.defineProperties({}, {
|
|
505
|
+
invalid: {
|
|
506
|
+
enumerable: true,
|
|
507
|
+
get: () => !!get(formState.errors, name),
|
|
508
|
+
},
|
|
509
|
+
isDirty: {
|
|
510
|
+
enumerable: true,
|
|
511
|
+
get: () => !!get(formState.dirtyFields, name),
|
|
512
|
+
},
|
|
513
|
+
isTouched: {
|
|
514
|
+
enumerable: true,
|
|
515
|
+
get: () => !!get(formState.touchedFields, name),
|
|
516
|
+
},
|
|
517
|
+
error: {
|
|
518
|
+
enumerable: true,
|
|
519
|
+
get: () => get(formState.errors, name),
|
|
520
|
+
},
|
|
521
|
+
}),
|
|
522
|
+
};
|
|
517
523
|
}
|
|
518
524
|
|
|
519
525
|
var _templateObject;
|
|
@@ -540,27 +546,31 @@
|
|
|
540
546
|
});
|
|
541
547
|
|
|
542
548
|
var _excluded = ["ref"];
|
|
549
|
+
|
|
543
550
|
var _templateObject$5, _templateObject2;
|
|
544
551
|
var OptionsRow = styled.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n"])));
|
|
545
552
|
var Options = styled.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n flex-basis: 60%;\n"])));
|
|
553
|
+
|
|
546
554
|
var CommunicationPreferenceOptionsRenderer = function CommunicationPreferenceOptionsRenderer(_ref) {
|
|
547
555
|
var control = _ref.control,
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
556
|
+
name = _ref.name,
|
|
557
|
+
isDisabled = _ref.isDisabled,
|
|
558
|
+
options = _ref.options,
|
|
559
|
+
defaultValue = _ref.defaultValue,
|
|
560
|
+
setValue = _ref.setValue;
|
|
561
|
+
|
|
553
562
|
var _useController = useController({
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
563
|
+
name: name,
|
|
564
|
+
control: control,
|
|
565
|
+
defaultValue: defaultValue
|
|
566
|
+
}),
|
|
567
|
+
_useController$field = _useController.field,
|
|
568
|
+
ref = _useController$field.ref,
|
|
569
|
+
inputProps = _objectWithoutProperties(_useController$field, _excluded),
|
|
570
|
+
_useController$fieldS = _useController.fieldState,
|
|
571
|
+
invalid = _useController$fieldS.invalid,
|
|
572
|
+
error = _useController$fieldS.error;
|
|
573
|
+
|
|
564
574
|
React.useEffect(function () {
|
|
565
575
|
if (defaultValue) {
|
|
566
576
|
setValue(name, defaultValue);
|