@commercetools-frontend/experimental-components 6.4.5 → 7.0.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.
Files changed (84) hide show
  1. package/dist/commercetools-frontend-experimental-components.cjs.dev.js +386 -145
  2. package/dist/commercetools-frontend-experimental-components.cjs.prod.js +385 -144
  3. package/dist/commercetools-frontend-experimental-components.esm.js +368 -141
  4. package/dist/declarations/src/components/channel-picker-input/channel-picker-input.d.ts +3 -3
  5. package/dist/declarations/src/components/divider/divider.d.ts +2 -2
  6. package/dist/declarations/src/components/formatted-date-time/formatted-date-time.d.ts +0 -1
  7. package/dist/declarations/src/components/recurrent-interval-picker/index.d.ts +2 -0
  8. package/dist/declarations/src/components/recurrent-interval-picker/recurrent-interval-picker.d.ts +13 -0
  9. package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/index.d.ts +1 -0
  10. package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/use-recurrence-intervals.d.ts +20 -0
  11. package/dist/declarations/src/components/store-select-input/constants.d.ts +2 -0
  12. package/dist/declarations/src/components/validated-input/validated-input.d.ts +7 -38
  13. package/dist/declarations/src/constants/index.d.ts +1 -0
  14. package/dist/declarations/src/custom-fields/custom-field-definitions-connector/custom-field-definitions-connector.d.ts +0 -1
  15. package/dist/declarations/src/custom-fields/custom-field-type-definitions-connector/custom-field-type-definitions-connector.d.ts +0 -1
  16. package/dist/declarations/src/custom-fields/custom-fields/constants.d.ts +36 -0
  17. package/dist/declarations/src/custom-fields/custom-fields/custom-field-input.d.ts +2 -0
  18. package/dist/declarations/src/custom-fields/custom-fields/index.d.ts +2 -1
  19. package/dist/declarations/src/features/picker/shared/hooks/use-load-options.d.ts +1 -1
  20. package/dist/declarations/src/features/picker/shared/hooks/use-product-type-options.d.ts +2 -2
  21. package/dist/declarations/src/features/pim-indexer/components/pim-indexer-provider/pim-indexer-provider.d.ts +0 -1
  22. package/dist/declarations/src/features/pim-indexer/components/with-pim-indexer/with-pim-indexer.d.ts +0 -1
  23. package/dist/declarations/src/features/platform-limits/business-units/hooks/index.d.ts +2 -0
  24. package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits/index.d.ts +1 -0
  25. package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits/use-business-units-platform-limits.d.ts +10 -0
  26. package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits-fetcher/index.d.ts +1 -0
  27. package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits-fetcher/use-business-units-platform-limits-fetcher.d.ts +12 -0
  28. package/dist/declarations/src/features/platform-limits/business-units/index.d.ts +1 -0
  29. package/dist/declarations/src/features/platform-limits/customer-groups/hooks/use-customer-groups-platform-limits/use-customer-groups-platform-limits.d.ts +1 -1
  30. package/dist/declarations/src/features/platform-limits/customer-groups/hooks/use-customer-groups-platform-limits-fetcher/use-customer-groups-platform-limits-fetcher.d.ts +1 -1
  31. package/dist/declarations/src/features/platform-limits/customers/hooks/use-customers-platform-limits/use-customers-platform-limits.d.ts +2 -1
  32. package/dist/declarations/src/features/platform-limits/customers/hooks/use-customers-platform-limits-fetcher/use-customers-platform-limits-fetcher.d.ts +1 -1
  33. package/dist/declarations/src/features/platform-limits/index.d.ts +3 -0
  34. package/dist/declarations/src/features/platform-limits/shared/components/index.d.ts +2 -0
  35. package/dist/declarations/src/features/platform-limits/shared/components/notifications/error/error.d.ts +12 -0
  36. package/dist/declarations/src/features/platform-limits/shared/components/notifications/error/index.d.ts +1 -0
  37. package/dist/declarations/src/features/platform-limits/shared/components/notifications/index.d.ts +1 -0
  38. package/dist/declarations/src/features/platform-limits/shared/components/notifications/notifications.d.ts +7 -0
  39. package/dist/declarations/src/features/platform-limits/shared/components/notifications/warning/index.d.ts +1 -0
  40. package/dist/declarations/src/features/platform-limits/shared/components/notifications/warning/warning.d.ts +12 -0
  41. package/dist/declarations/src/features/platform-limits/shared/components/status-text/index.d.ts +1 -0
  42. package/dist/declarations/src/features/platform-limits/shared/components/status-text/status-text.d.ts +12 -0
  43. package/dist/declarations/src/features/platform-limits/shared/constants.d.ts +13 -0
  44. package/dist/declarations/src/features/platform-limits/shared/hooks/index.d.ts +3 -0
  45. package/dist/declarations/src/features/platform-limits/shared/hooks/use-intercept-navigation/index.d.ts +1 -0
  46. package/dist/declarations/src/features/platform-limits/shared/hooks/use-intercept-navigation/use-intercept-navigation.d.ts +7 -0
  47. package/dist/declarations/src/features/platform-limits/shared/hooks/use-limits-modal-state/index.d.ts +1 -0
  48. package/dist/declarations/src/features/platform-limits/shared/hooks/use-limits-modal-state/use-limits-modal-state.d.ts +6 -0
  49. package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/index.d.ts +3 -0
  50. package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/platform-limits-query-variables.d.ts +2 -0
  51. package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/use-platform-limits-fetcher.d.ts +7 -0
  52. package/dist/declarations/src/features/platform-limits/shared/index.d.ts +4 -0
  53. package/dist/declarations/src/features/platform-limits/shared/utils/index.d.ts +1 -0
  54. package/dist/declarations/src/features/platform-limits/shared/utils/utils.d.ts +14 -0
  55. package/dist/declarations/src/features/platform-limits/shipping-methods/hooks/use-shipping-methods-platform-limits/use-shipping-methods-platform-limits.d.ts +1 -1
  56. package/dist/declarations/src/features/platform-limits/shipping-methods/hooks/use-shipping-methods-platform-limits-fetcher/use-shipping-methods-platform-limits-fetcher.d.ts +1 -1
  57. package/dist/declarations/src/features/platform-limits/stores/hooks/index.d.ts +3 -0
  58. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits/index.d.ts +1 -0
  59. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits/use-store-platform-limits.d.ts +15 -0
  60. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-fetcher/index.d.ts +1 -0
  61. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-fetcher/use-store-platform-limits-fetcher.d.ts +13 -0
  62. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-status/index.d.ts +1 -0
  63. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-status/use-store-platform-limits-status.d.ts +5 -0
  64. package/dist/declarations/src/features/platform-limits/stores/index.d.ts +1 -0
  65. package/dist/declarations/src/features/platform-limits/tax-categories/hooks/use-tax-categories-platform-limits/use-tax-categories-platform-limits.d.ts +1 -1
  66. package/dist/declarations/src/features/platform-limits/tax-categories/hooks/use-tax-categories-platform-limits-fetcher/use-tax-categories-platform-limits-fetcher.d.ts +1 -1
  67. package/dist/declarations/src/features/platform-limits/zones/hooks/use-zones-platform-limits/use-zones-platform-limits.d.ts +1 -1
  68. package/dist/declarations/src/features/platform-limits/zones/hooks/use-zones-platform-limits-fetcher/use-zones-platform-limits-fetcher.d.ts +1 -1
  69. package/dist/declarations/src/fields/numeric-format-input/numeric-format-input.d.ts +0 -1
  70. package/dist/declarations/src/fields/search-input/search-input.d.ts +0 -1
  71. package/dist/declarations/src/fields/throttled-field/throttled-field.d.ts +0 -1
  72. package/dist/declarations/src/hooks/index.d.ts +0 -1
  73. package/dist/declarations/src/hooks/use-persisted-reminder/use-persisted-reminder.d.ts +1 -1
  74. package/dist/declarations/src/hooks/use-previous/use-previous.d.ts +1 -1
  75. package/dist/declarations/src/hooks/use-product-selections-fetcher/use-product-selections-fetcher.d.ts +1 -6
  76. package/dist/declarations/src/hooks/use-stores-list-fetcher/use-stores-list-fetcher.d.ts +1 -8
  77. package/dist/declarations/src/index.d.ts +9 -8
  78. package/dist/declarations/src/utils/type-definitions/type-definitions.d.ts +1 -1
  79. package/dist/styles.css +43 -43
  80. package/package.json +25 -31
  81. package/dist/declarations/src/hooks/use-did-form-validation-fail/index.d.ts +0 -1
  82. package/dist/declarations/src/hooks/use-did-form-validation-fail/use-did-form-validation-fail.d.ts +0 -1
  83. package/dist/declarations/src/utils/store-data-fence-product-selection/index.d.ts +0 -1
  84. package/dist/declarations/src/utils/store-data-fence-product-selection/store-data-fence-product-selection.d.ts +0 -1
@@ -76,7 +76,7 @@ var applicationShell = require('@commercetools-frontend/application-shell');
76
76
  var _ = require('@commercetools-frontend/ui-kit/');
77
77
  var PropTypes = require('prop-types');
78
78
  var react$1 = require('@emotion/react');
79
- var reactBeautifulDnd = require('react-beautiful-dnd');
79
+ var dnd = require('@hello-pangea/dnd');
80
80
  var ReactDOM = require('react-dom');
81
81
  var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
82
82
  var selectUtils = require('@commercetools-uikit/select-utils');
@@ -230,6 +230,9 @@ const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
230
230
  CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
231
231
  var CenteredLoadingSpinner$1 = CenteredLoadingSpinner;
232
232
 
233
+ const LOWER_STORES_LIMIT = 60;
234
+ const UPPER_STORES_LIMIT = 500;
235
+
233
236
  const QUERY_MAX_LIMIT = 500;
234
237
  const SHOW_TOOLTIP_CHARS_COUNT = 40;
235
238
  const SEARCHABLE_REFERENCES = {
@@ -273,7 +276,7 @@ const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAtt
273
276
  // TODO: apply a more robust solution to overlaying issues
274
277
  const Z_INDEX_DROPDOWN = 30000;
275
278
 
276
- var pickerMessages$1 = reactIntl.defineMessages({
279
+ var commonPickerMessages = reactIntl.defineMessages({
277
280
  loadingErrorMessage: {
278
281
  id: 'Pickers.loadingErrorMessage',
279
282
  description: 'Message shown to used when picker fails to load data from server.',
@@ -286,7 +289,7 @@ var pickerMessages$1 = reactIntl.defineMessages({
286
289
  }
287
290
  });
288
291
 
289
- var messages$R = reactIntl.defineMessages({
292
+ var messages$S = reactIntl.defineMessages({
290
293
  noChannelsFound: {
291
294
  id: 'Products.ChannelPickerInput.noChannelsFound',
292
295
  description: 'The message to display when no channels were found',
@@ -308,16 +311,19 @@ const getRolesClause = roles => roles && roles.length > 0 ? `roles contains any
308
311
  const ChannelPickerInput = _ref => {
309
312
  let isClearable = _ref.isClearable,
310
313
  isDisabled = _ref.isDisabled,
311
- isReadOnly = _ref.isReadOnly,
314
+ _ref$isReadOnly = _ref.isReadOnly,
315
+ isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
312
316
  onChange = _ref.onChange,
313
317
  name = _ref.name,
314
318
  onBlur = _ref.onBlur,
315
319
  value = _ref.value,
316
320
  hasError = _ref.hasError,
317
- onError = _ref.onError,
321
+ _ref$onError = _ref.onError,
322
+ onError = _ref$onError === void 0 ? null : _ref$onError,
318
323
  placeholder = _ref.placeholder,
319
324
  roles = _ref.roles,
320
- hasWarning = _ref.hasWarning,
325
+ _ref$hasWarning = _ref.hasWarning,
326
+ hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
321
327
  _ref$isMulti = _ref.isMulti,
322
328
  isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti;
323
329
  const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
@@ -401,7 +407,7 @@ const ChannelPickerInput = _ref => {
401
407
  if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
402
408
  }, [isCurrentOptionLoadingFailed, onError, currentOptions]);
403
409
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
404
- const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$R.noChannelsFound), [loadingError, formatMessage]);
410
+ const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$S.noChannelsFound), [loadingError, formatMessage]);
405
411
  const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
406
412
  const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
407
413
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
@@ -413,7 +419,7 @@ const ChannelPickerInput = _ref => {
413
419
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
414
420
  id: name,
415
421
  name: name,
416
- placeholder: placeholder ?? formatMessage(messages$R.placeholder),
422
+ placeholder: placeholder ?? formatMessage(messages$S.placeholder),
417
423
  loadOptions: loadOptionsDebounced,
418
424
  defaultOptions: true,
419
425
  showOptionGroupDivider: true,
@@ -436,7 +442,7 @@ const ChannelPickerInput = _ref => {
436
442
  })
437
443
  }), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
438
444
  tone: "negative",
439
- intlMessage: pickerMessages$1.loadingErrorMessage
445
+ intlMessage: commonPickerMessages.loadingErrorMessage
440
446
  })]
441
447
  })
442
448
  });
@@ -470,7 +476,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
470
476
  FormattedDateTime.displayName = 'FormattedDateTime';
471
477
  var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
472
478
 
473
- var messages$Q = reactIntl.defineMessages({
479
+ var messages$R = reactIntl.defineMessages({
474
480
  noProductTypesFound: {
475
481
  id: 'Products.ProductTypePickerInput.noProductTypesFound',
476
482
  description: 'The message to display when no product types were found',
@@ -559,7 +565,7 @@ const ProductTypePickerInput = _ref => {
559
565
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
560
566
  id: name,
561
567
  name: name,
562
- placeholder: formatMessage(messages$Q.placeholder),
568
+ placeholder: formatMessage(messages$R.placeholder),
563
569
  loadOptions: loadOptionsDebounced,
564
570
  defaultOptions: [],
565
571
  isClearable: isClearable,
@@ -572,7 +578,7 @@ const ProductTypePickerInput = _ref => {
572
578
  onInputChange: handleInputChange,
573
579
  onBlur: onBlur,
574
580
  value: currentOption.data,
575
- noOptionsMessage: () => loadingError ? null : formatMessage(messages$Q.noProductTypesFound),
581
+ noOptionsMessage: () => loadingError ? null : formatMessage(messages$R.noProductTypesFound),
576
582
  hasError: hasError || isLoadingFailed,
577
583
  menuPortalZIndex: Z_INDEX_DROPDOWN,
578
584
  menuPortalTarget: document.body,
@@ -580,7 +586,7 @@ const ProductTypePickerInput = _ref => {
580
586
  })
581
587
  }), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
582
588
  tone: "negative",
583
- intlMessage: pickerMessages$1.loadingErrorMessage
589
+ intlMessage: commonPickerMessages.loadingErrorMessage
584
590
  })]
585
591
  })
586
592
  });
@@ -588,7 +594,7 @@ const ProductTypePickerInput = _ref => {
588
594
  ProductTypePickerInput.displayName = 'ProductTypePickerInput';
589
595
  var ProductTypePickerInput$1 = ProductTypePickerInput;
590
596
 
591
- var messages$P = reactIntl.defineMessages({
597
+ var messages$Q = reactIntl.defineMessages({
592
598
  noStatesFound: {
593
599
  id: 'Products.StatePickerInput.noStatesFound',
594
600
  description: 'The message to display when no states were found',
@@ -672,7 +678,7 @@ const StatePickerInput = _ref => {
672
678
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
673
679
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
674
680
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
675
- const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$P.noStatesFound), [loadingError, formatMessage]);
681
+ const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noStatesFound), [loadingError, formatMessage]);
676
682
  const tooltipTitle = currentOption?.data?.label ?? '';
677
683
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
678
684
  max: "scale",
@@ -684,7 +690,7 @@ const StatePickerInput = _ref => {
684
690
  id: name,
685
691
  name: name,
686
692
  horizontalConstraint: "scale",
687
- placeholder: formatMessage(messages$P.placeholder),
693
+ placeholder: formatMessage(messages$Q.placeholder),
688
694
  loadOptions: loadOptionsDebounced,
689
695
  defaultOptions: true,
690
696
  showOptionGroupDivider: true,
@@ -706,7 +712,7 @@ const StatePickerInput = _ref => {
706
712
  }, dataLocale)
707
713
  }), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
708
714
  tone: "negative",
709
- intlMessage: pickerMessages$1.loadingErrorMessage
715
+ intlMessage: commonPickerMessages.loadingErrorMessage
710
716
  })]
711
717
  })
712
718
  });
@@ -741,7 +747,7 @@ const CustomFieldTooltip = _ref => {
741
747
  };
742
748
  var CustomFieldTooltip$1 = CustomFieldTooltip;
743
749
 
744
- var messages$O = reactIntl.defineMessages({
750
+ var messages$P = reactIntl.defineMessages({
745
751
  bottomOption: {
746
752
  id: 'Products.Pickers.bottomOption',
747
753
  description: 'The message to display at the end of the options menu',
@@ -753,7 +759,7 @@ function ownKeys$1p(e, r) { var t = _Object$keys__default["default"](e); if (_Ob
753
759
  function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
754
760
  const getBottomOption = formatMessage => ({
755
761
  options: [{
756
- label: formatMessage ? formatMessage(messages$O.bottomOption) : messages$O.bottomOption,
762
+ label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
757
763
  isBottomOption: true,
758
764
  isDisabled: true
759
765
  }]
@@ -1354,7 +1360,7 @@ ThrottledField.defaultProps = {
1354
1360
  };
1355
1361
  var ThrottledField$1 = ThrottledField;
1356
1362
 
1357
- var messages$N = reactIntl.defineMessages({
1363
+ var messages$O = reactIntl.defineMessages({
1358
1364
  buttonLabel: {
1359
1365
  id: 'SearchInput.buttonLabel',
1360
1366
  description: 'Label for "Search" button.',
@@ -1459,7 +1465,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
1459
1465
  "data-testid": this.props.testId || 'search-input',
1460
1466
  value: this.state.text,
1461
1467
  label: this.props.label,
1462
- placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$N.placeholder),
1468
+ placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$O.placeholder),
1463
1469
  inputRef: this.props.inputRef || this.setInputRef,
1464
1470
  onChange: this.handleInputChange,
1465
1471
  onEnter: this.handleEnter,
@@ -2029,34 +2035,6 @@ const useStoreKeysInDataFences = _ref => {
2029
2035
  };
2030
2036
  var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
2031
2037
 
2032
- function useDidFormValidationFail() {
2033
- const _useState = React.useState(false),
2034
- _useState2 = _slicedToArray(_useState, 2),
2035
- didFormValidationFail = _useState2[0],
2036
- setDidFormValidationFail = _useState2[1];
2037
- const _useState3 = React.useState(false),
2038
- _useState4 = _slicedToArray(_useState3, 2),
2039
- wasValidationRequested = _useState4[0],
2040
- setWasValidationRequested = _useState4[1];
2041
- const _useFormikContext = formik.useFormikContext(),
2042
- dirty = _useFormikContext.dirty,
2043
- isValid = _useFormikContext.isValid,
2044
- isValidating = _useFormikContext.isValidating;
2045
- React.useEffect(() => {
2046
- if (dirty) setWasValidationRequested(false);
2047
- }, [dirty]);
2048
- React.useEffect(() => {
2049
- if (isValidating) setWasValidationRequested(true);
2050
- }, [isValidating]);
2051
- React.useEffect(() => {
2052
- if (wasValidationRequested && !isValid) {
2053
- setDidFormValidationFail(true);
2054
- setWasValidationRequested(false);
2055
- }
2056
- }, [isValid, setWasValidationRequested, setDidFormValidationFail, wasValidationRequested]);
2057
- return Boolean(didFormValidationFail);
2058
- }
2059
-
2060
2038
  function ownKeys$1a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
2061
2039
  function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2062
2040
  const TEN_MINUTES_IN_MS = 600000;
@@ -2133,7 +2111,7 @@ const usePersistedReminder = function () {
2133
2111
  };
2134
2112
  var usePersistedReminder$1 = usePersistedReminder;
2135
2113
 
2136
- var messages$M = reactIntl.defineMessages({
2114
+ var messages$N = reactIntl.defineMessages({
2137
2115
  profileUpdated: {
2138
2116
  id: 'NotificationText.profileUpdated',
2139
2117
  description: 'Label for the notification header',
@@ -2157,22 +2135,22 @@ const LinkToProfile = props => {
2157
2135
  return jsxRuntime.jsx(uiKit.Link, {
2158
2136
  to: "/account/profile",
2159
2137
  children: props.children
2160
- });
2138
+ }, "link");
2161
2139
  };
2162
2140
  LinkToProfile.displayName = 'LinkToProfile';
2163
2141
  const getLinkToProfile = msg => jsxRuntime.jsx(LinkToProfile, {
2164
2142
  children: msg
2165
- });
2166
- const getNewLine = () => jsxRuntime.jsx("br", {});
2143
+ }, "linkToProfile");
2144
+ const getNewLine = () => jsxRuntime.jsx("br", {}, crypto.randomUUID());
2167
2145
  const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2168
2146
  children: [jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2169
2147
  scale: "xs",
2170
2148
  children: [jsxRuntime.jsx(uiKit.Text.Body, {
2171
2149
  as: "p",
2172
2150
  isBold: true,
2173
- intlMessage: messages$M.profileUpdated
2151
+ intlMessage: messages$N.profileUpdated
2174
2152
  }), jsxRuntime.jsx(uiKit.Text.Body, {
2175
- intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.addMoreInformation), {}, {
2153
+ intlMessage: _objectSpread$19(_objectSpread$19({}, messages$N.addMoreInformation), {}, {
2176
2154
  values: {
2177
2155
  newline: getNewLine
2178
2156
  }
@@ -2181,7 +2159,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2181
2159
  }), jsxRuntime.jsx(uiKit.Spacings.Stack, {
2182
2160
  scale: "xs",
2183
2161
  children: jsxRuntime.jsx(uiKit.Text.Body, {
2184
- intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.informationAndProfileLink), {}, {
2162
+ intlMessage: _objectSpread$19(_objectSpread$19({}, messages$N.informationAndProfileLink), {}, {
2185
2163
  values: {
2186
2164
  newline: getNewLine,
2187
2165
  link: getLinkToProfile
@@ -2264,8 +2242,11 @@ function usePendingRequests() {
2264
2242
  pendingRequests = _useState2[0],
2265
2243
  setPendingRequests = _useState2[1];
2266
2244
  const isUnmountedRef = React.useRef(false);
2267
- React.useEffect(() => () => {
2268
- isUnmountedRef.current = true;
2245
+ React.useEffect(() => {
2246
+ isUnmountedRef.current = false;
2247
+ return () => {
2248
+ isUnmountedRef.current = true;
2249
+ };
2269
2250
  }, []);
2270
2251
  const change = React.useCallback(delta => {
2271
2252
  // FIXME: isMounted is an anti pattern
@@ -2306,7 +2287,7 @@ const useEventCallback = (fn, dependencies) => {
2306
2287
  };
2307
2288
  var useEventCallback$1 = useEventCallback;
2308
2289
 
2309
- var messages$L = reactIntl.defineMessages({
2290
+ var messages$M = reactIntl.defineMessages({
2310
2291
  fallbackHint: {
2311
2292
  id: 'KeyFallback.fallbackHint',
2312
2293
  description: 'key fallback for a specified resource key (e.g name)',
@@ -2330,7 +2311,7 @@ const useLocalizedKeyFallback = () => {
2330
2311
  return values => {
2331
2312
  if (!values.resource) return null;
2332
2313
  const localizedString = values.resource[values.localizedStringFieldName];
2333
- const fallbackHintWithKey = intl.formatMessage(messages$L.fallbackHint, {
2314
+ const fallbackHintWithKey = intl.formatMessage(messages$M.fallbackHint, {
2334
2315
  key: values.resource.key
2335
2316
  });
2336
2317
  if (!localizedString) return fallbackHintWithKey;
@@ -2478,7 +2459,7 @@ const convertProductSelectionsFromGraphQl = productSelections => {
2478
2459
  });
2479
2460
  };
2480
2461
 
2481
- var FetchProductSelections = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sort" } }, type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, defaultValue: { kind: "NullValue" }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ 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" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "Variable", name: { kind: "Name", value: "sort" } } }, { kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "count" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "offset" }, arguments: [], directives: [] }, { 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: "version" }, 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: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 400, source: { body: "query FetchProductSelections($limit: Int = null, $offset: Int = null, $sort: [String!] = null, $where: String = null) {\n productSelections(limit: $limit, offset: $offset, sort: $sort, where: $where) {\n total\n count\n offset\n results {\n id\n version\n key\n nameAllLocales {\n locale\n value\n }\n createdAt\n lastModifiedAt\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
2462
+ var FetchProductSelections = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sort" } }, type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, defaultValue: { kind: "NullValue" }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ 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" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "Variable", name: { kind: "Name", value: "sort" } } }, { kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "count" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "offset" }, arguments: [], directives: [] }, { 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: "version" }, 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: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 424, source: { body: "query FetchProductSelections(\n $limit: Int = null\n $offset: Int = null\n $sort: [String!] = null\n $where: String = null\n) {\n productSelections(\n limit: $limit\n offset: $offset\n sort: $sort\n where: $where\n ) {\n total\n count\n offset\n results {\n id\n version\n key\n nameAllLocales {\n locale\n value\n }\n createdAt\n lastModifiedAt\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
2482
2463
  const createQueryVariables$5 = function () {
2483
2464
  let ownProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2484
2465
  return {
@@ -3990,7 +3971,7 @@ function formatMoney$2(moneyValue, intl, options) {
3990
3971
  }, options));
3991
3972
  }
3992
3973
 
3993
- var messages$K = reactIntl.defineMessages({
3974
+ var messages$L = reactIntl.defineMessages({
3994
3975
  booleanYes: {
3995
3976
  id: 'AttributeTypeFormats.boolean.yes',
3996
3977
  description: 'The label for boolean attribute `true` value',
@@ -4072,7 +4053,7 @@ const formatDateTime = _ref7 => {
4072
4053
  const formatBoolean = _ref8 => {
4073
4054
  let value = _ref8.value,
4074
4055
  intl = _ref8.intl;
4075
- return value ? intl.formatMessage(messages$K.booleanYes) : intl.formatMessage(messages$K.booleanNo);
4056
+ return value ? intl.formatMessage(messages$L.booleanYes) : intl.formatMessage(messages$L.booleanNo);
4076
4057
  };
4077
4058
  const formatNilType = _ref9 => {
4078
4059
  let value = _ref9.value,
@@ -4467,6 +4448,12 @@ const convertAction = (actionName, actionPayload) => {
4467
4448
  localizedName: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedName)
4468
4449
  }
4469
4450
  };
4451
+ case 'setSlug':
4452
+ return {
4453
+ [actionName]: {
4454
+ slug: l10n.transformLocalizedStringToLocalizedField(actionPayload.slug)
4455
+ }
4456
+ };
4470
4457
  case 'setLineItemCustomField':
4471
4458
  return {
4472
4459
  [actionName]: {
@@ -5198,7 +5185,7 @@ function uniqueObjects(items) {
5198
5185
 
5199
5186
  */
5200
5187
 
5201
- const messages$J = reactIntl.defineMessages({
5188
+ const messages$K = reactIntl.defineMessages({
5202
5189
  unique: {
5203
5190
  id: 'Validation.unique',
5204
5191
  description: 'An error message to show if the field must be unique',
@@ -5240,7 +5227,7 @@ const messages$J = reactIntl.defineMessages({
5240
5227
  defaultMessage: 'Invalid ID format. Please enter a valid ID.'
5241
5228
  }
5242
5229
  });
5243
- var validationMessages = messages$J;
5230
+ var validationMessages = messages$K;
5244
5231
 
5245
5232
  function getIndexesOfInvalidValues(values) {
5246
5233
  let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
@@ -5499,7 +5486,7 @@ function ReferenceSearch(props) {
5499
5486
  });
5500
5487
  }
5501
5488
 
5502
- const messages$H = reactIntl.defineMessages({
5489
+ const messages$I = reactIntl.defineMessages({
5503
5490
  placeholder: {
5504
5491
  id: 'CartDiscountReferenceSearch.placeholder',
5505
5492
  description: 'Placeholder for search for a cart discount',
@@ -5526,7 +5513,7 @@ const messages$H = reactIntl.defineMessages({
5526
5513
  defaultMessage: 'Enter search term'
5527
5514
  }
5528
5515
  });
5529
- var messages$I = messages$H;
5516
+ var messages$J = messages$I;
5530
5517
 
5531
5518
  function ownKeys$11(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
5532
5519
  function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
@@ -5551,7 +5538,7 @@ function Option$1(props) {
5551
5538
  fallbackOrder: languages
5552
5539
  })
5553
5540
  }), jsxRuntime.jsxs(uiKit.Text.Detail, {
5554
- children: [formatMessage(messages$I.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
5541
+ children: [formatMessage(messages$J.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
5555
5542
  })]
5556
5543
  })
5557
5544
  }));
@@ -5627,10 +5614,10 @@ function CartDiscountReferenceSearch(props) {
5627
5614
  onBlur: props.onBlur,
5628
5615
  onChange: props.onChange,
5629
5616
  value: returnNullIfEmpty(props.value),
5630
- placeholderLabel: formatMessage(messages$I.placeholder),
5631
- searchPromptLabel: formatMessage(messages$I.searchPrompt),
5632
- noResultsLabel: formatMessage(messages$I.noResults),
5633
- referenceIsMissingLabel: formatMessage(messages$I.isMissing),
5617
+ placeholderLabel: formatMessage(messages$J.placeholder),
5618
+ searchPromptLabel: formatMessage(messages$J.searchPrompt),
5619
+ noResultsLabel: formatMessage(messages$J.noResults),
5620
+ referenceIsMissingLabel: formatMessage(messages$J.isMissing),
5634
5621
  mapItemToOption: mapItemToOption,
5635
5622
  loadItemsBySearchTerm: loadItemsBySearchTerm,
5636
5623
  loadItemsByIds: loadItemsByIds,
@@ -5640,7 +5627,7 @@ function CartDiscountReferenceSearch(props) {
5640
5627
  });
5641
5628
  }
5642
5629
 
5643
- const messages$F = reactIntl.defineMessages({
5630
+ const messages$G = reactIntl.defineMessages({
5644
5631
  placeholder: {
5645
5632
  id: 'CategoryReferenceSearch.placeholder',
5646
5633
  description: 'Placeholder for search for a category',
@@ -5672,7 +5659,7 @@ const messages$F = reactIntl.defineMessages({
5672
5659
  defaultMessage: 'Parent Category'
5673
5660
  }
5674
5661
  });
5675
- var messages$G = messages$F;
5662
+ var messages$H = messages$G;
5676
5663
 
5677
5664
  function ownKeys$$(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
5678
5665
  function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$$(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$$(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
@@ -5697,7 +5684,7 @@ function Option(props) {
5697
5684
  fallbackOrder: languages
5698
5685
  })
5699
5686
  }), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
5700
- children: `${formatMessage(messages$G.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
5687
+ children: `${formatMessage(messages$H.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
5701
5688
  key: 'name',
5702
5689
  locale: language,
5703
5690
  fallbackOrder: languages
@@ -5709,7 +5696,7 @@ function Option(props) {
5709
5696
  fallbackOrder: languages
5710
5697
  })}`
5711
5698
  }), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
5712
- children: `${formatMessage(messages$G.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
5699
+ children: `${formatMessage(messages$H.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
5713
5700
  })]
5714
5701
  })
5715
5702
  }));
@@ -5757,10 +5744,10 @@ function CategoryReferenceSearch(props) {
5757
5744
  onBlur: props.onBlur,
5758
5745
  onChange: props.onChange,
5759
5746
  value: props.value,
5760
- placeholderLabel: formatMessage(messages$G.placeholder),
5761
- searchPromptLabel: formatMessage(messages$G.searchPrompt),
5762
- noResultsLabel: formatMessage(messages$G.noResults),
5763
- referenceIsMissingLabel: formatMessage(messages$G.isMissing),
5747
+ placeholderLabel: formatMessage(messages$H.placeholder),
5748
+ searchPromptLabel: formatMessage(messages$H.searchPrompt),
5749
+ noResultsLabel: formatMessage(messages$H.noResults),
5750
+ referenceIsMissingLabel: formatMessage(messages$H.isMissing),
5764
5751
  mapItemToOption: mapItemToOption,
5765
5752
  loadItemsBySearchTerm: loadItemsBySearchTerm,
5766
5753
  loadItemsByIds: loadItemsByIds,
@@ -5837,7 +5824,7 @@ const Button = _ref => {
5837
5824
  Button.displayName = 'Button';
5838
5825
  var Button$1 = Button;
5839
5826
 
5840
- var messages$E = reactIntl.defineMessages({
5827
+ var messages$F = reactIntl.defineMessages({
5841
5828
  chooseFile: {
5842
5829
  id: 'ButtonFileInput.chooseFile',
5843
5830
  description: 'The label text of the field for upload local file',
@@ -5854,7 +5841,7 @@ var styles$f = {
5854
5841
  };
5855
5842
  const FileInput = _ref => {
5856
5843
  let _ref$children = _ref.children,
5857
- children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$E.chooseFile)) : _ref$children,
5844
+ children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$F.chooseFile)) : _ref$children,
5858
5845
  _ref$allowMultiple = _ref.allowMultiple,
5859
5846
  allowMultiple = _ref$allowMultiple === void 0 ? false : _ref$allowMultiple,
5860
5847
  _ref$acceptTypes = _ref.acceptTypes,
@@ -5877,7 +5864,7 @@ const FileInput = _ref => {
5877
5864
  FileInput.displayName = 'FileInput';
5878
5865
  var FileInput$1 = FileInput;
5879
5866
 
5880
- var messages$D = reactIntl.defineMessages({
5867
+ var messages$E = reactIntl.defineMessages({
5881
5868
  countriesBasicSelectPlaceholder: {
5882
5869
  id: 'CountriesPicker.countriesBasicSelectPlaceholder',
5883
5870
  description: 'Placeholder of the basic field for countries',
@@ -5898,7 +5885,7 @@ var messages$D = reactIntl.defineMessages({
5898
5885
  function ownKeys$X(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
5899
5886
  function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$X(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$X(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5900
5887
  const emptyCountryOption = intl => [{
5901
- label: intl.formatMessage(messages$D.countriesAsyncSelectDropdownTypeAheadPrompt),
5888
+ label: intl.formatMessage(messages$E.countriesAsyncSelectDropdownTypeAheadPrompt),
5902
5889
  value: undefined,
5903
5890
  isDisabled: true
5904
5891
  }];
@@ -5941,7 +5928,7 @@ function CountriesAsyncSelectDropdown(props) {
5941
5928
  var _context7;
5942
5929
  return _findInstanceProperty__default["default"](_context7 = props.options).call(_context7, country => country.value === countryCode);
5943
5930
  }),
5944
- placeholder: intl.formatMessage(messages$D.countriesAsyncSelectPlaceholder),
5931
+ placeholder: intl.formatMessage(messages$E.countriesAsyncSelectPlaceholder),
5945
5932
  loadOptions: handleLoadOptions,
5946
5933
  onChange: onOptionChange,
5947
5934
  isDisabled: props.isDisabled,
@@ -5961,7 +5948,7 @@ function CountriesBasicSelectDropdown(props) {
5961
5948
  value: props.value,
5962
5949
  isRequired: props.isRequired,
5963
5950
  description: props.description,
5964
- placeholder: intl.formatMessage(messages$D.countriesBasicSelectPlaceholder),
5951
+ placeholder: intl.formatMessage(messages$E.countriesBasicSelectPlaceholder),
5965
5952
  options: props.options,
5966
5953
  onChange: props.onChange,
5967
5954
  isDisabled: props.isDisabled,
@@ -5997,7 +5984,7 @@ function CountriesPicker(_ref) {
5997
5984
  });
5998
5985
  }
5999
5986
 
6000
- var messages$C = reactIntl.defineMessages({
5987
+ var messages$D = reactIntl.defineMessages({
6001
5988
  noCustomerGroupsFound: {
6002
5989
  id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
6003
5990
  description: 'The message to display when no customer groups were found',
@@ -6087,7 +6074,7 @@ const CustomerGroupPickerInput = _ref => {
6087
6074
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
6088
6075
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
6089
6076
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
6090
- const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$C.noCustomerGroupsFound), [loadingError, formatMessage]);
6077
+ const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$D.noCustomerGroupsFound), [loadingError, formatMessage]);
6091
6078
  const tooltipTitle = currentOption?.data?.label ?? '';
6092
6079
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
6093
6080
  max: "scale",
@@ -6098,7 +6085,7 @@ const CustomerGroupPickerInput = _ref => {
6098
6085
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
6099
6086
  id: name,
6100
6087
  name: name,
6101
- placeholder: placeholder ?? formatMessage(messages$C.placeholder),
6088
+ placeholder: placeholder ?? formatMessage(messages$D.placeholder),
6102
6089
  loadOptions: loadOptionsDebounced,
6103
6090
  defaultOptions: true,
6104
6091
  showOptionGroupDivider: true,
@@ -6117,7 +6104,7 @@ const CustomerGroupPickerInput = _ref => {
6117
6104
  })
6118
6105
  }), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
6119
6106
  tone: "negative",
6120
- intlMessage: pickerMessages$1.loadingErrorMessage
6107
+ intlMessage: commonPickerMessages.loadingErrorMessage
6121
6108
  })]
6122
6109
  })
6123
6110
  });
@@ -6133,7 +6120,8 @@ var styles$e = {
6133
6120
  "divider-dashed": "divider-module__divider-dashed___2Em8A divider-module__divider___4-vdy"
6134
6121
  };
6135
6122
  function Divider(_ref) {
6136
- let isDashed = _ref.isDashed,
6123
+ let _ref$isDashed = _ref.isDashed,
6124
+ isDashed = _ref$isDashed === void 0 ? false : _ref$isDashed,
6137
6125
  _ref$orientation = _ref.orientation,
6138
6126
  orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation;
6139
6127
  return jsxRuntime.jsx("hr", {
@@ -6204,12 +6192,13 @@ const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"
6204
6192
  const CustomFieldErrors = props => {
6205
6193
  // We want to highlight fields with errors not only after a form submission,
6206
6194
  // but also after manually triggered form validation.
6207
- const didFormValidationFail = useDidFormValidationFail();
6195
+ const _useFormikContext = formik.useFormikContext(),
6196
+ isFormValid = _useFormikContext.isValid;
6208
6197
  const errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
6209
6198
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
6210
- children: [props.isTouched || didFormValidationFail && errors?.missing && jsxRuntime.jsx(_.ErrorMessage, {
6199
+ children: [props.isTouched || !isFormValid && errors?.missing && jsxRuntime.jsx(_.ErrorMessage, {
6211
6200
  intlMessage: validationMessages.required
6212
- }), props.isTouched || didFormValidationFail && errors?.duplicated && jsxRuntime.jsx(_.ErrorMessage, {
6201
+ }), props.isTouched || !isFormValid && errors?.duplicated && jsxRuntime.jsx(_.ErrorMessage, {
6213
6202
  intlMessage: validationMessages.unique
6214
6203
  })]
6215
6204
  });
@@ -6234,7 +6223,7 @@ const makeChangeHandler = setValue => event => {
6234
6223
  // attributes.
6235
6224
  const omitUnknownValues = (valuesAsMap, fieldDefinitionsAsMap) => omitBy__default["default"](valuesAsMap, (value, key) => isNil__default["default"](fieldDefinitionsAsMap[key]));
6236
6225
 
6237
- var messages$B = reactIntl.defineMessages({
6226
+ var messages$C = reactIntl.defineMessages({
6238
6227
  booleanSetInputYesLabel: {
6239
6228
  id: 'CustomBooleanInputSet.booleanSetInputYesLabel',
6240
6229
  description: 'Custom boolean input set Yes label',
@@ -6276,13 +6265,13 @@ function CustomBooleanInputSet(props) {
6276
6265
  formatMessage = _useIntl.formatMessage;
6277
6266
  const options = React.useMemo(() => [{
6278
6267
  value: 'true',
6279
- label: formatMessage(messages$B.booleanSetInputYesLabel)
6268
+ label: formatMessage(messages$C.booleanSetInputYesLabel)
6280
6269
  }, {
6281
6270
  value: 'false',
6282
- label: formatMessage(messages$B.booleanSetInputNoLabel)
6271
+ label: formatMessage(messages$C.booleanSetInputNoLabel)
6283
6272
  }, {
6284
6273
  value: 'all',
6285
- label: formatMessage(messages$B.booleanSetInputAllLabel)
6274
+ label: formatMessage(messages$C.booleanSetInputAllLabel)
6286
6275
  }], [formatMessage]);
6287
6276
  const handleChange = makeChangeHandler(rawValue => {
6288
6277
  const nullifiedIfNeeded = !rawValue ? undefined : valueToBooleanSet(rawValue);
@@ -6866,7 +6855,7 @@ const NestingLevelContext = /*#__PURE__*/React.createContext(0);
6866
6855
  var NestingLevelContext$1 = NestingLevelContext;
6867
6856
 
6868
6857
  // eslint-disable-next-line import/prefer-default-export
6869
- const messages$A = reactIntl.defineMessages({
6858
+ const messages$B = reactIntl.defineMessages({
6870
6859
  aboveFifthLevelWarning: {
6871
6860
  id: 'attributeInputByType.nestedAttributes.aboveFifthLevelWarning',
6872
6861
  description: 'Warning message shown when nested attribute are above the fifth level',
@@ -6878,9 +6867,9 @@ const messages$A = reactIntl.defineMessages({
6878
6867
  defaultMessage: 'Empty'
6879
6868
  }
6880
6869
  });
6881
- var customFieldsMessages = messages$A;
6870
+ var customFieldsMessages = messages$B;
6882
6871
 
6883
- var messages$z = reactIntl.defineMessages({
6872
+ var messages$A = reactIntl.defineMessages({
6884
6873
  updateButton: {
6885
6874
  id: 'NestedAttributes.Details.updateButton',
6886
6875
  description: 'Update button label',
@@ -6965,7 +6954,7 @@ const EditButton = props => {
6965
6954
  formatMessage = _useIntl.formatMessage;
6966
6955
  return jsxRuntime.jsx(uiKit.Tooltip, {
6967
6956
  placement: "top",
6968
- title: formatMessage(messages$z.editTooltip),
6957
+ title: formatMessage(messages$A.editTooltip),
6969
6958
  children: jsxRuntime.jsx(uiKit.IconButton, {
6970
6959
  label: "Edit",
6971
6960
  isDisabled: props.isDisabled,
@@ -6981,12 +6970,12 @@ const DropChangesConfirmation = props => {
6981
6970
  formatMessage = _useIntl2.formatMessage;
6982
6971
  return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
6983
6972
  isOpen: props.isOpen || false,
6984
- title: formatMessage(messages$z.confirmationDialogTitle),
6985
- labelPrimary: formatMessage(messages$z.nestedAttributesConfirmLabel),
6973
+ title: formatMessage(messages$A.confirmationDialogTitle),
6974
+ labelPrimary: formatMessage(messages$A.nestedAttributesConfirmLabel),
6986
6975
  onConfirm: props.onConfirm,
6987
6976
  onCancel: props.onCancel,
6988
6977
  children: jsxRuntime.jsx(uiKit.Text.Body, {
6989
- intlMessage: messages$z.confirmationDialogBody
6978
+ intlMessage: messages$A.confirmationDialogBody
6990
6979
  })
6991
6980
  });
6992
6981
  };
@@ -7011,11 +7000,11 @@ const NestedAttributeModalPage = props => {
7011
7000
  children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
7012
7001
  isDisabled: !formik$1.dirty,
7013
7002
  iconLeft: jsxRuntime.jsx(uiKit.RevertIcon, {}),
7014
- label: formatMessage(messages$z.cancelButton),
7003
+ label: formatMessage(messages$A.cancelButton),
7015
7004
  onClick: formik$1.resetForm
7016
7005
  }), jsxRuntime.jsx(applicationComponents.CustomFormModalPage.FormPrimaryButton, {
7017
7006
  isDisabled: !formik$1.dirty,
7018
- label: formatMessage(messages$z.updateButton),
7007
+ label: formatMessage(messages$A.updateButton),
7019
7008
  onClick: formik$1.handleSubmit
7020
7009
  })]
7021
7010
  }),
@@ -7057,7 +7046,7 @@ const NestedInputControls = props => {
7057
7046
  if (nextNestingLevel >= 6) return jsxRuntime.jsx(MaxNestingLevelReached, {});
7058
7047
  const hasAttributes = props.productType.attributeDefinitions.length > 0;
7059
7048
  if (!hasAttributes) return jsxRuntime.jsx(uiKit.Text.Body, {
7060
- intlMessage: messages$z.emptyProductType,
7049
+ intlMessage: messages$A.emptyProductType,
7061
7050
  tone: "secondary"
7062
7051
  });
7063
7052
  return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
@@ -7133,7 +7122,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
7133
7122
  if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
7134
7123
  kind: 'success',
7135
7124
  domain: constants.DOMAINS.SIDE,
7136
- text: formatMessage(messages$z.attributeUpdateSucceeded)
7125
+ text: formatMessage(messages$A.attributeUpdateSucceeded)
7137
7126
  });
7138
7127
  setSubmitting(false);
7139
7128
  },
@@ -7252,7 +7241,7 @@ function CustomChannelReferenceInput(props) {
7252
7241
  }
7253
7242
  CustomChannelReferenceInput.displayName = 'CustomChannelReferenceInput';
7254
7243
 
7255
- var messages$y = reactIntl.defineMessages({
7244
+ var messages$z = reactIntl.defineMessages({
7256
7245
  noProductsFound: {
7257
7246
  id: 'Shared.ProductPickerInput.noProductsFound',
7258
7247
  description: 'The message to display when no products were found',
@@ -7350,7 +7339,7 @@ const ProductPickerInput = _ref => {
7350
7339
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
7351
7340
  id: name,
7352
7341
  name: name,
7353
- placeholder: formatMessage(messages$y.placeholder),
7342
+ placeholder: formatMessage(messages$z.placeholder),
7354
7343
  loadOptions: loadOptionsDebounced,
7355
7344
  defaultOptions: [],
7356
7345
  isClearable: isClearable,
@@ -7364,7 +7353,7 @@ const ProductPickerInput = _ref => {
7364
7353
  onInputChange: handleInputChange,
7365
7354
  onBlur: onBlur,
7366
7355
  value: currentOption.data,
7367
- noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$y.noProductsFound),
7356
+ noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$z.noProductsFound),
7368
7357
  hasError: hasError || isLoadingFailed,
7369
7358
  menuPortalZIndex: Z_INDEX_DROPDOWN,
7370
7359
  menuPortalTarget: document.body,
@@ -7372,7 +7361,7 @@ const ProductPickerInput = _ref => {
7372
7361
  })
7373
7362
  }), isLoadingFailed && showLoadingErrorMessage && jsxRuntime.jsx(uiKit.Text.Body, {
7374
7363
  tone: "negative",
7375
- intlMessage: pickerMessages$1.loadingErrorMessage
7364
+ intlMessage: commonPickerMessages.loadingErrorMessage
7376
7365
  })]
7377
7366
  })
7378
7367
  });
@@ -7604,7 +7593,7 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
7604
7593
  CustomFieldInput.displayName = 'CustomFieldInput';
7605
7594
  var CustomFieldInput$1 = CustomFieldInput;
7606
7595
 
7607
- var messages$x = reactIntl.defineMessages({
7596
+ var messages$y = reactIntl.defineMessages({
7608
7597
  productReferenceLabel: {
7609
7598
  id: 'CustomFieldsLabel.productReferenceLabel',
7610
7599
  description: 'Label shown above the product picker input.',
@@ -7673,7 +7662,7 @@ const CustomFieldsLabelHint = _ref2 => {
7673
7662
  children: [jsxRuntime.jsx(uiKit.WarningIcon, {
7674
7663
  size: "medium",
7675
7664
  color: "warning"
7676
- }), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$x.cartDiscountMoreThan500))]
7665
+ }), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$y.cartDiscountMoreThan500))]
7677
7666
  });
7678
7667
  }
7679
7668
  return l10n.formatLocalizedString(fieldDefinition, {
@@ -7687,8 +7676,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
7687
7676
  formatMessage = _useIntl.formatMessage;
7688
7677
  const _usePimStatus = usePimStatus(),
7689
7678
  isProjectIndexed = _usePimStatus.isProjectIndexed;
7690
- if (isProjectIndexed) return formatMessage(messages$x.productTypeReferenceLabelI);
7691
- return formatMessage(messages$x.productTypeReferenceLabel);
7679
+ if (isProjectIndexed) return formatMessage(messages$y.productTypeReferenceLabelI);
7680
+ return formatMessage(messages$y.productTypeReferenceLabel);
7692
7681
  }
7693
7682
 
7694
7683
  // TODO(pa3): this logic may be misplaced and probably
@@ -7705,13 +7694,13 @@ function CustomFieldsLabelSubtitle(_ref3) {
7705
7694
  const referenceTypeName = capitalizeFirst(referenceTypeId);
7706
7695
  if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
7707
7696
  if (referenceTypeId === SEARCHABLE_REFERENCES.product) {
7708
- return formatMessage(messages$x.productReferenceLabel);
7697
+ return formatMessage(messages$y.productReferenceLabel);
7709
7698
  } else if (referenceTypeId === SEARCHABLE_REFERENCES.productType) {
7710
7699
  return jsxRuntime.jsx(CustomFieldsProductTypeReferenceSubtitle, {});
7711
7700
  } else if (referenceTypeId === SEARCHABLE_REFERENCES.channel) {
7712
- return formatMessage(messages$x.channelReferenceLabel);
7701
+ return formatMessage(messages$y.channelReferenceLabel);
7713
7702
  } else if (referenceTypeId === SEARCHABLE_REFERENCES.state) {
7714
- return formatMessage(messages$x.stateReferenceLabel);
7703
+ return formatMessage(messages$y.stateReferenceLabel);
7715
7704
  } else {
7716
7705
  return `${referenceTypeName} ID`;
7717
7706
  }
@@ -7731,7 +7720,7 @@ function CustomFieldsCountIndicator(_ref4) {
7731
7720
  const _useIntl3 = reactIntl.useIntl(),
7732
7721
  formatMessage = _useIntl3.formatMessage;
7733
7722
  return assignedAttributeGroups?.length > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
7734
- title: formatMessage(messages$x.attributeGroupCountTooltip, {
7723
+ title: formatMessage(messages$y.attributeGroupCountTooltip, {
7735
7724
  attributeGroups: _mapInstanceProperty__default["default"](assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
7736
7725
  count: assignedAttributeGroups.length
7737
7726
  }),
@@ -7788,7 +7777,7 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
7788
7777
  CustomFieldsLabel.displayName = 'CustomFieldsTitle';
7789
7778
  var CustomFieldsLabel$1 = CustomFieldsLabel;
7790
7779
 
7791
- var messages$w = reactIntl.defineMessages({
7780
+ var messages$x = reactIntl.defineMessages({
7792
7781
  referencedProductType: {
7793
7782
  id: 'NestedAttributes.referencedProductType',
7794
7783
  description: 'Product type referenced hint',
@@ -7799,7 +7788,7 @@ var messages$w = reactIntl.defineMessages({
7799
7788
  function ownKeys$O(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
7800
7789
  function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$O(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$O(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
7801
7790
  function ProductTypeReference(props) {
7802
- const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$w.referencedProductType), {}, {
7791
+ const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$x.referencedProductType), {}, {
7803
7792
  values: {
7804
7793
  productTypeName: props.productType.name
7805
7794
  }
@@ -7823,7 +7812,7 @@ function CustomNestedFieldInput(props) {
7823
7812
  color: "error"
7824
7813
  }), jsxRuntime.jsx(uiKit.Text.Body, {
7825
7814
  tone: "negative",
7826
- intlMessage: pickerMessages$1.loadingErrorMessage
7815
+ intlMessage: commonPickerMessages.loadingErrorMessage
7827
7816
  })]
7828
7817
  });
7829
7818
  if (!productType) return null;
@@ -7869,7 +7858,7 @@ var _ref = process.env.NODE_ENV === "production" ? {
7869
7858
  styles: "z-index:100000!important"
7870
7859
  } : {
7871
7860
  name: "4jor1w-child",
7872
- styles: "z-index:100000!important;label:child;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyYWdnYWJsZS13cmFwcGVyLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q29CIiwiZmlsZSI6ImRyYWdnYWJsZS13cmFwcGVyLmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBEcmFnZ2FibGUgfSBmcm9tICdyZWFjdC1iZWF1dGlmdWwtZG5kJztcbmltcG9ydCBSZWFjdERPTSBmcm9tICdyZWFjdC1kb20nO1xuaW1wb3J0IHsgY3VzdG9tUHJvcGVydGllcywgR3JpZCwgQ2FyZCB9IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCc7XG5pbXBvcnQgeyBEcmFnSGFuZGxlIH0gZnJvbSAnLi9kcmFnLWhhbmRsZSc7XG5cbmV4cG9ydCBjb25zdCBEcmFnZ2FibGVXcmFwcGVyID0gKHtcbiAgY2hpbGRyZW4sXG4gIGRyYWdnYWJsZUtleSxcbiAgZHJhZ2dhYmxlSWQsXG4gIGluZGV4LFxufSkgPT4ge1xuICBjb25zdCBwb3J0YWwgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTtcbiAgcG9ydGFsLmlkID0gJ2RyYWctcmJkLXBvcnRhbCc7XG4gIGRvY3VtZW50LmJvZHkuYXBwZW5kQ2hpbGQocG9ydGFsKTtcblxuICBjb25zdCBEcmFnZ2luZ0NhcmQgPSAoeyBpc0RyYWdnaW5nLCBjaGlsZHJlbiB9KSA9PiB7XG4gICAgaWYgKGlzRHJhZ2dpbmcpIHtcbiAgICAgIHJldHVybiAoXG4gICAgICAgIDxDYXJkIHRoZW1lPVwibGlnaHRcIiBpbnNldFNjYWxlPVwibVwiPlxuICAgICAgICAgIHtjaGlsZHJlbn1cbiAgICAgICAgPC9DYXJkPlxuICAgICAgKTtcbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuIGNoaWxkcmVuO1xuICAgIH1cbiAgfTtcbiAgRHJhZ2dpbmdDYXJkLnByb3BUeXBlcyA9IHtcbiAgICBpc0RyYWdnaW5nOiBQcm9wVHlwZXMuYm9vbC5pc1JlcXVpcmVkLFxuICAgIGNoaWxkcmVuOiBQcm9wVHlwZXMubm9kZS5pc1JlcXVpcmVkLFxuICB9O1xuICByZXR1cm4gKFxuICAgIDxEcmFnZ2FibGUga2V5PXtkcmFnZ2FibGVLZXl9IGRyYWdnYWJsZUlkPXtkcmFnZ2FibGVJZH0gaW5kZXg9e2luZGV4fT5cbiAgICAgIHsocHJvdmlkZWQsIHNuYXBzaG90KSA9PiB7XG4gICAgICAgIGNvbnN0IGNoaWxkID0gKFxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIHJlZj17cHJvdmlkZWQuaW5uZXJSZWZ9XG4gICAgICAgICAgICB7Li4ucHJvdmlkZWQuZHJhZ2dhYmxlUHJvcHN9XG4gICAgICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICAgICAgei1pbmRleDogMTAwMDAwICFpbXBvcnRhbnQ7XG4gICAgICAgICAgICBgfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxEcmFnZ2luZ0NhcmQgaXNEcmFnZ2luZz17c25hcHNob3QuaXNEcmFnZ2luZ30+XG4gICAgICAgICAgICAgIDxHcmlkXG4gICAgICAgICAgICAgICAgZ3JpZFRlbXBsYXRlQ29sdW1ucz17JzFmciAyMGZyJ31cbiAgICAgICAgICAgICAgICBncmlkVGVtcGxhdGVSb3dzPVwiYXV0byAxZnIgYXV0b1wiXG4gICAgICAgICAgICAgICAgZ3JpZEdhcD17XG4gICAgICAgICAgICAgICAgICBzbmFwc2hvdC5pc0RyYWdnaW5nXG4gICAgICAgICAgICAgICAgICAgID8gY3VzdG9tUHJvcGVydGllcy5zcGFjaW5nU1xuICAgICAgICAgICAgICAgICAgICA6IGN1c3RvbVByb3BlcnRpZXMuc3BhY2luZ01cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICA8R3JpZC5JdGVtPlxuICAgICAgICAgICAgICAgICAgPERyYWdIYW5kbGUgey4uLnByb3ZpZGVkLmRyYWdIYW5kbGVQcm9wc30gLz5cbiAgICAgICAgICAgICAgICA8L0dyaWQuSXRlbT5cbiAgICAgICAgICAgICAgICA8R3JpZC5JdGVtPntjaGlsZHJlbn08L0dyaWQuSXRlbT5cbiAgICAgICAgICAgICAgPC9HcmlkPlxuICAgICAgICAgICAgPC9EcmFnZ2luZ0NhcmQ+XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgICk7XG5cbiAgICAgICAgaWYgKCFzbmFwc2hvdC5pc0RyYWdnaW5nKSB7XG4gICAgICAgICAgcmV0dXJuIGNoaWxkO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gcmVuZGVyIHRoZSBkcmFnZ2FibGUgaW4gdGhlIHBvcnRhbCB3aGVuIGl0J3MgYmVpbmcgZHJhZ2dlZFxuICAgICAgICByZXR1cm4gUmVhY3RET00uY3JlYXRlUG9ydGFsKDxkaXY+e2NoaWxkfTwvZGl2PiwgcG9ydGFsKTtcbiAgICAgIH19XG4gICAgPC9EcmFnZ2FibGU+XG4gICk7XG59O1xuXG5EcmFnZ2FibGVXcmFwcGVyLnByb3BUeXBlcyA9IHtcbiAgZHJhZ2dhYmxlS2V5OiBQcm9wVHlwZXMuc3RyaW5nLmlzUmVxdWlyZWQsXG4gIGluZGV4OiBQcm9wVHlwZXMubnVtYmVyLmlzUmVxdWlyZWQsXG4gIGRyYWdnYWJsZUlkOiBQcm9wVHlwZXMuc3RyaW5nLmlzUmVxdWlyZWQsXG4gIGNoaWxkcmVuOiBQcm9wVHlwZXMubm9kZS5pc1JlcXVpcmVkLFxufTtcbiJdfQ== */",
7861
+ styles: "z-index:100000!important;label:child;/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRyYWdnYWJsZS13cmFwcGVyLmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUF1Q29CIiwiZmlsZSI6ImRyYWdnYWJsZS13cmFwcGVyLmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBEcmFnZ2FibGUgfSBmcm9tICdAaGVsbG8tcGFuZ2VhL2RuZCc7XG5pbXBvcnQgUmVhY3RET00gZnJvbSAncmVhY3QtZG9tJztcbmltcG9ydCB7IGN1c3RvbVByb3BlcnRpZXMsIEdyaWQsIENhcmQgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IHsgRHJhZ0hhbmRsZSB9IGZyb20gJy4vZHJhZy1oYW5kbGUnO1xuXG5leHBvcnQgY29uc3QgRHJhZ2dhYmxlV3JhcHBlciA9ICh7XG4gIGNoaWxkcmVuLFxuICBkcmFnZ2FibGVLZXksXG4gIGRyYWdnYWJsZUlkLFxuICBpbmRleCxcbn0pID0+IHtcbiAgY29uc3QgcG9ydGFsID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnZGl2Jyk7XG4gIHBvcnRhbC5pZCA9ICdkcmFnLXJiZC1wb3J0YWwnO1xuICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHBvcnRhbCk7XG5cbiAgY29uc3QgRHJhZ2dpbmdDYXJkID0gKHsgaXNEcmFnZ2luZywgY2hpbGRyZW4gfSkgPT4ge1xuICAgIGlmIChpc0RyYWdnaW5nKSB7XG4gICAgICByZXR1cm4gKFxuICAgICAgICA8Q2FyZCB0aGVtZT1cImxpZ2h0XCIgaW5zZXRTY2FsZT1cIm1cIj5cbiAgICAgICAgICB7Y2hpbGRyZW59XG4gICAgICAgIDwvQ2FyZD5cbiAgICAgICk7XG4gICAgfSBlbHNlIHtcbiAgICAgIHJldHVybiBjaGlsZHJlbjtcbiAgICB9XG4gIH07XG4gIERyYWdnaW5nQ2FyZC5wcm9wVHlwZXMgPSB7XG4gICAgaXNEcmFnZ2luZzogUHJvcFR5cGVzLmJvb2wuaXNSZXF1aXJlZCxcbiAgICBjaGlsZHJlbjogUHJvcFR5cGVzLm5vZGUuaXNSZXF1aXJlZCxcbiAgfTtcbiAgcmV0dXJuIChcbiAgICA8RHJhZ2dhYmxlIGtleT17ZHJhZ2dhYmxlS2V5fSBkcmFnZ2FibGVJZD17ZHJhZ2dhYmxlSWR9IGluZGV4PXtpbmRleH0+XG4gICAgICB7KHByb3ZpZGVkLCBzbmFwc2hvdCkgPT4ge1xuICAgICAgICBjb25zdCBjaGlsZCA9IChcbiAgICAgICAgICA8ZGl2XG4gICAgICAgICAgICByZWY9e3Byb3ZpZGVkLmlubmVyUmVmfVxuICAgICAgICAgICAgey4uLnByb3ZpZGVkLmRyYWdnYWJsZVByb3BzfVxuICAgICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICAgIHotaW5kZXg6IDEwMDAwMCAhaW1wb3J0YW50O1xuICAgICAgICAgICAgYH1cbiAgICAgICAgICA+XG4gICAgICAgICAgICA8RHJhZ2dpbmdDYXJkIGlzRHJhZ2dpbmc9e3NuYXBzaG90LmlzRHJhZ2dpbmd9PlxuICAgICAgICAgICAgICA8R3JpZFxuICAgICAgICAgICAgICAgIGdyaWRUZW1wbGF0ZUNvbHVtbnM9eycxZnIgMjBmcid9XG4gICAgICAgICAgICAgICAgZ3JpZFRlbXBsYXRlUm93cz1cImF1dG8gMWZyIGF1dG9cIlxuICAgICAgICAgICAgICAgIGdyaWRHYXA9e1xuICAgICAgICAgICAgICAgICAgc25hcHNob3QuaXNEcmFnZ2luZ1xuICAgICAgICAgICAgICAgICAgICA/IGN1c3RvbVByb3BlcnRpZXMuc3BhY2luZ1NcbiAgICAgICAgICAgICAgICAgICAgOiBjdXN0b21Qcm9wZXJ0aWVzLnNwYWNpbmdNXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgPEdyaWQuSXRlbT5cbiAgICAgICAgICAgICAgICAgIDxEcmFnSGFuZGxlIHsuLi5wcm92aWRlZC5kcmFnSGFuZGxlUHJvcHN9IC8+XG4gICAgICAgICAgICAgICAgPC9HcmlkLkl0ZW0+XG4gICAgICAgICAgICAgICAgPEdyaWQuSXRlbT57Y2hpbGRyZW59PC9HcmlkLkl0ZW0+XG4gICAgICAgICAgICAgIDwvR3JpZD5cbiAgICAgICAgICAgIDwvRHJhZ2dpbmdDYXJkPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICApO1xuXG4gICAgICAgIGlmICghc25hcHNob3QuaXNEcmFnZ2luZykge1xuICAgICAgICAgIHJldHVybiBjaGlsZDtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIHJlbmRlciB0aGUgZHJhZ2dhYmxlIGluIHRoZSBwb3J0YWwgd2hlbiBpdCdzIGJlaW5nIGRyYWdnZWRcbiAgICAgICAgcmV0dXJuIFJlYWN0RE9NLmNyZWF0ZVBvcnRhbCg8ZGl2PntjaGlsZH08L2Rpdj4sIHBvcnRhbCk7XG4gICAgICB9fVxuICAgIDwvRHJhZ2dhYmxlPlxuICApO1xufTtcblxuRHJhZ2dhYmxlV3JhcHBlci5wcm9wVHlwZXMgPSB7XG4gIGRyYWdnYWJsZUtleTogUHJvcFR5cGVzLnN0cmluZy5pc1JlcXVpcmVkLFxuICBpbmRleDogUHJvcFR5cGVzLm51bWJlci5pc1JlcXVpcmVkLFxuICBkcmFnZ2FibGVJZDogUHJvcFR5cGVzLnN0cmluZy5pc1JlcXVpcmVkLFxuICBjaGlsZHJlbjogUHJvcFR5cGVzLm5vZGUuaXNSZXF1aXJlZCxcbn07XG4iXX0= */",
7873
7862
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
7874
7863
  };
7875
7864
  const DraggableWrapper = _ref2 => {
@@ -7893,7 +7882,7 @@ const DraggableWrapper = _ref2 => {
7893
7882
  return children;
7894
7883
  }
7895
7884
  };
7896
- return jsxRuntime.jsx(reactBeautifulDnd.Draggable, {
7885
+ return jsxRuntime.jsx(dnd.Draggable, {
7897
7886
  draggableId: draggableId,
7898
7887
  index: index,
7899
7888
  children: (provided, snapshot) => {
@@ -7932,9 +7921,9 @@ function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var _
7932
7921
  const DroppableWrapper = _ref => {
7933
7922
  let children = _ref.children,
7934
7923
  onDragEnd = _ref.onDragEnd;
7935
- return jsxRuntime.jsx(reactBeautifulDnd.DragDropContext, {
7924
+ return jsxRuntime.jsx(dnd.DragDropContext, {
7936
7925
  onDragEnd: onDragEnd,
7937
- children: jsxRuntime.jsx(reactBeautifulDnd.Droppable, {
7926
+ children: jsxRuntime.jsx(dnd.Droppable, {
7938
7927
  droppableId: "droppable",
7939
7928
  children: provided => jsxRuntime.jsxs("div", _objectSpread$L(_objectSpread$L({
7940
7929
  ref: provided.innerRef
@@ -8029,7 +8018,8 @@ const CustomFieldsInternal = _ref => {
8029
8018
  touched = _useFormikContext.touched,
8030
8019
  values = _valuesInstanceProperty__default["default"](_useFormikContext),
8031
8020
  handleBlur = _useFormikContext.handleBlur,
8032
- status = _useFormikContext.status;
8021
+ status = _useFormikContext.status,
8022
+ isFormValid = _useFormikContext.isValid;
8033
8023
  const _useIntl = reactIntl.useIntl(),
8034
8024
  locale = _useIntl.locale;
8035
8025
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
@@ -8041,7 +8031,6 @@ const CustomFieldsInternal = _ref => {
8041
8031
  const isTailoringAttributesEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
8042
8032
  const isTailoringAttributeForOtherTypes = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
8043
8033
  const isTailoringFallbackEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
8044
- const didFormValidationFail = useDidFormValidationFail();
8045
8034
  const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
8046
8035
  const _useDnDContext = useDnDContext(),
8047
8036
  DroppableWrapper = _useDnDContext.DroppableWrapper,
@@ -8063,7 +8052,7 @@ const CustomFieldsInternal = _ref => {
8063
8052
 
8064
8053
  // We want to highlight fields with errors not only after a form submission,
8065
8054
  // but also after manually triggered form validation.
8066
- const hasError = Boolean(fieldErrors) && (isTouched || didFormValidationFail);
8055
+ const hasError = Boolean(fieldErrors) && (isTouched || !isFormValid);
8067
8056
  const validate = value => {
8068
8057
  if (fieldDefinition.required && isNil__default["default"](value)) return {
8069
8058
  missing: true
@@ -8768,6 +8757,146 @@ function ProductSelectionsPicker(_ref) {
8768
8757
  });
8769
8758
  }
8770
8759
 
8760
+ var messages$w = reactIntl.defineMessages({
8761
+ placeholder: {
8762
+ id: 'RecurrentIntervalPicker.placeholder',
8763
+ description: 'The placeholder of the input',
8764
+ defaultMessage: 'Not restricted to any recurrent interval'
8765
+ },
8766
+ missingOptionLabel: {
8767
+ id: 'RecurrentIntervalPicker.missingOptionLabel',
8768
+ description: 'The label of the option when the recurrent interval is not found',
8769
+ defaultMessage: 'Unknown recurrent interval ({value})'
8770
+ },
8771
+ missingSelectedWarning: {
8772
+ id: 'RecurrentIntervalPicker.missingSelectedWarning',
8773
+ description: 'The warning message shown below the input when the selected recurrent interval is not found in the options',
8774
+ defaultMessage: 'The selected recurrent interval could not be retrieved. Please check your recurrence policy configuration.'
8775
+ },
8776
+ noRecurrentIntervalsConfigured: {
8777
+ id: 'RecurrentIntervalPicker.noRecurrentIntervalsConfigured',
8778
+ description: 'Banner warning message shown when no recurrent intervals are configured in the project',
8779
+ defaultMessage: 'No recurrent intervals configured. Please check your recurrence policy configuration'
8780
+ }
8781
+ });
8782
+
8783
+ var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], 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: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 191, source: { body: "query FetchRecurrencePolicies($where: String) {\n recurrencePolicies(where: $where) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
8784
+ const isRecurringOrdersDisabledError = error => {
8785
+ var _context;
8786
+ return error.extensions?.code === '403' && _includesInstanceProperty__default["default"](_context = error.message).call(_context, "The feature 'recurring-orders' is not enabled for this project. Please contact commercetools support.");
8787
+ };
8788
+ // @TODO: Remove these error checks when the feature is enabled by default
8789
+ const useRecurrenceIntervals = _ref => {
8790
+ let where = _ref.where,
8791
+ _ref$skip = _ref.skip,
8792
+ skip = _ref$skip === void 0 ? false : _ref$skip;
8793
+ const _useQuery = client.useQuery(FetchRecurrencePolicies, {
8794
+ context: {
8795
+ target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
8796
+ },
8797
+ fetchPolicy: 'cache-and-network',
8798
+ variables: where ? {
8799
+ where
8800
+ } : undefined,
8801
+ skip
8802
+ }),
8803
+ data = _useQuery.data,
8804
+ loading = _useQuery.loading,
8805
+ rawError = _useQuery.error;
8806
+ const extractedErrors = rawError ? extractErrorFromGraphQlResponse(rawError) : [];
8807
+ const isRecurringOrdersDisabled = extractedErrors.length > 0 &&
8808
+ // If the only error is a 403 with the specific message, we assume the feature is disabled.
8809
+ _everyInstanceProperty__default["default"](extractedErrors).call(extractedErrors, isRecurringOrdersDisabledError);
8810
+ const error = isRecurringOrdersDisabled ? undefined : rawError;
8811
+ return {
8812
+ recurrencePolicies: data?.recurrencePolicies?.results ?? [],
8813
+ loading,
8814
+ error,
8815
+ isRecurringOrdersDisabled
8816
+ };
8817
+ };
8818
+
8819
+ const RecurrentIntervalPicker = _ref => {
8820
+ let name = _ref.name,
8821
+ value = _ref.value,
8822
+ onChange = _ref.onChange,
8823
+ onBlur = _ref.onBlur,
8824
+ onError = _ref.onError,
8825
+ _ref$isClearable = _ref.isClearable,
8826
+ isClearable = _ref$isClearable === void 0 ? true : _ref$isClearable,
8827
+ _ref$isDisabled = _ref.isDisabled,
8828
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
8829
+ _ref$isReadOnly = _ref.isReadOnly,
8830
+ isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly;
8831
+ const _useIntl = reactIntl.useIntl(),
8832
+ formatMessage = _useIntl.formatMessage;
8833
+ const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
8834
+ const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
8835
+ const skip = isReadOnly && !value;
8836
+ const where = isReadOnly && value ? `id="${value}"` : undefined;
8837
+ const _useRecurrenceInterva = useRecurrenceIntervals({
8838
+ where,
8839
+ skip
8840
+ }),
8841
+ recurrencePolicies = _useRecurrenceInterva.recurrencePolicies,
8842
+ loading = _useRecurrenceInterva.loading,
8843
+ error = _useRecurrenceInterva.error;
8844
+ const selectedIsMissingInData = Boolean(value) && !_someInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => policy.id === value);
8845
+ const options = React.useMemo(() => {
8846
+ if (loading) return [];
8847
+ const mapped = _mapInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => ({
8848
+ value: policy.id,
8849
+ label: formatLocalizedFieldToString(policy.nameAllLocales, policy.key)
8850
+ }));
8851
+
8852
+ // If the selected value cannot be loaded, add it as a missing option
8853
+ if (selectedIsMissingInData && value) {
8854
+ const label = formatMessage(messages$w.missingOptionLabel, {
8855
+ value
8856
+ });
8857
+ return [{
8858
+ value,
8859
+ label
8860
+ }, ...mapped];
8861
+ }
8862
+ return mapped;
8863
+ }, [recurrencePolicies, selectedIsMissingInData, value, dataLocale, formatMessage, formatLocalizedFieldToString, loading]);
8864
+ const noRecurrentIntervalsConfigured = !loading && recurrencePolicies.length === 0;
8865
+ React.useEffect(() => {
8866
+ if (error && onError) {
8867
+ onError(error);
8868
+ }
8869
+ }, [error, onError]);
8870
+ return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
8871
+ scale: "s",
8872
+ children: [jsxRuntime.jsx(uiKit.SelectInput, {
8873
+ id: name,
8874
+ name: name,
8875
+ value: value,
8876
+ placeholder: messages$w.placeholder.defaultMessage,
8877
+ options: options,
8878
+ isClearable: isClearable,
8879
+ isReadOnly: isReadOnly,
8880
+ isDisabled: isDisabled || loading || noRecurrentIntervalsConfigured,
8881
+ onChange: onChange,
8882
+ onBlur: onBlur,
8883
+ hasError: !loading && !error && selectedIsMissingInData
8884
+ }), error ? jsxRuntime.jsx(uiKit.Text.Body, {
8885
+ tone: "negative",
8886
+ intlMessage: commonPickerMessages.loadingErrorMessage
8887
+ }) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
8888
+ tone: "negative",
8889
+ intlMessage: messages$w.missingSelectedWarning
8890
+ }) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
8891
+ type: "warning",
8892
+ children: jsxRuntime.jsx(uiKit.Text.Detail, {
8893
+ intlMessage: messages$w.noRecurrentIntervalsConfigured
8894
+ })
8895
+ })]
8896
+ });
8897
+ };
8898
+ var RecurrentIntervalPicker$1 = RecurrentIntervalPicker;
8899
+
8771
8900
  // NOTE: this component is duplicated in `app-shell/from-core`.
8772
8901
  var styles$b = {
8773
8902
  "colored": "required-indicator-module__colored____YUFm",
@@ -8924,9 +9053,6 @@ var messages$u = reactIntl.defineMessages({
8924
9053
  }
8925
9054
  });
8926
9055
 
8927
- const LOWER_STORES_LIMIT = 60;
8928
- const UPPER_STORES_LIMIT = 500;
8929
-
8930
9056
  // map store to options
8931
9057
  const mapStoresToOptions = _ref => {
8932
9058
  var _context, _context2;
@@ -10907,9 +11033,9 @@ const createQueryVariables = platformLimit => _reduceInstanceProperty__default["
10907
11033
  }, previousIncludedLimits), {});
10908
11034
  var createPlatformLimitsQueryVariables = createQueryVariables;
10909
11035
 
10910
- var PlatformLimitsFetcherQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2107, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
11036
+ var PlatformLimitsFetcherQuery$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxGroupsPerCustomer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2158, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n maxGroupsPerCustomer {\n limit\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
10911
11037
  const usePlatformLimitsFetcher = platformLimit => {
10912
- const _useQuery = react.useQuery(PlatformLimitsFetcherQuery, {
11038
+ const _useQuery = react.useQuery(PlatformLimitsFetcherQuery$1, {
10913
11039
  variables: createPlatformLimitsQueryVariables(platformLimit),
10914
11040
  context: {
10915
11041
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
@@ -10930,6 +11056,8 @@ const usePlatformLimitsFetcher = platformLimit => {
10930
11056
  };
10931
11057
  var usePlatformLimitsFetcher$1 = usePlatformLimitsFetcher;
10932
11058
 
11059
+ var PlatformLimitsFetcherQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxGroupsPerCustomer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2158, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n maxGroupsPerCustomer {\n limit\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
11060
+
10933
11061
  const useLimitsModalState = function () {
10934
11062
  let isInitiallyOpen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
10935
11063
  const _useState = React.useState(isInitiallyOpen),
@@ -11056,7 +11184,7 @@ const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
11056
11184
  isExternal: true,
11057
11185
  to: constants.SUPPORT_PORTAL_URL,
11058
11186
  children: msg
11059
- });
11187
+ }, `msg-${msg}`);
11060
11188
  const PlatformLimitWarningNotification = _ref => {
11061
11189
  let resource = _ref.resource,
11062
11190
  limit = _ref.limit;
@@ -11894,11 +12022,13 @@ var CustomersCombined = PlatformLimitsCustomersCombined;
11894
12022
 
11895
12023
  const useCustomersPlatformLimits = () => {
11896
12024
  const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
12025
+ platformLimits = _useCustomersPlatform.platformLimits,
11897
12026
  refetch = _useCustomersPlatform.refetch;
11898
12027
  const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
11899
12028
  hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
11900
12029
  hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
11901
12030
  const interceptNavigation = useInterceptNavigation$1(hasReachedCustomersErrorLimit);
12031
+ const maxGroupsPerCustomerLimit = platformLimits?.customers?.maxGroupsPerCustomer?.limit;
11902
12032
  return {
11903
12033
  CustomersLimits: {
11904
12034
  Notifications: CustomersNotification,
@@ -11908,6 +12038,7 @@ const useCustomersPlatformLimits = () => {
11908
12038
  ErrorModal: CustomersErrorModal
11909
12039
  },
11910
12040
  refetchCustomersPlatformLimits: refetch,
12041
+ maxGroupsPerCustomerLimit,
11911
12042
  interceptNavigation,
11912
12043
  status: {
11913
12044
  hasReachedCustomersWarningLimit,
@@ -11932,6 +12063,38 @@ const injectCustomersPlatformLimits = () => WrappedComponent => {
11932
12063
  };
11933
12064
  var injectCustomersPlatformLimits$1 = injectCustomersPlatformLimits;
11934
12065
 
12066
+ const useBusinessUnitsPlatformLimitsFetcher = () => {
12067
+ const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.businessUnits),
12068
+ isLoading = _usePlatformLimitsFet.isLoading,
12069
+ error = _usePlatformLimitsFet.error,
12070
+ platformLimits = _usePlatformLimitsFet.platformLimits,
12071
+ refetch = _usePlatformLimitsFet.refetch;
12072
+ const formattedPlatformLimits = {
12073
+ businessUnitsMaxDivisionsLimit: platformLimits.businessUnits?.maxDivisions.limit,
12074
+ businessUnitsMaxDepthLimit: platformLimits.businessUnits?.maxDepthLimit.limit,
12075
+ businessUnitsMaxAssociatesLimit: platformLimits.businessUnits?.maxAssociates.limit,
12076
+ businessUnitsMaxAssociateRolesLimit: platformLimits.businessUnits?.maxAssociateRoles.limit
12077
+ };
12078
+ return {
12079
+ isLoading,
12080
+ error,
12081
+ platformLimits: formattedPlatformLimits,
12082
+ refetch
12083
+ };
12084
+ };
12085
+ var useBusinessUnitsPlatformLimitsFetcher$1 = useBusinessUnitsPlatformLimitsFetcher;
12086
+
12087
+ const useBusinessUnitsLimits = () => {
12088
+ const _useBusinessUnitsPlat = useBusinessUnitsPlatformLimitsFetcher$1(),
12089
+ refetch = _useBusinessUnitsPlat.refetch,
12090
+ platformLimits = _useBusinessUnitsPlat.platformLimits;
12091
+ return {
12092
+ BusinessUnitsLimits: platformLimits,
12093
+ refetchBusinessUnitsPlatformLimits: refetch
12094
+ };
12095
+ };
12096
+ var useBusinessUnitsLimits$1 = useBusinessUnitsLimits;
12097
+
11935
12098
  const useCustomerGroupsPlatformLimitsFetcher = () => {
11936
12099
  const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
11937
12100
  isLoading = _usePlatformLimitsFet.isLoading,
@@ -12279,6 +12442,72 @@ const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
12279
12442
  };
12280
12443
  var injectCustomerGroupsPlatformLimits$1 = injectCustomerGroupsPlatformLimits;
12281
12444
 
12445
+ const useStoresPlatformLimitsFetcher = () => {
12446
+ const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.stores),
12447
+ isLoading = _usePlatformLimitsFet.isLoading,
12448
+ error = _usePlatformLimitsFet.error,
12449
+ platformLimits = _usePlatformLimitsFet.platformLimits,
12450
+ refetch = _usePlatformLimitsFet.refetch;
12451
+ const formattedPlatformLimits = {
12452
+ total: platformLimits.stores?.total.limit,
12453
+ storeLimit: platformLimits.stores?.total.limit,
12454
+ storeCurrent: platformLimits.stores?.total.current,
12455
+ inventorySupplyChannels: platformLimits.stores?.inventorySupplyChannels.limit,
12456
+ productDistributionChannels: platformLimits.stores?.productDistributionChannels.limit
12457
+ };
12458
+ return {
12459
+ isLoading,
12460
+ error,
12461
+ platformLimits: formattedPlatformLimits,
12462
+ refetch
12463
+ };
12464
+ };
12465
+ var useStoresPlatformLimitsFetcher$1 = useStoresPlatformLimitsFetcher;
12466
+
12467
+ const useStoresPlatformLimits = () => {
12468
+ const _useStoresPlatformLim = useStoresPlatformLimitsFetcher$1(),
12469
+ platformLimits = _useStoresPlatformLim.platformLimits;
12470
+ if (!platformLimits?.total) {
12471
+ return {
12472
+ hasReachedStoresWarningLimit: false,
12473
+ hasReachedStoresErrorLimit: false
12474
+ };
12475
+ }
12476
+ const storeLimit = platformLimits.storeLimit,
12477
+ storeCurrent = platformLimits.storeCurrent;
12478
+ const hasReachedStoresWarningLimit = getHasExceededWarningThreshold({
12479
+ limit: storeLimit,
12480
+ current: storeCurrent
12481
+ });
12482
+ const hasReachedStoresErrorLimit = getHasExceededLimit({
12483
+ limit: storeLimit,
12484
+ current: storeCurrent
12485
+ });
12486
+ return {
12487
+ hasReachedStoresWarningLimit,
12488
+ hasReachedStoresErrorLimit
12489
+ };
12490
+ };
12491
+ var useStoresPlatformLimitsStatus = useStoresPlatformLimits;
12492
+
12493
+ const useStoresLimits = () => {
12494
+ const _useStoresPlatformLim = useStoresPlatformLimitsFetcher$1(),
12495
+ refetch = _useStoresPlatformLim.refetch,
12496
+ platformLimits = _useStoresPlatformLim.platformLimits;
12497
+ const _useStoresPlatformLim2 = useStoresPlatformLimitsStatus(),
12498
+ hasReachedStoresWarningLimit = _useStoresPlatformLim2.hasReachedStoresWarningLimit,
12499
+ hasReachedStoresErrorLimit = _useStoresPlatformLim2.hasReachedStoresErrorLimit;
12500
+ return {
12501
+ StoreLimits: platformLimits,
12502
+ refetchStoresPlatformLimits: refetch,
12503
+ status: {
12504
+ hasReachedStoresWarningLimit,
12505
+ hasReachedStoresErrorLimit
12506
+ }
12507
+ };
12508
+ };
12509
+ var useStoresLimits$1 = useStoresLimits;
12510
+
12282
12511
  var messages$c = reactIntl.defineMessages({
12283
12512
  yes: {
12284
12513
  id: 'BooleanField.yes',
@@ -13720,6 +13949,9 @@ function resolveStatusType(product) {
13720
13949
  if (published && !hasStagedChanges) return PRODUCT_STATUSES.PUBLISHED;
13721
13950
  return PRODUCT_STATUSES.UNPUBLISHED;
13722
13951
  }
13952
+ function getStampToneByPublishState(statusCode) {
13953
+ if (statusCode === PRODUCT_STATUSES.UNPUBLISHED) return 'secondary';else if (statusCode === PRODUCT_STATUSES.PUBLISHED) return 'positive';else if (statusCode === PRODUCT_STATUSES.MODIFIED) return 'warning';
13954
+ }
13723
13955
  const computedProperties = {
13724
13956
  // TODO: show relative time as tooltip
13725
13957
  // `intl.formatRelative(<DATETIME>)`
@@ -13962,11 +14194,6 @@ function slugify(text) {
13962
14194
  .replace(/-+$/, ''); // Trim - from end of text
13963
14195
  }
13964
14196
 
13965
- const contextProjects = ['context-medium-data-playground', 'context-demo-data-project-1', 'context-demo-data-project-10', 'context-demo-data-project-11', 'context-demo-data-project-12', 'context-demo-data-project-8', 'context-demo-data-project-13', 'context-demo-data-project-9', 'context-demo-data-project-14', 'context-demo-data-project-15', 'context-big-data-playground', 'context-without-stores', 'context-playground', 'context-small-data-playground'];
13966
- const isStoreDataFenceProductSelection = projectKey => {
13967
- return _includesInstanceProperty__default["default"](contextProjects).call(contextProjects, projectKey);
13968
- };
13969
-
13970
14197
  function swapArrayItems(array, from, to) {
13971
14198
  const result = [...array];
13972
14199
  result[to] = array[from];
@@ -14048,6 +14275,7 @@ var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kin
14048
14275
 
14049
14276
  exports.BooleanField = booleanField;
14050
14277
  exports.Button = Button$1;
14278
+ exports.CUSTOM_FIELD_TYPES = CUSTOM_FIELD_TYPES;
14051
14279
  exports.CartDiscountReferenceSearch = CartDiscountReferenceSearch;
14052
14280
  exports.CategoryReferenceSearch = CategoryReferenceSearch;
14053
14281
  exports.CategorySearchPickerOptionFragment = CategorySearchPickerOptionFragment;
@@ -14055,6 +14283,7 @@ exports.CenteredLoadingSpinner = CenteredLoadingSpinner$1;
14055
14283
  exports.ChannelPickerInput = ChannelPickerInput$1;
14056
14284
  exports.CountriesPicker = CountriesPicker;
14057
14285
  exports.CustomFieldDefinitionsConnector = customFieldDefinitionsConnector;
14286
+ exports.CustomFieldInput = CustomFieldInput$1;
14058
14287
  exports.CustomFieldTooltip = CustomFieldTooltip$1;
14059
14288
  exports.CustomFieldTypeDefinitionsConnector = CustomFieldTypeDefinitionsConnector$1;
14060
14289
  exports.CustomFields = CustomFields$1;
@@ -14067,6 +14296,7 @@ exports.EMAIL_REGEX = EMAIL_REGEX;
14067
14296
  exports.FileInput = FileInput$1;
14068
14297
  exports.FormattedDateTime = FormattedDateTime$1;
14069
14298
  exports.FormattedLocalizedString = FormattedLocalizedString;
14299
+ exports.LOWER_STORES_LIMIT = LOWER_STORES_LIMIT;
14070
14300
  exports.LabelRange = LabelRange$1;
14071
14301
  exports.MC_RESOURCES_WITH_KEYS = MC_RESOURCES_WITH_KEYS;
14072
14302
  exports.MissingValueField = MissingValueField$1;
@@ -14075,11 +14305,15 @@ exports.NumericFormatInput = numericFormatInput;
14075
14305
  exports.Option = Option$2;
14076
14306
  exports.PRECISION_TYPES = PRECISION_TYPES;
14077
14307
  exports.PimIndexerProvider = pimIndexerProvider;
14308
+ exports.PlatformLimitsFetcherQuery = PlatformLimitsFetcherQuery;
14078
14309
  exports.ProductAttributeInput = ProductAttributeInput;
14079
14310
  exports.ProductAttributes = ProductAttributes;
14080
14311
  exports.ProductPickerInput = ProductPickerInput$1;
14081
14312
  exports.ProductSelectionPicker = ProductSelectionsPicker;
14082
14313
  exports.QUERY_LIMIT = QUERY_LIMIT;
14314
+ exports.QUERY_MAX_LIMIT = QUERY_MAX_LIMIT;
14315
+ exports.RESOURCES_WITH_PLATFORM_LIMITS = RESOURCES_WITH_PLATFORM_LIMITS;
14316
+ exports.RecurrentIntervalPicker = RecurrentIntervalPicker$1;
14083
14317
  exports.RequestCache = RequestCache$1;
14084
14318
  exports.RequiredIndicator = RequiredIndicator$1;
14085
14319
  exports.ScrollToFieldError = ScrollToFieldError$1;
@@ -14088,12 +14322,14 @@ exports.SelectableFieldSearchInput = SelectableFieldSearchInput$1;
14088
14322
  exports.StoreSelectField = StoreSelectField$1;
14089
14323
  exports.StoreSelectInput = StoreSelectInput$1;
14090
14324
  exports.ThrottledField = ThrottledField$1;
14325
+ exports.UPPER_STORES_LIMIT = UPPER_STORES_LIMIT;
14091
14326
  exports.VALIDATOR_INTEGER = VALIDATOR_INTEGER;
14092
14327
  exports.VALIDATOR_NUMERIC = VALIDATOR_NUMERIC;
14093
14328
  exports.VALIDATOR_REQUIRED = VALIDATOR_REQUIRED;
14094
14329
  exports.WithPimIndexer = WithPimIndexer$1;
14095
14330
  exports.allowedProperties = allowedProperties;
14096
14331
  exports.and = and;
14332
+ exports.attributeToCustomField = attributeToCustomField;
14097
14333
  exports.attributesMapToNameValuePairs = attributesMapToNameValuePairs;
14098
14334
  exports.base64ToString = base64ToString;
14099
14335
  exports.booleanMessages = messages$c;
@@ -14111,6 +14347,7 @@ exports.convertProductSelectionFromGraphQl = convertProductSelectionFromGraphQl;
14111
14347
  exports.convertRatioToPercentage = convertRatioToPercentage;
14112
14348
  exports.createGraphQlUpdateActions = createGraphQlUpdateActions;
14113
14349
  exports.createNextSortDefinition = createNextSortDefinition$1;
14350
+ exports.createPlatformLimitsQueryVariables = createPlatformLimitsQueryVariables;
14114
14351
  exports.createReducer = createReducer;
14115
14352
  exports.createResourceReducer = createResourceReducer;
14116
14353
  exports.customFieldsTransformer = customFields;
@@ -14150,6 +14387,7 @@ exports.getPrefixSearchBounds = getPrefixSearchBounds$1;
14150
14387
  exports.getPriceChannelName = getPriceChannelName;
14151
14388
  exports.getReferenceTypeId = getReferenceTypeId;
14152
14389
  exports.getSelectedPrice = getSelectedPrice;
14390
+ exports.getStampToneByPublishState = getStampToneByPublishState;
14153
14391
  exports.getTimeZoneId = getTimeZoneId;
14154
14392
  exports.getTimeZoneLabel = getTimeZoneLabel;
14155
14393
  exports.getTypeNameOfType = getTypeNameOfType;
@@ -14176,12 +14414,12 @@ exports.injectToggleState = injectModalState$1;
14176
14414
  exports.injectZonesPlatformLimits = injectZonesPlatformLimits$1;
14177
14415
  exports.isEmpty = isEmptyFilter;
14178
14416
  exports.isEmptyValue = isEmptyValue;
14179
- exports.isStoreDataFenceProductSelection = isStoreDataFenceProductSelection;
14180
14417
  exports.isUUID = isUUID$1;
14181
14418
  exports.isValidISODate = isValidISODate;
14182
14419
  exports.isValidISODateTime = isValidISODateTime;
14183
14420
  exports.isValidISOTime = isValidISOTime;
14184
14421
  exports.keepDisplayName = keepDisplayName$1;
14422
+ exports.mapShippingRateTierToGraphQL = mapShippingRateTierToGraphQL;
14185
14423
  exports.mapStoresToOptions = mapStoresToOptions;
14186
14424
  exports.mapTimeZonesToOptions = mapTimeZonesToOptions;
14187
14425
  exports.minusify = minusify;
@@ -14192,14 +14430,14 @@ exports.not = not;
14192
14430
  exports.omitDeep = omitDeep;
14193
14431
  exports.omitSetsOfSets = omitSetsOfSets;
14194
14432
  exports.or = or;
14195
- exports.pickerMessages = pickerMessages$1;
14433
+ exports.pickerMessages = commonPickerMessages;
14196
14434
  exports.range = range;
14197
14435
  exports.reorderArrayItems = reorderArrayItems;
14198
14436
  exports.resolveStatusType = resolveStatusType;
14199
14437
  exports.safelyAddFallback = safelyAddFallback;
14200
14438
  exports.sanitize = sanitize;
14201
14439
  exports.searchCategories = searchCategories;
14202
- exports.searchInputMessages = messages$N;
14440
+ exports.searchInputMessages = messages$O;
14203
14441
  exports.setDisplayName = setDisplayName$1;
14204
14442
  exports.setToArray = setToArray;
14205
14443
  exports.shallowEqual = shallowEqual;
@@ -14216,6 +14454,7 @@ exports.transformLocalizedFieldsForCategory = transformLocalizedFieldsForCategor
14216
14454
  exports.truncate = truncate;
14217
14455
  exports.unique = unique;
14218
14456
  exports.uniqueObjects = uniqueObjects;
14457
+ exports.useBusinessUnitsPlatformLimits = useBusinessUnitsLimits$1;
14219
14458
  exports.useCachedCategoryOptions = useCachedCategoryOptions;
14220
14459
  exports.useCurrentOption = useCurrentOption;
14221
14460
  exports.useCustomFieldsDnDContext = useDnDContext;
@@ -14233,11 +14472,13 @@ exports.usePimIndexer = usePimIndexer;
14233
14472
  exports.usePrevious = usePrevious$1;
14234
14473
  exports.useProductSelectionsFetcher = useProductSelectionsFetcher$1;
14235
14474
  exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1;
14475
+ exports.useRecurrenceIntervals = useRecurrenceIntervals;
14236
14476
  exports.useRoleNotificationEffect = useRoleNotificationEffect$1;
14237
14477
  exports.useShippingMethodsPlatformLimits = useShippingMethodsPlatformLimits;
14238
14478
  exports.useStorage = useStorage$1;
14239
14479
  exports.useStoreKeysInDataFences = useStoreKeysInDataFences$1;
14240
14480
  exports.useStoresListFetcher = useStoresListFetcher$1;
14481
+ exports.useStoresPlatformLimits = useStoresLimits$1;
14241
14482
  exports.useTaxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits;
14242
14483
  exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1;
14243
14484
  exports.validateCustomField = validateFilter$2;