@commercetools-frontend/experimental-components 6.3.2 → 6.4.0

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.
@@ -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$Q = reactIntl.defineMessages({
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$Q.noChannelsFound), [loadingError, formatMessage]);
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$Q.placeholder),
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$P = reactIntl.defineMessages({
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$P.placeholder),
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$P.noProductTypesFound),
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$O = reactIntl.defineMessages({
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$O.noStatesFound), [loadingError, formatMessage]);
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$O.placeholder),
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$N = reactIntl.defineMessages({
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$N.bottomOption) : messages$N.bottomOption,
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$3 = ["extraWhere"];
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$3);
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: 191, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
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$M = reactIntl.defineMessages({
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$M.placeholder),
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$L = reactIntl.defineMessages({
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$L.profileUpdated
2071
+ intlMessage: messages$M.profileUpdated
2071
2072
  }), jsxRuntime.jsx(uiKit.Text.Body, {
2072
- intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.addMoreInformation), {}, {
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$L.informationAndProfileLink), {}, {
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$K = reactIntl.defineMessages({
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$K.fallbackHint, {
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$J = reactIntl.defineMessages({
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$J.booleanYes) : intl.formatMessage(messages$J.booleanNo);
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$2 = ["action"];
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 _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$15(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$15(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
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 _context6;
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"](_context6 = _Object$entries__default["default"](fields)).call(_context6, _ref4 => {
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 _context7;
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"](_context7 = _Object$entries__default["default"](fields)).call(_context7, _ref7 => {
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$2);
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$I = reactIntl.defineMessages({
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$I;
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$G = reactIntl.defineMessages({
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$H = messages$G;
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$H.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
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$H.placeholder),
5503
- searchPromptLabel: formatMessage(messages$H.searchPrompt),
5504
- noResultsLabel: formatMessage(messages$H.noResults),
5505
- referenceIsMissingLabel: formatMessage(messages$H.isMissing),
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$E = reactIntl.defineMessages({
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$F = messages$E;
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$F.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
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$F.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
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$F.placeholder),
5633
- searchPromptLabel: formatMessage(messages$F.searchPrompt),
5634
- noResultsLabel: formatMessage(messages$F.noResults),
5635
- referenceIsMissingLabel: formatMessage(messages$F.isMissing),
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 = props => {
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: props.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$D = reactIntl.defineMessages({
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 = props => jsxRuntime.jsx("label", {
5726
- children: jsxRuntime.jsxs("span", {
5727
- className: styles$f.button,
5728
- children: [jsxRuntime.jsx("input", {
5729
- className: styles$f.input,
5730
- type: "file",
5731
- accept: props.acceptTypes,
5732
- name: props.name,
5733
- onChange: props.onChange,
5734
- multiple: props.allowMultiple
5735
- }), props.children]
5736
- })
5737
- });
5738
- FileInput.displayName = 'FileInput';
5739
- FileInput.defaultProps = {
5740
- children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$D.chooseFile)),
5741
- allowMultiple: false,
5742
- acceptTypes: 'image/png,image/jpeg,image/gif'
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$C = reactIntl.defineMessages({
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$C.countriesAsyncSelectDropdownTypeAheadPrompt),
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$C.countriesAsyncSelectPlaceholder),
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$C.countriesBasicSelectPlaceholder),
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(props) {
5844
- const CustomCountriesPicker = props.options?.length <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
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({}, props))
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$B = reactIntl.defineMessages({
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$B.noCustomerGroupsFound), [loadingError, formatMessage]);
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$B.placeholder),
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
- const options$1 = [{
6093
- value: 'true',
6094
- label: 'YES'
6095
- }, {
6096
- value: 'false',
6097
- label: 'NO'
6098
- }, {
6099
- value: 'all',
6100
- label: 'ALL'
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$1,
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';
@@ -7815,22 +7864,22 @@ const useDnDContext = () => {
7815
7864
  return React.useContext(DnDContext);
7816
7865
  };
7817
7866
 
7818
- const _excluded$1 = ["WrapperComponent"];
7867
+ const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
7819
7868
  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
7869
  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
7870
  const existingAttributeTypes = ['text', 'ltext'];
7822
- const newAttributeTypes = ['text', 'ltext', 'number']; // Add more types here
7823
-
7871
+ const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
7872
+ const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
7824
7873
  const getFieldName = (parentName, fieldName) => {
7825
7874
  if (!parentName) return fieldName;
7826
7875
  return `${parentName}.${fieldName}`;
7827
7876
  };
7828
- function isAttributeType() {
7877
+ const isAttributeType = function () {
7829
7878
  let fieldDefinitionType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7830
7879
  let isTailoringAttributeForOtherTypes = arguments.length > 1 ? arguments[1] : undefined;
7831
7880
  const attributeTypes = isTailoringAttributeForOtherTypes ? newAttributeTypes : existingAttributeTypes;
7832
- return _includesInstanceProperty__default["default"](attributeTypes).call(attributeTypes, fieldDefinitionType.name);
7833
- }
7881
+ return _includesInstanceProperty__default["default"](attributeTypes).call(attributeTypes, fieldDefinitionType.name) || isTailoringAttributeForOtherTypes && fieldDefinitionType.name === 'set' && _includesInstanceProperty__default["default"](setAttributeTypes).call(setAttributeTypes, fieldDefinitionType?.elementType?.name);
7882
+ };
7834
7883
  const isNested = fieldDefinition => {
7835
7884
  const type = fieldDefinition.type;
7836
7885
  const typeName = type.name.toLowerCase();
@@ -7841,8 +7890,10 @@ const isNested = fieldDefinition => {
7841
7890
  return typeName === CUSTOM_FIELD_TYPES.nested;
7842
7891
  };
7843
7892
  const CustomFieldsInternal = _ref => {
7844
- let WrapperComponent = _ref.WrapperComponent,
7845
- props = _objectWithoutProperties(_ref, _excluded$1);
7893
+ let _ref$renderCustomWarn = _ref.renderCustomWarnings,
7894
+ renderCustomWarnings = _ref$renderCustomWarn === void 0 ? () => null : _ref$renderCustomWarn,
7895
+ WrapperComponent = _ref.WrapperComponent,
7896
+ props = _objectWithoutProperties(_ref, _excluded$9);
7846
7897
  const _useFormikContext = formik.useFormikContext(),
7847
7898
  errors = _useFormikContext.errors,
7848
7899
  touched = _useFormikContext.touched,
@@ -7851,6 +7902,7 @@ const CustomFieldsInternal = _ref => {
7851
7902
  status = _useFormikContext.status;
7852
7903
  const isTailoringAttributesEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
7853
7904
  const isTailoringAttributeForOtherTypes = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
7905
+ const isTailoringFallbackEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
7854
7906
  const didFormValidationFail = useDidFormValidationFail();
7855
7907
  const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
7856
7908
  const _useDnDContext = useDnDContext(),
@@ -7865,6 +7917,7 @@ const CustomFieldsInternal = _ref => {
7865
7917
  const fieldName = getFieldName(props.name, fieldDefinition.name);
7866
7918
  const isTouched = Boolean(formik.getIn(touched, fieldName));
7867
7919
  const isFieldDisabled = props.isDisabled && !(isAttributeType(fieldDefinition.type, isTailoringAttributeForOtherTypes) && isTailoringAttributesEnabled);
7920
+ const isSet = fieldDefinition.type.name === 'set';
7868
7921
  const fieldErrors = formik.getIn(errors, fieldName);
7869
7922
  const value = props.inputValuesConverter(fieldName, formik.getIn(values, fieldName));
7870
7923
 
@@ -7889,7 +7942,8 @@ const CustomFieldsInternal = _ref => {
7889
7942
  hasError: hasError,
7890
7943
  hasWarning: props.renderWarnings && status?.warnings[fieldName],
7891
7944
  handleWarningChange: props.handleWarningChange,
7892
- renderWarnings: props.renderWarnings
7945
+ renderWarnings: props.renderWarnings,
7946
+ additionalInfo: isTailoringFallbackEnabled && props.additionalInfoHandler && !isSet ? props.additionalInfoHandler(fieldDefinition) : undefined
7893
7947
  };
7894
7948
  const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$J({}, fieldProps));
7895
7949
  return jsxRuntime.jsx(formik.FastField, {
@@ -7913,7 +7967,7 @@ const CustomFieldsInternal = _ref => {
7913
7967
  alignItems: "stretch",
7914
7968
  children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
7915
7969
  children: Field
7916
- }) : Field, props.renderWarnings && status?.warnings[fieldName] && props.renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
7970
+ }) : Field, props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
7917
7971
  isTouched: isTouched,
7918
7972
  errors: fieldErrors
7919
7973
  })]
@@ -7926,9 +7980,6 @@ const CustomFieldsInternal = _ref => {
7926
7980
  });
7927
7981
  };
7928
7982
  CustomFieldsInternal.displayName = 'CustomFieldsInternal';
7929
- CustomFieldsInternal.defaultProps = {
7930
- renderCustomWarnings: () => null
7931
- };
7932
7983
  var CustomFieldsInternal$1 = CustomFieldsInternal;
7933
7984
 
7934
7985
  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 +8051,14 @@ const attributesMapToNameValuePairs = map => {
8000
8051
  });
8001
8052
  };
8002
8053
 
8003
- const _excluded = ["WrapperComponent"];
8054
+ const _excluded$8 = ["WrapperComponent"];
8004
8055
  const getAttributeShortName = (fullName, attributesPrefix) => {
8005
8056
  if (!attributesPrefix) return fullName;
8006
8057
  return fullName.replace(`${attributesPrefix}.`, '');
8007
8058
  };
8008
8059
  function ProductAttributes(_ref) {
8009
8060
  let WrapperComponent = _ref.WrapperComponent,
8010
- props = _objectWithoutProperties(_ref, _excluded);
8061
+ props = _objectWithoutProperties(_ref, _excluded$8);
8011
8062
  const formik$1 = formik.useFormikContext();
8012
8063
  const fieldDefinitions = React.useMemo(() => {
8013
8064
  var _context;
@@ -8035,7 +8086,8 @@ function ProductAttributes(_ref) {
8035
8086
  WrapperComponent: WrapperComponent,
8036
8087
  renderWarnings: props.renderWarnings,
8037
8088
  renderCustomWarnings: props.renderCustomWarnings,
8038
- handleWarningChange: props.handleWarningChange
8089
+ handleWarningChange: props.handleWarningChange,
8090
+ additionalInfoHandler: props.additionalInfoHandler
8039
8091
  })
8040
8092
  })
8041
8093
  });
@@ -8481,9 +8533,37 @@ function ModeSelectInputOption(props) {
8481
8533
  }));
8482
8534
  }
8483
8535
 
8536
+ const _excluded$7 = ["lowerProductSelectionsLimit", "upperProductSelectionsLimit", "renderSelectInputOptionValuesByField", "optionType", "isMulti", "isRequired", "hasWarning", "hasError", "isClearable", "isReadOnly", "isDisabled", "excludedProductSelectionIds", "title"];
8484
8537
  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
8538
  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(props) {
8539
+ function ProductSelectionsPicker(_ref) {
8540
+ let _ref$lowerProductSele = _ref.lowerProductSelectionsLimit,
8541
+ lowerProductSelectionsLimit = _ref$lowerProductSele === void 0 ? LOWER_PRODUCT_SELECTIONS_LIMIT : _ref$lowerProductSele,
8542
+ _ref$upperProductSele = _ref.upperProductSelectionsLimit,
8543
+ upperProductSelectionsLimit = _ref$upperProductSele === void 0 ? UPPER_PRODUCT_SELECTIONS_LIMIT : _ref$upperProductSele,
8544
+ _ref$renderSelectInpu = _ref.renderSelectInputOptionValuesByField,
8545
+ renderSelectInputOptionValuesByField = _ref$renderSelectInpu === void 0 ? 'id' : _ref$renderSelectInpu,
8546
+ _ref$optionType = _ref.optionType,
8547
+ optionType = _ref$optionType === void 0 ? 'double-property' : _ref$optionType,
8548
+ _ref$isMulti = _ref.isMulti,
8549
+ isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
8550
+ _ref$isRequired = _ref.isRequired,
8551
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
8552
+ _ref$hasWarning = _ref.hasWarning,
8553
+ hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
8554
+ _ref$hasError = _ref.hasError,
8555
+ hasError = _ref$hasError === void 0 ? false : _ref$hasError,
8556
+ _ref$isClearable = _ref.isClearable,
8557
+ isClearable = _ref$isClearable === void 0 ? false : _ref$isClearable,
8558
+ _ref$isReadOnly = _ref.isReadOnly,
8559
+ isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
8560
+ _ref$isDisabled = _ref.isDisabled,
8561
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
8562
+ _ref$excludedProductS = _ref.excludedProductSelectionIds,
8563
+ excludedProductSelectionIds = _ref$excludedProductS === void 0 ? [] : _ref$excludedProductS,
8564
+ _ref$title = _ref.title,
8565
+ title = _ref$title === void 0 ? '' : _ref$title,
8566
+ props = _objectWithoutProperties(_ref, _excluded$7);
8487
8567
  const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1();
8488
8568
  const components = React.useMemo(() => {
8489
8569
  return {
@@ -8491,39 +8571,38 @@ function ProductSelectionsPicker(props) {
8491
8571
  if (optionInnerProps.isDisabled) {
8492
8572
  return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$F({}, optionInnerProps));
8493
8573
  }
8494
- if (props.optionType === TYPE_PROPERTY) {
8574
+ if (optionType === TYPE_PROPERTY) {
8495
8575
  return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$F({}, optionInnerProps));
8496
8576
  }
8497
8577
  return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
8498
- optionType: props.optionType,
8578
+ optionType: optionType,
8499
8579
  optionInnerProps: optionInnerProps
8500
8580
  });
8501
8581
  }
8502
8582
  };
8503
- }, [props.optionType]);
8583
+ }, [optionType]);
8504
8584
  if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
8505
- const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
8585
+ const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
8506
8586
  return jsxRuntime.jsx(uiKit.Spacings.Stack, {
8507
- children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({}, props), {}, {
8587
+ children: jsxRuntime.jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({
8588
+ lowerProductSelectionsLimit: lowerProductSelectionsLimit,
8589
+ upperProductSelectionsLimit: upperProductSelectionsLimit,
8590
+ renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
8591
+ optionType: optionType,
8592
+ isMulti: isMulti,
8593
+ isRequired: isRequired,
8594
+ hasWarning: hasWarning,
8595
+ hasError: hasError,
8596
+ isClearable: isClearable,
8597
+ isReadOnly: isReadOnly,
8598
+ isDisabled: isDisabled,
8599
+ excludedProductSelectionIds: excludedProductSelectionIds,
8600
+ title: title
8601
+ }, props), {}, {
8508
8602
  components: components
8509
8603
  }))
8510
8604
  });
8511
8605
  }
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
8606
 
8528
8607
  // NOTE: this component is duplicated in `app-shell/from-core`.
8529
8608
  var styles$b = {
@@ -8560,19 +8639,21 @@ const ScrollToFieldError = () => {
8560
8639
  if (firstErrorElement) {
8561
8640
  // Get a reference to the label.
8562
8641
  const firstElementId = firstErrorElement.getAttribute('id');
8563
- const localizedInputIndex = _indexOfInstanceProperty__default["default"](firstElementId).call(firstElementId, `.${dataLocale}`);
8642
+ if (firstElementId) {
8643
+ const localizedInputIndex = _indexOfInstanceProperty__default["default"](firstElementId).call(firstElementId, `.${dataLocale}`);
8564
8644
 
8565
- // check if locale is appended then remove it from id
8566
- const id = localizedInputIndex > -1 ? firstElementId.replace(`.${dataLocale}`, '') : firstElementId;
8645
+ // check if locale is appended then remove it from id
8646
+ const id = localizedInputIndex > -1 ? firstElementId.replace(`.${dataLocale}`, '') : firstElementId;
8567
8647
 
8568
- // Scroll to the label (if found), otherwise to the input element itself.
8648
+ // Scroll to the label (if found), otherwise to the input element itself.
8569
8649
 
8570
- const elementToScrollTo =
8571
- // div is used only for custom fields
8572
- document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
8573
- elementToScrollTo.scrollIntoView?.({
8574
- behavior: 'smooth'
8575
- });
8650
+ const elementToScrollTo =
8651
+ // div is used only for custom fields
8652
+ document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
8653
+ elementToScrollTo.scrollIntoView?.({
8654
+ behavior: 'smooth'
8655
+ });
8656
+ }
8576
8657
  }
8577
8658
  }, [dataLocale, isValid, submitCount]);
8578
8659
  return null;
@@ -8718,6 +8799,7 @@ const getCustomGroupLabelOption = customLabel => [{
8718
8799
  isDisabled: true
8719
8800
  }];
8720
8801
 
8802
+ const _excluded$6 = ["shouldFetchProductSelections"];
8721
8803
  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
8804
  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
8805
  const hasErrors$2 = errors => {
@@ -8748,7 +8830,10 @@ const emptyStoreOption = intl => [{
8748
8830
  value: undefined,
8749
8831
  isDisabled: true
8750
8832
  }];
8751
- const StoresAsyncSelectInput = props => {
8833
+ const StoresAsyncSelectInput = _ref2 => {
8834
+ let _ref2$shouldFetchProd = _ref2.shouldFetchProductSelections,
8835
+ shouldFetchProductSelections = _ref2$shouldFetchProd === void 0 ? false : _ref2$shouldFetchProd,
8836
+ props = _objectWithoutProperties(_ref2, _excluded$6);
8752
8837
  const intl = reactIntl.useIntl();
8753
8838
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
8754
8839
  dataLocale: applicationContext.dataLocale,
@@ -8762,7 +8847,7 @@ const StoresAsyncSelectInput = props => {
8762
8847
  offset: 0,
8763
8848
  sort: 'createdAt asc',
8764
8849
  excludeExtendedStoresList: true,
8765
- excludeProductSelections: !props.shouldFetchProductSelections,
8850
+ excludeProductSelections: !shouldFetchProductSelections,
8766
8851
  stores: keysOfStores?.length && keysOfStores,
8767
8852
  projectKey: props.projectKey
8768
8853
  });
@@ -8843,18 +8928,19 @@ const StoresAsyncSelectInput = props => {
8843
8928
  });
8844
8929
  };
8845
8930
  StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
8846
- StoresAsyncSelectInput.defaultProps = {
8847
- shouldFetchProductSelections: false
8848
- };
8849
8931
  var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
8850
8932
 
8933
+ const _excluded$5 = ["shouldFetchProductSelections"];
8851
8934
  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
8935
  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
8936
  const hasErrors$1 = errors => {
8854
8937
  var _context;
8855
8938
  return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
8856
8939
  };
8857
- const StoresBasicSelectInput = props => {
8940
+ const StoresBasicSelectInput = _ref => {
8941
+ let _ref$shouldFetchProdu = _ref.shouldFetchProductSelections,
8942
+ shouldFetchProductSelections = _ref$shouldFetchProdu === void 0 ? false : _ref$shouldFetchProdu,
8943
+ props = _objectWithoutProperties(_ref, _excluded$5);
8858
8944
  const intl = reactIntl.useIntl();
8859
8945
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
8860
8946
  dataLocale: applicationContext.dataLocale,
@@ -8868,7 +8954,7 @@ const StoresBasicSelectInput = props => {
8868
8954
  offset: 0,
8869
8955
  sort: 'createdAt asc',
8870
8956
  excludeExtendedStoresList: true,
8871
- excludeProductSelections: !props.shouldFetchProductSelections,
8957
+ excludeProductSelections: !shouldFetchProductSelections,
8872
8958
  stores: keysOfStores?.length && keysOfStores,
8873
8959
  projectKey: props.projectKey
8874
8960
  });
@@ -8893,7 +8979,7 @@ const StoresBasicSelectInput = props => {
8893
8979
  const currentStore = _findInstanceProperty__default["default"](listOptions).call(listOptions, store => store.value === value);
8894
8980
 
8895
8981
  // We need complete store info including productSelections
8896
- if (!props.shouldFetchProductSelections && !props?.renderLabel) {
8982
+ if (!shouldFetchProductSelections && !props?.renderLabel) {
8897
8983
  props.onChange(event);
8898
8984
  } else {
8899
8985
  props.onChange({
@@ -8941,9 +9027,6 @@ const StoresBasicSelectInput = props => {
8941
9027
  });
8942
9028
  };
8943
9029
  StoresBasicSelectInput.displayName = 'StoresBasicSelectInput';
8944
- StoresBasicSelectInput.defaultProps = {
8945
- shouldFetchProductSelections: false
8946
- };
8947
9030
  var StoresBasicSelectInput$1 = StoresBasicSelectInput;
8948
9031
 
8949
9032
  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 +9073,7 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
8990
9073
  };
8991
9074
  var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
8992
9075
 
9076
+ const _excluded$4 = ["shouldFetchProductSelections"];
8993
9077
  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
9078
  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
9079
  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 +9144,10 @@ const getValueFromOptions = _ref2 => {
9060
9144
  return selectedOptions[0];
9061
9145
  }
9062
9146
  };
9063
- const StoresSearchSelectInput = props => {
9147
+ const StoresSearchSelectInput = _ref3 => {
9148
+ let _ref3$shouldFetchProd = _ref3.shouldFetchProductSelections,
9149
+ shouldFetchProductSelections = _ref3$shouldFetchProd === void 0 ? false : _ref3$shouldFetchProd,
9150
+ props = _objectWithoutProperties(_ref3, _excluded$4);
9064
9151
  // hooks
9065
9152
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
9066
9153
  dataLocale: applicationContext.dataLocale,
@@ -9070,7 +9157,7 @@ const StoresSearchSelectInput = props => {
9070
9157
  projectLanguages = _useApplicationContex.projectLanguages;
9071
9158
  const intl = reactIntl.useIntl();
9072
9159
  const client$1 = client.useApolloClient();
9073
- const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, props.shouldFetchProductSelections);
9160
+ const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, shouldFetchProductSelections);
9074
9161
  const hasError = uiKit.AsyncSelectInput.isTouched(props.touched) && hasErrors(props.errors) || props.hasError;
9075
9162
  const handleLoadOptions = searchText => {
9076
9163
  const extractMatchedStores = client$1.query({
@@ -9079,15 +9166,15 @@ const StoresSearchSelectInput = props => {
9079
9166
  searchText,
9080
9167
  dataLocale,
9081
9168
  allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
9082
- shouldFetchProductSelections: props.shouldFetchProductSelections
9169
+ shouldFetchProductSelections
9083
9170
  }),
9084
9171
  context: {
9085
9172
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM,
9086
9173
  projectKey: props.projectKey
9087
9174
  },
9088
9175
  fetchPolicy: 'network-only'
9089
- }).then(_ref3 => {
9090
- let data = _ref3.data;
9176
+ }).then(_ref4 => {
9177
+ let data = _ref4.data;
9091
9178
  const result = data.storesByWherePredicate?.results.map(store => mapStoresToOptions({
9092
9179
  store,
9093
9180
  dataLocale,
@@ -9104,8 +9191,8 @@ const StoresSearchSelectInput = props => {
9104
9191
  return extractMatchedStores;
9105
9192
  };
9106
9193
  const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
9107
- const renderNoOptions = _ref4 => {
9108
- let inputValue = _ref4.inputValue;
9194
+ const renderNoOptions = _ref5 => {
9195
+ let inputValue = _ref5.inputValue;
9109
9196
  return jsxRuntime.jsxs("div", {
9110
9197
  className: styles$9.renderLabelContainer,
9111
9198
  children: [jsxRuntime.jsx("div", {
@@ -9162,17 +9249,26 @@ const StoresSearchSelectInput = props => {
9162
9249
  });
9163
9250
  };
9164
9251
  StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
9165
- StoresSearchSelectInput.defaultProps = {
9166
- shouldFetchProductSelections: false
9167
- };
9168
9252
  var StoresSearchSelectInput$1 = StoresSearchSelectInput;
9169
9253
 
9254
+ const _excluded$3 = ["lowerStoresLimit", "upperStoresLimit", "renderSelectInputOptionValuesByField", "optionType", "shouldFetchProductSelections"];
9170
9255
  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
9256
  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
9257
  var styles$8 = {
9173
9258
  "customOption": "store-select-input-module__customOption___2SC00"
9174
9259
  };
9175
- const StoreSelectInput = props => {
9260
+ const StoreSelectInput = _ref => {
9261
+ let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
9262
+ lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
9263
+ _ref$upperStoresLimit = _ref.upperStoresLimit,
9264
+ upperStoresLimit = _ref$upperStoresLimit === void 0 ? UPPER_STORES_LIMIT : _ref$upperStoresLimit,
9265
+ _ref$renderSelectInpu = _ref.renderSelectInputOptionValuesByField,
9266
+ renderSelectInputOptionValuesByField = _ref$renderSelectInpu === void 0 ? 'id' : _ref$renderSelectInpu,
9267
+ _ref$optionType = _ref.optionType,
9268
+ optionType = _ref$optionType === void 0 ? 'double-property' : _ref$optionType,
9269
+ _ref$shouldFetchProdu = _ref.shouldFetchProductSelections,
9270
+ shouldFetchProductSelections = _ref$shouldFetchProdu === void 0 ? false : _ref$shouldFetchProdu,
9271
+ props = _objectWithoutProperties(_ref, _excluded$3);
9176
9272
  const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1(props.projectKey);
9177
9273
  const components = React.useMemo(() => {
9178
9274
  return {
@@ -9181,19 +9277,19 @@ const StoreSelectInput = props => {
9181
9277
  if (optionInnerProps.isDisabled) {
9182
9278
  return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$B({}, optionInnerProps));
9183
9279
  }
9184
- const isSearchSelectInput = totalNumberOfStoresFetcher.total > props.upperStoresLimit;
9280
+ const isSearchSelectInput = totalNumberOfStoresFetcher.total > upperStoresLimit;
9185
9281
  return jsxRuntime.jsx("div", {
9186
9282
  className: isSearchSelectInput ? styles$8.customOption : '',
9187
9283
  children: jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
9188
- optionType: props.optionType,
9284
+ optionType: optionType,
9189
9285
  optionInnerProps: optionInnerProps
9190
9286
  })
9191
9287
  });
9192
9288
  }
9193
9289
  };
9194
- }, [props.optionType, totalNumberOfStoresFetcher.total, props.upperStoresLimit]);
9290
+ }, [optionType, totalNumberOfStoresFetcher.total, upperStoresLimit]);
9195
9291
  if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
9196
- const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput$1 : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput$1 : StoresSearchSelectInput$1;
9292
+ const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= lowerStoresLimit ? StoresBasicSelectInput$1 : totalNumberOfStoresFetcher.total <= upperStoresLimit ? StoresAsyncSelectInput$1 : StoresSearchSelectInput$1;
9197
9293
  return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$B(_objectSpread$B({
9198
9294
  menuIsOpen: props.menuIsOpen,
9199
9295
  placeholder: props.placeholder,
@@ -9222,27 +9318,27 @@ const StoreSelectInput = props => {
9222
9318
  maxMenuHeight: props.maxMenuHeight,
9223
9319
  menuPortalTarget: props.menuPortalTarget,
9224
9320
  menuPortalZIndex: props.menuPortalZIndex,
9225
- renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField,
9226
- lowerStoresLimit: props.lowerStoresLimit,
9227
- upperStoresLimit: props.upperStoresLimit,
9321
+ renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
9322
+ lowerStoresLimit: lowerStoresLimit,
9323
+ upperStoresLimit: upperStoresLimit,
9228
9324
  allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
9229
- shouldFetchProductSelections: props.shouldFetchProductSelections,
9325
+ shouldFetchProductSelections: shouldFetchProductSelections,
9230
9326
  controlShouldRenderValue: props.controlShouldRenderValue
9231
9327
  }, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props)));
9232
9328
  };
9233
9329
  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
9330
  var StoreSelectInput$1 = StoreSelectInput;
9242
9331
 
9332
+ const _excluded$2 = ["lowerStoresLimit", "upperStoresLimit", "mappedValueField"];
9243
9333
  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
9334
  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 = props => {
9335
+ const StoreSelectField = _ref => {
9336
+ let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
9337
+ lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
9338
+ _ref$upperStoresLimit = _ref.upperStoresLimit,
9339
+ upperStoresLimit = _ref$upperStoresLimit === void 0 ? UPPER_STORES_LIMIT : _ref$upperStoresLimit;
9340
+ _ref.mappedValueField;
9341
+ let props = _objectWithoutProperties(_ref, _excluded$2);
9246
9342
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
9247
9343
  max: props.horizontalConstraint,
9248
9344
  children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
@@ -9279,8 +9375,8 @@ const StoreSelectField = props => {
9279
9375
  menuPortalZIndex: props.menuPortalZIndex,
9280
9376
  optionType: props.optionType,
9281
9377
  renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField,
9282
- lowerStoresLimit: props.lowerStoresLimit,
9283
- upperStoresLimit: props.upperStoresLimit,
9378
+ lowerStoresLimit: lowerStoresLimit,
9379
+ upperStoresLimit: upperStoresLimit,
9284
9380
  allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
9285
9381
  controlShouldRenderValue: props.controlShouldRenderValue
9286
9382
  }, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props)))]
@@ -9288,11 +9384,6 @@ const StoreSelectField = props => {
9288
9384
  });
9289
9385
  };
9290
9386
  StoreSelectField.displayName = 'StoreSelectField';
9291
- StoreSelectField.defaultProps = {
9292
- lowerStoresLimit: LOWER_STORES_LIMIT,
9293
- upperStoresLimit: UPPER_STORES_LIMIT,
9294
- mappedValueField: 'id'
9295
- };
9296
9387
  var StoreSelectField$1 = StoreSelectField;
9297
9388
 
9298
9389
  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 +9812,7 @@ const createEmptyCustomFields = typeDefinition => ({
9721
9812
  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
9813
  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
9814
  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'];
9815
+ 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
9816
  const emptyTypeDefinitions = {
9726
9817
  total: 0,
9727
9818
  count: 0,
@@ -10274,7 +10365,7 @@ const defaultValue = {
10274
10365
  const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
10275
10366
  var PimIndexerContext$1 = PimIndexerContext;
10276
10367
 
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: 191, source: { body: "query FetchIndicesExist {\n indicesExist {\n products {\n searchableIndexExists\n newInProgress\n }\n productTypes {\n searchableIndexExists\n newInProgress\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
10368
+ 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
10369
  var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
10279
10370
  try {
10280
10371
  await dispatch(sdk.actions.head({
@@ -10294,11 +10385,12 @@ var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
10294
10385
  fetchPolicy: 'network-only'
10295
10386
  }),
10296
10387
  data = _await$apolloClient$q.data;
10297
- if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress) {
10388
+ if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress || data.indicesExist.productSelections.newInProgress) {
10298
10389
  return {
10299
10390
  status: 'indexing',
10300
10391
  isIndexingProducts: !data.indicesExist.products.searchableIndexExists,
10301
- isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists
10392
+ isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists,
10393
+ isIndexingProductSelections: !data.indicesExist.productSelections.searchableIndexExists
10302
10394
  };
10303
10395
  }
10304
10396
  return {
@@ -10332,21 +10424,23 @@ function ownKeys$r(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
10332
10424
  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
10425
  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
10426
  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: 1119, 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) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: 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", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
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: 1119, 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) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: 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", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
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: 1119, 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) {\n products: reIndexAllProducts @include(if: $shouldIndexProducts) {\n indexingJobId\n existingIndexingJobId\n }\n productTypes: reIndexAllProductTypes @include(if: $shouldIndexProductTypes) {\n indexingJobId\n existingIndexingJobId\n }\n}\n\nquery GetIndexingProgress(\n $productsJobId: String!\n $productTypesJobId: String!\n $shouldIncludeProducts: Boolean!\n $shouldIncludeProductTypes: 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", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
10427
+ 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 } } } };
10428
+ 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 } } } };
10429
+ 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
10430
  const pimIndexerRequestContext = {
10339
10431
  target: constants.GRAPHQL_TARGETS.PIM_INDEXER
10340
10432
  };
10341
- const isIndexingCompleted = (products, productTypes) => products.completed && productTypes.completed;
10342
- const calculateProgress = (products, productTypes) => (products.percentCompleted + productTypes.percentCompleted) / 2;
10433
+ const isIndexingCompleted = (products, productTypes, productSelections) => products.completed && productTypes.completed && productSelections.completed;
10434
+ const calculateProgress = (products, productTypes, productSelections) => (products.percentCompleted + productTypes.percentCompleted + productSelections.percentCompleted) / 3;
10343
10435
  const getIndexingJobIds = _ref => {
10344
10436
  let _ref$data = _ref.data,
10345
10437
  products = _ref$data.products,
10346
- productTypes = _ref$data.productTypes;
10438
+ productTypes = _ref$data.productTypes,
10439
+ productSelections = _ref$data.productSelections;
10347
10440
  return {
10348
10441
  productsJobId: products?.indexingJobId || products?.existingIndexingJobId,
10349
- productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId
10442
+ productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId,
10443
+ productSelectionsJobId: productSelections?.indexingJobId || productSelections?.existingIndexingJobId
10350
10444
  };
10351
10445
  };
10352
10446
  let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
@@ -10369,12 +10463,14 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10369
10463
  const _await$_this$props$fe = await _this.props.fetchPimIndexStatus(_this.props.client, _this.props.projectKey),
10370
10464
  status = _await$_this$props$fe.status,
10371
10465
  isIndexingProducts = _await$_this$props$fe.isIndexingProducts,
10372
- isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes;
10466
+ isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes,
10467
+ isIndexingProductSelections = _await$_this$props$fe.isIndexingProductSelections;
10373
10468
  const isPimIndexerUnreachable = _includesInstanceProperty__default["default"](_context = ['not-configured', 'unreachable']).call(_context, status);
10374
10469
  if (status === 'indexing') {
10375
10470
  _this.monitorIndexingProgress({
10376
10471
  isIndexingProducts,
10377
- isIndexingProductTypes
10472
+ isIndexingProductTypes,
10473
+ isIndexingProductSelections
10378
10474
  });
10379
10475
  } else {
10380
10476
  _this.setState({
@@ -10431,8 +10527,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10431
10527
  variables: {
10432
10528
  productsJobId: _this.state.productsJobId || '',
10433
10529
  productTypesJobId: _this.state.productTypesJobId || '',
10530
+ productSelectionsJobId: _this.state.productSelectionsJobId || '',
10434
10531
  shouldIncludeProducts: !!_this.state.productsJobId,
10435
- shouldIncludeProductTypes: !!_this.state.productTypesJobId
10532
+ shouldIncludeProductTypes: !!_this.state.productTypesJobId,
10533
+ shouldIncludeProductSelections: !!_this.state.productSelectionsJobId
10436
10534
  },
10437
10535
  fetchPolicy: 'network-only'
10438
10536
  });
@@ -10442,7 +10540,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10442
10540
  };
10443
10541
  return {
10444
10542
  products: result.data.products || completedStatus,
10445
- productTypes: result.data.productTypes || completedStatus
10543
+ productTypes: result.data.productTypes || completedStatus,
10544
+ productSelections: result.data.productSelections || completedStatus
10446
10545
  };
10447
10546
  };
10448
10547
  _this.handleFinishedIndexing = async () => {
@@ -10481,9 +10580,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10481
10580
  try {
10482
10581
  const _await$_this$getIndex = await _this.getIndexingProgress(),
10483
10582
  products = _await$_this$getIndex.products,
10484
- productTypes = _await$_this$getIndex.productTypes;
10485
- const isCompleted = isIndexingCompleted(products, productTypes);
10486
- const indexingProgress = calculateProgress(products, productTypes);
10583
+ productTypes = _await$_this$getIndex.productTypes,
10584
+ productSelections = _await$_this$getIndex.productSelections;
10585
+ const isCompleted = isIndexingCompleted(products, productTypes, productSelections);
10586
+ const indexingProgress = calculateProgress(products, productTypes, productSelections);
10487
10587
  _this.setState({
10488
10588
  indexingProgress
10489
10589
  });
@@ -10501,14 +10601,16 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10501
10601
  };
10502
10602
  _this.monitorIndexingProgress = async _ref2 => {
10503
10603
  let isIndexingProducts = _ref2.isIndexingProducts,
10504
- isIndexingProductTypes = _ref2.isIndexingProductTypes;
10604
+ isIndexingProductTypes = _ref2.isIndexingProductTypes,
10605
+ isIndexingProductSelections = _ref2.isIndexingProductSelections;
10505
10606
  if (_this.state.isProjectBeingIndexedByPim) return;
10506
10607
  try {
10507
10608
  const indexMutationResult = await _this.props.indexProject({
10508
10609
  context: pimIndexerRequestContext,
10509
10610
  variables: {
10510
10611
  shouldIndexProducts: isIndexingProducts,
10511
- shouldIndexProductTypes: isIndexingProductTypes
10612
+ shouldIndexProductTypes: isIndexingProductTypes,
10613
+ shouldIndexProductSelections: isIndexingProductSelections
10512
10614
  }
10513
10615
  });
10514
10616
  _this.setState(_objectSpread$r(_objectSpread$r({
@@ -10523,7 +10625,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10523
10625
  };
10524
10626
  _this.indexProject = () => _this.monitorIndexingProgress({
10525
10627
  isIndexingProductTypes: true,
10526
- isIndexingProducts: true
10628
+ isIndexingProducts: true,
10629
+ isIndexingProductSelections: true
10527
10630
  });
10528
10631
  return _this;
10529
10632
  }
@@ -11998,12 +12101,18 @@ var messages$c = reactIntl.defineMessages({
11998
12101
  }
11999
12102
  });
12000
12103
 
12104
+ const _excluded$1 = ["isRequired", "disabled"];
12001
12105
  const valueMapping = {
12002
12106
  yes: true,
12003
12107
  no: false,
12004
12108
  all: [true, false]
12005
12109
  };
12006
- const BooleanField = props => {
12110
+ const BooleanField = _ref => {
12111
+ let _ref$isRequired = _ref.isRequired,
12112
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
12113
+ _ref$disabled = _ref.disabled,
12114
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
12115
+ props = _objectWithoutProperties(_ref, _excluded$1);
12007
12116
  let selectedValue;
12008
12117
  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
12118
  const yesLabel = props.intl.formatMessage(messages$c.yes);
@@ -12021,7 +12130,7 @@ const BooleanField = props => {
12021
12130
  });
12022
12131
  return jsxRuntime.jsx(uiKit.SelectInput, {
12023
12132
  name: props.name,
12024
- isClearable: !props.isRequired,
12133
+ isClearable: !isRequired,
12025
12134
  isSearchable: false,
12026
12135
  value: selectedValue,
12027
12136
  onChange: event => {
@@ -12031,14 +12140,10 @@ const BooleanField = props => {
12031
12140
  props.onChange(newValue);
12032
12141
  },
12033
12142
  options,
12034
- isDisabled: props.disabled
12143
+ isDisabled: disabled
12035
12144
  });
12036
12145
  };
12037
12146
  BooleanField.displayName = 'BooleanField';
12038
- BooleanField.defaultProps = {
12039
- isRequired: false,
12040
- disabled: false
12041
- };
12042
12147
  var booleanField = reactIntl.injectIntl(BooleanField);
12043
12148
  function getBooleanValue(value) {
12044
12149
  if (typeof value !== 'boolean') return undefined;
@@ -12082,16 +12187,19 @@ var messages$9 = reactIntl.defineMessages({
12082
12187
  }
12083
12188
  });
12084
12189
 
12190
+ const _excluded = ["isChecked"];
12085
12191
  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
12192
  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 = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
12088
- name: "missing-value",
12089
- isChecked: props.isChecked,
12090
- onChange: props.onChange,
12091
- children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$6({}, messages$9.label))
12092
- });
12093
- MissingValueField.defaultProps = {
12094
- isChecked: false
12193
+ const MissingValueField = _ref => {
12194
+ let _ref$isChecked = _ref.isChecked,
12195
+ isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
12196
+ props = _objectWithoutProperties(_ref, _excluded);
12197
+ return jsxRuntime.jsx(uiKit.CheckboxInput, {
12198
+ name: "missing-value",
12199
+ isChecked: isChecked,
12200
+ onChange: props.onChange,
12201
+ children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$6({}, messages$9.label))
12202
+ });
12095
12203
  };
12096
12204
  var MissingValueField$1 = MissingValueField;
12097
12205
 
@@ -13365,7 +13473,8 @@ const not = function () {
13365
13473
 
13366
13474
  const safelyAddFallback = function (string) {
13367
13475
  let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : constants.NO_VALUE_FALLBACK;
13368
- return string === '' ? fallback : string ?? fallback;
13476
+ if (string === '') return fallback;
13477
+ return string ?? fallback;
13369
13478
  };
13370
13479
 
13371
13480
  var messages = reactIntl.defineMessages({
@@ -13889,7 +13998,7 @@ exports.resolveStatusType = resolveStatusType;
13889
13998
  exports.safelyAddFallback = safelyAddFallback;
13890
13999
  exports.sanitize = sanitize;
13891
14000
  exports.searchCategories = searchCategories;
13892
- exports.searchInputMessages = messages$M;
14001
+ exports.searchInputMessages = messages$N;
13893
14002
  exports.setDisplayName = setDisplayName$1;
13894
14003
  exports.setToArray = setToArray;
13895
14004
  exports.shallowEqual = shallowEqual;