@bonlineza/luxity-lib 2.36.1-uk-platform.1 → 2.36.2
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 +1508 -929
- 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 +1463 -913
- package/InterestsSubheading.js +10 -5
- package/InvertedTextButton.js +63 -27
- package/LuxityAppSideNav.js +21 -18
- package/LuxityDesktopHeader.js +451 -298
- package/LuxityFooter.js +321 -430
- package/LuxityGraphQLDropdownSelector.js +1540 -945
- package/LuxityGraphQLMultiselector.js +321 -167
- package/LuxityMobileHeader.js +544 -353
- package/LuxityPageReady.js +136 -74
- package/LuxityProductInterestItem.js +175 -97
- package/LuxitySideNav.js +244 -176
- package/MaterialSelector.js +1547 -951
- package/ModelSelector.js +1547 -951
- package/NotificationDropDown.js +218 -118
- 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/TestComponent.js +15 -0
- package/TextButton.js +58 -26
- package/Tooltip.js +39 -17
- package/Tracking.js +1 -0
- package/WrapperButton.js +43 -20
- package/build/CountryCodeSelect/index.js +18 -0
- package/build/ReactSelectWrapper/index.js +34 -0
- package/build/bundle.css +1 -1
- package/build/bundle.js +2616 -1974
- package/package.json +1 -1
- package/postcss.config.js +6 -0
- 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
|
var styled__default = 'default' in styled ? 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
|
}
|
|
@@ -142,14 +170,13 @@
|
|
|
142
170
|
function cloneObject(data) {
|
|
143
171
|
let copy;
|
|
144
172
|
const isArray = Array.isArray(data);
|
|
145
|
-
const isFileListInstance = typeof FileList !== 'undefined' ? data instanceof FileList : false;
|
|
146
173
|
if (data instanceof Date) {
|
|
147
174
|
copy = new Date(data);
|
|
148
175
|
}
|
|
149
176
|
else if (data instanceof Set) {
|
|
150
177
|
copy = new Set(data);
|
|
151
178
|
}
|
|
152
|
-
else if (!(isWeb && (data instanceof Blob ||
|
|
179
|
+
else if (!(isWeb && (data instanceof Blob || data instanceof FileList)) &&
|
|
153
180
|
(isArray || isObject(data))) {
|
|
154
181
|
copy = isArray ? [] : {};
|
|
155
182
|
if (!isArray && !isPlainObject(data)) {
|
|
@@ -173,50 +200,18 @@
|
|
|
173
200
|
|
|
174
201
|
var isUndefined = (val) => val === undefined;
|
|
175
202
|
|
|
176
|
-
var get = (
|
|
177
|
-
if (!path || !isObject(
|
|
203
|
+
var get = (obj, path, defaultValue) => {
|
|
204
|
+
if (!path || !isObject(obj)) {
|
|
178
205
|
return defaultValue;
|
|
179
206
|
}
|
|
180
|
-
const result = compact(path.split(/[,[\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key],
|
|
181
|
-
return isUndefined(result) || result ===
|
|
182
|
-
? isUndefined(
|
|
207
|
+
const result = compact(path.split(/[,[\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], obj);
|
|
208
|
+
return isUndefined(result) || result === obj
|
|
209
|
+
? isUndefined(obj[path])
|
|
183
210
|
? defaultValue
|
|
184
|
-
:
|
|
211
|
+
: obj[path]
|
|
185
212
|
: result;
|
|
186
213
|
};
|
|
187
214
|
|
|
188
|
-
var isBoolean = (value) => typeof value === 'boolean';
|
|
189
|
-
|
|
190
|
-
var isKey = (value) => /^\w*$/.test(value);
|
|
191
|
-
|
|
192
|
-
var stringToPath = (input) => compact(input.replace(/["|']|\]/g, '').split(/\.|\[/));
|
|
193
|
-
|
|
194
|
-
var set = (object, path, value) => {
|
|
195
|
-
let index = -1;
|
|
196
|
-
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
197
|
-
const length = tempPath.length;
|
|
198
|
-
const lastIndex = length - 1;
|
|
199
|
-
while (++index < length) {
|
|
200
|
-
const key = tempPath[index];
|
|
201
|
-
let newValue = value;
|
|
202
|
-
if (index !== lastIndex) {
|
|
203
|
-
const objValue = object[key];
|
|
204
|
-
newValue =
|
|
205
|
-
isObject(objValue) || Array.isArray(objValue)
|
|
206
|
-
? objValue
|
|
207
|
-
: !isNaN(+tempPath[index + 1])
|
|
208
|
-
? []
|
|
209
|
-
: {};
|
|
210
|
-
}
|
|
211
|
-
if (key === '__proto__' || key === 'constructor' || key === 'prototype') {
|
|
212
|
-
return;
|
|
213
|
-
}
|
|
214
|
-
object[key] = newValue;
|
|
215
|
-
object = object[key];
|
|
216
|
-
}
|
|
217
|
-
return object;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
215
|
const EVENTS = {
|
|
221
216
|
BLUR: 'blur',
|
|
222
217
|
FOCUS_OUT: 'focusout',
|
|
@@ -295,13 +290,15 @@
|
|
|
295
290
|
|
|
296
291
|
var convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);
|
|
297
292
|
|
|
298
|
-
var shouldSubscribeByName = (name, signalName, exact) =>
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
293
|
+
var shouldSubscribeByName = (name, signalName, exact) => exact && signalName
|
|
294
|
+
? name === signalName ||
|
|
295
|
+
(Array.isArray(name) &&
|
|
296
|
+
name.some((currentName) => currentName && exact && currentName === signalName))
|
|
297
|
+
: !name ||
|
|
298
|
+
!signalName ||
|
|
299
|
+
name === signalName ||
|
|
300
|
+
convertToArrayPayload(name).some((currentName) => currentName &&
|
|
301
|
+
(currentName.startsWith(signalName) ||
|
|
305
302
|
signalName.startsWith(currentName)));
|
|
306
303
|
|
|
307
304
|
function useSubscribe(props) {
|
|
@@ -359,7 +356,6 @@
|
|
|
359
356
|
isLoading: false,
|
|
360
357
|
dirtyFields: false,
|
|
361
358
|
touchedFields: false,
|
|
362
|
-
validatingFields: false,
|
|
363
359
|
isValidating: false,
|
|
364
360
|
isValid: false,
|
|
365
361
|
errors: false,
|
|
@@ -384,7 +380,7 @@
|
|
|
384
380
|
_mounted.current = false;
|
|
385
381
|
};
|
|
386
382
|
}, [control]);
|
|
387
|
-
return
|
|
383
|
+
return getProxyFormState(formState, control, _localProxyFormState.current, false);
|
|
388
384
|
}
|
|
389
385
|
|
|
390
386
|
var isString = (value) => typeof value === 'string';
|
|
@@ -410,7 +406,7 @@
|
|
|
410
406
|
*
|
|
411
407
|
* @example
|
|
412
408
|
* ```tsx
|
|
413
|
-
* const {
|
|
409
|
+
* const { watch } = useForm();
|
|
414
410
|
* const values = useWatch({
|
|
415
411
|
* name: "fieldName"
|
|
416
412
|
* control,
|
|
@@ -436,6 +432,33 @@
|
|
|
436
432
|
return value;
|
|
437
433
|
}
|
|
438
434
|
|
|
435
|
+
var isKey = (value) => /^\w*$/.test(value);
|
|
436
|
+
|
|
437
|
+
var stringToPath = (input) => compact(input.replace(/["|']|\]/g, '').split(/\.|\[/));
|
|
438
|
+
|
|
439
|
+
function set(object, path, value) {
|
|
440
|
+
let index = -1;
|
|
441
|
+
const tempPath = isKey(path) ? [path] : stringToPath(path);
|
|
442
|
+
const length = tempPath.length;
|
|
443
|
+
const lastIndex = length - 1;
|
|
444
|
+
while (++index < length) {
|
|
445
|
+
const key = tempPath[index];
|
|
446
|
+
let newValue = value;
|
|
447
|
+
if (index !== lastIndex) {
|
|
448
|
+
const objValue = object[key];
|
|
449
|
+
newValue =
|
|
450
|
+
isObject(objValue) || Array.isArray(objValue)
|
|
451
|
+
? objValue
|
|
452
|
+
: !isNaN(+tempPath[index + 1])
|
|
453
|
+
? []
|
|
454
|
+
: {};
|
|
455
|
+
}
|
|
456
|
+
object[key] = newValue;
|
|
457
|
+
object = object[key];
|
|
458
|
+
}
|
|
459
|
+
return object;
|
|
460
|
+
}
|
|
461
|
+
|
|
439
462
|
/**
|
|
440
463
|
* 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.
|
|
441
464
|
*
|
|
@@ -473,79 +496,17 @@
|
|
|
473
496
|
const formState = useFormState({
|
|
474
497
|
control,
|
|
475
498
|
name,
|
|
476
|
-
exact: true,
|
|
477
499
|
});
|
|
478
500
|
const _registerProps = React__default.useRef(control.register(name, {
|
|
479
501
|
...props.rules,
|
|
480
502
|
value,
|
|
481
|
-
...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),
|
|
482
503
|
}));
|
|
483
|
-
|
|
484
|
-
invalid: {
|
|
485
|
-
enumerable: true,
|
|
486
|
-
get: () => !!get(formState.errors, name),
|
|
487
|
-
},
|
|
488
|
-
isDirty: {
|
|
489
|
-
enumerable: true,
|
|
490
|
-
get: () => !!get(formState.dirtyFields, name),
|
|
491
|
-
},
|
|
492
|
-
isTouched: {
|
|
493
|
-
enumerable: true,
|
|
494
|
-
get: () => !!get(formState.touchedFields, name),
|
|
495
|
-
},
|
|
496
|
-
isValidating: {
|
|
497
|
-
enumerable: true,
|
|
498
|
-
get: () => !!get(formState.validatingFields, name),
|
|
499
|
-
},
|
|
500
|
-
error: {
|
|
501
|
-
enumerable: true,
|
|
502
|
-
get: () => get(formState.errors, name),
|
|
503
|
-
},
|
|
504
|
-
}), [formState, name]);
|
|
505
|
-
const field = React__default.useMemo(() => ({
|
|
506
|
-
name,
|
|
507
|
-
value,
|
|
508
|
-
...(isBoolean(disabled) || formState.disabled
|
|
509
|
-
? { disabled: formState.disabled || disabled }
|
|
510
|
-
: {}),
|
|
511
|
-
onChange: (event) => _registerProps.current.onChange({
|
|
512
|
-
target: {
|
|
513
|
-
value: getEventValue(event),
|
|
514
|
-
name: name,
|
|
515
|
-
},
|
|
516
|
-
type: EVENTS.CHANGE,
|
|
517
|
-
}),
|
|
518
|
-
onBlur: () => _registerProps.current.onBlur({
|
|
519
|
-
target: {
|
|
520
|
-
value: get(control._formValues, name),
|
|
521
|
-
name: name,
|
|
522
|
-
},
|
|
523
|
-
type: EVENTS.BLUR,
|
|
524
|
-
}),
|
|
525
|
-
ref: (elm) => {
|
|
526
|
-
const field = get(control._fields, name);
|
|
527
|
-
if (field && elm) {
|
|
528
|
-
field._f.ref = {
|
|
529
|
-
focus: () => elm.focus(),
|
|
530
|
-
select: () => elm.select(),
|
|
531
|
-
setCustomValidity: (message) => elm.setCustomValidity(message),
|
|
532
|
-
reportValidity: () => elm.reportValidity(),
|
|
533
|
-
};
|
|
534
|
-
}
|
|
535
|
-
},
|
|
536
|
-
}), [
|
|
537
|
-
name,
|
|
538
|
-
control._formValues,
|
|
539
|
-
disabled,
|
|
540
|
-
formState.disabled,
|
|
541
|
-
value,
|
|
542
|
-
control._fields,
|
|
543
|
-
]);
|
|
504
|
+
_registerProps.current = control.register(name, props.rules);
|
|
544
505
|
React__default.useEffect(() => {
|
|
545
506
|
const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;
|
|
546
507
|
const updateMounted = (name, value) => {
|
|
547
508
|
const field = get(control._fields, name);
|
|
548
|
-
if (field
|
|
509
|
+
if (field) {
|
|
549
510
|
field._f.mount = value;
|
|
550
511
|
}
|
|
551
512
|
};
|
|
@@ -557,7 +518,6 @@
|
|
|
557
518
|
set(control._formValues, name, value);
|
|
558
519
|
}
|
|
559
520
|
}
|
|
560
|
-
!isArrayField && control.register(name);
|
|
561
521
|
return () => {
|
|
562
522
|
(isArrayField
|
|
563
523
|
? _shouldUnregisterField && !control._state.action
|
|
@@ -573,11 +533,57 @@
|
|
|
573
533
|
name,
|
|
574
534
|
});
|
|
575
535
|
}, [disabled, name, control]);
|
|
576
|
-
return
|
|
577
|
-
field
|
|
536
|
+
return {
|
|
537
|
+
field: {
|
|
538
|
+
name,
|
|
539
|
+
value,
|
|
540
|
+
disabled,
|
|
541
|
+
onChange: React__default.useCallback((event) => _registerProps.current.onChange({
|
|
542
|
+
target: {
|
|
543
|
+
value: getEventValue(event),
|
|
544
|
+
name: name,
|
|
545
|
+
},
|
|
546
|
+
type: EVENTS.CHANGE,
|
|
547
|
+
}), [name]),
|
|
548
|
+
onBlur: React__default.useCallback(() => _registerProps.current.onBlur({
|
|
549
|
+
target: {
|
|
550
|
+
value: get(control._formValues, name),
|
|
551
|
+
name: name,
|
|
552
|
+
},
|
|
553
|
+
type: EVENTS.BLUR,
|
|
554
|
+
}), [name, control]),
|
|
555
|
+
ref: (elm) => {
|
|
556
|
+
const field = get(control._fields, name);
|
|
557
|
+
if (field && elm) {
|
|
558
|
+
field._f.ref = {
|
|
559
|
+
focus: () => elm.focus(),
|
|
560
|
+
select: () => elm.select(),
|
|
561
|
+
setCustomValidity: (message) => elm.setCustomValidity(message),
|
|
562
|
+
reportValidity: () => elm.reportValidity(),
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
},
|
|
566
|
+
},
|
|
578
567
|
formState,
|
|
579
|
-
fieldState,
|
|
580
|
-
|
|
568
|
+
fieldState: Object.defineProperties({}, {
|
|
569
|
+
invalid: {
|
|
570
|
+
enumerable: true,
|
|
571
|
+
get: () => !!get(formState.errors, name),
|
|
572
|
+
},
|
|
573
|
+
isDirty: {
|
|
574
|
+
enumerable: true,
|
|
575
|
+
get: () => !!get(formState.dirtyFields, name),
|
|
576
|
+
},
|
|
577
|
+
isTouched: {
|
|
578
|
+
enumerable: true,
|
|
579
|
+
get: () => !!get(formState.touchedFields, name),
|
|
580
|
+
},
|
|
581
|
+
error: {
|
|
582
|
+
enumerable: true,
|
|
583
|
+
get: () => get(formState.errors, name),
|
|
584
|
+
},
|
|
585
|
+
}),
|
|
586
|
+
};
|
|
581
587
|
}
|
|
582
588
|
|
|
583
589
|
var _templateObject;
|
|
@@ -604,27 +610,31 @@
|
|
|
604
610
|
});
|
|
605
611
|
|
|
606
612
|
var _excluded = ["ref"];
|
|
613
|
+
|
|
607
614
|
var _templateObject$5, _templateObject2;
|
|
608
615
|
var OptionsRow = styled__default.div(_templateObject$5 || (_templateObject$5 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n"])));
|
|
609
616
|
var Options = styled__default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: nowrap;\n flex-direction: row;\n flex-basis: 60%;\n"])));
|
|
617
|
+
|
|
610
618
|
var CommunicationPreferenceOptionsRenderer = function CommunicationPreferenceOptionsRenderer(_ref) {
|
|
611
619
|
var control = _ref.control,
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
620
|
+
name = _ref.name,
|
|
621
|
+
isDisabled = _ref.isDisabled,
|
|
622
|
+
options = _ref.options,
|
|
623
|
+
defaultValue = _ref.defaultValue,
|
|
624
|
+
setValue = _ref.setValue;
|
|
625
|
+
|
|
617
626
|
var _useController = useController({
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
627
|
+
name: name,
|
|
628
|
+
control: control,
|
|
629
|
+
defaultValue: defaultValue
|
|
630
|
+
}),
|
|
631
|
+
_useController$field = _useController.field,
|
|
632
|
+
ref = _useController$field.ref,
|
|
633
|
+
inputProps = _objectWithoutProperties(_useController$field, _excluded),
|
|
634
|
+
_useController$fieldS = _useController.fieldState,
|
|
635
|
+
invalid = _useController$fieldS.invalid,
|
|
636
|
+
error = _useController$fieldS.error;
|
|
637
|
+
|
|
628
638
|
React.useEffect(function () {
|
|
629
639
|
if (defaultValue) {
|
|
630
640
|
setValue(name, defaultValue);
|
|
@@ -654,15 +664,16 @@
|
|
|
654
664
|
return props.theme.colors.primary;
|
|
655
665
|
});
|
|
656
666
|
var SectionHeading = styled__default.div(_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n padding: 5px 10px;\n"])));
|
|
667
|
+
|
|
657
668
|
var CommunicationPreferenceSection = function CommunicationPreferenceSection(_ref) {
|
|
658
669
|
var section_heading = _ref.section_heading,
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
670
|
+
description = _ref.description,
|
|
671
|
+
control = _ref.control,
|
|
672
|
+
name = _ref.name,
|
|
673
|
+
isDisabled = _ref.isDisabled,
|
|
674
|
+
options = _ref.options,
|
|
675
|
+
defaultValue = _ref.defaultValue,
|
|
676
|
+
setValue = _ref.setValue;
|
|
666
677
|
return /*#__PURE__*/React__default.createElement(SectionContainer, null, /*#__PURE__*/React__default.createElement(SectionHeading, null, section_heading), /*#__PURE__*/React__default.createElement(CommunicationPreferenceOptionsRenderer, {
|
|
667
678
|
description: description,
|
|
668
679
|
control: control,
|
|
@@ -673,6 +684,7 @@
|
|
|
673
684
|
setValue: setValue
|
|
674
685
|
}));
|
|
675
686
|
};
|
|
687
|
+
|
|
676
688
|
var index = themed(CommunicationPreferenceSection);
|
|
677
689
|
|
|
678
690
|
return index;
|