@commercetools-frontend/experimental-components 6.0.0 → 6.0.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.
|
@@ -151,6 +151,9 @@ const INTERVALS_IN_SECONDS = {
|
|
|
151
151
|
};
|
|
152
152
|
const EXCLUDING_PRODUCTS = 'excludingProducts';
|
|
153
153
|
|
|
154
|
+
// TODO: apply a more robust solution to overlaying issues
|
|
155
|
+
const Z_INDEX_DROPDOWN = 30000;
|
|
156
|
+
|
|
154
157
|
const formats = {
|
|
155
158
|
en: [',', '.'],
|
|
156
159
|
de: ['.', ','],
|
|
@@ -329,6 +332,11 @@ const messages$K = defineMessages({
|
|
|
329
332
|
id: 'Validation.invalid',
|
|
330
333
|
description: 'An error message to show the id is invalid',
|
|
331
334
|
defaultMessage: 'The resource id is invalid'
|
|
335
|
+
},
|
|
336
|
+
uuid: {
|
|
337
|
+
id: 'Validation.uuid',
|
|
338
|
+
description: 'An error message to show the id is not a valid uuid',
|
|
339
|
+
defaultMessage: 'Invalid ID format. Please enter a valid ID.'
|
|
332
340
|
}
|
|
333
341
|
});
|
|
334
342
|
|
|
@@ -2906,7 +2914,8 @@ const ChannelPickerInput = _ref => {
|
|
|
2906
2914
|
hasError = _ref.hasError,
|
|
2907
2915
|
onError = _ref.onError,
|
|
2908
2916
|
placeholder = _ref.placeholder,
|
|
2909
|
-
roles = _ref.roles
|
|
2917
|
+
roles = _ref.roles,
|
|
2918
|
+
hasWarning = _ref.hasWarning;
|
|
2910
2919
|
const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
2911
2920
|
const _useIntl = useIntl(),
|
|
2912
2921
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -3001,7 +3010,10 @@ const ChannelPickerInput = _ref => {
|
|
|
3001
3010
|
onBlur: onBlur,
|
|
3002
3011
|
value: currentOption.data,
|
|
3003
3012
|
noOptionsMessage: handleNoOptions,
|
|
3004
|
-
hasError: hasError || isLoadingFailed
|
|
3013
|
+
hasError: hasError || isLoadingFailed,
|
|
3014
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
3015
|
+
menuPortalTarget: document.body,
|
|
3016
|
+
hasWarning: hasWarning
|
|
3005
3017
|
})
|
|
3006
3018
|
}), isLoadingFailed && jsx(Text.Body, {
|
|
3007
3019
|
tone: "negative",
|
|
@@ -3796,7 +3808,8 @@ const ProductTypePickerInput = _ref => {
|
|
|
3796
3808
|
onBlur = _ref.onBlur,
|
|
3797
3809
|
value = _ref.value,
|
|
3798
3810
|
hasError = _ref.hasError,
|
|
3799
|
-
onError = _ref.onError
|
|
3811
|
+
onError = _ref.onError,
|
|
3812
|
+
hasWarning = _ref.hasWarning;
|
|
3800
3813
|
const _useIntl = useIntl(),
|
|
3801
3814
|
formatMessage = _useIntl.formatMessage;
|
|
3802
3815
|
const prefixSearchFields = useMemo(() => ['name'], []);
|
|
@@ -3862,7 +3875,10 @@ const ProductTypePickerInput = _ref => {
|
|
|
3862
3875
|
onBlur: onBlur,
|
|
3863
3876
|
value: currentOption.data,
|
|
3864
3877
|
noOptionsMessage: () => loadingError ? null : formatMessage(messages$D.noProductTypesFound),
|
|
3865
|
-
hasError: hasError || isLoadingFailed
|
|
3878
|
+
hasError: hasError || isLoadingFailed,
|
|
3879
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
3880
|
+
menuPortalTarget: document.body,
|
|
3881
|
+
hasWarning: hasWarning
|
|
3866
3882
|
})
|
|
3867
3883
|
}), isLoadingFailed && jsx(Text.Body, {
|
|
3868
3884
|
tone: "negative",
|
|
@@ -3897,7 +3913,8 @@ const StatePickerInput = _ref => {
|
|
|
3897
3913
|
onBlur = _ref.onBlur,
|
|
3898
3914
|
value = _ref.value,
|
|
3899
3915
|
hasError = _ref.hasError,
|
|
3900
|
-
onError = _ref.onError
|
|
3916
|
+
onError = _ref.onError,
|
|
3917
|
+
hasWarning = _ref.hasWarning;
|
|
3901
3918
|
const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
3902
3919
|
const _useIntl = useIntl(),
|
|
3903
3920
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -3983,7 +4000,10 @@ const StatePickerInput = _ref => {
|
|
|
3983
4000
|
onBlur: onBlur,
|
|
3984
4001
|
value: currentOption.data,
|
|
3985
4002
|
noOptionsMessage: handleNoOptions,
|
|
3986
|
-
hasError: hasError || isLoadingFailed
|
|
4003
|
+
hasError: hasError || isLoadingFailed,
|
|
4004
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
4005
|
+
menuPortalTarget: document.body,
|
|
4006
|
+
hasWarning: hasWarning
|
|
3987
4007
|
}, dataLocale)
|
|
3988
4008
|
}), isLoadingFailed && jsx(Text.Body, {
|
|
3989
4009
|
tone: "negative",
|
|
@@ -4363,7 +4383,6 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4363
4383
|
}
|
|
4364
4384
|
};
|
|
4365
4385
|
case 'setLineItemCustomField':
|
|
4366
|
-
case 'setCustomLineItemCustomField':
|
|
4367
4386
|
return {
|
|
4368
4387
|
[actionName]: {
|
|
4369
4388
|
lineItemId: actionPayload.lineItemId,
|
|
@@ -4371,6 +4390,14 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4371
4390
|
value: _JSON$stringify(actionPayload.value)
|
|
4372
4391
|
}
|
|
4373
4392
|
};
|
|
4393
|
+
case 'setCustomLineItemCustomField':
|
|
4394
|
+
return {
|
|
4395
|
+
[actionName]: {
|
|
4396
|
+
customLineItemId: actionPayload.customLineItemId,
|
|
4397
|
+
name: actionPayload.name,
|
|
4398
|
+
value: _JSON$stringify(actionPayload.value)
|
|
4399
|
+
}
|
|
4400
|
+
};
|
|
4374
4401
|
case 'setCustomField':
|
|
4375
4402
|
return {
|
|
4376
4403
|
[actionName]: {
|
|
@@ -5122,7 +5149,7 @@ function _callSuper$4(_this, derived, args) {
|
|
|
5122
5149
|
return _possibleConstructorReturn(_this, isNativeReflectConstruct() ? _Reflect$construct(derived, args || [], _getPrototypeOf(_this).constructor) : derived.apply(_this, args));
|
|
5123
5150
|
}
|
|
5124
5151
|
var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
5125
|
-
const customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel'];
|
|
5152
|
+
const customizableResources = ['asset', 'address', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel'];
|
|
5126
5153
|
const emptyTypeDefinitions = {
|
|
5127
5154
|
total: 0,
|
|
5128
5155
|
count: 0,
|
|
@@ -5460,7 +5487,10 @@ function CustomTextInput(props) {
|
|
|
5460
5487
|
const isMultiLine = props.fieldDefinition.inputHint === 'MultiLine';
|
|
5461
5488
|
const InputComponent = isMultiLine ? MultilineTextInput : TextInput;
|
|
5462
5489
|
const value = props.value || '';
|
|
5463
|
-
const handleChange = makeChangeHandler(rawValue =>
|
|
5490
|
+
const handleChange = makeChangeHandler(rawValue => {
|
|
5491
|
+
props.setFieldValue(props.name, rawValue || undefined);
|
|
5492
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
5493
|
+
});
|
|
5464
5494
|
const tooltipValue = isMultiLine ? '' : value;
|
|
5465
5495
|
return jsx(CustomFieldTooltip, {
|
|
5466
5496
|
title: tooltipValue,
|
|
@@ -5472,7 +5502,8 @@ function CustomTextInput(props) {
|
|
|
5472
5502
|
onBlur: props.onBlur,
|
|
5473
5503
|
hasError: props.hasError,
|
|
5474
5504
|
isDisabled: props.isDisabled,
|
|
5475
|
-
isReadOnly: props.isReadOnly
|
|
5505
|
+
isReadOnly: props.isReadOnly,
|
|
5506
|
+
hasWarning: props.hasWarning
|
|
5476
5507
|
})
|
|
5477
5508
|
});
|
|
5478
5509
|
}
|
|
@@ -5507,6 +5538,7 @@ function CustomLocalizedTextInput(props) {
|
|
|
5507
5538
|
});
|
|
5508
5539
|
const nullifiedIfNeeded = LocalizedTextInput.isEmpty(newValue) ? undefined : newValue;
|
|
5509
5540
|
props.setFieldValue(props.name, nullifiedIfNeeded);
|
|
5541
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
5510
5542
|
});
|
|
5511
5543
|
const InputComponent = isMultiLine ? LocalizedMultilineTextInput : LocalizedTextInput;
|
|
5512
5544
|
const tooltipTitle = isMultiLine ? '' : value ? value[language] ?? '' : '';
|
|
@@ -5521,7 +5553,8 @@ function CustomLocalizedTextInput(props) {
|
|
|
5521
5553
|
selectedLanguage: language,
|
|
5522
5554
|
hasError: props.hasError,
|
|
5523
5555
|
isDisabled: props.isDisabled,
|
|
5524
|
-
isReadOnly: props.isReadOnly
|
|
5556
|
+
isReadOnly: props.isReadOnly,
|
|
5557
|
+
hasWarning: props.hasWarning
|
|
5525
5558
|
})
|
|
5526
5559
|
});
|
|
5527
5560
|
}
|
|
@@ -5536,7 +5569,10 @@ const options$1 = [{
|
|
|
5536
5569
|
}];
|
|
5537
5570
|
function CustomBooleanInput(props) {
|
|
5538
5571
|
const value = isNil$1(props.value) ? props.value : String(props.value);
|
|
5539
|
-
const handleChange = makeChangeHandler(rawValue =>
|
|
5572
|
+
const handleChange = makeChangeHandler(rawValue => {
|
|
5573
|
+
props.setFieldValue(props.name, isNil$1(rawValue) ? undefined : rawValue === 'true');
|
|
5574
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
5575
|
+
});
|
|
5540
5576
|
return jsx(SelectInput, {
|
|
5541
5577
|
id: props.name,
|
|
5542
5578
|
name: props.name,
|
|
@@ -5547,14 +5583,20 @@ function CustomBooleanInput(props) {
|
|
|
5547
5583
|
isClearable: !props.fieldDefinition.required,
|
|
5548
5584
|
isDisabled: props.isDisabled,
|
|
5549
5585
|
isReadOnly: props.isReadOnly,
|
|
5550
|
-
hasError: props.hasError
|
|
5586
|
+
hasError: props.hasError,
|
|
5587
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
5588
|
+
menuPortalTarget: document.body,
|
|
5589
|
+
hasWarning: props.hasWarning
|
|
5551
5590
|
});
|
|
5552
5591
|
}
|
|
5553
5592
|
CustomBooleanInput.displayName = 'CustomBooleanInput';
|
|
5554
5593
|
|
|
5555
5594
|
function CustomNumberInput(props) {
|
|
5556
5595
|
const value = props.value ?? '';
|
|
5557
|
-
const handleChange = makeChangeHandler(rawValue =>
|
|
5596
|
+
const handleChange = makeChangeHandler(rawValue => {
|
|
5597
|
+
props.setFieldValue(props.name, !rawValue ? undefined : Number(rawValue));
|
|
5598
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
5599
|
+
});
|
|
5558
5600
|
return jsx(NumberInput, {
|
|
5559
5601
|
id: props.name,
|
|
5560
5602
|
name: props.name,
|
|
@@ -5563,7 +5605,8 @@ function CustomNumberInput(props) {
|
|
|
5563
5605
|
onBlur: props.onBlur,
|
|
5564
5606
|
hasError: props.hasError,
|
|
5565
5607
|
isDisabled: props.isDisabled,
|
|
5566
|
-
isReadOnly: props.isReadOnly
|
|
5608
|
+
isReadOnly: props.isReadOnly,
|
|
5609
|
+
hasWarning: props.hasWarning
|
|
5567
5610
|
});
|
|
5568
5611
|
}
|
|
5569
5612
|
CustomNumberInput.displayName = 'CustomNumberInput';
|
|
@@ -5630,6 +5673,7 @@ function CustomMoneyInput(props) {
|
|
|
5630
5673
|
internalValue.current = fixedValue;
|
|
5631
5674
|
const converted = MoneyInput.convertToMoneyValue(fixedValue, locale);
|
|
5632
5675
|
props.setFieldValue(props.name, converted || undefined);
|
|
5676
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
5633
5677
|
});
|
|
5634
5678
|
|
|
5635
5679
|
// TODO(pa3): fix setting proper id in UIKit
|
|
@@ -5651,7 +5695,10 @@ function CustomMoneyInput(props) {
|
|
|
5651
5695
|
isReadOnly: props.isReadOnly,
|
|
5652
5696
|
isDisabled: props.isDisabled,
|
|
5653
5697
|
hasError: props.hasError,
|
|
5654
|
-
horizontalConstraint: "scale"
|
|
5698
|
+
horizontalConstraint: "scale",
|
|
5699
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
5700
|
+
menuPortalTarget: document.body,
|
|
5701
|
+
hasWarning: props.hasWarning
|
|
5655
5702
|
})]
|
|
5656
5703
|
});
|
|
5657
5704
|
}
|
|
@@ -5677,7 +5724,10 @@ function CustomLocalizedEnumInput(props) {
|
|
|
5677
5724
|
languages = _useApplicationContex.languages,
|
|
5678
5725
|
dataLocale = _useApplicationContex.dataLocale;
|
|
5679
5726
|
const options = convertTypeValuesToOptions$1(props.fieldDefinition.type, dataLocale, languages);
|
|
5680
|
-
const handleChange = makeChangeHandler(rawValue =>
|
|
5727
|
+
const handleChange = makeChangeHandler(rawValue => {
|
|
5728
|
+
props.setFieldValue(props.name, rawValue);
|
|
5729
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
5730
|
+
});
|
|
5681
5731
|
const tooltipTitle = props.value ? _findInstanceProperty(options).call(options, option => option.value === props.value)?.label ?? '' : '';
|
|
5682
5732
|
return jsx(CustomFieldTooltip, {
|
|
5683
5733
|
title: tooltipTitle,
|
|
@@ -5691,7 +5741,10 @@ function CustomLocalizedEnumInput(props) {
|
|
|
5691
5741
|
isClearable: !props.fieldDefinition.required,
|
|
5692
5742
|
hasError: props.hasError,
|
|
5693
5743
|
isDisabled: props.isDisabled,
|
|
5694
|
-
isReadOnly: props.isReadOnly
|
|
5744
|
+
isReadOnly: props.isReadOnly,
|
|
5745
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
5746
|
+
menuPortalTarget: document.body,
|
|
5747
|
+
hasWarning: props.hasWarning
|
|
5695
5748
|
})
|
|
5696
5749
|
});
|
|
5697
5750
|
}
|
|
@@ -5708,7 +5761,8 @@ function CustomRawIdReferenceInput(props) {
|
|
|
5708
5761
|
onBlur: props.onBlur,
|
|
5709
5762
|
hasError: props.hasError,
|
|
5710
5763
|
isDisabled: props.isDisabled,
|
|
5711
|
-
isReadOnly: props.isReadOnly
|
|
5764
|
+
isReadOnly: props.isReadOnly,
|
|
5765
|
+
hasWarning: props.hasWarning
|
|
5712
5766
|
})
|
|
5713
5767
|
});
|
|
5714
5768
|
}
|
|
@@ -5893,7 +5947,10 @@ function ReferenceSearch(props) {
|
|
|
5893
5947
|
isReadOnly: props.isReadOnly,
|
|
5894
5948
|
onBlur: props.onBlur,
|
|
5895
5949
|
hasError: props.hasError,
|
|
5896
|
-
noOptionsMessage: () => props.noResultsLabel
|
|
5950
|
+
noOptionsMessage: () => props.noResultsLabel,
|
|
5951
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
5952
|
+
menuPortalTarget: document.body,
|
|
5953
|
+
hasWarning: props.hasWarning
|
|
5897
5954
|
})]
|
|
5898
5955
|
})
|
|
5899
5956
|
})]
|
|
@@ -6023,7 +6080,8 @@ function CategoryReferenceSearch(props) {
|
|
|
6023
6080
|
mapItemToOption: mapItemToOption,
|
|
6024
6081
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
6025
6082
|
loadItemsByIds: loadItemsByIds,
|
|
6026
|
-
filterOption: filterOption$1
|
|
6083
|
+
filterOption: filterOption$1,
|
|
6084
|
+
hasWarning: props.hasWarning
|
|
6027
6085
|
});
|
|
6028
6086
|
}
|
|
6029
6087
|
|
|
@@ -6226,7 +6284,8 @@ function CartDiscountReferenceSearch(props) {
|
|
|
6226
6284
|
mapItemToOption: mapItemToOption,
|
|
6227
6285
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
6228
6286
|
loadItemsByIds: loadItemsByIds,
|
|
6229
|
-
filterOption: filterOption
|
|
6287
|
+
filterOption: filterOption,
|
|
6288
|
+
hasWarning: props.hasWarning
|
|
6230
6289
|
})
|
|
6231
6290
|
});
|
|
6232
6291
|
}
|
|
@@ -6253,7 +6312,8 @@ function CustomCategoryReferenceInput(props) {
|
|
|
6253
6312
|
hasError: props.hasError,
|
|
6254
6313
|
isReadOnly: props.isReadOnly,
|
|
6255
6314
|
isDisabled: props.isDisabled,
|
|
6256
|
-
isClearable: !props.fieldDefinition.required
|
|
6315
|
+
isClearable: !props.fieldDefinition.required,
|
|
6316
|
+
hasWarning: props.hasWarning
|
|
6257
6317
|
});
|
|
6258
6318
|
}
|
|
6259
6319
|
CustomCategoryReferenceInput.displayName = 'CustomCategoryReferenceInput';
|
|
@@ -6279,7 +6339,8 @@ function CustomCartDiscountReferenceInput(props) {
|
|
|
6279
6339
|
onBlur: handleBlur,
|
|
6280
6340
|
hasError: props.hasError,
|
|
6281
6341
|
isDisabled: props.isDisabled || props.isReadOnly,
|
|
6282
|
-
isClearable: !props.fieldDefinition.required
|
|
6342
|
+
isClearable: !props.fieldDefinition.required,
|
|
6343
|
+
hasWarning: props.hasWarning
|
|
6283
6344
|
});
|
|
6284
6345
|
}
|
|
6285
6346
|
|
|
@@ -6312,7 +6373,8 @@ const ProductPickerInput = _ref => {
|
|
|
6312
6373
|
value = _ref.value,
|
|
6313
6374
|
hasError = _ref.hasError,
|
|
6314
6375
|
onError = _ref.onError,
|
|
6315
|
-
showLoadingErrorMessage = _ref.showLoadingErrorMessage
|
|
6376
|
+
showLoadingErrorMessage = _ref.showLoadingErrorMessage,
|
|
6377
|
+
hasWarning = _ref.hasWarning;
|
|
6316
6378
|
const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
6317
6379
|
const _useIntl = useIntl(),
|
|
6318
6380
|
formatMessage = _useIntl.formatMessage;
|
|
@@ -6395,7 +6457,10 @@ const ProductPickerInput = _ref => {
|
|
|
6395
6457
|
onBlur: onBlur,
|
|
6396
6458
|
value: currentOption.data,
|
|
6397
6459
|
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$z.noProductsFound),
|
|
6398
|
-
hasError: hasError || isLoadingFailed
|
|
6460
|
+
hasError: hasError || isLoadingFailed,
|
|
6461
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
6462
|
+
menuPortalTarget: document.body,
|
|
6463
|
+
hasWarning: hasWarning
|
|
6399
6464
|
})
|
|
6400
6465
|
}), isLoadingFailed && showLoadingErrorMessage && jsx(Text.Body, {
|
|
6401
6466
|
tone: "negative",
|
|
@@ -6418,7 +6483,8 @@ function CustomProductReferenceInput(props) {
|
|
|
6418
6483
|
onChange: props.onChange,
|
|
6419
6484
|
hasError: props.hasError,
|
|
6420
6485
|
onError: () => null,
|
|
6421
|
-
showLoadingErrorMessage: true
|
|
6486
|
+
showLoadingErrorMessage: true,
|
|
6487
|
+
hasWarning: props.hasWarning
|
|
6422
6488
|
});
|
|
6423
6489
|
}
|
|
6424
6490
|
CustomProductReferenceInput.displayName = 'CustomProductReferenceInput';
|
|
@@ -6434,7 +6500,8 @@ function CustomProductTypeReferenceInput(props) {
|
|
|
6434
6500
|
onBlur: props.onBlur,
|
|
6435
6501
|
onChange: props.onChange,
|
|
6436
6502
|
hasError: props.hasError,
|
|
6437
|
-
onError: () => null
|
|
6503
|
+
onError: () => null,
|
|
6504
|
+
hasWarning: props.hasWarning
|
|
6438
6505
|
});
|
|
6439
6506
|
}
|
|
6440
6507
|
CustomProductTypeReferenceInput.displayName = 'CustomProductTypeReferenceInput';
|
|
@@ -6450,7 +6517,8 @@ function CustomChannelReferenceInput(props) {
|
|
|
6450
6517
|
onBlur: props.onBlur,
|
|
6451
6518
|
onChange: props.onChange,
|
|
6452
6519
|
hasError: props.hasError,
|
|
6453
|
-
onError: () => null
|
|
6520
|
+
onError: () => null,
|
|
6521
|
+
hasWarning: props.hasWarning
|
|
6454
6522
|
});
|
|
6455
6523
|
}
|
|
6456
6524
|
CustomChannelReferenceInput.displayName = 'CustomChannelReferenceInput';
|
|
@@ -6466,7 +6534,8 @@ function CustomStateReferenceInput(props) {
|
|
|
6466
6534
|
onBlur: props.onBlur,
|
|
6467
6535
|
onChange: props.onChange,
|
|
6468
6536
|
hasError: props.hasError,
|
|
6469
|
-
onError: () => null
|
|
6537
|
+
onError: () => null,
|
|
6538
|
+
hasWarning: props.hasWarning
|
|
6470
6539
|
});
|
|
6471
6540
|
}
|
|
6472
6541
|
CustomStateReferenceInput.displayName = 'CustomStateReferenceInput';
|
|
@@ -6480,6 +6549,7 @@ function CustomReferenceInput(props) {
|
|
|
6480
6549
|
typeId: referenceTypeId
|
|
6481
6550
|
} : undefined;
|
|
6482
6551
|
props.setFieldValue(props.name, nullifiedIfNeeded);
|
|
6552
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6483
6553
|
});
|
|
6484
6554
|
const ReferenceInputComponent = referenceTypeId === SEARCHABLE_REFERENCES.category ? CustomCategoryReferenceInput : referenceTypeId === SEARCHABLE_REFERENCES.cartDiscount ? CustomCartDiscountReferenceInput : referenceTypeId === SEARCHABLE_REFERENCES.product ? CustomProductReferenceInput : referenceTypeId === SEARCHABLE_REFERENCES.productType ? CustomProductTypeReferenceInput : referenceTypeId === SEARCHABLE_REFERENCES.channel ? CustomChannelReferenceInput : referenceTypeId === SEARCHABLE_REFERENCES.state ? CustomStateReferenceInput : CustomRawIdReferenceInput;
|
|
6485
6555
|
return jsx(ReferenceInputComponent, {
|
|
@@ -6492,7 +6562,8 @@ function CustomReferenceInput(props) {
|
|
|
6492
6562
|
isReadOnly: props.isReadOnly,
|
|
6493
6563
|
onBlur: props.onBlur,
|
|
6494
6564
|
hasError: props.hasError,
|
|
6495
|
-
onChange: handleChange
|
|
6565
|
+
onChange: handleChange,
|
|
6566
|
+
hasWarning: props.hasWarning
|
|
6496
6567
|
});
|
|
6497
6568
|
}
|
|
6498
6569
|
CustomReferenceInput.displayName = 'CustomReferenceInput';
|
|
@@ -6503,6 +6574,7 @@ function CustomDateTimeInput(props) {
|
|
|
6503
6574
|
const typeName = props.fieldDefinition.type.name.toLowerCase();
|
|
6504
6575
|
const handleChange = makeChangeHandler(rawValue => {
|
|
6505
6576
|
props.setFieldValue(props.name, rawValue || undefined);
|
|
6577
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6506
6578
|
});
|
|
6507
6579
|
const InputComponent = typeName === 'date' ? DateInput : DateTimeInput;
|
|
6508
6580
|
return jsx(InputComponent, {
|
|
@@ -6514,7 +6586,8 @@ function CustomDateTimeInput(props) {
|
|
|
6514
6586
|
timeZone: timeZone,
|
|
6515
6587
|
hasError: props.hasError,
|
|
6516
6588
|
isDisabled: props.isDisabled,
|
|
6517
|
-
isReadOnly: props.isReadOnly
|
|
6589
|
+
isReadOnly: props.isReadOnly,
|
|
6590
|
+
hasWarning: props.hasWarning
|
|
6518
6591
|
});
|
|
6519
6592
|
}
|
|
6520
6593
|
CustomDateTimeInput.displayName = 'CustomDateTimeInput';
|
|
@@ -6549,6 +6622,7 @@ function CustomTimeInput(props) {
|
|
|
6549
6622
|
lastValueSentToFormik.current = in24hFormat;
|
|
6550
6623
|
props.setFieldValue(props.name, in24hFormat);
|
|
6551
6624
|
}
|
|
6625
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6552
6626
|
});
|
|
6553
6627
|
return jsx(TimeInput, {
|
|
6554
6628
|
id: props.name,
|
|
@@ -6559,7 +6633,8 @@ function CustomTimeInput(props) {
|
|
|
6559
6633
|
timeZone: timeZone,
|
|
6560
6634
|
hasError: props.hasError,
|
|
6561
6635
|
isDisabled: props.isDisabled,
|
|
6562
|
-
isReadOnly: props.isReadOnly
|
|
6636
|
+
isReadOnly: props.isReadOnly,
|
|
6637
|
+
hasWarning: props.hasWarning
|
|
6563
6638
|
});
|
|
6564
6639
|
}
|
|
6565
6640
|
CustomTimeInput.displayName = 'CustomTimeInput';
|
|
@@ -6570,7 +6645,10 @@ const convertTypeValuesToOptions = defaultMemoize(typeValues => _mapInstanceProp
|
|
|
6570
6645
|
})));
|
|
6571
6646
|
function CustomEnumInput(props) {
|
|
6572
6647
|
const options = convertTypeValuesToOptions(_valuesInstanceProperty(props.fieldDefinition.type));
|
|
6573
|
-
const handleChange = makeChangeHandler(rawValue =>
|
|
6648
|
+
const handleChange = makeChangeHandler(rawValue => {
|
|
6649
|
+
props.setFieldValue(props.name, rawValue);
|
|
6650
|
+
props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
|
|
6651
|
+
});
|
|
6574
6652
|
const tooltipTitle = props.value ? _findInstanceProperty(options).call(options, option => option.value === props.value)?.label ?? '' : '';
|
|
6575
6653
|
return jsx(CustomFieldTooltip, {
|
|
6576
6654
|
title: tooltipTitle,
|
|
@@ -6584,7 +6662,10 @@ function CustomEnumInput(props) {
|
|
|
6584
6662
|
options: options,
|
|
6585
6663
|
hasError: props.hasError,
|
|
6586
6664
|
isDisabled: props.isDisabled,
|
|
6587
|
-
isReadOnly: props.isReadOnly
|
|
6665
|
+
isReadOnly: props.isReadOnly,
|
|
6666
|
+
hasWarning: props.hasWarning,
|
|
6667
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
6668
|
+
menuPortalTarget: document.body
|
|
6588
6669
|
})
|
|
6589
6670
|
});
|
|
6590
6671
|
}
|
|
@@ -6633,8 +6714,11 @@ function CustomBooleanInputSet(props) {
|
|
|
6633
6714
|
onBlur: props.onBlur,
|
|
6634
6715
|
isClearable: !props.fieldDefinition.required,
|
|
6635
6716
|
hasError: props.hasError,
|
|
6717
|
+
hasWarning: props.hasWarning,
|
|
6636
6718
|
isDisabled: props.isDisabled,
|
|
6637
|
-
isReadOnly: props.isReadOnly
|
|
6719
|
+
isReadOnly: props.isReadOnly,
|
|
6720
|
+
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
6721
|
+
menuPortalTarget: document.body
|
|
6638
6722
|
});
|
|
6639
6723
|
}
|
|
6640
6724
|
CustomBooleanInputSet.displayName = 'CustomBooleanInputSet';
|
|
@@ -6685,7 +6769,8 @@ const attributeDefinitionToFieldDefinition = attributeDefinition => ({
|
|
|
6685
6769
|
inputTip: attributeDefinition.inputTip,
|
|
6686
6770
|
required: attributeDefinition.isRequired,
|
|
6687
6771
|
type: attributeDefinition.type,
|
|
6688
|
-
assignedAttributeGroups: attributeDefinition.assignedAttributeGroups
|
|
6772
|
+
assignedAttributeGroups: attributeDefinition.assignedAttributeGroups,
|
|
6773
|
+
attributeConstraint: attributeDefinition.attributeConstraint
|
|
6689
6774
|
});
|
|
6690
6775
|
const nameValuePairsToMap = pairs => _reduceInstanceProperty(pairs).call(pairs, (result, _ref2) => {
|
|
6691
6776
|
let name = _ref2.name,
|
|
@@ -6739,7 +6824,10 @@ function ProductAttributes(_ref) {
|
|
|
6739
6824
|
fieldDefinitions: fieldDefinitions,
|
|
6740
6825
|
setFieldValue: setFieldValue,
|
|
6741
6826
|
inputValuesConverter: convertInputValue,
|
|
6742
|
-
WrapperComponent: WrapperComponent
|
|
6827
|
+
WrapperComponent: WrapperComponent,
|
|
6828
|
+
renderWarnings: props.renderWarnings,
|
|
6829
|
+
renderCustomWarnings: props.renderCustomWarnings,
|
|
6830
|
+
handleWarningChange: props.handleWarningChange
|
|
6743
6831
|
})
|
|
6744
6832
|
})
|
|
6745
6833
|
});
|
|
@@ -7347,7 +7435,10 @@ function CustomInputSet(props) {
|
|
|
7347
7435
|
setFieldValue: setItemValue,
|
|
7348
7436
|
value: fieldValue,
|
|
7349
7437
|
hasError: props.hasError,
|
|
7350
|
-
|
|
7438
|
+
hasWarning: props.hasWarning,
|
|
7439
|
+
WrapperComponent: props.WrapperComponent,
|
|
7440
|
+
renderWarnings: props.renderWarnings,
|
|
7441
|
+
handleWarningChange: props.handleWarningChange
|
|
7351
7442
|
}), jsx(SetButtons, {
|
|
7352
7443
|
index: index,
|
|
7353
7444
|
isFirstItem: !isExpanded || index === 0,
|
|
@@ -7410,7 +7501,10 @@ const CustomFieldInput = /*#__PURE__*/memo(props => {
|
|
|
7410
7501
|
isReadOnly: props.isReadOnly,
|
|
7411
7502
|
onBlur: props.onBlur,
|
|
7412
7503
|
setFieldValue: props.setFieldValue,
|
|
7413
|
-
hasError: props.hasError
|
|
7504
|
+
hasError: props.hasError,
|
|
7505
|
+
hasWarning: props.hasWarning,
|
|
7506
|
+
handleWarningChange: props.handleWarningChange,
|
|
7507
|
+
renderWarnings: props.renderWarnings
|
|
7414
7508
|
});
|
|
7415
7509
|
});
|
|
7416
7510
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
@@ -7466,7 +7560,10 @@ function CustomNestedFieldInput(props) {
|
|
|
7466
7560
|
isDisabled: props.isDisabled,
|
|
7467
7561
|
isReadOnly: props.isReadOnly,
|
|
7468
7562
|
setFieldValue: props.setFieldValue,
|
|
7469
|
-
onBlur: props.onBlur
|
|
7563
|
+
onBlur: props.onBlur,
|
|
7564
|
+
hasWarning: props.hasWarning,
|
|
7565
|
+
handleWarningChange: props.handleWarningChange,
|
|
7566
|
+
renderWarnings: props.renderWarnings
|
|
7470
7567
|
})]
|
|
7471
7568
|
});
|
|
7472
7569
|
}
|
|
@@ -7690,7 +7787,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
7690
7787
|
errors = _useFormikContext.errors,
|
|
7691
7788
|
touched = _useFormikContext.touched,
|
|
7692
7789
|
values = _valuesInstanceProperty(_useFormikContext),
|
|
7693
|
-
handleBlur = _useFormikContext.handleBlur
|
|
7790
|
+
handleBlur = _useFormikContext.handleBlur,
|
|
7791
|
+
status = _useFormikContext.status;
|
|
7694
7792
|
const didFormValidationFail = useDidFormValidationFail();
|
|
7695
7793
|
const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
|
|
7696
7794
|
const _useDnDContext = useDnDContext(),
|
|
@@ -7706,6 +7804,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7706
7804
|
const isTouched = Boolean(getIn(touched, fieldName));
|
|
7707
7805
|
const fieldErrors = getIn(errors, fieldName);
|
|
7708
7806
|
const value = props.inputValuesConverter(fieldName, getIn(values, fieldName));
|
|
7807
|
+
|
|
7709
7808
|
// We want to highlight fields with errors not only after a form submission,
|
|
7710
7809
|
// but also after manually triggered form validation.
|
|
7711
7810
|
const hasError = Boolean(fieldErrors) && (isTouched || didFormValidationFail);
|
|
@@ -7724,7 +7823,10 @@ const CustomFieldsInternal = _ref => {
|
|
|
7724
7823
|
isReadOnly: props.isReadOnly,
|
|
7725
7824
|
onBlur: handleBlur,
|
|
7726
7825
|
setFieldValue: props.setFieldValue,
|
|
7727
|
-
hasError: hasError
|
|
7826
|
+
hasError: hasError,
|
|
7827
|
+
hasWarning: props.renderWarnings && status?.warnings[fieldName],
|
|
7828
|
+
handleWarningChange: props.handleWarningChange,
|
|
7829
|
+
renderWarnings: props.renderWarnings
|
|
7728
7830
|
};
|
|
7729
7831
|
const Field = jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
7730
7832
|
return jsx(FastField, {
|
|
@@ -7748,7 +7850,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7748
7850
|
alignItems: "stretch",
|
|
7749
7851
|
children: [WrapperComponent ? jsx(WrapperComponent, {
|
|
7750
7852
|
children: Field
|
|
7751
|
-
}) : Field, jsx(CustomFieldErrors, {
|
|
7853
|
+
}) : Field, props.renderWarnings && status?.warnings[fieldName] && props.renderCustomWarnings(fieldDefinition), jsx(CustomFieldErrors, {
|
|
7752
7854
|
isTouched: isTouched,
|
|
7753
7855
|
errors: fieldErrors
|
|
7754
7856
|
})]
|
|
@@ -7761,6 +7863,9 @@ const CustomFieldsInternal = _ref => {
|
|
|
7761
7863
|
});
|
|
7762
7864
|
};
|
|
7763
7865
|
CustomFieldsInternal.displayName = 'CustomFieldsInternal';
|
|
7866
|
+
CustomFieldsInternal.defaultProps = {
|
|
7867
|
+
renderCustomWarnings: () => null
|
|
7868
|
+
};
|
|
7764
7869
|
|
|
7765
7870
|
const nopConverter = (fieldName, fieldValue) => fieldValue;
|
|
7766
7871
|
const CustomFields = props => {
|
|
@@ -7893,6 +7998,10 @@ function ProductSelectionBasicSelectDropdown(props) {
|
|
|
7893
7998
|
isReadOnly: props.isReadOnly,
|
|
7894
7999
|
hasWarning: props.hasWarning,
|
|
7895
8000
|
hasError: props.hasError,
|
|
8001
|
+
errors: {
|
|
8002
|
+
missing: props.hasError
|
|
8003
|
+
},
|
|
8004
|
+
touched: props.touched,
|
|
7896
8005
|
isClearable: props.isClearable,
|
|
7897
8006
|
menuPortalTarget: props.menuPortalTarget,
|
|
7898
8007
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
@@ -8012,6 +8121,10 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
8012
8121
|
defaultOptions: getDefaultOptions(),
|
|
8013
8122
|
hasWarning: props.hasWarning,
|
|
8014
8123
|
hasError: props.hasError,
|
|
8124
|
+
errors: {
|
|
8125
|
+
missing: props.hasError
|
|
8126
|
+
},
|
|
8127
|
+
touched: props.touched,
|
|
8015
8128
|
isClearable: props.isClearable,
|
|
8016
8129
|
menuPortalTarget: props.menuPortalTarget,
|
|
8017
8130
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
@@ -8156,6 +8269,10 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8156
8269
|
isDisabled: props.isDisabled || productSelectionsByFieldFetcher.isLoading,
|
|
8157
8270
|
isReadOnly: props.isReadOnly,
|
|
8158
8271
|
hasWarning: props.hasWarning,
|
|
8272
|
+
errors: {
|
|
8273
|
+
missing: props.hasError
|
|
8274
|
+
},
|
|
8275
|
+
touched: props.touched,
|
|
8159
8276
|
isClearable: props.isClearable,
|
|
8160
8277
|
hasError: props.hasError,
|
|
8161
8278
|
menuPortalTarget: props.menuPortalTarget,
|
|
@@ -8978,6 +9095,7 @@ const StoresSearchSelectInput = props => {
|
|
|
8978
9095
|
maxMenuHeight: props.maxMenuHeight,
|
|
8979
9096
|
menuPortalTarget: props.menuPortalTarget,
|
|
8980
9097
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
9098
|
+
menuIsOpen: props.menuIsOpen,
|
|
8981
9099
|
components: props.components,
|
|
8982
9100
|
controlShouldRenderValue: props.controlShouldRenderValue
|
|
8983
9101
|
}, filterDataAttributes$1(props)), filterAriaAttributes(props))), jsx(FieldErrors, {
|
|
@@ -12628,8 +12746,10 @@ const validateMultiOptionEnum = (selectedOption, intl) => {
|
|
|
12628
12746
|
};
|
|
12629
12747
|
|
|
12630
12748
|
// eslint-disable-next-line import/prefer-default-export
|
|
12631
|
-
const validateText = (text, intl)
|
|
12749
|
+
const validateText = function (text, intl) {
|
|
12750
|
+
let type = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
12632
12751
|
if (validateSingleFilter(text)) return intl.formatMessage(messages$K.required);
|
|
12752
|
+
if (type === 'id' && !isUUID(text.value)) return intl.formatMessage(messages$K.uuid);
|
|
12633
12753
|
return null;
|
|
12634
12754
|
};
|
|
12635
12755
|
|