@commercetools-frontend/experimental-components 6.3.1 → 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.
@@ -265,6 +265,8 @@ const INTERVALS_IN_SECONDS = {
265
265
  };
266
266
  const EXCLUDING_PRODUCTS = 'excludingProducts';
267
267
  const PRODUCT_TAILORING_FOR_ATTRIBUTES = 'productTailoringForAttributes';
268
+ const PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT = 'productTailoringForAttributesTypesOtherThanText';
269
+ const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAttributesFallbackValues';
268
270
 
269
271
  // TODO: apply a more robust solution to overlaying issues
270
272
  const Z_INDEX_DROPDOWN = 30000;
@@ -282,7 +284,7 @@ var pickerMessages$1 = reactIntl.defineMessages({
282
284
  }
283
285
  });
284
286
 
285
- var messages$Q = reactIntl.defineMessages({
287
+ var messages$R = reactIntl.defineMessages({
286
288
  noChannelsFound: {
287
289
  id: 'Products.ChannelPickerInput.noChannelsFound',
288
290
  description: 'The message to display when no channels were found',
@@ -366,7 +368,7 @@ const ChannelPickerInput = _ref => {
366
368
  return inputValue.length === 0 && data.channels.total > 60 ? [...channels, getBottomOption()] : channels;
367
369
  }).catch(error => {
368
370
  setLoadingError(error);
369
- onError(error);
371
+ onError && onError(error);
370
372
  }), [loadOptions, convertChannelToOption, onError]);
371
373
  const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
372
374
  const _useHandlers = useHandlers$1(onChange),
@@ -379,10 +381,10 @@ const ChannelPickerInput = _ref => {
379
381
  }, [handleInternalInputChange]);
380
382
  const isCurrentOptionLoadingFailed = Boolean(currentOption?.error);
381
383
  React.useEffect(() => {
382
- if (isCurrentOptionLoadingFailed) onError(currentOption.error);
384
+ if (isCurrentOptionLoadingFailed && onError) onError(currentOption.error);
383
385
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
384
386
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
385
- 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]);
386
388
  const tooltipTitle = currentOption?.data?.label ?? '';
387
389
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
388
390
  max: "scale",
@@ -393,7 +395,7 @@ const ChannelPickerInput = _ref => {
393
395
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
394
396
  id: name,
395
397
  name: name,
396
- placeholder: placeholder ?? formatMessage(messages$Q.placeholder),
398
+ placeholder: placeholder ?? formatMessage(messages$R.placeholder),
397
399
  loadOptions: loadOptionsDebounced,
398
400
  defaultOptions: true,
399
401
  showOptionGroupDivider: true,
@@ -449,7 +451,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
449
451
  FormattedDateTime.displayName = 'FormattedDateTime';
450
452
  var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
451
453
 
452
- var messages$P = reactIntl.defineMessages({
454
+ var messages$Q = reactIntl.defineMessages({
453
455
  noProductTypesFound: {
454
456
  id: 'Products.ProductTypePickerInput.noProductTypesFound',
455
457
  description: 'The message to display when no product types were found',
@@ -538,7 +540,7 @@ const ProductTypePickerInput = _ref => {
538
540
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
539
541
  id: name,
540
542
  name: name,
541
- placeholder: formatMessage(messages$P.placeholder),
543
+ placeholder: formatMessage(messages$Q.placeholder),
542
544
  loadOptions: loadOptionsDebounced,
543
545
  defaultOptions: [],
544
546
  isClearable: isClearable,
@@ -551,7 +553,7 @@ const ProductTypePickerInput = _ref => {
551
553
  onInputChange: handleInputChange,
552
554
  onBlur: onBlur,
553
555
  value: currentOption.data,
554
- noOptionsMessage: () => loadingError ? null : formatMessage(messages$P.noProductTypesFound),
556
+ noOptionsMessage: () => loadingError ? null : formatMessage(messages$Q.noProductTypesFound),
555
557
  hasError: hasError || isLoadingFailed,
556
558
  menuPortalZIndex: Z_INDEX_DROPDOWN,
557
559
  menuPortalTarget: document.body,
@@ -567,7 +569,7 @@ const ProductTypePickerInput = _ref => {
567
569
  ProductTypePickerInput.displayName = 'ProductTypePickerInput';
568
570
  var ProductTypePickerInput$1 = ProductTypePickerInput;
569
571
 
570
- var messages$O = reactIntl.defineMessages({
572
+ var messages$P = reactIntl.defineMessages({
571
573
  noStatesFound: {
572
574
  id: 'Products.StatePickerInput.noStatesFound',
573
575
  description: 'The message to display when no states were found',
@@ -651,7 +653,7 @@ const StatePickerInput = _ref => {
651
653
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
652
654
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
653
655
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
654
- 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]);
655
657
  const tooltipTitle = currentOption?.data?.label ?? '';
656
658
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
657
659
  max: "scale",
@@ -663,7 +665,7 @@ const StatePickerInput = _ref => {
663
665
  id: name,
664
666
  name: name,
665
667
  horizontalConstraint: "scale",
666
- placeholder: formatMessage(messages$O.placeholder),
668
+ placeholder: formatMessage(messages$P.placeholder),
667
669
  loadOptions: loadOptionsDebounced,
668
670
  defaultOptions: true,
669
671
  showOptionGroupDivider: true,
@@ -720,7 +722,7 @@ const CustomFieldTooltip = _ref => {
720
722
  };
721
723
  var CustomFieldTooltip$1 = CustomFieldTooltip;
722
724
 
723
- var messages$N = reactIntl.defineMessages({
725
+ var messages$O = reactIntl.defineMessages({
724
726
  bottomOption: {
725
727
  id: 'Products.Pickers.bottomOption',
726
728
  description: 'The message to display at the end of the options menu',
@@ -732,7 +734,7 @@ function ownKeys$1p(e, r) { var t = _Object$keys__default["default"](e); if (_Ob
732
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; }
733
735
  const getBottomOption = formatMessage => ({
734
736
  options: [{
735
- label: formatMessage ? formatMessage(messages$N.bottomOption) : messages$N.bottomOption,
737
+ label: formatMessage ? formatMessage(messages$O.bottomOption) : messages$O.bottomOption,
736
738
  isBottomOption: true,
737
739
  isDisabled: true
738
740
  }]
@@ -779,7 +781,7 @@ const useHandlers = onChange => {
779
781
  };
780
782
  var useHandlers$1 = useHandlers;
781
783
 
782
- const _excluded$3 = ["extraWhere"];
784
+ const _excluded$e = ["extraWhere"];
783
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; }
784
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; }
785
787
  const constructPrefixSearchPredicate$1 = function () {
@@ -822,7 +824,7 @@ const useLoadOptions = _ref => {
822
824
  }
823
825
  const _ref2 = variables ?? {},
824
826
  extraWhere = _ref2.extraWhere,
825
- restVariables = _objectWithoutProperties(_ref2, _excluded$3);
827
+ restVariables = _objectWithoutProperties(_ref2, _excluded$e);
826
828
  if (typeof extraWhere === 'string') {
827
829
  where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
828
830
  }
@@ -841,7 +843,7 @@ const useLoadOptions = _ref => {
841
843
  };
842
844
  var useLoadOptions$1 = useLoadOptions;
843
845
 
844
- 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 } } } };
845
847
  const useExecuteGraphQLRequest = () => {
846
848
  const apolloClient = react.useApolloClient();
847
849
  return React.useCallback((query, variables, context, fetchPolicy) => {
@@ -1255,7 +1257,7 @@ ThrottledField.defaultProps = {
1255
1257
  };
1256
1258
  var ThrottledField$1 = ThrottledField;
1257
1259
 
1258
- var messages$M = reactIntl.defineMessages({
1260
+ var messages$N = reactIntl.defineMessages({
1259
1261
  buttonLabel: {
1260
1262
  id: 'SearchInput.buttonLabel',
1261
1263
  description: 'Label for "Search" button.',
@@ -1360,7 +1362,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
1360
1362
  "data-testid": this.props.testId || 'search-input',
1361
1363
  value: this.state.text,
1362
1364
  label: this.props.label,
1363
- placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$M.placeholder),
1365
+ placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$N.placeholder),
1364
1366
  inputRef: this.props.inputRef || this.setInputRef,
1365
1367
  onChange: this.handleInputChange,
1366
1368
  onEnter: this.handleEnter,
@@ -2029,7 +2031,7 @@ const usePersistedReminder = function () {
2029
2031
  };
2030
2032
  var usePersistedReminder$1 = usePersistedReminder;
2031
2033
 
2032
- var messages$L = reactIntl.defineMessages({
2034
+ var messages$M = reactIntl.defineMessages({
2033
2035
  profileUpdated: {
2034
2036
  id: 'NotificationText.profileUpdated',
2035
2037
  description: 'Label for the notification header',
@@ -2066,9 +2068,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2066
2068
  children: [jsxRuntime.jsx(uiKit.Text.Body, {
2067
2069
  as: "p",
2068
2070
  isBold: true,
2069
- intlMessage: messages$L.profileUpdated
2071
+ intlMessage: messages$M.profileUpdated
2070
2072
  }), jsxRuntime.jsx(uiKit.Text.Body, {
2071
- intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.addMoreInformation), {}, {
2073
+ intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.addMoreInformation), {}, {
2072
2074
  values: {
2073
2075
  newline: getNewLine
2074
2076
  }
@@ -2077,7 +2079,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2077
2079
  }), jsxRuntime.jsx(uiKit.Spacings.Stack, {
2078
2080
  scale: "xs",
2079
2081
  children: jsxRuntime.jsx(uiKit.Text.Body, {
2080
- intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.informationAndProfileLink), {}, {
2082
+ intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.informationAndProfileLink), {}, {
2081
2083
  values: {
2082
2084
  newline: getNewLine,
2083
2085
  link: getLinkToProfile
@@ -2202,7 +2204,7 @@ const useEventCallback = (fn, dependencies) => {
2202
2204
  };
2203
2205
  var useEventCallback$1 = useEventCallback;
2204
2206
 
2205
- var messages$K = reactIntl.defineMessages({
2207
+ var messages$L = reactIntl.defineMessages({
2206
2208
  fallbackHint: {
2207
2209
  id: 'KeyFallback.fallbackHint',
2208
2210
  description: 'key fallback for a specified resource key (e.g name)',
@@ -2226,7 +2228,7 @@ const useLocalizedKeyFallback = () => {
2226
2228
  return values => {
2227
2229
  if (!values.resource) return null;
2228
2230
  const localizedString = values.resource[values.localizedStringFieldName];
2229
- const fallbackHintWithKey = intl.formatMessage(messages$K.fallbackHint, {
2231
+ const fallbackHintWithKey = intl.formatMessage(messages$L.fallbackHint, {
2230
2232
  key: values.resource.key
2231
2233
  });
2232
2234
  if (!localizedString) return fallbackHintWithKey;
@@ -3883,7 +3885,7 @@ function formatMoney$2(moneyValue, intl, options) {
3883
3885
  }, options));
3884
3886
  }
3885
3887
 
3886
- var messages$J = reactIntl.defineMessages({
3888
+ var messages$K = reactIntl.defineMessages({
3887
3889
  booleanYes: {
3888
3890
  id: 'AttributeTypeFormats.boolean.yes',
3889
3891
  description: 'The label for boolean attribute `true` value',
@@ -3965,7 +3967,7 @@ const formatDateTime = _ref7 => {
3965
3967
  const formatBoolean = _ref8 => {
3966
3968
  let value = _ref8.value,
3967
3969
  intl = _ref8.intl;
3968
- 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);
3969
3971
  };
3970
3972
  const formatNilType = _ref9 => {
3971
3973
  let value = _ref9.value,
@@ -4124,9 +4126,9 @@ const getPrefixSearchBounds = input => {
4124
4126
  };
4125
4127
  var getPrefixSearchBounds$1 = getPrefixSearchBounds;
4126
4128
 
4127
- const _excluded$2 = ["action"];
4129
+ const _excluded$d = ["action"];
4128
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; }
4129
- 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; }
4130
4132
 
4131
4133
  /**
4132
4134
  * Checks if a value is a LocalizedString
@@ -4263,6 +4265,7 @@ const createAttributeTypeValue = attribute => {
4263
4265
  const formatMoney = valueType => money => {
4264
4266
  switch (valueType) {
4265
4267
  case 'fixed':
4268
+ case 'fixedCart':
4266
4269
  return {
4267
4270
  [money.type]: _objectSpread$15({
4268
4271
  centAmount: money.centAmount,
@@ -4294,6 +4297,7 @@ const convertChangeValueAction = actionPayload => {
4294
4297
  absolute: ['money'],
4295
4298
  absoluteCart: ['money', 'applicationMode'],
4296
4299
  fixed: ['money'],
4300
+ fixedCart: ['money', 'applicationMode'],
4297
4301
  giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
4298
4302
  };
4299
4303
  const filteredValue = pick__default["default"](actionPayload.value, possibleTypeKeys[valueType]);
@@ -4317,7 +4321,7 @@ const convertChangeValueAction = actionPayload => {
4317
4321
  * as its dynamic content can not be typed in SDL for the mutation.
4318
4322
  */
4319
4323
  const convertAction = (actionName, actionPayload) => {
4320
- var _context3, _context4, _context5;
4324
+ var _context3, _context4, _context5, _context6, _context7;
4321
4325
  const getNameFromPayload = payload => {
4322
4326
  // changeName for `Organizations`
4323
4327
  if (typeof payload.name === 'string') return payload;
@@ -4598,18 +4602,26 @@ const convertAction = (actionName, actionPayload) => {
4598
4602
  return {
4599
4603
  [actionName]: {
4600
4604
  target: {
4601
- [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
+ })
4602
4614
  }
4603
4615
  }
4604
4616
  };
4605
4617
  case 'addAddress':
4606
4618
  case 'changeAddress':
4607
4619
  {
4608
- var _context6;
4620
+ var _context8;
4609
4621
  const _ref3 = actionPayload.address?.custom || {},
4610
4622
  _ref3$fields = _ref3.fields,
4611
4623
  fields = _ref3$fields === void 0 ? {} : _ref3$fields;
4612
- 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 => {
4613
4625
  let _ref5 = _slicedToArray(_ref4, 2),
4614
4626
  name = _ref5[0],
4615
4627
  value = _ref5[1];
@@ -4634,13 +4646,13 @@ const convertAction = (actionName, actionPayload) => {
4634
4646
  }
4635
4647
  case 'setAddressCustomType':
4636
4648
  {
4637
- var _context7;
4649
+ var _context9;
4638
4650
  const _ref6 = actionPayload || {},
4639
4651
  addressId = _ref6.addressId,
4640
4652
  _ref6$fields = _ref6.fields,
4641
4653
  fields = _ref6$fields === void 0 ? {} : _ref6$fields,
4642
4654
  type = _ref6.type;
4643
- 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 => {
4644
4656
  let _ref8 = _slicedToArray(_ref7, 2),
4645
4657
  name = _ref8[0],
4646
4658
  value = _ref8[1];
@@ -4668,7 +4680,7 @@ const convertAction = (actionName, actionPayload) => {
4668
4680
  };
4669
4681
  const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
4670
4682
  let actionName = _ref9.action,
4671
- actionPayload = _objectWithoutProperties(_ref9, _excluded$2);
4683
+ actionPayload = _objectWithoutProperties(_ref9, _excluded$d);
4672
4684
  return [...previousActions, convertAction(actionName, actionPayload)];
4673
4685
  }, []);
4674
4686
  const extractErrorFromGraphQlResponse = graphQlResponse => {
@@ -5072,7 +5084,7 @@ function uniqueObjects(items) {
5072
5084
 
5073
5085
  */
5074
5086
 
5075
- const messages$I = reactIntl.defineMessages({
5087
+ const messages$J = reactIntl.defineMessages({
5076
5088
  unique: {
5077
5089
  id: 'Validation.unique',
5078
5090
  description: 'An error message to show if the field must be unique',
@@ -5114,7 +5126,7 @@ const messages$I = reactIntl.defineMessages({
5114
5126
  defaultMessage: 'Invalid ID format. Please enter a valid ID.'
5115
5127
  }
5116
5128
  });
5117
- var validationMessages = messages$I;
5129
+ var validationMessages = messages$J;
5118
5130
 
5119
5131
  function getIndexesOfInvalidValues(values) {
5120
5132
  let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
@@ -5370,7 +5382,7 @@ function ReferenceSearch(props) {
5370
5382
  });
5371
5383
  }
5372
5384
 
5373
- const messages$G = reactIntl.defineMessages({
5385
+ const messages$H = reactIntl.defineMessages({
5374
5386
  placeholder: {
5375
5387
  id: 'CartDiscountReferenceSearch.placeholder',
5376
5388
  description: 'Placeholder for search for a cart discount',
@@ -5397,7 +5409,7 @@ const messages$G = reactIntl.defineMessages({
5397
5409
  defaultMessage: 'Enter search term'
5398
5410
  }
5399
5411
  });
5400
- var messages$H = messages$G;
5412
+ var messages$I = messages$H;
5401
5413
 
5402
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; }
5403
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; }
@@ -5422,7 +5434,7 @@ function Option$1(props) {
5422
5434
  fallbackOrder: languages
5423
5435
  })
5424
5436
  }), jsxRuntime.jsxs(uiKit.Text.Detail, {
5425
- children: [formatMessage(messages$H.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
5437
+ children: [formatMessage(messages$I.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
5426
5438
  })]
5427
5439
  })
5428
5440
  }));
@@ -5498,10 +5510,10 @@ function CartDiscountReferenceSearch(props) {
5498
5510
  onBlur: props.onBlur,
5499
5511
  onChange: props.onChange,
5500
5512
  value: returnNullIfEmpty(props.value),
5501
- placeholderLabel: formatMessage(messages$H.placeholder),
5502
- searchPromptLabel: formatMessage(messages$H.searchPrompt),
5503
- noResultsLabel: formatMessage(messages$H.noResults),
5504
- 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),
5505
5517
  mapItemToOption: mapItemToOption,
5506
5518
  loadItemsBySearchTerm: loadItemsBySearchTerm,
5507
5519
  loadItemsByIds: loadItemsByIds,
@@ -5511,7 +5523,7 @@ function CartDiscountReferenceSearch(props) {
5511
5523
  });
5512
5524
  }
5513
5525
 
5514
- const messages$E = reactIntl.defineMessages({
5526
+ const messages$F = reactIntl.defineMessages({
5515
5527
  placeholder: {
5516
5528
  id: 'CategoryReferenceSearch.placeholder',
5517
5529
  description: 'Placeholder for search for a category',
@@ -5543,7 +5555,7 @@ const messages$E = reactIntl.defineMessages({
5543
5555
  defaultMessage: 'Parent Category'
5544
5556
  }
5545
5557
  });
5546
- var messages$F = messages$E;
5558
+ var messages$G = messages$F;
5547
5559
 
5548
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; }
5549
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; }
@@ -5568,7 +5580,7 @@ function Option(props) {
5568
5580
  fallbackOrder: languages
5569
5581
  })
5570
5582
  }), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
5571
- children: `${formatMessage(messages$F.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
5583
+ children: `${formatMessage(messages$G.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
5572
5584
  key: 'name',
5573
5585
  locale: language,
5574
5586
  fallbackOrder: languages
@@ -5580,7 +5592,7 @@ function Option(props) {
5580
5592
  fallbackOrder: languages
5581
5593
  })}`
5582
5594
  }), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
5583
- children: `${formatMessage(messages$F.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
5595
+ children: `${formatMessage(messages$G.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
5584
5596
  })]
5585
5597
  })
5586
5598
  }));
@@ -5628,10 +5640,10 @@ function CategoryReferenceSearch(props) {
5628
5640
  onBlur: props.onBlur,
5629
5641
  onChange: props.onChange,
5630
5642
  value: props.value,
5631
- placeholderLabel: formatMessage(messages$F.placeholder),
5632
- searchPromptLabel: formatMessage(messages$F.searchPrompt),
5633
- noResultsLabel: formatMessage(messages$F.noResults),
5634
- 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),
5635
5647
  mapItemToOption: mapItemToOption,
5636
5648
  loadItemsBySearchTerm: loadItemsBySearchTerm,
5637
5649
  loadItemsByIds: loadItemsByIds,
@@ -5656,6 +5668,7 @@ function useCachedCategoryOptions(ids) {
5656
5668
  }]));
5657
5669
  }
5658
5670
 
5671
+ const _excluded$c = ["type"];
5659
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; }
5660
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; }
5661
5674
  var styles$g = {
@@ -5683,7 +5696,10 @@ var styles$g = {
5683
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",
5684
5697
  "add-button": "button-module__add-button___1f093"
5685
5698
  };
5686
- 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);
5687
5703
  const className = props.className,
5688
5704
  onClick = props.onClick,
5689
5705
  isDisabled = props.isDisabled,
@@ -5693,7 +5709,7 @@ const Button = props => {
5693
5709
  const dataProps = filterDataAttributes(props);
5694
5710
  return jsxRuntime.jsx("button", _objectSpread$Z(_objectSpread$Z({
5695
5711
  onClick: isDisabled ? null : onClick,
5696
- type: props.type,
5712
+ type: type,
5697
5713
  className: classnames__default["default"](styles$g.button, isDisabled ? styles$g.disabled : null, className),
5698
5714
  disabled: isDisabled,
5699
5715
  "aria-label": props['aria-label']
@@ -5702,12 +5718,9 @@ const Button = props => {
5702
5718
  }));
5703
5719
  };
5704
5720
  Button.displayName = 'Button';
5705
- Button.defaultProps = {
5706
- type: 'button'
5707
- };
5708
5721
  var Button$1 = Button;
5709
5722
 
5710
- var messages$D = reactIntl.defineMessages({
5723
+ var messages$E = reactIntl.defineMessages({
5711
5724
  chooseFile: {
5712
5725
  id: 'ButtonFileInput.chooseFile',
5713
5726
  description: 'The label text of the field for upload local file',
@@ -5715,34 +5728,39 @@ var messages$D = reactIntl.defineMessages({
5715
5728
  }
5716
5729
  });
5717
5730
 
5731
+ const _excluded$b = ["children", "allowMultiple", "acceptTypes"];
5718
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; }
5719
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; }
5720
5734
  var styles$f = {
5721
5735
  "button": "file-input-module__button___2KypN",
5722
5736
  "input": "file-input-module__input___3MP4D"
5723
5737
  };
5724
- const FileInput = props => jsxRuntime.jsx("label", {
5725
- children: jsxRuntime.jsxs("span", {
5726
- className: styles$f.button,
5727
- children: [jsxRuntime.jsx("input", {
5728
- className: styles$f.input,
5729
- type: "file",
5730
- accept: props.acceptTypes,
5731
- name: props.name,
5732
- onChange: props.onChange,
5733
- multiple: props.allowMultiple
5734
- }), props.children]
5735
- })
5736
- });
5737
- FileInput.displayName = 'FileInput';
5738
- FileInput.defaultProps = {
5739
- children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$D.chooseFile)),
5740
- allowMultiple: false,
5741
- 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
+ });
5742
5759
  };
5760
+ FileInput.displayName = 'FileInput';
5743
5761
  var FileInput$1 = FileInput;
5744
5762
 
5745
- var messages$C = reactIntl.defineMessages({
5763
+ var messages$D = reactIntl.defineMessages({
5746
5764
  countriesBasicSelectPlaceholder: {
5747
5765
  id: 'CountriesPicker.countriesBasicSelectPlaceholder',
5748
5766
  description: 'Placeholder of the basic field for countries',
@@ -5763,7 +5781,7 @@ var messages$C = reactIntl.defineMessages({
5763
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; }
5764
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; }
5765
5783
  const emptyCountryOption = intl => [{
5766
- label: intl.formatMessage(messages$C.countriesAsyncSelectDropdownTypeAheadPrompt),
5784
+ label: intl.formatMessage(messages$D.countriesAsyncSelectDropdownTypeAheadPrompt),
5767
5785
  value: undefined,
5768
5786
  isDisabled: true
5769
5787
  }];
@@ -5805,7 +5823,7 @@ function CountriesAsyncSelectDropdown(props) {
5805
5823
  var _context3;
5806
5824
  return _findInstanceProperty__default["default"](_context3 = props.options).call(_context3, country => country.value === countryCode);
5807
5825
  }),
5808
- placeholder: intl.formatMessage(messages$C.countriesAsyncSelectPlaceholder),
5826
+ placeholder: intl.formatMessage(messages$D.countriesAsyncSelectPlaceholder),
5809
5827
  loadOptions: handleLoadOptions,
5810
5828
  onChange: onOptionChange,
5811
5829
  isDisabled: props.isDisabled,
@@ -5825,7 +5843,7 @@ function CountriesBasicSelectDropdown(props) {
5825
5843
  value: props.value,
5826
5844
  isRequired: props.isRequired,
5827
5845
  description: props.description,
5828
- placeholder: intl.formatMessage(messages$C.countriesBasicSelectPlaceholder),
5846
+ placeholder: intl.formatMessage(messages$D.countriesBasicSelectPlaceholder),
5829
5847
  options: props.options,
5830
5848
  onChange: props.onChange,
5831
5849
  isDisabled: props.isDisabled,
@@ -5837,22 +5855,31 @@ function CountriesBasicSelectDropdown(props) {
5837
5855
 
5838
5856
  const COUNTRIES_ASYNC_LOADING_LIMIT = 60;
5839
5857
 
5858
+ const _excluded$a = ["countriesAsyncLoadingLimit", "isMulti", "isRequired", "hasWarning"];
5840
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; }
5841
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; }
5842
- function CountriesPicker(props) {
5843
- 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;
5844
5872
  return jsxRuntime.jsx(uiKit.Spacings.Stack, {
5845
- 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))
5846
5879
  });
5847
5880
  }
5848
- CountriesPicker.defaultProps = {
5849
- countriesAsyncLoadingLimit: COUNTRIES_ASYNC_LOADING_LIMIT,
5850
- isMulti: false,
5851
- isRequired: false,
5852
- hasWarning: false
5853
- };
5854
5881
 
5855
- var messages$B = reactIntl.defineMessages({
5882
+ var messages$C = reactIntl.defineMessages({
5856
5883
  noCustomerGroupsFound: {
5857
5884
  id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
5858
5885
  description: 'The message to display when no customer groups were found',
@@ -5942,7 +5969,7 @@ const CustomerGroupPickerInput = _ref => {
5942
5969
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
5943
5970
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
5944
5971
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
5945
- 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]);
5946
5973
  const tooltipTitle = currentOption?.data?.label ?? '';
5947
5974
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
5948
5975
  max: "scale",
@@ -5953,7 +5980,7 @@ const CustomerGroupPickerInput = _ref => {
5953
5980
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
5954
5981
  id: name,
5955
5982
  name: name,
5956
- placeholder: placeholder ?? formatMessage(messages$B.placeholder),
5983
+ placeholder: placeholder ?? formatMessage(messages$C.placeholder),
5957
5984
  loadOptions: loadOptionsDebounced,
5958
5985
  defaultOptions: true,
5959
5986
  showOptionGroupDivider: true,
@@ -6088,16 +6115,24 @@ const makeChangeHandler = setValue => event => {
6088
6115
  // attributes.
6089
6116
  const omitUnknownValues = (valuesAsMap, fieldDefinitionsAsMap) => omitBy__default["default"](valuesAsMap, (value, key) => isNil__default["default"](fieldDefinitionsAsMap[key]));
6090
6117
 
6091
- const options$1 = [{
6092
- value: 'true',
6093
- label: 'YES'
6094
- }, {
6095
- value: 'false',
6096
- label: 'NO'
6097
- }, {
6098
- value: 'all',
6099
- label: 'ALL'
6100
- }];
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
+
6101
6136
  const valueToBooleanSet = value => {
6102
6137
  switch (value) {
6103
6138
  case 'true':
@@ -6118,6 +6153,18 @@ const mapToValue = value => {
6118
6153
  };
6119
6154
  function CustomBooleanInputSet(props) {
6120
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]);
6121
6168
  const handleChange = makeChangeHandler(rawValue => {
6122
6169
  const nullifiedIfNeeded = !rawValue ? undefined : valueToBooleanSet(rawValue);
6123
6170
  props.setFieldValue(props.name, nullifiedIfNeeded);
@@ -6126,7 +6173,7 @@ function CustomBooleanInputSet(props) {
6126
6173
  id: props.name,
6127
6174
  name: props.name,
6128
6175
  value: value,
6129
- options: options$1,
6176
+ options: options,
6130
6177
  onChange: handleChange,
6131
6178
  onBlur: props.onBlur,
6132
6179
  isClearable: !props.fieldDefinition.required,
@@ -6539,7 +6586,8 @@ function CustomLocalizedTextInput(props) {
6539
6586
  hasError: props.hasError,
6540
6587
  isDisabled: props.isDisabled,
6541
6588
  isReadOnly: props.isReadOnly,
6542
- hasWarning: props.hasWarning
6589
+ hasWarning: props.hasWarning,
6590
+ additionalInfo: props.additionalInfo
6543
6591
  })
6544
6592
  });
6545
6593
  }
@@ -7350,7 +7398,8 @@ function CustomTimeInput(props) {
7350
7398
  setInternalValue = _useState2[1];
7351
7399
  const lastValueSentToFormik = React.useRef();
7352
7400
  React.useEffect(() => {
7353
- 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
+ ) {
7354
7403
  setInternalValue(formatTime(props.value));
7355
7404
  }
7356
7405
  }, [props.value, formatTime]);
@@ -7427,7 +7476,8 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
7427
7476
  hasError: props.hasError,
7428
7477
  hasWarning: props.hasWarning,
7429
7478
  handleWarningChange: props.handleWarningChange,
7430
- renderWarnings: props.renderWarnings
7479
+ renderWarnings: props.renderWarnings,
7480
+ additionalInfo: props.additionalInfo
7431
7481
  });
7432
7482
  });
7433
7483
  CustomFieldInput.displayName = 'CustomFieldInput';
@@ -7814,17 +7864,21 @@ const useDnDContext = () => {
7814
7864
  return React.useContext(DnDContext);
7815
7865
  };
7816
7866
 
7817
- const _excluded$1 = ["WrapperComponent"];
7867
+ const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
7818
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; }
7819
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; }
7820
- const textAttributeTypes = ['text', 'ltext'];
7870
+ const existingAttributeTypes = ['text', 'ltext'];
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'];
7821
7873
  const getFieldName = (parentName, fieldName) => {
7822
7874
  if (!parentName) return fieldName;
7823
7875
  return `${parentName}.${fieldName}`;
7824
7876
  };
7825
- const isTextAttribute = function () {
7877
+ const isAttributeType = function () {
7826
7878
  let fieldDefinitionType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7827
- return _includesInstanceProperty__default["default"](textAttributeTypes).call(textAttributeTypes, fieldDefinitionType.name);
7879
+ let isTailoringAttributeForOtherTypes = arguments.length > 1 ? arguments[1] : undefined;
7880
+ const attributeTypes = isTailoringAttributeForOtherTypes ? newAttributeTypes : existingAttributeTypes;
7881
+ return _includesInstanceProperty__default["default"](attributeTypes).call(attributeTypes, fieldDefinitionType.name) || isTailoringAttributeForOtherTypes && fieldDefinitionType.name === 'set' && _includesInstanceProperty__default["default"](setAttributeTypes).call(setAttributeTypes, fieldDefinitionType?.elementType?.name);
7828
7882
  };
7829
7883
  const isNested = fieldDefinition => {
7830
7884
  const type = fieldDefinition.type;
@@ -7836,8 +7890,10 @@ const isNested = fieldDefinition => {
7836
7890
  return typeName === CUSTOM_FIELD_TYPES.nested;
7837
7891
  };
7838
7892
  const CustomFieldsInternal = _ref => {
7839
- let WrapperComponent = _ref.WrapperComponent,
7840
- 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);
7841
7897
  const _useFormikContext = formik.useFormikContext(),
7842
7898
  errors = _useFormikContext.errors,
7843
7899
  touched = _useFormikContext.touched,
@@ -7845,6 +7901,8 @@ const CustomFieldsInternal = _ref => {
7845
7901
  handleBlur = _useFormikContext.handleBlur,
7846
7902
  status = _useFormikContext.status;
7847
7903
  const isTailoringAttributesEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
7904
+ const isTailoringAttributeForOtherTypes = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
7905
+ const isTailoringFallbackEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
7848
7906
  const didFormValidationFail = useDidFormValidationFail();
7849
7907
  const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
7850
7908
  const _useDnDContext = useDnDContext(),
@@ -7858,7 +7916,8 @@ const CustomFieldsInternal = _ref => {
7858
7916
  children: _mapInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, (fieldDefinition, index) => {
7859
7917
  const fieldName = getFieldName(props.name, fieldDefinition.name);
7860
7918
  const isTouched = Boolean(formik.getIn(touched, fieldName));
7861
- const isFieldDisabled = props.isDisabled && !(isTextAttribute(fieldDefinition.type) && isTailoringAttributesEnabled);
7919
+ const isFieldDisabled = props.isDisabled && !(isAttributeType(fieldDefinition.type, isTailoringAttributeForOtherTypes) && isTailoringAttributesEnabled);
7920
+ const isSet = fieldDefinition.type.name === 'set';
7862
7921
  const fieldErrors = formik.getIn(errors, fieldName);
7863
7922
  const value = props.inputValuesConverter(fieldName, formik.getIn(values, fieldName));
7864
7923
 
@@ -7883,7 +7942,8 @@ const CustomFieldsInternal = _ref => {
7883
7942
  hasError: hasError,
7884
7943
  hasWarning: props.renderWarnings && status?.warnings[fieldName],
7885
7944
  handleWarningChange: props.handleWarningChange,
7886
- renderWarnings: props.renderWarnings
7945
+ renderWarnings: props.renderWarnings,
7946
+ additionalInfo: isTailoringFallbackEnabled && props.additionalInfoHandler && !isSet ? props.additionalInfoHandler(fieldDefinition) : undefined
7887
7947
  };
7888
7948
  const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$J({}, fieldProps));
7889
7949
  return jsxRuntime.jsx(formik.FastField, {
@@ -7907,7 +7967,7 @@ const CustomFieldsInternal = _ref => {
7907
7967
  alignItems: "stretch",
7908
7968
  children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
7909
7969
  children: Field
7910
- }) : 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, {
7911
7971
  isTouched: isTouched,
7912
7972
  errors: fieldErrors
7913
7973
  })]
@@ -7920,9 +7980,6 @@ const CustomFieldsInternal = _ref => {
7920
7980
  });
7921
7981
  };
7922
7982
  CustomFieldsInternal.displayName = 'CustomFieldsInternal';
7923
- CustomFieldsInternal.defaultProps = {
7924
- renderCustomWarnings: () => null
7925
- };
7926
7983
  var CustomFieldsInternal$1 = CustomFieldsInternal;
7927
7984
 
7928
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; }
@@ -7994,14 +8051,14 @@ const attributesMapToNameValuePairs = map => {
7994
8051
  });
7995
8052
  };
7996
8053
 
7997
- const _excluded = ["WrapperComponent"];
8054
+ const _excluded$8 = ["WrapperComponent"];
7998
8055
  const getAttributeShortName = (fullName, attributesPrefix) => {
7999
8056
  if (!attributesPrefix) return fullName;
8000
8057
  return fullName.replace(`${attributesPrefix}.`, '');
8001
8058
  };
8002
8059
  function ProductAttributes(_ref) {
8003
8060
  let WrapperComponent = _ref.WrapperComponent,
8004
- props = _objectWithoutProperties(_ref, _excluded);
8061
+ props = _objectWithoutProperties(_ref, _excluded$8);
8005
8062
  const formik$1 = formik.useFormikContext();
8006
8063
  const fieldDefinitions = React.useMemo(() => {
8007
8064
  var _context;
@@ -8029,7 +8086,8 @@ function ProductAttributes(_ref) {
8029
8086
  WrapperComponent: WrapperComponent,
8030
8087
  renderWarnings: props.renderWarnings,
8031
8088
  renderCustomWarnings: props.renderCustomWarnings,
8032
- handleWarningChange: props.handleWarningChange
8089
+ handleWarningChange: props.handleWarningChange,
8090
+ additionalInfoHandler: props.additionalInfoHandler
8033
8091
  })
8034
8092
  })
8035
8093
  });
@@ -8475,9 +8533,37 @@ function ModeSelectInputOption(props) {
8475
8533
  }));
8476
8534
  }
8477
8535
 
8536
+ const _excluded$7 = ["lowerProductSelectionsLimit", "upperProductSelectionsLimit", "renderSelectInputOptionValuesByField", "optionType", "isMulti", "isRequired", "hasWarning", "hasError", "isClearable", "isReadOnly", "isDisabled", "excludedProductSelectionIds", "title"];
8478
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; }
8479
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; }
8480
- 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);
8481
8567
  const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1();
8482
8568
  const components = React.useMemo(() => {
8483
8569
  return {
@@ -8485,39 +8571,38 @@ function ProductSelectionsPicker(props) {
8485
8571
  if (optionInnerProps.isDisabled) {
8486
8572
  return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$F({}, optionInnerProps));
8487
8573
  }
8488
- if (props.optionType === TYPE_PROPERTY) {
8574
+ if (optionType === TYPE_PROPERTY) {
8489
8575
  return jsxRuntime.jsx(ModeSelectInputOption, _objectSpread$F({}, optionInnerProps));
8490
8576
  }
8491
8577
  return jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
8492
- optionType: props.optionType,
8578
+ optionType: optionType,
8493
8579
  optionInnerProps: optionInnerProps
8494
8580
  });
8495
8581
  }
8496
8582
  };
8497
- }, [props.optionType]);
8583
+ }, [optionType]);
8498
8584
  if (productSelectionsTotalFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
8499
- 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;
8500
8586
  return jsxRuntime.jsx(uiKit.Spacings.Stack, {
8501
- 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), {}, {
8502
8602
  components: components
8503
8603
  }))
8504
8604
  });
8505
8605
  }
8506
- ProductSelectionsPicker.defaultProps = {
8507
- lowerProductSelectionsLimit: LOWER_PRODUCT_SELECTIONS_LIMIT,
8508
- upperProductSelectionsLimit: UPPER_PRODUCT_SELECTIONS_LIMIT,
8509
- renderSelectInputOptionValuesByField: 'id',
8510
- optionType: 'double-property',
8511
- isMulti: false,
8512
- isRequired: false,
8513
- hasWarning: false,
8514
- hasError: false,
8515
- isClearable: false,
8516
- isReadOnly: false,
8517
- isDisabled: false,
8518
- excludedProductSelectionIds: [],
8519
- title: '' // FieldLabel requires title to have some value
8520
- };
8521
8606
 
8522
8607
  // NOTE: this component is duplicated in `app-shell/from-core`.
8523
8608
  var styles$b = {
@@ -8554,19 +8639,21 @@ const ScrollToFieldError = () => {
8554
8639
  if (firstErrorElement) {
8555
8640
  // Get a reference to the label.
8556
8641
  const firstElementId = firstErrorElement.getAttribute('id');
8557
- const localizedInputIndex = _indexOfInstanceProperty__default["default"](firstElementId).call(firstElementId, `.${dataLocale}`);
8642
+ if (firstElementId) {
8643
+ const localizedInputIndex = _indexOfInstanceProperty__default["default"](firstElementId).call(firstElementId, `.${dataLocale}`);
8558
8644
 
8559
- // check if locale is appended then remove it from id
8560
- 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;
8561
8647
 
8562
- // 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.
8563
8649
 
8564
- const elementToScrollTo =
8565
- // div is used only for custom fields
8566
- document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
8567
- elementToScrollTo.scrollIntoView?.({
8568
- behavior: 'smooth'
8569
- });
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
+ }
8570
8657
  }
8571
8658
  }, [dataLocale, isValid, submitCount]);
8572
8659
  return null;
@@ -8712,6 +8799,7 @@ const getCustomGroupLabelOption = customLabel => [{
8712
8799
  isDisabled: true
8713
8800
  }];
8714
8801
 
8802
+ const _excluded$6 = ["shouldFetchProductSelections"];
8715
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; }
8716
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; }
8717
8805
  const hasErrors$2 = errors => {
@@ -8742,7 +8830,10 @@ const emptyStoreOption = intl => [{
8742
8830
  value: undefined,
8743
8831
  isDisabled: true
8744
8832
  }];
8745
- 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);
8746
8837
  const intl = reactIntl.useIntl();
8747
8838
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
8748
8839
  dataLocale: applicationContext.dataLocale,
@@ -8756,7 +8847,7 @@ const StoresAsyncSelectInput = props => {
8756
8847
  offset: 0,
8757
8848
  sort: 'createdAt asc',
8758
8849
  excludeExtendedStoresList: true,
8759
- excludeProductSelections: !props.shouldFetchProductSelections,
8850
+ excludeProductSelections: !shouldFetchProductSelections,
8760
8851
  stores: keysOfStores?.length && keysOfStores,
8761
8852
  projectKey: props.projectKey
8762
8853
  });
@@ -8837,18 +8928,19 @@ const StoresAsyncSelectInput = props => {
8837
8928
  });
8838
8929
  };
8839
8930
  StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
8840
- StoresAsyncSelectInput.defaultProps = {
8841
- shouldFetchProductSelections: false
8842
- };
8843
8931
  var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
8844
8932
 
8933
+ const _excluded$5 = ["shouldFetchProductSelections"];
8845
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; }
8846
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; }
8847
8936
  const hasErrors$1 = errors => {
8848
8937
  var _context;
8849
8938
  return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
8850
8939
  };
8851
- 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);
8852
8944
  const intl = reactIntl.useIntl();
8853
8945
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
8854
8946
  dataLocale: applicationContext.dataLocale,
@@ -8862,7 +8954,7 @@ const StoresBasicSelectInput = props => {
8862
8954
  offset: 0,
8863
8955
  sort: 'createdAt asc',
8864
8956
  excludeExtendedStoresList: true,
8865
- excludeProductSelections: !props.shouldFetchProductSelections,
8957
+ excludeProductSelections: !shouldFetchProductSelections,
8866
8958
  stores: keysOfStores?.length && keysOfStores,
8867
8959
  projectKey: props.projectKey
8868
8960
  });
@@ -8887,7 +8979,7 @@ const StoresBasicSelectInput = props => {
8887
8979
  const currentStore = _findInstanceProperty__default["default"](listOptions).call(listOptions, store => store.value === value);
8888
8980
 
8889
8981
  // We need complete store info including productSelections
8890
- if (!props.shouldFetchProductSelections && !props?.renderLabel) {
8982
+ if (!shouldFetchProductSelections && !props?.renderLabel) {
8891
8983
  props.onChange(event);
8892
8984
  } else {
8893
8985
  props.onChange({
@@ -8935,9 +9027,6 @@ const StoresBasicSelectInput = props => {
8935
9027
  });
8936
9028
  };
8937
9029
  StoresBasicSelectInput.displayName = 'StoresBasicSelectInput';
8938
- StoresBasicSelectInput.defaultProps = {
8939
- shouldFetchProductSelections: false
8940
- };
8941
9030
  var StoresBasicSelectInput$1 = StoresBasicSelectInput;
8942
9031
 
8943
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 } } } };
@@ -8984,6 +9073,7 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
8984
9073
  };
8985
9074
  var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
8986
9075
 
9076
+ const _excluded$4 = ["shouldFetchProductSelections"];
8987
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; }
8988
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; }
8989
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 } } } };
@@ -9054,7 +9144,10 @@ const getValueFromOptions = _ref2 => {
9054
9144
  return selectedOptions[0];
9055
9145
  }
9056
9146
  };
9057
- 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);
9058
9151
  // hooks
9059
9152
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
9060
9153
  dataLocale: applicationContext.dataLocale,
@@ -9064,7 +9157,7 @@ const StoresSearchSelectInput = props => {
9064
9157
  projectLanguages = _useApplicationContex.projectLanguages;
9065
9158
  const intl = reactIntl.useIntl();
9066
9159
  const client$1 = client.useApolloClient();
9067
- const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, props.shouldFetchProductSelections);
9160
+ const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, shouldFetchProductSelections);
9068
9161
  const hasError = uiKit.AsyncSelectInput.isTouched(props.touched) && hasErrors(props.errors) || props.hasError;
9069
9162
  const handleLoadOptions = searchText => {
9070
9163
  const extractMatchedStores = client$1.query({
@@ -9073,15 +9166,15 @@ const StoresSearchSelectInput = props => {
9073
9166
  searchText,
9074
9167
  dataLocale,
9075
9168
  allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
9076
- shouldFetchProductSelections: props.shouldFetchProductSelections
9169
+ shouldFetchProductSelections
9077
9170
  }),
9078
9171
  context: {
9079
9172
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM,
9080
9173
  projectKey: props.projectKey
9081
9174
  },
9082
9175
  fetchPolicy: 'network-only'
9083
- }).then(_ref3 => {
9084
- let data = _ref3.data;
9176
+ }).then(_ref4 => {
9177
+ let data = _ref4.data;
9085
9178
  const result = data.storesByWherePredicate?.results.map(store => mapStoresToOptions({
9086
9179
  store,
9087
9180
  dataLocale,
@@ -9098,8 +9191,8 @@ const StoresSearchSelectInput = props => {
9098
9191
  return extractMatchedStores;
9099
9192
  };
9100
9193
  const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
9101
- const renderNoOptions = _ref4 => {
9102
- let inputValue = _ref4.inputValue;
9194
+ const renderNoOptions = _ref5 => {
9195
+ let inputValue = _ref5.inputValue;
9103
9196
  return jsxRuntime.jsxs("div", {
9104
9197
  className: styles$9.renderLabelContainer,
9105
9198
  children: [jsxRuntime.jsx("div", {
@@ -9156,17 +9249,26 @@ const StoresSearchSelectInput = props => {
9156
9249
  });
9157
9250
  };
9158
9251
  StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
9159
- StoresSearchSelectInput.defaultProps = {
9160
- shouldFetchProductSelections: false
9161
- };
9162
9252
  var StoresSearchSelectInput$1 = StoresSearchSelectInput;
9163
9253
 
9254
+ const _excluded$3 = ["lowerStoresLimit", "upperStoresLimit", "renderSelectInputOptionValuesByField", "optionType", "shouldFetchProductSelections"];
9164
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; }
9165
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; }
9166
9257
  var styles$8 = {
9167
9258
  "customOption": "store-select-input-module__customOption___2SC00"
9168
9259
  };
9169
- 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);
9170
9272
  const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1(props.projectKey);
9171
9273
  const components = React.useMemo(() => {
9172
9274
  return {
@@ -9175,19 +9277,19 @@ const StoreSelectInput = props => {
9175
9277
  if (optionInnerProps.isDisabled) {
9176
9278
  return jsxRuntime.jsx(uiKit.SelectInput.Option, _objectSpread$B({}, optionInnerProps));
9177
9279
  }
9178
- const isSearchSelectInput = totalNumberOfStoresFetcher.total > props.upperStoresLimit;
9280
+ const isSearchSelectInput = totalNumberOfStoresFetcher.total > upperStoresLimit;
9179
9281
  return jsxRuntime.jsx("div", {
9180
9282
  className: isSearchSelectInput ? styles$8.customOption : '',
9181
9283
  children: jsxRuntime.jsx(selectUtils.CustomSelectInputOption, {
9182
- optionType: props.optionType,
9284
+ optionType: optionType,
9183
9285
  optionInnerProps: optionInnerProps
9184
9286
  })
9185
9287
  });
9186
9288
  }
9187
9289
  };
9188
- }, [props.optionType, totalNumberOfStoresFetcher.total, props.upperStoresLimit]);
9290
+ }, [optionType, totalNumberOfStoresFetcher.total, upperStoresLimit]);
9189
9291
  if (totalNumberOfStoresFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
9190
- 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;
9191
9293
  return jsxRuntime.jsx(CustomStoreSelectInput, _objectSpread$B(_objectSpread$B({
9192
9294
  menuIsOpen: props.menuIsOpen,
9193
9295
  placeholder: props.placeholder,
@@ -9216,27 +9318,27 @@ const StoreSelectInput = props => {
9216
9318
  maxMenuHeight: props.maxMenuHeight,
9217
9319
  menuPortalTarget: props.menuPortalTarget,
9218
9320
  menuPortalZIndex: props.menuPortalZIndex,
9219
- renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField,
9220
- lowerStoresLimit: props.lowerStoresLimit,
9221
- upperStoresLimit: props.upperStoresLimit,
9321
+ renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
9322
+ lowerStoresLimit: lowerStoresLimit,
9323
+ upperStoresLimit: upperStoresLimit,
9222
9324
  allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
9223
- shouldFetchProductSelections: props.shouldFetchProductSelections,
9325
+ shouldFetchProductSelections: shouldFetchProductSelections,
9224
9326
  controlShouldRenderValue: props.controlShouldRenderValue
9225
9327
  }, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props)));
9226
9328
  };
9227
9329
  StoreSelectInput.displayName = 'StoreSelectInput';
9228
- StoreSelectInput.defaultProps = {
9229
- lowerStoresLimit: LOWER_STORES_LIMIT,
9230
- upperStoresLimit: UPPER_STORES_LIMIT,
9231
- renderSelectInputOptionValuesByField: 'id',
9232
- optionType: 'double-property',
9233
- shouldFetchProductSelections: false
9234
- };
9235
9330
  var StoreSelectInput$1 = StoreSelectInput;
9236
9331
 
9332
+ const _excluded$2 = ["lowerStoresLimit", "upperStoresLimit", "mappedValueField"];
9237
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; }
9238
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; }
9239
- 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);
9240
9342
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
9241
9343
  max: props.horizontalConstraint,
9242
9344
  children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
@@ -9273,8 +9375,8 @@ const StoreSelectField = props => {
9273
9375
  menuPortalZIndex: props.menuPortalZIndex,
9274
9376
  optionType: props.optionType,
9275
9377
  renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField,
9276
- lowerStoresLimit: props.lowerStoresLimit,
9277
- upperStoresLimit: props.upperStoresLimit,
9378
+ lowerStoresLimit: lowerStoresLimit,
9379
+ upperStoresLimit: upperStoresLimit,
9278
9380
  allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
9279
9381
  controlShouldRenderValue: props.controlShouldRenderValue
9280
9382
  }, utils.filterDataAttributes(props)), utils.filterAriaAttributes(props)))]
@@ -9282,11 +9384,6 @@ const StoreSelectField = props => {
9282
9384
  });
9283
9385
  };
9284
9386
  StoreSelectField.displayName = 'StoreSelectField';
9285
- StoreSelectField.defaultProps = {
9286
- lowerStoresLimit: LOWER_STORES_LIMIT,
9287
- upperStoresLimit: UPPER_STORES_LIMIT,
9288
- mappedValueField: 'id'
9289
- };
9290
9387
  var StoreSelectField$1 = StoreSelectField;
9291
9388
 
9292
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; }
@@ -9715,7 +9812,7 @@ const createEmptyCustomFields = typeDefinition => ({
9715
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)); }
9716
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; })(); }
9717
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 } } } };
9718
- 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'];
9719
9816
  const emptyTypeDefinitions = {
9720
9817
  total: 0,
9721
9818
  count: 0,
@@ -10268,7 +10365,7 @@ const defaultValue = {
10268
10365
  const PimIndexerContext = /*#__PURE__*/React.createContext(defaultValue);
10269
10366
  var PimIndexerContext$1 = PimIndexerContext;
10270
10367
 
10271
- 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 } } } };
10272
10369
  var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
10273
10370
  try {
10274
10371
  await dispatch(sdk.actions.head({
@@ -10288,11 +10385,12 @@ var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
10288
10385
  fetchPolicy: 'network-only'
10289
10386
  }),
10290
10387
  data = _await$apolloClient$q.data;
10291
- if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress) {
10388
+ if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress || data.indicesExist.productSelections.newInProgress) {
10292
10389
  return {
10293
10390
  status: 'indexing',
10294
10391
  isIndexingProducts: !data.indicesExist.products.searchableIndexExists,
10295
- isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists
10392
+ isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists,
10393
+ isIndexingProductSelections: !data.indicesExist.productSelections.searchableIndexExists
10296
10394
  };
10297
10395
  }
10298
10396
  return {
@@ -10326,21 +10424,23 @@ function ownKeys$r(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
10326
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; }
10327
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)); }
10328
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; })(); }
10329
- 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 } } } };
10330
- 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 } } } };
10331
- 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 } } } };
10332
10430
  const pimIndexerRequestContext = {
10333
10431
  target: constants.GRAPHQL_TARGETS.PIM_INDEXER
10334
10432
  };
10335
- const isIndexingCompleted = (products, productTypes) => products.completed && productTypes.completed;
10336
- 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;
10337
10435
  const getIndexingJobIds = _ref => {
10338
10436
  let _ref$data = _ref.data,
10339
10437
  products = _ref$data.products,
10340
- productTypes = _ref$data.productTypes;
10438
+ productTypes = _ref$data.productTypes,
10439
+ productSelections = _ref$data.productSelections;
10341
10440
  return {
10342
10441
  productsJobId: products?.indexingJobId || products?.existingIndexingJobId,
10343
- productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId
10442
+ productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId,
10443
+ productSelectionsJobId: productSelections?.indexingJobId || productSelections?.existingIndexingJobId
10344
10444
  };
10345
10445
  };
10346
10446
  let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
@@ -10363,12 +10463,14 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10363
10463
  const _await$_this$props$fe = await _this.props.fetchPimIndexStatus(_this.props.client, _this.props.projectKey),
10364
10464
  status = _await$_this$props$fe.status,
10365
10465
  isIndexingProducts = _await$_this$props$fe.isIndexingProducts,
10366
- isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes;
10466
+ isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes,
10467
+ isIndexingProductSelections = _await$_this$props$fe.isIndexingProductSelections;
10367
10468
  const isPimIndexerUnreachable = _includesInstanceProperty__default["default"](_context = ['not-configured', 'unreachable']).call(_context, status);
10368
10469
  if (status === 'indexing') {
10369
10470
  _this.monitorIndexingProgress({
10370
10471
  isIndexingProducts,
10371
- isIndexingProductTypes
10472
+ isIndexingProductTypes,
10473
+ isIndexingProductSelections
10372
10474
  });
10373
10475
  } else {
10374
10476
  _this.setState({
@@ -10425,8 +10527,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10425
10527
  variables: {
10426
10528
  productsJobId: _this.state.productsJobId || '',
10427
10529
  productTypesJobId: _this.state.productTypesJobId || '',
10530
+ productSelectionsJobId: _this.state.productSelectionsJobId || '',
10428
10531
  shouldIncludeProducts: !!_this.state.productsJobId,
10429
- shouldIncludeProductTypes: !!_this.state.productTypesJobId
10532
+ shouldIncludeProductTypes: !!_this.state.productTypesJobId,
10533
+ shouldIncludeProductSelections: !!_this.state.productSelectionsJobId
10430
10534
  },
10431
10535
  fetchPolicy: 'network-only'
10432
10536
  });
@@ -10436,7 +10540,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10436
10540
  };
10437
10541
  return {
10438
10542
  products: result.data.products || completedStatus,
10439
- productTypes: result.data.productTypes || completedStatus
10543
+ productTypes: result.data.productTypes || completedStatus,
10544
+ productSelections: result.data.productSelections || completedStatus
10440
10545
  };
10441
10546
  };
10442
10547
  _this.handleFinishedIndexing = async () => {
@@ -10475,9 +10580,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10475
10580
  try {
10476
10581
  const _await$_this$getIndex = await _this.getIndexingProgress(),
10477
10582
  products = _await$_this$getIndex.products,
10478
- productTypes = _await$_this$getIndex.productTypes;
10479
- const isCompleted = isIndexingCompleted(products, productTypes);
10480
- 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);
10481
10587
  _this.setState({
10482
10588
  indexingProgress
10483
10589
  });
@@ -10495,14 +10601,16 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10495
10601
  };
10496
10602
  _this.monitorIndexingProgress = async _ref2 => {
10497
10603
  let isIndexingProducts = _ref2.isIndexingProducts,
10498
- isIndexingProductTypes = _ref2.isIndexingProductTypes;
10604
+ isIndexingProductTypes = _ref2.isIndexingProductTypes,
10605
+ isIndexingProductSelections = _ref2.isIndexingProductSelections;
10499
10606
  if (_this.state.isProjectBeingIndexedByPim) return;
10500
10607
  try {
10501
10608
  const indexMutationResult = await _this.props.indexProject({
10502
10609
  context: pimIndexerRequestContext,
10503
10610
  variables: {
10504
10611
  shouldIndexProducts: isIndexingProducts,
10505
- shouldIndexProductTypes: isIndexingProductTypes
10612
+ shouldIndexProductTypes: isIndexingProductTypes,
10613
+ shouldIndexProductSelections: isIndexingProductSelections
10506
10614
  }
10507
10615
  });
10508
10616
  _this.setState(_objectSpread$r(_objectSpread$r({
@@ -10517,7 +10625,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10517
10625
  };
10518
10626
  _this.indexProject = () => _this.monitorIndexingProgress({
10519
10627
  isIndexingProductTypes: true,
10520
- isIndexingProducts: true
10628
+ isIndexingProducts: true,
10629
+ isIndexingProductSelections: true
10521
10630
  });
10522
10631
  return _this;
10523
10632
  }
@@ -11992,12 +12101,18 @@ var messages$c = reactIntl.defineMessages({
11992
12101
  }
11993
12102
  });
11994
12103
 
12104
+ const _excluded$1 = ["isRequired", "disabled"];
11995
12105
  const valueMapping = {
11996
12106
  yes: true,
11997
12107
  no: false,
11998
12108
  all: [true, false]
11999
12109
  };
12000
- 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);
12001
12116
  let selectedValue;
12002
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]);
12003
12118
  const yesLabel = props.intl.formatMessage(messages$c.yes);
@@ -12015,7 +12130,7 @@ const BooleanField = props => {
12015
12130
  });
12016
12131
  return jsxRuntime.jsx(uiKit.SelectInput, {
12017
12132
  name: props.name,
12018
- isClearable: !props.isRequired,
12133
+ isClearable: !isRequired,
12019
12134
  isSearchable: false,
12020
12135
  value: selectedValue,
12021
12136
  onChange: event => {
@@ -12025,14 +12140,10 @@ const BooleanField = props => {
12025
12140
  props.onChange(newValue);
12026
12141
  },
12027
12142
  options,
12028
- isDisabled: props.disabled
12143
+ isDisabled: disabled
12029
12144
  });
12030
12145
  };
12031
12146
  BooleanField.displayName = 'BooleanField';
12032
- BooleanField.defaultProps = {
12033
- isRequired: false,
12034
- disabled: false
12035
- };
12036
12147
  var booleanField = reactIntl.injectIntl(BooleanField);
12037
12148
  function getBooleanValue(value) {
12038
12149
  if (typeof value !== 'boolean') return undefined;
@@ -12076,16 +12187,19 @@ var messages$9 = reactIntl.defineMessages({
12076
12187
  }
12077
12188
  });
12078
12189
 
12190
+ const _excluded = ["isChecked"];
12079
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; }
12080
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; }
12081
- const MissingValueField = props => jsxRuntime.jsx(uiKit.CheckboxInput, {
12082
- name: "missing-value",
12083
- isChecked: props.isChecked,
12084
- onChange: props.onChange,
12085
- children: jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$6({}, messages$9.label))
12086
- });
12087
- MissingValueField.defaultProps = {
12088
- 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
+ });
12089
12203
  };
12090
12204
  var MissingValueField$1 = MissingValueField;
12091
12205
 
@@ -13359,7 +13473,8 @@ const not = function () {
13359
13473
 
13360
13474
  const safelyAddFallback = function (string) {
13361
13475
  let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : constants.NO_VALUE_FALLBACK;
13362
- return string === '' ? fallback : string ?? fallback;
13476
+ if (string === '') return fallback;
13477
+ return string ?? fallback;
13363
13478
  };
13364
13479
 
13365
13480
  var messages = reactIntl.defineMessages({
@@ -13883,7 +13998,7 @@ exports.resolveStatusType = resolveStatusType;
13883
13998
  exports.safelyAddFallback = safelyAddFallback;
13884
13999
  exports.sanitize = sanitize;
13885
14000
  exports.searchCategories = searchCategories;
13886
- exports.searchInputMessages = messages$M;
14001
+ exports.searchInputMessages = messages$N;
13887
14002
  exports.setDisplayName = setDisplayName$1;
13888
14003
  exports.setToArray = setToArray;
13889
14004
  exports.shallowEqual = shallowEqual;