@commercetools-frontend/experimental-components 6.4.6 → 7.1.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 +1607 -1167
  2. package/dist/commercetools-frontend-experimental-components.cjs.prod.js +1584 -1155
  3. package/dist/commercetools-frontend-experimental-components.esm.js +1587 -1163
  4. package/dist/declarations/src/components/carousel/carousel.d.ts +28 -0
  5. package/dist/declarations/src/components/carousel/index.d.ts +2 -0
  6. package/dist/declarations/src/components/channel-picker-input/channel-picker-input.d.ts +3 -3
  7. package/dist/declarations/src/components/divider/divider.d.ts +2 -2
  8. package/dist/declarations/src/components/formatted-date-time/formatted-date-time.d.ts +0 -1
  9. package/dist/declarations/src/components/recurrent-interval-picker/index.d.ts +2 -0
  10. package/dist/declarations/src/components/recurrent-interval-picker/recurrent-interval-picker.d.ts +13 -0
  11. package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/index.d.ts +1 -0
  12. package/dist/declarations/src/{hooks → components/recurrent-interval-picker}/use-recurrence-intervals/use-recurrence-intervals.d.ts +6 -1
  13. package/dist/declarations/src/components/store-select-input/constants.d.ts +2 -0
  14. package/dist/declarations/src/components/validated-input/validated-input.d.ts +7 -38
  15. package/dist/declarations/src/constants/index.d.ts +1 -0
  16. package/dist/declarations/src/custom-fields/custom-field-definitions-connector/custom-field-definitions-connector.d.ts +0 -1
  17. package/dist/declarations/src/custom-fields/custom-field-type-definitions-connector/custom-field-type-definitions-connector.d.ts +0 -1
  18. package/dist/declarations/src/custom-fields/custom-fields/constants.d.ts +36 -0
  19. package/dist/declarations/src/custom-fields/custom-fields/custom-field-input.d.ts +2 -0
  20. package/dist/declarations/src/custom-fields/custom-fields/index.d.ts +2 -1
  21. package/dist/declarations/src/features/picker/shared/hooks/use-load-options.d.ts +1 -1
  22. package/dist/declarations/src/features/picker/shared/hooks/use-product-type-options.d.ts +2 -2
  23. package/dist/declarations/src/features/pim-indexer/components/pim-indexer-provider/pim-indexer-provider.d.ts +0 -1
  24. package/dist/declarations/src/features/pim-indexer/components/with-pim-indexer/with-pim-indexer.d.ts +0 -1
  25. package/dist/declarations/src/features/platform-limits/business-units/hooks/index.d.ts +2 -0
  26. package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits/index.d.ts +1 -0
  27. package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits/use-business-units-platform-limits.d.ts +10 -0
  28. package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits-fetcher/index.d.ts +1 -0
  29. 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
  30. package/dist/declarations/src/features/platform-limits/business-units/index.d.ts +1 -0
  31. package/dist/declarations/src/features/platform-limits/customer-groups/hooks/use-customer-groups-platform-limits/use-customer-groups-platform-limits.d.ts +1 -1
  32. 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
  33. package/dist/declarations/src/features/platform-limits/customers/hooks/use-customers-platform-limits/use-customers-platform-limits.d.ts +2 -1
  34. package/dist/declarations/src/features/platform-limits/customers/hooks/use-customers-platform-limits-fetcher/use-customers-platform-limits-fetcher.d.ts +1 -1
  35. package/dist/declarations/src/features/platform-limits/index.d.ts +3 -0
  36. package/dist/declarations/src/features/platform-limits/shared/components/index.d.ts +2 -0
  37. package/dist/declarations/src/features/platform-limits/shared/components/notifications/error/error.d.ts +12 -0
  38. package/dist/declarations/src/features/platform-limits/shared/components/notifications/error/index.d.ts +1 -0
  39. package/dist/declarations/src/features/platform-limits/shared/components/notifications/index.d.ts +1 -0
  40. package/dist/declarations/src/features/platform-limits/shared/components/notifications/notifications.d.ts +7 -0
  41. package/dist/declarations/src/features/platform-limits/shared/components/notifications/warning/index.d.ts +1 -0
  42. package/dist/declarations/src/features/platform-limits/shared/components/notifications/warning/warning.d.ts +12 -0
  43. package/dist/declarations/src/features/platform-limits/shared/components/status-text/index.d.ts +1 -0
  44. package/dist/declarations/src/features/platform-limits/shared/components/status-text/status-text.d.ts +12 -0
  45. package/dist/declarations/src/features/platform-limits/shared/constants.d.ts +13 -0
  46. package/dist/declarations/src/features/platform-limits/shared/hooks/index.d.ts +3 -0
  47. package/dist/declarations/src/features/platform-limits/shared/hooks/use-intercept-navigation/index.d.ts +1 -0
  48. package/dist/declarations/src/features/platform-limits/shared/hooks/use-intercept-navigation/use-intercept-navigation.d.ts +7 -0
  49. package/dist/declarations/src/features/platform-limits/shared/hooks/use-limits-modal-state/index.d.ts +1 -0
  50. package/dist/declarations/src/features/platform-limits/shared/hooks/use-limits-modal-state/use-limits-modal-state.d.ts +6 -0
  51. package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/index.d.ts +3 -0
  52. package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/platform-limits-query-variables.d.ts +2 -0
  53. package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/use-platform-limits-fetcher.d.ts +7 -0
  54. package/dist/declarations/src/features/platform-limits/shared/index.d.ts +4 -0
  55. package/dist/declarations/src/features/platform-limits/shared/utils/index.d.ts +1 -0
  56. package/dist/declarations/src/features/platform-limits/shared/utils/utils.d.ts +14 -0
  57. package/dist/declarations/src/features/platform-limits/shipping-methods/hooks/use-shipping-methods-platform-limits/use-shipping-methods-platform-limits.d.ts +1 -1
  58. 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
  59. package/dist/declarations/src/features/platform-limits/stores/hooks/index.d.ts +3 -0
  60. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits/index.d.ts +1 -0
  61. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits/use-store-platform-limits.d.ts +15 -0
  62. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-fetcher/index.d.ts +1 -0
  63. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-fetcher/use-store-platform-limits-fetcher.d.ts +13 -0
  64. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-status/index.d.ts +1 -0
  65. package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-status/use-store-platform-limits-status.d.ts +5 -0
  66. package/dist/declarations/src/features/platform-limits/stores/index.d.ts +1 -0
  67. package/dist/declarations/src/features/platform-limits/tax-categories/hooks/use-tax-categories-platform-limits/use-tax-categories-platform-limits.d.ts +1 -1
  68. 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
  69. package/dist/declarations/src/features/platform-limits/zones/hooks/use-zones-platform-limits/use-zones-platform-limits.d.ts +1 -1
  70. package/dist/declarations/src/features/platform-limits/zones/hooks/use-zones-platform-limits-fetcher/use-zones-platform-limits-fetcher.d.ts +1 -1
  71. package/dist/declarations/src/fields/numeric-format-input/numeric-format-input.d.ts +0 -1
  72. package/dist/declarations/src/fields/search-input/search-input.d.ts +0 -1
  73. package/dist/declarations/src/fields/throttled-field/throttled-field.d.ts +0 -1
  74. package/dist/declarations/src/hooks/index.d.ts +0 -2
  75. package/dist/declarations/src/hooks/use-persisted-reminder/use-persisted-reminder.d.ts +1 -1
  76. package/dist/declarations/src/hooks/use-previous/use-previous.d.ts +1 -1
  77. package/dist/declarations/src/hooks/use-product-selections-fetcher/use-product-selections-fetcher.d.ts +1 -6
  78. package/dist/declarations/src/hooks/use-stores-list-fetcher/use-stores-list-fetcher.d.ts +1 -8
  79. package/dist/declarations/src/index.d.ts +11 -8
  80. package/dist/declarations/src/utils/type-definitions/type-definitions.d.ts +1 -1
  81. package/dist/styles.css +88 -88
  82. package/package.json +26 -28
  83. package/dist/declarations/src/hooks/use-did-form-validation-fail/index.d.ts +0 -1
  84. package/dist/declarations/src/hooks/use-did-form-validation-fail/use-did-form-validation-fail.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');
@@ -108,6 +108,8 @@ var _Date$now = require('@babel/runtime-corejs3/core-js-stable/date/now');
108
108
  var _spliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/splice');
109
109
  var memoize = require('memoize-one');
110
110
  var omitEmpty = require('omit-empty-es');
111
+ var shuffle = require('lodash/shuffle');
112
+ var reactSnapCarousel = require('react-snap-carousel');
111
113
  var hoc = require('@apollo/client/react/hoc');
112
114
  var flatten = require('lodash/flatten');
113
115
  var uniqBy = require('lodash/uniqBy');
@@ -208,6 +210,7 @@ var _Date$now__default = /*#__PURE__*/_interopDefault(_Date$now);
208
210
  var _spliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_spliceInstanceProperty);
209
211
  var memoize__default = /*#__PURE__*/_interopDefault(memoize);
210
212
  var omitEmpty__default = /*#__PURE__*/_interopDefault(omitEmpty);
213
+ var shuffle__default = /*#__PURE__*/_interopDefault(shuffle);
211
214
  var flatten__default = /*#__PURE__*/_interopDefault(flatten);
212
215
  var uniqBy__default = /*#__PURE__*/_interopDefault(uniqBy);
213
216
  var invariant__default = /*#__PURE__*/_interopDefault(invariant);
@@ -229,6 +232,9 @@ const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
229
232
  CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
230
233
  var CenteredLoadingSpinner$1 = CenteredLoadingSpinner;
231
234
 
235
+ const LOWER_STORES_LIMIT = 60;
236
+ const UPPER_STORES_LIMIT = 500;
237
+
232
238
  const QUERY_MAX_LIMIT = 500;
233
239
  const SHOW_TOOLTIP_CHARS_COUNT = 40;
234
240
  const SEARCHABLE_REFERENCES = {
@@ -272,7 +278,7 @@ const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAtt
272
278
  // TODO: apply a more robust solution to overlaying issues
273
279
  const Z_INDEX_DROPDOWN = 30000;
274
280
 
275
- var pickerMessages$1 = reactIntl.defineMessages({
281
+ var commonPickerMessages = reactIntl.defineMessages({
276
282
  loadingErrorMessage: {
277
283
  id: 'Pickers.loadingErrorMessage',
278
284
  description: 'Message shown to used when picker fails to load data from server.',
@@ -285,7 +291,7 @@ var pickerMessages$1 = reactIntl.defineMessages({
285
291
  }
286
292
  });
287
293
 
288
- var messages$R = reactIntl.defineMessages({
294
+ var messages$S = reactIntl.defineMessages({
289
295
  noChannelsFound: {
290
296
  id: 'Products.ChannelPickerInput.noChannelsFound',
291
297
  description: 'The message to display when no channels were found',
@@ -298,8 +304,8 @@ var messages$R = reactIntl.defineMessages({
298
304
  }
299
305
  });
300
306
 
301
- function ownKeys$1r(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; }
302
- function _objectSpread$1r(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1r(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1r(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
307
+ function ownKeys$1t(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; }
308
+ function _objectSpread$1t(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1t(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1t(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
303
309
  var GetChannelsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "ListValue", values: [{ kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, { kind: "StringValue", value: "key", block: false }] } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "60" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, 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: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
304
310
  var GetChannelQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channel" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, 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: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
305
311
  var PickerInputChannel = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, 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: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
@@ -307,16 +313,19 @@ const getRolesClause = roles => roles && roles.length > 0 ? `roles contains any
307
313
  const ChannelPickerInput = _ref => {
308
314
  let isClearable = _ref.isClearable,
309
315
  isDisabled = _ref.isDisabled,
310
- isReadOnly = _ref.isReadOnly,
316
+ _ref$isReadOnly = _ref.isReadOnly,
317
+ isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
311
318
  onChange = _ref.onChange,
312
319
  name = _ref.name,
313
320
  onBlur = _ref.onBlur,
314
321
  value = _ref.value,
315
322
  hasError = _ref.hasError,
316
- onError = _ref.onError,
323
+ _ref$onError = _ref.onError,
324
+ onError = _ref$onError === void 0 ? null : _ref$onError,
317
325
  placeholder = _ref.placeholder,
318
326
  roles = _ref.roles,
319
- hasWarning = _ref.hasWarning,
327
+ _ref$hasWarning = _ref.hasWarning,
328
+ hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
320
329
  _ref$isMulti = _ref.isMulti,
321
330
  isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti;
322
331
  const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
@@ -325,7 +334,7 @@ const ChannelPickerInput = _ref => {
325
334
  const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
326
335
  const variables = React.useMemo(() => {
327
336
  const rolesClause = getRolesClause(roles);
328
- return _objectSpread$1r({
337
+ return _objectSpread$1t({
329
338
  sortByNamePath: `name.${dataLocale}`
330
339
  }, rolesClause && {
331
340
  extraWhere: rolesClause
@@ -400,7 +409,7 @@ const ChannelPickerInput = _ref => {
400
409
  if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
401
410
  }, [isCurrentOptionLoadingFailed, onError, currentOptions]);
402
411
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
403
- const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$R.noChannelsFound), [loadingError, formatMessage]);
412
+ const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$S.noChannelsFound), [loadingError, formatMessage]);
404
413
  const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
405
414
  const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
406
415
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
@@ -412,7 +421,7 @@ const ChannelPickerInput = _ref => {
412
421
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
413
422
  id: name,
414
423
  name: name,
415
- placeholder: placeholder ?? formatMessage(messages$R.placeholder),
424
+ placeholder: placeholder ?? formatMessage(messages$S.placeholder),
416
425
  loadOptions: loadOptionsDebounced,
417
426
  defaultOptions: true,
418
427
  showOptionGroupDivider: true,
@@ -435,7 +444,7 @@ const ChannelPickerInput = _ref => {
435
444
  })
436
445
  }), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
437
446
  tone: "negative",
438
- intlMessage: pickerMessages$1.loadingErrorMessage
447
+ intlMessage: commonPickerMessages.loadingErrorMessage
439
448
  })]
440
449
  })
441
450
  });
@@ -469,7 +478,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
469
478
  FormattedDateTime.displayName = 'FormattedDateTime';
470
479
  var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
471
480
 
472
- var messages$Q = reactIntl.defineMessages({
481
+ var messages$R = reactIntl.defineMessages({
473
482
  noProductTypesFound: {
474
483
  id: 'Products.ProductTypePickerInput.noProductTypesFound',
475
484
  description: 'The message to display when no product types were found',
@@ -558,7 +567,7 @@ const ProductTypePickerInput = _ref => {
558
567
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
559
568
  id: name,
560
569
  name: name,
561
- placeholder: formatMessage(messages$Q.placeholder),
570
+ placeholder: formatMessage(messages$R.placeholder),
562
571
  loadOptions: loadOptionsDebounced,
563
572
  defaultOptions: [],
564
573
  isClearable: isClearable,
@@ -571,7 +580,7 @@ const ProductTypePickerInput = _ref => {
571
580
  onInputChange: handleInputChange,
572
581
  onBlur: onBlur,
573
582
  value: currentOption.data,
574
- noOptionsMessage: () => loadingError ? null : formatMessage(messages$Q.noProductTypesFound),
583
+ noOptionsMessage: () => loadingError ? null : formatMessage(messages$R.noProductTypesFound),
575
584
  hasError: hasError || isLoadingFailed,
576
585
  menuPortalZIndex: Z_INDEX_DROPDOWN,
577
586
  menuPortalTarget: document.body,
@@ -579,7 +588,7 @@ const ProductTypePickerInput = _ref => {
579
588
  })
580
589
  }), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
581
590
  tone: "negative",
582
- intlMessage: pickerMessages$1.loadingErrorMessage
591
+ intlMessage: commonPickerMessages.loadingErrorMessage
583
592
  })]
584
593
  })
585
594
  });
@@ -587,7 +596,7 @@ const ProductTypePickerInput = _ref => {
587
596
  ProductTypePickerInput.displayName = 'ProductTypePickerInput';
588
597
  var ProductTypePickerInput$1 = ProductTypePickerInput;
589
598
 
590
- var messages$P = reactIntl.defineMessages({
599
+ var messages$Q = reactIntl.defineMessages({
591
600
  noStatesFound: {
592
601
  id: 'Products.StatePickerInput.noStatesFound',
593
602
  description: 'The message to display when no states were found',
@@ -671,7 +680,7 @@ const StatePickerInput = _ref => {
671
680
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
672
681
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
673
682
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
674
- const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$P.noStatesFound), [loadingError, formatMessage]);
683
+ const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noStatesFound), [loadingError, formatMessage]);
675
684
  const tooltipTitle = currentOption?.data?.label ?? '';
676
685
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
677
686
  max: "scale",
@@ -683,7 +692,7 @@ const StatePickerInput = _ref => {
683
692
  id: name,
684
693
  name: name,
685
694
  horizontalConstraint: "scale",
686
- placeholder: formatMessage(messages$P.placeholder),
695
+ placeholder: formatMessage(messages$Q.placeholder),
687
696
  loadOptions: loadOptionsDebounced,
688
697
  defaultOptions: true,
689
698
  showOptionGroupDivider: true,
@@ -705,7 +714,7 @@ const StatePickerInput = _ref => {
705
714
  }, dataLocale)
706
715
  }), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
707
716
  tone: "negative",
708
- intlMessage: pickerMessages$1.loadingErrorMessage
717
+ intlMessage: commonPickerMessages.loadingErrorMessage
709
718
  })]
710
719
  })
711
720
  });
@@ -713,9 +722,9 @@ const StatePickerInput = _ref => {
713
722
  StatePickerInput.displayName = 'StatePickerInput';
714
723
  var StatePickerInput$1 = StatePickerInput;
715
724
 
716
- function ownKeys$1q(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; }
717
- function _objectSpread$1q(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$1q(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$1q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
718
- const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$1q({
725
+ function ownKeys$1s(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; }
726
+ function _objectSpread$1s(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$1s(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$1s(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
727
+ const TooltipWrapper = /*#__PURE__*/React__namespace["default"].forwardRef((props, ref) => jsxRuntime.jsx("div", _objectSpread$1s({
719
728
  ref: ref,
720
729
  style: {
721
730
  display: 'block',
@@ -740,7 +749,7 @@ const CustomFieldTooltip = _ref => {
740
749
  };
741
750
  var CustomFieldTooltip$1 = CustomFieldTooltip;
742
751
 
743
- var messages$O = reactIntl.defineMessages({
752
+ var messages$P = reactIntl.defineMessages({
744
753
  bottomOption: {
745
754
  id: 'Products.Pickers.bottomOption',
746
755
  description: 'The message to display at the end of the options menu',
@@ -748,11 +757,11 @@ var messages$O = reactIntl.defineMessages({
748
757
  }
749
758
  });
750
759
 
751
- function ownKeys$1p(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; }
752
- 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; }
760
+ function ownKeys$1r(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; }
761
+ function _objectSpread$1r(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$1r(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$1r(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
753
762
  const getBottomOption = formatMessage => ({
754
763
  options: [{
755
- label: formatMessage ? formatMessage(messages$O.bottomOption) : messages$O.bottomOption,
764
+ label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
756
765
  isBottomOption: true,
757
766
  isDisabled: true
758
767
  }]
@@ -760,7 +769,7 @@ const getBottomOption = formatMessage => ({
760
769
  const Option$2 = props => {
761
770
  const _useIntl = reactIntl.useIntl(),
762
771
  formatMessage = _useIntl.formatMessage;
763
- return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$1p(_objectSpread$1p({}, props), {}, {
772
+ return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$1r(_objectSpread$1r({}, props), {}, {
764
773
  children: props.data.isBottomOption ? jsxRuntime.jsx(uiKit.Text.Detail, {
765
774
  tone: "secondary",
766
775
  children: formatMessage(props.data.label)
@@ -777,8 +786,8 @@ const Option$2 = props => {
777
786
  };
778
787
  Option$2.displayName = 'Option';
779
788
 
780
- function ownKeys$1o(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; }
781
- function _objectSpread$1o(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1o(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1o(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
789
+ function ownKeys$1q(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; }
790
+ function _objectSpread$1q(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1q(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1q(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
782
791
  const useHandlers = onChange => {
783
792
  const _useState = React.useState(),
784
793
  _useState2 = _slicedToArray(_useState, 2),
@@ -789,8 +798,8 @@ const useHandlers = onChange => {
789
798
  }, []);
790
799
  const handleChange = useEventCallback$1(event => {
791
800
  var _context;
792
- const eventWithExtractedValue = _objectSpread$1o(_objectSpread$1o({}, event), {}, {
793
- target: _objectSpread$1o(_objectSpread$1o({}, event.target), {}, {
801
+ const eventWithExtractedValue = _objectSpread$1q(_objectSpread$1q({}, event), {}, {
802
+ target: _objectSpread$1q(_objectSpread$1q({}, event.target), {}, {
794
803
  value: _Array$isArray__default["default"](event.target.value) ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item?.value) : event.target.value?.value
795
804
  })
796
805
  });
@@ -800,9 +809,9 @@ const useHandlers = onChange => {
800
809
  };
801
810
  var useHandlers$1 = useHandlers;
802
811
 
803
- const _excluded$e = ["extraWhere"];
804
- function ownKeys$1n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
805
- function _objectSpread$1n(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1n(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1n(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
812
+ const _excluded$g = ["extraWhere"];
813
+ function ownKeys$1p(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; }
814
+ function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1p(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1p(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
806
815
  const constructPrefixSearchPredicate$1 = function () {
807
816
  let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
808
817
  let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
@@ -843,13 +852,13 @@ const useLoadOptions = _ref => {
843
852
  }
844
853
  const _ref2 = variables ?? {},
845
854
  extraWhere = _ref2.extraWhere,
846
- restVariables = _objectWithoutProperties(_ref2, _excluded$e);
855
+ restVariables = _objectWithoutProperties(_ref2, _excluded$g);
847
856
  if (typeof extraWhere === 'string') {
848
857
  where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
849
858
  }
850
859
  return client$1.query({
851
860
  query,
852
- variables: _objectSpread$1n({
861
+ variables: _objectSpread$1p({
853
862
  where
854
863
  }, restVariables),
855
864
  context: {
@@ -1154,8 +1163,8 @@ var keepDisplayName$1 = keepDisplayName;
1154
1163
  const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
1155
1164
  var wrapDisplayName$1 = wrapDisplayName;
1156
1165
 
1157
- function ownKeys$1m(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; }
1158
- function _objectSpread$1m(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$1m(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$1m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1166
+ function ownKeys$1o(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; }
1167
+ function _objectSpread$1o(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$1o(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$1o(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1159
1168
  function _callSuper$8(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$8() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
1160
1169
  function _isNativeReflectConstruct$8() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$8 = function () { return !!t; })(); }
1161
1170
  const withMouseOverState = BaseComponent => {
@@ -1186,7 +1195,7 @@ const withMouseOverState = BaseComponent => {
1186
1195
  handleMouseOver: this.handleMouseOver,
1187
1196
  handleMouseOut: this.handleMouseOut
1188
1197
  };
1189
- return jsxRuntime.jsx(BaseComponent, _objectSpread$1m({}, _objectSpread$1m(_objectSpread$1m({}, this.props), injectedProps)));
1198
+ return jsxRuntime.jsx(BaseComponent, _objectSpread$1o({}, _objectSpread$1o(_objectSpread$1o({}, this.props), injectedProps)));
1190
1199
  }
1191
1200
  }]);
1192
1201
  }(React.Component);
@@ -1195,8 +1204,8 @@ const withMouseOverState = BaseComponent => {
1195
1204
  };
1196
1205
  var withMouseOverState$1 = withMouseOverState;
1197
1206
 
1198
- function ownKeys$1l(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; }
1199
- function _objectSpread$1l(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$1l(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$1l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1207
+ function ownKeys$1n(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
1208
+ function _objectSpread$1n(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$1n(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$1n(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1200
1209
  function _callSuper$7(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$7() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
1201
1210
  function _isNativeReflectConstruct$7() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$7 = function () { return !!t; })(); }
1202
1211
  var styles$j = {
@@ -1287,7 +1296,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
1287
1296
  }, {
1288
1297
  key: "render",
1289
1298
  value: function render() {
1290
- const commonProps = _objectSpread$1l(_objectSpread$1l({
1299
+ const commonProps = _objectSpread$1n(_objectSpread$1n({
1291
1300
  value: this.state.draftValue,
1292
1301
  autoComplete: this.props.autoComplete,
1293
1302
  onChange: this.handleChange,
@@ -1306,7 +1315,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
1306
1315
  htmlFor: inputId,
1307
1316
  children: this.props.label
1308
1317
  })
1309
- }), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$1l(_objectSpread$1l({}, commonProps), {}, {
1318
+ }), this.props.as === 'textarea' ? jsxRuntime.jsx(Textarea__default["default"], _objectSpread$1n(_objectSpread$1n({}, commonProps), {}, {
1310
1319
  id: inputId,
1311
1320
  className: classnames__default["default"](styles$j.textarea, styles$j[`textarea-${this.props.style}`], {
1312
1321
  [styles$j.invalid]: !this.props.isValid,
@@ -1315,7 +1324,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
1315
1324
  rows: 1,
1316
1325
  maxRows: this.props.autoSize ? undefined : 1,
1317
1326
  cacheMeasurements: true
1318
- })) : jsxRuntime.jsx("input", _objectSpread$1l(_objectSpread$1l({}, commonProps), {}, {
1327
+ })) : jsxRuntime.jsx("input", _objectSpread$1n(_objectSpread$1n({}, commonProps), {}, {
1319
1328
  id: inputId,
1320
1329
  ref: this.props.inputRef,
1321
1330
  type: this.props.as,
@@ -1353,7 +1362,7 @@ ThrottledField.defaultProps = {
1353
1362
  };
1354
1363
  var ThrottledField$1 = ThrottledField;
1355
1364
 
1356
- var messages$N = reactIntl.defineMessages({
1365
+ var messages$O = reactIntl.defineMessages({
1357
1366
  buttonLabel: {
1358
1367
  id: 'SearchInput.buttonLabel',
1359
1368
  description: 'Label for "Search" button.',
@@ -1458,7 +1467,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
1458
1467
  "data-testid": this.props.testId || 'search-input',
1459
1468
  value: this.state.text,
1460
1469
  label: this.props.label,
1461
- placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$N.placeholder),
1470
+ placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$O.placeholder),
1462
1471
  inputRef: this.props.inputRef || this.setInputRef,
1463
1472
  onChange: this.handleInputChange,
1464
1473
  onEnter: this.handleEnter,
@@ -1515,8 +1524,8 @@ SearchInput.defaultProps = {
1515
1524
  };
1516
1525
  var searchInput = flowRight__default["default"](keepDisplayName$1(SearchInput), withMouseOverState$1, reactIntl.injectIntl)(SearchInput);
1517
1526
 
1518
- function ownKeys$1k(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; }
1519
- function _objectSpread$1k(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$1k(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$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1527
+ function ownKeys$1m(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; }
1528
+ function _objectSpread$1m(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$1m(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$1m(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1520
1529
  const injectDataTablePaginationState = initialValues => Component => {
1521
1530
  const WithDataTablePaginationState = props => {
1522
1531
  const _usePaginationState = uiKit.usePaginationState({
@@ -1529,7 +1538,7 @@ const injectDataTablePaginationState = initialValues => Component => {
1529
1538
  key: initialValues?.tableSorting?.key,
1530
1539
  order: initialValues?.tableSorting?.order
1531
1540
  });
1532
- return jsxRuntime.jsx(Component, _objectSpread$1k(_objectSpread$1k({}, props), {}, {
1541
+ return jsxRuntime.jsx(Component, _objectSpread$1m(_objectSpread$1m({}, props), {}, {
1533
1542
  dataTablePaginationState: {
1534
1543
  page,
1535
1544
  perPage,
@@ -1542,8 +1551,8 @@ const injectDataTablePaginationState = initialValues => Component => {
1542
1551
  };
1543
1552
  var injectDataTablePaginationState$1 = injectDataTablePaginationState;
1544
1553
 
1545
- function ownKeys$1j(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; }
1546
- function _objectSpread$1j(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$1j(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$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1554
+ function ownKeys$1l(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; }
1555
+ function _objectSpread$1l(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$1l(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$1l(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1547
1556
  const injectNotifications = function () {
1548
1557
  let propName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'notifications';
1549
1558
  return Component => {
@@ -1558,7 +1567,7 @@ const injectNotifications = function () {
1558
1567
  onActionError,
1559
1568
  hideAllPageNotifications
1560
1569
  };
1561
- return jsxRuntime.jsx(Component, _objectSpread$1j(_objectSpread$1j({}, props), {}, {
1570
+ return jsxRuntime.jsx(Component, _objectSpread$1l(_objectSpread$1l({}, props), {}, {
1562
1571
  [propName]: notifications
1563
1572
  }));
1564
1573
  };
@@ -1568,23 +1577,23 @@ const injectNotifications = function () {
1568
1577
  };
1569
1578
  var injectNotifications$1 = injectNotifications;
1570
1579
 
1571
- function ownKeys$1i(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; }
1572
- function _objectSpread$1i(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$1i(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$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1580
+ function ownKeys$1k(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; }
1581
+ function _objectSpread$1k(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$1k(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$1k(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1573
1582
  function isPropsMapper(mapProps) {
1574
1583
  return typeof mapProps === 'function';
1575
1584
  }
1576
1585
  const withProps = mapProps => Component => {
1577
1586
  const EnhancedWithProps = ownProps => {
1578
- const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps(ownProps)) : _objectSpread$1i(_objectSpread$1i({}, ownProps), mapProps);
1579
- return jsxRuntime.jsx(Component, _objectSpread$1i({}, enhancedProps));
1587
+ const enhancedProps = isPropsMapper(mapProps) ? _objectSpread$1k(_objectSpread$1k({}, ownProps), mapProps(ownProps)) : _objectSpread$1k(_objectSpread$1k({}, ownProps), mapProps);
1588
+ return jsxRuntime.jsx(Component, _objectSpread$1k({}, enhancedProps));
1580
1589
  };
1581
1590
  EnhancedWithProps.displayName = wrapDisplayName$1(Component, 'withProps');
1582
1591
  return EnhancedWithProps;
1583
1592
  };
1584
1593
  var withProps$1 = withProps;
1585
1594
 
1586
- function ownKeys$1h(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; }
1587
- function _objectSpread$1h(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$1h(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$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1595
+ function ownKeys$1j(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; }
1596
+ function _objectSpread$1j(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$1j(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$1j(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1588
1597
  const useRedirectEffect = _ref => {
1589
1598
  let goTo = _ref.goTo;
1590
1599
  // eslint-disable-next-line react-hooks/exhaustive-deps
@@ -1604,31 +1613,31 @@ const defaultOptions$5 = {
1604
1613
  skip: () => false
1605
1614
  };
1606
1615
  const withRedirectTo = options => Component => {
1607
- const mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$5), options);
1616
+ const mergedOptions = _objectSpread$1j(_objectSpread$1j({}, defaultOptions$5), options);
1608
1617
  const WithRedirectTo = props => {
1609
1618
  if (!mergedOptions.skip(props)) {
1610
1619
  return jsxRuntime.jsx(RedirectTo, {
1611
1620
  goTo: options.selectGoTo(props)
1612
1621
  });
1613
1622
  }
1614
- return jsxRuntime.jsx(Component, _objectSpread$1h({}, props));
1623
+ return jsxRuntime.jsx(Component, _objectSpread$1j({}, props));
1615
1624
  };
1616
1625
  WithRedirectTo.displayName = 'WithFirstStepRedirect';
1617
1626
  return WithRedirectTo;
1618
1627
  };
1619
1628
  var withRedirectTo$1 = withRedirectTo;
1620
1629
 
1621
- function ownKeys$1g(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; }
1622
- function _objectSpread$1g(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$1g(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$1g(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1630
+ function ownKeys$1i(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; }
1631
+ function _objectSpread$1i(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$1i(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$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1623
1632
  const defaultOptions$4 = {
1624
1633
  propName: 'modalState',
1625
1634
  isInitiallyOpen: false
1626
1635
  };
1627
1636
  const injectModalState$2 = options => Component => {
1628
- const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$4), options);
1637
+ const mergedOptions = _objectSpread$1i(_objectSpread$1i({}, defaultOptions$4), options);
1629
1638
  const WithModalState = props => {
1630
1639
  const modalState = applicationComponents.useModalState(mergedOptions.isInitiallyOpen);
1631
- return jsxRuntime.jsx(Component, _objectSpread$1g(_objectSpread$1g({}, props), {}, {
1640
+ return jsxRuntime.jsx(Component, _objectSpread$1i(_objectSpread$1i({}, props), {}, {
1632
1641
  [mergedOptions.propName]: modalState
1633
1642
  }));
1634
1643
  };
@@ -1637,17 +1646,17 @@ const injectModalState$2 = options => Component => {
1637
1646
  };
1638
1647
  var injectModalState$3 = injectModalState$2;
1639
1648
 
1640
- function ownKeys$1f(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; }
1641
- function _objectSpread$1f(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$1f(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$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1649
+ function ownKeys$1h(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; }
1650
+ function _objectSpread$1h(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$1h(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$1h(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1642
1651
  const defaultOptions$3 = {
1643
1652
  propName: 'toggleState',
1644
1653
  isInitiallyOpen: false
1645
1654
  };
1646
1655
  const injectModalState = options => Component => {
1647
- const mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions$3), options);
1656
+ const mergedOptions = _objectSpread$1h(_objectSpread$1h({}, defaultOptions$3), options);
1648
1657
  const WithToggleState = props => {
1649
1658
  const toggleState = uiKit.useToggleState(mergedOptions.isInitiallyOpen);
1650
- return jsxRuntime.jsx(Component, _objectSpread$1f(_objectSpread$1f({}, props), {}, {
1659
+ return jsxRuntime.jsx(Component, _objectSpread$1h(_objectSpread$1h({}, props), {}, {
1651
1660
  [mergedOptions.propName]: toggleState
1652
1661
  }));
1653
1662
  };
@@ -1656,8 +1665,8 @@ const injectModalState = options => Component => {
1656
1665
  };
1657
1666
  var injectModalState$1 = injectModalState;
1658
1667
 
1659
- function ownKeys$1e(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; }
1660
- function _objectSpread$1e(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1e(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1e(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1668
+ function ownKeys$1g(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; }
1669
+ function _objectSpread$1g(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1g(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1g(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1661
1670
  const defaultOptions$2 = {
1662
1671
  storageType: 'local',
1663
1672
  segregateByUser: true
@@ -1675,7 +1684,7 @@ const getStorage = storageType => storageType === 'session' ? sessionStorage : l
1675
1684
  const isNil = value => typeof value === 'undefined' || value === null;
1676
1685
  const useStorage = (storageKey, initialStorageValue, options) => {
1677
1686
  var _context;
1678
- const mergedOptions = _objectSpread$1e(_objectSpread$1e({}, defaultOptions$2), options);
1687
+ const mergedOptions = _objectSpread$1g(_objectSpread$1g({}, defaultOptions$2), options);
1679
1688
  const userId = applicationShellConnectors.useApplicationContext(context => context.user?.id);
1680
1689
  const scopedStorageKey = _filterInstanceProperty__default["default"](_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
1681
1690
  const readFromStorage = React.useCallback(() => {
@@ -1720,8 +1729,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
1720
1729
  };
1721
1730
  var useStorage$1 = useStorage;
1722
1731
 
1723
- function ownKeys$1d(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; }
1724
- function _objectSpread$1d(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$1d(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$1d(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1732
+ function ownKeys$1f(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; }
1733
+ function _objectSpread$1f(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$1f(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$1f(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1725
1734
  const defaultOptions$1 = {
1726
1735
  propName: 'storage',
1727
1736
  storageKey: '',
@@ -1734,7 +1743,7 @@ const injectStorage = options => WrappedComponent => {
1734
1743
  * Options are being merged by spreading as destructuring and defaulting in
1735
1744
  * argument position does not allow passing specification of option(s).
1736
1745
  */
1737
- const mergedOptions = _objectSpread$1d(_objectSpread$1d({}, defaultOptions$1), options);
1746
+ const mergedOptions = _objectSpread$1f(_objectSpread$1f({}, defaultOptions$1), options);
1738
1747
  const WithStorage = props => {
1739
1748
  const _useStorage = useStorage$1(mergedOptions.storageKey(props), mergedOptions.initalStorageValue, mergedOptions.options),
1740
1749
  _useStorage2 = _slicedToArray(_useStorage, 3),
@@ -1748,7 +1757,7 @@ const injectStorage = options => WrappedComponent => {
1748
1757
  readFromStorage
1749
1758
  }
1750
1759
  };
1751
- return jsxRuntime.jsx(WrappedComponent, _objectSpread$1d(_objectSpread$1d({}, props), storageProp));
1760
+ return jsxRuntime.jsx(WrappedComponent, _objectSpread$1f(_objectSpread$1f({}, props), storageProp));
1752
1761
  };
1753
1762
  WithStorage.displayName = wrapDisplayName$1(WrappedComponent, 'WithStorage');
1754
1763
  return WithStorage;
@@ -1793,8 +1802,8 @@ function useFormatLocalizedFieldToString() {
1793
1802
  return formatLocalizedFieldToString;
1794
1803
  }
1795
1804
 
1796
- function ownKeys$1c(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; }
1797
- function _objectSpread$1c(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$1c(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$1c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1805
+ function ownKeys$1e(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; }
1806
+ function _objectSpread$1e(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$1e(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$1e(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1798
1807
  var FetchResourceTypeDuplicatedField = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchResourceTypeDuplicatedField" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipAssociateRoles" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipAttributeGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipChannels" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipDiscountCodes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipInventoryEntries" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipOrders" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipPayments" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProducts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipProductTypes" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "associateRoles" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipAssociateRoles" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "attributeGroups" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipAttributeGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "categories" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipChannels" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "discountCodes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipDiscountCodes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventoryEntries" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipInventoryEntries" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "orders" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipOrders" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "payments" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipPayments" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "products" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProducts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productTypes" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipProductTypes" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 2328, source: { body: "query FetchResourceTypeDuplicatedField(\n $where: String\n $skipAssociateRoles: Boolean!\n $skipAttributeGroups: Boolean!\n $skipBusinessUnits: Boolean!\n $skipCarts: Boolean!\n $skipCartDiscounts: Boolean!\n $skipCategories: Boolean!\n $skipChannels: Boolean!\n $skipCustomers: Boolean!\n $skipCustomerGroups: Boolean!\n $skipDiscountCodes: Boolean!\n $skipInventoryEntries: Boolean!\n $skipOrders: Boolean!\n $skipPayments: Boolean!\n $skipProducts: Boolean!\n $skipProductDiscounts: Boolean!\n $skipProductSelections: Boolean!\n $skipProductTypes: Boolean!\n $skipShippingMethods: Boolean!\n $skipShoppingLists: Boolean!\n $skipStores: Boolean!\n $skipTaxCategories: Boolean!\n $skipZones: Boolean!\n) {\n associateRoles(where: $where) @skip(if: $skipAssociateRoles) {\n total\n }\n attributeGroups(where: $where) @skip(if: $skipAttributeGroups) {\n total\n }\n businessUnits(where: $where) @skip(if: $skipBusinessUnits) {\n total\n }\n carts(where: $where) @skip(if: $skipCarts) {\n total\n }\n cartDiscounts(where: $where) @skip(if: $skipCartDiscounts) {\n total\n }\n categories(where: $where) @skip(if: $skipCategories) {\n total\n }\n channels(where: $where) @skip(if: $skipChannels) {\n total\n }\n customers(where: $where) @skip(if: $skipCustomers) {\n total\n }\n customerGroups(where: $where) @skip(if: $skipCustomerGroups) {\n total\n }\n discountCodes(where: $where) @skip(if: $skipDiscountCodes) {\n total\n }\n inventoryEntries(where: $where) @skip(if: $skipInventoryEntries) {\n total\n }\n orders(where: $where) @skip(if: $skipOrders) {\n total\n }\n payments(where: $where) @skip(if: $skipPayments) {\n total\n }\n products(where: $where) @skip(if: $skipProducts) {\n total\n }\n productDiscounts(where: $where) @skip(if: $skipProductDiscounts) {\n total\n }\n productSelections(where: $where) @skip(if: $skipProductSelections) {\n total\n }\n productTypes(where: $where) @skip(if: $skipProductTypes) {\n total\n }\n shippingMethods(where: $where) @skip(if: $skipShippingMethods) {\n total\n }\n shoppingLists(where: $where) @skip(if: $skipShoppingLists) {\n total\n }\n stores(where: $where) @skip(if: $skipStores) {\n total\n }\n taxCategories(where: $where) @skip(if: $skipTaxCategories) {\n total\n }\n zones(where: $where) @skip(if: $skipZones) {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
1799
1808
  const MC_RESOURCES_WITH_KEYS = {
1800
1809
  ASSOCIATE_ROLE: 'ASSOCIATE_ROLE',
@@ -1869,7 +1878,7 @@ const DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES = {
1869
1878
  [BASE_SKIP_RESOURCE_TYPES_VARIABLES.ZONE]: true
1870
1879
  };
1871
1880
  const getSkipVariables = resourceType => {
1872
- return _objectSpread$1c(_objectSpread$1c({}, DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES), {}, {
1881
+ return _objectSpread$1e(_objectSpread$1e({}, DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES), {}, {
1873
1882
  [BASE_SKIP_RESOURCE_TYPES_VARIABLES[resourceType]]: false
1874
1883
  });
1875
1884
  };
@@ -1894,7 +1903,7 @@ const getQueryVariables = _ref2 => {
1894
1903
  fieldValue,
1895
1904
  id
1896
1905
  });
1897
- return _objectSpread$1c({
1906
+ return _objectSpread$1e({
1898
1907
  where
1899
1908
  }, skipVariables);
1900
1909
  };
@@ -1928,8 +1937,8 @@ const usePrevious = value => {
1928
1937
  };
1929
1938
  var usePrevious$1 = usePrevious;
1930
1939
 
1931
- function ownKeys$1b(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; }
1932
- function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$1b(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$1b(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1940
+ function ownKeys$1d(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; }
1941
+ function _objectSpread$1d(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$1d(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$1d(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1933
1942
  var FetchStoresQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sort" } }, type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "stores" }, 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: "FragmentSpread", name: { kind: "Name", value: "StoreBasicInfo" }, directives: [] }, { kind: "Field", name: { kind: "Name", value: "countries" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "code" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "languages" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }] }, { kind: "Field", name: { kind: "Name", value: "distributionChannelsRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "distributionChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "supplyChannels" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeExtendedStoresList" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, 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: "FragmentDefinition", name: { kind: "Name", value: "StoreBasicInfo" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Store" } }, 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: "version" }, 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: [] }] } }], loc: { start: 0, end: 1089, source: { body: "#import '../../utils/graphql/fragments/store-basic-info.ctp.graphql'\n\nquery FetchStoresQuery(\n $limit: Int\n $offset: Int\n $sort: [String!]\n $where: String\n $excludeExtendedStoresList: Boolean!\n $excludeProductSelections: Boolean!\n) {\n stores(limit: $limit, offset: $offset, sort: $sort, where: $where) {\n total\n count\n offset\n results {\n ...StoreBasicInfo\n countries {\n code\n }\n languages @skip(if: $excludeExtendedStoresList)\n distributionChannelsRef {\n id\n }\n distributionChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n supplyChannels @skip(if: $excludeExtendedStoresList) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n mode\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
1934
1943
  const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
1935
1944
  var _context, _context2;
@@ -1940,7 +1949,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
1940
1949
  offset: storesQueryResult.offset,
1941
1950
  results: ((_context = storesQueryResult.results) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(store => {
1942
1951
  var _context3, _context4;
1943
- return _objectSpread$1b(_objectSpread$1b({}, store), {}, {
1952
+ return _objectSpread$1d(_objectSpread$1d({}, store), {}, {
1944
1953
  productSelections: ((_context3 = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _filterInstanceProperty__default["default"](_context3), _context3))?.(productSelectionRef => Boolean(productSelectionRef.productSelection))
1945
1954
  });
1946
1955
  })
@@ -1948,7 +1957,7 @@ const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
1948
1957
  };
1949
1958
  const createQueryVariables$6 = ownProps => {
1950
1959
  var _context5;
1951
- return _objectSpread$1b(_objectSpread$1b({
1960
+ return _objectSpread$1d(_objectSpread$1d({
1952
1961
  limit: ownProps.limit,
1953
1962
  offset: ownProps.offset,
1954
1963
  sort: _sortInstanceProperty__default["default"](ownProps)
@@ -2028,36 +2037,8 @@ const useStoreKeysInDataFences = _ref => {
2028
2037
  };
2029
2038
  var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
2030
2039
 
2031
- function useDidFormValidationFail() {
2032
- const _useState = React.useState(false),
2033
- _useState2 = _slicedToArray(_useState, 2),
2034
- didFormValidationFail = _useState2[0],
2035
- setDidFormValidationFail = _useState2[1];
2036
- const _useState3 = React.useState(false),
2037
- _useState4 = _slicedToArray(_useState3, 2),
2038
- wasValidationRequested = _useState4[0],
2039
- setWasValidationRequested = _useState4[1];
2040
- const _useFormikContext = formik.useFormikContext(),
2041
- dirty = _useFormikContext.dirty,
2042
- isValid = _useFormikContext.isValid,
2043
- isValidating = _useFormikContext.isValidating;
2044
- React.useEffect(() => {
2045
- if (dirty) setWasValidationRequested(false);
2046
- }, [dirty]);
2047
- React.useEffect(() => {
2048
- if (isValidating) setWasValidationRequested(true);
2049
- }, [isValidating]);
2050
- React.useEffect(() => {
2051
- if (wasValidationRequested && !isValid) {
2052
- setDidFormValidationFail(true);
2053
- setWasValidationRequested(false);
2054
- }
2055
- }, [isValid, setWasValidationRequested, setDidFormValidationFail, wasValidationRequested]);
2056
- return Boolean(didFormValidationFail);
2057
- }
2058
-
2059
- 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; }
2060
- 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; }
2040
+ function ownKeys$1c(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; }
2041
+ function _objectSpread$1c(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$1c(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$1c(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2061
2042
  const TEN_MINUTES_IN_MS = 600000;
2062
2043
  const defaultOptions = {
2063
2044
  reminderInterval: REMINDER_OPTION_1_DAY,
@@ -2085,7 +2066,7 @@ const useHasReminderExpired = readReminderInterval => {
2085
2066
  };
2086
2067
  const usePersistedReminder = function () {
2087
2068
  let options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2088
- const mergedOptions = _objectSpread$1a(_objectSpread$1a({}, defaultOptions), options);
2069
+ const mergedOptions = _objectSpread$1c(_objectSpread$1c({}, defaultOptions), options);
2089
2070
  const _useStorage = useStorage$1(mergedOptions.storageKey, null),
2090
2071
  _useStorage2 = _slicedToArray(_useStorage, 3),
2091
2072
  initialChosenReminderInterval = _useStorage2[0],
@@ -2132,7 +2113,7 @@ const usePersistedReminder = function () {
2132
2113
  };
2133
2114
  var usePersistedReminder$1 = usePersistedReminder;
2134
2115
 
2135
- var messages$M = reactIntl.defineMessages({
2116
+ var messages$N = reactIntl.defineMessages({
2136
2117
  profileUpdated: {
2137
2118
  id: 'NotificationText.profileUpdated',
2138
2119
  description: 'Label for the notification header',
@@ -2150,28 +2131,28 @@ var messages$M = reactIntl.defineMessages({
2150
2131
  }
2151
2132
  });
2152
2133
 
2153
- function ownKeys$19(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; }
2154
- function _objectSpread$19(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$19(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$19(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2134
+ function ownKeys$1b(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; }
2135
+ function _objectSpread$1b(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$1b(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$1b(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2155
2136
  const LinkToProfile = props => {
2156
2137
  return jsxRuntime.jsx(uiKit.Link, {
2157
2138
  to: "/account/profile",
2158
2139
  children: props.children
2159
- });
2140
+ }, "link");
2160
2141
  };
2161
2142
  LinkToProfile.displayName = 'LinkToProfile';
2162
2143
  const getLinkToProfile = msg => jsxRuntime.jsx(LinkToProfile, {
2163
2144
  children: msg
2164
- });
2165
- const getNewLine = () => jsxRuntime.jsx("br", {});
2145
+ }, "linkToProfile");
2146
+ const getNewLine = () => jsxRuntime.jsx("br", {}, crypto.randomUUID());
2166
2147
  const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2167
2148
  children: [jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2168
2149
  scale: "xs",
2169
2150
  children: [jsxRuntime.jsx(uiKit.Text.Body, {
2170
2151
  as: "p",
2171
2152
  isBold: true,
2172
- intlMessage: messages$M.profileUpdated
2153
+ intlMessage: messages$N.profileUpdated
2173
2154
  }), jsxRuntime.jsx(uiKit.Text.Body, {
2174
- intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.addMoreInformation), {}, {
2155
+ intlMessage: _objectSpread$1b(_objectSpread$1b({}, messages$N.addMoreInformation), {}, {
2175
2156
  values: {
2176
2157
  newline: getNewLine
2177
2158
  }
@@ -2180,7 +2161,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2180
2161
  }), jsxRuntime.jsx(uiKit.Spacings.Stack, {
2181
2162
  scale: "xs",
2182
2163
  children: jsxRuntime.jsx(uiKit.Text.Body, {
2183
- intlMessage: _objectSpread$19(_objectSpread$19({}, messages$M.informationAndProfileLink), {}, {
2164
+ intlMessage: _objectSpread$1b(_objectSpread$1b({}, messages$N.informationAndProfileLink), {}, {
2184
2165
  values: {
2185
2166
  newline: getNewLine,
2186
2167
  link: getLinkToProfile
@@ -2263,8 +2244,11 @@ function usePendingRequests() {
2263
2244
  pendingRequests = _useState2[0],
2264
2245
  setPendingRequests = _useState2[1];
2265
2246
  const isUnmountedRef = React.useRef(false);
2266
- React.useEffect(() => () => {
2267
- isUnmountedRef.current = true;
2247
+ React.useEffect(() => {
2248
+ isUnmountedRef.current = false;
2249
+ return () => {
2250
+ isUnmountedRef.current = true;
2251
+ };
2268
2252
  }, []);
2269
2253
  const change = React.useCallback(delta => {
2270
2254
  // FIXME: isMounted is an anti pattern
@@ -2305,7 +2289,7 @@ const useEventCallback = (fn, dependencies) => {
2305
2289
  };
2306
2290
  var useEventCallback$1 = useEventCallback;
2307
2291
 
2308
- var messages$L = reactIntl.defineMessages({
2292
+ var messages$M = reactIntl.defineMessages({
2309
2293
  fallbackHint: {
2310
2294
  id: 'KeyFallback.fallbackHint',
2311
2295
  description: 'key fallback for a specified resource key (e.g name)',
@@ -2329,7 +2313,7 @@ const useLocalizedKeyFallback = () => {
2329
2313
  return values => {
2330
2314
  if (!values.resource) return null;
2331
2315
  const localizedString = values.resource[values.localizedStringFieldName];
2332
- const fallbackHintWithKey = intl.formatMessage(messages$L.fallbackHint, {
2316
+ const fallbackHintWithKey = intl.formatMessage(messages$M.fallbackHint, {
2333
2317
  key: values.resource.key
2334
2318
  });
2335
2319
  if (!localizedString) return fallbackHintWithKey;
@@ -2343,8 +2327,8 @@ const useDebouncedPromiseCallback = (promiseCallback, wait) =>
2343
2327
  React.useCallback(debounce__default["default"](promiseCallback, wait), [promiseCallback]);
2344
2328
  var useDebouncedPromiseCallback$1 = useDebouncedPromiseCallback;
2345
2329
 
2346
- function ownKeys$18(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; }
2347
- function _objectSpread$18(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$18(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$18(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2330
+ 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; }
2331
+ function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1a(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2348
2332
  const prepareMutableColumnProps = (columnConfig, mutableColumnProps) => {
2349
2333
  const updatedColumnProps = {};
2350
2334
  _forEachInstanceProperty__default["default"](mutableColumnProps).call(mutableColumnProps, columnProp => {
@@ -2364,14 +2348,14 @@ const retrieveColumnsWithCachedConfiguration = _ref => {
2364
2348
  mutableColumnProps = _ref.mutableColumnProps;
2365
2349
  return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](cachedVisibleTableConfiguration).call(cachedVisibleTableConfiguration, cachedColumn => _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedColumn.key))).call(_context, cachedConfig => {
2366
2350
  const initialColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, initialConfig => initialConfig.key === cachedConfig.key);
2367
- return _objectSpread$18(_objectSpread$18({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
2351
+ return _objectSpread$1a(_objectSpread$1a({}, initialColumnConfig), prepareMutableColumnProps(cachedConfig, mutableColumnProps));
2368
2352
  });
2369
2353
  };
2370
2354
  const handleCacheUpdate = _ref2 => {
2371
2355
  let update = _ref2.update,
2372
2356
  cachedVisibleTableConfiguration = _ref2.cachedVisibleTableConfiguration,
2373
2357
  updateCachedTableConfiguration = _ref2.updateCachedTableConfiguration;
2374
- return updateCachedTableConfiguration(_objectSpread$18(_objectSpread$18({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
2358
+ return updateCachedTableConfiguration(_objectSpread$1a(_objectSpread$1a({}, pick__default["default"](cachedVisibleTableConfiguration, ['columnsConfig', 'displaySettings'])), update));
2375
2359
  };
2376
2360
 
2377
2361
  // Signature:
@@ -2400,7 +2384,7 @@ const usePersistedTableConfiguration = props => {
2400
2384
  return {
2401
2385
  columnsConfig: _mapInstanceProperty__default["default"](initialVisibleColumnKeys).call(initialVisibleColumnKeys, visibleColumnKey => {
2402
2386
  const visibleColumnConfig = _findInstanceProperty__default["default"](allAvailableColumnsConfiguration).call(allAvailableColumnsConfiguration, columnConfig => columnConfig.key === visibleColumnKey);
2403
- return _objectSpread$18({
2387
+ return _objectSpread$1a({
2404
2388
  key: visibleColumnKey
2405
2389
  }, prepareMutableColumnProps(visibleColumnConfig, mutableColumnProps));
2406
2390
  }),
@@ -2463,21 +2447,21 @@ const useProductSelectionsTotalFetcher = props => {
2463
2447
  };
2464
2448
  var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
2465
2449
 
2466
- function ownKeys$17(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; }
2467
- function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$17(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$17(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2450
+ function ownKeys$19(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; }
2451
+ function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$19(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$19(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2468
2452
 
2469
2453
  // eslint-disable-next-line import/prefer-default-export
2470
2454
  const convertProductSelectionsFromGraphQl = productSelections => {
2471
2455
  var _context;
2472
- return productSelections?.results && _objectSpread$17(_objectSpread$17({}, productSelections), {}, {
2473
- results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$17({}, l10n.applyTransformedLocalizedFields(productSelection, [{
2456
+ return productSelections?.results && _objectSpread$19(_objectSpread$19({}, productSelections), {}, {
2457
+ results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$19({}, l10n.applyTransformedLocalizedFields(productSelection, [{
2474
2458
  from: 'nameAllLocales',
2475
2459
  to: 'name'
2476
2460
  }])))
2477
2461
  });
2478
2462
  };
2479
2463
 
2480
- 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 } } } };
2464
+ 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 } } } };
2481
2465
  const createQueryVariables$5 = function () {
2482
2466
  let ownProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2483
2467
  return {
@@ -2513,841 +2497,244 @@ const useProductSelectionsFetcher = props => {
2513
2497
  };
2514
2498
  var useProductSelectionsFetcher$1 = useProductSelectionsFetcher;
2515
2499
 
2516
- const _excluded$d = ["action"];
2517
- function ownKeys$16(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; }
2518
- function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context0, _context1; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context0 = ownKeys$16(Object(t), !0)).call(_context0, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context1 = ownKeys$16(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
2500
+ const setToArray = function () {
2501
+ let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
2502
+ return `id in (${_mapInstanceProperty__default["default"](values).call(values, value => `"${value}"`).join(', ')})`;
2503
+ };
2519
2504
 
2520
- /**
2521
- * Checks if a value is a LocalizedString
2522
- *
2523
- * { en: 'Hello' } -> true
2524
- * 'Hello' -> false
2525
- */
2505
+ function capitalizeFirst(text) {
2506
+ return text.charAt(0).toUpperCase() + _sliceInstanceProperty__default["default"](text).call(text, 1);
2507
+ }
2526
2508
 
2527
- const getIsLocalizedString = maybeLocalizedString => {
2528
- if (typeof maybeLocalizedString === 'string') return false;
2529
- if (!maybeLocalizedString || typeof maybeLocalizedString === 'object' && _Object$keys__default["default"](maybeLocalizedString).length === 0) return false;
2530
- return true;
2509
+ const PRODUCT_STATUSES = {
2510
+ PUBLISHED: 'published',
2511
+ UNPUBLISHED: 'unpublished',
2512
+ MODIFIED: 'modified'
2531
2513
  };
2532
-
2533
- /**
2534
- * Transforms a list of `CustomField` into a `CustomField` object
2535
- *
2536
- * [{ name: 'fieldA', value: 'Hello' }] -> { fieldA: 'Hello' }
2537
- */
2538
- const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
2539
- if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
2540
- return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$16(_objectSpread$16({}, customFields), {}, {
2541
- [customField.name]: customField.value
2542
- }), {});
2514
+ const FILTER_TYPES = {
2515
+ lessThan: 'lessThan',
2516
+ moreThan: 'moreThan',
2517
+ equalTo: 'equalTo',
2518
+ range: 'range',
2519
+ missing: 'missing',
2520
+ missingIn: 'missingIn',
2521
+ in: 'in'
2543
2522
  };
2523
+ const FIELD_TYPES = {
2524
+ Money: 'Money',
2525
+ LocalizedString: 'LocalizedString',
2526
+ Time: 'Time',
2527
+ DateTime: 'DateTime',
2528
+ Boolean: 'Boolean',
2529
+ String: 'String',
2530
+ Enum: 'Enum',
2531
+ LocalizedEnum: 'LocalizedEnum',
2532
+ Number: 'Number',
2533
+ Date: 'Date',
2534
+ Reference: 'Reference',
2535
+ Set: 'Set'
2536
+ };
2537
+ const PRECISION_TYPES = {
2538
+ highPrecision: 'highPrecision',
2539
+ centPrecision: 'centPrecision'
2540
+ };
2541
+ const ERROR_CODES = {
2542
+ semanticError: 'SemanticError',
2543
+ invalidInput: 'InvalidInput'
2544
+ };
2545
+ const DefaultPageSizes = [20, 50, 100];
2546
+ DefaultPageSizes[0];
2544
2547
 
2545
- // --- Types mapping ---
2546
-
2547
- /**
2548
- * Map category GraphQL shape with nameAllLocales to reference shape
2549
- * Includes ancestors and parent
2550
- *
2551
- * @param {Object} category - A category result object from graphql
2552
- * @return {Object} Category (as a REST API representation):
2553
- * `{ id, obj: { id, name } }`
2554
- */
2555
- function transformLocalizedFieldsForCategory(category) {
2556
- var _context;
2557
- let transformationOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [{
2558
- from: 'nameAllLocales',
2559
- to: 'name'
2560
- }];
2561
- const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
2562
- const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
2563
- const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
2564
- return _objectSpread$16(_objectSpread$16(_objectSpread$16({}, transformedData), parent ? {
2565
- parent
2566
- } : {}), ancestors ? {
2567
- ancestors
2568
- } : {});
2569
- }
2570
- function transformLocalizedFieldsForCartDiscount(cartDiscount) {
2571
- const transformationOptions = [{
2572
- from: 'nameAllLocales',
2573
- to: 'name'
2574
- }];
2575
- return l10n.applyTransformedLocalizedFields(cartDiscount, transformationOptions);
2548
+ const regexpData = /^data-/;
2549
+ function filterDataAttributes(obj) {
2550
+ var _context, _context2;
2551
+ return _reduceInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](obj)).call(_context2, p => regexpData.test(p))).call(_context, (acc, p) => {
2552
+ // eslint-disable-next-line no-param-reassign
2553
+ acc[p] = obj[p];
2554
+ return acc;
2555
+ }, {});
2576
2556
  }
2577
- function mapShippingRateTierToGraphQL(tiers) {
2578
- return _reduceInstanceProperty__default["default"](tiers).call(tiers, (graphQlTiers, tier) => [...graphQlTiers, {
2579
- [tier.type]: {
2580
- price: tier.price ? {
2581
- centAmount: tier.price.centAmount,
2582
- currencyCode: tier.price.currencyCode
2583
- } : undefined,
2584
- minimumCentAmount: tier.minimumCentAmount,
2585
- value: tier.value || undefined,
2586
- priceFunction: tier.priceFunction ? {
2587
- function: tier.priceFunction.function,
2588
- currencyCode: tier.priceFunction.currencyCode
2589
- } : undefined,
2590
- score: tier.score
2591
- }
2592
- }], []);
2557
+
2558
+ const invalidValues$1 = [null, undefined, ''];
2559
+ function isEmpty$2(_ref) {
2560
+ let value = _ref.value;
2561
+ return _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value) || _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.from) && _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.to);
2593
2562
  }
2594
2563
 
2595
- /**
2596
- * NOTE:
2597
- * This module massages update actions produced by the JS SDK
2598
- * to be compatible with CTP GraphQL mutations. This logic should be
2599
- * moved into the JS SDK once discounts is fully 100% migrated to
2600
- * GraphQL or any other plugin/app needs this functionality. Until
2601
- * then this serves as a collective set of requirements before
2602
- * prematurely adding a not fully working set of conversions to the
2603
- * JS SDK.
2604
- */
2564
+ const invalidValues = [null, undefined, ''];
2565
+ function validateSingleFilter(_ref) {
2566
+ let value = _ref.value;
2567
+ return _includesInstanceProperty__default["default"](invalidValues).call(invalidValues, value);
2568
+ }
2605
2569
 
2606
- const createAttributeTypeValue = attribute => {
2607
- switch (attribute.type.name) {
2608
- case 'set':
2609
- return {
2610
- set: {
2611
- elementType: createAttributeTypeValue({
2612
- type: attribute.type.elementType
2613
- })
2614
- }
2615
- };
2616
- case 'boolean':
2617
- case 'date':
2618
- case 'datetime':
2619
- case 'ltext':
2620
- case 'money':
2621
- case 'number':
2622
- case 'text':
2623
- case 'time':
2624
- return {
2625
- [attribute.type.name]: {}
2626
- };
2627
- case 'enum':
2628
- case 'lenum':
2629
- return {
2630
- [attribute.type.name]: {
2631
- values: []
2632
- }
2633
- };
2634
- case 'reference':
2635
- {
2636
- return {
2637
- [attribute.type.name]: {
2638
- referenceTypeId: attribute.type.referenceTypeId
2639
- }
2640
- };
2641
- }
2642
- default:
2643
- return attribute.type;
2570
+ const dateFormatDayStart$1 = 'YYYY-MM-DDT00:00:00.000';
2571
+ const dateFormatDayEnd$1 = 'YYYY-MM-DDT23:59:59.999';
2572
+ const getDateTimeInUTC = (date, timezone, format) => {
2573
+ const dateFormat = 'YYYY-MM-DDTHH:mm:ss.SSS';
2574
+ const momentDate = moment__default["default"](date);
2575
+ // check if the date is date only or datetime
2576
+ const noTimeSpecified = momentDate.hours() === 0 && momentDate.minutes() === 0 && momentDate.seconds() === 0;
2577
+ // if it's a date then convert it to UTC datetime based on timezone
2578
+ if (noTimeSpecified) {
2579
+ const offset = moment__default["default"](date).tz(timezone)?.utcOffset() || 0;
2580
+ const formattedDate = momentDate.format(format);
2581
+ const formattedDateWithOffset = moment__default["default"](formattedDate).add(offset, 'minutes').format(dateFormat);
2582
+ // console.log(formattedDateWithOffset);
2583
+ return formattedDateWithOffset;
2644
2584
  }
2585
+ // if it's a datetime we assume that it's already in UTC
2586
+ // and just return it
2587
+ return date;
2645
2588
  };
2589
+ function dateTransformer$1(filterKey, filters) {
2590
+ let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator$1;
2591
+ const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
2592
+ let type = _ref.type,
2593
+ value = _ref.value,
2594
+ timezone = _ref.timezone;
2595
+ if (!filterValidator({
2596
+ type,
2597
+ value
2598
+ })) return '';
2599
+ switch (type) {
2600
+ case FILTER_TYPES.lessThan:
2601
+ return `${filterKey} < "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"`;
2602
+ case FILTER_TYPES.moreThan:
2603
+ return `${filterKey} > "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}"`;
2604
+ case FILTER_TYPES.equalTo:
2605
+ return oneLine__default["default"]`
2606
+ (${filterKey} >= "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"
2607
+ and ${filterKey} <= "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}")
2608
+ `;
2609
+ case FILTER_TYPES.range:
2610
+ return oneLine__default["default"]`
2611
+ (${filterKey} >= "${getDateTimeInUTC(value.from, timezone, dateFormatDayStart$1)}"
2612
+ and ${filterKey} <= "${getDateTimeInUTC(value.to, timezone, dateFormatDayEnd$1)}")
2613
+ `;
2614
+ default:
2615
+ return '';
2616
+ }
2617
+ });
2646
2618
 
2647
- /*
2648
- * Fixed price supports high precision. Action format is nested with the
2649
- * the type of the money. Absolute discount only works with cent precision,
2650
- * hence the action structure is flat.
2651
- */
2652
- const formatMoney$2 = valueType => money => {
2653
- switch (valueType) {
2654
- case 'fixed':
2655
- case 'fixedCart':
2656
- return {
2657
- [money.type]: _objectSpread$16({
2658
- centAmount: money.centAmount,
2659
- currencyCode: money.currencyCode
2660
- }, money.type === PRECISION_TYPES.highPrecision && {
2661
- preciseAmount: money.preciseAmount,
2662
- fractionDigits: money.fractionDigits
2663
- })
2664
- };
2665
- case 'absolute':
2666
- case 'absoluteCart':
2667
- return {
2668
- centAmount: money.centAmount,
2669
- currencyCode: money.currencyCode
2670
- };
2619
+ // The separator is and `or` as they are the same filter
2620
+ const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
2621
+
2622
+ /* The parenthesis involing the `queryString` are needed since they are all part of the
2623
+ * same filter so we need something to work with
2624
+ * (
2625
+ * (createdAt >= "2018-04-25T00:00:00.000+02:00" and createdAt <= "2018-04-25T23:59:59.999+02:00") o
2626
+ * (createdAt >= "2018-02-15T00:00:00.000+01:00" and createdAt <= "2018-02-15T23:59:59.999+01:00")
2627
+ * ) or some_more_filters
2628
+ */
2629
+ return queryString === '' ? null : `(${queryString})`;
2630
+ }
2631
+ function defaultFilterValidator$1(_ref2) {
2632
+ let type = _ref2.type,
2633
+ value = _ref2.value;
2634
+ if (type !== 'range' && (validateSingleFilter({
2635
+ value
2636
+ }) || !moment__default["default"](value).isValid())) return false;
2637
+ if (type === 'range' && (isEmpty$2({
2638
+ value
2639
+ }) || !moment__default["default"](value.from).isValid() || !moment__default["default"](value.to).isValid())) return false;
2640
+ return true;
2641
+ }
2642
+
2643
+ var localizedTextTransformer = localizedString => {
2644
+ var _context;
2645
+ return _mapInstanceProperty__default["default"](_context = _Object$keys__default["default"](localizedString)).call(_context, locale => `${locale} = "${localizedString[locale]}"`).join(' and ');
2646
+ };
2647
+
2648
+ const getCentAmountClause = (value, operator, locale) => `centAmount ${operator} ${uiKit.MoneyInput.convertToMoneyValue(value, locale).centAmount}`;
2649
+ function moneyTransformer(value, option, locale) {
2650
+ const clauses = [];
2651
+ if (option === FILTER_TYPES.range) {
2652
+ clauses[0] = `currencyCode = "${value.from.currencyCode}"`;
2653
+ clauses[1] = getCentAmountClause(value.from, '>=', locale);
2654
+ clauses[2] = getCentAmountClause(value.to, '<=', locale);
2655
+ return clauses.join(' and ');
2656
+ }
2657
+ clauses[0] = `currencyCode = "${value.currencyCode}"`;
2658
+ switch (option) {
2659
+ case FILTER_TYPES.lessThan:
2660
+ clauses[1] = getCentAmountClause(value, '<', locale);
2661
+ break;
2662
+ case FILTER_TYPES.moreThan:
2663
+ clauses[1] = getCentAmountClause(value, '>', locale);
2664
+ break;
2665
+ case FILTER_TYPES.equalTo:
2666
+ clauses[1] = getCentAmountClause(value, '=', locale);
2667
+ break;
2671
2668
  default:
2672
- throw new Error('Unexpected value type for money.');
2669
+ return '';
2673
2670
  }
2674
- };
2671
+ return clauses.join(' and ');
2672
+ }
2675
2673
 
2676
- /**
2677
- * converts the `changeValue` action to GraphQL actions variable
2678
- * @param {Object} actionPayload
2674
+ const formatTime = 'HH:mm:ss.SSS';
2675
+
2676
+ /* TimeInput only allows HH:mm:ss and adds the seconds as 00 and
2677
+ * the milliseconds always as 000.
2678
+ * This function returns the same time with the
2679
2679
  */
2680
- const convertChangeValueAction = actionPayload => {
2681
- const valueType = actionPayload.value.type;
2682
- const possibleTypeKeys = {
2683
- relative: ['permyriad'],
2684
- absolute: ['money'],
2685
- absoluteCart: ['money', 'applicationMode'],
2686
- fixed: ['money'],
2687
- fixedCart: ['money', 'applicationMode'],
2688
- giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
2689
- };
2690
- const filteredValue = pick__default["default"](actionPayload.value, possibleTypeKeys[valueType]);
2691
- if (filteredValue.money) {
2692
- var _context2;
2693
- const moneyFormatter = formatMoney$2(valueType);
2694
- filteredValue.money = _mapInstanceProperty__default["default"](_context2 = filteredValue.money).call(_context2, moneyFormatter);
2695
- }
2696
- return {
2697
- changeValue: {
2698
- value: {
2699
- [valueType]: filteredValue
2700
- }
2680
+ const getEndOfSecond = value => moment__default["default"](value, formatTime).endOf('minute').format(formatTime);
2681
+ const defaultFilterValidator = _ref => {
2682
+ let type = _ref.type,
2683
+ value = _ref.value;
2684
+ if (type !== FILTER_TYPES.range && validateSingleFilter({
2685
+ value
2686
+ })) return false;
2687
+ if (type === FILTER_TYPES.range && isEmpty$2({
2688
+ value
2689
+ })) return false;
2690
+ return true;
2691
+ };
2692
+ const timeTransformer = function (filterKey, filters) {
2693
+ let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator;
2694
+ const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref2 => {
2695
+ let type = _ref2.type,
2696
+ value = _ref2.value;
2697
+ if (!filterValidator({
2698
+ type,
2699
+ value
2700
+ })) return '';
2701
+ switch (type) {
2702
+ case FILTER_TYPES.lessThan:
2703
+ return `${filterKey} < "${value}"`;
2704
+ case FILTER_TYPES.moreThan:
2705
+ return `${filterKey} > "${value}"`;
2706
+ case FILTER_TYPES.equalTo:
2707
+ return oneLine__default["default"]`
2708
+ (${filterKey} >= "${value}"
2709
+ and ${filterKey} <= "${getEndOfSecond(value)}")
2710
+ `;
2711
+ case FILTER_TYPES.range:
2712
+ return oneLine__default["default"]`
2713
+ (${filterKey} >= "${value.from}"
2714
+ and ${filterKey} <= "${getEndOfSecond(value.to)}")
2715
+ `;
2716
+ default:
2717
+ return '';
2701
2718
  }
2702
- };
2719
+ });
2720
+
2721
+ // The separator is and `or` as they are the same filter
2722
+ const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
2723
+
2724
+ /* The parenthesis involing the `queryString` are needed since they are all part of the
2725
+ * same filter so we need something to work with
2726
+ * (
2727
+ * (pickUpTime >= "12:00" and pickUpTime <= "13:00") o
2728
+ * (pickUpTime >= "14:00" and pickUpTime <= "15:00")
2729
+ * ) or some_more_filters
2730
+ */
2731
+ return queryString === '' ? null : `(${queryString})`;
2703
2732
  };
2704
2733
 
2705
- /**
2706
- * This function changes any payload after the actions have been computed.
2707
- * Currently we only need to change the `setCustomField` action payload
2708
- * as its dynamic content can not be typed in SDL for the mutation.
2709
- */
2710
- const convertAction = (actionName, actionPayload) => {
2711
- var _context3, _context4, _context5, _context6, _context7;
2712
- const getNameFromPayload = payload => {
2713
- // changeName for `Organizations`
2714
- if (typeof payload.name === 'string') return payload;
2715
- // changeName for `UserProfile`
2716
- if (payload.firstName || payload.lastName) return payload;
2717
- // assume `changeName` for LocalizedString type
2718
- return {
2719
- name: l10n.transformLocalizedStringToLocalizedField(payload.name)
2720
- };
2721
- };
2722
- switch (actionName) {
2723
- case 'changeName':
2724
- return {
2725
- [actionName]: getNameFromPayload(actionPayload)
2726
- };
2727
- case 'setDescription':
2728
- case 'changeDescription':
2729
- return {
2730
- [actionName]: {
2731
- description: getIsLocalizedString(actionPayload.description) ? l10n.transformLocalizedStringToLocalizedField(actionPayload.description) : actionPayload.description
2732
- }
2733
- };
2734
- case 'setLocalizedDescription':
2735
- return {
2736
- [actionName]: {
2737
- localizedDescription: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedDescription)
2738
- }
2739
- };
2740
- case 'setName':
2741
- return {
2742
- [actionName]: getNameFromPayload(actionPayload)
2743
- };
2744
- case 'setLocalizedName':
2745
- return {
2746
- [actionName]: {
2747
- localizedName: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedName)
2748
- }
2749
- };
2750
- case 'setLineItemCustomField':
2751
- return {
2752
- [actionName]: {
2753
- lineItemId: actionPayload.lineItemId,
2754
- name: actionPayload.name,
2755
- value: _JSON$stringify__default["default"](actionPayload.value)
2756
- }
2757
- };
2758
- case 'setCustomLineItemCustomField':
2759
- return {
2760
- [actionName]: {
2761
- customLineItemId: actionPayload.customLineItemId,
2762
- name: actionPayload.name,
2763
- value: _JSON$stringify__default["default"](actionPayload.value)
2764
- }
2765
- };
2766
- case 'setCustomField':
2767
- return {
2768
- [actionName]: {
2769
- name: actionPayload.name,
2770
- value: _JSON$stringify__default["default"](actionPayload.value)
2771
- }
2772
- };
2773
- case 'setCustomType':
2774
- return {
2775
- [actionName]: {
2776
- typeId: actionPayload.type?.id,
2777
- fields: actionPayload.fields ? _mapInstanceProperty__default["default"](_context3 = _Object$entries__default["default"](actionPayload.fields)).call(_context3, _ref => {
2778
- let _ref2 = _slicedToArray(_ref, 2),
2779
- customField = _ref2[0],
2780
- value = _ref2[1];
2781
- return {
2782
- name: customField,
2783
- value: _JSON$stringify__default["default"](value)
2784
- };
2785
- }) : undefined
2786
- }
2787
- };
2788
- case 'removeLocation':
2789
- return {
2790
- [actionName]: {
2791
- location: {
2792
- country: actionPayload.location.country
2793
- }
2794
- }
2795
- };
2796
- case 'addLocation':
2797
- return {
2798
- [actionName]: {
2799
- location: {
2800
- country: actionPayload.location.country
2801
- }
2802
- }
2803
- };
2804
- case 'setGeoLocation':
2805
- return {
2806
- [actionName]: actionPayload?.geoLocation ? {
2807
- geoLocation: {
2808
- type: 'Point',
2809
- coordinates: [_parseFloat__default["default"](actionPayload.geoLocation?.longitude), _parseFloat__default["default"](actionPayload.geoLocation?.latitude)]
2810
- }
2811
- } : {
2812
- undefined
2813
- }
2814
- };
2815
- case 'changeLabel':
2816
- return {
2817
- changeLabel: {
2818
- attributeName: actionPayload.attributeName,
2819
- label: l10n.transformLocalizedStringToLocalizedField(actionPayload.label)
2820
- }
2821
- };
2822
- case 'setInputTip':
2823
- return {
2824
- setInputTip: {
2825
- attributeName: actionPayload.attributeName,
2826
- inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.inputTip)
2827
- }
2828
- };
2829
- case 'addAttributeDefinition':
2830
- return {
2831
- [actionName]: {
2832
- attributeDefinition: _objectSpread$16(_objectSpread$16({}, actionPayload.attribute), {}, {
2833
- label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
2834
- inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
2835
- type: createAttributeTypeValue(actionPayload.attribute)
2836
- })
2837
- }
2838
- };
2839
- case 'replaceTaxRate':
2840
- return {
2841
- [actionName]: {
2842
- taxRate: {
2843
- name: actionPayload.taxRate.name,
2844
- country: actionPayload.taxRate.country,
2845
- includedInPrice: actionPayload.taxRate.includedInPrice,
2846
- amount: actionPayload.taxRate.amount,
2847
- state: actionPayload.taxRate.state,
2848
- key: actionPayload.taxRate.key,
2849
- subRates: actionPayload.taxRate.subRates
2850
- },
2851
- taxRateId: actionPayload.taxRateId
2852
- }
2853
- };
2854
- case 'addZone':
2855
- return {
2856
- [actionName]: {
2857
- zone: {
2858
- id: actionPayload.zone.id,
2859
- typeId: actionPayload.zone.typeId
2860
- }
2861
- }
2862
- };
2863
- case 'removeZone':
2864
- return {
2865
- [actionName]: {
2866
- zone: {
2867
- id: actionPayload.zone.id,
2868
- typeId: actionPayload.zone.typeId
2869
- }
2870
- }
2871
- };
2872
- case 'changeTaxCategory':
2873
- return {
2874
- [actionName]: {
2875
- taxCategory: {
2876
- id: actionPayload.taxCategory.id,
2877
- typeId: actionPayload.taxCategory.typeId
2878
- }
2879
- }
2880
- };
2881
- case 'addShippingRate':
2882
- return {
2883
- [actionName]: {
2884
- zone: {
2885
- id: actionPayload.zone.id,
2886
- typeId: actionPayload.zone.typeId
2887
- },
2888
- shippingRate: {
2889
- price: {
2890
- centAmount: actionPayload.shippingRate.price.centAmount,
2891
- currencyCode: actionPayload.shippingRate.price.currencyCode
2892
- },
2893
- freeAbove: actionPayload.shippingRate.freeAbove ? {
2894
- centAmount: actionPayload.shippingRate.freeAbove.centAmount,
2895
- currencyCode: actionPayload.shippingRate.freeAbove.currencyCode
2896
- } : undefined,
2897
- tiers: actionPayload.shippingRate.tiers ? mapShippingRateTierToGraphQL(actionPayload.shippingRate.tiers) : undefined
2898
- }
2899
- }
2900
- };
2901
- case 'removeShippingRate':
2902
- return {
2903
- [actionName]: {
2904
- zone: {
2905
- id: actionPayload.zone.id,
2906
- typeId: actionPayload.zone.typeId
2907
- },
2908
- shippingRate: {
2909
- price: {
2910
- centAmount: actionPayload.shippingRate.price.centAmount,
2911
- currencyCode: actionPayload.shippingRate.price.currencyCode
2912
- },
2913
- freeAbove: actionPayload.shippingRate.freeAbove ? {
2914
- centAmount: actionPayload.shippingRate.freeAbove.centAmount,
2915
- currencyCode: actionPayload.shippingRate.freeAbove.currencyCode
2916
- } : undefined,
2917
- tiers: actionPayload.shippingRate.tiers ? mapShippingRateTierToGraphQL(actionPayload.shippingRate.tiers) : undefined
2918
- }
2919
- }
2920
- };
2921
- case 'changeValue':
2922
- return convertChangeValueAction(actionPayload);
2923
- // product-types -> attributes -> enum
2924
- case 'addLocalizedEnumValue':
2925
- return {
2926
- [actionName]: {
2927
- attributeName: actionPayload.attributeName,
2928
- value: _objectSpread$16(_objectSpread$16({}, actionPayload.value), {}, {
2929
- label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
2930
- })
2931
- }
2932
- };
2933
- case 'changeLocalizedEnumValueLabel':
2934
- return {
2935
- [actionName]: {
2936
- attributeName: actionPayload.attributeName,
2937
- newValue: _objectSpread$16(_objectSpread$16({}, actionPayload.newValue), {}, {
2938
- label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
2939
- })
2940
- }
2941
- };
2942
- case 'setShippingRateInputType':
2943
- return {
2944
- [actionName]: {
2945
- shippingRateInputType: actionPayload.shippingRateInputType?.type ? {
2946
- [actionPayload.shippingRateInputType.type]: {
2947
- values: actionPayload.shippingRateInputType.type === 'CartClassification' ? _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](actionPayload.shippingRateInputType)).call(_context4, value => ({
2948
- key: value.key,
2949
- label: value.allLocaleLabels
2950
- })) : undefined
2951
- }
2952
- } : undefined
2953
- }
2954
- };
2955
- case 'addCustomLineItem':
2956
- {
2957
- return {
2958
- [actionName]: {
2959
- slug: actionPayload.slug,
2960
- quantity: actionPayload.quantity,
2961
- name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
2962
- taxCategory: actionPayload.taxCategory,
2963
- money: {
2964
- [actionPayload.money.type]: _objectSpread$16({
2965
- centAmount: actionPayload.money.centAmount,
2966
- currencyCode: actionPayload.money.currencyCode
2967
- }, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
2968
- preciseAmount: actionPayload.money.preciseAmount,
2969
- fractionDigits: actionPayload.money.fractionDigits
2970
- })
2971
- }
2972
- }
2973
- };
2974
- }
2975
- case 'setDataFences':
2976
- return {
2977
- [actionName]: {
2978
- dataFences: _reduceInstanceProperty__default["default"](_context5 = actionPayload.dataFences).call(_context5, (nextDataFences, dataFence) => {
2979
- if (dataFence.type.toLowerCase() === 'store') return [...nextDataFences, {
2980
- [dataFence.type.toLowerCase()]: {
2981
- storeKeys: dataFence.storeKeys
2982
- }
2983
- }];
2984
- return nextDataFences;
2985
- }, [])
2986
- }
2987
- };
2988
- case 'changeTarget':
2989
- return {
2990
- [actionName]: {
2991
- target: {
2992
- [actionPayload.target.type]: _objectSpread$16(_objectSpread$16(_objectSpread$16({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
2993
- triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
2994
- [pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
2995
- }))
2996
- }), actionPayload.target.targetPattern && {
2997
- targetPattern: _mapInstanceProperty__default["default"](_context7 = actionPayload.target.targetPattern).call(_context7, pattern => ({
2998
- [pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
2999
- }))
3000
- })
3001
- }
3002
- }
3003
- };
3004
- case 'addAddress':
3005
- case 'changeAddress':
3006
- {
3007
- var _context8;
3008
- const _ref3 = actionPayload.address?.custom || {},
3009
- _ref3$fields = _ref3.fields,
3010
- fields = _ref3$fields === void 0 ? {} : _ref3$fields;
3011
- const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context8 = _Object$entries__default["default"](fields)).call(_context8, _ref4 => {
3012
- let _ref5 = _slicedToArray(_ref4, 2),
3013
- name = _ref5[0],
3014
- value = _ref5[1];
3015
- return {
3016
- name,
3017
- value: _JSON$stringify__default["default"](value)
3018
- };
3019
- });
3020
- const custom = actionPayload.address?.custom?.type?.id ? {
3021
- type: {
3022
- id: actionPayload.address.custom.type.id
3023
- },
3024
- fields: customFields
3025
- } : null;
3026
- return {
3027
- [actionName]: _objectSpread$16(_objectSpread$16({}, actionPayload), {}, {
3028
- address: _objectSpread$16(_objectSpread$16({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
3029
- custom
3030
- })
3031
- })
3032
- };
3033
- }
3034
- case 'setAddressCustomType':
3035
- {
3036
- var _context9;
3037
- const _ref6 = actionPayload || {},
3038
- addressId = _ref6.addressId,
3039
- _ref6$fields = _ref6.fields,
3040
- fields = _ref6$fields === void 0 ? {} : _ref6$fields,
3041
- type = _ref6.type;
3042
- const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context9 = _Object$entries__default["default"](fields)).call(_context9, _ref7 => {
3043
- let _ref8 = _slicedToArray(_ref7, 2),
3044
- name = _ref8[0],
3045
- value = _ref8[1];
3046
- return {
3047
- name,
3048
- value: _JSON$stringify__default["default"](value)
3049
- };
3050
- });
3051
- const customType = type?.id ? {
3052
- id: type.id
3053
- } : null;
3054
- return {
3055
- [actionName]: {
3056
- addressId,
3057
- fields: customFields,
3058
- type: customType
3059
- }
3060
- };
3061
- }
3062
- default:
3063
- return {
3064
- [actionName]: actionPayload
3065
- };
3066
- }
3067
- };
3068
- const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
3069
- let actionName = _ref9.action,
3070
- actionPayload = _objectWithoutProperties(_ref9, _excluded$d);
3071
- return [...previousActions, convertAction(actionName, actionPayload)];
3072
- }, []);
3073
- const extractErrorFromGraphQlResponse = graphQlResponse => {
3074
- if (graphQlResponse.networkError?.result?.errors?.length > 0) {
3075
- return graphQlResponse.networkError.result.errors;
3076
- }
3077
- if (graphQlResponse.graphQLErrors?.length > 0) {
3078
- return graphQlResponse.graphQLErrors;
3079
- }
3080
- return graphQlResponse;
3081
- };
3082
-
3083
- var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, arguments: [], 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: 160, source: { body: "query FetchRecurrencePolicies {\n recurrencePolicies {\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 } } } };
3084
- const isRecurringOrdersDisabledError = error => {
3085
- var _context;
3086
- 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.");
3087
- };
3088
- const useRecurrenceIntervals = () => {
3089
- const _useQuery = client.useQuery(FetchRecurrencePolicies, {
3090
- context: {
3091
- target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
3092
- },
3093
- fetchPolicy: 'cache-and-network'
3094
- }),
3095
- data = _useQuery.data,
3096
- loading = _useQuery.loading,
3097
- rawError = _useQuery.error;
3098
-
3099
- // @TODO: Remove these error checks when the feature is enabled by default
3100
- const extractedErrors = rawError ? extractErrorFromGraphQlResponse(rawError) : [];
3101
- const isRecurringOrdersDisabled = extractedErrors.length > 0 &&
3102
- // If the only error is a 403 with the specific message, we assume the feature is disabled
3103
- _everyInstanceProperty__default["default"](extractedErrors).call(extractedErrors, isRecurringOrdersDisabledError);
3104
- const error = isRecurringOrdersDisabled ? undefined : rawError;
3105
- return {
3106
- recurrencePolicies: data?.recurrencePolicies?.results ?? [],
3107
- loading,
3108
- error,
3109
- isRecurringOrdersDisabled
3110
- };
3111
- };
3112
-
3113
- const setToArray = function () {
3114
- let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
3115
- return `id in (${_mapInstanceProperty__default["default"](values).call(values, value => `"${value}"`).join(', ')})`;
3116
- };
3117
-
3118
- function capitalizeFirst(text) {
3119
- return text.charAt(0).toUpperCase() + _sliceInstanceProperty__default["default"](text).call(text, 1);
3120
- }
3121
-
3122
- const PRODUCT_STATUSES = {
3123
- PUBLISHED: 'published',
3124
- UNPUBLISHED: 'unpublished',
3125
- MODIFIED: 'modified'
3126
- };
3127
- const FILTER_TYPES = {
3128
- lessThan: 'lessThan',
3129
- moreThan: 'moreThan',
3130
- equalTo: 'equalTo',
3131
- range: 'range',
3132
- missing: 'missing',
3133
- missingIn: 'missingIn',
3134
- in: 'in'
3135
- };
3136
- const FIELD_TYPES = {
3137
- Money: 'Money',
3138
- LocalizedString: 'LocalizedString',
3139
- Time: 'Time',
3140
- DateTime: 'DateTime',
3141
- Boolean: 'Boolean',
3142
- String: 'String',
3143
- Enum: 'Enum',
3144
- LocalizedEnum: 'LocalizedEnum',
3145
- Number: 'Number',
3146
- Date: 'Date',
3147
- Reference: 'Reference',
3148
- Set: 'Set'
3149
- };
3150
- const PRECISION_TYPES = {
3151
- highPrecision: 'highPrecision',
3152
- centPrecision: 'centPrecision'
3153
- };
3154
- const ERROR_CODES = {
3155
- semanticError: 'SemanticError',
3156
- invalidInput: 'InvalidInput'
3157
- };
3158
- const DefaultPageSizes = [20, 50, 100];
3159
- DefaultPageSizes[0];
3160
-
3161
- const regexpData = /^data-/;
3162
- function filterDataAttributes(obj) {
3163
- var _context, _context2;
3164
- return _reduceInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](obj)).call(_context2, p => regexpData.test(p))).call(_context, (acc, p) => {
3165
- // eslint-disable-next-line no-param-reassign
3166
- acc[p] = obj[p];
3167
- return acc;
3168
- }, {});
3169
- }
3170
-
3171
- const invalidValues$1 = [null, undefined, ''];
3172
- function isEmpty$2(_ref) {
3173
- let value = _ref.value;
3174
- return _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value) || _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.from) && _includesInstanceProperty__default["default"](invalidValues$1).call(invalidValues$1, value.to);
3175
- }
3176
-
3177
- const invalidValues = [null, undefined, ''];
3178
- function validateSingleFilter(_ref) {
3179
- let value = _ref.value;
3180
- return _includesInstanceProperty__default["default"](invalidValues).call(invalidValues, value);
3181
- }
3182
-
3183
- const dateFormatDayStart$1 = 'YYYY-MM-DDT00:00:00.000';
3184
- const dateFormatDayEnd$1 = 'YYYY-MM-DDT23:59:59.999';
3185
- const getDateTimeInUTC = (date, timezone, format) => {
3186
- const dateFormat = 'YYYY-MM-DDTHH:mm:ss.SSS';
3187
- const momentDate = moment__default["default"](date);
3188
- // check if the date is date only or datetime
3189
- const noTimeSpecified = momentDate.hours() === 0 && momentDate.minutes() === 0 && momentDate.seconds() === 0;
3190
- // if it's a date then convert it to UTC datetime based on timezone
3191
- if (noTimeSpecified) {
3192
- const offset = moment__default["default"](date).tz(timezone)?.utcOffset() || 0;
3193
- const formattedDate = momentDate.format(format);
3194
- const formattedDateWithOffset = moment__default["default"](formattedDate).add(offset, 'minutes').format(dateFormat);
3195
- // console.log(formattedDateWithOffset);
3196
- return formattedDateWithOffset;
3197
- }
3198
- // if it's a datetime we assume that it's already in UTC
3199
- // and just return it
3200
- return date;
3201
- };
3202
- function dateTransformer$1(filterKey, filters) {
3203
- let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator$1;
3204
- const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
3205
- let type = _ref.type,
3206
- value = _ref.value,
3207
- timezone = _ref.timezone;
3208
- if (!filterValidator({
3209
- type,
3210
- value
3211
- })) return '';
3212
- switch (type) {
3213
- case FILTER_TYPES.lessThan:
3214
- return `${filterKey} < "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"`;
3215
- case FILTER_TYPES.moreThan:
3216
- return `${filterKey} > "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}"`;
3217
- case FILTER_TYPES.equalTo:
3218
- return oneLine__default["default"]`
3219
- (${filterKey} >= "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"
3220
- and ${filterKey} <= "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}")
3221
- `;
3222
- case FILTER_TYPES.range:
3223
- return oneLine__default["default"]`
3224
- (${filterKey} >= "${getDateTimeInUTC(value.from, timezone, dateFormatDayStart$1)}"
3225
- and ${filterKey} <= "${getDateTimeInUTC(value.to, timezone, dateFormatDayEnd$1)}")
3226
- `;
3227
- default:
3228
- return '';
3229
- }
3230
- });
3231
-
3232
- // The separator is and `or` as they are the same filter
3233
- const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
3234
-
3235
- /* The parenthesis involing the `queryString` are needed since they are all part of the
3236
- * same filter so we need something to work with
3237
- * (
3238
- * (createdAt >= "2018-04-25T00:00:00.000+02:00" and createdAt <= "2018-04-25T23:59:59.999+02:00") o
3239
- * (createdAt >= "2018-02-15T00:00:00.000+01:00" and createdAt <= "2018-02-15T23:59:59.999+01:00")
3240
- * ) or some_more_filters
3241
- */
3242
- return queryString === '' ? null : `(${queryString})`;
3243
- }
3244
- function defaultFilterValidator$1(_ref2) {
3245
- let type = _ref2.type,
3246
- value = _ref2.value;
3247
- if (type !== 'range' && (validateSingleFilter({
3248
- value
3249
- }) || !moment__default["default"](value).isValid())) return false;
3250
- if (type === 'range' && (isEmpty$2({
3251
- value
3252
- }) || !moment__default["default"](value.from).isValid() || !moment__default["default"](value.to).isValid())) return false;
3253
- return true;
3254
- }
3255
-
3256
- var localizedTextTransformer = localizedString => {
3257
- var _context;
3258
- return _mapInstanceProperty__default["default"](_context = _Object$keys__default["default"](localizedString)).call(_context, locale => `${locale} = "${localizedString[locale]}"`).join(' and ');
3259
- };
3260
-
3261
- const getCentAmountClause = (value, operator, locale) => `centAmount ${operator} ${uiKit.MoneyInput.convertToMoneyValue(value, locale).centAmount}`;
3262
- function moneyTransformer(value, option, locale) {
3263
- const clauses = [];
3264
- if (option === FILTER_TYPES.range) {
3265
- clauses[0] = `currencyCode = "${value.from.currencyCode}"`;
3266
- clauses[1] = getCentAmountClause(value.from, '>=', locale);
3267
- clauses[2] = getCentAmountClause(value.to, '<=', locale);
3268
- return clauses.join(' and ');
3269
- }
3270
- clauses[0] = `currencyCode = "${value.currencyCode}"`;
3271
- switch (option) {
3272
- case FILTER_TYPES.lessThan:
3273
- clauses[1] = getCentAmountClause(value, '<', locale);
3274
- break;
3275
- case FILTER_TYPES.moreThan:
3276
- clauses[1] = getCentAmountClause(value, '>', locale);
3277
- break;
3278
- case FILTER_TYPES.equalTo:
3279
- clauses[1] = getCentAmountClause(value, '=', locale);
3280
- break;
3281
- default:
3282
- return '';
3283
- }
3284
- return clauses.join(' and ');
3285
- }
3286
-
3287
- const formatTime = 'HH:mm:ss.SSS';
3288
-
3289
- /* TimeInput only allows HH:mm:ss and adds the seconds as 00 and
3290
- * the milliseconds always as 000.
3291
- * This function returns the same time with the
3292
- */
3293
- const getEndOfSecond = value => moment__default["default"](value, formatTime).endOf('minute').format(formatTime);
3294
- const defaultFilterValidator = _ref => {
3295
- let type = _ref.type,
3296
- value = _ref.value;
3297
- if (type !== FILTER_TYPES.range && validateSingleFilter({
3298
- value
3299
- })) return false;
3300
- if (type === FILTER_TYPES.range && isEmpty$2({
3301
- value
3302
- })) return false;
3303
- return true;
3304
- };
3305
- const timeTransformer = function (filterKey, filters) {
3306
- let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator;
3307
- const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref2 => {
3308
- let type = _ref2.type,
3309
- value = _ref2.value;
3310
- if (!filterValidator({
3311
- type,
3312
- value
3313
- })) return '';
3314
- switch (type) {
3315
- case FILTER_TYPES.lessThan:
3316
- return `${filterKey} < "${value}"`;
3317
- case FILTER_TYPES.moreThan:
3318
- return `${filterKey} > "${value}"`;
3319
- case FILTER_TYPES.equalTo:
3320
- return oneLine__default["default"]`
3321
- (${filterKey} >= "${value}"
3322
- and ${filterKey} <= "${getEndOfSecond(value)}")
3323
- `;
3324
- case FILTER_TYPES.range:
3325
- return oneLine__default["default"]`
3326
- (${filterKey} >= "${value.from}"
3327
- and ${filterKey} <= "${getEndOfSecond(value.to)}")
3328
- `;
3329
- default:
3330
- return '';
3331
- }
3332
- });
3333
-
3334
- // The separator is and `or` as they are the same filter
3335
- const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(' or ');
3336
-
3337
- /* The parenthesis involing the `queryString` are needed since they are all part of the
3338
- * same filter so we need something to work with
3339
- * (
3340
- * (pickUpTime >= "12:00" and pickUpTime <= "13:00") o
3341
- * (pickUpTime >= "14:00" and pickUpTime <= "15:00")
3342
- * ) or some_more_filters
3343
- */
3344
- return queryString === '' ? null : `(${queryString})`;
3345
- };
3346
-
3347
- function formatDateRangeValue(value, type) {
3348
- let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
3349
- locale: 'en',
3350
- timeZone: moment__default$1["default"].tz.guess()
2734
+ function formatDateRangeValue(value, type) {
2735
+ let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
2736
+ locale: 'en',
2737
+ timeZone: moment__default$1["default"].tz.guess()
3351
2738
  };
3352
2739
  if (value.from === value.to) return formatDateTime$1(type, value.from, options);
3353
2740
  if (value.from && value.to) return oneLine__default["default"]`
@@ -4552,8 +3939,8 @@ const getData = (code, field) => {
4552
3939
  };
4553
3940
  const getFractionDigit = code => getData(code, 'fractionDigit');
4554
3941
 
4555
- function ownKeys$15(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
4556
- function _objectSpread$15(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$15(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$15(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
3942
+ function ownKeys$18(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; }
3943
+ function _objectSpread$18(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$18(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$18(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4557
3944
  function formatMoneyRangeValue(value, intl) {
4558
3945
  if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
4559
3946
  if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
@@ -4563,7 +3950,7 @@ function formatMoneyRangeValue(value, intl) {
4563
3950
  return '';
4564
3951
  }
4565
3952
  function formatMoneyValue(amount, currency, intl) {
4566
- return formatMoney$1(_objectSpread$15({
3953
+ return formatMoney$2(_objectSpread$18({
4567
3954
  centAmount: amount,
4568
3955
  fractionDigits: getFractionDigit(currency)
4569
3956
  }, currency ? {
@@ -4578,15 +3965,15 @@ function getFractionedAmount(moneyValue) {
4578
3965
  const amount = moneyValue.type === PRECISION_TYPES.highPrecision ? moneyValue.preciseAmount : moneyValue.centAmount;
4579
3966
  return amount / 10 ** fractionDigits;
4580
3967
  }
4581
- function formatMoney$1(moneyValue, intl, options) {
4582
- return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$15({
3968
+ function formatMoney$2(moneyValue, intl, options) {
3969
+ return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$18({
4583
3970
  style: 'currency',
4584
3971
  currency: moneyValue.currencyCode,
4585
3972
  minimumFractionDigits: moneyValue.fractionDigits
4586
3973
  }, options));
4587
3974
  }
4588
3975
 
4589
- var messages$K = reactIntl.defineMessages({
3976
+ var messages$L = reactIntl.defineMessages({
4590
3977
  booleanYes: {
4591
3978
  id: 'AttributeTypeFormats.boolean.yes',
4592
3979
  description: 'The label for boolean attribute `true` value',
@@ -4626,10 +4013,10 @@ const formatLtext = _ref3 => {
4626
4013
  locale: language
4627
4014
  });
4628
4015
  };
4629
- const formatMoney = _ref4 => {
4016
+ const formatMoney$1 = _ref4 => {
4630
4017
  let value = _ref4.value,
4631
4018
  intl = _ref4.intl;
4632
- return formatMoney$1(value, intl);
4019
+ return formatMoney$2(value, intl);
4633
4020
  };
4634
4021
  const formatReference = _ref5 => {
4635
4022
  let value = _ref5.value;
@@ -4668,7 +4055,7 @@ const formatDateTime = _ref7 => {
4668
4055
  const formatBoolean = _ref8 => {
4669
4056
  let value = _ref8.value,
4670
4057
  intl = _ref8.intl;
4671
- return value ? intl.formatMessage(messages$K.booleanYes) : intl.formatMessage(messages$K.booleanNo);
4058
+ return value ? intl.formatMessage(messages$L.booleanYes) : intl.formatMessage(messages$L.booleanNo);
4672
4059
  };
4673
4060
  const formatNilType = _ref9 => {
4674
4061
  let value = _ref9.value,
@@ -4719,7 +4106,7 @@ const doNotFormat = _ref11 => {
4719
4106
  return value;
4720
4107
  };
4721
4108
  const getFormatter = type => {
4722
- if (isNil__default["default"](type)) return formatNilType;else if (type.name === 'nested') return formatNested;else if (type.name === 'set') return formatSet;else if (type.name === 'enum') return formatEnum;else if (type.name === 'lenum') return formatLenum;else if (type.name === 'ltext') return formatLtext;else if (type.name === 'money') return formatMoney;else if (type.name === 'reference') return formatReference;else if (type.name === 'date') return formatDate;else if (type.name === 'time') return doNotFormat;else if (type.name === 'datetime') return formatDateTime;else if (type.name === 'boolean') return formatBoolean;else if (type.name === 'text') return doNotFormat;else if (type.name === 'number') return doNotFormat;else return formatUnknown;
4109
+ if (isNil__default["default"](type)) return formatNilType;else if (type.name === 'nested') return formatNested;else if (type.name === 'set') return formatSet;else if (type.name === 'enum') return formatEnum;else if (type.name === 'lenum') return formatLenum;else if (type.name === 'ltext') return formatLtext;else if (type.name === 'money') return formatMoney$1;else if (type.name === 'reference') return formatReference;else if (type.name === 'date') return formatDate;else if (type.name === 'time') return doNotFormat;else if (type.name === 'datetime') return formatDateTime;else if (type.name === 'boolean') return formatBoolean;else if (type.name === 'text') return doNotFormat;else if (type.name === 'number') return doNotFormat;else return formatUnknown;
4723
4110
  };
4724
4111
  function formatAttribute(_ref12) {
4725
4112
  let type = _ref12.type,
@@ -4745,89 +4132,662 @@ function formatAttribute(_ref12) {
4745
4132
  });
4746
4133
  }
4747
4134
 
4748
- const attributeTypeNames = {
4749
- Boolean: 'boolean',
4750
- Date: 'date',
4751
- DateTime: 'datetime',
4752
- Enum: 'enum',
4753
- LocalizedEnum: 'lenum',
4754
- LocalizedString: 'ltext',
4755
- Money: 'money',
4756
- Nested: 'nested',
4757
- Reference: 'reference',
4758
- Set: 'set',
4759
- String: 'text',
4760
- Time: 'time',
4761
- Number: 'number'
4135
+ const attributeTypeNames = {
4136
+ Boolean: 'boolean',
4137
+ Date: 'date',
4138
+ DateTime: 'datetime',
4139
+ Enum: 'enum',
4140
+ LocalizedEnum: 'lenum',
4141
+ LocalizedString: 'ltext',
4142
+ Money: 'money',
4143
+ Nested: 'nested',
4144
+ Reference: 'reference',
4145
+ Set: 'set',
4146
+ String: 'text',
4147
+ Time: 'time',
4148
+ Number: 'number'
4149
+ };
4150
+ const convertToAttributeType = customFieldType => {
4151
+ if (isNil__default["default"](customFieldType)) return customFieldType;
4152
+ const attributeTypeName = attributeTypeNames[customFieldType.name];
4153
+ const elementTypeName = attributeTypeNames[customFieldType.elementType?.name];
4154
+ return {
4155
+ name: attributeTypeName,
4156
+ elementType: {
4157
+ name: elementTypeName
4158
+ }
4159
+ };
4160
+ };
4161
+ const inlineEnumValues = (type, value) => {
4162
+ if (isNil__default["default"](type)) return value;
4163
+ if (type.name === 'Set') {
4164
+ return _mapInstanceProperty__default["default"](value).call(value, setValue => inlineEnumValues(type.elementType, setValue));
4165
+ }
4166
+ if (type.name === 'Enum' || type.name === 'LocalizedEnum') {
4167
+ var _context;
4168
+ return _findInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](type)).call(_context, enumValue => enumValue.key === value);
4169
+ }
4170
+ return value;
4171
+ };
4172
+
4173
+ /**
4174
+ * Formats `Custom Fields`: https://docs.commercetools.com/api/projects/custom-fields
4175
+ * Despite having different names, most of `Custom Field` maps one-to-one with an appropriate
4176
+ * `Product Attribute Type`, hence we can reuse product attributes formatting logic.
4177
+ *
4178
+ * The only exception is `Enum` and `LEnum` types. Unlike when dealing with `Product Attribute Types`,
4179
+ * value in `Custom Fields` contains a key of an `Enum` entry, and not an entry itself.
4180
+ * Therefore, before passing value to attributes formatter we need to replace value with Enum entry.
4181
+ */
4182
+ function formatCustomField(_ref) {
4183
+ let type = _ref.type,
4184
+ value = _ref.value,
4185
+ intl = _ref.intl,
4186
+ language = _ref.language,
4187
+ languages = _ref.languages,
4188
+ userTimeZone = _ref.userTimeZone;
4189
+ const attributeType = convertToAttributeType(type);
4190
+ return formatAttribute({
4191
+ type: attributeType,
4192
+ value: inlineEnumValues(type, value),
4193
+ intl,
4194
+ language,
4195
+ languages,
4196
+ userTimeZone
4197
+ });
4198
+ }
4199
+
4200
+ // FIXME: delete once prefix search is supported in ctp api
4201
+
4202
+ // Currently prefix search of products in the ctp is not supported.
4203
+ // This is a temporary hack which should be deleted once the feature is
4204
+ // supported in ctp.
4205
+ // It mimics the prefix search feature by computing lower and upper bounds
4206
+ // related to the provided `input`.
4207
+ // usage:
4208
+ // If I want to do a prefix search of term 'F', I get first the bounds
4209
+ // const [lowerBound, upperBound] = getPrefixSearch('F');
4210
+ // and then use them in the search
4211
+ // e.g
4212
+ // where: `masterData(current(name(en >= "${lowerBound}" and en < "${upperBound}")))`
4213
+ const getPrefixSearchBounds = input => {
4214
+ const getNextCharacter = character => String.fromCharCode(character.charCodeAt() + 1);
4215
+ return [input, `${_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1))}`];
4216
+ };
4217
+ var getPrefixSearchBounds$1 = getPrefixSearchBounds;
4218
+
4219
+ const _excluded$f = ["action"];
4220
+ function ownKeys$17(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; }
4221
+ function _objectSpread$17(e) { for (var r = 1; r < arguments.length; r++) { var _context0, _context1; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context0 = ownKeys$17(Object(t), !0)).call(_context0, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context1 = ownKeys$17(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4222
+
4223
+ /**
4224
+ * Checks if a value is a LocalizedString
4225
+ *
4226
+ * { en: 'Hello' } -> true
4227
+ * 'Hello' -> false
4228
+ */
4229
+
4230
+ const getIsLocalizedString = maybeLocalizedString => {
4231
+ if (typeof maybeLocalizedString === 'string') return false;
4232
+ if (!maybeLocalizedString || typeof maybeLocalizedString === 'object' && _Object$keys__default["default"](maybeLocalizedString).length === 0) return false;
4233
+ return true;
4234
+ };
4235
+
4236
+ /**
4237
+ * Transforms a list of `CustomField` into a `CustomField` object
4238
+ *
4239
+ * [{ name: 'fieldA', value: 'Hello' }] -> { fieldA: 'Hello' }
4240
+ */
4241
+ const transformCustomFieldsRawToCustomFields = customFieldsRaw => {
4242
+ if (!customFieldsRaw || customFieldsRaw.length === 0) return null;
4243
+ return _reduceInstanceProperty__default["default"](customFieldsRaw).call(customFieldsRaw, (customFields, customField) => _objectSpread$17(_objectSpread$17({}, customFields), {}, {
4244
+ [customField.name]: customField.value
4245
+ }), {});
4246
+ };
4247
+
4248
+ // --- Types mapping ---
4249
+
4250
+ /**
4251
+ * Map category GraphQL shape with nameAllLocales to reference shape
4252
+ * Includes ancestors and parent
4253
+ *
4254
+ * @param {Object} category - A category result object from graphql
4255
+ * @return {Object} Category (as a REST API representation):
4256
+ * `{ id, obj: { id, name } }`
4257
+ */
4258
+ function transformLocalizedFieldsForCategory(category) {
4259
+ var _context;
4260
+ let transformationOptions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [{
4261
+ from: 'nameAllLocales',
4262
+ to: 'name'
4263
+ }];
4264
+ const transformedData = l10n.applyTransformedLocalizedFields(category, transformationOptions);
4265
+ const parent = category.parent ? transformLocalizedFieldsForCategory(category.parent) : null;
4266
+ const ancestors = category.ancestors ? _mapInstanceProperty__default["default"](_context = category.ancestors).call(_context, ancestor => transformLocalizedFieldsForCategory(ancestor)) : null;
4267
+ return _objectSpread$17(_objectSpread$17(_objectSpread$17({}, transformedData), parent ? {
4268
+ parent
4269
+ } : {}), ancestors ? {
4270
+ ancestors
4271
+ } : {});
4272
+ }
4273
+ function transformLocalizedFieldsForCartDiscount(cartDiscount) {
4274
+ const transformationOptions = [{
4275
+ from: 'nameAllLocales',
4276
+ to: 'name'
4277
+ }];
4278
+ return l10n.applyTransformedLocalizedFields(cartDiscount, transformationOptions);
4279
+ }
4280
+ function mapShippingRateTierToGraphQL(tiers) {
4281
+ return _reduceInstanceProperty__default["default"](tiers).call(tiers, (graphQlTiers, tier) => [...graphQlTiers, {
4282
+ [tier.type]: {
4283
+ price: tier.price ? {
4284
+ centAmount: tier.price.centAmount,
4285
+ currencyCode: tier.price.currencyCode
4286
+ } : undefined,
4287
+ minimumCentAmount: tier.minimumCentAmount,
4288
+ value: tier.value || undefined,
4289
+ priceFunction: tier.priceFunction ? {
4290
+ function: tier.priceFunction.function,
4291
+ currencyCode: tier.priceFunction.currencyCode
4292
+ } : undefined,
4293
+ score: tier.score
4294
+ }
4295
+ }], []);
4296
+ }
4297
+
4298
+ /**
4299
+ * NOTE:
4300
+ * This module massages update actions produced by the JS SDK
4301
+ * to be compatible with CTP GraphQL mutations. This logic should be
4302
+ * moved into the JS SDK once discounts is fully 100% migrated to
4303
+ * GraphQL or any other plugin/app needs this functionality. Until
4304
+ * then this serves as a collective set of requirements before
4305
+ * prematurely adding a not fully working set of conversions to the
4306
+ * JS SDK.
4307
+ */
4308
+
4309
+ const createAttributeTypeValue = attribute => {
4310
+ switch (attribute.type.name) {
4311
+ case 'set':
4312
+ return {
4313
+ set: {
4314
+ elementType: createAttributeTypeValue({
4315
+ type: attribute.type.elementType
4316
+ })
4317
+ }
4318
+ };
4319
+ case 'boolean':
4320
+ case 'date':
4321
+ case 'datetime':
4322
+ case 'ltext':
4323
+ case 'money':
4324
+ case 'number':
4325
+ case 'text':
4326
+ case 'time':
4327
+ return {
4328
+ [attribute.type.name]: {}
4329
+ };
4330
+ case 'enum':
4331
+ case 'lenum':
4332
+ return {
4333
+ [attribute.type.name]: {
4334
+ values: []
4335
+ }
4336
+ };
4337
+ case 'reference':
4338
+ {
4339
+ return {
4340
+ [attribute.type.name]: {
4341
+ referenceTypeId: attribute.type.referenceTypeId
4342
+ }
4343
+ };
4344
+ }
4345
+ default:
4346
+ return attribute.type;
4347
+ }
4762
4348
  };
4763
- const convertToAttributeType = customFieldType => {
4764
- if (isNil__default["default"](customFieldType)) return customFieldType;
4765
- const attributeTypeName = attributeTypeNames[customFieldType.name];
4766
- const elementTypeName = attributeTypeNames[customFieldType.elementType?.name];
4349
+
4350
+ /*
4351
+ * Fixed price supports high precision. Action format is nested with the
4352
+ * the type of the money. Absolute discount only works with cent precision,
4353
+ * hence the action structure is flat.
4354
+ */
4355
+ const formatMoney = valueType => money => {
4356
+ switch (valueType) {
4357
+ case 'fixed':
4358
+ case 'fixedCart':
4359
+ return {
4360
+ [money.type]: _objectSpread$17({
4361
+ centAmount: money.centAmount,
4362
+ currencyCode: money.currencyCode
4363
+ }, money.type === PRECISION_TYPES.highPrecision && {
4364
+ preciseAmount: money.preciseAmount,
4365
+ fractionDigits: money.fractionDigits
4366
+ })
4367
+ };
4368
+ case 'absolute':
4369
+ case 'absoluteCart':
4370
+ return {
4371
+ centAmount: money.centAmount,
4372
+ currencyCode: money.currencyCode
4373
+ };
4374
+ default:
4375
+ throw new Error('Unexpected value type for money.');
4376
+ }
4377
+ };
4378
+
4379
+ /**
4380
+ * converts the `changeValue` action to GraphQL actions variable
4381
+ * @param {Object} actionPayload
4382
+ */
4383
+ const convertChangeValueAction = actionPayload => {
4384
+ const valueType = actionPayload.value.type;
4385
+ const possibleTypeKeys = {
4386
+ relative: ['permyriad'],
4387
+ absolute: ['money'],
4388
+ absoluteCart: ['money', 'applicationMode'],
4389
+ fixed: ['money'],
4390
+ fixedCart: ['money', 'applicationMode'],
4391
+ giftLineItem: ['product', 'variantId', 'distributionChannel', 'supplyChannel', 'ResourceIdentifierInput']
4392
+ };
4393
+ const filteredValue = pick__default["default"](actionPayload.value, possibleTypeKeys[valueType]);
4394
+ if (filteredValue.money) {
4395
+ var _context2;
4396
+ const moneyFormatter = formatMoney(valueType);
4397
+ filteredValue.money = _mapInstanceProperty__default["default"](_context2 = filteredValue.money).call(_context2, moneyFormatter);
4398
+ }
4767
4399
  return {
4768
- name: attributeTypeName,
4769
- elementType: {
4770
- name: elementTypeName
4400
+ changeValue: {
4401
+ value: {
4402
+ [valueType]: filteredValue
4403
+ }
4771
4404
  }
4772
4405
  };
4773
4406
  };
4774
- const inlineEnumValues = (type, value) => {
4775
- if (isNil__default["default"](type)) return value;
4776
- if (type.name === 'Set') {
4777
- return _mapInstanceProperty__default["default"](value).call(value, setValue => inlineEnumValues(type.elementType, setValue));
4778
- }
4779
- if (type.name === 'Enum' || type.name === 'LocalizedEnum') {
4780
- var _context;
4781
- return _findInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](type)).call(_context, enumValue => enumValue.key === value);
4782
- }
4783
- return value;
4784
- };
4785
4407
 
4786
4408
  /**
4787
- * Formats `Custom Fields`: https://docs.commercetools.com/api/projects/custom-fields
4788
- * Despite having different names, most of `Custom Field` maps one-to-one with an appropriate
4789
- * `Product Attribute Type`, hence we can reuse product attributes formatting logic.
4790
- *
4791
- * The only exception is `Enum` and `LEnum` types. Unlike when dealing with `Product Attribute Types`,
4792
- * value in `Custom Fields` contains a key of an `Enum` entry, and not an entry itself.
4793
- * Therefore, before passing value to attributes formatter we need to replace value with Enum entry.
4409
+ * This function changes any payload after the actions have been computed.
4410
+ * Currently we only need to change the `setCustomField` action payload
4411
+ * as its dynamic content can not be typed in SDL for the mutation.
4794
4412
  */
4795
- function formatCustomField(_ref) {
4796
- let type = _ref.type,
4797
- value = _ref.value,
4798
- intl = _ref.intl,
4799
- language = _ref.language,
4800
- languages = _ref.languages,
4801
- userTimeZone = _ref.userTimeZone;
4802
- const attributeType = convertToAttributeType(type);
4803
- return formatAttribute({
4804
- type: attributeType,
4805
- value: inlineEnumValues(type, value),
4806
- intl,
4807
- language,
4808
- languages,
4809
- userTimeZone
4810
- });
4811
- }
4812
-
4813
- // FIXME: delete once prefix search is supported in ctp api
4814
-
4815
- // Currently prefix search of products in the ctp is not supported.
4816
- // This is a temporary hack which should be deleted once the feature is
4817
- // supported in ctp.
4818
- // It mimics the prefix search feature by computing lower and upper bounds
4819
- // related to the provided `input`.
4820
- // usage:
4821
- // If I want to do a prefix search of term 'F', I get first the bounds
4822
- // const [lowerBound, upperBound] = getPrefixSearch('F');
4823
- // and then use them in the search
4824
- // e.g
4825
- // where: `masterData(current(name(en >= "${lowerBound}" and en < "${upperBound}")))`
4826
- const getPrefixSearchBounds = input => {
4827
- const getNextCharacter = character => String.fromCharCode(character.charCodeAt() + 1);
4828
- return [input, `${_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1))}`];
4413
+ const convertAction = (actionName, actionPayload) => {
4414
+ var _context3, _context4, _context5, _context6, _context7;
4415
+ const getNameFromPayload = payload => {
4416
+ // changeName for `Organizations`
4417
+ if (typeof payload.name === 'string') return payload;
4418
+ // changeName for `UserProfile`
4419
+ if (payload.firstName || payload.lastName) return payload;
4420
+ // assume `changeName` for LocalizedString type
4421
+ return {
4422
+ name: l10n.transformLocalizedStringToLocalizedField(payload.name)
4423
+ };
4424
+ };
4425
+ switch (actionName) {
4426
+ case 'changeName':
4427
+ return {
4428
+ [actionName]: getNameFromPayload(actionPayload)
4429
+ };
4430
+ case 'setDescription':
4431
+ case 'changeDescription':
4432
+ return {
4433
+ [actionName]: {
4434
+ description: getIsLocalizedString(actionPayload.description) ? l10n.transformLocalizedStringToLocalizedField(actionPayload.description) : actionPayload.description
4435
+ }
4436
+ };
4437
+ case 'setLocalizedDescription':
4438
+ return {
4439
+ [actionName]: {
4440
+ localizedDescription: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedDescription)
4441
+ }
4442
+ };
4443
+ case 'setName':
4444
+ return {
4445
+ [actionName]: getNameFromPayload(actionPayload)
4446
+ };
4447
+ case 'setLocalizedName':
4448
+ return {
4449
+ [actionName]: {
4450
+ localizedName: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedName)
4451
+ }
4452
+ };
4453
+ case 'setSlug':
4454
+ return {
4455
+ [actionName]: {
4456
+ slug: l10n.transformLocalizedStringToLocalizedField(actionPayload.slug)
4457
+ }
4458
+ };
4459
+ case 'setLineItemCustomField':
4460
+ return {
4461
+ [actionName]: {
4462
+ lineItemId: actionPayload.lineItemId,
4463
+ name: actionPayload.name,
4464
+ value: _JSON$stringify__default["default"](actionPayload.value)
4465
+ }
4466
+ };
4467
+ case 'setCustomLineItemCustomField':
4468
+ return {
4469
+ [actionName]: {
4470
+ customLineItemId: actionPayload.customLineItemId,
4471
+ name: actionPayload.name,
4472
+ value: _JSON$stringify__default["default"](actionPayload.value)
4473
+ }
4474
+ };
4475
+ case 'setCustomField':
4476
+ return {
4477
+ [actionName]: {
4478
+ name: actionPayload.name,
4479
+ value: _JSON$stringify__default["default"](actionPayload.value)
4480
+ }
4481
+ };
4482
+ case 'setCustomType':
4483
+ return {
4484
+ [actionName]: {
4485
+ typeId: actionPayload.type?.id,
4486
+ fields: actionPayload.fields ? _mapInstanceProperty__default["default"](_context3 = _Object$entries__default["default"](actionPayload.fields)).call(_context3, _ref => {
4487
+ let _ref2 = _slicedToArray(_ref, 2),
4488
+ customField = _ref2[0],
4489
+ value = _ref2[1];
4490
+ return {
4491
+ name: customField,
4492
+ value: _JSON$stringify__default["default"](value)
4493
+ };
4494
+ }) : undefined
4495
+ }
4496
+ };
4497
+ case 'removeLocation':
4498
+ return {
4499
+ [actionName]: {
4500
+ location: {
4501
+ country: actionPayload.location.country
4502
+ }
4503
+ }
4504
+ };
4505
+ case 'addLocation':
4506
+ return {
4507
+ [actionName]: {
4508
+ location: {
4509
+ country: actionPayload.location.country
4510
+ }
4511
+ }
4512
+ };
4513
+ case 'setGeoLocation':
4514
+ return {
4515
+ [actionName]: actionPayload?.geoLocation ? {
4516
+ geoLocation: {
4517
+ type: 'Point',
4518
+ coordinates: [_parseFloat__default["default"](actionPayload.geoLocation?.longitude), _parseFloat__default["default"](actionPayload.geoLocation?.latitude)]
4519
+ }
4520
+ } : {
4521
+ undefined
4522
+ }
4523
+ };
4524
+ case 'changeLabel':
4525
+ return {
4526
+ changeLabel: {
4527
+ attributeName: actionPayload.attributeName,
4528
+ label: l10n.transformLocalizedStringToLocalizedField(actionPayload.label)
4529
+ }
4530
+ };
4531
+ case 'setInputTip':
4532
+ return {
4533
+ setInputTip: {
4534
+ attributeName: actionPayload.attributeName,
4535
+ inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.inputTip)
4536
+ }
4537
+ };
4538
+ case 'addAttributeDefinition':
4539
+ return {
4540
+ [actionName]: {
4541
+ attributeDefinition: _objectSpread$17(_objectSpread$17({}, actionPayload.attribute), {}, {
4542
+ label: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.label),
4543
+ inputTip: l10n.transformLocalizedStringToLocalizedField(actionPayload.attribute.inputTip),
4544
+ type: createAttributeTypeValue(actionPayload.attribute)
4545
+ })
4546
+ }
4547
+ };
4548
+ case 'replaceTaxRate':
4549
+ return {
4550
+ [actionName]: {
4551
+ taxRate: {
4552
+ name: actionPayload.taxRate.name,
4553
+ country: actionPayload.taxRate.country,
4554
+ includedInPrice: actionPayload.taxRate.includedInPrice,
4555
+ amount: actionPayload.taxRate.amount,
4556
+ state: actionPayload.taxRate.state,
4557
+ key: actionPayload.taxRate.key,
4558
+ subRates: actionPayload.taxRate.subRates
4559
+ },
4560
+ taxRateId: actionPayload.taxRateId
4561
+ }
4562
+ };
4563
+ case 'addZone':
4564
+ return {
4565
+ [actionName]: {
4566
+ zone: {
4567
+ id: actionPayload.zone.id,
4568
+ typeId: actionPayload.zone.typeId
4569
+ }
4570
+ }
4571
+ };
4572
+ case 'removeZone':
4573
+ return {
4574
+ [actionName]: {
4575
+ zone: {
4576
+ id: actionPayload.zone.id,
4577
+ typeId: actionPayload.zone.typeId
4578
+ }
4579
+ }
4580
+ };
4581
+ case 'changeTaxCategory':
4582
+ return {
4583
+ [actionName]: {
4584
+ taxCategory: {
4585
+ id: actionPayload.taxCategory.id,
4586
+ typeId: actionPayload.taxCategory.typeId
4587
+ }
4588
+ }
4589
+ };
4590
+ case 'addShippingRate':
4591
+ return {
4592
+ [actionName]: {
4593
+ zone: {
4594
+ id: actionPayload.zone.id,
4595
+ typeId: actionPayload.zone.typeId
4596
+ },
4597
+ shippingRate: {
4598
+ price: {
4599
+ centAmount: actionPayload.shippingRate.price.centAmount,
4600
+ currencyCode: actionPayload.shippingRate.price.currencyCode
4601
+ },
4602
+ freeAbove: actionPayload.shippingRate.freeAbove ? {
4603
+ centAmount: actionPayload.shippingRate.freeAbove.centAmount,
4604
+ currencyCode: actionPayload.shippingRate.freeAbove.currencyCode
4605
+ } : undefined,
4606
+ tiers: actionPayload.shippingRate.tiers ? mapShippingRateTierToGraphQL(actionPayload.shippingRate.tiers) : undefined
4607
+ }
4608
+ }
4609
+ };
4610
+ case 'removeShippingRate':
4611
+ return {
4612
+ [actionName]: {
4613
+ zone: {
4614
+ id: actionPayload.zone.id,
4615
+ typeId: actionPayload.zone.typeId
4616
+ },
4617
+ shippingRate: {
4618
+ price: {
4619
+ centAmount: actionPayload.shippingRate.price.centAmount,
4620
+ currencyCode: actionPayload.shippingRate.price.currencyCode
4621
+ },
4622
+ freeAbove: actionPayload.shippingRate.freeAbove ? {
4623
+ centAmount: actionPayload.shippingRate.freeAbove.centAmount,
4624
+ currencyCode: actionPayload.shippingRate.freeAbove.currencyCode
4625
+ } : undefined,
4626
+ tiers: actionPayload.shippingRate.tiers ? mapShippingRateTierToGraphQL(actionPayload.shippingRate.tiers) : undefined
4627
+ }
4628
+ }
4629
+ };
4630
+ case 'changeValue':
4631
+ return convertChangeValueAction(actionPayload);
4632
+ // product-types -> attributes -> enum
4633
+ case 'addLocalizedEnumValue':
4634
+ return {
4635
+ [actionName]: {
4636
+ attributeName: actionPayload.attributeName,
4637
+ value: _objectSpread$17(_objectSpread$17({}, actionPayload.value), {}, {
4638
+ label: l10n.transformLocalizedStringToLocalizedField(actionPayload.value.label)
4639
+ })
4640
+ }
4641
+ };
4642
+ case 'changeLocalizedEnumValueLabel':
4643
+ return {
4644
+ [actionName]: {
4645
+ attributeName: actionPayload.attributeName,
4646
+ newValue: _objectSpread$17(_objectSpread$17({}, actionPayload.newValue), {}, {
4647
+ label: l10n.transformLocalizedStringToLocalizedField(actionPayload.newValue.label)
4648
+ })
4649
+ }
4650
+ };
4651
+ case 'setShippingRateInputType':
4652
+ return {
4653
+ [actionName]: {
4654
+ shippingRateInputType: actionPayload.shippingRateInputType?.type ? {
4655
+ [actionPayload.shippingRateInputType.type]: {
4656
+ values: actionPayload.shippingRateInputType.type === 'CartClassification' ? _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](actionPayload.shippingRateInputType)).call(_context4, value => ({
4657
+ key: value.key,
4658
+ label: value.allLocaleLabels
4659
+ })) : undefined
4660
+ }
4661
+ } : undefined
4662
+ }
4663
+ };
4664
+ case 'addCustomLineItem':
4665
+ {
4666
+ return {
4667
+ [actionName]: {
4668
+ slug: actionPayload.slug,
4669
+ quantity: actionPayload.quantity,
4670
+ name: l10n.transformLocalizedStringToLocalizedField(actionPayload.name),
4671
+ taxCategory: actionPayload.taxCategory,
4672
+ money: {
4673
+ [actionPayload.money.type]: _objectSpread$17({
4674
+ centAmount: actionPayload.money.centAmount,
4675
+ currencyCode: actionPayload.money.currencyCode
4676
+ }, actionPayload.money.type === PRECISION_TYPES.highPrecision && {
4677
+ preciseAmount: actionPayload.money.preciseAmount,
4678
+ fractionDigits: actionPayload.money.fractionDigits
4679
+ })
4680
+ }
4681
+ }
4682
+ };
4683
+ }
4684
+ case 'setDataFences':
4685
+ return {
4686
+ [actionName]: {
4687
+ dataFences: _reduceInstanceProperty__default["default"](_context5 = actionPayload.dataFences).call(_context5, (nextDataFences, dataFence) => {
4688
+ if (dataFence.type.toLowerCase() === 'store') return [...nextDataFences, {
4689
+ [dataFence.type.toLowerCase()]: {
4690
+ storeKeys: dataFence.storeKeys
4691
+ }
4692
+ }];
4693
+ return nextDataFences;
4694
+ }, [])
4695
+ }
4696
+ };
4697
+ case 'changeTarget':
4698
+ return {
4699
+ [actionName]: {
4700
+ target: {
4701
+ [actionPayload.target.type]: _objectSpread$17(_objectSpread$17(_objectSpread$17({}, omit__default["default"](actionPayload.target, ['type', '__typename'])), actionPayload.target.triggerPattern && {
4702
+ triggerPattern: _mapInstanceProperty__default["default"](_context6 = actionPayload.target.triggerPattern).call(_context6, pattern => ({
4703
+ [pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
4704
+ }))
4705
+ }), actionPayload.target.targetPattern && {
4706
+ targetPattern: _mapInstanceProperty__default["default"](_context7 = actionPayload.target.targetPattern).call(_context7, pattern => ({
4707
+ [pattern.type]: omit__default["default"](pattern, ['type', '__typename'])
4708
+ }))
4709
+ })
4710
+ }
4711
+ }
4712
+ };
4713
+ case 'addAddress':
4714
+ case 'changeAddress':
4715
+ {
4716
+ var _context8;
4717
+ const _ref3 = actionPayload.address?.custom || {},
4718
+ _ref3$fields = _ref3.fields,
4719
+ fields = _ref3$fields === void 0 ? {} : _ref3$fields;
4720
+ const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context8 = _Object$entries__default["default"](fields)).call(_context8, _ref4 => {
4721
+ let _ref5 = _slicedToArray(_ref4, 2),
4722
+ name = _ref5[0],
4723
+ value = _ref5[1];
4724
+ return {
4725
+ name,
4726
+ value: _JSON$stringify__default["default"](value)
4727
+ };
4728
+ });
4729
+ const custom = actionPayload.address?.custom?.type?.id ? {
4730
+ type: {
4731
+ id: actionPayload.address.custom.type.id
4732
+ },
4733
+ fields: customFields
4734
+ } : null;
4735
+ return {
4736
+ [actionName]: _objectSpread$17(_objectSpread$17({}, actionPayload), {}, {
4737
+ address: _objectSpread$17(_objectSpread$17({}, omit__default["default"](actionPayload.address, ['__typename'])), {}, {
4738
+ custom
4739
+ })
4740
+ })
4741
+ };
4742
+ }
4743
+ case 'setAddressCustomType':
4744
+ {
4745
+ var _context9;
4746
+ const _ref6 = actionPayload || {},
4747
+ addressId = _ref6.addressId,
4748
+ _ref6$fields = _ref6.fields,
4749
+ fields = _ref6$fields === void 0 ? {} : _ref6$fields,
4750
+ type = _ref6.type;
4751
+ const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context9 = _Object$entries__default["default"](fields)).call(_context9, _ref7 => {
4752
+ let _ref8 = _slicedToArray(_ref7, 2),
4753
+ name = _ref8[0],
4754
+ value = _ref8[1];
4755
+ return {
4756
+ name,
4757
+ value: _JSON$stringify__default["default"](value)
4758
+ };
4759
+ });
4760
+ const customType = type?.id ? {
4761
+ id: type.id
4762
+ } : null;
4763
+ return {
4764
+ [actionName]: {
4765
+ addressId,
4766
+ fields: customFields,
4767
+ type: customType
4768
+ }
4769
+ };
4770
+ }
4771
+ default:
4772
+ return {
4773
+ [actionName]: actionPayload
4774
+ };
4775
+ }
4776
+ };
4777
+ const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["default"](actions).call(actions, (previousActions, _ref9) => {
4778
+ let actionName = _ref9.action,
4779
+ actionPayload = _objectWithoutProperties(_ref9, _excluded$f);
4780
+ return [...previousActions, convertAction(actionName, actionPayload)];
4781
+ }, []);
4782
+ const extractErrorFromGraphQlResponse = graphQlResponse => {
4783
+ if (graphQlResponse.networkError?.result?.errors?.length > 0) {
4784
+ return graphQlResponse.networkError.result.errors;
4785
+ }
4786
+ if (graphQlResponse.graphQLErrors?.length > 0) {
4787
+ return graphQlResponse.graphQLErrors;
4788
+ }
4789
+ return graphQlResponse;
4829
4790
  };
4830
- var getPrefixSearchBounds$1 = getPrefixSearchBounds;
4831
4791
 
4832
4792
  const isUUID = string => /^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(string);
4833
4793
  var isUUID$1 = isUUID;
@@ -4882,8 +4842,8 @@ function omitDeep(obj, fieldsToOmit) {
4882
4842
  return originalOmitDeep__default["default"](obj, fieldsToOmit);
4883
4843
  }
4884
4844
 
4885
- function ownKeys$14(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; }
4886
- function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$14(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$14(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4845
+ function ownKeys$16(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; }
4846
+ function _objectSpread$16(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$16(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$16(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4887
4847
  function getPriceChannelName(price) {
4888
4848
  return price.channel?.name ?? price.channel?.key ?? null;
4889
4849
  }
@@ -4895,11 +4855,11 @@ function getDiscountValue(price) {
4895
4855
  } else if (price.value?.type === PRECISION_TYPES.highPrecision && price.discounted?.value?.type === PRECISION_TYPES.centPrecision) {
4896
4856
  fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
4897
4857
  }
4898
- return price.discounted ? _objectSpread$14(_objectSpread$14({}, price.value), {}, {
4858
+ return price.discounted ? _objectSpread$16(_objectSpread$16({}, price.value), {}, {
4899
4859
  fractionedAmount,
4900
4860
  centAmount: price.value.centAmount - price.discounted.value.centAmount,
4901
4861
  preciseAmount
4902
- }) : _objectSpread$14(_objectSpread$14({}, price.value), {}, {
4862
+ }) : _objectSpread$16(_objectSpread$16({}, price.value), {}, {
4903
4863
  centAmount: 0
4904
4864
  });
4905
4865
  }
@@ -4930,7 +4890,7 @@ function getNetUnitPrice(_ref) {
4930
4890
  }
4931
4891
  let preciseAmount;
4932
4892
  if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
4933
- return _objectSpread$14(_objectSpread$14({}, price.value), {}, {
4893
+ return _objectSpread$16(_objectSpread$16({}, price.value), {}, {
4934
4894
  centAmount,
4935
4895
  preciseAmount
4936
4896
  });
@@ -4946,7 +4906,7 @@ function getNetUnitPrice(_ref) {
4946
4906
  }
4947
4907
  let preciseAmount;
4948
4908
  if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
4949
- return _objectSpread$14(_objectSpread$14({}, price.value), {}, {
4909
+ return _objectSpread$16(_objectSpread$16({}, price.value), {}, {
4950
4910
  centAmount,
4951
4911
  preciseAmount
4952
4912
  });
@@ -4958,7 +4918,7 @@ function getMinimumPricesByCurrencyCode(prices) {
4958
4918
  const currencyCode = price.value.currencyCode;
4959
4919
  const fractionedAmount = getFractionedAmount(price.value);
4960
4920
  if (currencyCode && !isNil__default["default"](fractionedAmount)) {
4961
- if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$14(_objectSpread$14({}, minPrices), {}, {
4921
+ if (!minPrices[currencyCode] || fractionedAmount < getFractionedAmount(minPrices[currencyCode])) return _objectSpread$16(_objectSpread$16({}, minPrices), {}, {
4962
4922
  [currencyCode]: price.value
4963
4923
  });
4964
4924
  }
@@ -4967,8 +4927,8 @@ function getMinimumPricesByCurrencyCode(prices) {
4967
4927
  return _Object$values__default["default"](minPricesByCurrency);
4968
4928
  }
4969
4929
 
4970
- function ownKeys$13(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; }
4971
- function _objectSpread$13(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$13(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$13(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4930
+ function ownKeys$15(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
4931
+ function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$15(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$15(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4972
4932
  const transformCustomFieldFromGraphQLResponse = resource => {
4973
4933
  var _context, _context4;
4974
4934
  return {
@@ -4983,14 +4943,14 @@ const transformCustomFieldFromGraphQLResponse = resource => {
4983
4943
  return {
4984
4944
  name: fieldDefinition.name,
4985
4945
  required: fieldDefinition.required,
4986
- type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$13(_objectSpread$13({}, fieldDefinition.type), {}, {
4987
- elementType: _objectSpread$13(_objectSpread$13({}, fieldDefinition.type.elementType), {}, {
4946
+ type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$15(_objectSpread$15({}, fieldDefinition.type), {}, {
4947
+ elementType: _objectSpread$15(_objectSpread$15({}, fieldDefinition.type.elementType), {}, {
4988
4948
  values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
4989
4949
  key: value.key,
4990
4950
  label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
4991
4951
  }))
4992
4952
  })
4993
- }) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$13(_objectSpread$13({}, fieldDefinition.type), {}, {
4953
+ }) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$15(_objectSpread$15({}, fieldDefinition.type), {}, {
4994
4954
  values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
4995
4955
  key: value.key,
4996
4956
  label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
@@ -5001,7 +4961,7 @@ const transformCustomFieldFromGraphQLResponse = resource => {
5001
4961
  })
5002
4962
  }
5003
4963
  },
5004
- fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$13(_objectSpread$13({}, fields), {}, {
4964
+ fields: _reduceInstanceProperty__default["default"](_context4 = resource.custom.customFieldsRaw).call(_context4, (fields, customField) => _objectSpread$15(_objectSpread$15({}, fields), {}, {
5005
4965
  [customField.name]: customField.value
5006
4966
  }), {})
5007
4967
  };
@@ -5013,7 +4973,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
5013
4973
  // Incase the product selection is not missing or if the current project dose not yet have access to the feature,
5014
4974
  // in either case we return null
5015
4975
  if (!productSelection) return null;
5016
- return _objectSpread$13(_objectSpread$13({}, l10n.applyTransformedLocalizedFields(productSelection, [{
4976
+ return _objectSpread$15(_objectSpread$15({}, l10n.applyTransformedLocalizedFields(productSelection, [{
5017
4977
  from: 'nameAllLocales',
5018
4978
  to: 'name'
5019
4979
  }])), {}, {
@@ -5036,8 +4996,8 @@ const transformAllToProperNounCase = text => {
5036
4996
  return _mapInstanceProperty__default["default"](_context = text.split(' ')).call(_context, term => transformToProperNounCase(term)).join(' ');
5037
4997
  };
5038
4998
 
5039
- function ownKeys$12(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; }
5040
- function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$12(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$12(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4999
+ function ownKeys$14(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; }
5000
+ function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$14(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$14(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5041
5001
  const REGEX_ISO8601 = /(\d{4}-\d{2}-\d{2}[T]\d{2}:\d{2}:\d{2}(\.\d{3}[Z]?))/;
5042
5002
  const REGEX_TIME = /\d{2}:\d{2}/;
5043
5003
  const REGEX_DATE = /\d{4}-\d{2}-\d{2}/;
@@ -5054,7 +5014,7 @@ function filterCustomTypeUpdateActionValues() {
5054
5014
  if (updateAction.action === 'setCustomField' && _Array$isArray__default["default"](updateAction.value)) {
5055
5015
  const definition = _findInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, field => field.name === updateAction.name);
5056
5016
  const definitionName = definition.type.elementType.name;
5057
- return _objectSpread$12(_objectSpread$12({}, updateAction), {}, {
5017
+ return _objectSpread$14(_objectSpread$14({}, updateAction), {}, {
5058
5018
  value: filterNotDefinedValues(updateAction.value, definitionName)
5059
5019
  });
5060
5020
  }
@@ -5227,7 +5187,7 @@ function uniqueObjects(items) {
5227
5187
 
5228
5188
  */
5229
5189
 
5230
- const messages$J = reactIntl.defineMessages({
5190
+ const messages$K = reactIntl.defineMessages({
5231
5191
  unique: {
5232
5192
  id: 'Validation.unique',
5233
5193
  description: 'An error message to show if the field must be unique',
@@ -5269,7 +5229,7 @@ const messages$J = reactIntl.defineMessages({
5269
5229
  defaultMessage: 'Invalid ID format. Please enter a valid ID.'
5270
5230
  }
5271
5231
  });
5272
- var validationMessages = messages$J;
5232
+ var validationMessages = messages$K;
5273
5233
 
5274
5234
  function getIndexesOfInvalidValues(values) {
5275
5235
  let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
@@ -5528,7 +5488,7 @@ function ReferenceSearch(props) {
5528
5488
  });
5529
5489
  }
5530
5490
 
5531
- const messages$H = reactIntl.defineMessages({
5491
+ const messages$I = reactIntl.defineMessages({
5532
5492
  placeholder: {
5533
5493
  id: 'CartDiscountReferenceSearch.placeholder',
5534
5494
  description: 'Placeholder for search for a cart discount',
@@ -5555,10 +5515,10 @@ const messages$H = reactIntl.defineMessages({
5555
5515
  defaultMessage: 'Enter search term'
5556
5516
  }
5557
5517
  });
5558
- var messages$I = messages$H;
5518
+ var messages$J = messages$I;
5559
5519
 
5560
- 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; }
5561
- 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; }
5520
+ function ownKeys$13(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; }
5521
+ function _objectSpread$13(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$13(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$13(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5562
5522
  function Option$1(props) {
5563
5523
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
5564
5524
  language: applicationContext.dataLocale,
@@ -5569,7 +5529,7 @@ function Option$1(props) {
5569
5529
  const _useIntl = reactIntl.useIntl(),
5570
5530
  formatMessage = _useIntl.formatMessage;
5571
5531
  const cartDiscount = props.data;
5572
- return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$11(_objectSpread$11({}, props), {}, {
5532
+ return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$13(_objectSpread$13({}, props), {}, {
5573
5533
  children: jsxRuntime.jsxs("div", {
5574
5534
  "data-testid": "cart-discount-option",
5575
5535
  children: [jsxRuntime.jsx(uiKit.Text.Detail, {
@@ -5580,14 +5540,14 @@ function Option$1(props) {
5580
5540
  fallbackOrder: languages
5581
5541
  })
5582
5542
  }), jsxRuntime.jsxs(uiKit.Text.Detail, {
5583
- children: [formatMessage(messages$I.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
5543
+ children: [formatMessage(messages$J.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
5584
5544
  })]
5585
5545
  })
5586
5546
  }));
5587
5547
  }
5588
5548
 
5589
- function ownKeys$10(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; }
5590
- function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$10(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$10(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5549
+ function ownKeys$12(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
5550
+ function _objectSpread$12(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$12(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$12(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5591
5551
  var CartDiscountsCount$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 425, source: { body: "query SearchCartDiscount($where: String) {\n cartDiscounts(limit: 500, where: $where) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n\nquery FetchCartDiscountById($cartDiscountId: String!) {\n cartDiscount(id: $cartDiscountId) {\n id\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
5592
5552
  const returnNullIfEmpty = value => value && value.id === '' ? null : value;
5593
5553
  const filterOption$1 = (option, text) => {
@@ -5613,7 +5573,7 @@ function CartDiscountReferenceSearch(props) {
5613
5573
  })),
5614
5574
  language = _useApplicationContex.language,
5615
5575
  languages = _useApplicationContex.languages;
5616
- const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$10(_objectSpread$10({}, cartDiscount), {}, {
5576
+ const mapItemToOption = React.useCallback(cartDiscount => _objectSpread$12(_objectSpread$12({}, cartDiscount), {}, {
5617
5577
  value: cartDiscount.id,
5618
5578
  key: cartDiscount.key,
5619
5579
  label: l10n.formatLocalizedString(cartDiscount, {
@@ -5656,10 +5616,10 @@ function CartDiscountReferenceSearch(props) {
5656
5616
  onBlur: props.onBlur,
5657
5617
  onChange: props.onChange,
5658
5618
  value: returnNullIfEmpty(props.value),
5659
- placeholderLabel: formatMessage(messages$I.placeholder),
5660
- searchPromptLabel: formatMessage(messages$I.searchPrompt),
5661
- noResultsLabel: formatMessage(messages$I.noResults),
5662
- referenceIsMissingLabel: formatMessage(messages$I.isMissing),
5619
+ placeholderLabel: formatMessage(messages$J.placeholder),
5620
+ searchPromptLabel: formatMessage(messages$J.searchPrompt),
5621
+ noResultsLabel: formatMessage(messages$J.noResults),
5622
+ referenceIsMissingLabel: formatMessage(messages$J.isMissing),
5663
5623
  mapItemToOption: mapItemToOption,
5664
5624
  loadItemsBySearchTerm: loadItemsBySearchTerm,
5665
5625
  loadItemsByIds: loadItemsByIds,
@@ -5669,7 +5629,7 @@ function CartDiscountReferenceSearch(props) {
5669
5629
  });
5670
5630
  }
5671
5631
 
5672
- const messages$F = reactIntl.defineMessages({
5632
+ const messages$G = reactIntl.defineMessages({
5673
5633
  placeholder: {
5674
5634
  id: 'CategoryReferenceSearch.placeholder',
5675
5635
  description: 'Placeholder for search for a category',
@@ -5701,10 +5661,10 @@ const messages$F = reactIntl.defineMessages({
5701
5661
  defaultMessage: 'Parent Category'
5702
5662
  }
5703
5663
  });
5704
- var messages$G = messages$F;
5664
+ var messages$H = messages$G;
5705
5665
 
5706
- 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; }
5707
- 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; }
5666
+ 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; }
5667
+ 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; }
5708
5668
  function Option(props) {
5709
5669
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
5710
5670
  language: applicationContext.dataLocale,
@@ -5715,7 +5675,7 @@ function Option(props) {
5715
5675
  const _useIntl = reactIntl.useIntl(),
5716
5676
  formatMessage = _useIntl.formatMessage;
5717
5677
  const category = props.data;
5718
- return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$$(_objectSpread$$({}, props), {}, {
5678
+ return jsxRuntime.jsx(uiKit.AsyncSelectInput.Option, _objectSpread$11(_objectSpread$11({}, props), {}, {
5719
5679
  children: jsxRuntime.jsxs("div", {
5720
5680
  "data-testid": "category-option",
5721
5681
  children: [jsxRuntime.jsx(uiKit.Text.Body, {
@@ -5726,7 +5686,7 @@ function Option(props) {
5726
5686
  fallbackOrder: languages
5727
5687
  })
5728
5688
  }), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
5729
- children: `${formatMessage(messages$G.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
5689
+ children: `${formatMessage(messages$H.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
5730
5690
  key: 'name',
5731
5691
  locale: language,
5732
5692
  fallbackOrder: languages
@@ -5738,14 +5698,14 @@ function Option(props) {
5738
5698
  fallbackOrder: languages
5739
5699
  })}`
5740
5700
  }), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
5741
- children: `${formatMessage(messages$G.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
5701
+ children: `${formatMessage(messages$H.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
5742
5702
  })]
5743
5703
  })
5744
5704
  }));
5745
5705
  }
5746
5706
 
5747
- 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; }
5748
- 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; }
5707
+ function ownKeys$10(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; }
5708
+ function _objectSpread$10(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$10(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$10(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5749
5709
  const filterOption = () => true;
5750
5710
  function CategoryReferenceSearch(props) {
5751
5711
  const _useIntl = reactIntl.useIntl(),
@@ -5757,7 +5717,7 @@ function CategoryReferenceSearch(props) {
5757
5717
  })),
5758
5718
  language = _useApplicationContex.language,
5759
5719
  languages = _useApplicationContex.languages;
5760
- const mapItemToOption = React.useCallback(category => _objectSpread$_(_objectSpread$_({}, category), {}, {
5720
+ const mapItemToOption = React.useCallback(category => _objectSpread$10(_objectSpread$10({}, category), {}, {
5761
5721
  value: category.id,
5762
5722
  label: l10n.formatLocalizedString(category, {
5763
5723
  key: 'name',
@@ -5775,7 +5735,7 @@ function CategoryReferenceSearch(props) {
5775
5735
  }), [apolloClient]);
5776
5736
  return jsxRuntime.jsx(ReferenceSearch, {
5777
5737
  id: props.id,
5778
- components: _objectSpread$_({
5738
+ components: _objectSpread$10({
5779
5739
  Option
5780
5740
  }, props.components),
5781
5741
  isClearable: props.isClearable,
@@ -5786,10 +5746,10 @@ function CategoryReferenceSearch(props) {
5786
5746
  onBlur: props.onBlur,
5787
5747
  onChange: props.onChange,
5788
5748
  value: props.value,
5789
- placeholderLabel: formatMessage(messages$G.placeholder),
5790
- searchPromptLabel: formatMessage(messages$G.searchPrompt),
5791
- noResultsLabel: formatMessage(messages$G.noResults),
5792
- referenceIsMissingLabel: formatMessage(messages$G.isMissing),
5749
+ placeholderLabel: formatMessage(messages$H.placeholder),
5750
+ searchPromptLabel: formatMessage(messages$H.searchPrompt),
5751
+ noResultsLabel: formatMessage(messages$H.noResults),
5752
+ referenceIsMissingLabel: formatMessage(messages$H.isMissing),
5793
5753
  mapItemToOption: mapItemToOption,
5794
5754
  loadItemsBySearchTerm: loadItemsBySearchTerm,
5795
5755
  loadItemsByIds: loadItemsByIds,
@@ -5814,9 +5774,9 @@ function useCachedCategoryOptions(ids) {
5814
5774
  }]));
5815
5775
  }
5816
5776
 
5817
- const _excluded$c = ["type"];
5818
- function ownKeys$Z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
5819
- function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5777
+ const _excluded$e = ["type"];
5778
+ 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; }
5779
+ 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; }
5820
5780
  var styles$g = {
5821
5781
  "button": "button-module__button___1OzVf",
5822
5782
  "cancel": "button-module__cancel___1-jYL button-module__button___1OzVf",
@@ -5845,7 +5805,7 @@ var styles$g = {
5845
5805
  const Button = _ref => {
5846
5806
  let _ref$type = _ref.type,
5847
5807
  type = _ref$type === void 0 ? 'button' : _ref$type,
5848
- props = _objectWithoutProperties(_ref, _excluded$c);
5808
+ props = _objectWithoutProperties(_ref, _excluded$e);
5849
5809
  const className = props.className,
5850
5810
  onClick = props.onClick,
5851
5811
  isDisabled = props.isDisabled,
@@ -5853,7 +5813,7 @@ const Button = _ref => {
5853
5813
 
5854
5814
  // Pass only `data-*` props
5855
5815
  const dataProps = filterDataAttributes(props);
5856
- return jsxRuntime.jsx("button", _objectSpread$Z(_objectSpread$Z({
5816
+ return jsxRuntime.jsx("button", _objectSpread$$(_objectSpread$$({
5857
5817
  onClick: isDisabled ? null : onClick,
5858
5818
  type: type,
5859
5819
  className: classnames__default["default"](styles$g.button, isDisabled ? styles$g.disabled : null, className),
@@ -5866,7 +5826,7 @@ const Button = _ref => {
5866
5826
  Button.displayName = 'Button';
5867
5827
  var Button$1 = Button;
5868
5828
 
5869
- var messages$E = reactIntl.defineMessages({
5829
+ var messages$F = reactIntl.defineMessages({
5870
5830
  chooseFile: {
5871
5831
  id: 'ButtonFileInput.chooseFile',
5872
5832
  description: 'The label text of the field for upload local file',
@@ -5874,21 +5834,21 @@ var messages$E = reactIntl.defineMessages({
5874
5834
  }
5875
5835
  });
5876
5836
 
5877
- const _excluded$b = ["children", "allowMultiple", "acceptTypes"];
5878
- function ownKeys$Y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
5879
- function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5837
+ const _excluded$d = ["children", "allowMultiple", "acceptTypes"];
5838
+ 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; }
5839
+ 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; }
5880
5840
  var styles$f = {
5881
5841
  "button": "file-input-module__button___2KypN",
5882
5842
  "input": "file-input-module__input___3MP4D"
5883
5843
  };
5884
5844
  const FileInput = _ref => {
5885
5845
  let _ref$children = _ref.children,
5886
- children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$E.chooseFile)) : _ref$children,
5846
+ children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$_({}, messages$F.chooseFile)) : _ref$children,
5887
5847
  _ref$allowMultiple = _ref.allowMultiple,
5888
5848
  allowMultiple = _ref$allowMultiple === void 0 ? false : _ref$allowMultiple,
5889
5849
  _ref$acceptTypes = _ref.acceptTypes,
5890
5850
  acceptTypes = _ref$acceptTypes === void 0 ? 'image/png,image/jpeg,image/gif' : _ref$acceptTypes,
5891
- props = _objectWithoutProperties(_ref, _excluded$b);
5851
+ props = _objectWithoutProperties(_ref, _excluded$d);
5892
5852
  return jsxRuntime.jsx("label", {
5893
5853
  children: jsxRuntime.jsxs("span", {
5894
5854
  className: styles$f.button,
@@ -5906,7 +5866,216 @@ const FileInput = _ref => {
5906
5866
  FileInput.displayName = 'FileInput';
5907
5867
  var FileInput$1 = FileInput;
5908
5868
 
5909
- var messages$D = reactIntl.defineMessages({
5869
+ // Start with a button "css reset"
5870
+ const baseButtonStyles = {
5871
+ name: "it1691",
5872
+ styles: "color:inherit;padding:0;font:inherit;cursor:pointer;outline:inherit;border:none;background:none"
5873
+ } ;
5874
+
5875
+ const _excluded$c = ["animationOrientation", "children", "onClick"];
5876
+ function ownKeys$Z(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
5877
+ function _objectSpread$Z(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Z(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Z(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5878
+ const ICON_COLOR$1 = '#6359ff';
5879
+ const PaginationIconButton = _ref => {
5880
+ let animationOrientation = _ref.animationOrientation,
5881
+ children = _ref.children,
5882
+ onClick = _ref.onClick,
5883
+ rest = _objectWithoutProperties(_ref, _excluded$c);
5884
+ return jsxRuntime.jsx("button", _objectSpread$Z(_objectSpread$Z({
5885
+ css: [baseButtonStyles, /*#__PURE__*/react$1.css("svg{fill:", ICON_COLOR$1, ";}transition:transform ", uiKit.designTokens.transitionStandard, ";:hover{transform:translateX(\n ", animationOrientation === 'left' ? `calc(0px - var(--spacing-10))` : `var(--spacing-10)`, "\n );}padding-left:1px;padding-right:1px;:focus{border:1px solid ", ICON_COLOR$1, ";border-radius:", uiKit.designTokens.borderRadius1, ";padding-left:0px;padding-right:0px;}" + ("" ), "" ), "" , "" ],
5886
+ onClick: onClick
5887
+ }, rest), {}, {
5888
+ children: children
5889
+ }));
5890
+ };
5891
+ var PaginationIconButton$1 = PaginationIconButton;
5892
+
5893
+ const _excluded$b = ["isFilled", "onClick"];
5894
+ function ownKeys$Y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
5895
+ function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$Y(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$Y(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5896
+ const ICON_HEIGHT = '10px';
5897
+ const ICON_WIDTH = ICON_HEIGHT;
5898
+ // TODO: Integrate design tokens when redesign is complete
5899
+ const ICON_COLOR = '#6359FF';
5900
+ const ICON_HOVER_COLOR = '#B1ACFF';
5901
+ const PaginationSelectionButton = _ref => {
5902
+ let _ref$isFilled = _ref.isFilled,
5903
+ isFilled = _ref$isFilled === void 0 ? false : _ref$isFilled,
5904
+ onClick = _ref.onClick,
5905
+ rest = _objectWithoutProperties(_ref, _excluded$b);
5906
+ return jsxRuntime.jsx("button", _objectSpread$Y({
5907
+ css: [baseButtonStyles, /*#__PURE__*/react$1.css("height:", ICON_HEIGHT, ";width:", ICON_WIDTH, ";border-radius:", uiKit.designTokens.borderRadius6, ";border:", isFilled ? 'none' : `${uiKit.designTokens.borderWidth1} solid ${uiKit.designTokens.colorNeutral}`, ";background:", isFilled ? ICON_COLOR : 'none', ";transition:", uiKit.designTokens.transitionStandard, ";:hover{background:", isFilled ? undefined : ICON_HOVER_COLOR, ";}:focus{border:", uiKit.designTokens.borderWidth1, " solid ", ICON_COLOR, ";}" + ("" ), "" ), "" , "" ],
5908
+ onClick: onClick
5909
+ }, rest));
5910
+ };
5911
+ var PaginationSelectionButton$1 = PaginationSelectionButton;
5912
+
5913
+ const CAROUSEL_WIDTH = 384;
5914
+ const PAGINATION_CONTROL_HEIGHT = 26;
5915
+ const IMAGE_AREA_HEIGHT = 200;
5916
+ const BaseCarousel = _ref2 => {
5917
+ let items = _ref2.items,
5918
+ renderItem = _ref2.renderItem;
5919
+ // Randomize input array and cache across rerenders
5920
+ const _useState = React.useState(shuffle__default["default"](items)),
5921
+ _useState2 = _slicedToArray(_useState, 2),
5922
+ shuffledItems = _useState2[0],
5923
+ setShuffledItems = _useState2[1];
5924
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(context => ({
5925
+ projectKey: context.project?.key
5926
+ })),
5927
+ projectKey = _useApplicationContex.projectKey;
5928
+ const handleFilterItemsWhenFlagDisabled = idx => {
5929
+ const newItems = _filterInstanceProperty__default["default"](shuffledItems).call(shuffledItems, (_, idx1) => idx !== idx1);
5930
+ setShuffledItems(newItems);
5931
+ };
5932
+ const _useSnapCarousel = reactSnapCarousel.useSnapCarousel(),
5933
+ scrollRef = _useSnapCarousel.scrollRef,
5934
+ pages = _useSnapCarousel.pages,
5935
+ activePageIndex = _useSnapCarousel.activePageIndex,
5936
+ prev = _useSnapCarousel.prev,
5937
+ next = _useSnapCarousel.next,
5938
+ goTo = _useSnapCarousel.goTo;
5939
+ const handlePrev = () => {
5940
+ if (activePageIndex === 0) {
5941
+ goTo(pages.length - 1);
5942
+ } else {
5943
+ prev();
5944
+ }
5945
+ };
5946
+ const handleNext = () => {
5947
+ if (activePageIndex === pages.length - 1) {
5948
+ goTo(0);
5949
+ } else {
5950
+ next();
5951
+ }
5952
+ };
5953
+ const getLinkTo = activeItem => {
5954
+ return activeItem.isExternal ? activeItem.linkTo() : activeItem.linkTo(projectKey);
5955
+ };
5956
+
5957
+ // Get the current item safely
5958
+ const currentItem = shuffledItems[activePageIndex];
5959
+
5960
+ // Don't render if there's no current item
5961
+ if (!currentItem) {
5962
+ return null;
5963
+ }
5964
+ return jsxRuntime.jsxs("div", {
5965
+ css: /*#__PURE__*/react$1.css("width:", CAROUSEL_WIDTH, "px;position:relative;" + ("" ), "" ),
5966
+ role: "region",
5967
+ "aria-roledescription": "carousel",
5968
+ "aria-label": "rotunda",
5969
+ children: [jsxRuntime.jsx("a", {
5970
+ href: getLinkTo(currentItem),
5971
+ target: currentItem.isExternal ? '_blank' : '_self',
5972
+ rel: "noopener noreferrer",
5973
+ children: jsxRuntime.jsx(uiKit.Card, {
5974
+ insetScale: "none",
5975
+ onClick: () => {},
5976
+ children: jsxRuntime.jsx("div", {
5977
+ css: /*#__PURE__*/react$1.css("position:relative;display:flex;scroll-snap-type:x mandatory;overflow:hidden;margin:0;padding-bottom:", uiKit.designTokens.spacing60, ";" + ("" ), "" ),
5978
+ ref: scrollRef,
5979
+ children: _mapInstanceProperty__default["default"](shuffledItems).call(shuffledItems, (item, idx) => renderItem({
5980
+ item
5981
+ }, handleFilterItemsWhenFlagDisabled, idx))
5982
+ })
5983
+ })
5984
+ }), jsxRuntime.jsx("div", {
5985
+ css: /*#__PURE__*/react$1.css("position:absolute;bottom:", uiKit.designTokens.spacingM, ";left:50%;pointer-events:none;" + ("" ), "" ),
5986
+ children: jsxRuntime.jsx("div", {
5987
+ css: /*#__PURE__*/react$1.css("position:relative;left:-50%;background-color:", uiKit.designTokens.colorSurface, ";pointer-events:auto;height:", PAGINATION_CONTROL_HEIGHT, "px;border-radius:", uiKit.designTokens.borderRadius4, ";padding-left:", uiKit.designTokens.spacing25, ";padding-right:", uiKit.designTokens.spacing25, ";display:flex;align-items:center;" + ("" ), "" ),
5988
+ children: jsxRuntime.jsxs(uiKit.Spacings.Inline, {
5989
+ scale: "m",
5990
+ justifyContent: "center",
5991
+ alignItems: "center",
5992
+ children: [jsxRuntime.jsx(PaginationIconButton$1, {
5993
+ animationOrientation: "left",
5994
+ onClick: handlePrev,
5995
+ "aria-label": "go to previous slide",
5996
+ children: jsxRuntime.jsx(uiKit.AngleLeftIcon, {
5997
+ size: "small"
5998
+ })
5999
+ }), _mapInstanceProperty__default["default"](pages).call(pages, (_, i) => jsxRuntime.jsx(PaginationSelectionButton$1, {
6000
+ isFilled: activePageIndex === i,
6001
+ onClick: () => goTo(i),
6002
+ "aria-label": `go to slide ${i + 1}`
6003
+ }, i)), jsxRuntime.jsx(PaginationIconButton$1, {
6004
+ animationOrientation: "right",
6005
+ onClick: handleNext,
6006
+ "aria-label": "go to next slide",
6007
+ children: jsxRuntime.jsx(uiKit.AngleRightIcon, {
6008
+ size: "small"
6009
+ })
6010
+ })]
6011
+ })
6012
+ })
6013
+ })]
6014
+ });
6015
+ };
6016
+ var _ref$2 = {
6017
+ name: "97rk2e",
6018
+ styles: "width:100%;height:100%;flex-shrink:0;scroll-snap-align:start"
6019
+ } ;
6020
+ const CarouselContent = _ref3 => {
6021
+ let item = _ref3.item,
6022
+ handleFilterItemsWhenFlagDisabled = _ref3.handleFilterItemsWhenFlagDisabled,
6023
+ idx = _ref3.idx;
6024
+ const isEnabled = applicationShell.useFeatureToggle(item.flag || '');
6025
+ const intl = reactIntl.useIntl();
6026
+ React.useEffect(() => {
6027
+ if (item.flag && !isEnabled) {
6028
+ handleFilterItemsWhenFlagDisabled(idx);
6029
+ }
6030
+ }, [isEnabled, handleFilterItemsWhenFlagDisabled, idx, item]);
6031
+ if (item.flag && !isEnabled) {
6032
+ return null;
6033
+ }
6034
+ return jsxRuntime.jsx("div", {
6035
+ role: "group",
6036
+ "aria-roledescription": "slide",
6037
+ "aria-label": `slide-${idx + 1}`,
6038
+ css: _ref$2,
6039
+ children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
6040
+ children: [jsxRuntime.jsx("img", {
6041
+ css: /*#__PURE__*/react$1.css("width:100%;height:", IMAGE_AREA_HEIGHT, "px;" + ("" ), "" ),
6042
+ src: item.imgSrc,
6043
+ alt: intl.formatMessage(item.imgAlt)
6044
+ }), jsxRuntime.jsx("div", {
6045
+ css: /*#__PURE__*/react$1.css("padding:0 ", uiKit.designTokens.spacingL, " 0 ", uiKit.designTokens.spacingL, ";" + ("" ), "" ),
6046
+ children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
6047
+ scale: "xs",
6048
+ children: [jsxRuntime.jsx("div", {
6049
+ children: jsxRuntime.jsx(uiKit.Stamp, {
6050
+ tone: item.stampTone,
6051
+ isCondensed: true,
6052
+ label: intl.formatMessage(item.stampLabel)
6053
+ })
6054
+ }), jsxRuntime.jsx(uiKit.Text.Body, {
6055
+ intlMessage: item.textContent
6056
+ })]
6057
+ })
6058
+ })]
6059
+ })
6060
+ });
6061
+ };
6062
+ const Carousel = _ref4 => {
6063
+ let items = _ref4.items;
6064
+ return jsxRuntime.jsx(BaseCarousel, {
6065
+ items: items,
6066
+ renderItem: (_ref5, handleFilterItemsWhenFlagDisabled, idx) => {
6067
+ let item = _ref5.item;
6068
+ return jsxRuntime.jsx(CarouselContent, {
6069
+ handleFilterItemsWhenFlagDisabled: handleFilterItemsWhenFlagDisabled,
6070
+ item: item,
6071
+ idx: idx
6072
+ }, item.id);
6073
+ }
6074
+ });
6075
+ };
6076
+ var Carousel$1 = Carousel;
6077
+
6078
+ var messages$E = reactIntl.defineMessages({
5910
6079
  countriesBasicSelectPlaceholder: {
5911
6080
  id: 'CountriesPicker.countriesBasicSelectPlaceholder',
5912
6081
  description: 'Placeholder of the basic field for countries',
@@ -5927,7 +6096,7 @@ var messages$D = reactIntl.defineMessages({
5927
6096
  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; }
5928
6097
  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; }
5929
6098
  const emptyCountryOption = intl => [{
5930
- label: intl.formatMessage(messages$D.countriesAsyncSelectDropdownTypeAheadPrompt),
6099
+ label: intl.formatMessage(messages$E.countriesAsyncSelectDropdownTypeAheadPrompt),
5931
6100
  value: undefined,
5932
6101
  isDisabled: true
5933
6102
  }];
@@ -5970,7 +6139,7 @@ function CountriesAsyncSelectDropdown(props) {
5970
6139
  var _context7;
5971
6140
  return _findInstanceProperty__default["default"](_context7 = props.options).call(_context7, country => country.value === countryCode);
5972
6141
  }),
5973
- placeholder: intl.formatMessage(messages$D.countriesAsyncSelectPlaceholder),
6142
+ placeholder: intl.formatMessage(messages$E.countriesAsyncSelectPlaceholder),
5974
6143
  loadOptions: handleLoadOptions,
5975
6144
  onChange: onOptionChange,
5976
6145
  isDisabled: props.isDisabled,
@@ -5990,7 +6159,7 @@ function CountriesBasicSelectDropdown(props) {
5990
6159
  value: props.value,
5991
6160
  isRequired: props.isRequired,
5992
6161
  description: props.description,
5993
- placeholder: intl.formatMessage(messages$D.countriesBasicSelectPlaceholder),
6162
+ placeholder: intl.formatMessage(messages$E.countriesBasicSelectPlaceholder),
5994
6163
  options: props.options,
5995
6164
  onChange: props.onChange,
5996
6165
  isDisabled: props.isDisabled,
@@ -6026,7 +6195,7 @@ function CountriesPicker(_ref) {
6026
6195
  });
6027
6196
  }
6028
6197
 
6029
- var messages$C = reactIntl.defineMessages({
6198
+ var messages$D = reactIntl.defineMessages({
6030
6199
  noCustomerGroupsFound: {
6031
6200
  id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
6032
6201
  description: 'The message to display when no customer groups were found',
@@ -6116,7 +6285,7 @@ const CustomerGroupPickerInput = _ref => {
6116
6285
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
6117
6286
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
6118
6287
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
6119
- const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$C.noCustomerGroupsFound), [loadingError, formatMessage]);
6288
+ const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$D.noCustomerGroupsFound), [loadingError, formatMessage]);
6120
6289
  const tooltipTitle = currentOption?.data?.label ?? '';
6121
6290
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
6122
6291
  max: "scale",
@@ -6127,7 +6296,7 @@ const CustomerGroupPickerInput = _ref => {
6127
6296
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
6128
6297
  id: name,
6129
6298
  name: name,
6130
- placeholder: placeholder ?? formatMessage(messages$C.placeholder),
6299
+ placeholder: placeholder ?? formatMessage(messages$D.placeholder),
6131
6300
  loadOptions: loadOptionsDebounced,
6132
6301
  defaultOptions: true,
6133
6302
  showOptionGroupDivider: true,
@@ -6146,7 +6315,7 @@ const CustomerGroupPickerInput = _ref => {
6146
6315
  })
6147
6316
  }), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
6148
6317
  tone: "negative",
6149
- intlMessage: pickerMessages$1.loadingErrorMessage
6318
+ intlMessage: commonPickerMessages.loadingErrorMessage
6150
6319
  })]
6151
6320
  })
6152
6321
  });
@@ -6162,7 +6331,8 @@ var styles$e = {
6162
6331
  "divider-dashed": "divider-module__divider-dashed___2Em8A divider-module__divider___4-vdy"
6163
6332
  };
6164
6333
  function Divider(_ref) {
6165
- let isDashed = _ref.isDashed,
6334
+ let _ref$isDashed = _ref.isDashed,
6335
+ isDashed = _ref$isDashed === void 0 ? false : _ref$isDashed,
6166
6336
  _ref$orientation = _ref.orientation,
6167
6337
  orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation;
6168
6338
  return jsxRuntime.jsx("hr", {
@@ -6233,12 +6403,13 @@ const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"
6233
6403
  const CustomFieldErrors = props => {
6234
6404
  // We want to highlight fields with errors not only after a form submission,
6235
6405
  // but also after manually triggered form validation.
6236
- const didFormValidationFail = useDidFormValidationFail();
6406
+ const _useFormikContext = formik.useFormikContext(),
6407
+ isFormValid = _useFormikContext.isValid;
6237
6408
  const errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
6238
6409
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
6239
- children: [props.isTouched || didFormValidationFail && errors?.missing && jsxRuntime.jsx(_.ErrorMessage, {
6410
+ children: [props.isTouched || !isFormValid && errors?.missing && jsxRuntime.jsx(_.ErrorMessage, {
6240
6411
  intlMessage: validationMessages.required
6241
- }), props.isTouched || didFormValidationFail && errors?.duplicated && jsxRuntime.jsx(_.ErrorMessage, {
6412
+ }), props.isTouched || !isFormValid && errors?.duplicated && jsxRuntime.jsx(_.ErrorMessage, {
6242
6413
  intlMessage: validationMessages.unique
6243
6414
  })]
6244
6415
  });
@@ -6263,7 +6434,7 @@ const makeChangeHandler = setValue => event => {
6263
6434
  // attributes.
6264
6435
  const omitUnknownValues = (valuesAsMap, fieldDefinitionsAsMap) => omitBy__default["default"](valuesAsMap, (value, key) => isNil__default["default"](fieldDefinitionsAsMap[key]));
6265
6436
 
6266
- var messages$B = reactIntl.defineMessages({
6437
+ var messages$C = reactIntl.defineMessages({
6267
6438
  booleanSetInputYesLabel: {
6268
6439
  id: 'CustomBooleanInputSet.booleanSetInputYesLabel',
6269
6440
  description: 'Custom boolean input set Yes label',
@@ -6305,13 +6476,13 @@ function CustomBooleanInputSet(props) {
6305
6476
  formatMessage = _useIntl.formatMessage;
6306
6477
  const options = React.useMemo(() => [{
6307
6478
  value: 'true',
6308
- label: formatMessage(messages$B.booleanSetInputYesLabel)
6479
+ label: formatMessage(messages$C.booleanSetInputYesLabel)
6309
6480
  }, {
6310
6481
  value: 'false',
6311
- label: formatMessage(messages$B.booleanSetInputNoLabel)
6482
+ label: formatMessage(messages$C.booleanSetInputNoLabel)
6312
6483
  }, {
6313
6484
  value: 'all',
6314
- label: formatMessage(messages$B.booleanSetInputAllLabel)
6485
+ label: formatMessage(messages$C.booleanSetInputAllLabel)
6315
6486
  }], [formatMessage]);
6316
6487
  const handleChange = makeChangeHandler(rawValue => {
6317
6488
  const nullifiedIfNeeded = !rawValue ? undefined : valueToBooleanSet(rawValue);
@@ -6895,7 +7066,7 @@ const NestingLevelContext = /*#__PURE__*/React.createContext(0);
6895
7066
  var NestingLevelContext$1 = NestingLevelContext;
6896
7067
 
6897
7068
  // eslint-disable-next-line import/prefer-default-export
6898
- const messages$A = reactIntl.defineMessages({
7069
+ const messages$B = reactIntl.defineMessages({
6899
7070
  aboveFifthLevelWarning: {
6900
7071
  id: 'attributeInputByType.nestedAttributes.aboveFifthLevelWarning',
6901
7072
  description: 'Warning message shown when nested attribute are above the fifth level',
@@ -6907,9 +7078,9 @@ const messages$A = reactIntl.defineMessages({
6907
7078
  defaultMessage: 'Empty'
6908
7079
  }
6909
7080
  });
6910
- var customFieldsMessages = messages$A;
7081
+ var customFieldsMessages = messages$B;
6911
7082
 
6912
- var messages$z = reactIntl.defineMessages({
7083
+ var messages$A = reactIntl.defineMessages({
6913
7084
  updateButton: {
6914
7085
  id: 'NestedAttributes.Details.updateButton',
6915
7086
  description: 'Update button label',
@@ -6994,7 +7165,7 @@ const EditButton = props => {
6994
7165
  formatMessage = _useIntl.formatMessage;
6995
7166
  return jsxRuntime.jsx(uiKit.Tooltip, {
6996
7167
  placement: "top",
6997
- title: formatMessage(messages$z.editTooltip),
7168
+ title: formatMessage(messages$A.editTooltip),
6998
7169
  children: jsxRuntime.jsx(uiKit.IconButton, {
6999
7170
  label: "Edit",
7000
7171
  isDisabled: props.isDisabled,
@@ -7010,12 +7181,12 @@ const DropChangesConfirmation = props => {
7010
7181
  formatMessage = _useIntl2.formatMessage;
7011
7182
  return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
7012
7183
  isOpen: props.isOpen || false,
7013
- title: formatMessage(messages$z.confirmationDialogTitle),
7014
- labelPrimary: formatMessage(messages$z.nestedAttributesConfirmLabel),
7184
+ title: formatMessage(messages$A.confirmationDialogTitle),
7185
+ labelPrimary: formatMessage(messages$A.nestedAttributesConfirmLabel),
7015
7186
  onConfirm: props.onConfirm,
7016
7187
  onCancel: props.onCancel,
7017
7188
  children: jsxRuntime.jsx(uiKit.Text.Body, {
7018
- intlMessage: messages$z.confirmationDialogBody
7189
+ intlMessage: messages$A.confirmationDialogBody
7019
7190
  })
7020
7191
  });
7021
7192
  };
@@ -7040,11 +7211,11 @@ const NestedAttributeModalPage = props => {
7040
7211
  children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
7041
7212
  isDisabled: !formik$1.dirty,
7042
7213
  iconLeft: jsxRuntime.jsx(uiKit.RevertIcon, {}),
7043
- label: formatMessage(messages$z.cancelButton),
7214
+ label: formatMessage(messages$A.cancelButton),
7044
7215
  onClick: formik$1.resetForm
7045
7216
  }), jsxRuntime.jsx(applicationComponents.CustomFormModalPage.FormPrimaryButton, {
7046
7217
  isDisabled: !formik$1.dirty,
7047
- label: formatMessage(messages$z.updateButton),
7218
+ label: formatMessage(messages$A.updateButton),
7048
7219
  onClick: formik$1.handleSubmit
7049
7220
  })]
7050
7221
  }),
@@ -7086,7 +7257,7 @@ const NestedInputControls = props => {
7086
7257
  if (nextNestingLevel >= 6) return jsxRuntime.jsx(MaxNestingLevelReached, {});
7087
7258
  const hasAttributes = props.productType.attributeDefinitions.length > 0;
7088
7259
  if (!hasAttributes) return jsxRuntime.jsx(uiKit.Text.Body, {
7089
- intlMessage: messages$z.emptyProductType,
7260
+ intlMessage: messages$A.emptyProductType,
7090
7261
  tone: "secondary"
7091
7262
  });
7092
7263
  return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
@@ -7162,7 +7333,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
7162
7333
  if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
7163
7334
  kind: 'success',
7164
7335
  domain: constants.DOMAINS.SIDE,
7165
- text: formatMessage(messages$z.attributeUpdateSucceeded)
7336
+ text: formatMessage(messages$A.attributeUpdateSucceeded)
7166
7337
  });
7167
7338
  setSubmitting(false);
7168
7339
  },
@@ -7281,7 +7452,7 @@ function CustomChannelReferenceInput(props) {
7281
7452
  }
7282
7453
  CustomChannelReferenceInput.displayName = 'CustomChannelReferenceInput';
7283
7454
 
7284
- var messages$y = reactIntl.defineMessages({
7455
+ var messages$z = reactIntl.defineMessages({
7285
7456
  noProductsFound: {
7286
7457
  id: 'Shared.ProductPickerInput.noProductsFound',
7287
7458
  description: 'The message to display when no products were found',
@@ -7379,7 +7550,7 @@ const ProductPickerInput = _ref => {
7379
7550
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
7380
7551
  id: name,
7381
7552
  name: name,
7382
- placeholder: formatMessage(messages$y.placeholder),
7553
+ placeholder: formatMessage(messages$z.placeholder),
7383
7554
  loadOptions: loadOptionsDebounced,
7384
7555
  defaultOptions: [],
7385
7556
  isClearable: isClearable,
@@ -7393,7 +7564,7 @@ const ProductPickerInput = _ref => {
7393
7564
  onInputChange: handleInputChange,
7394
7565
  onBlur: onBlur,
7395
7566
  value: currentOption.data,
7396
- noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$y.noProductsFound),
7567
+ noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$z.noProductsFound),
7397
7568
  hasError: hasError || isLoadingFailed,
7398
7569
  menuPortalZIndex: Z_INDEX_DROPDOWN,
7399
7570
  menuPortalTarget: document.body,
@@ -7401,7 +7572,7 @@ const ProductPickerInput = _ref => {
7401
7572
  })
7402
7573
  }), isLoadingFailed && showLoadingErrorMessage && jsxRuntime.jsx(uiKit.Text.Body, {
7403
7574
  tone: "negative",
7404
- intlMessage: pickerMessages$1.loadingErrorMessage
7575
+ intlMessage: commonPickerMessages.loadingErrorMessage
7405
7576
  })]
7406
7577
  })
7407
7578
  });
@@ -7633,7 +7804,7 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
7633
7804
  CustomFieldInput.displayName = 'CustomFieldInput';
7634
7805
  var CustomFieldInput$1 = CustomFieldInput;
7635
7806
 
7636
- var messages$x = reactIntl.defineMessages({
7807
+ var messages$y = reactIntl.defineMessages({
7637
7808
  productReferenceLabel: {
7638
7809
  id: 'CustomFieldsLabel.productReferenceLabel',
7639
7810
  description: 'Label shown above the product picker input.',
@@ -7701,7 +7872,7 @@ const CustomFieldsLabelHint = _ref2 => {
7701
7872
  children: [jsxRuntime.jsx(uiKit.WarningIcon, {
7702
7873
  size: "medium",
7703
7874
  color: "warning"
7704
- }), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$x.cartDiscountMoreThan500))]
7875
+ }), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$y.cartDiscountMoreThan500))]
7705
7876
  });
7706
7877
  }
7707
7878
  return l10n.formatLocalizedString(fieldDefinition, {
@@ -7715,8 +7886,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
7715
7886
  formatMessage = _useIntl.formatMessage;
7716
7887
  const _usePimStatus = usePimStatus(),
7717
7888
  isProjectIndexed = _usePimStatus.isProjectIndexed;
7718
- if (isProjectIndexed) return formatMessage(messages$x.productTypeReferenceLabelI);
7719
- return formatMessage(messages$x.productTypeReferenceLabel);
7889
+ if (isProjectIndexed) return formatMessage(messages$y.productTypeReferenceLabelI);
7890
+ return formatMessage(messages$y.productTypeReferenceLabel);
7720
7891
  }
7721
7892
 
7722
7893
  // TODO(pa3): this logic may be misplaced and probably
@@ -7733,13 +7904,13 @@ function CustomFieldsLabelSubtitle(_ref3) {
7733
7904
  const referenceTypeName = capitalizeFirst(referenceTypeId);
7734
7905
  if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
7735
7906
  if (referenceTypeId === SEARCHABLE_REFERENCES.product) {
7736
- return formatMessage(messages$x.productReferenceLabel);
7907
+ return formatMessage(messages$y.productReferenceLabel);
7737
7908
  } else if (referenceTypeId === SEARCHABLE_REFERENCES.productType) {
7738
7909
  return jsxRuntime.jsx(CustomFieldsProductTypeReferenceSubtitle, {});
7739
7910
  } else if (referenceTypeId === SEARCHABLE_REFERENCES.channel) {
7740
- return formatMessage(messages$x.channelReferenceLabel);
7911
+ return formatMessage(messages$y.channelReferenceLabel);
7741
7912
  } else if (referenceTypeId === SEARCHABLE_REFERENCES.state) {
7742
- return formatMessage(messages$x.stateReferenceLabel);
7913
+ return formatMessage(messages$y.stateReferenceLabel);
7743
7914
  } else {
7744
7915
  return `${referenceTypeName} ID`;
7745
7916
  }
@@ -7755,7 +7926,7 @@ function CustomFieldsCountIndicator(_ref4) {
7755
7926
  const _useIntl3 = reactIntl.useIntl(),
7756
7927
  formatMessage = _useIntl3.formatMessage;
7757
7928
  return assignedAttributeGroups?.length > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
7758
- title: formatMessage(messages$x.attributeGroupCountTooltip, {
7929
+ title: formatMessage(messages$y.attributeGroupCountTooltip, {
7759
7930
  attributeGroups: _mapInstanceProperty__default["default"](assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
7760
7931
  count: assignedAttributeGroups.length
7761
7932
  }),
@@ -7812,7 +7983,7 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
7812
7983
  CustomFieldsLabel.displayName = 'CustomFieldsTitle';
7813
7984
  var CustomFieldsLabel$1 = CustomFieldsLabel;
7814
7985
 
7815
- var messages$w = reactIntl.defineMessages({
7986
+ var messages$x = reactIntl.defineMessages({
7816
7987
  referencedProductType: {
7817
7988
  id: 'NestedAttributes.referencedProductType',
7818
7989
  description: 'Product type referenced hint',
@@ -7823,7 +7994,7 @@ var messages$w = reactIntl.defineMessages({
7823
7994
  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; }
7824
7995
  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; }
7825
7996
  function ProductTypeReference(props) {
7826
- const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$w.referencedProductType), {}, {
7997
+ const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$x.referencedProductType), {}, {
7827
7998
  values: {
7828
7999
  productTypeName: props.productType.name
7829
8000
  }
@@ -7847,7 +8018,7 @@ function CustomNestedFieldInput(props) {
7847
8018
  color: "error"
7848
8019
  }), jsxRuntime.jsx(uiKit.Text.Body, {
7849
8020
  tone: "negative",
7850
- intlMessage: pickerMessages$1.loadingErrorMessage
8021
+ intlMessage: commonPickerMessages.loadingErrorMessage
7851
8022
  })]
7852
8023
  });
7853
8024
  if (!productType) return null;
@@ -7912,7 +8083,7 @@ const DraggableWrapper = _ref2 => {
7912
8083
  return children;
7913
8084
  }
7914
8085
  };
7915
- return jsxRuntime.jsx(reactBeautifulDnd.Draggable, {
8086
+ return jsxRuntime.jsx(dnd.Draggable, {
7916
8087
  draggableId: draggableId,
7917
8088
  index: index,
7918
8089
  children: (provided, snapshot) => {
@@ -7951,9 +8122,9 @@ function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var _
7951
8122
  const DroppableWrapper = _ref => {
7952
8123
  let children = _ref.children,
7953
8124
  onDragEnd = _ref.onDragEnd;
7954
- return jsxRuntime.jsx(reactBeautifulDnd.DragDropContext, {
8125
+ return jsxRuntime.jsx(dnd.DragDropContext, {
7955
8126
  onDragEnd: onDragEnd,
7956
- children: jsxRuntime.jsx(reactBeautifulDnd.Droppable, {
8127
+ children: jsxRuntime.jsx(dnd.Droppable, {
7957
8128
  droppableId: "droppable",
7958
8129
  children: provided => jsxRuntime.jsxs("div", _objectSpread$L(_objectSpread$L({
7959
8130
  ref: provided.innerRef
@@ -8048,7 +8219,8 @@ const CustomFieldsInternal = _ref => {
8048
8219
  touched = _useFormikContext.touched,
8049
8220
  values = _valuesInstanceProperty__default["default"](_useFormikContext),
8050
8221
  handleBlur = _useFormikContext.handleBlur,
8051
- status = _useFormikContext.status;
8222
+ status = _useFormikContext.status,
8223
+ isFormValid = _useFormikContext.isValid;
8052
8224
  const _useIntl = reactIntl.useIntl(),
8053
8225
  locale = _useIntl.locale;
8054
8226
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
@@ -8060,7 +8232,6 @@ const CustomFieldsInternal = _ref => {
8060
8232
  const isTailoringAttributesEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
8061
8233
  const isTailoringAttributeForOtherTypes = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
8062
8234
  const isTailoringFallbackEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
8063
- const didFormValidationFail = useDidFormValidationFail();
8064
8235
  const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
8065
8236
  const _useDnDContext = useDnDContext(),
8066
8237
  DroppableWrapper = _useDnDContext.DroppableWrapper,
@@ -8082,7 +8253,7 @@ const CustomFieldsInternal = _ref => {
8082
8253
 
8083
8254
  // We want to highlight fields with errors not only after a form submission,
8084
8255
  // but also after manually triggered form validation.
8085
- const hasError = Boolean(fieldErrors) && (isTouched || didFormValidationFail);
8256
+ const hasError = Boolean(fieldErrors) && (isTouched || !isFormValid);
8086
8257
  const validate = value => {
8087
8258
  if (fieldDefinition.required && isNil__default["default"](value)) return {
8088
8259
  missing: true
@@ -8787,6 +8958,146 @@ function ProductSelectionsPicker(_ref) {
8787
8958
  });
8788
8959
  }
8789
8960
 
8961
+ var messages$w = reactIntl.defineMessages({
8962
+ placeholder: {
8963
+ id: 'RecurrentIntervalPicker.placeholder',
8964
+ description: 'The placeholder of the input',
8965
+ defaultMessage: 'Not restricted to any recurrent interval'
8966
+ },
8967
+ missingOptionLabel: {
8968
+ id: 'RecurrentIntervalPicker.missingOptionLabel',
8969
+ description: 'The label of the option when the recurrent interval is not found',
8970
+ defaultMessage: 'Unknown recurrent interval ({value})'
8971
+ },
8972
+ missingSelectedWarning: {
8973
+ id: 'RecurrentIntervalPicker.missingSelectedWarning',
8974
+ description: 'The warning message shown below the input when the selected recurrent interval is not found in the options',
8975
+ defaultMessage: 'The selected recurrent interval could not be retrieved. Please check your recurrence policy configuration.'
8976
+ },
8977
+ noRecurrentIntervalsConfigured: {
8978
+ id: 'RecurrentIntervalPicker.noRecurrentIntervalsConfigured',
8979
+ description: 'Banner warning message shown when no recurrent intervals are configured in the project',
8980
+ defaultMessage: 'No recurrent intervals configured. Please check your recurrence policy configuration'
8981
+ }
8982
+ });
8983
+
8984
+ 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 } } } };
8985
+ const isRecurringOrdersDisabledError = error => {
8986
+ var _context;
8987
+ 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.");
8988
+ };
8989
+ // @TODO: Remove these error checks when the feature is enabled by default
8990
+ const useRecurrenceIntervals = _ref => {
8991
+ let where = _ref.where,
8992
+ _ref$skip = _ref.skip,
8993
+ skip = _ref$skip === void 0 ? false : _ref$skip;
8994
+ const _useQuery = client.useQuery(FetchRecurrencePolicies, {
8995
+ context: {
8996
+ target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
8997
+ },
8998
+ fetchPolicy: 'cache-and-network',
8999
+ variables: where ? {
9000
+ where
9001
+ } : undefined,
9002
+ skip
9003
+ }),
9004
+ data = _useQuery.data,
9005
+ loading = _useQuery.loading,
9006
+ rawError = _useQuery.error;
9007
+ const extractedErrors = rawError ? extractErrorFromGraphQlResponse(rawError) : [];
9008
+ const isRecurringOrdersDisabled = extractedErrors.length > 0 &&
9009
+ // If the only error is a 403 with the specific message, we assume the feature is disabled.
9010
+ _everyInstanceProperty__default["default"](extractedErrors).call(extractedErrors, isRecurringOrdersDisabledError);
9011
+ const error = isRecurringOrdersDisabled ? undefined : rawError;
9012
+ return {
9013
+ recurrencePolicies: data?.recurrencePolicies?.results ?? [],
9014
+ loading,
9015
+ error,
9016
+ isRecurringOrdersDisabled
9017
+ };
9018
+ };
9019
+
9020
+ const RecurrentIntervalPicker = _ref => {
9021
+ let name = _ref.name,
9022
+ value = _ref.value,
9023
+ onChange = _ref.onChange,
9024
+ onBlur = _ref.onBlur,
9025
+ onError = _ref.onError,
9026
+ _ref$isClearable = _ref.isClearable,
9027
+ isClearable = _ref$isClearable === void 0 ? true : _ref$isClearable,
9028
+ _ref$isDisabled = _ref.isDisabled,
9029
+ isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
9030
+ _ref$isReadOnly = _ref.isReadOnly,
9031
+ isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly;
9032
+ const _useIntl = reactIntl.useIntl(),
9033
+ formatMessage = _useIntl.formatMessage;
9034
+ const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
9035
+ const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
9036
+ const skip = isReadOnly && !value;
9037
+ const where = isReadOnly && value ? `id="${value}"` : undefined;
9038
+ const _useRecurrenceInterva = useRecurrenceIntervals({
9039
+ where,
9040
+ skip
9041
+ }),
9042
+ recurrencePolicies = _useRecurrenceInterva.recurrencePolicies,
9043
+ loading = _useRecurrenceInterva.loading,
9044
+ error = _useRecurrenceInterva.error;
9045
+ const selectedIsMissingInData = Boolean(value) && !_someInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => policy.id === value);
9046
+ const options = React.useMemo(() => {
9047
+ if (loading) return [];
9048
+ const mapped = _mapInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => ({
9049
+ value: policy.id,
9050
+ label: formatLocalizedFieldToString(policy.nameAllLocales, policy.key)
9051
+ }));
9052
+
9053
+ // If the selected value cannot be loaded, add it as a missing option
9054
+ if (selectedIsMissingInData && value) {
9055
+ const label = formatMessage(messages$w.missingOptionLabel, {
9056
+ value
9057
+ });
9058
+ return [{
9059
+ value,
9060
+ label
9061
+ }, ...mapped];
9062
+ }
9063
+ return mapped;
9064
+ }, [recurrencePolicies, selectedIsMissingInData, value, dataLocale, formatMessage, formatLocalizedFieldToString, loading]);
9065
+ const noRecurrentIntervalsConfigured = !loading && recurrencePolicies.length === 0;
9066
+ React.useEffect(() => {
9067
+ if (error && onError) {
9068
+ onError(error);
9069
+ }
9070
+ }, [error, onError]);
9071
+ return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
9072
+ scale: "s",
9073
+ children: [jsxRuntime.jsx(uiKit.SelectInput, {
9074
+ id: name,
9075
+ name: name,
9076
+ value: value,
9077
+ placeholder: messages$w.placeholder.defaultMessage,
9078
+ options: options,
9079
+ isClearable: isClearable,
9080
+ isReadOnly: isReadOnly,
9081
+ isDisabled: isDisabled || loading || noRecurrentIntervalsConfigured,
9082
+ onChange: onChange,
9083
+ onBlur: onBlur,
9084
+ hasError: !loading && !error && selectedIsMissingInData
9085
+ }), error ? jsxRuntime.jsx(uiKit.Text.Body, {
9086
+ tone: "negative",
9087
+ intlMessage: commonPickerMessages.loadingErrorMessage
9088
+ }) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
9089
+ tone: "negative",
9090
+ intlMessage: messages$w.missingSelectedWarning
9091
+ }) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
9092
+ type: "warning",
9093
+ children: jsxRuntime.jsx(uiKit.Text.Detail, {
9094
+ intlMessage: messages$w.noRecurrentIntervalsConfigured
9095
+ })
9096
+ })]
9097
+ });
9098
+ };
9099
+ var RecurrentIntervalPicker$1 = RecurrentIntervalPicker;
9100
+
8790
9101
  // NOTE: this component is duplicated in `app-shell/from-core`.
8791
9102
  var styles$b = {
8792
9103
  "colored": "required-indicator-module__colored____YUFm",
@@ -8943,9 +9254,6 @@ var messages$u = reactIntl.defineMessages({
8943
9254
  }
8944
9255
  });
8945
9256
 
8946
- const LOWER_STORES_LIMIT = 60;
8947
- const UPPER_STORES_LIMIT = 500;
8948
-
8949
9257
  // map store to options
8950
9258
  const mapStoresToOptions = _ref => {
8951
9259
  var _context, _context2;
@@ -10918,9 +11226,9 @@ const createQueryVariables = platformLimit => _reduceInstanceProperty__default["
10918
11226
  }, previousIncludedLimits), {});
10919
11227
  var createPlatformLimitsQueryVariables = createQueryVariables;
10920
11228
 
10921
- 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 } } } };
11229
+ 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 } } } };
10922
11230
  const usePlatformLimitsFetcher = platformLimit => {
10923
- const _useQuery = react.useQuery(PlatformLimitsFetcherQuery, {
11231
+ const _useQuery = react.useQuery(PlatformLimitsFetcherQuery$1, {
10924
11232
  variables: createPlatformLimitsQueryVariables(platformLimit),
10925
11233
  context: {
10926
11234
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
@@ -10941,6 +11249,8 @@ const usePlatformLimitsFetcher = platformLimit => {
10941
11249
  };
10942
11250
  var usePlatformLimitsFetcher$1 = usePlatformLimitsFetcher;
10943
11251
 
11252
+ 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 } } } };
11253
+
10944
11254
  const useLimitsModalState = function () {
10945
11255
  let isInitiallyOpen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
10946
11256
  const _useState = React.useState(isInitiallyOpen),
@@ -11067,7 +11377,7 @@ const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
11067
11377
  isExternal: true,
11068
11378
  to: constants.SUPPORT_PORTAL_URL,
11069
11379
  children: msg
11070
- });
11380
+ }, `msg-${msg}`);
11071
11381
  const PlatformLimitWarningNotification = _ref => {
11072
11382
  let resource = _ref.resource,
11073
11383
  limit = _ref.limit;
@@ -11905,11 +12215,13 @@ var CustomersCombined = PlatformLimitsCustomersCombined;
11905
12215
 
11906
12216
  const useCustomersPlatformLimits = () => {
11907
12217
  const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
12218
+ platformLimits = _useCustomersPlatform.platformLimits,
11908
12219
  refetch = _useCustomersPlatform.refetch;
11909
12220
  const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
11910
12221
  hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
11911
12222
  hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
11912
12223
  const interceptNavigation = useInterceptNavigation$1(hasReachedCustomersErrorLimit);
12224
+ const maxGroupsPerCustomerLimit = platformLimits?.customers?.maxGroupsPerCustomer?.limit;
11913
12225
  return {
11914
12226
  CustomersLimits: {
11915
12227
  Notifications: CustomersNotification,
@@ -11919,6 +12231,7 @@ const useCustomersPlatformLimits = () => {
11919
12231
  ErrorModal: CustomersErrorModal
11920
12232
  },
11921
12233
  refetchCustomersPlatformLimits: refetch,
12234
+ maxGroupsPerCustomerLimit,
11922
12235
  interceptNavigation,
11923
12236
  status: {
11924
12237
  hasReachedCustomersWarningLimit,
@@ -11943,6 +12256,38 @@ const injectCustomersPlatformLimits = () => WrappedComponent => {
11943
12256
  };
11944
12257
  var injectCustomersPlatformLimits$1 = injectCustomersPlatformLimits;
11945
12258
 
12259
+ const useBusinessUnitsPlatformLimitsFetcher = () => {
12260
+ const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.businessUnits),
12261
+ isLoading = _usePlatformLimitsFet.isLoading,
12262
+ error = _usePlatformLimitsFet.error,
12263
+ platformLimits = _usePlatformLimitsFet.platformLimits,
12264
+ refetch = _usePlatformLimitsFet.refetch;
12265
+ const formattedPlatformLimits = {
12266
+ businessUnitsMaxDivisionsLimit: platformLimits.businessUnits?.maxDivisions.limit,
12267
+ businessUnitsMaxDepthLimit: platformLimits.businessUnits?.maxDepthLimit.limit,
12268
+ businessUnitsMaxAssociatesLimit: platformLimits.businessUnits?.maxAssociates.limit,
12269
+ businessUnitsMaxAssociateRolesLimit: platformLimits.businessUnits?.maxAssociateRoles.limit
12270
+ };
12271
+ return {
12272
+ isLoading,
12273
+ error,
12274
+ platformLimits: formattedPlatformLimits,
12275
+ refetch
12276
+ };
12277
+ };
12278
+ var useBusinessUnitsPlatformLimitsFetcher$1 = useBusinessUnitsPlatformLimitsFetcher;
12279
+
12280
+ const useBusinessUnitsLimits = () => {
12281
+ const _useBusinessUnitsPlat = useBusinessUnitsPlatformLimitsFetcher$1(),
12282
+ refetch = _useBusinessUnitsPlat.refetch,
12283
+ platformLimits = _useBusinessUnitsPlat.platformLimits;
12284
+ return {
12285
+ BusinessUnitsLimits: platformLimits,
12286
+ refetchBusinessUnitsPlatformLimits: refetch
12287
+ };
12288
+ };
12289
+ var useBusinessUnitsLimits$1 = useBusinessUnitsLimits;
12290
+
11946
12291
  const useCustomerGroupsPlatformLimitsFetcher = () => {
11947
12292
  const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
11948
12293
  isLoading = _usePlatformLimitsFet.isLoading,
@@ -12290,6 +12635,72 @@ const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
12290
12635
  };
12291
12636
  var injectCustomerGroupsPlatformLimits$1 = injectCustomerGroupsPlatformLimits;
12292
12637
 
12638
+ const useStoresPlatformLimitsFetcher = () => {
12639
+ const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.stores),
12640
+ isLoading = _usePlatformLimitsFet.isLoading,
12641
+ error = _usePlatformLimitsFet.error,
12642
+ platformLimits = _usePlatformLimitsFet.platformLimits,
12643
+ refetch = _usePlatformLimitsFet.refetch;
12644
+ const formattedPlatformLimits = {
12645
+ total: platformLimits.stores?.total.limit,
12646
+ storeLimit: platformLimits.stores?.total.limit,
12647
+ storeCurrent: platformLimits.stores?.total.current,
12648
+ inventorySupplyChannels: platformLimits.stores?.inventorySupplyChannels.limit,
12649
+ productDistributionChannels: platformLimits.stores?.productDistributionChannels.limit
12650
+ };
12651
+ return {
12652
+ isLoading,
12653
+ error,
12654
+ platformLimits: formattedPlatformLimits,
12655
+ refetch
12656
+ };
12657
+ };
12658
+ var useStoresPlatformLimitsFetcher$1 = useStoresPlatformLimitsFetcher;
12659
+
12660
+ const useStoresPlatformLimits = () => {
12661
+ const _useStoresPlatformLim = useStoresPlatformLimitsFetcher$1(),
12662
+ platformLimits = _useStoresPlatformLim.platformLimits;
12663
+ if (!platformLimits?.total) {
12664
+ return {
12665
+ hasReachedStoresWarningLimit: false,
12666
+ hasReachedStoresErrorLimit: false
12667
+ };
12668
+ }
12669
+ const storeLimit = platformLimits.storeLimit,
12670
+ storeCurrent = platformLimits.storeCurrent;
12671
+ const hasReachedStoresWarningLimit = getHasExceededWarningThreshold({
12672
+ limit: storeLimit,
12673
+ current: storeCurrent
12674
+ });
12675
+ const hasReachedStoresErrorLimit = getHasExceededLimit({
12676
+ limit: storeLimit,
12677
+ current: storeCurrent
12678
+ });
12679
+ return {
12680
+ hasReachedStoresWarningLimit,
12681
+ hasReachedStoresErrorLimit
12682
+ };
12683
+ };
12684
+ var useStoresPlatformLimitsStatus = useStoresPlatformLimits;
12685
+
12686
+ const useStoresLimits = () => {
12687
+ const _useStoresPlatformLim = useStoresPlatformLimitsFetcher$1(),
12688
+ refetch = _useStoresPlatformLim.refetch,
12689
+ platformLimits = _useStoresPlatformLim.platformLimits;
12690
+ const _useStoresPlatformLim2 = useStoresPlatformLimitsStatus(),
12691
+ hasReachedStoresWarningLimit = _useStoresPlatformLim2.hasReachedStoresWarningLimit,
12692
+ hasReachedStoresErrorLimit = _useStoresPlatformLim2.hasReachedStoresErrorLimit;
12693
+ return {
12694
+ StoreLimits: platformLimits,
12695
+ refetchStoresPlatformLimits: refetch,
12696
+ status: {
12697
+ hasReachedStoresWarningLimit,
12698
+ hasReachedStoresErrorLimit
12699
+ }
12700
+ };
12701
+ };
12702
+ var useStoresLimits$1 = useStoresLimits;
12703
+
12293
12704
  var messages$c = reactIntl.defineMessages({
12294
12705
  yes: {
12295
12706
  id: 'BooleanField.yes',
@@ -13585,7 +13996,7 @@ function formatDiscount(discount, currencyCode, intl) {
13585
13996
  if (discount.type === 'relative') return `${discount.permyriad / 100}%`;
13586
13997
  if (!discount.money) return null;
13587
13998
  const moneyForCurrencyCode = _findInstanceProperty__default["default"](_context = discount.money).call(_context, discountMoney => discountMoney.currencyCode === currencyCode);
13588
- return moneyForCurrencyCode ? formatMoney$1(moneyForCurrencyCode, intl) : null;
13999
+ return moneyForCurrencyCode ? formatMoney$2(moneyForCurrencyCode, intl) : null;
13589
14000
  }
13590
14001
 
13591
14002
  function formatPercentage(percentage) {
@@ -13731,6 +14142,9 @@ function resolveStatusType(product) {
13731
14142
  if (published && !hasStagedChanges) return PRODUCT_STATUSES.PUBLISHED;
13732
14143
  return PRODUCT_STATUSES.UNPUBLISHED;
13733
14144
  }
14145
+ function getStampToneByPublishState(statusCode) {
14146
+ if (statusCode === PRODUCT_STATUSES.UNPUBLISHED) return 'secondary';else if (statusCode === PRODUCT_STATUSES.PUBLISHED) return 'positive';else if (statusCode === PRODUCT_STATUSES.MODIFIED) return 'warning';
14147
+ }
13734
14148
  const computedProperties = {
13735
14149
  // TODO: show relative time as tooltip
13736
14150
  // `intl.formatRelative(<DATETIME>)`
@@ -13762,7 +14176,7 @@ const computedProperties = {
13762
14176
  intl = _ref4.intl;
13763
14177
  const allVariants = _concatInstanceProperty__default["default"](_context2 = product.variants).call(_context2, product.masterVariant);
13764
14178
  const variantPrices = flatMap__default["default"](allVariants, variant => variant.prices);
13765
- return _mapInstanceProperty__default["default"](_context3 = getMinimumPricesByCurrencyCode(variantPrices)).call(_context3, price => formatMoney$1(price, intl)).join(', ') || constants.NO_VALUE_FALLBACK;
14179
+ return _mapInstanceProperty__default["default"](_context3 = getMinimumPricesByCurrencyCode(variantPrices)).call(_context3, price => formatMoney$2(price, intl)).join(', ') || constants.NO_VALUE_FALLBACK;
13766
14180
  },
13767
14181
  sku(_ref5) {
13768
14182
  var _context4, _context5;
@@ -14054,6 +14468,8 @@ var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kin
14054
14468
 
14055
14469
  exports.BooleanField = booleanField;
14056
14470
  exports.Button = Button$1;
14471
+ exports.CUSTOM_FIELD_TYPES = CUSTOM_FIELD_TYPES;
14472
+ exports.Carousel = Carousel$1;
14057
14473
  exports.CartDiscountReferenceSearch = CartDiscountReferenceSearch;
14058
14474
  exports.CategoryReferenceSearch = CategoryReferenceSearch;
14059
14475
  exports.CategorySearchPickerOptionFragment = CategorySearchPickerOptionFragment;
@@ -14061,6 +14477,7 @@ exports.CenteredLoadingSpinner = CenteredLoadingSpinner$1;
14061
14477
  exports.ChannelPickerInput = ChannelPickerInput$1;
14062
14478
  exports.CountriesPicker = CountriesPicker;
14063
14479
  exports.CustomFieldDefinitionsConnector = customFieldDefinitionsConnector;
14480
+ exports.CustomFieldInput = CustomFieldInput$1;
14064
14481
  exports.CustomFieldTooltip = CustomFieldTooltip$1;
14065
14482
  exports.CustomFieldTypeDefinitionsConnector = CustomFieldTypeDefinitionsConnector$1;
14066
14483
  exports.CustomFields = CustomFields$1;
@@ -14073,6 +14490,7 @@ exports.EMAIL_REGEX = EMAIL_REGEX;
14073
14490
  exports.FileInput = FileInput$1;
14074
14491
  exports.FormattedDateTime = FormattedDateTime$1;
14075
14492
  exports.FormattedLocalizedString = FormattedLocalizedString;
14493
+ exports.LOWER_STORES_LIMIT = LOWER_STORES_LIMIT;
14076
14494
  exports.LabelRange = LabelRange$1;
14077
14495
  exports.MC_RESOURCES_WITH_KEYS = MC_RESOURCES_WITH_KEYS;
14078
14496
  exports.MissingValueField = MissingValueField$1;
@@ -14081,11 +14499,15 @@ exports.NumericFormatInput = numericFormatInput;
14081
14499
  exports.Option = Option$2;
14082
14500
  exports.PRECISION_TYPES = PRECISION_TYPES;
14083
14501
  exports.PimIndexerProvider = pimIndexerProvider;
14502
+ exports.PlatformLimitsFetcherQuery = PlatformLimitsFetcherQuery;
14084
14503
  exports.ProductAttributeInput = ProductAttributeInput;
14085
14504
  exports.ProductAttributes = ProductAttributes;
14086
14505
  exports.ProductPickerInput = ProductPickerInput$1;
14087
14506
  exports.ProductSelectionPicker = ProductSelectionsPicker;
14088
14507
  exports.QUERY_LIMIT = QUERY_LIMIT;
14508
+ exports.QUERY_MAX_LIMIT = QUERY_MAX_LIMIT;
14509
+ exports.RESOURCES_WITH_PLATFORM_LIMITS = RESOURCES_WITH_PLATFORM_LIMITS;
14510
+ exports.RecurrentIntervalPicker = RecurrentIntervalPicker$1;
14089
14511
  exports.RequestCache = RequestCache$1;
14090
14512
  exports.RequiredIndicator = RequiredIndicator$1;
14091
14513
  exports.ScrollToFieldError = ScrollToFieldError$1;
@@ -14094,12 +14516,14 @@ exports.SelectableFieldSearchInput = SelectableFieldSearchInput$1;
14094
14516
  exports.StoreSelectField = StoreSelectField$1;
14095
14517
  exports.StoreSelectInput = StoreSelectInput$1;
14096
14518
  exports.ThrottledField = ThrottledField$1;
14519
+ exports.UPPER_STORES_LIMIT = UPPER_STORES_LIMIT;
14097
14520
  exports.VALIDATOR_INTEGER = VALIDATOR_INTEGER;
14098
14521
  exports.VALIDATOR_NUMERIC = VALIDATOR_NUMERIC;
14099
14522
  exports.VALIDATOR_REQUIRED = VALIDATOR_REQUIRED;
14100
14523
  exports.WithPimIndexer = WithPimIndexer$1;
14101
14524
  exports.allowedProperties = allowedProperties;
14102
14525
  exports.and = and;
14526
+ exports.attributeToCustomField = attributeToCustomField;
14103
14527
  exports.attributesMapToNameValuePairs = attributesMapToNameValuePairs;
14104
14528
  exports.base64ToString = base64ToString;
14105
14529
  exports.booleanMessages = messages$c;
@@ -14117,6 +14541,7 @@ exports.convertProductSelectionFromGraphQl = convertProductSelectionFromGraphQl;
14117
14541
  exports.convertRatioToPercentage = convertRatioToPercentage;
14118
14542
  exports.createGraphQlUpdateActions = createGraphQlUpdateActions;
14119
14543
  exports.createNextSortDefinition = createNextSortDefinition$1;
14544
+ exports.createPlatformLimitsQueryVariables = createPlatformLimitsQueryVariables;
14120
14545
  exports.createReducer = createReducer;
14121
14546
  exports.createResourceReducer = createResourceReducer;
14122
14547
  exports.customFieldsTransformer = customFields;
@@ -14133,7 +14558,7 @@ exports.formatCustomerName = formatCustomerName;
14133
14558
  exports.formatDateRangeValue = formatDateRangeValue;
14134
14559
  exports.formatDateTime = formatDateTime$1;
14135
14560
  exports.formatDiscount = formatDiscount;
14136
- exports.formatMoney = formatMoney$1;
14561
+ exports.formatMoney = formatMoney$2;
14137
14562
  exports.formatMoneyRangeValue = formatMoneyRangeValue;
14138
14563
  exports.formatMoneyValue = formatMoneyValue;
14139
14564
  exports.formatPercentage = formatPercentage;
@@ -14156,6 +14581,7 @@ exports.getPrefixSearchBounds = getPrefixSearchBounds$1;
14156
14581
  exports.getPriceChannelName = getPriceChannelName;
14157
14582
  exports.getReferenceTypeId = getReferenceTypeId;
14158
14583
  exports.getSelectedPrice = getSelectedPrice;
14584
+ exports.getStampToneByPublishState = getStampToneByPublishState;
14159
14585
  exports.getTimeZoneId = getTimeZoneId;
14160
14586
  exports.getTimeZoneLabel = getTimeZoneLabel;
14161
14587
  exports.getTypeNameOfType = getTypeNameOfType;
@@ -14187,6 +14613,7 @@ exports.isValidISODate = isValidISODate;
14187
14613
  exports.isValidISODateTime = isValidISODateTime;
14188
14614
  exports.isValidISOTime = isValidISOTime;
14189
14615
  exports.keepDisplayName = keepDisplayName$1;
14616
+ exports.mapShippingRateTierToGraphQL = mapShippingRateTierToGraphQL;
14190
14617
  exports.mapStoresToOptions = mapStoresToOptions;
14191
14618
  exports.mapTimeZonesToOptions = mapTimeZonesToOptions;
14192
14619
  exports.minusify = minusify;
@@ -14197,14 +14624,14 @@ exports.not = not;
14197
14624
  exports.omitDeep = omitDeep;
14198
14625
  exports.omitSetsOfSets = omitSetsOfSets;
14199
14626
  exports.or = or;
14200
- exports.pickerMessages = pickerMessages$1;
14627
+ exports.pickerMessages = commonPickerMessages;
14201
14628
  exports.range = range;
14202
14629
  exports.reorderArrayItems = reorderArrayItems;
14203
14630
  exports.resolveStatusType = resolveStatusType;
14204
14631
  exports.safelyAddFallback = safelyAddFallback;
14205
14632
  exports.sanitize = sanitize;
14206
14633
  exports.searchCategories = searchCategories;
14207
- exports.searchInputMessages = messages$N;
14634
+ exports.searchInputMessages = messages$O;
14208
14635
  exports.setDisplayName = setDisplayName$1;
14209
14636
  exports.setToArray = setToArray;
14210
14637
  exports.shallowEqual = shallowEqual;
@@ -14221,6 +14648,7 @@ exports.transformLocalizedFieldsForCategory = transformLocalizedFieldsForCategor
14221
14648
  exports.truncate = truncate;
14222
14649
  exports.unique = unique;
14223
14650
  exports.uniqueObjects = uniqueObjects;
14651
+ exports.useBusinessUnitsPlatformLimits = useBusinessUnitsLimits$1;
14224
14652
  exports.useCachedCategoryOptions = useCachedCategoryOptions;
14225
14653
  exports.useCurrentOption = useCurrentOption;
14226
14654
  exports.useCustomFieldsDnDContext = useDnDContext;
@@ -14244,6 +14672,7 @@ exports.useShippingMethodsPlatformLimits = useShippingMethodsPlatformLimits;
14244
14672
  exports.useStorage = useStorage$1;
14245
14673
  exports.useStoreKeysInDataFences = useStoreKeysInDataFences$1;
14246
14674
  exports.useStoresListFetcher = useStoresListFetcher$1;
14675
+ exports.useStoresPlatformLimits = useStoresLimits$1;
14247
14676
  exports.useTaxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits;
14248
14677
  exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1;
14249
14678
  exports.validateCustomField = validateFilter$2;