@commercetools-frontend/experimental-components 6.3.2 → 6.4.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/dist/commercetools-frontend-experimental-components.cjs.dev.js +347 -240
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +345 -236
- package/dist/commercetools-frontend-experimental-components.esm.js +347 -240
- package/dist/styles.css +108 -107
- package/package.json +23 -21
|
@@ -266,6 +266,7 @@ const INTERVALS_IN_SECONDS = {
|
|
|
266
266
|
const EXCLUDING_PRODUCTS = 'excludingProducts';
|
|
267
267
|
const PRODUCT_TAILORING_FOR_ATTRIBUTES = 'productTailoringForAttributes';
|
|
268
268
|
const PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT = 'productTailoringForAttributesTypesOtherThanText';
|
|
269
|
+
const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAttributesFallbackValues';
|
|
269
270
|
|
|
270
271
|
// TODO: apply a more robust solution to overlaying issues
|
|
271
272
|
const Z_INDEX_DROPDOWN = 30000;
|
|
@@ -283,7 +284,7 @@ var pickerMessages$1 = reactIntl.defineMessages({
|
|
|
283
284
|
}
|
|
284
285
|
});
|
|
285
286
|
|
|
286
|
-
var messages$
|
|
287
|
+
var messages$R = reactIntl.defineMessages({
|
|
287
288
|
noChannelsFound: {
|
|
288
289
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
289
290
|
description: 'The message to display when no channels were found',
|
|
@@ -367,7 +368,7 @@ const ChannelPickerInput = _ref => {
|
|
|
367
368
|
return inputValue.length === 0 && data.channels.total > 60 ? [...channels, getBottomOption()] : channels;
|
|
368
369
|
}).catch(error => {
|
|
369
370
|
setLoadingError(error);
|
|
370
|
-
onError(error);
|
|
371
|
+
onError && onError(error);
|
|
371
372
|
}), [loadOptions, convertChannelToOption, onError]);
|
|
372
373
|
const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
|
|
373
374
|
const _useHandlers = useHandlers$1(onChange),
|
|
@@ -380,10 +381,10 @@ const ChannelPickerInput = _ref => {
|
|
|
380
381
|
}, [handleInternalInputChange]);
|
|
381
382
|
const isCurrentOptionLoadingFailed = Boolean(currentOption?.error);
|
|
382
383
|
React.useEffect(() => {
|
|
383
|
-
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
384
|
+
if (isCurrentOptionLoadingFailed && onError) onError(currentOption.error);
|
|
384
385
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
385
386
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
386
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
387
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$R.noChannelsFound), [loadingError, formatMessage]);
|
|
387
388
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
388
389
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
389
390
|
max: "scale",
|
|
@@ -394,7 +395,7 @@ const ChannelPickerInput = _ref => {
|
|
|
394
395
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
395
396
|
id: name,
|
|
396
397
|
name: name,
|
|
397
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
398
|
+
placeholder: placeholder ?? formatMessage(messages$R.placeholder),
|
|
398
399
|
loadOptions: loadOptionsDebounced,
|
|
399
400
|
defaultOptions: true,
|
|
400
401
|
showOptionGroupDivider: true,
|
|
@@ -450,7 +451,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
450
451
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
451
452
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
452
453
|
|
|
453
|
-
var messages$
|
|
454
|
+
var messages$Q = reactIntl.defineMessages({
|
|
454
455
|
noProductTypesFound: {
|
|
455
456
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
456
457
|
description: 'The message to display when no product types were found',
|
|
@@ -539,7 +540,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
539
540
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
540
541
|
id: name,
|
|
541
542
|
name: name,
|
|
542
|
-
placeholder: formatMessage(messages$
|
|
543
|
+
placeholder: formatMessage(messages$Q.placeholder),
|
|
543
544
|
loadOptions: loadOptionsDebounced,
|
|
544
545
|
defaultOptions: [],
|
|
545
546
|
isClearable: isClearable,
|
|
@@ -552,7 +553,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
552
553
|
onInputChange: handleInputChange,
|
|
553
554
|
onBlur: onBlur,
|
|
554
555
|
value: currentOption.data,
|
|
555
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
556
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$Q.noProductTypesFound),
|
|
556
557
|
hasError: hasError || isLoadingFailed,
|
|
557
558
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
558
559
|
menuPortalTarget: document.body,
|
|
@@ -568,7 +569,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
568
569
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
569
570
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
570
571
|
|
|
571
|
-
var messages$
|
|
572
|
+
var messages$P = reactIntl.defineMessages({
|
|
572
573
|
noStatesFound: {
|
|
573
574
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
574
575
|
description: 'The message to display when no states were found',
|
|
@@ -652,7 +653,7 @@ const StatePickerInput = _ref => {
|
|
|
652
653
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
653
654
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
654
655
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
655
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
656
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$P.noStatesFound), [loadingError, formatMessage]);
|
|
656
657
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
657
658
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
658
659
|
max: "scale",
|
|
@@ -664,7 +665,7 @@ const StatePickerInput = _ref => {
|
|
|
664
665
|
id: name,
|
|
665
666
|
name: name,
|
|
666
667
|
horizontalConstraint: "scale",
|
|
667
|
-
placeholder: formatMessage(messages$
|
|
668
|
+
placeholder: formatMessage(messages$P.placeholder),
|
|
668
669
|
loadOptions: loadOptionsDebounced,
|
|
669
670
|
defaultOptions: true,
|
|
670
671
|
showOptionGroupDivider: true,
|
|
@@ -721,7 +722,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
721
722
|
};
|
|
722
723
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
723
724
|
|
|
724
|
-
var messages$
|
|
725
|
+
var messages$O = reactIntl.defineMessages({
|
|
725
726
|
bottomOption: {
|
|
726
727
|
id: 'Products.Pickers.bottomOption',
|
|
727
728
|
description: 'The message to display at the end of the options menu',
|
|
@@ -733,7 +734,7 @@ function ownKeys$1p(e, r) { var t = _Object$keys__default["default"](e); if (_Ob
|
|
|
733
734
|
function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
734
735
|
const getBottomOption = formatMessage => ({
|
|
735
736
|
options: [{
|
|
736
|
-
label: formatMessage ? formatMessage(messages$
|
|
737
|
+
label: formatMessage ? formatMessage(messages$O.bottomOption) : messages$O.bottomOption,
|
|
737
738
|
isBottomOption: true,
|
|
738
739
|
isDisabled: true
|
|
739
740
|
}]
|
|
@@ -780,7 +781,7 @@ const useHandlers = onChange => {
|
|
|
780
781
|
};
|
|
781
782
|
var useHandlers$1 = useHandlers;
|
|
782
783
|
|
|
783
|
-
const _excluded$
|
|
784
|
+
const _excluded$e = ["extraWhere"];
|
|
784
785
|
function ownKeys$1n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
785
786
|
function _objectSpread$1n(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1n(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1n(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
786
787
|
const constructPrefixSearchPredicate$1 = function () {
|
|
@@ -823,7 +824,7 @@ const useLoadOptions = _ref => {
|
|
|
823
824
|
}
|
|
824
825
|
const _ref2 = variables ?? {},
|
|
825
826
|
extraWhere = _ref2.extraWhere,
|
|
826
|
-
restVariables = _objectWithoutProperties(_ref2, _excluded$
|
|
827
|
+
restVariables = _objectWithoutProperties(_ref2, _excluded$e);
|
|
827
828
|
if (typeof extraWhere === 'string') {
|
|
828
829
|
where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
|
|
829
830
|
}
|
|
@@ -842,7 +843,7 @@ const useLoadOptions = _ref => {
|
|
|
842
843
|
};
|
|
843
844
|
var useLoadOptions$1 = useLoadOptions;
|
|
844
845
|
|
|
845
|
-
var FetchIndicesExist$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end:
|
|
846
|
+
var FetchIndicesExist$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 269, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n productSelections {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
846
847
|
const useExecuteGraphQLRequest = () => {
|
|
847
848
|
const apolloClient = react.useApolloClient();
|
|
848
849
|
return React.useCallback((query, variables, context, fetchPolicy) => {
|
|
@@ -1256,7 +1257,7 @@ ThrottledField.defaultProps = {
|
|
|
1256
1257
|
};
|
|
1257
1258
|
var ThrottledField$1 = ThrottledField;
|
|
1258
1259
|
|
|
1259
|
-
var messages$
|
|
1260
|
+
var messages$N = reactIntl.defineMessages({
|
|
1260
1261
|
buttonLabel: {
|
|
1261
1262
|
id: 'SearchInput.buttonLabel',
|
|
1262
1263
|
description: 'Label for "Search" button.',
|
|
@@ -1361,7 +1362,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1361
1362
|
"data-testid": this.props.testId || 'search-input',
|
|
1362
1363
|
value: this.state.text,
|
|
1363
1364
|
label: this.props.label,
|
|
1364
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
1365
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$N.placeholder),
|
|
1365
1366
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
1366
1367
|
onChange: this.handleInputChange,
|
|
1367
1368
|
onEnter: this.handleEnter,
|
|
@@ -2030,7 +2031,7 @@ const usePersistedReminder = function () {
|
|
|
2030
2031
|
};
|
|
2031
2032
|
var usePersistedReminder$1 = usePersistedReminder;
|
|
2032
2033
|
|
|
2033
|
-
var messages$
|
|
2034
|
+
var messages$M = reactIntl.defineMessages({
|
|
2034
2035
|
profileUpdated: {
|
|
2035
2036
|
id: 'NotificationText.profileUpdated',
|
|
2036
2037
|
description: 'Label for the notification header',
|
|
@@ -2067,9 +2068,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2067
2068
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2068
2069
|
as: "p",
|
|
2069
2070
|
isBold: true,
|
|
2070
|
-
intlMessage: messages$
|
|
2071
|
+
intlMessage: messages$M.profileUpdated
|
|
2071
2072
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2072
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
2073
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.addMoreInformation), {}, {
|
|
2073
2074
|
values: {
|
|
2074
2075
|
newline: getNewLine
|
|
2075
2076
|
}
|
|
@@ -2078,7 +2079,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2078
2079
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2079
2080
|
scale: "xs",
|
|
2080
2081
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2081
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
2082
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.informationAndProfileLink), {}, {
|
|
2082
2083
|
values: {
|
|
2083
2084
|
newline: getNewLine,
|
|
2084
2085
|
link: getLinkToProfile
|
|
@@ -2203,7 +2204,7 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2203
2204
|
};
|
|
2204
2205
|
var useEventCallback$1 = useEventCallback;
|
|
2205
2206
|
|
|
2206
|
-
var messages$
|
|
2207
|
+
var messages$L = reactIntl.defineMessages({
|
|
2207
2208
|
fallbackHint: {
|
|
2208
2209
|
id: 'KeyFallback.fallbackHint',
|
|
2209
2210
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2227,7 +2228,7 @@ const useLocalizedKeyFallback = () => {
|
|
|
2227
2228
|
return values => {
|
|
2228
2229
|
if (!values.resource) return null;
|
|
2229
2230
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2230
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2231
|
+
const fallbackHintWithKey = intl.formatMessage(messages$L.fallbackHint, {
|
|
2231
2232
|
key: values.resource.key
|
|
2232
2233
|
});
|
|
2233
2234
|
if (!localizedString) return fallbackHintWithKey;
|
|
@@ -3884,7 +3885,7 @@ function formatMoney$2(moneyValue, intl, options) {
|
|
|
3884
3885
|
}, options));
|
|
3885
3886
|
}
|
|
3886
3887
|
|
|
3887
|
-
var messages$
|
|
3888
|
+
var messages$K = reactIntl.defineMessages({
|
|
3888
3889
|
booleanYes: {
|
|
3889
3890
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
3890
3891
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -3966,7 +3967,7 @@ const formatDateTime = _ref7 => {
|
|
|
3966
3967
|
const formatBoolean = _ref8 => {
|
|
3967
3968
|
let value = _ref8.value,
|
|
3968
3969
|
intl = _ref8.intl;
|
|
3969
|
-
return value ? intl.formatMessage(messages$
|
|
3970
|
+
return value ? intl.formatMessage(messages$K.booleanYes) : intl.formatMessage(messages$K.booleanNo);
|
|
3970
3971
|
};
|
|
3971
3972
|
const formatNilType = _ref9 => {
|
|
3972
3973
|
let value = _ref9.value,
|
|
@@ -4125,9 +4126,9 @@ const getPrefixSearchBounds = input => {
|
|
|
4125
4126
|
};
|
|
4126
4127
|
var getPrefixSearchBounds$1 = getPrefixSearchBounds;
|
|
4127
4128
|
|
|
4128
|
-
const _excluded$
|
|
4129
|
+
const _excluded$d = ["action"];
|
|
4129
4130
|
function ownKeys$15(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
4130
|
-
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
4131
|
+
function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context10, _context11; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context10 = ownKeys$15(Object(t), !0)).call(_context10, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context11 = ownKeys$15(Object(t))).call(_context11, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
4131
4132
|
|
|
4132
4133
|
/**
|
|
4133
4134
|
* Checks if a value is a LocalizedString
|
|
@@ -4264,6 +4265,7 @@ const createAttributeTypeValue = attribute => {
|
|
|
4264
4265
|
const formatMoney = valueType => money => {
|
|
4265
4266
|
switch (valueType) {
|
|
4266
4267
|
case 'fixed':
|
|
4268
|
+
case 'fixedCart':
|
|
4267
4269
|
return {
|
|
4268
4270
|
[money.type]: _objectSpread$15({
|
|
4269
4271
|
centAmount: money.centAmount,
|
|
@@ -4295,6 +4297,7 @@ const convertChangeValueAction = actionPayload => {
|
|
|
4295
4297
|
absolute: ['money'],
|
|
4296
4298
|
absoluteCart: ['money', 'applicationMode'],
|
|
4297
4299
|
fixed: ['money'],
|
|
4300
|
+
fixedCart: ['money', 'applicationMode'],
|
|
4298
4301
|
giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
|
|
4299
4302
|
};
|
|
4300
4303
|
const filteredValue = pick__default["default"](actionPayload.value, possibleTypeKeys[valueType]);
|
|
@@ -4318,7 +4321,7 @@ const convertChangeValueAction = actionPayload => {
|
|
|
4318
4321
|
* as its dynamic content can not be typed in SDL for the mutation.
|
|
4319
4322
|
*/
|
|
4320
4323
|
const convertAction = (actionName, actionPayload) => {
|
|
4321
|
-
var _context3, _context4, _context5;
|
|
4324
|
+
var _context3, _context4, _context5, _context6, _context7;
|
|
4322
4325
|
const getNameFromPayload = payload => {
|
|
4323
4326
|
// changeName for `Organizations`
|
|
4324
4327
|
if (typeof payload.name === 'string') return payload;
|
|
@@ -4599,18 +4602,26 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4599
4602
|
return {
|
|
4600
4603
|
[actionName]: {
|
|
4601
4604
|
target: {
|
|
4602
|
-
[actionPayload.target.type]: omit__default["default"](actionPayload.target, ['type', '__typename'])
|
|
4605
|
+
[actionPayload.target.type]: _objectSpread$15(_objectSpread$15(_objectSpread$15({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
|
|
4606
|
+
triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
|
|
4607
|
+
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
4608
|
+
}))
|
|
4609
|
+
}), actionPayload.target.targetPattern && {
|
|
4610
|
+
targetPattern: _mapInstanceProperty__default["default"](_context7 = actionPayload.target.targetPattern).call(_context7, pattern => ({
|
|
4611
|
+
[pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
|
|
4612
|
+
}))
|
|
4613
|
+
})
|
|
4603
4614
|
}
|
|
4604
4615
|
}
|
|
4605
4616
|
};
|
|
4606
4617
|
case 'addAddress':
|
|
4607
4618
|
case 'changeAddress':
|
|
4608
4619
|
{
|
|
4609
|
-
var
|
|
4620
|
+
var _context8;
|
|
4610
4621
|
const _ref3 = actionPayload.address?.custom || {},
|
|
4611
4622
|
_ref3$fields = _ref3.fields,
|
|
4612
4623
|
fields = _ref3$fields === void 0 ? {} : _ref3$fields;
|
|
4613
|
-
const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](
|
|
4624
|
+
const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context8 = _Object$entries__default["default"](fields)).call(_context8, _ref4 => {
|
|
4614
4625
|
let _ref5 = _slicedToArray(_ref4, 2),
|
|
4615
4626
|
name = _ref5[0],
|
|
4616
4627
|
value = _ref5[1];
|
|
@@ -4635,13 +4646,13 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4635
4646
|
}
|
|
4636
4647
|
case 'setAddressCustomType':
|
|
4637
4648
|
{
|
|
4638
|
-
var
|
|
4649
|
+
var _context9;
|
|
4639
4650
|
const _ref6 = actionPayload || {},
|
|
4640
4651
|
addressId = _ref6.addressId,
|
|
4641
4652
|
_ref6$fields = _ref6.fields,
|
|
4642
4653
|
fields = _ref6$fields === void 0 ? {} : _ref6$fields,
|
|
4643
4654
|
type = _ref6.type;
|
|
4644
|
-
const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](
|
|
4655
|
+
const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context9 = _Object$entries__default["default"](fields)).call(_context9, _ref7 => {
|
|
4645
4656
|
let _ref8 = _slicedToArray(_ref7, 2),
|
|
4646
4657
|
name = _ref8[0],
|
|
4647
4658
|
value = _ref8[1];
|
|
@@ -4669,7 +4680,7 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4669
4680
|
};
|
|
4670
4681
|
const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
|
|
4671
4682
|
let actionName = _ref9.action,
|
|
4672
|
-
actionPayload = _objectWithoutProperties(_ref9, _excluded$
|
|
4683
|
+
actionPayload = _objectWithoutProperties(_ref9, _excluded$d);
|
|
4673
4684
|
return [...previousActions, convertAction(actionName, actionPayload)];
|
|
4674
4685
|
}, []);
|
|
4675
4686
|
const extractErrorFromGraphQlResponse = graphQlResponse => {
|
|
@@ -5073,7 +5084,7 @@ function uniqueObjects(items) {
|
|
|
5073
5084
|
|
|
5074
5085
|
*/
|
|
5075
5086
|
|
|
5076
|
-
const messages$
|
|
5087
|
+
const messages$J = reactIntl.defineMessages({
|
|
5077
5088
|
unique: {
|
|
5078
5089
|
id: 'Validation.unique',
|
|
5079
5090
|
description: 'An error message to show if the field must be unique',
|
|
@@ -5115,7 +5126,7 @@ const messages$I = reactIntl.defineMessages({
|
|
|
5115
5126
|
defaultMessage: 'Invalid ID format. Please enter a valid ID.'
|
|
5116
5127
|
}
|
|
5117
5128
|
});
|
|
5118
|
-
var validationMessages = messages$
|
|
5129
|
+
var validationMessages = messages$J;
|
|
5119
5130
|
|
|
5120
5131
|
function getIndexesOfInvalidValues(values) {
|
|
5121
5132
|
let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -5371,7 +5382,7 @@ function ReferenceSearch(props) {
|
|
|
5371
5382
|
});
|
|
5372
5383
|
}
|
|
5373
5384
|
|
|
5374
|
-
const messages$
|
|
5385
|
+
const messages$H = reactIntl.defineMessages({
|
|
5375
5386
|
placeholder: {
|
|
5376
5387
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
5377
5388
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -5398,7 +5409,7 @@ const messages$G = reactIntl.defineMessages({
|
|
|
5398
5409
|
defaultMessage: 'Enter search term'
|
|
5399
5410
|
}
|
|
5400
5411
|
});
|
|
5401
|
-
var messages$
|
|
5412
|
+
var messages$I = messages$H;
|
|
5402
5413
|
|
|
5403
5414
|
function ownKeys$11(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5404
5415
|
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -5423,7 +5434,7 @@ function Option$1(props) {
|
|
|
5423
5434
|
fallbackOrder: languages
|
|
5424
5435
|
})
|
|
5425
5436
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
5426
|
-
children: [formatMessage(messages$
|
|
5437
|
+
children: [formatMessage(messages$I.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
|
|
5427
5438
|
})]
|
|
5428
5439
|
})
|
|
5429
5440
|
}));
|
|
@@ -5499,10 +5510,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5499
5510
|
onBlur: props.onBlur,
|
|
5500
5511
|
onChange: props.onChange,
|
|
5501
5512
|
value: returnNullIfEmpty(props.value),
|
|
5502
|
-
placeholderLabel: formatMessage(messages$
|
|
5503
|
-
searchPromptLabel: formatMessage(messages$
|
|
5504
|
-
noResultsLabel: formatMessage(messages$
|
|
5505
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5513
|
+
placeholderLabel: formatMessage(messages$I.placeholder),
|
|
5514
|
+
searchPromptLabel: formatMessage(messages$I.searchPrompt),
|
|
5515
|
+
noResultsLabel: formatMessage(messages$I.noResults),
|
|
5516
|
+
referenceIsMissingLabel: formatMessage(messages$I.isMissing),
|
|
5506
5517
|
mapItemToOption: mapItemToOption,
|
|
5507
5518
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5508
5519
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5512,7 +5523,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5512
5523
|
});
|
|
5513
5524
|
}
|
|
5514
5525
|
|
|
5515
|
-
const messages$
|
|
5526
|
+
const messages$F = reactIntl.defineMessages({
|
|
5516
5527
|
placeholder: {
|
|
5517
5528
|
id: 'CategoryReferenceSearch.placeholder',
|
|
5518
5529
|
description: 'Placeholder for search for a category',
|
|
@@ -5544,7 +5555,7 @@ const messages$E = reactIntl.defineMessages({
|
|
|
5544
5555
|
defaultMessage: 'Parent Category'
|
|
5545
5556
|
}
|
|
5546
5557
|
});
|
|
5547
|
-
var messages$
|
|
5558
|
+
var messages$G = messages$F;
|
|
5548
5559
|
|
|
5549
5560
|
function ownKeys$$(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5550
5561
|
function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -5569,7 +5580,7 @@ function Option(props) {
|
|
|
5569
5580
|
fallbackOrder: languages
|
|
5570
5581
|
})
|
|
5571
5582
|
}), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5572
|
-
children: `${formatMessage(messages$
|
|
5583
|
+
children: `${formatMessage(messages$G.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
|
|
5573
5584
|
key: 'name',
|
|
5574
5585
|
locale: language,
|
|
5575
5586
|
fallbackOrder: languages
|
|
@@ -5581,7 +5592,7 @@ function Option(props) {
|
|
|
5581
5592
|
fallbackOrder: languages
|
|
5582
5593
|
})}`
|
|
5583
5594
|
}), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5584
|
-
children: `${formatMessage(messages$
|
|
5595
|
+
children: `${formatMessage(messages$G.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
|
|
5585
5596
|
})]
|
|
5586
5597
|
})
|
|
5587
5598
|
}));
|
|
@@ -5629,10 +5640,10 @@ function CategoryReferenceSearch(props) {
|
|
|
5629
5640
|
onBlur: props.onBlur,
|
|
5630
5641
|
onChange: props.onChange,
|
|
5631
5642
|
value: props.value,
|
|
5632
|
-
placeholderLabel: formatMessage(messages$
|
|
5633
|
-
searchPromptLabel: formatMessage(messages$
|
|
5634
|
-
noResultsLabel: formatMessage(messages$
|
|
5635
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5643
|
+
placeholderLabel: formatMessage(messages$G.placeholder),
|
|
5644
|
+
searchPromptLabel: formatMessage(messages$G.searchPrompt),
|
|
5645
|
+
noResultsLabel: formatMessage(messages$G.noResults),
|
|
5646
|
+
referenceIsMissingLabel: formatMessage(messages$G.isMissing),
|
|
5636
5647
|
mapItemToOption: mapItemToOption,
|
|
5637
5648
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5638
5649
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5657,6 +5668,7 @@ function useCachedCategoryOptions(ids) {
|
|
|
5657
5668
|
}]));
|
|
5658
5669
|
}
|
|
5659
5670
|
|
|
5671
|
+
const _excluded$c = ["type"];
|
|
5660
5672
|
function ownKeys$Z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5661
5673
|
function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5662
5674
|
var styles$g = {
|
|
@@ -5684,7 +5696,10 @@ var styles$g = {
|
|
|
5684
5696
|
"save-alt": "button-module__save-alt___6iHMF button-module__save___1-KXp button-module__confirm___-W92x button-module__button___1OzVf button-module__alt___Z6PWx",
|
|
5685
5697
|
"add-button": "button-module__add-button___1f093"
|
|
5686
5698
|
};
|
|
5687
|
-
const Button =
|
|
5699
|
+
const Button = _ref => {
|
|
5700
|
+
let _ref$type = _ref.type,
|
|
5701
|
+
type = _ref$type === void 0 ? 'button' : _ref$type,
|
|
5702
|
+
props = _objectWithoutProperties(_ref, _excluded$c);
|
|
5688
5703
|
const className = props.className,
|
|
5689
5704
|
onClick = props.onClick,
|
|
5690
5705
|
isDisabled = props.isDisabled,
|
|
@@ -5694,7 +5709,7 @@ const Button = props => {
|
|
|
5694
5709
|
const dataProps = filterDataAttributes(props);
|
|
5695
5710
|
return jsxRuntime.jsx("button", _objectSpread$Z(_objectSpread$Z({
|
|
5696
5711
|
onClick: isDisabled ? null : onClick,
|
|
5697
|
-
type:
|
|
5712
|
+
type: type,
|
|
5698
5713
|
className: classnames__default["default"](styles$g.button, isDisabled ? styles$g.disabled : null, className),
|
|
5699
5714
|
disabled: isDisabled,
|
|
5700
5715
|
"aria-label": props['aria-label']
|
|
@@ -5703,12 +5718,9 @@ const Button = props => {
|
|
|
5703
5718
|
}));
|
|
5704
5719
|
};
|
|
5705
5720
|
Button.displayName = 'Button';
|
|
5706
|
-
Button.defaultProps = {
|
|
5707
|
-
type: 'button'
|
|
5708
|
-
};
|
|
5709
5721
|
var Button$1 = Button;
|
|
5710
5722
|
|
|
5711
|
-
var messages$
|
|
5723
|
+
var messages$E = reactIntl.defineMessages({
|
|
5712
5724
|
chooseFile: {
|
|
5713
5725
|
id: 'ButtonFileInput.chooseFile',
|
|
5714
5726
|
description: 'The label text of the field for upload local file',
|
|
@@ -5716,34 +5728,39 @@ var messages$D = reactIntl.defineMessages({
|
|
|
5716
5728
|
}
|
|
5717
5729
|
});
|
|
5718
5730
|
|
|
5731
|
+
const _excluded$b = ["children", "allowMultiple", "acceptTypes"];
|
|
5719
5732
|
function ownKeys$Y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5720
5733
|
function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5721
5734
|
var styles$f = {
|
|
5722
5735
|
"button": "file-input-module__button___2KypN",
|
|
5723
5736
|
"input": "file-input-module__input___3MP4D"
|
|
5724
5737
|
};
|
|
5725
|
-
const FileInput =
|
|
5726
|
-
children
|
|
5727
|
-
|
|
5728
|
-
|
|
5729
|
-
|
|
5730
|
-
|
|
5731
|
-
|
|
5732
|
-
|
|
5733
|
-
|
|
5734
|
-
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5738
|
+
const FileInput = _ref => {
|
|
5739
|
+
let _ref$children = _ref.children,
|
|
5740
|
+
children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$E.chooseFile)) : _ref$children,
|
|
5741
|
+
_ref$allowMultiple = _ref.allowMultiple,
|
|
5742
|
+
allowMultiple = _ref$allowMultiple === void 0 ? false : _ref$allowMultiple,
|
|
5743
|
+
_ref$acceptTypes = _ref.acceptTypes,
|
|
5744
|
+
acceptTypes = _ref$acceptTypes === void 0 ? 'image/png,image/jpeg,image/gif' : _ref$acceptTypes,
|
|
5745
|
+
props = _objectWithoutProperties(_ref, _excluded$b);
|
|
5746
|
+
return jsxRuntime.jsx("label", {
|
|
5747
|
+
children: jsxRuntime.jsxs("span", {
|
|
5748
|
+
className: styles$f.button,
|
|
5749
|
+
children: [jsxRuntime.jsx("input", {
|
|
5750
|
+
className: styles$f.input,
|
|
5751
|
+
type: "file",
|
|
5752
|
+
accept: acceptTypes,
|
|
5753
|
+
name: props.name,
|
|
5754
|
+
onChange: props.onChange,
|
|
5755
|
+
multiple: allowMultiple
|
|
5756
|
+
}), children]
|
|
5757
|
+
})
|
|
5758
|
+
});
|
|
5743
5759
|
};
|
|
5760
|
+
FileInput.displayName = 'FileInput';
|
|
5744
5761
|
var FileInput$1 = FileInput;
|
|
5745
5762
|
|
|
5746
|
-
var messages$
|
|
5763
|
+
var messages$D = reactIntl.defineMessages({
|
|
5747
5764
|
countriesBasicSelectPlaceholder: {
|
|
5748
5765
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
5749
5766
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -5764,7 +5781,7 @@ var messages$C = reactIntl.defineMessages({
|
|
|
5764
5781
|
function ownKeys$X(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5765
5782
|
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$X(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$X(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5766
5783
|
const emptyCountryOption = intl => [{
|
|
5767
|
-
label: intl.formatMessage(messages$
|
|
5784
|
+
label: intl.formatMessage(messages$D.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
5768
5785
|
value: undefined,
|
|
5769
5786
|
isDisabled: true
|
|
5770
5787
|
}];
|
|
@@ -5806,7 +5823,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
5806
5823
|
var _context3;
|
|
5807
5824
|
return _findInstanceProperty__default["default"](_context3 = props.options).call(_context3, country => country.value === countryCode);
|
|
5808
5825
|
}),
|
|
5809
|
-
placeholder: intl.formatMessage(messages$
|
|
5826
|
+
placeholder: intl.formatMessage(messages$D.countriesAsyncSelectPlaceholder),
|
|
5810
5827
|
loadOptions: handleLoadOptions,
|
|
5811
5828
|
onChange: onOptionChange,
|
|
5812
5829
|
isDisabled: props.isDisabled,
|
|
@@ -5826,7 +5843,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
5826
5843
|
value: props.value,
|
|
5827
5844
|
isRequired: props.isRequired,
|
|
5828
5845
|
description: props.description,
|
|
5829
|
-
placeholder: intl.formatMessage(messages$
|
|
5846
|
+
placeholder: intl.formatMessage(messages$D.countriesBasicSelectPlaceholder),
|
|
5830
5847
|
options: props.options,
|
|
5831
5848
|
onChange: props.onChange,
|
|
5832
5849
|
isDisabled: props.isDisabled,
|
|
@@ -5838,22 +5855,31 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
5838
5855
|
|
|
5839
5856
|
const COUNTRIES_ASYNC_LOADING_LIMIT = 60;
|
|
5840
5857
|
|
|
5858
|
+
const _excluded$a = ["countriesAsyncLoadingLimit", "isMulti", "isRequired", "hasWarning"];
|
|
5841
5859
|
function ownKeys$W(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5842
5860
|
function _objectSpread$W(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$W(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$W(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5843
|
-
function CountriesPicker(
|
|
5844
|
-
|
|
5861
|
+
function CountriesPicker(_ref) {
|
|
5862
|
+
let _ref$countriesAsyncLo = _ref.countriesAsyncLoadingLimit,
|
|
5863
|
+
countriesAsyncLoadingLimit = _ref$countriesAsyncLo === void 0 ? COUNTRIES_ASYNC_LOADING_LIMIT : _ref$countriesAsyncLo,
|
|
5864
|
+
_ref$isMulti = _ref.isMulti,
|
|
5865
|
+
isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
|
|
5866
|
+
_ref$isRequired = _ref.isRequired,
|
|
5867
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
5868
|
+
_ref$hasWarning = _ref.hasWarning,
|
|
5869
|
+
hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
|
|
5870
|
+
props = _objectWithoutProperties(_ref, _excluded$a);
|
|
5871
|
+
const CustomCountriesPicker = props.options?.length <= countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
|
|
5845
5872
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
5846
|
-
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$W({
|
|
5873
|
+
children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$W({
|
|
5874
|
+
countriesAsyncLoadingLimit: countriesAsyncLoadingLimit,
|
|
5875
|
+
isMulti: isMulti,
|
|
5876
|
+
isRequired: isRequired,
|
|
5877
|
+
hasWarning: hasWarning
|
|
5878
|
+
}, props))
|
|
5847
5879
|
});
|
|
5848
5880
|
}
|
|
5849
|
-
CountriesPicker.defaultProps = {
|
|
5850
|
-
countriesAsyncLoadingLimit: COUNTRIES_ASYNC_LOADING_LIMIT,
|
|
5851
|
-
isMulti: false,
|
|
5852
|
-
isRequired: false,
|
|
5853
|
-
hasWarning: false
|
|
5854
|
-
};
|
|
5855
5881
|
|
|
5856
|
-
var messages$
|
|
5882
|
+
var messages$C = reactIntl.defineMessages({
|
|
5857
5883
|
noCustomerGroupsFound: {
|
|
5858
5884
|
id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
|
|
5859
5885
|
description: 'The message to display when no customer groups were found',
|
|
@@ -5943,7 +5969,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5943
5969
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
5944
5970
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
5945
5971
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
5946
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
5972
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$C.noCustomerGroupsFound), [loadingError, formatMessage]);
|
|
5947
5973
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
5948
5974
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
5949
5975
|
max: "scale",
|
|
@@ -5954,7 +5980,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
5954
5980
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
5955
5981
|
id: name,
|
|
5956
5982
|
name: name,
|
|
5957
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
5983
|
+
placeholder: placeholder ?? formatMessage(messages$C.placeholder),
|
|
5958
5984
|
loadOptions: loadOptionsDebounced,
|
|
5959
5985
|
defaultOptions: true,
|
|
5960
5986
|
showOptionGroupDivider: true,
|
|
@@ -6089,16 +6115,24 @@ const makeChangeHandler = setValue => event => {
|
|
|
6089
6115
|
// attributes.
|
|
6090
6116
|
const omitUnknownValues = (valuesAsMap, fieldDefinitionsAsMap) => omitBy__default["default"](valuesAsMap, (value, key) => isNil__default["default"](fieldDefinitionsAsMap[key]));
|
|
6091
6117
|
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6118
|
+
var messages$B = reactIntl.defineMessages({
|
|
6119
|
+
booleanSetInputYesLabel: {
|
|
6120
|
+
id: 'CustomBooleanInputSet.booleanSetInputYesLabel',
|
|
6121
|
+
description: 'Custom boolean input set Yes label',
|
|
6122
|
+
defaultMessage: 'YES'
|
|
6123
|
+
},
|
|
6124
|
+
booleanSetInputNoLabel: {
|
|
6125
|
+
id: 'CustomBooleanInputSet.booleanSetInputNoLabel',
|
|
6126
|
+
description: 'Custom boolean input set No label',
|
|
6127
|
+
defaultMessage: 'NO'
|
|
6128
|
+
},
|
|
6129
|
+
booleanSetInputAllLabel: {
|
|
6130
|
+
id: 'CustomBooleanInputSet.booleanSetInputAllLabel',
|
|
6131
|
+
description: 'Custom boolean input set All label',
|
|
6132
|
+
defaultMessage: 'ALL'
|
|
6133
|
+
}
|
|
6134
|
+
});
|
|
6135
|
+
|
|
6102
6136
|
const valueToBooleanSet = value => {
|
|
6103
6137
|
switch (value) {
|
|
6104
6138
|
case 'true':
|
|
@@ -6119,6 +6153,18 @@ const mapToValue = value => {
|
|
|
6119
6153
|
};
|
|
6120
6154
|
function CustomBooleanInputSet(props) {
|
|
6121
6155
|
const value = mapToValue(props.value);
|
|
6156
|
+
const _useIntl = reactIntl.useIntl(),
|
|
6157
|
+
formatMessage = _useIntl.formatMessage;
|
|
6158
|
+
const options = React.useMemo(() => [{
|
|
6159
|
+
value: 'true',
|
|
6160
|
+
label: formatMessage(messages$B.booleanSetInputYesLabel)
|
|
6161
|
+
}, {
|
|
6162
|
+
value: 'false',
|
|
6163
|
+
label: formatMessage(messages$B.booleanSetInputNoLabel)
|
|
6164
|
+
}, {
|
|
6165
|
+
value: 'all',
|
|
6166
|
+
label: formatMessage(messages$B.booleanSetInputAllLabel)
|
|
6167
|
+
}], [formatMessage]);
|
|
6122
6168
|
const handleChange = makeChangeHandler(rawValue => {
|
|
6123
6169
|
const nullifiedIfNeeded = !rawValue ? undefined : valueToBooleanSet(rawValue);
|
|
6124
6170
|
props.setFieldValue(props.name, nullifiedIfNeeded);
|
|
@@ -6127,7 +6173,7 @@ function CustomBooleanInputSet(props) {
|
|
|
6127
6173
|
id: props.name,
|
|
6128
6174
|
name: props.name,
|
|
6129
6175
|
value: value,
|
|
6130
|
-
options: options
|
|
6176
|
+
options: options,
|
|
6131
6177
|
onChange: handleChange,
|
|
6132
6178
|
onBlur: props.onBlur,
|
|
6133
6179
|
isClearable: !props.fieldDefinition.required,
|
|
@@ -6540,7 +6586,8 @@ function CustomLocalizedTextInput(props) {
|
|
|
6540
6586
|
hasError: props.hasError,
|
|
6541
6587
|
isDisabled: props.isDisabled,
|
|
6542
6588
|
isReadOnly: props.isReadOnly,
|
|
6543
|
-
hasWarning: props.hasWarning
|
|
6589
|
+
hasWarning: props.hasWarning,
|
|
6590
|
+
additionalInfo: props.additionalInfo
|
|
6544
6591
|
})
|
|
6545
6592
|
});
|
|
6546
6593
|
}
|
|
@@ -7351,7 +7398,8 @@ function CustomTimeInput(props) {
|
|
|
7351
7398
|
setInternalValue = _useState2[1];
|
|
7352
7399
|
const lastValueSentToFormik = React.useRef();
|
|
7353
7400
|
React.useEffect(() => {
|
|
7354
|
-
if (lastValueSentToFormik.current !== props.value
|
|
7401
|
+
if (lastValueSentToFormik.current !== props.value || !lastValueSentToFormik.current && !props.value // not updating tailored value when the value is empty
|
|
7402
|
+
) {
|
|
7355
7403
|
setInternalValue(formatTime(props.value));
|
|
7356
7404
|
}
|
|
7357
7405
|
}, [props.value, formatTime]);
|
|
@@ -7428,7 +7476,8 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
|
7428
7476
|
hasError: props.hasError,
|
|
7429
7477
|
hasWarning: props.hasWarning,
|
|
7430
7478
|
handleWarningChange: props.handleWarningChange,
|
|
7431
|
-
renderWarnings: props.renderWarnings
|
|
7479
|
+
renderWarnings: props.renderWarnings,
|
|
7480
|
+
additionalInfo: props.additionalInfo
|
|
7432
7481
|
});
|
|
7433
7482
|
});
|
|
7434
7483
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
@@ -7542,8 +7591,7 @@ var _ref$1 = process.env.NODE_ENV === "production" ? {
|
|
|
7542
7591
|
styles: "cursor:pointer;line-height:normal"
|
|
7543
7592
|
} : {
|
|
7544
7593
|
name: "471ze2-CustomFieldsCountIndicator",
|
|
7545
|
-
styles: "cursor:pointer;line-height:normal;label:CustomFieldsCountIndicator;",
|
|
7546
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1maWVsZHMtbGFiZWwuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9KZ0IiLCJmaWxlIjoiY3VzdG9tLWZpZWxkcy1sYWJlbC5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBtZW1vIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCB7IHVzZVF1ZXJ5IH0gZnJvbSAnQGFwb2xsby9jbGllbnQvcmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IFJlYWN0RE9NIGZyb20gJ3JlYWN0LWRvbSc7XG5pbXBvcnQgeyBGb3JtYXR0ZWRNZXNzYWdlLCB1c2VJbnRsIH0gZnJvbSAncmVhY3QtaW50bCc7XG5pbXBvcnQgeyB1c2VBcHBsaWNhdGlvbkNvbnRleHQgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1zaGVsbC1jb25uZWN0b3JzJztcbmltcG9ydCB7IEdSQVBIUUxfVEFSR0VUUyB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL2NvbnN0YW50cyc7XG5pbXBvcnQgeyBmb3JtYXRMb2NhbGl6ZWRTdHJpbmcgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGV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GxpY2F0aW9uQ29udGV4dC5wcm9qZWN0Lmxhbmd1YWdlcyxcbiAgICAgIGxhbmd1YWdlOiBhcHBsaWNhdGlvbkNvbnRleHQuZGF0YUxvY2FsZSxcbiAgICB9KVxuICApO1xuXG4gIHJldHVybiAoXG4gICAgPEZpZWxkTGFiZWxcbiAgICAgIGh0bWxGb3I9e25hbWV9XG4gICAgICB0aXRsZT17XG4gICAgICAgIDxDb25zdHJhaW50cy5Ib3Jpem9udGFsIG1heD1cInNjYWxlXCI+XG4gICAgICAgICAgPFNwYWNpbmdzLklubGluZSBzY2FsZT1cInNcIiBhbGlnbkl0ZW1zPVwiZmxleC1lbmRcIj5cbiAgICAgICAgICAgIDxkaXY+XG4gICAgICAgICAgICAgIHtmb3JtYXRMb2NhbGl6ZWRTdHJpbmcoZmllbGREZWZpbml0aW9uLCB7XG4gICAgICAgICAgICAgICAga2V5OiAnbGFiZWwnLFxuICAgICAgICAgICAgICAgIGxvY2FsZTogbGFuZ3VhZ2UsXG4gICAgICAgICAgICAgICAgZmFsbGJhY2tPcmRlcjogbGFuZ3VhZ2VzLFxuICAgICAgICAgICAgICAgIGZhbGxiYWNrOiBmaWVsZERlZmluaXRpb24ubmFtZSxcbiAgICAgICAgICAgICAgfSl9XG4gICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgIDxDdXN0b21GaWVsZHNDb3VudEluZGljYXRvclxuICAgICAgICAgICAgICBhc3NpZ25lZEF0dHJpYnV0ZUdyb3Vwcz17ZmllbGREZWZpbml0aW9uLmFzc2lnbmVkQXR0cmlidXRlR3JvdXBzfVxuICAgICAgICAgICAgLz5cbiAgICAgICAgICA8L1NwYWNpbmdzLklubGluZT5cbiAgICAgICAgPC9Db25zdHJhaW50cy5Ib3Jpem9udGFsPlxuICAgICAgfVxuICAgICAgZGVzY3JpcHRpb249e1xuICAgICAgICA8Q3VzdG9tRmllbGRzTGFiZWxTdWJ0aXRsZSBmaWVsZERlZmluaXRpb249e2ZpZWxkRGVmaW5pdGlvbn0gLz5cbiAgICAgIH1cbiAgICAgIGhpbnQ9ezxDdXN0b21GaWVsZHNMYWJlbEhpbnQgZmllbGREZWZpbml0aW9uPXtmaWVsZERlZmluaXRpb259IC8+fVxuICAgICAgaGFzUmVxdWlyZWRJbmRpY2F0b3I9e2ZpZWxkRGVmaW5pdGlvbi5yZXF1aXJlZH1cbiAgICAvPlxuICApO1xufSk7XG5DdXN0b21GaWVsZHNMYWJlbC5kaXNwbGF5TmFtZSA9ICdDdXN0b21GaWVsZHNUaXRsZSc7XG5DdXN0b21GaWVsZHNMYWJlbC5wcm9wVHlwZXMgPSB7XG4gIG5hbWU6IFByb3BUeXBlcy5zdHJpbmcuaXNSZXF1aXJlZCxcbiAgZmllbGREZWZpbml0aW9uOiBQcm9wVHlwZXMuc2hhcGUoe1xuICAgIGFzc2lnbmVkQXR0cmlidXRlR3JvdXBzOiBQcm9wVHlwZXMuYXJyYXksXG4gICAgbmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICBpbnB1dFRpcDogUHJvcFR5cGVzLm9iamVjdCxcbiAgICByZXF1aXJlZDogUHJvcFR5cGVzLmJvb2wsXG4gIH0pLFxufTtcbmV4cG9ydCBkZWZhdWx0IEN1c3RvbUZpZWxkc0xhYmVsO1xuIl19 */",
|
|
7594
|
+
styles: "cursor:pointer;line-height:normal;label:CustomFieldsCountIndicator;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImN1c3RvbS1maWVsZHMtbGFiZWwuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9KZ0IiLCJmaWxlIjoiY3VzdG9tLWZpZWxkcy1sYWJlbC5qc3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBtZW1vIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IFByb3BUeXBlcyBmcm9tICdwcm9wLXR5cGVzJztcbmltcG9ydCB7IHVzZVF1ZXJ5I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nB1dFRpcDogUHJvcFR5cGVzLm9iamVjdCxcbiAgICByZXF1aXJlZDogUHJvcFR5cGVzLmJvb2wsXG4gIH0pLFxufTtcbmV4cG9ydCBkZWZhdWx0IEN1c3RvbUZpZWxkc0xhYmVsO1xuIl19 */",
|
|
7547
7595
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1
|
|
7548
7596
|
};
|
|
7549
7597
|
function CustomFieldsCountIndicator(_ref4) {
|
|
@@ -7690,8 +7738,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
|
|
|
7690
7738
|
styles: "z-index:100000!important"
|
|
7691
7739
|
} : {
|
|
7692
7740
|
name: "4jor1w-child",
|
|
7693
|
-
styles: "z-index:100000!important;label:child;",
|
|
7694
|
-
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyYWdnYWJsZS13cmFwcGVyLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q29CIiwiZmlsZSI6ImRyYWdnYWJsZS13cmFwcGVyLmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBEcmFnZ2FibGUgfSBmcm9tICdyZWFjdC1iZWF1dGlmdWwtZG5kJztcbmltcG9ydCBSZWFjdERPTSBmcm9tICdyZWFjdC1kb20nO1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcywgR3JpZCwgQ2FyZCB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCc7XG5pbXBvcnQgeyBEcmFnSGFuZGxlIH0gZnJvbSAnLi9kcmFnLWhhbmRsZSc7XG5cbmV4cG9ydCBjb25zdCBEcmFnZ2FibGVXcmFwcGVyID0gKHtcbiAgY2hpbGRyZW4sXG4gIGRy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gICAgei1pbmRleDogMTAwMDAwICFpbXBvcnRhbnQ7XG4gICAgICAgICAgICBgfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxEcmFnZ2luZ0NhcmQgaXNEcmFnZ2luZz17c25hcHNob3QuaXNEcmFnZ2luZ30+XG4gICAgICAgICAgICAgIDxHcmlkXG4gICAgICAgICAgICAgICAgZ3JpZFRlbXBsYXRlQ29sdW1ucz17JzFmciAyMGZyJ31cbiAgICAgICAgICAgICAgICBncmlkVGVtcGxhdGVSb3dzPVwiYXV0byAxZnIgYXV0b1wiXG4gICAgICAgICAgICAgICAgZ3JpZEdhcD17XG4gICAgICAgICAgICAgICAgICBzbmFwc2hvdC5pc0RyYWdnaW5nXG4gICAgICAgICAgICAgICAgICAgID8gY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU1xuICAgICAgICAgICAgICAgICAgICA6IGN1c3RvbVByb3BlcnRpZXMuc3BhY2luZ01cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8R3JpZC5JdGVtPlxuICAgICAgICAgICAgICAgICAgPERyYWdIYW5kbGUgey4uLnByb3ZpZGVkLmRyYWdIYW5kbGVQcm9wc30gLz5cbiAgICAgICAgICAgICAgICA8L0dyaWQuSXRlbT5cbiAgICAgICAgICAgICAgICA8R3JpZC5JdGVtPntjaGlsZHJlbn08L0dyaWQuSXRlbT5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC9EcmFnZ2luZ0NhcmQ+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG5cbiAgICAgICAgaWYgKCFzbmFwc2hvdC5pc0RyYWdnaW5nKSB7XG4gICAgICAgICAgcmV0dXJuIGNoaWxkO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gcmVuZGVyIHRoZSBkcmFnZ2FibGUgaW4gdGhlIHBvcnRhbCB3aGVuIGl0J3MgYmVpbmcgZHJhZ2dlZFxuICAgICAgICByZXR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G4gICAgICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICAgICAgei1pbmRleDogMTAwMDAwICFpbXBvcnRhbnQ7XG4gICAgICAgICAgICBgfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxEcmFnZ2luZ0NhcmQgaXNEcmFnZ2luZz17c25hcHNob3QuaXNEcmFnZ2luZ30+XG4gICAgICAgICAgICAgIDxHcmlkXG4gICAgICAgICAgICAgICAgZ3JpZFRlbXBsYXRlQ29sdW1ucz17JzFmciAyMGZyJ31cbiAgICAgICAgICAgICAgICBncmlkVGVtcGxhdGVSb3dzPVwiYXV0byAxZnIgYXV0b1wiXG4gICAgICAgICAgICAgICAgZ3JpZEdhcD17XG4gICAgICAgICAgICAgICAgICBzbmFwc2hvdC5pc0RyYWdnaW5nXG4gICAgICAgICAgICAgICAgICAgID8gY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU1xuICAgICAgICAgICAgICAgICAgICA6IGN1c3RvbVByb3BlcnRpZXMuc3BhY2luZ01cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8R3JpZC5JdGVtPlxuICAgICAgICAgICAgICAgICAgPERyYWdIYW5kbGUgey4uLnByb3ZpZGVkLmRyYWdIYW5kbGVQcm9wc30gLz5cbiAgICAgICAgICAgICAgICA8L0dyaWQuSXRlbT5cbiAgICAgICAgICAgICAgICA8R3JpZC5JdGVtPntjaGlsZHJlbn08L0dyaWQuSXRlbT5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC9EcmFnZ2luZ0NhcmQ+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG5cbiAgICAgICAgaWYgKCFzbmFwc2hvdC5pc0RyYWdnaW5nKSB7XG4gICAgICAgICAgcmV0dXJuIGNoaWxkO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gcmVuZGVyIHRoZSBkcmFnZ2FibGUgaW4gdGhlIHBvcnRhbCB3aGVuIGl0J3MgYmVpbmcgZHJhZ2dlZFxuICAgICAgICByZXR1cm4gUmVhY3RET00uY3JlYXRlUG9ydGFsKDxkaXY+e2NoaWxkfTwvZGl2PiwgcG9ydGFsKTtcbiAgICAgIH19XG4gICAgPC9EcmFnZ2FibGU+XG4gICk7XG59O1xuXG5EcmFnZ2FibGVXcmFwcGVyLnByb3BUeXBlcyA9IHtcbiAgZHJhZ2dhYmxlS2V5OiBQcm9wVHlwZXMuc3RyaW5nLmlzUmVxdWlyZWQsXG4gIGluZGV4OiBQcm9wVHlwZXMubnVtYmVyLmlzUmVxdWlyZWQsXG4gIGRyYWdnYWJsZUlkOiBQcm9wVHlwZXMuc3RyaW5nLmlzUmVxdWlyZWQsXG4gIGNoaWxkcmVuOiBQcm9wVHlwZXMubm9kZS5pc1JlcXVpcmVkLFxufTtcbiJdfQ== */",
|
|
7695
7742
|
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
7696
7743
|
};
|
|
7697
7744
|
const DraggableWrapper = _ref2 => {
|
|
@@ -7815,22 +7862,22 @@ const useDnDContext = () => {
|
|
|
7815
7862
|
return React.useContext(DnDContext);
|
|
7816
7863
|
};
|
|
7817
7864
|
|
|
7818
|
-
const _excluded$
|
|
7865
|
+
const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
|
|
7819
7866
|
function ownKeys$J(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7820
7867
|
function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$J(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$J(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7821
7868
|
const existingAttributeTypes = ['text', 'ltext'];
|
|
7822
|
-
const newAttributeTypes = ['text', 'ltext', 'number']; // Add more types here
|
|
7823
|
-
|
|
7869
|
+
const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
|
|
7870
|
+
const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
|
|
7824
7871
|
const getFieldName = (parentName, fieldName) => {
|
|
7825
7872
|
if (!parentName) return fieldName;
|
|
7826
7873
|
return `${parentName}.${fieldName}`;
|
|
7827
7874
|
};
|
|
7828
|
-
function
|
|
7875
|
+
const isAttributeType = function () {
|
|
7829
7876
|
let fieldDefinitionType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
7830
7877
|
let isTailoringAttributeForOtherTypes = arguments.length > 1 ? arguments[1] : undefined;
|
|
7831
7878
|
const attributeTypes = isTailoringAttributeForOtherTypes ? newAttributeTypes : existingAttributeTypes;
|
|
7832
|
-
return _includesInstanceProperty__default["default"](attributeTypes).call(attributeTypes, fieldDefinitionType.name);
|
|
7833
|
-
}
|
|
7879
|
+
return _includesInstanceProperty__default["default"](attributeTypes).call(attributeTypes, fieldDefinitionType.name) || isTailoringAttributeForOtherTypes && fieldDefinitionType.name === 'set' && _includesInstanceProperty__default["default"](setAttributeTypes).call(setAttributeTypes, fieldDefinitionType?.elementType?.name);
|
|
7880
|
+
};
|
|
7834
7881
|
const isNested = fieldDefinition => {
|
|
7835
7882
|
const type = fieldDefinition.type;
|
|
7836
7883
|
const typeName = type.name.toLowerCase();
|
|
@@ -7841,8 +7888,10 @@ const isNested = fieldDefinition => {
|
|
|
7841
7888
|
return typeName === CUSTOM_FIELD_TYPES.nested;
|
|
7842
7889
|
};
|
|
7843
7890
|
const CustomFieldsInternal = _ref => {
|
|
7844
|
-
let
|
|
7845
|
-
|
|
7891
|
+
let _ref$renderCustomWarn = _ref.renderCustomWarnings,
|
|
7892
|
+
renderCustomWarnings = _ref$renderCustomWarn === void 0 ? () => null : _ref$renderCustomWarn,
|
|
7893
|
+
WrapperComponent = _ref.WrapperComponent,
|
|
7894
|
+
props = _objectWithoutProperties(_ref, _excluded$9);
|
|
7846
7895
|
const _useFormikContext = formik.useFormikContext(),
|
|
7847
7896
|
errors = _useFormikContext.errors,
|
|
7848
7897
|
touched = _useFormikContext.touched,
|
|
@@ -7851,6 +7900,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7851
7900
|
status = _useFormikContext.status;
|
|
7852
7901
|
const isTailoringAttributesEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
|
|
7853
7902
|
const isTailoringAttributeForOtherTypes = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
|
|
7903
|
+
const isTailoringFallbackEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
|
|
7854
7904
|
const didFormValidationFail = useDidFormValidationFail();
|
|
7855
7905
|
const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
|
|
7856
7906
|
const _useDnDContext = useDnDContext(),
|
|
@@ -7865,6 +7915,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7865
7915
|
const fieldName = getFieldName(props.name, fieldDefinition.name);
|
|
7866
7916
|
const isTouched = Boolean(formik.getIn(touched, fieldName));
|
|
7867
7917
|
const isFieldDisabled = props.isDisabled && !(isAttributeType(fieldDefinition.type, isTailoringAttributeForOtherTypes) && isTailoringAttributesEnabled);
|
|
7918
|
+
const isSet = fieldDefinition.type.name === 'set';
|
|
7868
7919
|
const fieldErrors = formik.getIn(errors, fieldName);
|
|
7869
7920
|
const value = props.inputValuesConverter(fieldName, formik.getIn(values, fieldName));
|
|
7870
7921
|
|
|
@@ -7889,7 +7940,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
7889
7940
|
hasError: hasError,
|
|
7890
7941
|
hasWarning: props.renderWarnings && status?.warnings[fieldName],
|
|
7891
7942
|
handleWarningChange: props.handleWarningChange,
|
|
7892
|
-
renderWarnings: props.renderWarnings
|
|
7943
|
+
renderWarnings: props.renderWarnings,
|
|
7944
|
+
additionalInfo: isTailoringFallbackEnabled && props.additionalInfoHandler && !isSet ? props.additionalInfoHandler(fieldDefinition) : undefined
|
|
7893
7945
|
};
|
|
7894
7946
|
const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$J({}, fieldProps));
|
|
7895
7947
|
return jsxRuntime.jsx(formik.FastField, {
|
|
@@ -7913,7 +7965,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
7913
7965
|
alignItems: "stretch",
|
|
7914
7966
|
children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
|
|
7915
7967
|
children: Field
|
|
7916
|
-
}) : Field, props.renderWarnings && status?.warnings[fieldName] &&
|
|
7968
|
+
}) : Field, props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
|
|
7917
7969
|
isTouched: isTouched,
|
|
7918
7970
|
errors: fieldErrors
|
|
7919
7971
|
})]
|
|
@@ -7926,9 +7978,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
7926
7978
|
});
|
|
7927
7979
|
};
|
|
7928
7980
|
CustomFieldsInternal.displayName = 'CustomFieldsInternal';
|
|
7929
|
-
CustomFieldsInternal.defaultProps = {
|
|
7930
|
-
renderCustomWarnings: () => null
|
|
7931
|
-
};
|
|
7932
7981
|
var CustomFieldsInternal$1 = CustomFieldsInternal;
|
|
7933
7982
|
|
|
7934
7983
|
function ownKeys$I(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -8000,14 +8049,14 @@ const attributesMapToNameValuePairs = map => {
|
|
|
8000
8049
|
});
|
|
8001
8050
|
};
|
|
8002
8051
|
|
|
8003
|
-
const _excluded = ["WrapperComponent"];
|
|
8052
|
+
const _excluded$8 = ["WrapperComponent"];
|
|
8004
8053
|
const getAttributeShortName = (fullName, attributesPrefix) => {
|
|
8005
8054
|
if (!attributesPrefix) return fullName;
|
|
8006
8055
|
return fullName.replace(`${attributesPrefix}.`, '');
|
|
8007
8056
|
};
|
|
8008
8057
|
function ProductAttributes(_ref) {
|
|
8009
8058
|
let WrapperComponent = _ref.WrapperComponent,
|
|
8010
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
8059
|
+
props = _objectWithoutProperties(_ref, _excluded$8);
|
|
8011
8060
|
const formik$1 = formik.useFormikContext();
|
|
8012
8061
|
const fieldDefinitions = React.useMemo(() => {
|
|
8013
8062
|
var _context;
|
|
@@ -8035,7 +8084,8 @@ function ProductAttributes(_ref) {
|
|
|
8035
8084
|
WrapperComponent: WrapperComponent,
|
|
8036
8085
|
renderWarnings: props.renderWarnings,
|
|
8037
8086
|
renderCustomWarnings: props.renderCustomWarnings,
|
|
8038
|
-
handleWarningChange: props.handleWarningChange
|
|
8087
|
+
handleWarningChange: props.handleWarningChange,
|
|
8088
|
+
additionalInfoHandler: props.additionalInfoHandler
|
|
8039
8089
|
})
|
|
8040
8090
|
})
|
|
8041
8091
|
});
|
|
@@ -8481,9 +8531,37 @@ function ModeSelectInputOption(props) {
|
|
|
8481
8531
|
}));
|
|
8482
8532
|
}
|
|
8483
8533
|
|
|
8534
|
+
const _excluded$7 = ["lowerProductSelectionsLimit", "upperProductSelectionsLimit", "renderSelectInputOptionValuesByField", "optionType", "isMulti", "isRequired", "hasWarning", "hasError", "isClearable", "isReadOnly", "isDisabled", "excludedProductSelectionIds", "title"];
|
|
8484
8535
|
function ownKeys$F(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8485
8536
|
function _objectSpread$F(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$F(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$F(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8486
|
-
function ProductSelectionsPicker(
|
|
8537
|
+
function ProductSelectionsPicker(_ref) {
|
|
8538
|
+
let _ref$lowerProductSele = _ref.lowerProductSelectionsLimit,
|
|
8539
|
+
lowerProductSelectionsLimit = _ref$lowerProductSele === void 0 ? LOWER_PRODUCT_SELECTIONS_LIMIT : _ref$lowerProductSele,
|
|
8540
|
+
_ref$upperProductSele = _ref.upperProductSelectionsLimit,
|
|
8541
|
+
upperProductSelectionsLimit = _ref$upperProductSele === void 0 ? UPPER_PRODUCT_SELECTIONS_LIMIT : _ref$upperProductSele,
|
|
8542
|
+
_ref$renderSelectInpu = _ref.renderSelectInputOptionValuesByField,
|
|
8543
|
+
renderSelectInputOptionValuesByField = _ref$renderSelectInpu === void 0 ? 'id' : _ref$renderSelectInpu,
|
|
8544
|
+
_ref$optionType = _ref.optionType,
|
|
8545
|
+
optionType = _ref$optionType === void 0 ? 'double-property' : _ref$optionType,
|
|
8546
|
+
_ref$isMulti = _ref.isMulti,
|
|
8547
|
+
isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
|
|
8548
|
+
_ref$isRequired = _ref.isRequired,
|
|
8549
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
8550
|
+
_ref$hasWarning = _ref.hasWarning,
|
|
8551
|
+
hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
|
|
8552
|
+
_ref$hasError = _ref.hasError,
|
|
8553
|
+
hasError = _ref$hasError === void 0 ? false : _ref$hasError,
|
|
8554
|
+
_ref$isClearable = _ref.isClearable,
|
|
8555
|
+
isClearable = _ref$isClearable === void 0 ? false : _ref$isClearable,
|
|
8556
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
8557
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
8558
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
8559
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
8560
|
+
_ref$excludedProductS = _ref.excludedProductSelectionIds,
|
|
8561
|
+
excludedProductSelectionIds = _ref$excludedProductS === void 0 ? [] : _ref$excludedProductS,
|
|
8562
|
+
_ref$title = _ref.title,
|
|
8563
|
+
title = _ref$title === void 0 ? '' : _ref$title,
|
|
8564
|
+
props = _objectWithoutProperties(_ref, _excluded$7);
|
|
8487
8565
|
const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1();
|
|
8488
8566
|
const components = React.useMemo(() => {
|
|
8489
8567
|
return {
|
|
@@ -8491,39 +8569,38 @@ function ProductSelectionsPicker(props) {
|
|
|
8491
8569
|
if (optionInnerProps.isDisabled) {
|
|
8492
8570
|
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$F({}, optionInnerProps));
|
|
8493
8571
|
}
|
|
8494
|
-
if (
|
|
8572
|
+
if (optionType === TYPE_PROPERTY) {
|
|
8495
8573
|
return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$F({}, optionInnerProps));
|
|
8496
8574
|
}
|
|
8497
8575
|
return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
8498
|
-
optionType:
|
|
8576
|
+
optionType: optionType,
|
|
8499
8577
|
optionInnerProps: optionInnerProps
|
|
8500
8578
|
});
|
|
8501
8579
|
}
|
|
8502
8580
|
};
|
|
8503
|
-
}, [
|
|
8581
|
+
}, [optionType]);
|
|
8504
8582
|
if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
8505
|
-
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <=
|
|
8583
|
+
const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
|
|
8506
8584
|
return jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
8507
|
-
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({
|
|
8585
|
+
children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({
|
|
8586
|
+
lowerProductSelectionsLimit: lowerProductSelectionsLimit,
|
|
8587
|
+
upperProductSelectionsLimit: upperProductSelectionsLimit,
|
|
8588
|
+
renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
|
|
8589
|
+
optionType: optionType,
|
|
8590
|
+
isMulti: isMulti,
|
|
8591
|
+
isRequired: isRequired,
|
|
8592
|
+
hasWarning: hasWarning,
|
|
8593
|
+
hasError: hasError,
|
|
8594
|
+
isClearable: isClearable,
|
|
8595
|
+
isReadOnly: isReadOnly,
|
|
8596
|
+
isDisabled: isDisabled,
|
|
8597
|
+
excludedProductSelectionIds: excludedProductSelectionIds,
|
|
8598
|
+
title: title
|
|
8599
|
+
}, props), {}, {
|
|
8508
8600
|
components: components
|
|
8509
8601
|
}))
|
|
8510
8602
|
});
|
|
8511
8603
|
}
|
|
8512
|
-
ProductSelectionsPicker.defaultProps = {
|
|
8513
|
-
lowerProductSelectionsLimit: LOWER_PRODUCT_SELECTIONS_LIMIT,
|
|
8514
|
-
upperProductSelectionsLimit: UPPER_PRODUCT_SELECTIONS_LIMIT,
|
|
8515
|
-
renderSelectInputOptionValuesByField: 'id',
|
|
8516
|
-
optionType: 'double-property',
|
|
8517
|
-
isMulti: false,
|
|
8518
|
-
isRequired: false,
|
|
8519
|
-
hasWarning: false,
|
|
8520
|
-
hasError: false,
|
|
8521
|
-
isClearable: false,
|
|
8522
|
-
isReadOnly: false,
|
|
8523
|
-
isDisabled: false,
|
|
8524
|
-
excludedProductSelectionIds: [],
|
|
8525
|
-
title: '' // FieldLabel requires title to have some value
|
|
8526
|
-
};
|
|
8527
8604
|
|
|
8528
8605
|
// NOTE: this component is duplicated in `app-shell/from-core`.
|
|
8529
8606
|
var styles$b = {
|
|
@@ -8560,19 +8637,21 @@ const ScrollToFieldError = () => {
|
|
|
8560
8637
|
if (firstErrorElement) {
|
|
8561
8638
|
// Get a reference to the label.
|
|
8562
8639
|
const firstElementId = firstErrorElement.getAttribute('id');
|
|
8563
|
-
|
|
8640
|
+
if (firstElementId) {
|
|
8641
|
+
const localizedInputIndex = _indexOfInstanceProperty__default["default"](firstElementId).call(firstElementId, `.${dataLocale}`);
|
|
8564
8642
|
|
|
8565
|
-
|
|
8566
|
-
|
|
8643
|
+
// check if locale is appended then remove it from id
|
|
8644
|
+
const id = localizedInputIndex > -1 ? firstElementId.replace(`.${dataLocale}`, '') : firstElementId;
|
|
8567
8645
|
|
|
8568
|
-
|
|
8646
|
+
// Scroll to the label (if found), otherwise to the input element itself.
|
|
8569
8647
|
|
|
8570
|
-
|
|
8571
|
-
|
|
8572
|
-
|
|
8573
|
-
|
|
8574
|
-
|
|
8575
|
-
|
|
8648
|
+
const elementToScrollTo =
|
|
8649
|
+
// div is used only for custom fields
|
|
8650
|
+
document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
|
|
8651
|
+
elementToScrollTo.scrollIntoView?.({
|
|
8652
|
+
behavior: 'smooth'
|
|
8653
|
+
});
|
|
8654
|
+
}
|
|
8576
8655
|
}
|
|
8577
8656
|
}, [dataLocale, isValid, submitCount]);
|
|
8578
8657
|
return null;
|
|
@@ -8718,6 +8797,7 @@ const getCustomGroupLabelOption = customLabel => [{
|
|
|
8718
8797
|
isDisabled: true
|
|
8719
8798
|
}];
|
|
8720
8799
|
|
|
8800
|
+
const _excluded$6 = ["shouldFetchProductSelections"];
|
|
8721
8801
|
function ownKeys$E(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8722
8802
|
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$E(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$E(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8723
8803
|
const hasErrors$2 = errors => {
|
|
@@ -8748,7 +8828,10 @@ const emptyStoreOption = intl => [{
|
|
|
8748
8828
|
value: undefined,
|
|
8749
8829
|
isDisabled: true
|
|
8750
8830
|
}];
|
|
8751
|
-
const StoresAsyncSelectInput =
|
|
8831
|
+
const StoresAsyncSelectInput = _ref2 => {
|
|
8832
|
+
let _ref2$shouldFetchProd = _ref2.shouldFetchProductSelections,
|
|
8833
|
+
shouldFetchProductSelections = _ref2$shouldFetchProd === void 0 ? false : _ref2$shouldFetchProd,
|
|
8834
|
+
props = _objectWithoutProperties(_ref2, _excluded$6);
|
|
8752
8835
|
const intl = reactIntl.useIntl();
|
|
8753
8836
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
8754
8837
|
dataLocale: applicationContext.dataLocale,
|
|
@@ -8762,7 +8845,7 @@ const StoresAsyncSelectInput = props => {
|
|
|
8762
8845
|
offset: 0,
|
|
8763
8846
|
sort: 'createdAt asc',
|
|
8764
8847
|
excludeExtendedStoresList: true,
|
|
8765
|
-
excludeProductSelections: !
|
|
8848
|
+
excludeProductSelections: !shouldFetchProductSelections,
|
|
8766
8849
|
stores: keysOfStores?.length && keysOfStores,
|
|
8767
8850
|
projectKey: props.projectKey
|
|
8768
8851
|
});
|
|
@@ -8843,18 +8926,19 @@ const StoresAsyncSelectInput = props => {
|
|
|
8843
8926
|
});
|
|
8844
8927
|
};
|
|
8845
8928
|
StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
|
|
8846
|
-
StoresAsyncSelectInput.defaultProps = {
|
|
8847
|
-
shouldFetchProductSelections: false
|
|
8848
|
-
};
|
|
8849
8929
|
var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
|
|
8850
8930
|
|
|
8931
|
+
const _excluded$5 = ["shouldFetchProductSelections"];
|
|
8851
8932
|
function ownKeys$D(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8852
8933
|
function _objectSpread$D(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$D(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$D(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8853
8934
|
const hasErrors$1 = errors => {
|
|
8854
8935
|
var _context;
|
|
8855
8936
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
8856
8937
|
};
|
|
8857
|
-
const StoresBasicSelectInput =
|
|
8938
|
+
const StoresBasicSelectInput = _ref => {
|
|
8939
|
+
let _ref$shouldFetchProdu = _ref.shouldFetchProductSelections,
|
|
8940
|
+
shouldFetchProductSelections = _ref$shouldFetchProdu === void 0 ? false : _ref$shouldFetchProdu,
|
|
8941
|
+
props = _objectWithoutProperties(_ref, _excluded$5);
|
|
8858
8942
|
const intl = reactIntl.useIntl();
|
|
8859
8943
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
8860
8944
|
dataLocale: applicationContext.dataLocale,
|
|
@@ -8868,7 +8952,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8868
8952
|
offset: 0,
|
|
8869
8953
|
sort: 'createdAt asc',
|
|
8870
8954
|
excludeExtendedStoresList: true,
|
|
8871
|
-
excludeProductSelections: !
|
|
8955
|
+
excludeProductSelections: !shouldFetchProductSelections,
|
|
8872
8956
|
stores: keysOfStores?.length && keysOfStores,
|
|
8873
8957
|
projectKey: props.projectKey
|
|
8874
8958
|
});
|
|
@@ -8893,7 +8977,7 @@ const StoresBasicSelectInput = props => {
|
|
|
8893
8977
|
const currentStore = _findInstanceProperty__default["default"](listOptions).call(listOptions, store => store.value === value);
|
|
8894
8978
|
|
|
8895
8979
|
// We need complete store info including productSelections
|
|
8896
|
-
if (!
|
|
8980
|
+
if (!shouldFetchProductSelections && !props?.renderLabel) {
|
|
8897
8981
|
props.onChange(event);
|
|
8898
8982
|
} else {
|
|
8899
8983
|
props.onChange({
|
|
@@ -8941,9 +9025,6 @@ const StoresBasicSelectInput = props => {
|
|
|
8941
9025
|
});
|
|
8942
9026
|
};
|
|
8943
9027
|
StoresBasicSelectInput.displayName = 'StoresBasicSelectInput';
|
|
8944
|
-
StoresBasicSelectInput.defaultProps = {
|
|
8945
|
-
shouldFetchProductSelections: false
|
|
8946
|
-
};
|
|
8947
9028
|
var StoresBasicSelectInput$1 = StoresBasicSelectInput;
|
|
8948
9029
|
|
|
8949
9030
|
var TotalNumberOfStores = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "TotalNumberOfStores" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "totalNumberOfStores" }, name: { kind: "Name", value: "stores" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 76, source: { body: "query TotalNumberOfStores {\n totalNumberOfStores: stores {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -8990,6 +9071,7 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
|
|
|
8990
9071
|
};
|
|
8991
9072
|
var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
|
|
8992
9073
|
|
|
9074
|
+
const _excluded$4 = ["shouldFetchProductSelections"];
|
|
8993
9075
|
function ownKeys$C(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8994
9076
|
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$C(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$C(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
8995
9077
|
var FetchStoresByWherePredicate = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByWherePredicate" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByWherePredicate" }, name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } } }] }], 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: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 525, source: { body: "query FetchStoresByWherePredicate(\n $where: String!\n $skipFetchingStores: Boolean!\n $excludeProductSelections: Boolean!\n) {\n storesByWherePredicate: stores(where: $where) @skip(if: $skipFetchingStores) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
@@ -9060,7 +9142,10 @@ const getValueFromOptions = _ref2 => {
|
|
|
9060
9142
|
return selectedOptions[0];
|
|
9061
9143
|
}
|
|
9062
9144
|
};
|
|
9063
|
-
const StoresSearchSelectInput =
|
|
9145
|
+
const StoresSearchSelectInput = _ref3 => {
|
|
9146
|
+
let _ref3$shouldFetchProd = _ref3.shouldFetchProductSelections,
|
|
9147
|
+
shouldFetchProductSelections = _ref3$shouldFetchProd === void 0 ? false : _ref3$shouldFetchProd,
|
|
9148
|
+
props = _objectWithoutProperties(_ref3, _excluded$4);
|
|
9064
9149
|
// hooks
|
|
9065
9150
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
9066
9151
|
dataLocale: applicationContext.dataLocale,
|
|
@@ -9070,7 +9155,7 @@ const StoresSearchSelectInput = props => {
|
|
|
9070
9155
|
projectLanguages = _useApplicationContex.projectLanguages;
|
|
9071
9156
|
const intl = reactIntl.useIntl();
|
|
9072
9157
|
const client$1 = client.useApolloClient();
|
|
9073
|
-
const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey,
|
|
9158
|
+
const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, shouldFetchProductSelections);
|
|
9074
9159
|
const hasError = uiKit.AsyncSelectInput.isTouched(props.touched) && hasErrors(props.errors) || props.hasError;
|
|
9075
9160
|
const handleLoadOptions = searchText => {
|
|
9076
9161
|
const extractMatchedStores = client$1.query({
|
|
@@ -9079,15 +9164,15 @@ const StoresSearchSelectInput = props => {
|
|
|
9079
9164
|
searchText,
|
|
9080
9165
|
dataLocale,
|
|
9081
9166
|
allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
|
|
9082
|
-
shouldFetchProductSelections
|
|
9167
|
+
shouldFetchProductSelections
|
|
9083
9168
|
}),
|
|
9084
9169
|
context: {
|
|
9085
9170
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM,
|
|
9086
9171
|
projectKey: props.projectKey
|
|
9087
9172
|
},
|
|
9088
9173
|
fetchPolicy: 'network-only'
|
|
9089
|
-
}).then(
|
|
9090
|
-
let data =
|
|
9174
|
+
}).then(_ref4 => {
|
|
9175
|
+
let data = _ref4.data;
|
|
9091
9176
|
const result = data.storesByWherePredicate?.results.map(store => mapStoresToOptions({
|
|
9092
9177
|
store,
|
|
9093
9178
|
dataLocale,
|
|
@@ -9104,8 +9189,8 @@ const StoresSearchSelectInput = props => {
|
|
|
9104
9189
|
return extractMatchedStores;
|
|
9105
9190
|
};
|
|
9106
9191
|
const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
|
|
9107
|
-
const renderNoOptions =
|
|
9108
|
-
let inputValue =
|
|
9192
|
+
const renderNoOptions = _ref5 => {
|
|
9193
|
+
let inputValue = _ref5.inputValue;
|
|
9109
9194
|
return jsxRuntime.jsxs("div", {
|
|
9110
9195
|
className: styles$9.renderLabelContainer,
|
|
9111
9196
|
children: [jsxRuntime.jsx("div", {
|
|
@@ -9162,17 +9247,26 @@ const StoresSearchSelectInput = props => {
|
|
|
9162
9247
|
});
|
|
9163
9248
|
};
|
|
9164
9249
|
StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
|
|
9165
|
-
StoresSearchSelectInput.defaultProps = {
|
|
9166
|
-
shouldFetchProductSelections: false
|
|
9167
|
-
};
|
|
9168
9250
|
var StoresSearchSelectInput$1 = StoresSearchSelectInput;
|
|
9169
9251
|
|
|
9252
|
+
const _excluded$3 = ["lowerStoresLimit", "upperStoresLimit", "renderSelectInputOptionValuesByField", "optionType", "shouldFetchProductSelections"];
|
|
9170
9253
|
function ownKeys$B(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9171
9254
|
function _objectSpread$B(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$B(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$B(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9172
9255
|
var styles$8 = {
|
|
9173
9256
|
"customOption": "store-select-input-module__customOption___2SC00"
|
|
9174
9257
|
};
|
|
9175
|
-
const StoreSelectInput =
|
|
9258
|
+
const StoreSelectInput = _ref => {
|
|
9259
|
+
let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
|
|
9260
|
+
lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
|
|
9261
|
+
_ref$upperStoresLimit = _ref.upperStoresLimit,
|
|
9262
|
+
upperStoresLimit = _ref$upperStoresLimit === void 0 ? UPPER_STORES_LIMIT : _ref$upperStoresLimit,
|
|
9263
|
+
_ref$renderSelectInpu = _ref.renderSelectInputOptionValuesByField,
|
|
9264
|
+
renderSelectInputOptionValuesByField = _ref$renderSelectInpu === void 0 ? 'id' : _ref$renderSelectInpu,
|
|
9265
|
+
_ref$optionType = _ref.optionType,
|
|
9266
|
+
optionType = _ref$optionType === void 0 ? 'double-property' : _ref$optionType,
|
|
9267
|
+
_ref$shouldFetchProdu = _ref.shouldFetchProductSelections,
|
|
9268
|
+
shouldFetchProductSelections = _ref$shouldFetchProdu === void 0 ? false : _ref$shouldFetchProdu,
|
|
9269
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
9176
9270
|
const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1(props.projectKey);
|
|
9177
9271
|
const components = React.useMemo(() => {
|
|
9178
9272
|
return {
|
|
@@ -9181,19 +9275,19 @@ const StoreSelectInput = props => {
|
|
|
9181
9275
|
if (optionInnerProps.isDisabled) {
|
|
9182
9276
|
return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$B({}, optionInnerProps));
|
|
9183
9277
|
}
|
|
9184
|
-
const isSearchSelectInput = totalNumberOfStoresFetcher.total >
|
|
9278
|
+
const isSearchSelectInput = totalNumberOfStoresFetcher.total > upperStoresLimit;
|
|
9185
9279
|
return jsxRuntime.jsx("div", {
|
|
9186
9280
|
className: isSearchSelectInput ? styles$8.customOption : '',
|
|
9187
9281
|
children: jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
|
|
9188
|
-
optionType:
|
|
9282
|
+
optionType: optionType,
|
|
9189
9283
|
optionInnerProps: optionInnerProps
|
|
9190
9284
|
})
|
|
9191
9285
|
});
|
|
9192
9286
|
}
|
|
9193
9287
|
};
|
|
9194
|
-
}, [
|
|
9288
|
+
}, [optionType, totalNumberOfStoresFetcher.total, upperStoresLimit]);
|
|
9195
9289
|
if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
|
|
9196
|
-
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <=
|
|
9290
|
+
const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= lowerStoresLimit ? StoresBasicSelectInput$1 : totalNumberOfStoresFetcher.total <= upperStoresLimit ? StoresAsyncSelectInput$1 : StoresSearchSelectInput$1;
|
|
9197
9291
|
return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$B(_objectSpread$B({
|
|
9198
9292
|
menuIsOpen: props.menuIsOpen,
|
|
9199
9293
|
placeholder: props.placeholder,
|
|
@@ -9222,27 +9316,27 @@ const StoreSelectInput = props => {
|
|
|
9222
9316
|
maxMenuHeight: props.maxMenuHeight,
|
|
9223
9317
|
menuPortalTarget: props.menuPortalTarget,
|
|
9224
9318
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
9225
|
-
renderSelectInputOptionValuesByField:
|
|
9226
|
-
lowerStoresLimit:
|
|
9227
|
-
upperStoresLimit:
|
|
9319
|
+
renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
|
|
9320
|
+
lowerStoresLimit: lowerStoresLimit,
|
|
9321
|
+
upperStoresLimit: upperStoresLimit,
|
|
9228
9322
|
allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
|
|
9229
|
-
shouldFetchProductSelections:
|
|
9323
|
+
shouldFetchProductSelections: shouldFetchProductSelections,
|
|
9230
9324
|
controlShouldRenderValue: props.controlShouldRenderValue
|
|
9231
9325
|
}, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props)));
|
|
9232
9326
|
};
|
|
9233
9327
|
StoreSelectInput.displayName = 'StoreSelectInput';
|
|
9234
|
-
StoreSelectInput.defaultProps = {
|
|
9235
|
-
lowerStoresLimit: LOWER_STORES_LIMIT,
|
|
9236
|
-
upperStoresLimit: UPPER_STORES_LIMIT,
|
|
9237
|
-
renderSelectInputOptionValuesByField: 'id',
|
|
9238
|
-
optionType: 'double-property',
|
|
9239
|
-
shouldFetchProductSelections: false
|
|
9240
|
-
};
|
|
9241
9328
|
var StoreSelectInput$1 = StoreSelectInput;
|
|
9242
9329
|
|
|
9330
|
+
const _excluded$2 = ["lowerStoresLimit", "upperStoresLimit", "mappedValueField"];
|
|
9243
9331
|
function ownKeys$A(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
9244
9332
|
function _objectSpread$A(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$A(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$A(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
9245
|
-
const StoreSelectField =
|
|
9333
|
+
const StoreSelectField = _ref => {
|
|
9334
|
+
let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
|
|
9335
|
+
lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
|
|
9336
|
+
_ref$upperStoresLimit = _ref.upperStoresLimit,
|
|
9337
|
+
upperStoresLimit = _ref$upperStoresLimit === void 0 ? UPPER_STORES_LIMIT : _ref$upperStoresLimit;
|
|
9338
|
+
_ref.mappedValueField;
|
|
9339
|
+
let props = _objectWithoutProperties(_ref, _excluded$2);
|
|
9246
9340
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
9247
9341
|
max: props.horizontalConstraint,
|
|
9248
9342
|
children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
@@ -9279,8 +9373,8 @@ const StoreSelectField = props => {
|
|
|
9279
9373
|
menuPortalZIndex: props.menuPortalZIndex,
|
|
9280
9374
|
optionType: props.optionType,
|
|
9281
9375
|
renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField,
|
|
9282
|
-
lowerStoresLimit:
|
|
9283
|
-
upperStoresLimit:
|
|
9376
|
+
lowerStoresLimit: lowerStoresLimit,
|
|
9377
|
+
upperStoresLimit: upperStoresLimit,
|
|
9284
9378
|
allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
|
|
9285
9379
|
controlShouldRenderValue: props.controlShouldRenderValue
|
|
9286
9380
|
}, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props)))]
|
|
@@ -9288,11 +9382,6 @@ const StoreSelectField = props => {
|
|
|
9288
9382
|
});
|
|
9289
9383
|
};
|
|
9290
9384
|
StoreSelectField.displayName = 'StoreSelectField';
|
|
9291
|
-
StoreSelectField.defaultProps = {
|
|
9292
|
-
lowerStoresLimit: LOWER_STORES_LIMIT,
|
|
9293
|
-
upperStoresLimit: UPPER_STORES_LIMIT,
|
|
9294
|
-
mappedValueField: 'id'
|
|
9295
|
-
};
|
|
9296
9385
|
var StoreSelectField$1 = StoreSelectField;
|
|
9297
9386
|
|
|
9298
9387
|
function ownKeys$z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
@@ -9721,7 +9810,7 @@ const createEmptyCustomFields = typeDefinition => ({
|
|
|
9721
9810
|
function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
9722
9811
|
function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
|
|
9723
9812
|
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 } } } };
|
|
9724
|
-
const customizableResources = ['asset', 'address', 'associate-role', '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'];
|
|
9813
|
+
const customizableResources = ['asset', 'address', 'associate-role', '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', 'transaction'];
|
|
9725
9814
|
const emptyTypeDefinitions = {
|
|
9726
9815
|
total: 0,
|
|
9727
9816
|
count: 0,
|
|
@@ -10274,7 +10363,7 @@ const defaultValue = {
|
|
|
10274
10363
|
const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
|
|
10275
10364
|
var PimIndexerContext$1 = PimIndexerContext;
|
|
10276
10365
|
|
|
10277
|
-
var FetchIndicesExist = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end:
|
|
10366
|
+
var FetchIndicesExist = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchIndicesExist" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indicesExist" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "products" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "searchableIndexExists" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "newInProgress" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 269, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n productSelections {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10278
10367
|
var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
10279
10368
|
try {
|
|
10280
10369
|
await dispatch(sdk.actions.head({
|
|
@@ -10294,11 +10383,12 @@ var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
|
|
|
10294
10383
|
fetchPolicy: 'network-only'
|
|
10295
10384
|
}),
|
|
10296
10385
|
data = _await$apolloClient$q.data;
|
|
10297
|
-
if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress) {
|
|
10386
|
+
if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress || data.indicesExist.productSelections.newInProgress) {
|
|
10298
10387
|
return {
|
|
10299
10388
|
status: 'indexing',
|
|
10300
10389
|
isIndexingProducts: !data.indicesExist.products.searchableIndexExists,
|
|
10301
|
-
isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists
|
|
10390
|
+
isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists,
|
|
10391
|
+
isIndexingProductSelections: !data.indicesExist.productSelections.searchableIndexExists
|
|
10302
10392
|
};
|
|
10303
10393
|
}
|
|
10304
10394
|
return {
|
|
@@ -10332,21 +10422,23 @@ function ownKeys$r(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
|
|
|
10332
10422
|
function _objectSpread$r(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$r(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$r(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
10333
10423
|
function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
10334
10424
|
function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function () { return !!t; })(); }
|
|
10335
|
-
var RefreshProductIndices = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "RefreshProductIndices" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "ids" } }, type: { kind: "NonNullType", type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "refreshProducts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "ids" }, value: { kind: "Variable", name: { kind: "Name", value: "ids" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updatedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "deletedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "notFoundDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "unchangedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "failedRefreshedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end:
|
|
10336
|
-
var IndexProject = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "IndexProject" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "reIndexAllProducts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "reIndexAllProductTypes" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end:
|
|
10337
|
-
var GetIndexingProgress = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetIndexingProgress" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end:
|
|
10425
|
+
var RefreshProductIndices = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "RefreshProductIndices" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "ids" } }, type: { kind: "NonNullType", type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "refreshProducts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "ids" }, value: { kind: "Variable", name: { kind: "Name", value: "ids" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "updatedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "deletedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "notFoundDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "unchangedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "failedRefreshedDocuments" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "reason" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 1549, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n $shouldIndexProductSelections: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n productSelections: reIndexAllProductSelections\n @include(if: $shouldIndexProductSelections) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $productSelectionsJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n $shouldIncludeProductSelections: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n\n productSelections: getReindexingStatus(id: $productSelectionsJobId)\n @include(if: $shouldIncludeProductSelections) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10426
|
+
var IndexProject = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "mutation", name: { kind: "Name", value: "IndexProject" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "reIndexAllProducts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "reIndexAllProductTypes" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productSelections" }, name: { kind: "Name", value: "reIndexAllProductSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIndexProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "indexingJobId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "existingIndexingJobId" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1549, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n $shouldIndexProductSelections: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n productSelections: reIndexAllProductSelections\n @include(if: $shouldIndexProductSelections) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $productSelectionsJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n $shouldIncludeProductSelections: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n\n productSelections: getReindexingStatus(id: $productSelectionsJobId)\n @include(if: $shouldIncludeProductSelections) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10427
|
+
var GetIndexingProgress = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetIndexingProgress" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "productSelectionsJobId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "products" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productsJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productTypes" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productTypesJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }, { kind: "Field", alias: { kind: "Name", value: "productSelections" }, name: { kind: "Name", value: "getReindexingStatus" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "productSelectionsJobId" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "percentCompleted" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "completed" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 1549, source: { body: "mutation RefreshProductIndices($ids: [String!]!) {\n refreshProducts(ids: $ids) {\n updatedDocuments {\n id\n version\n }\n deletedDocuments {\n id\n }\n notFoundDocuments {\n id\n }\n unchangedDocuments {\n id\n version\n }\n failedRefreshedDocuments {\n id\n reason\n }\n }\n}\n\nmutation IndexProject(\n $shouldIndexProducts: Boolean!\n $shouldIndexProductTypes: Boolean!\n $shouldIndexProductSelections: Boolean!\n) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n productSelections: reIndexAllProductSelections\n @include(if: $shouldIndexProductSelections) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $productSelectionsJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: Boolean!\n $shouldIncludeProductSelections: Boolean!\n) {\n products: getReindexingStatus(id: $productsJobId)\n @include(if: $shouldIncludeProducts) {\n percentCompleted\n completed\n }\n\n productTypes: getReindexingStatus(id: $productTypesJobId)\n @include(if: $shouldIncludeProductTypes) {\n percentCompleted\n completed\n }\n\n productSelections: getReindexingStatus(id: $productSelectionsJobId)\n @include(if: $shouldIncludeProductSelections) {\n percentCompleted\n completed\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10338
10428
|
const pimIndexerRequestContext = {
|
|
10339
10429
|
target: constants.GRAPHQL_TARGETS.PIM_INDEXER
|
|
10340
10430
|
};
|
|
10341
|
-
const isIndexingCompleted = (products, productTypes) => products.completed && productTypes.completed;
|
|
10342
|
-
const calculateProgress = (products, productTypes) => (products.percentCompleted + productTypes.percentCompleted) /
|
|
10431
|
+
const isIndexingCompleted = (products, productTypes, productSelections) => products.completed && productTypes.completed && productSelections.completed;
|
|
10432
|
+
const calculateProgress = (products, productTypes, productSelections) => (products.percentCompleted + productTypes.percentCompleted + productSelections.percentCompleted) / 3;
|
|
10343
10433
|
const getIndexingJobIds = _ref => {
|
|
10344
10434
|
let _ref$data = _ref.data,
|
|
10345
10435
|
products = _ref$data.products,
|
|
10346
|
-
productTypes = _ref$data.productTypes
|
|
10436
|
+
productTypes = _ref$data.productTypes,
|
|
10437
|
+
productSelections = _ref$data.productSelections;
|
|
10347
10438
|
return {
|
|
10348
10439
|
productsJobId: products?.indexingJobId || products?.existingIndexingJobId,
|
|
10349
|
-
productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId
|
|
10440
|
+
productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId,
|
|
10441
|
+
productSelectionsJobId: productSelections?.indexingJobId || productSelections?.existingIndexingJobId
|
|
10350
10442
|
};
|
|
10351
10443
|
};
|
|
10352
10444
|
let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
@@ -10369,12 +10461,14 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10369
10461
|
const _await$_this$props$fe = await _this.props.fetchPimIndexStatus(_this.props.client, _this.props.projectKey),
|
|
10370
10462
|
status = _await$_this$props$fe.status,
|
|
10371
10463
|
isIndexingProducts = _await$_this$props$fe.isIndexingProducts,
|
|
10372
|
-
isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes
|
|
10464
|
+
isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes,
|
|
10465
|
+
isIndexingProductSelections = _await$_this$props$fe.isIndexingProductSelections;
|
|
10373
10466
|
const isPimIndexerUnreachable = _includesInstanceProperty__default["default"](_context = ['not-configured', 'unreachable']).call(_context, status);
|
|
10374
10467
|
if (status === 'indexing') {
|
|
10375
10468
|
_this.monitorIndexingProgress({
|
|
10376
10469
|
isIndexingProducts,
|
|
10377
|
-
isIndexingProductTypes
|
|
10470
|
+
isIndexingProductTypes,
|
|
10471
|
+
isIndexingProductSelections
|
|
10378
10472
|
});
|
|
10379
10473
|
} else {
|
|
10380
10474
|
_this.setState({
|
|
@@ -10431,8 +10525,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10431
10525
|
variables: {
|
|
10432
10526
|
productsJobId: _this.state.productsJobId || '',
|
|
10433
10527
|
productTypesJobId: _this.state.productTypesJobId || '',
|
|
10528
|
+
productSelectionsJobId: _this.state.productSelectionsJobId || '',
|
|
10434
10529
|
shouldIncludeProducts: !!_this.state.productsJobId,
|
|
10435
|
-
shouldIncludeProductTypes: !!_this.state.productTypesJobId
|
|
10530
|
+
shouldIncludeProductTypes: !!_this.state.productTypesJobId,
|
|
10531
|
+
shouldIncludeProductSelections: !!_this.state.productSelectionsJobId
|
|
10436
10532
|
},
|
|
10437
10533
|
fetchPolicy: 'network-only'
|
|
10438
10534
|
});
|
|
@@ -10442,7 +10538,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10442
10538
|
};
|
|
10443
10539
|
return {
|
|
10444
10540
|
products: result.data.products || completedStatus,
|
|
10445
|
-
productTypes: result.data.productTypes || completedStatus
|
|
10541
|
+
productTypes: result.data.productTypes || completedStatus,
|
|
10542
|
+
productSelections: result.data.productSelections || completedStatus
|
|
10446
10543
|
};
|
|
10447
10544
|
};
|
|
10448
10545
|
_this.handleFinishedIndexing = async () => {
|
|
@@ -10481,9 +10578,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10481
10578
|
try {
|
|
10482
10579
|
const _await$_this$getIndex = await _this.getIndexingProgress(),
|
|
10483
10580
|
products = _await$_this$getIndex.products,
|
|
10484
|
-
productTypes = _await$_this$getIndex.productTypes
|
|
10485
|
-
|
|
10486
|
-
const
|
|
10581
|
+
productTypes = _await$_this$getIndex.productTypes,
|
|
10582
|
+
productSelections = _await$_this$getIndex.productSelections;
|
|
10583
|
+
const isCompleted = isIndexingCompleted(products, productTypes, productSelections);
|
|
10584
|
+
const indexingProgress = calculateProgress(products, productTypes, productSelections);
|
|
10487
10585
|
_this.setState({
|
|
10488
10586
|
indexingProgress
|
|
10489
10587
|
});
|
|
@@ -10501,14 +10599,16 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10501
10599
|
};
|
|
10502
10600
|
_this.monitorIndexingProgress = async _ref2 => {
|
|
10503
10601
|
let isIndexingProducts = _ref2.isIndexingProducts,
|
|
10504
|
-
isIndexingProductTypes = _ref2.isIndexingProductTypes
|
|
10602
|
+
isIndexingProductTypes = _ref2.isIndexingProductTypes,
|
|
10603
|
+
isIndexingProductSelections = _ref2.isIndexingProductSelections;
|
|
10505
10604
|
if (_this.state.isProjectBeingIndexedByPim) return;
|
|
10506
10605
|
try {
|
|
10507
10606
|
const indexMutationResult = await _this.props.indexProject({
|
|
10508
10607
|
context: pimIndexerRequestContext,
|
|
10509
10608
|
variables: {
|
|
10510
10609
|
shouldIndexProducts: isIndexingProducts,
|
|
10511
|
-
shouldIndexProductTypes: isIndexingProductTypes
|
|
10610
|
+
shouldIndexProductTypes: isIndexingProductTypes,
|
|
10611
|
+
shouldIndexProductSelections: isIndexingProductSelections
|
|
10512
10612
|
}
|
|
10513
10613
|
});
|
|
10514
10614
|
_this.setState(_objectSpread$r(_objectSpread$r({
|
|
@@ -10523,7 +10623,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
|
|
|
10523
10623
|
};
|
|
10524
10624
|
_this.indexProject = () => _this.monitorIndexingProgress({
|
|
10525
10625
|
isIndexingProductTypes: true,
|
|
10526
|
-
isIndexingProducts: true
|
|
10626
|
+
isIndexingProducts: true,
|
|
10627
|
+
isIndexingProductSelections: true
|
|
10527
10628
|
});
|
|
10528
10629
|
return _this;
|
|
10529
10630
|
}
|
|
@@ -11998,12 +12099,18 @@ var messages$c = reactIntl.defineMessages({
|
|
|
11998
12099
|
}
|
|
11999
12100
|
});
|
|
12000
12101
|
|
|
12102
|
+
const _excluded$1 = ["isRequired", "disabled"];
|
|
12001
12103
|
const valueMapping = {
|
|
12002
12104
|
yes: true,
|
|
12003
12105
|
no: false,
|
|
12004
12106
|
all: [true, false]
|
|
12005
12107
|
};
|
|
12006
|
-
const BooleanField =
|
|
12108
|
+
const BooleanField = _ref => {
|
|
12109
|
+
let _ref$isRequired = _ref.isRequired,
|
|
12110
|
+
isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
|
|
12111
|
+
_ref$disabled = _ref.disabled,
|
|
12112
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
12113
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
12007
12114
|
let selectedValue;
|
|
12008
12115
|
if (typeof props.value === 'boolean') selectedValue = getBooleanValue(props.value);else if (props.isMulti && _Array$isArray__default["default"](props.value) && props.value.length) selectedValue = props.value.length === 2 ? 'all' : getBooleanValue(props.value[0]);
|
|
12009
12116
|
const yesLabel = props.intl.formatMessage(messages$c.yes);
|
|
@@ -12021,7 +12128,7 @@ const BooleanField = props => {
|
|
|
12021
12128
|
});
|
|
12022
12129
|
return jsxRuntime.jsx(uiKit.SelectInput, {
|
|
12023
12130
|
name: props.name,
|
|
12024
|
-
isClearable: !
|
|
12131
|
+
isClearable: !isRequired,
|
|
12025
12132
|
isSearchable: false,
|
|
12026
12133
|
value: selectedValue,
|
|
12027
12134
|
onChange: event => {
|
|
@@ -12031,14 +12138,10 @@ const BooleanField = props => {
|
|
|
12031
12138
|
props.onChange(newValue);
|
|
12032
12139
|
},
|
|
12033
12140
|
options,
|
|
12034
|
-
isDisabled:
|
|
12141
|
+
isDisabled: disabled
|
|
12035
12142
|
});
|
|
12036
12143
|
};
|
|
12037
12144
|
BooleanField.displayName = 'BooleanField';
|
|
12038
|
-
BooleanField.defaultProps = {
|
|
12039
|
-
isRequired: false,
|
|
12040
|
-
disabled: false
|
|
12041
|
-
};
|
|
12042
12145
|
var booleanField = reactIntl.injectIntl(BooleanField);
|
|
12043
12146
|
function getBooleanValue(value) {
|
|
12044
12147
|
if (typeof value !== 'boolean') return undefined;
|
|
@@ -12082,16 +12185,19 @@ var messages$9 = reactIntl.defineMessages({
|
|
|
12082
12185
|
}
|
|
12083
12186
|
});
|
|
12084
12187
|
|
|
12188
|
+
const _excluded = ["isChecked"];
|
|
12085
12189
|
function ownKeys$6(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12086
12190
|
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$6(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$6(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
12087
|
-
const MissingValueField =
|
|
12088
|
-
|
|
12089
|
-
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12191
|
+
const MissingValueField = _ref => {
|
|
12192
|
+
let _ref$isChecked = _ref.isChecked,
|
|
12193
|
+
isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
|
|
12194
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
12195
|
+
return jsxRuntime.jsx(uiKit.CheckboxInput, {
|
|
12196
|
+
name: "missing-value",
|
|
12197
|
+
isChecked: isChecked,
|
|
12198
|
+
onChange: props.onChange,
|
|
12199
|
+
children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$6({}, messages$9.label))
|
|
12200
|
+
});
|
|
12095
12201
|
};
|
|
12096
12202
|
var MissingValueField$1 = MissingValueField;
|
|
12097
12203
|
|
|
@@ -13365,7 +13471,8 @@ const not = function () {
|
|
|
13365
13471
|
|
|
13366
13472
|
const safelyAddFallback = function (string) {
|
|
13367
13473
|
let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : constants.NO_VALUE_FALLBACK;
|
|
13368
|
-
|
|
13474
|
+
if (string === '') return fallback;
|
|
13475
|
+
return string ?? fallback;
|
|
13369
13476
|
};
|
|
13370
13477
|
|
|
13371
13478
|
var messages = reactIntl.defineMessages({
|
|
@@ -13889,7 +13996,7 @@ exports.resolveStatusType = resolveStatusType;
|
|
|
13889
13996
|
exports.safelyAddFallback = safelyAddFallback;
|
|
13890
13997
|
exports.sanitize = sanitize;
|
|
13891
13998
|
exports.searchCategories = searchCategories;
|
|
13892
|
-
exports.searchInputMessages = messages$
|
|
13999
|
+
exports.searchInputMessages = messages$N;
|
|
13893
14000
|
exports.setDisplayName = setDisplayName$1;
|
|
13894
14001
|
exports.setToArray = setToArray;
|
|
13895
14002
|
exports.shallowEqual = shallowEqual;
|