@commercetools-frontend/experimental-components 6.4.3 → 6.4.5

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 (19) hide show
  1. package/dist/commercetools-frontend-experimental-components.cjs.dev.js +273 -123
  2. package/dist/commercetools-frontend-experimental-components.cjs.prod.js +273 -123
  3. package/dist/commercetools-frontend-experimental-components.esm.js +271 -123
  4. package/dist/declarations/src/components/channel-picker-input/channel-picker-input.d.ts +3 -1
  5. package/dist/declarations/src/features/picker/index.d.ts +1 -0
  6. package/dist/declarations/src/features/picker/shared/hooks/use-current-multiple-options.d.ts +16 -0
  7. package/dist/declarations/src/features/picker/shared/hooks/use-current-option.d.ts +2 -1
  8. package/dist/declarations/src/hooks/use-is-field-duplicated/use-is-field-duplicated.d.ts +1 -0
  9. package/dist/declarations/src/hooks/use-product-selections-fetcher/use-product-selections-fetcher.d.ts +1 -0
  10. package/dist/declarations/src/hooks/use-product-selections-total-fetcher/use-product-selections-total-fetcher.d.ts +1 -0
  11. package/dist/declarations/src/index.d.ts +2 -1
  12. package/dist/declarations/src/utils/prices/prices.d.ts +3 -2
  13. package/dist/declarations/src/utils/store-data-fence-product-selection/index.d.ts +1 -0
  14. package/dist/declarations/src/utils/store-data-fence-product-selection/store-data-fence-product-selection.d.ts +1 -0
  15. package/dist/styles.css +20 -20
  16. package/package.json +23 -20
  17. package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.dev.js +1 -0
  18. package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.prod.js +1 -0
  19. package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.esm.js +1 -0
@@ -35,6 +35,7 @@ var _Map = require('@babel/runtime-corejs3/core-js-stable/map');
35
35
  var _everyInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/every');
36
36
  var _Promise = require('@babel/runtime-corejs3/core-js-stable/promise');
37
37
  var _setTimeout = require('@babel/runtime-corejs3/core-js-stable/set-timeout');
38
+ var _bindInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/bind');
38
39
  var fastEquals = require('fast-equals');
39
40
  var jsxRuntime = require('@emotion/react/jsx-runtime');
40
41
  var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
@@ -46,6 +47,7 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
46
47
  var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
47
48
  var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
48
49
  var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
50
+ var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
49
51
  var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
50
52
  var oneLine = require('common-tags/lib/oneLine');
51
53
  var moment$1 = require('moment-timezone');
@@ -53,7 +55,6 @@ var formik = require('formik');
53
55
  var isNil$1 = require('lodash/isNil');
54
56
  var omitBy = require('lodash/omitBy');
55
57
  var _Array$isArray = require('@babel/runtime-corejs3/core-js-stable/array/is-array');
56
- var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
57
58
  var _lastIndexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/last-index-of');
58
59
  var _parseInt = require('@babel/runtime-corejs3/core-js-stable/parse-int');
59
60
  var merge = require('lodash/merge');
@@ -65,6 +66,7 @@ var reselect = require('reselect');
65
66
  var _endsWithInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/ends-with');
66
67
  var _toArray = require('@babel/runtime-corejs3/helpers/toArray');
67
68
  var _reverseInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/reverse');
69
+ var sentry = require('@commercetools-frontend/sentry');
68
70
  var debounce = require('debounce-promise');
69
71
  var sdk = require('@commercetools-frontend/sdk');
70
72
  var keyBy = require('lodash/keyBy');
@@ -111,7 +113,6 @@ var flatten = require('lodash/flatten');
111
113
  var uniqBy = require('lodash/uniqBy');
112
114
  var invariant = require('tiny-invariant');
113
115
  var hoistNonReactStatics = require('hoist-non-react-statics');
114
- var sentry = require('@commercetools-frontend/sentry');
115
116
  var hooks = require('@apollo/client/react/hooks');
116
117
  var reactRedux = require('react-redux');
117
118
  var get = require('lodash/get');
@@ -159,17 +160,18 @@ var _Map__default = /*#__PURE__*/_interopDefault(_Map);
159
160
  var _everyInstanceProperty__default = /*#__PURE__*/_interopDefault(_everyInstanceProperty);
160
161
  var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
161
162
  var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
163
+ var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
162
164
  var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
163
165
  var classnames__default = /*#__PURE__*/_interopDefault(classnames);
164
166
  var camelCase__default = /*#__PURE__*/_interopDefault(camelCase);
165
167
  var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
168
+ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
166
169
  var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
167
170
  var oneLine__default = /*#__PURE__*/_interopDefault(oneLine);
168
171
  var moment__default$1 = /*#__PURE__*/_interopDefault(moment$1);
169
172
  var isNil__default = /*#__PURE__*/_interopDefault(isNil$1);
170
173
  var omitBy__default = /*#__PURE__*/_interopDefault(omitBy);
171
174
  var _Array$isArray__default = /*#__PURE__*/_interopDefault(_Array$isArray);
172
- var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
173
175
  var _lastIndexOfInstanceProperty__default = /*#__PURE__*/_interopDefault(_lastIndexOfInstanceProperty);
174
176
  var _parseInt__default = /*#__PURE__*/_interopDefault(_parseInt);
175
177
  var merge__default = /*#__PURE__*/_interopDefault(merge);
@@ -315,7 +317,9 @@ const ChannelPickerInput = _ref => {
315
317
  onError = _ref.onError,
316
318
  placeholder = _ref.placeholder,
317
319
  roles = _ref.roles,
318
- hasWarning = _ref.hasWarning;
320
+ hasWarning = _ref.hasWarning,
321
+ _ref$isMulti = _ref.isMulti,
322
+ isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti;
319
323
  const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
320
324
  const _useIntl = reactIntl.useIntl(),
321
325
  formatMessage = _useIntl.formatMessage;
@@ -350,17 +354,30 @@ const ChannelPickerInput = _ref => {
350
354
  variables,
351
355
  prefixSearchFields
352
356
  });
353
- const currentOption = useCurrentOption({
357
+ const singleChannelId = !isMulti && typeof value === 'string' ? value : undefined;
358
+ const multipleChannelIds = isMulti && _Array$isArray__default["default"](value) ? value : [];
359
+ const currentSingleOption = useCurrentOption({
354
360
  query: GetChannelQuery,
355
- id: value,
361
+ id: isMulti ? undefined : singleChannelId,
356
362
  queryDataToItem: _ref2 => {
357
363
  let channel = _ref2.channel;
358
364
  return channel;
359
365
  },
360
366
  itemToOption: convertChannelToOption,
361
367
  typename: 'Channel',
362
- fragment: PickerInputChannel
368
+ fragment: PickerInputChannel,
369
+ skip: isMulti
363
370
  });
371
+ const currentMultipleOptions = useCurrentMultipleOptions({
372
+ query: GetChannelsQuery,
373
+ ids: isMulti ? multipleChannelIds : [],
374
+ extractItems: data => data.channels.results,
375
+ itemToOption: convertChannelToOption,
376
+ typename: 'Channel',
377
+ fragment: PickerInputChannel,
378
+ skip: !isMulti
379
+ });
380
+ const currentOptions = isMulti ? currentMultipleOptions : currentSingleOption;
364
381
  const handleLoadOptions = React.useCallback(inputValue => loadOptions(inputValue).then(_ref3 => {
365
382
  var _context;
366
383
  let data = _ref3.data;
@@ -379,13 +396,14 @@ const ChannelPickerInput = _ref => {
379
396
  setLoadingError(null);
380
397
  handleInternalInputChange(event);
381
398
  }, [handleInternalInputChange]);
382
- const isCurrentOptionLoadingFailed = Boolean(currentOption?.error);
399
+ const isCurrentOptionLoadingFailed = Boolean(currentOptions?.error);
383
400
  React.useEffect(() => {
384
- if (isCurrentOptionLoadingFailed && onError) onError(currentOption.error);
385
- }, [isCurrentOptionLoadingFailed, onError, currentOption]);
401
+ if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
402
+ }, [isCurrentOptionLoadingFailed, onError, currentOptions]);
386
403
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
387
404
  const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$R.noChannelsFound), [loadingError, formatMessage]);
388
- const tooltipTitle = currentOption?.data?.label ?? '';
405
+ const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
406
+ const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
389
407
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
390
408
  max: "scale",
391
409
  children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
@@ -400,7 +418,7 @@ const ChannelPickerInput = _ref => {
400
418
  defaultOptions: true,
401
419
  showOptionGroupDivider: true,
402
420
  isClearable: isClearable,
403
- isReadOnly: isReadOnly || currentOption.loading,
421
+ isReadOnly: isReadOnly || currentOptions.loading,
404
422
  isDisabled: isDisabled,
405
423
  components: {
406
424
  Option: Option$2
@@ -408,12 +426,13 @@ const ChannelPickerInput = _ref => {
408
426
  onChange: handleChange,
409
427
  onInputChange: handleInputChange,
410
428
  onBlur: onBlur,
411
- value: currentOption.data,
429
+ value: selectedValue,
412
430
  noOptionsMessage: handleNoOptions,
413
431
  hasError: hasError || isLoadingFailed,
414
432
  menuPortalZIndex: Z_INDEX_DROPDOWN,
415
433
  menuPortalTarget: document.body,
416
- hasWarning: hasWarning
434
+ hasWarning: hasWarning,
435
+ isMulti: isMulti
417
436
  })
418
437
  }), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
419
438
  tone: "negative",
@@ -760,7 +779,7 @@ const Option$2 = props => {
760
779
  Option$2.displayName = 'Option';
761
780
 
762
781
  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; }
763
- 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; }
782
+ 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; }
764
783
  const useHandlers = onChange => {
765
784
  const _useState = React.useState(),
766
785
  _useState2 = _slicedToArray(_useState, 2),
@@ -770,9 +789,10 @@ const useHandlers = onChange => {
770
789
  setInputValue(changedValue);
771
790
  }, []);
772
791
  const handleChange = useEventCallback$1(event => {
792
+ var _context;
773
793
  const eventWithExtractedValue = _objectSpread$1o(_objectSpread$1o({}, event), {}, {
774
794
  target: _objectSpread$1o(_objectSpread$1o({}, event.target), {}, {
775
- value: event.target.value?.value
795
+ value: _Array$isArray__default["default"](event.target.value) ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item?.value) : event.target.value?.value
776
796
  })
777
797
  });
778
798
  onChange(eventWithExtractedValue);
@@ -876,8 +896,9 @@ const useFetchProductTypesFromPIM = _ref => {
876
896
  const dispatch = sdk.useAsyncDispatch();
877
897
  const executeGraphQLRequest = useExecuteGraphQLRequest();
878
898
  const fetchProductTypesFromPim = React.useCallback(async searchTerm => {
899
+ var _context, _context2;
879
900
  const result = await dispatch(createSearchProductsFromPIMAction(searchTerm, projectKey));
880
- const ids = result?.hits?.map(hit => hit.id) ?? [];
901
+ const ids = ((_context = result?.hits) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(hit => hit.id) ?? [];
881
902
  // Avoid sending any requests if it's clear that nothing is found
882
903
  if (ids.length === 0) {
883
904
  return {
@@ -918,9 +939,9 @@ const constructNestedExpression = (reversedPath, predicate) => {
918
939
  };
919
940
  const constructPrefixSearchPredicate = (prefixSearchFields, lowerBound, upperBound) => {
920
941
  const constructPrefixSearchExpression = field => {
921
- var _context;
942
+ var _context3;
922
943
  const parts = field.split('.');
923
- const _parts$slice$reverse = _reverseInstanceProperty__default["default"](_context = _sliceInstanceProperty__default["default"](parts).call(parts)).call(_context),
944
+ const _parts$slice$reverse = _reverseInstanceProperty__default["default"](_context3 = _sliceInstanceProperty__default["default"](parts).call(parts)).call(_context3),
924
945
  _parts$slice$reverse2 = _toArray(_parts$slice$reverse),
925
946
  valueToNest = _parts$slice$reverse2[0],
926
947
  reversedPathToNestedValue = _sliceInstanceProperty__default["default"](_parts$slice$reverse2).call(_parts$slice$reverse2, 1);
@@ -1000,15 +1021,18 @@ function useCurrentOption(_ref) {
1000
1021
  query = _ref.query,
1001
1022
  fragment = _ref.fragment,
1002
1023
  queryDataToItem = _ref.queryDataToItem,
1003
- itemToOption = _ref.itemToOption;
1024
+ itemToOption = _ref.itemToOption,
1025
+ _ref$skip = _ref.skip,
1026
+ skip = _ref$skip === void 0 ? false : _ref$skip;
1004
1027
  const apolloClient = client.useApolloClient();
1005
1028
 
1006
1029
  // load from cache when possible to speed up initial render
1007
- const canReadFromCache = id && typename && fragment;
1030
+ const canReadFromCache = !skip && id && typename && fragment;
1008
1031
  const cacheItem = canReadFromCache ? apolloClient.readFragment({
1009
1032
  id: `${typename}:${id}`,
1010
1033
  fragment
1011
1034
  }) : undefined;
1035
+ const shouldFetch = !skip && Boolean(id) && !cacheItem;
1012
1036
 
1013
1037
  // load with the query as a fallback
1014
1038
  const _useQuery = client.useQuery(query, {
@@ -1018,11 +1042,18 @@ function useCurrentOption(_ref) {
1018
1042
  variables: {
1019
1043
  id
1020
1044
  },
1021
- skip: !id || cacheItem
1045
+ skip: !shouldFetch
1022
1046
  }),
1023
1047
  queryLoading = _useQuery.loading,
1024
1048
  queryData = _useQuery.data,
1025
1049
  queryError = _useQuery.error;
1050
+ if (skip) {
1051
+ return {
1052
+ loading: false,
1053
+ data: undefined,
1054
+ error: undefined
1055
+ };
1056
+ }
1026
1057
  const queryItem = queryData && queryDataToItem(queryData);
1027
1058
  const item = queryItem ?? cacheItem;
1028
1059
  const loading = item ? false : queryLoading;
@@ -1035,6 +1066,71 @@ function useCurrentOption(_ref) {
1035
1066
  };
1036
1067
  }
1037
1068
 
1069
+ function useCurrentMultipleOptions(_ref) {
1070
+ let ids = _ref.ids,
1071
+ typename = _ref.typename,
1072
+ query = _ref.query,
1073
+ fragment = _ref.fragment,
1074
+ extractItems = _ref.extractItems,
1075
+ itemToOption = _ref.itemToOption,
1076
+ skip = _ref.skip;
1077
+ const dataLocale = applicationShellConnectors.useApplicationContext(ctx => ctx.dataLocale);
1078
+ const apolloClient = client.useApolloClient();
1079
+ const canReadFromCache = !skip && ids.length > 0 && Boolean(typename) && Boolean(fragment);
1080
+ let cacheItems = [];
1081
+ let missingIds = [];
1082
+ if (canReadFromCache) {
1083
+ _forEachInstanceProperty__default["default"](ids).call(ids, id => {
1084
+ const item = apolloClient.readFragment({
1085
+ id: `${typename}:${id}`,
1086
+ fragment
1087
+ });
1088
+ if (item) {
1089
+ cacheItems.push(item);
1090
+ } else {
1091
+ missingIds.push(id);
1092
+ }
1093
+ });
1094
+ }
1095
+ const shouldFetch = !skip && ids.length > 0 && (!canReadFromCache || missingIds.length > 0);
1096
+ const _useQuery = client.useQuery(query, {
1097
+ context: {
1098
+ target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
1099
+ },
1100
+ variables: {
1101
+ where: `id in (${_mapInstanceProperty__default["default"](missingIds).call(missingIds, id => `"${id}"`).join(',')})`,
1102
+ sortByNamePath: `name.${dataLocale}`
1103
+ },
1104
+ skip: !shouldFetch
1105
+ }),
1106
+ queryLoading = _useQuery.loading,
1107
+ queryData = _useQuery.data,
1108
+ queryError = _useQuery.error;
1109
+ const queryItems = queryData ? extractItems(queryData) : [];
1110
+ const allItems = [...cacheItems, ...queryItems];
1111
+ const isIncomplete = allItems.length < ids.length;
1112
+ const loading = isIncomplete && queryLoading;
1113
+ const error = queryError || (isIncomplete && !loading ? new Error(`Incomplete data: could not retrieve all ${ids.length} channel items. Got ${allItems.length}.`) : undefined);
1114
+ React.useEffect(() => {
1115
+ if (error && !queryError) {
1116
+ sentry.reportErrorToSentry(error);
1117
+ }
1118
+ }, [error, queryError]);
1119
+ if (skip) {
1120
+ return {
1121
+ loading: false,
1122
+ data: [],
1123
+ error: undefined
1124
+ };
1125
+ }
1126
+ const data = _mapInstanceProperty__default["default"](allItems).call(allItems, itemToOption);
1127
+ return {
1128
+ loading,
1129
+ data,
1130
+ error
1131
+ };
1132
+ }
1133
+
1038
1134
  const getDisplayName = Component => {
1039
1135
  if (typeof Component === 'string') {
1040
1136
  return Component;
@@ -1700,7 +1796,7 @@ function useFormatLocalizedFieldToString() {
1700
1796
 
1701
1797
  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; }
1702
1798
  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; }
1703
- 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: "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: "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: 2220, 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 $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 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
+ 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 } } } };
1704
1800
  const MC_RESOURCES_WITH_KEYS = {
1705
1801
  ASSOCIATE_ROLE: 'ASSOCIATE_ROLE',
1706
1802
  ATTRIBUTE_GROUP: 'ATTRIBUTE_GROUP',
@@ -1720,6 +1816,7 @@ const MC_RESOURCES_WITH_KEYS = {
1720
1816
  PRODUCT_SELECTION: 'PRODUCT_SELECTION',
1721
1817
  PRODUCT_TYPE: 'PRODUCT_TYPE',
1722
1818
  SHIPPING_METHOD: 'SHIPPING_METHOD',
1819
+ SHOPPING_LIST: 'SHOPPING_LIST',
1723
1820
  STORE: 'STORE',
1724
1821
  TAX_CATEGORY: 'TAX_CATEGORY',
1725
1822
  ZONE: 'ZONE'
@@ -1743,6 +1840,7 @@ const BASE_SKIP_RESOURCE_TYPES_VARIABLES = {
1743
1840
  PRODUCT_SELECTION: 'skipProductSelections',
1744
1841
  PRODUCT_TYPE: 'skipProductTypes',
1745
1842
  SHIPPING_METHOD: 'skipShippingMethods',
1843
+ SHOPPING_LIST: 'skipShoppingLists',
1746
1844
  STORE: 'skipStores',
1747
1845
  TAX_CATEGORY: 'skipTaxCategories',
1748
1846
  ZONE: 'skipZones'
@@ -1766,6 +1864,7 @@ const DEFAULT_SKIP_RESOURCE_TYPES_VARIABLES = {
1766
1864
  [BASE_SKIP_RESOURCE_TYPES_VARIABLES.PRODUCT_SELECTION]: true,
1767
1865
  [BASE_SKIP_RESOURCE_TYPES_VARIABLES.PRODUCT_TYPE]: true,
1768
1866
  [BASE_SKIP_RESOURCE_TYPES_VARIABLES.SHIPPING_METHOD]: true,
1867
+ [BASE_SKIP_RESOURCE_TYPES_VARIABLES.SHOPPING_LIST]: true,
1769
1868
  [BASE_SKIP_RESOURCE_TYPES_VARIABLES.STORE]: true,
1770
1869
  [BASE_SKIP_RESOURCE_TYPES_VARIABLES.TAX_CATEGORY]: true,
1771
1870
  [BASE_SKIP_RESOURCE_TYPES_VARIABLES.ZONE]: true
@@ -1831,29 +1930,31 @@ const usePrevious = value => {
1831
1930
  var usePrevious$1 = usePrevious;
1832
1931
 
1833
1932
  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; }
1834
- function _objectSpread$1b(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$1b(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$1b(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1933
+ 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; }
1835
1934
  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 } } } };
1836
1935
  const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
1936
+ var _context, _context2;
1837
1937
  if (!storesQueryResult) return null;
1838
1938
  return {
1839
1939
  total: storesQueryResult.total,
1840
1940
  count: storesQueryResult.count,
1841
1941
  offset: storesQueryResult.offset,
1842
- results: storesQueryResult.results?.map(store => {
1942
+ results: ((_context = storesQueryResult.results) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(store => {
1943
+ var _context3, _context4;
1843
1944
  return _objectSpread$1b(_objectSpread$1b({}, store), {}, {
1844
- productSelections: store.productSelections?.filter(productSelectionRef => Boolean(productSelectionRef.productSelection))
1945
+ productSelections: ((_context3 = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _filterInstanceProperty__default["default"](_context3), _context3))?.(productSelectionRef => Boolean(productSelectionRef.productSelection))
1845
1946
  });
1846
1947
  })
1847
1948
  };
1848
1949
  };
1849
1950
  const createQueryVariables$6 = ownProps => {
1850
- var _context;
1951
+ var _context5;
1851
1952
  return _objectSpread$1b(_objectSpread$1b({
1852
1953
  limit: ownProps.limit,
1853
1954
  offset: ownProps.offset,
1854
1955
  sort: _sortInstanceProperty__default["default"](ownProps)
1855
1956
  }, Boolean(ownProps.stores) && {
1856
- where: `key in (${_mapInstanceProperty__default["default"](_context = ownProps.stores).call(_context, store => `"${store}"`).join(', ')})`
1957
+ where: `key in (${_mapInstanceProperty__default["default"](_context5 = ownProps.stores).call(_context5, store => `"${store}"`).join(', ')})`
1857
1958
  }), {}, {
1858
1959
  excludeExtendedStoresList: ownProps.excludeExtendedStoresList,
1859
1960
  excludeProductSelections: ownProps.excludeProductSelections
@@ -2353,10 +2454,12 @@ const useProductSelectionsTotalFetcher = props => {
2353
2454
  }
2354
2455
  }),
2355
2456
  loading = _useQuery.loading,
2356
- data = _useQuery.data;
2457
+ data = _useQuery.data,
2458
+ refetch = _useQuery.refetch;
2357
2459
  return {
2358
2460
  isLoading: loading,
2359
- total: data?.productSelections?.total
2461
+ total: data?.productSelections?.total,
2462
+ refetch
2360
2463
  };
2361
2464
  };
2362
2465
  var useProductSelectionsTotalFetcher$1 = useProductSelectionsTotalFetcher;
@@ -2375,13 +2478,14 @@ const convertProductSelectionsFromGraphQl = productSelections => {
2375
2478
  });
2376
2479
  };
2377
2480
 
2378
- 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" } }, 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: [] }], 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" } } }], 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: 341, source: { body: "query FetchProductSelections($limit: Int, $offset: Int, $sort: [String!]) {\n productSelections(limit: $limit, offset: $offset, sort: $sort) {\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
+ 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 } } } };
2379
2482
  const createQueryVariables$5 = function () {
2380
2483
  let ownProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2381
2484
  return {
2382
2485
  limit: ownProps.limit,
2383
2486
  offset: ownProps.offset,
2384
- sort: _sortInstanceProperty__default["default"](ownProps)
2487
+ sort: _sortInstanceProperty__default["default"](ownProps),
2488
+ where: ownProps.where
2385
2489
  };
2386
2490
  };
2387
2491
  const emptyProductSelections = {
@@ -3980,10 +4084,10 @@ const formatNilType = _ref9 => {
3980
4084
  });
3981
4085
  return fallbackValue;
3982
4086
  };
3983
- const formatUnknown = _ref10 => {
3984
- let type = _ref10.type,
3985
- value = _ref10.value,
3986
- fallbackValue = _ref10.fallbackValue;
4087
+ const formatUnknown = _ref0 => {
4088
+ let type = _ref0.type,
4089
+ value = _ref0.value,
4090
+ fallbackValue = _ref0.fallbackValue;
3987
4091
  // NOTE This is reporting within the render function, which is supposed to
3988
4092
  // be pure. This is quite bad as this is a side-effect in the render fn.
3989
4093
  sentry.reportErrorToSentry(new Error(`Unhandled custom attribute type '${type.name}' for value`), {
@@ -3993,17 +4097,17 @@ const formatUnknown = _ref10 => {
3993
4097
  });
3994
4098
  return fallbackValue;
3995
4099
  };
3996
- const formatNested = _ref11 => {
3997
- let fallbackValue = _ref11.fallbackValue;
4100
+ const formatNested = _ref1 => {
4101
+ let fallbackValue = _ref1.fallbackValue;
3998
4102
  return fallbackValue;
3999
4103
  };
4000
- const formatSet = _ref12 => {
4001
- let type = _ref12.type,
4002
- value = _ref12.value,
4003
- intl = _ref12.intl,
4004
- language = _ref12.language,
4005
- languages = _ref12.languages,
4006
- fallbackValue = _ref12.fallbackValue;
4104
+ const formatSet = _ref10 => {
4105
+ let type = _ref10.type,
4106
+ value = _ref10.value,
4107
+ intl = _ref10.intl,
4108
+ language = _ref10.language,
4109
+ languages = _ref10.languages,
4110
+ fallbackValue = _ref10.fallbackValue;
4007
4111
  const formatedElements = _mapInstanceProperty__default["default"](value).call(value, elementValue => formatAttribute({
4008
4112
  type: type.elementType,
4009
4113
  value: elementValue,
@@ -4014,22 +4118,22 @@ const formatSet = _ref12 => {
4014
4118
  }));
4015
4119
  return formatedElements.join(', ');
4016
4120
  };
4017
- const doNotFormat = _ref13 => {
4018
- let value = _ref13.value;
4121
+ const doNotFormat = _ref11 => {
4122
+ let value = _ref11.value;
4019
4123
  return value;
4020
4124
  };
4021
4125
  const getFormatter = type => {
4022
4126
  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;
4023
4127
  };
4024
- function formatAttribute(_ref14) {
4025
- let type = _ref14.type,
4026
- value = _ref14.value,
4027
- intl = _ref14.intl,
4028
- language = _ref14.language,
4029
- languages = _ref14.languages,
4030
- userTimeZone = _ref14.userTimeZone,
4031
- _ref14$fallbackValue = _ref14.fallbackValue,
4032
- fallbackValue = _ref14$fallbackValue === void 0 ? constants.NO_VALUE_FALLBACK : _ref14$fallbackValue;
4128
+ function formatAttribute(_ref12) {
4129
+ let type = _ref12.type,
4130
+ value = _ref12.value,
4131
+ intl = _ref12.intl,
4132
+ language = _ref12.language,
4133
+ languages = _ref12.languages,
4134
+ userTimeZone = _ref12.userTimeZone,
4135
+ _ref12$fallbackValue = _ref12.fallbackValue,
4136
+ fallbackValue = _ref12$fallbackValue === void 0 ? constants.NO_VALUE_FALLBACK : _ref12$fallbackValue;
4033
4137
  if (isNil__default["default"](value)) {
4034
4138
  return fallbackValue;
4035
4139
  }
@@ -4131,7 +4235,7 @@ var getPrefixSearchBounds$1 = getPrefixSearchBounds;
4131
4235
 
4132
4236
  const _excluded$d = ["action"];
4133
4237
  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; }
4134
- function _objectSpread$15(e) { for (var r = 1; r < arguments.length; r++) { var _context10, _context11; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context10 = ownKeys$15(Object(t), !0)).call(_context10, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context11 = ownKeys$15(Object(t))).call(_context11, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4238
+ function _objectSpread$15(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$15(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$15(Object(t))).call(_context1, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4135
4239
 
4136
4240
  /**
4137
4241
  * Checks if a value is a LocalizedString
@@ -4750,7 +4854,7 @@ function omitDeep(obj, fieldsToOmit) {
4750
4854
  }
4751
4855
 
4752
4856
  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; }
4753
- function _objectSpread$14(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$14(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$14(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4857
+ 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; }
4754
4858
  function getPriceChannelName(price) {
4755
4859
  return price.channel?.name ?? price.channel?.key ?? null;
4756
4860
  }
@@ -4771,13 +4875,20 @@ function getDiscountValue(price) {
4771
4875
  });
4772
4876
  }
4773
4877
  function getSelectedPrice(price) {
4774
- return price.discounted ? price.discounted : price;
4878
+ let isCartDiscountBestDealDiscountType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
4879
+ return isCartDiscountBestDealDiscountType ? price : price.discounted ?? price;
4775
4880
  }
4776
4881
  function getNetUnitPrice(_ref) {
4882
+ var _context, _context2;
4777
4883
  let lineItem = _ref.lineItem,
4778
- shouldRoundAmount = _ref.shouldRoundAmount;
4779
- const price = getSelectedPrice(lineItem.price);
4780
- const filteredPerMethodTaxRate = lineItem?.perMethodTaxRate?.filter(perMethodTax => lineItem?.shippingDetails?.targets?.findIndex(target => target?.shippingMethodKey === perMethodTax?.shippingMethodKey) >= 0);
4884
+ shouldRoundAmount = _ref.shouldRoundAmount,
4885
+ _ref$isCartDiscountBe = _ref.isCartDiscountBestDealDiscountType,
4886
+ isCartDiscountBestDealDiscountType = _ref$isCartDiscountBe === void 0 ? false : _ref$isCartDiscountBe;
4887
+ const price = getSelectedPrice(lineItem.price, isCartDiscountBestDealDiscountType);
4888
+ const filteredPerMethodTaxRate = ((_context = lineItem?.perMethodTaxRate) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _filterInstanceProperty__default["default"](_context), _context))?.(perMethodTax => {
4889
+ var _context3, _context4;
4890
+ return ((_context3 = lineItem?.shippingDetails?.targets) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _findIndexInstanceProperty__default["default"](_context3), _context3))?.(target => target?.shippingMethodKey === perMethodTax?.shippingMethodKey) >= 0;
4891
+ });
4781
4892
 
4782
4893
  // when shipping mode is multi with the same tax rate
4783
4894
  if (filteredPerMethodTaxRate?.length > 0 && filteredPerMethodTaxRate[0]?.taxRate?.includedInPrice) {
@@ -5324,10 +5435,13 @@ const useReferenceSearchItems = _ref => {
5324
5435
  };
5325
5436
  };
5326
5437
  function ReferenceSearch(props) {
5327
- const ids = React.useMemo(() => props.value ? props.isMulti ? props.value?.map(_ref2 => {
5328
- let id = _ref2.id;
5329
- return id;
5330
- }) : [props.value?.id] : [], [props.value, props.isMulti]);
5438
+ const ids = React.useMemo(() => {
5439
+ var _context, _context2;
5440
+ return props.value ? props.isMulti ? ((_context = props.value) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(_ref2 => {
5441
+ let id = _ref2.id;
5442
+ return id;
5443
+ }) : [props.value?.id] : [];
5444
+ }, [props.value, props.isMulti]);
5331
5445
  const _useReferenceSearchIt = useReferenceSearchItems({
5332
5446
  loadItemsBySearchTerm: props.loadItemsBySearchTerm,
5333
5447
  loadItemsByIds: props.loadItemsByIds,
@@ -5344,8 +5458,8 @@ function ReferenceSearch(props) {
5344
5458
  const tooltipTitle = value || props.value ? props.mapItemToOption(value || props.value).label : '';
5345
5459
  const loadItems = value => _Promise__default["default"].resolve(handleLoadItems(value)).then(items => _mapInstanceProperty__default["default"](items).call(items, item => props.mapItemToOption(item)));
5346
5460
  const handleChange = event => {
5347
- var _context;
5348
- const option = props.isMulti ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item.value) : event.target.value?.value || null;
5461
+ var _context3;
5462
+ const option = props.isMulti ? _mapInstanceProperty__default["default"](_context3 = event.target.value).call(_context3, item => item.value) : event.target.value?.value || null;
5349
5463
  props.onChange(option);
5350
5464
  };
5351
5465
  return jsxRuntime.jsxs("div", {
@@ -5782,25 +5896,26 @@ var messages$D = reactIntl.defineMessages({
5782
5896
  });
5783
5897
 
5784
5898
  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; }
5785
- function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$X(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$X(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5899
+ 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; }
5786
5900
  const emptyCountryOption = intl => [{
5787
5901
  label: intl.formatMessage(messages$D.countriesAsyncSelectDropdownTypeAheadPrompt),
5788
5902
  value: undefined,
5789
5903
  isDisabled: true
5790
5904
  }];
5791
5905
  function CountriesAsyncSelectDropdown(props) {
5792
- var _context2;
5906
+ var _context6;
5793
5907
  const intl = reactIntl.useIntl();
5794
5908
  const handleLoadOptions = async searchTerm => {
5795
- const filteredOptions = props.options?.filter(country => {
5796
- var _context;
5797
- return _includesInstanceProperty__default["default"](_context = country.label.toLowerCase()).call(_context, searchTerm.toLowerCase());
5909
+ var _context, _context2, _context4, _context5;
5910
+ const filteredOptions = ((_context = props.options) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _filterInstanceProperty__default["default"](_context), _context))?.(country => {
5911
+ var _context3;
5912
+ return _includesInstanceProperty__default["default"](_context3 = country.label.toLowerCase()).call(_context3, searchTerm.toLowerCase());
5798
5913
  });
5799
5914
  if (searchTerm) {
5800
5915
  return _sliceInstanceProperty__default["default"](filteredOptions).call(filteredOptions, 0, props.countriesAsyncLoadingLimit);
5801
5916
  }
5802
5917
  return [{
5803
- options: props.options?.slice(0, props.countriesAsyncLoadingLimit)
5918
+ options: ((_context4 = props.options) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _sliceInstanceProperty__default["default"](_context4), _context4))?.(0, props.countriesAsyncLoadingLimit)
5804
5919
  }, {
5805
5920
  options: emptyCountryOption(intl)
5806
5921
  }];
@@ -5822,9 +5937,9 @@ function CountriesAsyncSelectDropdown(props) {
5822
5937
  isMulti: props.isMulti,
5823
5938
  showOptionGroupDivider: true,
5824
5939
  isSearchable: true,
5825
- value: _mapInstanceProperty__default["default"](_context2 = props.value).call(_context2, countryCode => {
5826
- var _context3;
5827
- return _findInstanceProperty__default["default"](_context3 = props.options).call(_context3, country => country.value === countryCode);
5940
+ value: _mapInstanceProperty__default["default"](_context6 = props.value).call(_context6, countryCode => {
5941
+ var _context7;
5942
+ return _findInstanceProperty__default["default"](_context7 = props.options).call(_context7, country => country.value === countryCode);
5828
5943
  }),
5829
5944
  placeholder: intl.formatMessage(messages$D.countriesAsyncSelectPlaceholder),
5830
5945
  loadOptions: handleLoadOptions,
@@ -6061,7 +6176,8 @@ const CUSTOM_FIELD_TYPES = {
6061
6176
  time: 'time',
6062
6177
  datetime: 'datetime',
6063
6178
  date: 'date',
6064
- nested: 'nested'
6179
+ nested: 'nested',
6180
+ set: 'set'
6065
6181
  };
6066
6182
 
6067
6183
  // {@link https://docs.commercetools.com/api/projects/types#referencetype}
@@ -6690,7 +6806,7 @@ function CustomMoneyInput(props) {
6690
6806
  CustomMoneyInput.displayName = 'CustomMoneyInput';
6691
6807
 
6692
6808
  function ownKeys$R(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; }
6693
- function _objectSpread$R(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$R(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$R(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
6809
+ function _objectSpread$R(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$R(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$R(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
6694
6810
  var FetchProductTypeQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductTypeQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productType" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "attributeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "100" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "isRequired" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "inputTipAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, 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: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, 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: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "NestedAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeRef" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, 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: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizableEnumAttributeDefinitionType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, 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: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1905, source: { body: "query FetchProductTypeQuery($id: String!) {\n productType(id: $id) {\n name\n attributeDefinitions(limit: 100) {\n results {\n name\n isRequired\n inputHint\n inputTipAllLocales {\n value\n locale\n }\n labelAllLocales {\n value\n locale\n }\n type {\n name\n ... on SetAttributeDefinitionType {\n elementType {\n name\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n }\n }\n ... on ReferenceAttributeDefinitionType {\n referenceTypeId\n }\n ... on NestedAttributeDefinitionType {\n typeRef {\n id\n }\n }\n ... on EnumAttributeDefinitionType {\n values {\n results {\n key\n label\n }\n }\n }\n ... on LocalizableEnumAttributeDefinitionType {\n values {\n results {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
6695
6811
  const mapAttributeDefinition = definition => {
6696
6812
  var _context, _context2, _context3, _context4;
@@ -6729,7 +6845,8 @@ function useNestedProductType(fieldDefinition) {
6729
6845
  loading = _useQuery.loading,
6730
6846
  error = _useQuery.error;
6731
6847
  if (!loading && !error) {
6732
- const attributeDefinitions = data.productType?.attributeDefinitions.results.map(mapAttributeDefinition);
6848
+ var _context5, _context6, _context7;
6849
+ const attributeDefinitions = ((_context5 = data.productType) == null ? void 0 : _bindInstanceProperty__default["default"](_context7 = Function.call).call(_context7, _mapInstanceProperty__default["default"](_context6 = _context5.attributeDefinitions.results), _context6))?.(mapAttributeDefinition);
6733
6850
  return {
6734
6851
  loading: false,
6735
6852
  error: false,
@@ -7882,7 +7999,7 @@ function _objectSpread$J(e) { for (var r = 1; r < arguments.length; r++) { var _
7882
7999
  const existingAttributeTypes = ['text', 'ltext'];
7883
8000
  const newAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'datetime', 'reference', 'time']; // Add more types here
7884
8001
  const setAttributeTypes = ['text', 'ltext', 'number', 'enum', 'lenum', 'money', 'boolean', 'date', 'time', 'datetime', 'reference'];
7885
- const ENABLED_FALLBACK_ATTRIBUTE_TYPES = [CUSTOM_FIELD_TYPES.enum, CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.number, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.boolean, CUSTOM_FIELD_TYPES.money, CUSTOM_FIELD_TYPES.datetime, CUSTOM_FIELD_TYPES.date, CUSTOM_FIELD_TYPES.reference, CUSTOM_FIELD_TYPES.time];
8002
+ const ENABLED_FALLBACK_ATTRIBUTE_TYPES = [CUSTOM_FIELD_TYPES.enum, CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.number, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.boolean, CUSTOM_FIELD_TYPES.money, CUSTOM_FIELD_TYPES.datetime, CUSTOM_FIELD_TYPES.date, CUSTOM_FIELD_TYPES.reference, CUSTOM_FIELD_TYPES.time, CUSTOM_FIELD_TYPES.set];
7886
8003
  const getFieldName = (parentName, fieldName) => {
7887
8004
  if (!parentName) return fieldName;
7888
8005
  return `${parentName}.${fieldName}`;
@@ -7939,7 +8056,6 @@ const CustomFieldsInternal = _ref => {
7939
8056
  const fieldName = getFieldName(props.name, fieldDefinition.name);
7940
8057
  const isTouched = Boolean(formik.getIn(touched, fieldName));
7941
8058
  const isFieldDisabled = props.isDisabled && !(isAttributeType(fieldDefinition.type, isTailoringAttributeForOtherTypes) && isTailoringAttributesEnabled);
7942
- const isSet = fieldDefinition.type.name === 'set';
7943
8059
  const shouldUseAdditionalInfoProp = _includesInstanceProperty__default["default"](_context = [CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.localizedenum]).call(_context, fieldDefinition.type.name);
7944
8060
  const shouldDisplayFallbackRow = isTailoringFallbackEnabled && !shouldUseAdditionalInfoProp && _includesInstanceProperty__default["default"](ENABLED_FALLBACK_ATTRIBUTE_TYPES).call(ENABLED_FALLBACK_ATTRIBUTE_TYPES, fieldDefinition.type.name);
7945
8061
  const fieldErrors = formik.getIn(errors, fieldName);
@@ -7967,7 +8083,7 @@ const CustomFieldsInternal = _ref => {
7967
8083
  hasWarning: props.renderWarnings && status?.warnings[fieldName],
7968
8084
  handleWarningChange: props.handleWarningChange,
7969
8085
  renderWarnings: props.renderWarnings,
7970
- additionalInfo: !isSet && isTailoringFallbackEnabled && shouldUseAdditionalInfoProp && props.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
8086
+ additionalInfo: isTailoringFallbackEnabled && shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
7971
8087
  };
7972
8088
  const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$J({}, fieldProps));
7973
8089
  // the several values inside the key are needed to make sure the field is re-rendered when those values change
@@ -7992,9 +8108,11 @@ const CustomFieldsInternal = _ref => {
7992
8108
  alignItems: "stretch",
7993
8109
  children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
7994
8110
  children: Field
7995
- }) : Field, shouldDisplayFallbackRow && jsxRuntime.jsx(uiKit.Text.Detail, {
7996
- tone: "tertiary",
7997
- children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale)
8111
+ }) : Field, shouldDisplayFallbackRow && props.additionalInfoHandler && jsxRuntime.jsx(uiKit.Text.Wrap, {
8112
+ children: jsxRuntime.jsx(uiKit.Text.Detail, {
8113
+ tone: "tertiary",
8114
+ children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale)
8115
+ })
7998
8116
  }), props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
7999
8117
  isTouched: isTouched,
8000
8118
  errors: fieldErrors
@@ -8212,7 +8330,10 @@ const getValueFromOptions$3 = _ref => {
8212
8330
  // handle async-select-field value transformation
8213
8331
  if (isMulti) {
8214
8332
  var _context;
8215
- return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections?.includes(ps.value))).call(_context, ps => addModeToLabel(ps, enableExcludingProducts));
8333
+ return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => {
8334
+ var _context2, _context3;
8335
+ return ((_context2 = currentlySelectedProductSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _includesInstanceProperty__default["default"](_context2), _context2))?.(ps.value);
8336
+ })).call(_context, ps => addModeToLabel(ps, enableExcludingProducts));
8216
8337
  }
8217
8338
 
8218
8339
  // in case it is not multiselect, then a single valued async-select-input is being requested and the value should have proper format
@@ -8227,7 +8348,8 @@ function ProductSelectionsAsyncSelectDropdown(props) {
8227
8348
  const intl = reactIntl.useIntl();
8228
8349
  const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
8229
8350
  const productSelectionsFetcher = useProductSelectionsFetcher$1({
8230
- limit: props.upperProductSelectionsLimit
8351
+ limit: props.upperProductSelectionsLimit,
8352
+ where: props.where
8231
8353
  });
8232
8354
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
8233
8355
  projectLanguages: applicationContext.project.languages,
@@ -8238,8 +8360,8 @@ function ProductSelectionsAsyncSelectDropdown(props) {
8238
8360
  dataLocale = _useApplicationContex.dataLocale;
8239
8361
  const productSelections = React.useMemo(() => productSelectionsFetcher.productSelections?.results ?? [], [productSelectionsFetcher.productSelections?.results]);
8240
8362
  const filteredProductSelections = _filterInstanceProperty__default["default"](productSelections).call(productSelections, ps => {
8241
- var _context2;
8242
- return !_includesInstanceProperty__default["default"](_context2 = props.excludedProductSelectionIds).call(_context2, ps.id);
8363
+ var _context4;
8364
+ return !_includesInstanceProperty__default["default"](_context4 = props.excludedProductSelectionIds).call(_context4, ps.id);
8243
8365
  });
8244
8366
  const onOptionClick = event => {
8245
8367
  const productSelectionId = event.target.value?.value;
@@ -8272,8 +8394,8 @@ function ProductSelectionsAsyncSelectDropdown(props) {
8272
8394
  const handleLoadOptions = async searchTerm => {
8273
8395
  const productSelectionOptions = allProductSelectionOptions;
8274
8396
  const filteredOptions = _filterInstanceProperty__default["default"](productSelectionOptions).call(productSelectionOptions, productSelection => {
8275
- var _context3, _context4;
8276
- return _includesInstanceProperty__default["default"](_context3 = productSelection.label.toLowerCase()).call(_context3, searchTerm.toLowerCase()) || productSelection.key && _includesInstanceProperty__default["default"](_context4 = productSelection.key.toLowerCase()).call(_context4, searchTerm.toLowerCase());
8397
+ var _context5, _context6;
8398
+ return _includesInstanceProperty__default["default"](_context5 = productSelection.label.toLowerCase()).call(_context5, searchTerm.toLowerCase()) || productSelection.key && _includesInstanceProperty__default["default"](_context6 = productSelection.key.toLowerCase()).call(_context6, searchTerm.toLowerCase());
8277
8399
  });
8278
8400
  const finalOptions = searchTerm ? _sliceInstanceProperty__default["default"](filteredOptions).call(filteredOptions, 0, LOWER_PRODUCT_SELECTIONS_LIMIT) : _sliceInstanceProperty__default["default"](productSelectionOptions).call(productSelectionOptions, 0, LOWER_PRODUCT_SELECTIONS_LIMIT);
8279
8401
  return [{
@@ -8343,7 +8465,8 @@ function ProductSelectionBasicSelectDropdown(props) {
8343
8465
  const intl = reactIntl.useIntl();
8344
8466
  const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
8345
8467
  const productSelectionsFetcher = useProductSelectionsFetcher$1({
8346
- limit: props.lowerProductSelectionsLimit
8468
+ limit: props.lowerProductSelectionsLimit,
8469
+ where: props.where
8347
8470
  });
8348
8471
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
8349
8472
  projectLanguages: applicationContext.project.languages,
@@ -8446,11 +8569,22 @@ const getValueFromOptions$2 = _ref2 => {
8446
8569
  };
8447
8570
  const createQueryVariables$3 = _ref3 => {
8448
8571
  var _context;
8449
- let searchText = _ref3.searchText;
8572
+ let searchText = _ref3.searchText,
8573
+ permissionWhere = _ref3.permissionWhere;
8450
8574
  const sanitizedSearchText = sanitize(_trimInstanceProperty__default["default"](searchText).call(searchText, searchText));
8451
8575
  const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
8452
8576
  const keyQuery = `key = "${sanitizedSearchText}"`;
8453
8577
  const searchTextQuery = _filterInstanceProperty__default["default"](_context = [idQuery, keyQuery]).call(_context, Boolean).join(' or ');
8578
+ if (searchTextQuery && permissionWhere) {
8579
+ return {
8580
+ where: `(${searchTextQuery}) and (${permissionWhere})`
8581
+ };
8582
+ }
8583
+ if (permissionWhere) {
8584
+ return {
8585
+ where: permissionWhere
8586
+ };
8587
+ }
8454
8588
  return {
8455
8589
  where: searchTextQuery || undefined
8456
8590
  };
@@ -8475,7 +8609,8 @@ function ProductSelectionsSearchSelectDropdown(props) {
8475
8609
  const _await$client$query = await client$1.query({
8476
8610
  query: ProductSelectionsPickerFetcher,
8477
8611
  variables: createQueryVariables$3({
8478
- searchText
8612
+ searchText,
8613
+ permissionWhere: props.where
8479
8614
  }),
8480
8615
  context: {
8481
8616
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
@@ -8794,6 +8929,7 @@ const UPPER_STORES_LIMIT = 500;
8794
8929
 
8795
8930
  // map store to options
8796
8931
  const mapStoresToOptions = _ref => {
8932
+ var _context, _context2;
8797
8933
  let store = _ref.store,
8798
8934
  renderSelectInputOptionValuesByField = _ref.renderSelectInputOptionValuesByField,
8799
8935
  dataLocale = _ref.dataLocale,
@@ -8813,7 +8949,7 @@ const mapStoresToOptions = _ref => {
8813
8949
  value: renderSelectInputOptionValuesByField === 'key' ? store.key : store.id,
8814
8950
  key: store.key,
8815
8951
  id: store.id,
8816
- productSelections: store.productSelections?.map(productSelectionRef => productSelectionRef.productSelection.id)
8952
+ productSelections: ((_context = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(productSelectionRef => productSelectionRef.productSelection.id)
8817
8953
  };
8818
8954
  };
8819
8955
 
@@ -8830,7 +8966,7 @@ const getCustomGroupLabelOption = customLabel => [{
8830
8966
 
8831
8967
  const _excluded$6 = ["shouldFetchProductSelections"];
8832
8968
  function ownKeys$E(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
8833
- function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var _context5, _context6; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context5 = ownKeys$E(Object(t), !0)).call(_context5, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context6 = ownKeys$E(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
8969
+ function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var _context7, _context8; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context7 = ownKeys$E(Object(t), !0)).call(_context7, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context8 = ownKeys$E(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
8834
8970
  const hasErrors$2 = errors => {
8835
8971
  var _context;
8836
8972
  return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
@@ -8843,7 +8979,10 @@ const getValueFromOptions$1 = _ref => {
8843
8979
  isMulti = _ref.isMulti;
8844
8980
  // handle async-select-field value transformation
8845
8981
  if (isMulti) {
8846
- return _filterInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store => currentlySelectedStores?.includes(store.value));
8982
+ return _filterInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store => {
8983
+ var _context2, _context3;
8984
+ return ((_context2 = currentlySelectedStores) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _includesInstanceProperty__default["default"](_context2), _context2))?.(store.value);
8985
+ });
8847
8986
  }
8848
8987
 
8849
8988
  // return value as undefined if no options is yet selected. It is needed for cases where users sets initial values as empty string
@@ -8882,8 +9021,8 @@ const StoresAsyncSelectInput = _ref2 => {
8882
9021
  });
8883
9022
  const hasError = uiKit.AsyncSelectInput.isTouched(props.touched) && hasErrors$2(props.errors) || props.hasError;
8884
9023
  const mappedStoresListOptions = React.useMemo(() => {
8885
- var _context2;
8886
- return _mapInstanceProperty__default["default"](_context2 = storesListFetcher.stores?.results || []).call(_context2, store => mapStoresToOptions({
9024
+ var _context4;
9025
+ return _mapInstanceProperty__default["default"](_context4 = storesListFetcher.stores?.results || []).call(_context4, store => mapStoresToOptions({
8887
9026
  store,
8888
9027
  dataLocale,
8889
9028
  languages: projectLanguages,
@@ -8902,8 +9041,8 @@ const StoresAsyncSelectInput = _ref2 => {
8902
9041
  return result;
8903
9042
  }
8904
9043
  const filteredOptions = _filterInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, storeOption => {
8905
- var _context3, _context4;
8906
- return _includesInstanceProperty__default["default"](_context3 = storeOption.label.toLowerCase()).call(_context3, searchTerm.toLowerCase()) || storeOption.key && _includesInstanceProperty__default["default"](_context4 = storeOption.key.toLowerCase()).call(_context4, searchTerm.toLowerCase());
9044
+ var _context5, _context6;
9045
+ return _includesInstanceProperty__default["default"](_context5 = storeOption.label.toLowerCase()).call(_context5, searchTerm.toLowerCase()) || storeOption.key && _includesInstanceProperty__default["default"](_context6 = storeOption.key.toLowerCase()).call(_context6, searchTerm.toLowerCase());
8907
9046
  });
8908
9047
  return [...(props.renderLabel ? [{
8909
9048
  options: getCustomGroupLabelOption(props.renderLabel)
@@ -9104,7 +9243,7 @@ var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
9104
9243
 
9105
9244
  const _excluded$4 = ["shouldFetchProductSelections"];
9106
9245
  function ownKeys$C(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
9107
- function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$C(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$C(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
9246
+ function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var _context9, _context0; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context9 = ownKeys$C(Object(t), !0)).call(_context9, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context0 = ownKeys$C(Object(t))).call(_context0, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
9108
9247
  var FetchStoresByWherePredicate = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByWherePredicate" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByWherePredicate" }, name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "skipFetchingStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "skip" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "excludeProductSelections" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "active" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "productSelection" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }] } }], loc: { start: 0, end: 525, source: { body: "query FetchStoresByWherePredicate(\n $where: String!\n $skipFetchingStores: Boolean!\n $excludeProductSelections: Boolean!\n) {\n storesByWherePredicate: stores(where: $where) @skip(if: $skipFetchingStores) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n productSelections @skip(if: $excludeProductSelections) {\n active\n productSelection {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
9109
9248
  var styles$9 = {
9110
9249
  "renderLabelContainer": "stores-search-selector-module__renderLabelContainer___3_PBc",
@@ -9150,6 +9289,7 @@ const createQueryVariables$1 = _ref => {
9150
9289
  };
9151
9290
  };
9152
9291
  const getValueFromOptions = _ref2 => {
9292
+ var _context3, _context4, _context5;
9153
9293
  let isMulti = _ref2.isMulti,
9154
9294
  value = _ref2.value,
9155
9295
  dataLocale = _ref2.dataLocale,
@@ -9159,7 +9299,7 @@ const getValueFromOptions = _ref2 => {
9159
9299
  if (!value) {
9160
9300
  return undefined;
9161
9301
  }
9162
- const selectedOptions = storesByFieldFetcher.stores?.results.map(store => mapStoresToOptions({
9302
+ const selectedOptions = ((_context3 = storesByFieldFetcher.stores) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _mapInstanceProperty__default["default"](_context4 = _context3.results), _context4))?.(store => mapStoresToOptions({
9163
9303
  store,
9164
9304
  dataLocale,
9165
9305
  languages,
@@ -9203,8 +9343,9 @@ const StoresSearchSelectInput = _ref3 => {
9203
9343
  },
9204
9344
  fetchPolicy: 'network-only'
9205
9345
  }).then(_ref4 => {
9346
+ var _context6, _context7, _context8;
9206
9347
  let data = _ref4.data;
9207
- const result = data.storesByWherePredicate?.results.map(store => mapStoresToOptions({
9348
+ const result = ((_context6 = data.storesByWherePredicate) == null ? void 0 : _bindInstanceProperty__default["default"](_context8 = Function.call).call(_context8, _mapInstanceProperty__default["default"](_context7 = _context6.results), _context7))?.(store => mapStoresToOptions({
9208
9349
  store,
9209
9350
  dataLocale,
9210
9351
  languages: projectLanguages,
@@ -9712,7 +9853,7 @@ function _isNativeReflectConstruct$4() { try { var t = !Boolean.prototype.valueO
9712
9853
  var FetchTypeDefinitionsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }], loc: { start: 0, end: 1172, source: { body: "query FetchTypeDefinitionsQuery($where: String, $limit: Int, $offset: Int) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n fieldDefinitions {\n type {\n name\n ... on SetType {\n elementType {\n name\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n value\n locale\n }\n }\n }\n ... on ReferenceType {\n referenceTypeId\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
9713
9854
  const customizableResources$1 = ['asset', 'category', 'channel', 'customer', 'order', 'discount-code', 'cart-discount', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'transaction',
9714
9855
  // transactions on payment entity
9715
- 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review'];
9856
+ 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'recurring-order'];
9716
9857
  let CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
9717
9858
  function CustomFieldDefinitionsConnector() {
9718
9859
  _classCallCheck(this, CustomFieldDefinitionsConnector);
@@ -9857,7 +9998,7 @@ const createEmptyCustomFields = typeDefinition => ({
9857
9998
  function _callSuper$3(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$3() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
9858
9999
  function _isNativeReflectConstruct$3() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct$3 = function () { return !!t; })(); }
9859
10000
  var FetchTypeDefinitionsWithNamesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchTypeDefinitionsWithNamesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "typeDefinitions" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "fieldDefinitions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "required" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "type" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "SetType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "elementType" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "ReferenceType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "referenceTypeId" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "LocalizedEnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }, { kind: "InlineFragment", typeCondition: { kind: "NamedType", name: { kind: "Name", value: "EnumType" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "values" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "label" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "name" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "labelAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inputHint" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 1445, source: { body: "query FetchTypeDefinitionsWithNamesQuery(\n $where: String\n $limit: Int\n $offset: Int\n) {\n typeDefinitions(where: $where, limit: $limit, offset: $offset) {\n results {\n id\n key\n nameAllLocales {\n value\n locale\n }\n fieldDefinitions {\n required\n type {\n name\n ... on ReferenceType {\n referenceTypeId\n }\n ... on SetType {\n elementType {\n name\n ... on ReferenceType {\n referenceTypeId\n name\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n }\n }\n ... on LocalizedEnumType {\n values {\n key\n labelAllLocales {\n locale\n value\n }\n }\n }\n ... on EnumType {\n values {\n key\n label\n }\n name\n }\n }\n name\n labelAllLocales {\n value\n locale\n }\n inputHint\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
9860
- const customizableResources = ['asset', 'address', 'associate-role', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel', 'transaction'];
10001
+ const customizableResources = ['asset', 'address', 'associate-role', 'business-unit', 'category', 'channel', 'customer', 'customer-group', 'order', 'quote', 'order-delivery', 'store', 'discount-code', 'inventory-entry', 'line-item', 'custom-line-item', 'product-price', 'payment', 'payment-interface-interaction', 'shipping-method', 'shopping-list', 'shopping-list-text-line-item', 'standalone-price', 'review', 'cart-discount', 'product-selection', 'order-return-item', 'order-parcel', 'transaction', 'recurring-order'];
9861
10002
  const emptyTypeDefinitions = {
9862
10003
  total: 0,
9863
10004
  count: 0,
@@ -13563,7 +13704,7 @@ function normalizeProductSettings(settings) {
13563
13704
  function splitVariantAttributesByConstraint(product, constraint) {
13564
13705
  const productAttributeDefinitions = [];
13565
13706
  const variantAttributeDefinitions = [];
13566
- if (product) {
13707
+ if (product.productType?.obj?.attributes) {
13567
13708
  if (!constraint) throw new Error('You need to specify a constraint to filter for.');
13568
13709
  for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
13569
13710
  const definition = product.productType.obj.attributes[i];
@@ -13636,10 +13777,10 @@ const computedProperties = {
13636
13777
  if (product.taxCategory && product.taxCategory.obj) return product.taxCategory.obj.name;
13637
13778
  return constants.NO_VALUE_FALLBACK;
13638
13779
  },
13639
- state(_ref10) {
13640
- let product = _ref10.product,
13641
- language = _ref10.language,
13642
- languages = _ref10.languages;
13780
+ state(_ref0) {
13781
+ let product = _ref0.product,
13782
+ language = _ref0.language,
13783
+ languages = _ref0.languages;
13643
13784
  if (product.state && product.state.obj && product.state.obj.name) return l10n.formatLocalizedString(product.state.obj, {
13644
13785
  key: 'name',
13645
13786
  locale: language,
@@ -13647,11 +13788,11 @@ const computedProperties = {
13647
13788
  });
13648
13789
  return constants.NO_VALUE_FALLBACK;
13649
13790
  },
13650
- categories(_ref11) {
13791
+ categories(_ref1) {
13651
13792
  var _context6;
13652
- let product = _ref11.product,
13653
- language = _ref11.language,
13654
- languages = _ref11.languages;
13793
+ let product = _ref1.product,
13794
+ language = _ref1.language,
13795
+ languages = _ref1.languages;
13655
13796
  // If any of the expanded categories in the product
13656
13797
  // doesn't have an `obj` key, we should assume that it is a dead reference.
13657
13798
  // This scenario occurs when the search index of product-projections
@@ -13678,12 +13819,12 @@ const computedProperties = {
13678
13819
  });
13679
13820
  }
13680
13821
  };
13681
- const getAttributeValueByType = _ref12 => {
13682
- let type = _ref12.type,
13683
- value = _ref12.value,
13684
- projectDataLocale = _ref12.projectDataLocale,
13685
- intl = _ref12.intl,
13686
- projectLanguages = _ref12.projectLanguages;
13822
+ const getAttributeValueByType = _ref10 => {
13823
+ let type = _ref10.type,
13824
+ value = _ref10.value,
13825
+ projectDataLocale = _ref10.projectDataLocale,
13826
+ intl = _ref10.intl,
13827
+ projectLanguages = _ref10.projectLanguages;
13687
13828
  switch (type) {
13688
13829
  case 'text':
13689
13830
  return safelyAddFallback(value.label || value);
@@ -13821,6 +13962,11 @@ function slugify(text) {
13821
13962
  .replace(/-+$/, ''); // Trim - from end of text
13822
13963
  }
13823
13964
 
13965
+ const contextProjects = ['context-medium-data-playground', 'context-demo-data-project-1', 'context-demo-data-project-10', 'context-demo-data-project-11', 'context-demo-data-project-12', 'context-demo-data-project-8', 'context-demo-data-project-13', 'context-demo-data-project-9', 'context-demo-data-project-14', 'context-demo-data-project-15', 'context-big-data-playground', 'context-without-stores', 'context-playground', 'context-small-data-playground'];
13966
+ const isStoreDataFenceProductSelection = projectKey => {
13967
+ return _includesInstanceProperty__default["default"](contextProjects).call(contextProjects, projectKey);
13968
+ };
13969
+
13824
13970
  function swapArrayItems(array, from, to) {
13825
13971
  const result = [...array];
13826
13972
  result[to] = array[from];
@@ -13854,7 +14000,10 @@ const getTimeZoneId = memoize__default["default"]((selectedTimeZone, timeZones)
13854
14000
  return selectedTimeZone;
13855
14001
  } else {
13856
14002
  var _context2;
13857
- const fallbackTimeZoneId = _findInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](timeZones)).call(_context2, timeZoneId => timeZones[timeZoneId]?.translationFor?.some(fallbackTimeZone => fallbackTimeZone === selectedTimeZone));
14003
+ const fallbackTimeZoneId = _findInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](timeZones)).call(_context2, timeZoneId => {
14004
+ var _context3, _context4;
14005
+ return ((_context3 = timeZones[timeZoneId]?.translationFor) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _someInstanceProperty__default["default"](_context3), _context3))?.(fallbackTimeZone => fallbackTimeZone === selectedTimeZone);
14006
+ });
13858
14007
  if (fallbackTimeZoneId?.length) {
13859
14008
  return fallbackTimeZoneId.toString();
13860
14009
  } else {
@@ -14027,6 +14176,7 @@ exports.injectToggleState = injectModalState$1;
14027
14176
  exports.injectZonesPlatformLimits = injectZonesPlatformLimits$1;
14028
14177
  exports.isEmpty = isEmptyFilter;
14029
14178
  exports.isEmptyValue = isEmptyValue;
14179
+ exports.isStoreDataFenceProductSelection = isStoreDataFenceProductSelection;
14030
14180
  exports.isUUID = isUUID$1;
14031
14181
  exports.isValidISODate = isValidISODate;
14032
14182
  exports.isValidISODateTime = isValidISODateTime;