@commercetools-frontend/experimental-components 6.3.2 → 6.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -166,6 +166,7 @@ const INTERVALS_IN_SECONDS = {
166
166
  const EXCLUDING_PRODUCTS = 'excludingProducts';
167
167
  const PRODUCT_TAILORING_FOR_ATTRIBUTES = 'productTailoringForAttributes';
168
168
  const PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT = 'productTailoringForAttributesTypesOtherThanText';
169
+ const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAttributesFallbackValues';
169
170
 
170
171
  // TODO: apply a more robust solution to overlaying issues
171
172
  const Z_INDEX_DROPDOWN = 30000;
@@ -183,7 +184,7 @@ var pickerMessages$1 = defineMessages({
183
184
  }
184
185
  });
185
186
 
186
- var messages$Q = defineMessages({
187
+ var messages$R = defineMessages({
187
188
  noChannelsFound: {
188
189
  id: 'Products.ChannelPickerInput.noChannelsFound',
189
190
  description: 'The message to display when no channels were found',
@@ -267,7 +268,7 @@ const ChannelPickerInput = _ref => {
267
268
  return inputValue.length === 0 && data.channels.total > 60 ? [...channels, getBottomOption()] : channels;
268
269
  }).catch(error => {
269
270
  setLoadingError(error);
270
- onError(error);
271
+ onError && onError(error);
271
272
  }), [loadOptions, convertChannelToOption, onError]);
272
273
  const loadOptionsDebounced = useDebouncedPromiseCallback$1(handleLoadOptions, 300);
273
274
  const _useHandlers = useHandlers$1(onChange),
@@ -280,10 +281,10 @@ const ChannelPickerInput = _ref => {
280
281
  }, [handleInternalInputChange]);
281
282
  const isCurrentOptionLoadingFailed = Boolean(currentOption?.error);
282
283
  useEffect(() => {
283
- if (isCurrentOptionLoadingFailed) onError(currentOption.error);
284
+ if (isCurrentOptionLoadingFailed && onError) onError(currentOption.error);
284
285
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
285
286
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
286
- const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$Q.noChannelsFound), [loadingError, formatMessage]);
287
+ const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$R.noChannelsFound), [loadingError, formatMessage]);
287
288
  const tooltipTitle = currentOption?.data?.label ?? '';
288
289
  return jsx(Constraints.Horizontal, {
289
290
  max: "scale",
@@ -294,7 +295,7 @@ const ChannelPickerInput = _ref => {
294
295
  children: jsx(AsyncSelectInput, {
295
296
  id: name,
296
297
  name: name,
297
- placeholder: placeholder ?? formatMessage(messages$Q.placeholder),
298
+ placeholder: placeholder ?? formatMessage(messages$R.placeholder),
298
299
  loadOptions: loadOptionsDebounced,
299
300
  defaultOptions: true,
300
301
  showOptionGroupDivider: true,
@@ -350,7 +351,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
350
351
  FormattedDateTime.displayName = 'FormattedDateTime';
351
352
  var FormattedDateTime$1 = injectIntl(FormattedDateTime);
352
353
 
353
- var messages$P = defineMessages({
354
+ var messages$Q = defineMessages({
354
355
  noProductTypesFound: {
355
356
  id: 'Products.ProductTypePickerInput.noProductTypesFound',
356
357
  description: 'The message to display when no product types were found',
@@ -439,7 +440,7 @@ const ProductTypePickerInput = _ref => {
439
440
  children: jsx(AsyncSelectInput, {
440
441
  id: name,
441
442
  name: name,
442
- placeholder: formatMessage(messages$P.placeholder),
443
+ placeholder: formatMessage(messages$Q.placeholder),
443
444
  loadOptions: loadOptionsDebounced,
444
445
  defaultOptions: [],
445
446
  isClearable: isClearable,
@@ -452,7 +453,7 @@ const ProductTypePickerInput = _ref => {
452
453
  onInputChange: handleInputChange,
453
454
  onBlur: onBlur,
454
455
  value: currentOption.data,
455
- noOptionsMessage: () => loadingError ? null : formatMessage(messages$P.noProductTypesFound),
456
+ noOptionsMessage: () => loadingError ? null : formatMessage(messages$Q.noProductTypesFound),
456
457
  hasError: hasError || isLoadingFailed,
457
458
  menuPortalZIndex: Z_INDEX_DROPDOWN,
458
459
  menuPortalTarget: document.body,
@@ -468,7 +469,7 @@ const ProductTypePickerInput = _ref => {
468
469
  ProductTypePickerInput.displayName = 'ProductTypePickerInput';
469
470
  var ProductTypePickerInput$1 = ProductTypePickerInput;
470
471
 
471
- var messages$O = defineMessages({
472
+ var messages$P = defineMessages({
472
473
  noStatesFound: {
473
474
  id: 'Products.StatePickerInput.noStatesFound',
474
475
  description: 'The message to display when no states were found',
@@ -552,7 +553,7 @@ const StatePickerInput = _ref => {
552
553
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
553
554
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
554
555
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
555
- const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$O.noStatesFound), [loadingError, formatMessage]);
556
+ const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$P.noStatesFound), [loadingError, formatMessage]);
556
557
  const tooltipTitle = currentOption?.data?.label ?? '';
557
558
  return jsx(Constraints.Horizontal, {
558
559
  max: "scale",
@@ -564,7 +565,7 @@ const StatePickerInput = _ref => {
564
565
  id: name,
565
566
  name: name,
566
567
  horizontalConstraint: "scale",
567
- placeholder: formatMessage(messages$O.placeholder),
568
+ placeholder: formatMessage(messages$P.placeholder),
568
569
  loadOptions: loadOptionsDebounced,
569
570
  defaultOptions: true,
570
571
  showOptionGroupDivider: true,
@@ -621,7 +622,7 @@ const CustomFieldTooltip = _ref => {
621
622
  };
622
623
  var CustomFieldTooltip$1 = CustomFieldTooltip;
623
624
 
624
- var messages$N = defineMessages({
625
+ var messages$O = defineMessages({
625
626
  bottomOption: {
626
627
  id: 'Products.Pickers.bottomOption',
627
628
  description: 'The message to display at the end of the options menu',
@@ -633,7 +634,7 @@ function ownKeys$1p(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertyS
633
634
  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(_context = ownKeys$1p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1p(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
634
635
  const getBottomOption = formatMessage => ({
635
636
  options: [{
636
- label: formatMessage ? formatMessage(messages$N.bottomOption) : messages$N.bottomOption,
637
+ label: formatMessage ? formatMessage(messages$O.bottomOption) : messages$O.bottomOption,
637
638
  isBottomOption: true,
638
639
  isDisabled: true
639
640
  }]
@@ -680,7 +681,7 @@ const useHandlers = onChange => {
680
681
  };
681
682
  var useHandlers$1 = useHandlers;
682
683
 
683
- const _excluded$3 = ["extraWhere"];
684
+ const _excluded$e = ["extraWhere"];
684
685
  function ownKeys$1n(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
685
686
  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(_context2 = ownKeys$1n(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1n(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
686
687
  const constructPrefixSearchPredicate$1 = function () {
@@ -723,7 +724,7 @@ const useLoadOptions = _ref => {
723
724
  }
724
725
  const _ref2 = variables ?? {},
725
726
  extraWhere = _ref2.extraWhere,
726
- restVariables = _objectWithoutProperties(_ref2, _excluded$3);
727
+ restVariables = _objectWithoutProperties(_ref2, _excluded$e);
727
728
  if (typeof extraWhere === 'string') {
728
729
  where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
729
730
  }
@@ -742,7 +743,7 @@ const useLoadOptions = _ref => {
742
743
  };
743
744
  var useLoadOptions$1 = useLoadOptions;
744
745
 
745
- 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 } } } };
746
+ 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 } } } };
746
747
  const useExecuteGraphQLRequest = () => {
747
748
  const apolloClient = useApolloClient$1();
748
749
  return useCallback((query, variables, context, fetchPolicy) => {
@@ -1156,7 +1157,7 @@ ThrottledField.defaultProps = {
1156
1157
  };
1157
1158
  var ThrottledField$1 = ThrottledField;
1158
1159
 
1159
- var messages$M = defineMessages({
1160
+ var messages$N = defineMessages({
1160
1161
  buttonLabel: {
1161
1162
  id: 'SearchInput.buttonLabel',
1162
1163
  description: 'Label for "Search" button.',
@@ -1261,7 +1262,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
1261
1262
  "data-testid": this.props.testId || 'search-input',
1262
1263
  value: this.state.text,
1263
1264
  label: this.props.label,
1264
- placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$M.placeholder),
1265
+ placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$N.placeholder),
1265
1266
  inputRef: this.props.inputRef || this.setInputRef,
1266
1267
  onChange: this.handleInputChange,
1267
1268
  onEnter: this.handleEnter,
@@ -1930,7 +1931,7 @@ const usePersistedReminder = function () {
1930
1931
  };
1931
1932
  var usePersistedReminder$1 = usePersistedReminder;
1932
1933
 
1933
- var messages$L = defineMessages({
1934
+ var messages$M = defineMessages({
1934
1935
  profileUpdated: {
1935
1936
  id: 'NotificationText.profileUpdated',
1936
1937
  description: 'Label for the notification header',
@@ -1967,9 +1968,9 @@ const NotificationText = () => jsxs(Spacings.Stack, {
1967
1968
  children: [jsx(Text.Body, {
1968
1969
  as: "p",
1969
1970
  isBold: true,
1970
- intlMessage: messages$L.profileUpdated
1971
+ intlMessage: messages$M.profileUpdated
1971
1972
  }), jsx(Text.Body, {
1972
- intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.addMoreInformation), {}, {
1973
+ intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.addMoreInformation), {}, {
1973
1974
  values: {
1974
1975
  newline: getNewLine
1975
1976
  }
@@ -1978,7 +1979,7 @@ const NotificationText = () => jsxs(Spacings.Stack, {
1978
1979
  }), jsx(Spacings.Stack, {
1979
1980
  scale: "xs",
1980
1981
  children: jsx(Text.Body, {
1981
- intlMessage: _objectSpread$19(_objectSpread$19({}, messages$L.informationAndProfileLink), {}, {
1982
+ intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.informationAndProfileLink), {}, {
1982
1983
  values: {
1983
1984
  newline: getNewLine,
1984
1985
  link: getLinkToProfile
@@ -2103,7 +2104,7 @@ const useEventCallback = (fn, dependencies) => {
2103
2104
  };
2104
2105
  var useEventCallback$1 = useEventCallback;
2105
2106
 
2106
- var messages$K = defineMessages({
2107
+ var messages$L = defineMessages({
2107
2108
  fallbackHint: {
2108
2109
  id: 'KeyFallback.fallbackHint',
2109
2110
  description: 'key fallback for a specified resource key (e.g name)',
@@ -2127,7 +2128,7 @@ const useLocalizedKeyFallback = () => {
2127
2128
  return values => {
2128
2129
  if (!values.resource) return null;
2129
2130
  const localizedString = values.resource[values.localizedStringFieldName];
2130
- const fallbackHintWithKey = intl.formatMessage(messages$K.fallbackHint, {
2131
+ const fallbackHintWithKey = intl.formatMessage(messages$L.fallbackHint, {
2131
2132
  key: values.resource.key
2132
2133
  });
2133
2134
  if (!localizedString) return fallbackHintWithKey;
@@ -3784,7 +3785,7 @@ function formatMoney$2(moneyValue, intl, options) {
3784
3785
  }, options));
3785
3786
  }
3786
3787
 
3787
- var messages$J = defineMessages({
3788
+ var messages$K = defineMessages({
3788
3789
  booleanYes: {
3789
3790
  id: 'AttributeTypeFormats.boolean.yes',
3790
3791
  description: 'The label for boolean attribute `true` value',
@@ -3866,7 +3867,7 @@ const formatDateTime = _ref7 => {
3866
3867
  const formatBoolean = _ref8 => {
3867
3868
  let value = _ref8.value,
3868
3869
  intl = _ref8.intl;
3869
- return value ? intl.formatMessage(messages$J.booleanYes) : intl.formatMessage(messages$J.booleanNo);
3870
+ return value ? intl.formatMessage(messages$K.booleanYes) : intl.formatMessage(messages$K.booleanNo);
3870
3871
  };
3871
3872
  const formatNilType = _ref9 => {
3872
3873
  let value = _ref9.value,
@@ -4025,9 +4026,9 @@ const getPrefixSearchBounds = input => {
4025
4026
  };
4026
4027
  var getPrefixSearchBounds$1 = getPrefixSearchBounds;
4027
4028
 
4028
- const _excluded$2 = ["action"];
4029
+ const _excluded$d = ["action"];
4029
4030
  function ownKeys$15(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4030
- 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(_context8 = ownKeys$15(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context9 = ownKeys$15(Object(t))).call(_context9, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
4031
+ 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(_context10 = ownKeys$15(Object(t), !0)).call(_context10, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context11 = ownKeys$15(Object(t))).call(_context11, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
4031
4032
 
4032
4033
  /**
4033
4034
  * Checks if a value is a LocalizedString
@@ -4164,6 +4165,7 @@ const createAttributeTypeValue = attribute => {
4164
4165
  const formatMoney = valueType => money => {
4165
4166
  switch (valueType) {
4166
4167
  case 'fixed':
4168
+ case 'fixedCart':
4167
4169
  return {
4168
4170
  [money.type]: _objectSpread$15({
4169
4171
  centAmount: money.centAmount,
@@ -4195,6 +4197,7 @@ const convertChangeValueAction = actionPayload => {
4195
4197
  absolute: ['money'],
4196
4198
  absoluteCart: ['money', 'applicationMode'],
4197
4199
  fixed: ['money'],
4200
+ fixedCart: ['money', 'applicationMode'],
4198
4201
  giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
4199
4202
  };
4200
4203
  const filteredValue = pick(actionPayload.value, possibleTypeKeys[valueType]);
@@ -4218,7 +4221,7 @@ const convertChangeValueAction = actionPayload => {
4218
4221
  * as its dynamic content can not be typed in SDL for the mutation.
4219
4222
  */
4220
4223
  const convertAction = (actionName, actionPayload) => {
4221
- var _context3, _context4, _context5;
4224
+ var _context3, _context4, _context5, _context6, _context7;
4222
4225
  const getNameFromPayload = payload => {
4223
4226
  // changeName for `Organizations`
4224
4227
  if (typeof payload.name === 'string') return payload;
@@ -4499,18 +4502,26 @@ const convertAction = (actionName, actionPayload) => {
4499
4502
  return {
4500
4503
  [actionName]: {
4501
4504
  target: {
4502
- [actionPayload.target.type]: omit(actionPayload.target, ['type', '__typename'])
4505
+ [actionPayload.target.type]: _objectSpread$15(_objectSpread$15(_objectSpread$15({}, omit(actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
4506
+ triggerPattern: _mapInstanceProperty(_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
4507
+ [pattern.type]: omit(pattern, ['type', '__typename'])
4508
+ }))
4509
+ }), actionPayload.target.targetPattern && {
4510
+ targetPattern: _mapInstanceProperty(_context7 = actionPayload.target.targetPattern).call(_context7, pattern => ({
4511
+ [pattern.type]: omit(pattern, ['type', '__typename'])
4512
+ }))
4513
+ })
4503
4514
  }
4504
4515
  }
4505
4516
  };
4506
4517
  case 'addAddress':
4507
4518
  case 'changeAddress':
4508
4519
  {
4509
- var _context6;
4520
+ var _context8;
4510
4521
  const _ref3 = actionPayload.address?.custom || {},
4511
4522
  _ref3$fields = _ref3.fields,
4512
4523
  fields = _ref3$fields === void 0 ? {} : _ref3$fields;
4513
- const customFields = isEmpty$3(fields) ? null : _mapInstanceProperty(_context6 = _Object$entries(fields)).call(_context6, _ref4 => {
4524
+ const customFields = isEmpty$3(fields) ? null : _mapInstanceProperty(_context8 = _Object$entries(fields)).call(_context8, _ref4 => {
4514
4525
  let _ref5 = _slicedToArray(_ref4, 2),
4515
4526
  name = _ref5[0],
4516
4527
  value = _ref5[1];
@@ -4535,13 +4546,13 @@ const convertAction = (actionName, actionPayload) => {
4535
4546
  }
4536
4547
  case 'setAddressCustomType':
4537
4548
  {
4538
- var _context7;
4549
+ var _context9;
4539
4550
  const _ref6 = actionPayload || {},
4540
4551
  addressId = _ref6.addressId,
4541
4552
  _ref6$fields = _ref6.fields,
4542
4553
  fields = _ref6$fields === void 0 ? {} : _ref6$fields,
4543
4554
  type = _ref6.type;
4544
- const customFields = isEmpty$3(fields) ? null : _mapInstanceProperty(_context7 = _Object$entries(fields)).call(_context7, _ref7 => {
4555
+ const customFields = isEmpty$3(fields) ? null : _mapInstanceProperty(_context9 = _Object$entries(fields)).call(_context9, _ref7 => {
4545
4556
  let _ref8 = _slicedToArray(_ref7, 2),
4546
4557
  name = _ref8[0],
4547
4558
  value = _ref8[1];
@@ -4569,7 +4580,7 @@ const convertAction = (actionName, actionPayload) => {
4569
4580
  };
4570
4581
  const createGraphQlUpdateActions = actions => _reduceInstanceProperty(actions).call(actions, (previousActions, _ref9) => {
4571
4582
  let actionName = _ref9.action,
4572
- actionPayload = _objectWithoutProperties(_ref9, _excluded$2);
4583
+ actionPayload = _objectWithoutProperties(_ref9, _excluded$d);
4573
4584
  return [...previousActions, convertAction(actionName, actionPayload)];
4574
4585
  }, []);
4575
4586
  const extractErrorFromGraphQlResponse = graphQlResponse => {
@@ -4973,7 +4984,7 @@ function uniqueObjects(items) {
4973
4984
 
4974
4985
  */
4975
4986
 
4976
- const messages$I = defineMessages({
4987
+ const messages$J = defineMessages({
4977
4988
  unique: {
4978
4989
  id: 'Validation.unique',
4979
4990
  description: 'An error message to show if the field must be unique',
@@ -5015,7 +5026,7 @@ const messages$I = defineMessages({
5015
5026
  defaultMessage: 'Invalid ID format. Please enter a valid ID.'
5016
5027
  }
5017
5028
  });
5018
- var validationMessages = messages$I;
5029
+ var validationMessages = messages$J;
5019
5030
 
5020
5031
  function getIndexesOfInvalidValues(values) {
5021
5032
  let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
@@ -5271,7 +5282,7 @@ function ReferenceSearch(props) {
5271
5282
  });
5272
5283
  }
5273
5284
 
5274
- const messages$G = defineMessages({
5285
+ const messages$H = defineMessages({
5275
5286
  placeholder: {
5276
5287
  id: 'CartDiscountReferenceSearch.placeholder',
5277
5288
  description: 'Placeholder for search for a cart discount',
@@ -5298,7 +5309,7 @@ const messages$G = defineMessages({
5298
5309
  defaultMessage: 'Enter search term'
5299
5310
  }
5300
5311
  });
5301
- var messages$H = messages$G;
5312
+ var messages$I = messages$H;
5302
5313
 
5303
5314
  function ownKeys$11(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5304
5315
  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(_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -5323,7 +5334,7 @@ function Option$1(props) {
5323
5334
  fallbackOrder: languages
5324
5335
  })
5325
5336
  }), jsxs(Text.Detail, {
5326
- children: [formatMessage(messages$H.key), ": ", cartDiscount.key || NO_VALUE_FALLBACK]
5337
+ children: [formatMessage(messages$I.key), ": ", cartDiscount.key || NO_VALUE_FALLBACK]
5327
5338
  })]
5328
5339
  })
5329
5340
  }));
@@ -5399,10 +5410,10 @@ function CartDiscountReferenceSearch(props) {
5399
5410
  onBlur: props.onBlur,
5400
5411
  onChange: props.onChange,
5401
5412
  value: returnNullIfEmpty(props.value),
5402
- placeholderLabel: formatMessage(messages$H.placeholder),
5403
- searchPromptLabel: formatMessage(messages$H.searchPrompt),
5404
- noResultsLabel: formatMessage(messages$H.noResults),
5405
- referenceIsMissingLabel: formatMessage(messages$H.isMissing),
5413
+ placeholderLabel: formatMessage(messages$I.placeholder),
5414
+ searchPromptLabel: formatMessage(messages$I.searchPrompt),
5415
+ noResultsLabel: formatMessage(messages$I.noResults),
5416
+ referenceIsMissingLabel: formatMessage(messages$I.isMissing),
5406
5417
  mapItemToOption: mapItemToOption,
5407
5418
  loadItemsBySearchTerm: loadItemsBySearchTerm,
5408
5419
  loadItemsByIds: loadItemsByIds,
@@ -5412,7 +5423,7 @@ function CartDiscountReferenceSearch(props) {
5412
5423
  });
5413
5424
  }
5414
5425
 
5415
- const messages$E = defineMessages({
5426
+ const messages$F = defineMessages({
5416
5427
  placeholder: {
5417
5428
  id: 'CategoryReferenceSearch.placeholder',
5418
5429
  description: 'Placeholder for search for a category',
@@ -5444,7 +5455,7 @@ const messages$E = defineMessages({
5444
5455
  defaultMessage: 'Parent Category'
5445
5456
  }
5446
5457
  });
5447
- var messages$F = messages$E;
5458
+ var messages$G = messages$F;
5448
5459
 
5449
5460
  function ownKeys$$(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5450
5461
  function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
@@ -5469,7 +5480,7 @@ function Option(props) {
5469
5480
  fallbackOrder: languages
5470
5481
  })
5471
5482
  }), category.parent && jsx(Text.Detail, {
5472
- children: `${formatMessage(messages$F.parentCategory)}: ${formatLocalizedString(category.parent, {
5483
+ children: `${formatMessage(messages$G.parentCategory)}: ${formatLocalizedString(category.parent, {
5473
5484
  key: 'name',
5474
5485
  locale: language,
5475
5486
  fallbackOrder: languages
@@ -5481,7 +5492,7 @@ function Option(props) {
5481
5492
  fallbackOrder: languages
5482
5493
  })}`
5483
5494
  }), category.externalId && jsx(Text.Detail, {
5484
- children: `${formatMessage(messages$F.externalId)}: ${category.externalId || NO_VALUE_FALLBACK}`
5495
+ children: `${formatMessage(messages$G.externalId)}: ${category.externalId || NO_VALUE_FALLBACK}`
5485
5496
  })]
5486
5497
  })
5487
5498
  }));
@@ -5529,10 +5540,10 @@ function CategoryReferenceSearch(props) {
5529
5540
  onBlur: props.onBlur,
5530
5541
  onChange: props.onChange,
5531
5542
  value: props.value,
5532
- placeholderLabel: formatMessage(messages$F.placeholder),
5533
- searchPromptLabel: formatMessage(messages$F.searchPrompt),
5534
- noResultsLabel: formatMessage(messages$F.noResults),
5535
- referenceIsMissingLabel: formatMessage(messages$F.isMissing),
5543
+ placeholderLabel: formatMessage(messages$G.placeholder),
5544
+ searchPromptLabel: formatMessage(messages$G.searchPrompt),
5545
+ noResultsLabel: formatMessage(messages$G.noResults),
5546
+ referenceIsMissingLabel: formatMessage(messages$G.isMissing),
5536
5547
  mapItemToOption: mapItemToOption,
5537
5548
  loadItemsBySearchTerm: loadItemsBySearchTerm,
5538
5549
  loadItemsByIds: loadItemsByIds,
@@ -5557,6 +5568,7 @@ function useCachedCategoryOptions(ids) {
5557
5568
  }]));
5558
5569
  }
5559
5570
 
5571
+ const _excluded$c = ["type"];
5560
5572
  function ownKeys$Z(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5561
5573
  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(_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
5562
5574
  var styles$g = {
@@ -5584,7 +5596,10 @@ var styles$g = {
5584
5596
  "save-alt": "button-module__save-alt___6iHMF button-module__save___1-KXp button-module__confirm___-W92x button-module__button___1OzVf button-module__alt___Z6PWx",
5585
5597
  "add-button": "button-module__add-button___1f093"
5586
5598
  };
5587
- const Button = props => {
5599
+ const Button = _ref => {
5600
+ let _ref$type = _ref.type,
5601
+ type = _ref$type === void 0 ? 'button' : _ref$type,
5602
+ props = _objectWithoutProperties(_ref, _excluded$c);
5588
5603
  const className = props.className,
5589
5604
  onClick = props.onClick,
5590
5605
  isDisabled = props.isDisabled,
@@ -5594,7 +5609,7 @@ const Button = props => {
5594
5609
  const dataProps = filterDataAttributes(props);
5595
5610
  return jsx("button", _objectSpread$Z(_objectSpread$Z({
5596
5611
  onClick: isDisabled ? null : onClick,
5597
- type: props.type,
5612
+ type: type,
5598
5613
  className: classnames(styles$g.button, isDisabled ? styles$g.disabled : null, className),
5599
5614
  disabled: isDisabled,
5600
5615
  "aria-label": props['aria-label']
@@ -5603,12 +5618,9 @@ const Button = props => {
5603
5618
  }));
5604
5619
  };
5605
5620
  Button.displayName = 'Button';
5606
- Button.defaultProps = {
5607
- type: 'button'
5608
- };
5609
5621
  var Button$1 = Button;
5610
5622
 
5611
- var messages$D = defineMessages({
5623
+ var messages$E = defineMessages({
5612
5624
  chooseFile: {
5613
5625
  id: 'ButtonFileInput.chooseFile',
5614
5626
  description: 'The label text of the field for upload local file',
@@ -5616,34 +5628,39 @@ var messages$D = defineMessages({
5616
5628
  }
5617
5629
  });
5618
5630
 
5631
+ const _excluded$b = ["children", "allowMultiple", "acceptTypes"];
5619
5632
  function ownKeys$Y(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5620
5633
  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(_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
5621
5634
  var styles$f = {
5622
5635
  "button": "file-input-module__button___2KypN",
5623
5636
  "input": "file-input-module__input___3MP4D"
5624
5637
  };
5625
- const FileInput = props => jsx("label", {
5626
- children: jsxs("span", {
5627
- className: styles$f.button,
5628
- children: [jsx("input", {
5629
- className: styles$f.input,
5630
- type: "file",
5631
- accept: props.acceptTypes,
5632
- name: props.name,
5633
- onChange: props.onChange,
5634
- multiple: props.allowMultiple
5635
- }), props.children]
5636
- })
5637
- });
5638
- FileInput.displayName = 'FileInput';
5639
- FileInput.defaultProps = {
5640
- children: jsx(FormattedMessage, _objectSpread$Y({}, messages$D.chooseFile)),
5641
- allowMultiple: false,
5642
- acceptTypes: 'image/png,image/jpeg,image/gif'
5638
+ const FileInput = _ref => {
5639
+ let _ref$children = _ref.children,
5640
+ children = _ref$children === void 0 ? jsx(FormattedMessage, _objectSpread$Y({}, messages$E.chooseFile)) : _ref$children,
5641
+ _ref$allowMultiple = _ref.allowMultiple,
5642
+ allowMultiple = _ref$allowMultiple === void 0 ? false : _ref$allowMultiple,
5643
+ _ref$acceptTypes = _ref.acceptTypes,
5644
+ acceptTypes = _ref$acceptTypes === void 0 ? 'image/png,image/jpeg,image/gif' : _ref$acceptTypes,
5645
+ props = _objectWithoutProperties(_ref, _excluded$b);
5646
+ return jsx("label", {
5647
+ children: jsxs("span", {
5648
+ className: styles$f.button,
5649
+ children: [jsx("input", {
5650
+ className: styles$f.input,
5651
+ type: "file",
5652
+ accept: acceptTypes,
5653
+ name: props.name,
5654
+ onChange: props.onChange,
5655
+ multiple: allowMultiple
5656
+ }), children]
5657
+ })
5658
+ });
5643
5659
  };
5660
+ FileInput.displayName = 'FileInput';
5644
5661
  var FileInput$1 = FileInput;
5645
5662
 
5646
- var messages$C = defineMessages({
5663
+ var messages$D = defineMessages({
5647
5664
  countriesBasicSelectPlaceholder: {
5648
5665
  id: 'CountriesPicker.countriesBasicSelectPlaceholder',
5649
5666
  description: 'Placeholder of the basic field for countries',
@@ -5664,7 +5681,7 @@ var messages$C = defineMessages({
5664
5681
  function ownKeys$X(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5665
5682
  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(_context4 = ownKeys$X(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context5 = ownKeys$X(Object(t))).call(_context5, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
5666
5683
  const emptyCountryOption = intl => [{
5667
- label: intl.formatMessage(messages$C.countriesAsyncSelectDropdownTypeAheadPrompt),
5684
+ label: intl.formatMessage(messages$D.countriesAsyncSelectDropdownTypeAheadPrompt),
5668
5685
  value: undefined,
5669
5686
  isDisabled: true
5670
5687
  }];
@@ -5706,7 +5723,7 @@ function CountriesAsyncSelectDropdown(props) {
5706
5723
  var _context3;
5707
5724
  return _findInstanceProperty(_context3 = props.options).call(_context3, country => country.value === countryCode);
5708
5725
  }),
5709
- placeholder: intl.formatMessage(messages$C.countriesAsyncSelectPlaceholder),
5726
+ placeholder: intl.formatMessage(messages$D.countriesAsyncSelectPlaceholder),
5710
5727
  loadOptions: handleLoadOptions,
5711
5728
  onChange: onOptionChange,
5712
5729
  isDisabled: props.isDisabled,
@@ -5726,7 +5743,7 @@ function CountriesBasicSelectDropdown(props) {
5726
5743
  value: props.value,
5727
5744
  isRequired: props.isRequired,
5728
5745
  description: props.description,
5729
- placeholder: intl.formatMessage(messages$C.countriesBasicSelectPlaceholder),
5746
+ placeholder: intl.formatMessage(messages$D.countriesBasicSelectPlaceholder),
5730
5747
  options: props.options,
5731
5748
  onChange: props.onChange,
5732
5749
  isDisabled: props.isDisabled,
@@ -5738,22 +5755,31 @@ function CountriesBasicSelectDropdown(props) {
5738
5755
 
5739
5756
  const COUNTRIES_ASYNC_LOADING_LIMIT = 60;
5740
5757
 
5758
+ const _excluded$a = ["countriesAsyncLoadingLimit", "isMulti", "isRequired", "hasWarning"];
5741
5759
  function ownKeys$W(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
5742
5760
  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(_context = ownKeys$W(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$W(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
5743
- function CountriesPicker(props) {
5744
- const CustomCountriesPicker = props.options?.length <= props.countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
5761
+ function CountriesPicker(_ref) {
5762
+ let _ref$countriesAsyncLo = _ref.countriesAsyncLoadingLimit,
5763
+ countriesAsyncLoadingLimit = _ref$countriesAsyncLo === void 0 ? COUNTRIES_ASYNC_LOADING_LIMIT : _ref$countriesAsyncLo,
5764
+ _ref$isMulti = _ref.isMulti,
5765
+ isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
5766
+ _ref$isRequired = _ref.isRequired,
5767
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
5768
+ _ref$hasWarning = _ref.hasWarning,
5769
+ hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
5770
+ props = _objectWithoutProperties(_ref, _excluded$a);
5771
+ const CustomCountriesPicker = props.options?.length <= countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
5745
5772
  return jsx(Spacings.Stack, {
5746
- children: jsx(CustomCountriesPicker, _objectSpread$W({}, props))
5773
+ children: jsx(CustomCountriesPicker, _objectSpread$W({
5774
+ countriesAsyncLoadingLimit: countriesAsyncLoadingLimit,
5775
+ isMulti: isMulti,
5776
+ isRequired: isRequired,
5777
+ hasWarning: hasWarning
5778
+ }, props))
5747
5779
  });
5748
5780
  }
5749
- CountriesPicker.defaultProps = {
5750
- countriesAsyncLoadingLimit: COUNTRIES_ASYNC_LOADING_LIMIT,
5751
- isMulti: false,
5752
- isRequired: false,
5753
- hasWarning: false
5754
- };
5755
5781
 
5756
- var messages$B = defineMessages({
5782
+ var messages$C = defineMessages({
5757
5783
  noCustomerGroupsFound: {
5758
5784
  id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
5759
5785
  description: 'The message to display when no customer groups were found',
@@ -5843,7 +5869,7 @@ const CustomerGroupPickerInput = _ref => {
5843
5869
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
5844
5870
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
5845
5871
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
5846
- const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$B.noCustomerGroupsFound), [loadingError, formatMessage]);
5872
+ const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$C.noCustomerGroupsFound), [loadingError, formatMessage]);
5847
5873
  const tooltipTitle = currentOption?.data?.label ?? '';
5848
5874
  return jsx(Constraints.Horizontal, {
5849
5875
  max: "scale",
@@ -5854,7 +5880,7 @@ const CustomerGroupPickerInput = _ref => {
5854
5880
  children: jsx(AsyncSelectInput, {
5855
5881
  id: name,
5856
5882
  name: name,
5857
- placeholder: placeholder ?? formatMessage(messages$B.placeholder),
5883
+ placeholder: placeholder ?? formatMessage(messages$C.placeholder),
5858
5884
  loadOptions: loadOptionsDebounced,
5859
5885
  defaultOptions: true,
5860
5886
  showOptionGroupDivider: true,
@@ -5989,16 +6015,24 @@ const makeChangeHandler = setValue => event => {
5989
6015
  // attributes.
5990
6016
  const omitUnknownValues = (valuesAsMap, fieldDefinitionsAsMap) => omitBy(valuesAsMap, (value, key) => isNil$1(fieldDefinitionsAsMap[key]));
5991
6017
 
5992
- const options$1 = [{
5993
- value: 'true',
5994
- label: 'YES'
5995
- }, {
5996
- value: 'false',
5997
- label: 'NO'
5998
- }, {
5999
- value: 'all',
6000
- label: 'ALL'
6001
- }];
6018
+ var messages$B = defineMessages({
6019
+ booleanSetInputYesLabel: {
6020
+ id: 'CustomBooleanInputSet.booleanSetInputYesLabel',
6021
+ description: 'Custom boolean input set Yes label',
6022
+ defaultMessage: 'YES'
6023
+ },
6024
+ booleanSetInputNoLabel: {
6025
+ id: 'CustomBooleanInputSet.booleanSetInputNoLabel',
6026
+ description: 'Custom boolean input set No label',
6027
+ defaultMessage: 'NO'
6028
+ },
6029
+ booleanSetInputAllLabel: {
6030
+ id: 'CustomBooleanInputSet.booleanSetInputAllLabel',
6031
+ description: 'Custom boolean input set All label',
6032
+ defaultMessage: 'ALL'
6033
+ }
6034
+ });
6035
+
6002
6036
  const valueToBooleanSet = value => {
6003
6037
  switch (value) {
6004
6038
  case 'true':
@@ -6019,6 +6053,18 @@ const mapToValue = value => {
6019
6053
  };
6020
6054
  function CustomBooleanInputSet(props) {
6021
6055
  const value = mapToValue(props.value);
6056
+ const _useIntl = useIntl(),
6057
+ formatMessage = _useIntl.formatMessage;
6058
+ const options = useMemo(() => [{
6059
+ value: 'true',
6060
+ label: formatMessage(messages$B.booleanSetInputYesLabel)
6061
+ }, {
6062
+ value: 'false',
6063
+ label: formatMessage(messages$B.booleanSetInputNoLabel)
6064
+ }, {
6065
+ value: 'all',
6066
+ label: formatMessage(messages$B.booleanSetInputAllLabel)
6067
+ }], [formatMessage]);
6022
6068
  const handleChange = makeChangeHandler(rawValue => {
6023
6069
  const nullifiedIfNeeded = !rawValue ? undefined : valueToBooleanSet(rawValue);
6024
6070
  props.setFieldValue(props.name, nullifiedIfNeeded);
@@ -6027,7 +6073,7 @@ function CustomBooleanInputSet(props) {
6027
6073
  id: props.name,
6028
6074
  name: props.name,
6029
6075
  value: value,
6030
- options: options$1,
6076
+ options: options,
6031
6077
  onChange: handleChange,
6032
6078
  onBlur: props.onBlur,
6033
6079
  isClearable: !props.fieldDefinition.required,
@@ -6440,7 +6486,8 @@ function CustomLocalizedTextInput(props) {
6440
6486
  hasError: props.hasError,
6441
6487
  isDisabled: props.isDisabled,
6442
6488
  isReadOnly: props.isReadOnly,
6443
- hasWarning: props.hasWarning
6489
+ hasWarning: props.hasWarning,
6490
+ additionalInfo: props.additionalInfo
6444
6491
  })
6445
6492
  });
6446
6493
  }
@@ -7251,7 +7298,8 @@ function CustomTimeInput(props) {
7251
7298
  setInternalValue = _useState2[1];
7252
7299
  const lastValueSentToFormik = useRef();
7253
7300
  useEffect(() => {
7254
- if (lastValueSentToFormik.current !== props.value) {
7301
+ if (lastValueSentToFormik.current !== props.value || !lastValueSentToFormik.current && !props.value // not updating tailored value when the value is empty
7302
+ ) {
7255
7303
  setInternalValue(formatTime(props.value));
7256
7304
  }
7257
7305
  }, [props.value, formatTime]);
@@ -7328,7 +7376,8 @@ const CustomFieldInput = /*#__PURE__*/memo(props => {
7328
7376
  hasError: props.hasError,
7329
7377
  hasWarning: props.hasWarning,
7330
7378
  handleWarningChange: props.handleWarningChange,
7331
- renderWarnings: props.renderWarnings
7379
+ renderWarnings: props.renderWarnings,
7380
+ additionalInfo: props.additionalInfo
7332
7381
  });
7333
7382
  });
7334
7383
  CustomFieldInput.displayName = 'CustomFieldInput';
@@ -7715,22 +7764,22 @@ const useDnDContext = () => {
7715
7764
  return useContext(DnDContext);
7716
7765
  };
7717
7766
 
7718
- const _excluded$1 = ["WrapperComponent"];
7767
+ const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
7719
7768
  function ownKeys$J(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
7720
7769
  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(_context = ownKeys$J(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$J(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
7721
7770
  const existingAttributeTypes = ['text', 'ltext'];
7722
- const newAttributeTypes = ['text', 'ltext', 'number']; // Add more types here
7723
-
7771
+ const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
7772
+ const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
7724
7773
  const getFieldName = (parentName, fieldName) => {
7725
7774
  if (!parentName) return fieldName;
7726
7775
  return `${parentName}.${fieldName}`;
7727
7776
  };
7728
- function isAttributeType() {
7777
+ const isAttributeType = function () {
7729
7778
  let fieldDefinitionType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
7730
7779
  let isTailoringAttributeForOtherTypes = arguments.length > 1 ? arguments[1] : undefined;
7731
7780
  const attributeTypes = isTailoringAttributeForOtherTypes ? newAttributeTypes : existingAttributeTypes;
7732
- return _includesInstanceProperty(attributeTypes).call(attributeTypes, fieldDefinitionType.name);
7733
- }
7781
+ return _includesInstanceProperty(attributeTypes).call(attributeTypes, fieldDefinitionType.name) || isTailoringAttributeForOtherTypes && fieldDefinitionType.name === 'set' && _includesInstanceProperty(setAttributeTypes).call(setAttributeTypes, fieldDefinitionType?.elementType?.name);
7782
+ };
7734
7783
  const isNested = fieldDefinition => {
7735
7784
  const type = fieldDefinition.type;
7736
7785
  const typeName = type.name.toLowerCase();
@@ -7741,8 +7790,10 @@ const isNested = fieldDefinition => {
7741
7790
  return typeName === CUSTOM_FIELD_TYPES.nested;
7742
7791
  };
7743
7792
  const CustomFieldsInternal = _ref => {
7744
- let WrapperComponent = _ref.WrapperComponent,
7745
- props = _objectWithoutProperties(_ref, _excluded$1);
7793
+ let _ref$renderCustomWarn = _ref.renderCustomWarnings,
7794
+ renderCustomWarnings = _ref$renderCustomWarn === void 0 ? () => null : _ref$renderCustomWarn,
7795
+ WrapperComponent = _ref.WrapperComponent,
7796
+ props = _objectWithoutProperties(_ref, _excluded$9);
7746
7797
  const _useFormikContext = useFormikContext(),
7747
7798
  errors = _useFormikContext.errors,
7748
7799
  touched = _useFormikContext.touched,
@@ -7751,6 +7802,7 @@ const CustomFieldsInternal = _ref => {
7751
7802
  status = _useFormikContext.status;
7752
7803
  const isTailoringAttributesEnabled = useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
7753
7804
  const isTailoringAttributeForOtherTypes = useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
7805
+ const isTailoringFallbackEnabled = useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
7754
7806
  const didFormValidationFail = useDidFormValidationFail();
7755
7807
  const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
7756
7808
  const _useDnDContext = useDnDContext(),
@@ -7765,6 +7817,7 @@ const CustomFieldsInternal = _ref => {
7765
7817
  const fieldName = getFieldName(props.name, fieldDefinition.name);
7766
7818
  const isTouched = Boolean(getIn(touched, fieldName));
7767
7819
  const isFieldDisabled = props.isDisabled && !(isAttributeType(fieldDefinition.type, isTailoringAttributeForOtherTypes) && isTailoringAttributesEnabled);
7820
+ const isSet = fieldDefinition.type.name === 'set';
7768
7821
  const fieldErrors = getIn(errors, fieldName);
7769
7822
  const value = props.inputValuesConverter(fieldName, getIn(values, fieldName));
7770
7823
 
@@ -7789,7 +7842,8 @@ const CustomFieldsInternal = _ref => {
7789
7842
  hasError: hasError,
7790
7843
  hasWarning: props.renderWarnings && status?.warnings[fieldName],
7791
7844
  handleWarningChange: props.handleWarningChange,
7792
- renderWarnings: props.renderWarnings
7845
+ renderWarnings: props.renderWarnings,
7846
+ additionalInfo: isTailoringFallbackEnabled && props.additionalInfoHandler && !isSet ? props.additionalInfoHandler(fieldDefinition) : undefined
7793
7847
  };
7794
7848
  const Field = jsx(FieldComponent, _objectSpread$J({}, fieldProps));
7795
7849
  return jsx(FastField, {
@@ -7813,7 +7867,7 @@ const CustomFieldsInternal = _ref => {
7813
7867
  alignItems: "stretch",
7814
7868
  children: [WrapperComponent ? jsx(WrapperComponent, {
7815
7869
  children: Field
7816
- }) : Field, props.renderWarnings && status?.warnings[fieldName] && props.renderCustomWarnings(fieldDefinition), jsx(CustomFieldErrors$1, {
7870
+ }) : Field, props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsx(CustomFieldErrors$1, {
7817
7871
  isTouched: isTouched,
7818
7872
  errors: fieldErrors
7819
7873
  })]
@@ -7826,9 +7880,6 @@ const CustomFieldsInternal = _ref => {
7826
7880
  });
7827
7881
  };
7828
7882
  CustomFieldsInternal.displayName = 'CustomFieldsInternal';
7829
- CustomFieldsInternal.defaultProps = {
7830
- renderCustomWarnings: () => null
7831
- };
7832
7883
  var CustomFieldsInternal$1 = CustomFieldsInternal;
7833
7884
 
7834
7885
  function ownKeys$I(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -7900,14 +7951,14 @@ const attributesMapToNameValuePairs = map => {
7900
7951
  });
7901
7952
  };
7902
7953
 
7903
- const _excluded = ["WrapperComponent"];
7954
+ const _excluded$8 = ["WrapperComponent"];
7904
7955
  const getAttributeShortName = (fullName, attributesPrefix) => {
7905
7956
  if (!attributesPrefix) return fullName;
7906
7957
  return fullName.replace(`${attributesPrefix}.`, '');
7907
7958
  };
7908
7959
  function ProductAttributes(_ref) {
7909
7960
  let WrapperComponent = _ref.WrapperComponent,
7910
- props = _objectWithoutProperties(_ref, _excluded);
7961
+ props = _objectWithoutProperties(_ref, _excluded$8);
7911
7962
  const formik = useFormikContext();
7912
7963
  const fieldDefinitions = useMemo(() => {
7913
7964
  var _context;
@@ -7935,7 +7986,8 @@ function ProductAttributes(_ref) {
7935
7986
  WrapperComponent: WrapperComponent,
7936
7987
  renderWarnings: props.renderWarnings,
7937
7988
  renderCustomWarnings: props.renderCustomWarnings,
7938
- handleWarningChange: props.handleWarningChange
7989
+ handleWarningChange: props.handleWarningChange,
7990
+ additionalInfoHandler: props.additionalInfoHandler
7939
7991
  })
7940
7992
  })
7941
7993
  });
@@ -8381,9 +8433,37 @@ function ModeSelectInputOption(props) {
8381
8433
  }));
8382
8434
  }
8383
8435
 
8436
+ const _excluded$7 = ["lowerProductSelectionsLimit", "upperProductSelectionsLimit", "renderSelectInputOptionValuesByField", "optionType", "isMulti", "isRequired", "hasWarning", "hasError", "isClearable", "isReadOnly", "isDisabled", "excludedProductSelectionIds", "title"];
8384
8437
  function ownKeys$F(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8385
8438
  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(_context = ownKeys$F(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$F(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
8386
- function ProductSelectionsPicker(props) {
8439
+ function ProductSelectionsPicker(_ref) {
8440
+ let _ref$lowerProductSele = _ref.lowerProductSelectionsLimit,
8441
+ lowerProductSelectionsLimit = _ref$lowerProductSele === void 0 ? LOWER_PRODUCT_SELECTIONS_LIMIT : _ref$lowerProductSele,
8442
+ _ref$upperProductSele = _ref.upperProductSelectionsLimit,
8443
+ upperProductSelectionsLimit = _ref$upperProductSele === void 0 ? UPPER_PRODUCT_SELECTIONS_LIMIT : _ref$upperProductSele,
8444
+ _ref$renderSelectInpu = _ref.renderSelectInputOptionValuesByField,
8445
+ renderSelectInputOptionValuesByField = _ref$renderSelectInpu === void 0 ? 'id' : _ref$renderSelectInpu,
8446
+ _ref$optionType = _ref.optionType,
8447
+ optionType = _ref$optionType === void 0 ? 'double-property' : _ref$optionType,
8448
+ _ref$isMulti = _ref.isMulti,
8449
+ isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
8450
+ _ref$isRequired = _ref.isRequired,
8451
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
8452
+ _ref$hasWarning = _ref.hasWarning,
8453
+ hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
8454
+ _ref$hasError = _ref.hasError,
8455
+ hasError = _ref$hasError === void 0 ? false : _ref$hasError,
8456
+ _ref$isClearable = _ref.isClearable,
8457
+ isClearable = _ref$isClearable === void 0 ? false : _ref$isClearable,
8458
+ _ref$isReadOnly = _ref.isReadOnly,
8459
+ isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
8460
+ _ref$isDisabled = _ref.isDisabled,
8461
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
8462
+ _ref$excludedProductS = _ref.excludedProductSelectionIds,
8463
+ excludedProductSelectionIds = _ref$excludedProductS === void 0 ? [] : _ref$excludedProductS,
8464
+ _ref$title = _ref.title,
8465
+ title = _ref$title === void 0 ? '' : _ref$title,
8466
+ props = _objectWithoutProperties(_ref, _excluded$7);
8387
8467
  const productSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1();
8388
8468
  const components = useMemo(() => {
8389
8469
  return {
@@ -8391,39 +8471,38 @@ function ProductSelectionsPicker(props) {
8391
8471
  if (optionInnerProps.isDisabled) {
8392
8472
  return jsx(SelectInput.Option, _objectSpread$F({}, optionInnerProps));
8393
8473
  }
8394
- if (props.optionType === TYPE_PROPERTY) {
8474
+ if (optionType === TYPE_PROPERTY) {
8395
8475
  return jsx(ModeSelectInputOption, _objectSpread$F({}, optionInnerProps));
8396
8476
  }
8397
8477
  return jsx(CustomSelectInputOption, {
8398
- optionType: props.optionType,
8478
+ optionType: optionType,
8399
8479
  optionInnerProps: optionInnerProps
8400
8480
  });
8401
8481
  }
8402
8482
  };
8403
- }, [props.optionType]);
8483
+ }, [optionType]);
8404
8484
  if (productSelectionsTotalFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
8405
- const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= props.lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= props.upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
8485
+ const CustomProductSelectionsPicker = productSelectionsTotalFetcher.total <= lowerProductSelectionsLimit ? ProductSelectionBasicSelectDropdown : productSelectionsTotalFetcher.total <= upperProductSelectionsLimit ? ProductSelectionsAsyncSelectDropdown : ProductSelectionsSearchSelectDropdown;
8406
8486
  return jsx(Spacings.Stack, {
8407
- children: jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({}, props), {}, {
8487
+ children: jsx(CustomProductSelectionsPicker, _objectSpread$F(_objectSpread$F({
8488
+ lowerProductSelectionsLimit: lowerProductSelectionsLimit,
8489
+ upperProductSelectionsLimit: upperProductSelectionsLimit,
8490
+ renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
8491
+ optionType: optionType,
8492
+ isMulti: isMulti,
8493
+ isRequired: isRequired,
8494
+ hasWarning: hasWarning,
8495
+ hasError: hasError,
8496
+ isClearable: isClearable,
8497
+ isReadOnly: isReadOnly,
8498
+ isDisabled: isDisabled,
8499
+ excludedProductSelectionIds: excludedProductSelectionIds,
8500
+ title: title
8501
+ }, props), {}, {
8408
8502
  components: components
8409
8503
  }))
8410
8504
  });
8411
8505
  }
8412
- ProductSelectionsPicker.defaultProps = {
8413
- lowerProductSelectionsLimit: LOWER_PRODUCT_SELECTIONS_LIMIT,
8414
- upperProductSelectionsLimit: UPPER_PRODUCT_SELECTIONS_LIMIT,
8415
- renderSelectInputOptionValuesByField: 'id',
8416
- optionType: 'double-property',
8417
- isMulti: false,
8418
- isRequired: false,
8419
- hasWarning: false,
8420
- hasError: false,
8421
- isClearable: false,
8422
- isReadOnly: false,
8423
- isDisabled: false,
8424
- excludedProductSelectionIds: [],
8425
- title: '' // FieldLabel requires title to have some value
8426
- };
8427
8506
 
8428
8507
  // NOTE: this component is duplicated in `app-shell/from-core`.
8429
8508
  var styles$b = {
@@ -8460,19 +8539,21 @@ const ScrollToFieldError = () => {
8460
8539
  if (firstErrorElement) {
8461
8540
  // Get a reference to the label.
8462
8541
  const firstElementId = firstErrorElement.getAttribute('id');
8463
- const localizedInputIndex = _indexOfInstanceProperty(firstElementId).call(firstElementId, `.${dataLocale}`);
8542
+ if (firstElementId) {
8543
+ const localizedInputIndex = _indexOfInstanceProperty(firstElementId).call(firstElementId, `.${dataLocale}`);
8464
8544
 
8465
- // check if locale is appended then remove it from id
8466
- const id = localizedInputIndex > -1 ? firstElementId.replace(`.${dataLocale}`, '') : firstElementId;
8545
+ // check if locale is appended then remove it from id
8546
+ const id = localizedInputIndex > -1 ? firstElementId.replace(`.${dataLocale}`, '') : firstElementId;
8467
8547
 
8468
- // Scroll to the label (if found), otherwise to the input element itself.
8548
+ // Scroll to the label (if found), otherwise to the input element itself.
8469
8549
 
8470
- const elementToScrollTo =
8471
- // div is used only for custom fields
8472
- document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
8473
- elementToScrollTo.scrollIntoView?.({
8474
- behavior: 'smooth'
8475
- });
8550
+ const elementToScrollTo =
8551
+ // div is used only for custom fields
8552
+ document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
8553
+ elementToScrollTo.scrollIntoView?.({
8554
+ behavior: 'smooth'
8555
+ });
8556
+ }
8476
8557
  }
8477
8558
  }, [dataLocale, isValid, submitCount]);
8478
8559
  return null;
@@ -8618,6 +8699,7 @@ const getCustomGroupLabelOption = customLabel => [{
8618
8699
  isDisabled: true
8619
8700
  }];
8620
8701
 
8702
+ const _excluded$6 = ["shouldFetchProductSelections"];
8621
8703
  function ownKeys$E(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8622
8704
  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(_context5 = ownKeys$E(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context6 = ownKeys$E(Object(t))).call(_context6, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
8623
8705
  const hasErrors$2 = errors => {
@@ -8648,7 +8730,10 @@ const emptyStoreOption = intl => [{
8648
8730
  value: undefined,
8649
8731
  isDisabled: true
8650
8732
  }];
8651
- const StoresAsyncSelectInput = props => {
8733
+ const StoresAsyncSelectInput = _ref2 => {
8734
+ let _ref2$shouldFetchProd = _ref2.shouldFetchProductSelections,
8735
+ shouldFetchProductSelections = _ref2$shouldFetchProd === void 0 ? false : _ref2$shouldFetchProd,
8736
+ props = _objectWithoutProperties(_ref2, _excluded$6);
8652
8737
  const intl = useIntl();
8653
8738
  const _useApplicationContex = useApplicationContext(applicationContext => ({
8654
8739
  dataLocale: applicationContext.dataLocale,
@@ -8662,7 +8747,7 @@ const StoresAsyncSelectInput = props => {
8662
8747
  offset: 0,
8663
8748
  sort: 'createdAt asc',
8664
8749
  excludeExtendedStoresList: true,
8665
- excludeProductSelections: !props.shouldFetchProductSelections,
8750
+ excludeProductSelections: !shouldFetchProductSelections,
8666
8751
  stores: keysOfStores?.length && keysOfStores,
8667
8752
  projectKey: props.projectKey
8668
8753
  });
@@ -8743,18 +8828,19 @@ const StoresAsyncSelectInput = props => {
8743
8828
  });
8744
8829
  };
8745
8830
  StoresAsyncSelectInput.displayName = 'StoresAsyncSelectInput';
8746
- StoresAsyncSelectInput.defaultProps = {
8747
- shouldFetchProductSelections: false
8748
- };
8749
8831
  var StoresAsyncSelectInput$1 = StoresAsyncSelectInput;
8750
8832
 
8833
+ const _excluded$5 = ["shouldFetchProductSelections"];
8751
8834
  function ownKeys$D(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8752
8835
  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(_context3 = ownKeys$D(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$D(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
8753
8836
  const hasErrors$1 = errors => {
8754
8837
  var _context;
8755
8838
  return errors && _someInstanceProperty(_context = _Object$values(errors)).call(_context, Boolean);
8756
8839
  };
8757
- const StoresBasicSelectInput = props => {
8840
+ const StoresBasicSelectInput = _ref => {
8841
+ let _ref$shouldFetchProdu = _ref.shouldFetchProductSelections,
8842
+ shouldFetchProductSelections = _ref$shouldFetchProdu === void 0 ? false : _ref$shouldFetchProdu,
8843
+ props = _objectWithoutProperties(_ref, _excluded$5);
8758
8844
  const intl = useIntl();
8759
8845
  const _useApplicationContex = useApplicationContext(applicationContext => ({
8760
8846
  dataLocale: applicationContext.dataLocale,
@@ -8768,7 +8854,7 @@ const StoresBasicSelectInput = props => {
8768
8854
  offset: 0,
8769
8855
  sort: 'createdAt asc',
8770
8856
  excludeExtendedStoresList: true,
8771
- excludeProductSelections: !props.shouldFetchProductSelections,
8857
+ excludeProductSelections: !shouldFetchProductSelections,
8772
8858
  stores: keysOfStores?.length && keysOfStores,
8773
8859
  projectKey: props.projectKey
8774
8860
  });
@@ -8793,7 +8879,7 @@ const StoresBasicSelectInput = props => {
8793
8879
  const currentStore = _findInstanceProperty(listOptions).call(listOptions, store => store.value === value);
8794
8880
 
8795
8881
  // We need complete store info including productSelections
8796
- if (!props.shouldFetchProductSelections && !props?.renderLabel) {
8882
+ if (!shouldFetchProductSelections && !props?.renderLabel) {
8797
8883
  props.onChange(event);
8798
8884
  } else {
8799
8885
  props.onChange({
@@ -8841,9 +8927,6 @@ const StoresBasicSelectInput = props => {
8841
8927
  });
8842
8928
  };
8843
8929
  StoresBasicSelectInput.displayName = 'StoresBasicSelectInput';
8844
- StoresBasicSelectInput.defaultProps = {
8845
- shouldFetchProductSelections: false
8846
- };
8847
8930
  var StoresBasicSelectInput$1 = StoresBasicSelectInput;
8848
8931
 
8849
8932
  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 } } } };
@@ -8890,6 +8973,7 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
8890
8973
  };
8891
8974
  var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
8892
8975
 
8976
+ const _excluded$4 = ["shouldFetchProductSelections"];
8893
8977
  function ownKeys$C(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8894
8978
  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(_context3 = ownKeys$C(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context4 = ownKeys$C(Object(t))).call(_context4, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
8895
8979
  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 } } } };
@@ -8960,7 +9044,10 @@ const getValueFromOptions = _ref2 => {
8960
9044
  return selectedOptions[0];
8961
9045
  }
8962
9046
  };
8963
- const StoresSearchSelectInput = props => {
9047
+ const StoresSearchSelectInput = _ref3 => {
9048
+ let _ref3$shouldFetchProd = _ref3.shouldFetchProductSelections,
9049
+ shouldFetchProductSelections = _ref3$shouldFetchProd === void 0 ? false : _ref3$shouldFetchProd,
9050
+ props = _objectWithoutProperties(_ref3, _excluded$4);
8964
9051
  // hooks
8965
9052
  const _useApplicationContex = useApplicationContext(applicationContext => ({
8966
9053
  dataLocale: applicationContext.dataLocale,
@@ -8970,7 +9057,7 @@ const StoresSearchSelectInput = props => {
8970
9057
  projectLanguages = _useApplicationContex.projectLanguages;
8971
9058
  const intl = useIntl();
8972
9059
  const client = useApolloClient();
8973
- const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, props.shouldFetchProductSelections);
9060
+ const storesByFieldFetcher = useStoresByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField, props.projectKey, shouldFetchProductSelections);
8974
9061
  const hasError = AsyncSelectInput.isTouched(props.touched) && hasErrors(props.errors) || props.hasError;
8975
9062
  const handleLoadOptions = searchText => {
8976
9063
  const extractMatchedStores = client.query({
@@ -8979,15 +9066,15 @@ const StoresSearchSelectInput = props => {
8979
9066
  searchText,
8980
9067
  dataLocale,
8981
9068
  allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
8982
- shouldFetchProductSelections: props.shouldFetchProductSelections
9069
+ shouldFetchProductSelections
8983
9070
  }),
8984
9071
  context: {
8985
9072
  target: GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM,
8986
9073
  projectKey: props.projectKey
8987
9074
  },
8988
9075
  fetchPolicy: 'network-only'
8989
- }).then(_ref3 => {
8990
- let data = _ref3.data;
9076
+ }).then(_ref4 => {
9077
+ let data = _ref4.data;
8991
9078
  const result = data.storesByWherePredicate?.results.map(store => mapStoresToOptions({
8992
9079
  store,
8993
9080
  dataLocale,
@@ -9004,8 +9091,8 @@ const StoresSearchSelectInput = props => {
9004
9091
  return extractMatchedStores;
9005
9092
  };
9006
9093
  const loadOptionsDebounced = debounce(handleLoadOptions, 500);
9007
- const renderNoOptions = _ref4 => {
9008
- let inputValue = _ref4.inputValue;
9094
+ const renderNoOptions = _ref5 => {
9095
+ let inputValue = _ref5.inputValue;
9009
9096
  return jsxs("div", {
9010
9097
  className: styles$9.renderLabelContainer,
9011
9098
  children: [jsx("div", {
@@ -9062,17 +9149,26 @@ const StoresSearchSelectInput = props => {
9062
9149
  });
9063
9150
  };
9064
9151
  StoresSearchSelectInput.displayName = 'StoresSearchSelectInput';
9065
- StoresSearchSelectInput.defaultProps = {
9066
- shouldFetchProductSelections: false
9067
- };
9068
9152
  var StoresSearchSelectInput$1 = StoresSearchSelectInput;
9069
9153
 
9154
+ const _excluded$3 = ["lowerStoresLimit", "upperStoresLimit", "renderSelectInputOptionValuesByField", "optionType", "shouldFetchProductSelections"];
9070
9155
  function ownKeys$B(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9071
9156
  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(_context = ownKeys$B(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$B(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
9072
9157
  var styles$8 = {
9073
9158
  "customOption": "store-select-input-module__customOption___2SC00"
9074
9159
  };
9075
- const StoreSelectInput = props => {
9160
+ const StoreSelectInput = _ref => {
9161
+ let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
9162
+ lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
9163
+ _ref$upperStoresLimit = _ref.upperStoresLimit,
9164
+ upperStoresLimit = _ref$upperStoresLimit === void 0 ? UPPER_STORES_LIMIT : _ref$upperStoresLimit,
9165
+ _ref$renderSelectInpu = _ref.renderSelectInputOptionValuesByField,
9166
+ renderSelectInputOptionValuesByField = _ref$renderSelectInpu === void 0 ? 'id' : _ref$renderSelectInpu,
9167
+ _ref$optionType = _ref.optionType,
9168
+ optionType = _ref$optionType === void 0 ? 'double-property' : _ref$optionType,
9169
+ _ref$shouldFetchProdu = _ref.shouldFetchProductSelections,
9170
+ shouldFetchProductSelections = _ref$shouldFetchProdu === void 0 ? false : _ref$shouldFetchProdu,
9171
+ props = _objectWithoutProperties(_ref, _excluded$3);
9076
9172
  const totalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1(props.projectKey);
9077
9173
  const components = useMemo(() => {
9078
9174
  return {
@@ -9081,19 +9177,19 @@ const StoreSelectInput = props => {
9081
9177
  if (optionInnerProps.isDisabled) {
9082
9178
  return jsx(SelectInput.Option, _objectSpread$B({}, optionInnerProps));
9083
9179
  }
9084
- const isSearchSelectInput = totalNumberOfStoresFetcher.total > props.upperStoresLimit;
9180
+ const isSearchSelectInput = totalNumberOfStoresFetcher.total > upperStoresLimit;
9085
9181
  return jsx("div", {
9086
9182
  className: isSearchSelectInput ? styles$8.customOption : '',
9087
9183
  children: jsx(CustomSelectInputOption, {
9088
- optionType: props.optionType,
9184
+ optionType: optionType,
9089
9185
  optionInnerProps: optionInnerProps
9090
9186
  })
9091
9187
  });
9092
9188
  }
9093
9189
  };
9094
- }, [props.optionType, totalNumberOfStoresFetcher.total, props.upperStoresLimit]);
9190
+ }, [optionType, totalNumberOfStoresFetcher.total, upperStoresLimit]);
9095
9191
  if (totalNumberOfStoresFetcher.isLoading) return jsx(CenteredLoadingSpinner$1, {});
9096
- const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= props.lowerStoresLimit ? StoresBasicSelectInput$1 : totalNumberOfStoresFetcher.total <= props.upperStoresLimit ? StoresAsyncSelectInput$1 : StoresSearchSelectInput$1;
9192
+ const CustomStoreSelectInput = totalNumberOfStoresFetcher.total <= lowerStoresLimit ? StoresBasicSelectInput$1 : totalNumberOfStoresFetcher.total <= upperStoresLimit ? StoresAsyncSelectInput$1 : StoresSearchSelectInput$1;
9097
9193
  return jsx(CustomStoreSelectInput, _objectSpread$B(_objectSpread$B({
9098
9194
  menuIsOpen: props.menuIsOpen,
9099
9195
  placeholder: props.placeholder,
@@ -9122,27 +9218,27 @@ const StoreSelectInput = props => {
9122
9218
  maxMenuHeight: props.maxMenuHeight,
9123
9219
  menuPortalTarget: props.menuPortalTarget,
9124
9220
  menuPortalZIndex: props.menuPortalZIndex,
9125
- renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField,
9126
- lowerStoresLimit: props.lowerStoresLimit,
9127
- upperStoresLimit: props.upperStoresLimit,
9221
+ renderSelectInputOptionValuesByField: renderSelectInputOptionValuesByField,
9222
+ lowerStoresLimit: lowerStoresLimit,
9223
+ upperStoresLimit: upperStoresLimit,
9128
9224
  allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
9129
- shouldFetchProductSelections: props.shouldFetchProductSelections,
9225
+ shouldFetchProductSelections: shouldFetchProductSelections,
9130
9226
  controlShouldRenderValue: props.controlShouldRenderValue
9131
9227
  }, filterDataAttributes$1(props)), filterAriaAttributes(props)));
9132
9228
  };
9133
9229
  StoreSelectInput.displayName = 'StoreSelectInput';
9134
- StoreSelectInput.defaultProps = {
9135
- lowerStoresLimit: LOWER_STORES_LIMIT,
9136
- upperStoresLimit: UPPER_STORES_LIMIT,
9137
- renderSelectInputOptionValuesByField: 'id',
9138
- optionType: 'double-property',
9139
- shouldFetchProductSelections: false
9140
- };
9141
9230
  var StoreSelectInput$1 = StoreSelectInput;
9142
9231
 
9232
+ const _excluded$2 = ["lowerStoresLimit", "upperStoresLimit", "mappedValueField"];
9143
9233
  function ownKeys$A(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9144
9234
  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(_context = ownKeys$A(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$A(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
9145
- const StoreSelectField = props => {
9235
+ const StoreSelectField = _ref => {
9236
+ let _ref$lowerStoresLimit = _ref.lowerStoresLimit,
9237
+ lowerStoresLimit = _ref$lowerStoresLimit === void 0 ? LOWER_STORES_LIMIT : _ref$lowerStoresLimit,
9238
+ _ref$upperStoresLimit = _ref.upperStoresLimit,
9239
+ upperStoresLimit = _ref$upperStoresLimit === void 0 ? UPPER_STORES_LIMIT : _ref$upperStoresLimit;
9240
+ _ref.mappedValueField;
9241
+ let props = _objectWithoutProperties(_ref, _excluded$2);
9146
9242
  return jsx(Constraints.Horizontal, {
9147
9243
  max: props.horizontalConstraint,
9148
9244
  children: jsxs(Spacings.Stack, {
@@ -9179,8 +9275,8 @@ const StoreSelectField = props => {
9179
9275
  menuPortalZIndex: props.menuPortalZIndex,
9180
9276
  optionType: props.optionType,
9181
9277
  renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField,
9182
- lowerStoresLimit: props.lowerStoresLimit,
9183
- upperStoresLimit: props.upperStoresLimit,
9278
+ lowerStoresLimit: lowerStoresLimit,
9279
+ upperStoresLimit: upperStoresLimit,
9184
9280
  allAccessibleStoreKeysThroughDataFencePermissions: props.allAccessibleStoreKeysThroughDataFencePermissions,
9185
9281
  controlShouldRenderValue: props.controlShouldRenderValue
9186
9282
  }, filterDataAttributes$1(props)), filterAriaAttributes(props)))]
@@ -9188,11 +9284,6 @@ const StoreSelectField = props => {
9188
9284
  });
9189
9285
  };
9190
9286
  StoreSelectField.displayName = 'StoreSelectField';
9191
- StoreSelectField.defaultProps = {
9192
- lowerStoresLimit: LOWER_STORES_LIMIT,
9193
- upperStoresLimit: UPPER_STORES_LIMIT,
9194
- mappedValueField: 'id'
9195
- };
9196
9287
  var StoreSelectField$1 = StoreSelectField;
9197
9288
 
9198
9289
  function ownKeys$z(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -9621,7 +9712,7 @@ const createEmptyCustomFields = typeDefinition => ({
9621
9712
  function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9622
9713
  function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
9623
9714
  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 } } } };
9624
- 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'];
9715
+ 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'];
9625
9716
  const emptyTypeDefinitions = {
9626
9717
  total: 0,
9627
9718
  count: 0,
@@ -10174,7 +10265,7 @@ const defaultValue = {
10174
10265
  const PimIndexerContext = /*#__PURE__*/createContext(defaultValue);
10175
10266
  var PimIndexerContext$1 = PimIndexerContext;
10176
10267
 
10177
- 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 } } } };
10268
+ 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 } } } };
10178
10269
  var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
10179
10270
  try {
10180
10271
  await dispatch(actions.head({
@@ -10194,11 +10285,12 @@ var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
10194
10285
  fetchPolicy: 'network-only'
10195
10286
  }),
10196
10287
  data = _await$apolloClient$q.data;
10197
- if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress) {
10288
+ if (data.indicesExist.products.newInProgress || data.indicesExist.productTypes.newInProgress || data.indicesExist.productSelections.newInProgress) {
10198
10289
  return {
10199
10290
  status: 'indexing',
10200
10291
  isIndexingProducts: !data.indicesExist.products.searchableIndexExists,
10201
- isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists
10292
+ isIndexingProductTypes: !data.indicesExist.productTypes.searchableIndexExists,
10293
+ isIndexingProductSelections: !data.indicesExist.productSelections.searchableIndexExists
10202
10294
  };
10203
10295
  }
10204
10296
  return {
@@ -10232,21 +10324,23 @@ function ownKeys$r(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySy
10232
10324
  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(_context2 = ownKeys$r(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$r(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
10233
10325
  function _callSuper$2(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$2() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
10234
10326
  function _isNativeReflectConstruct$2() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$2 = function () { return !!t; })(); }
10235
- 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 } } } };
10236
- 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 } } } };
10237
- 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 } } } };
10327
+ 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 } } } };
10328
+ 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 } } } };
10329
+ 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 } } } };
10238
10330
  const pimIndexerRequestContext = {
10239
10331
  target: GRAPHQL_TARGETS.PIM_INDEXER
10240
10332
  };
10241
- const isIndexingCompleted = (products, productTypes) => products.completed && productTypes.completed;
10242
- const calculateProgress = (products, productTypes) => (products.percentCompleted + productTypes.percentCompleted) / 2;
10333
+ const isIndexingCompleted = (products, productTypes, productSelections) => products.completed && productTypes.completed && productSelections.completed;
10334
+ const calculateProgress = (products, productTypes, productSelections) => (products.percentCompleted + productTypes.percentCompleted + productSelections.percentCompleted) / 3;
10243
10335
  const getIndexingJobIds = _ref => {
10244
10336
  let _ref$data = _ref.data,
10245
10337
  products = _ref$data.products,
10246
- productTypes = _ref$data.productTypes;
10338
+ productTypes = _ref$data.productTypes,
10339
+ productSelections = _ref$data.productSelections;
10247
10340
  return {
10248
10341
  productsJobId: products?.indexingJobId || products?.existingIndexingJobId,
10249
- productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId
10342
+ productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId,
10343
+ productSelectionsJobId: productSelections?.indexingJobId || productSelections?.existingIndexingJobId
10250
10344
  };
10251
10345
  };
10252
10346
  let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
@@ -10269,12 +10363,14 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10269
10363
  const _await$_this$props$fe = await _this.props.fetchPimIndexStatus(_this.props.client, _this.props.projectKey),
10270
10364
  status = _await$_this$props$fe.status,
10271
10365
  isIndexingProducts = _await$_this$props$fe.isIndexingProducts,
10272
- isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes;
10366
+ isIndexingProductTypes = _await$_this$props$fe.isIndexingProductTypes,
10367
+ isIndexingProductSelections = _await$_this$props$fe.isIndexingProductSelections;
10273
10368
  const isPimIndexerUnreachable = _includesInstanceProperty(_context = ['not-configured', 'unreachable']).call(_context, status);
10274
10369
  if (status === 'indexing') {
10275
10370
  _this.monitorIndexingProgress({
10276
10371
  isIndexingProducts,
10277
- isIndexingProductTypes
10372
+ isIndexingProductTypes,
10373
+ isIndexingProductSelections
10278
10374
  });
10279
10375
  } else {
10280
10376
  _this.setState({
@@ -10331,8 +10427,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10331
10427
  variables: {
10332
10428
  productsJobId: _this.state.productsJobId || '',
10333
10429
  productTypesJobId: _this.state.productTypesJobId || '',
10430
+ productSelectionsJobId: _this.state.productSelectionsJobId || '',
10334
10431
  shouldIncludeProducts: !!_this.state.productsJobId,
10335
- shouldIncludeProductTypes: !!_this.state.productTypesJobId
10432
+ shouldIncludeProductTypes: !!_this.state.productTypesJobId,
10433
+ shouldIncludeProductSelections: !!_this.state.productSelectionsJobId
10336
10434
  },
10337
10435
  fetchPolicy: 'network-only'
10338
10436
  });
@@ -10342,7 +10440,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10342
10440
  };
10343
10441
  return {
10344
10442
  products: result.data.products || completedStatus,
10345
- productTypes: result.data.productTypes || completedStatus
10443
+ productTypes: result.data.productTypes || completedStatus,
10444
+ productSelections: result.data.productSelections || completedStatus
10346
10445
  };
10347
10446
  };
10348
10447
  _this.handleFinishedIndexing = async () => {
@@ -10381,9 +10480,10 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10381
10480
  try {
10382
10481
  const _await$_this$getIndex = await _this.getIndexingProgress(),
10383
10482
  products = _await$_this$getIndex.products,
10384
- productTypes = _await$_this$getIndex.productTypes;
10385
- const isCompleted = isIndexingCompleted(products, productTypes);
10386
- const indexingProgress = calculateProgress(products, productTypes);
10483
+ productTypes = _await$_this$getIndex.productTypes,
10484
+ productSelections = _await$_this$getIndex.productSelections;
10485
+ const isCompleted = isIndexingCompleted(products, productTypes, productSelections);
10486
+ const indexingProgress = calculateProgress(products, productTypes, productSelections);
10387
10487
  _this.setState({
10388
10488
  indexingProgress
10389
10489
  });
@@ -10401,14 +10501,16 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10401
10501
  };
10402
10502
  _this.monitorIndexingProgress = async _ref2 => {
10403
10503
  let isIndexingProducts = _ref2.isIndexingProducts,
10404
- isIndexingProductTypes = _ref2.isIndexingProductTypes;
10504
+ isIndexingProductTypes = _ref2.isIndexingProductTypes,
10505
+ isIndexingProductSelections = _ref2.isIndexingProductSelections;
10405
10506
  if (_this.state.isProjectBeingIndexedByPim) return;
10406
10507
  try {
10407
10508
  const indexMutationResult = await _this.props.indexProject({
10408
10509
  context: pimIndexerRequestContext,
10409
10510
  variables: {
10410
10511
  shouldIndexProducts: isIndexingProducts,
10411
- shouldIndexProductTypes: isIndexingProductTypes
10512
+ shouldIndexProductTypes: isIndexingProductTypes,
10513
+ shouldIndexProductSelections: isIndexingProductSelections
10412
10514
  }
10413
10515
  });
10414
10516
  _this.setState(_objectSpread$r(_objectSpread$r({
@@ -10423,7 +10525,8 @@ let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
10423
10525
  };
10424
10526
  _this.indexProject = () => _this.monitorIndexingProgress({
10425
10527
  isIndexingProductTypes: true,
10426
- isIndexingProducts: true
10528
+ isIndexingProducts: true,
10529
+ isIndexingProductSelections: true
10427
10530
  });
10428
10531
  return _this;
10429
10532
  }
@@ -11898,12 +12001,18 @@ var messages$c = defineMessages({
11898
12001
  }
11899
12002
  });
11900
12003
 
12004
+ const _excluded$1 = ["isRequired", "disabled"];
11901
12005
  const valueMapping = {
11902
12006
  yes: true,
11903
12007
  no: false,
11904
12008
  all: [true, false]
11905
12009
  };
11906
- const BooleanField = props => {
12010
+ const BooleanField = _ref => {
12011
+ let _ref$isRequired = _ref.isRequired,
12012
+ isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
12013
+ _ref$disabled = _ref.disabled,
12014
+ disabled = _ref$disabled === void 0 ? false : _ref$disabled,
12015
+ props = _objectWithoutProperties(_ref, _excluded$1);
11907
12016
  let selectedValue;
11908
12017
  if (typeof props.value === 'boolean') selectedValue = getBooleanValue(props.value);else if (props.isMulti && _Array$isArray(props.value) && props.value.length) selectedValue = props.value.length === 2 ? 'all' : getBooleanValue(props.value[0]);
11909
12018
  const yesLabel = props.intl.formatMessage(messages$c.yes);
@@ -11921,7 +12030,7 @@ const BooleanField = props => {
11921
12030
  });
11922
12031
  return jsx(SelectInput, {
11923
12032
  name: props.name,
11924
- isClearable: !props.isRequired,
12033
+ isClearable: !isRequired,
11925
12034
  isSearchable: false,
11926
12035
  value: selectedValue,
11927
12036
  onChange: event => {
@@ -11931,14 +12040,10 @@ const BooleanField = props => {
11931
12040
  props.onChange(newValue);
11932
12041
  },
11933
12042
  options,
11934
- isDisabled: props.disabled
12043
+ isDisabled: disabled
11935
12044
  });
11936
12045
  };
11937
12046
  BooleanField.displayName = 'BooleanField';
11938
- BooleanField.defaultProps = {
11939
- isRequired: false,
11940
- disabled: false
11941
- };
11942
12047
  var booleanField = injectIntl(BooleanField);
11943
12048
  function getBooleanValue(value) {
11944
12049
  if (typeof value !== 'boolean') return undefined;
@@ -11982,16 +12087,19 @@ var messages$9 = defineMessages({
11982
12087
  }
11983
12088
  });
11984
12089
 
12090
+ const _excluded = ["isChecked"];
11985
12091
  function ownKeys$6(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
11986
12092
  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(_context = ownKeys$6(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$6(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
11987
- const MissingValueField = props => jsx(CheckboxInput, {
11988
- name: "missing-value",
11989
- isChecked: props.isChecked,
11990
- onChange: props.onChange,
11991
- children: jsx(FormattedMessage, _objectSpread$6({}, messages$9.label))
11992
- });
11993
- MissingValueField.defaultProps = {
11994
- isChecked: false
12093
+ const MissingValueField = _ref => {
12094
+ let _ref$isChecked = _ref.isChecked,
12095
+ isChecked = _ref$isChecked === void 0 ? false : _ref$isChecked,
12096
+ props = _objectWithoutProperties(_ref, _excluded);
12097
+ return jsx(CheckboxInput, {
12098
+ name: "missing-value",
12099
+ isChecked: isChecked,
12100
+ onChange: props.onChange,
12101
+ children: jsx(FormattedMessage, _objectSpread$6({}, messages$9.label))
12102
+ });
11995
12103
  };
11996
12104
  var MissingValueField$1 = MissingValueField;
11997
12105
 
@@ -13265,7 +13373,8 @@ const not = function () {
13265
13373
 
13266
13374
  const safelyAddFallback = function (string) {
13267
13375
  let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NO_VALUE_FALLBACK;
13268
- return string === '' ? fallback : string ?? fallback;
13376
+ if (string === '') return fallback;
13377
+ return string ?? fallback;
13269
13378
  };
13270
13379
 
13271
13380
  var messages = defineMessages({
@@ -13638,4 +13747,4 @@ function withPendingRequests() {
13638
13747
 
13639
13748
  var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "CategorySearchPickerOptionFragment" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CategorySearch" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "externalId" }, 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: "slugAllLocales" }, 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: "parent" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ 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: "ancestors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ 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: 685, source: { body: "query SearchCategoryReference($locale: Locale!, $text: String!) {\n categories: categoryAutocomplete(locale: $locale, text: $text) {\n results {\n ...CategorySearchPickerOptionFragment\n }\n }\n}\n\nquery FetchCategoriesByIds($where: String!) {\n categories(where: $where) {\n results {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nfragment CategorySearchPickerOptionFragment on CategorySearch {\n id\n externalId\n nameAllLocales {\n locale\n value\n }\n slugAllLocales {\n locale\n value\n }\n parent {\n nameAllLocales {\n locale\n value\n }\n }\n ancestors {\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
13640
13749
 
13641
- export { booleanField as BooleanField, Button$1 as Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, pickerMessages$1 as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$M as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };
13750
+ export { booleanField as BooleanField, Button$1 as Button, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, searchInput as SearchInput, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, pickerMessages$1 as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, messages$N as searchInputMessages, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoresListFetcher$1 as useStoresListFetcher, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };