@commercetools-frontend/experimental-components 6.4.4 → 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.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +250 -111
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +250 -111
- package/dist/commercetools-frontend-experimental-components.esm.js +248 -110
- package/dist/declarations/src/components/channel-picker-input/channel-picker-input.d.ts +3 -1
- package/dist/declarations/src/features/picker/index.d.ts +1 -0
- package/dist/declarations/src/features/picker/shared/hooks/use-current-multiple-options.d.ts +16 -0
- package/dist/declarations/src/features/picker/shared/hooks/use-current-option.d.ts +2 -1
- package/dist/declarations/src/hooks/use-is-field-duplicated/use-is-field-duplicated.d.ts +1 -0
- package/dist/declarations/src/hooks/use-product-selections-fetcher/use-product-selections-fetcher.d.ts +1 -0
- package/dist/declarations/src/hooks/use-product-selections-total-fetcher/use-product-selections-total-fetcher.d.ts +1 -0
- package/dist/styles.css +20 -20
- package/package.json +22 -20
- package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.dev.js +1 -0
- package/test-utils/dist/commercetools-frontend-experimental-components-test-utils.cjs.prod.js +1 -0
- 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
|
|
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:
|
|
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(
|
|
399
|
+
const isCurrentOptionLoadingFailed = Boolean(currentOptions?.error);
|
|
383
400
|
React.useEffect(() => {
|
|
384
|
-
if (isCurrentOptionLoadingFailed && onError) onError(
|
|
385
|
-
}, [isCurrentOptionLoadingFailed, onError,
|
|
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 =
|
|
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 ||
|
|
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:
|
|
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
|
|
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?.
|
|
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
|
|
942
|
+
var _context3;
|
|
922
943
|
const parts = field.split('.');
|
|
923
|
-
const _parts$slice$reverse = _reverseInstanceProperty__default["default"](
|
|
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: !
|
|
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
|
|
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?.
|
|
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?.
|
|
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
|
|
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"](
|
|
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:
|
|
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 =
|
|
3984
|
-
let type =
|
|
3985
|
-
value =
|
|
3986
|
-
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 =
|
|
3997
|
-
let fallbackValue =
|
|
4100
|
+
const formatNested = _ref1 => {
|
|
4101
|
+
let fallbackValue = _ref1.fallbackValue;
|
|
3998
4102
|
return fallbackValue;
|
|
3999
4103
|
};
|
|
4000
|
-
const formatSet =
|
|
4001
|
-
let type =
|
|
4002
|
-
value =
|
|
4003
|
-
intl =
|
|
4004
|
-
language =
|
|
4005
|
-
languages =
|
|
4006
|
-
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 =
|
|
4018
|
-
let 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(
|
|
4025
|
-
let type =
|
|
4026
|
-
value =
|
|
4027
|
-
intl =
|
|
4028
|
-
language =
|
|
4029
|
-
languages =
|
|
4030
|
-
userTimeZone =
|
|
4031
|
-
|
|
4032
|
-
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
|
|
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
|
|
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
|
}
|
|
@@ -4775,12 +4879,16 @@ function getSelectedPrice(price) {
|
|
|
4775
4879
|
return isCartDiscountBestDealDiscountType ? price : price.discounted ?? price;
|
|
4776
4880
|
}
|
|
4777
4881
|
function getNetUnitPrice(_ref) {
|
|
4882
|
+
var _context, _context2;
|
|
4778
4883
|
let lineItem = _ref.lineItem,
|
|
4779
4884
|
shouldRoundAmount = _ref.shouldRoundAmount,
|
|
4780
4885
|
_ref$isCartDiscountBe = _ref.isCartDiscountBestDealDiscountType,
|
|
4781
4886
|
isCartDiscountBestDealDiscountType = _ref$isCartDiscountBe === void 0 ? false : _ref$isCartDiscountBe;
|
|
4782
4887
|
const price = getSelectedPrice(lineItem.price, isCartDiscountBestDealDiscountType);
|
|
4783
|
-
const filteredPerMethodTaxRate = lineItem?.perMethodTaxRate
|
|
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
|
+
});
|
|
4784
4892
|
|
|
4785
4893
|
// when shipping mode is multi with the same tax rate
|
|
4786
4894
|
if (filteredPerMethodTaxRate?.length > 0 && filteredPerMethodTaxRate[0]?.taxRate?.includedInPrice) {
|
|
@@ -5327,10 +5435,13 @@ const useReferenceSearchItems = _ref => {
|
|
|
5327
5435
|
};
|
|
5328
5436
|
};
|
|
5329
5437
|
function ReferenceSearch(props) {
|
|
5330
|
-
const ids = React.useMemo(() =>
|
|
5331
|
-
|
|
5332
|
-
return
|
|
5333
|
-
|
|
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]);
|
|
5334
5445
|
const _useReferenceSearchIt = useReferenceSearchItems({
|
|
5335
5446
|
loadItemsBySearchTerm: props.loadItemsBySearchTerm,
|
|
5336
5447
|
loadItemsByIds: props.loadItemsByIds,
|
|
@@ -5347,8 +5458,8 @@ function ReferenceSearch(props) {
|
|
|
5347
5458
|
const tooltipTitle = value || props.value ? props.mapItemToOption(value || props.value).label : '';
|
|
5348
5459
|
const loadItems = value => _Promise__default["default"].resolve(handleLoadItems(value)).then(items => _mapInstanceProperty__default["default"](items).call(items, item => props.mapItemToOption(item)));
|
|
5349
5460
|
const handleChange = event => {
|
|
5350
|
-
var
|
|
5351
|
-
const option = props.isMulti ? _mapInstanceProperty__default["default"](
|
|
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;
|
|
5352
5463
|
props.onChange(option);
|
|
5353
5464
|
};
|
|
5354
5465
|
return jsxRuntime.jsxs("div", {
|
|
@@ -5785,25 +5896,26 @@ var messages$D = reactIntl.defineMessages({
|
|
|
5785
5896
|
});
|
|
5786
5897
|
|
|
5787
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; }
|
|
5788
|
-
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
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; }
|
|
5789
5900
|
const emptyCountryOption = intl => [{
|
|
5790
5901
|
label: intl.formatMessage(messages$D.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
5791
5902
|
value: undefined,
|
|
5792
5903
|
isDisabled: true
|
|
5793
5904
|
}];
|
|
5794
5905
|
function CountriesAsyncSelectDropdown(props) {
|
|
5795
|
-
var
|
|
5906
|
+
var _context6;
|
|
5796
5907
|
const intl = reactIntl.useIntl();
|
|
5797
5908
|
const handleLoadOptions = async searchTerm => {
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
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());
|
|
5801
5913
|
});
|
|
5802
5914
|
if (searchTerm) {
|
|
5803
5915
|
return _sliceInstanceProperty__default["default"](filteredOptions).call(filteredOptions, 0, props.countriesAsyncLoadingLimit);
|
|
5804
5916
|
}
|
|
5805
5917
|
return [{
|
|
5806
|
-
options: props.options?.
|
|
5918
|
+
options: ((_context4 = props.options) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _sliceInstanceProperty__default["default"](_context4), _context4))?.(0, props.countriesAsyncLoadingLimit)
|
|
5807
5919
|
}, {
|
|
5808
5920
|
options: emptyCountryOption(intl)
|
|
5809
5921
|
}];
|
|
@@ -5825,9 +5937,9 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
5825
5937
|
isMulti: props.isMulti,
|
|
5826
5938
|
showOptionGroupDivider: true,
|
|
5827
5939
|
isSearchable: true,
|
|
5828
|
-
value: _mapInstanceProperty__default["default"](
|
|
5829
|
-
var
|
|
5830
|
-
return _findInstanceProperty__default["default"](
|
|
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);
|
|
5831
5943
|
}),
|
|
5832
5944
|
placeholder: intl.formatMessage(messages$D.countriesAsyncSelectPlaceholder),
|
|
5833
5945
|
loadOptions: handleLoadOptions,
|
|
@@ -6694,7 +6806,7 @@ function CustomMoneyInput(props) {
|
|
|
6694
6806
|
CustomMoneyInput.displayName = 'CustomMoneyInput';
|
|
6695
6807
|
|
|
6696
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; }
|
|
6697
|
-
function _objectSpread$R(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
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; }
|
|
6698
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 } } } };
|
|
6699
6811
|
const mapAttributeDefinition = definition => {
|
|
6700
6812
|
var _context, _context2, _context3, _context4;
|
|
@@ -6733,7 +6845,8 @@ function useNestedProductType(fieldDefinition) {
|
|
|
6733
6845
|
loading = _useQuery.loading,
|
|
6734
6846
|
error = _useQuery.error;
|
|
6735
6847
|
if (!loading && !error) {
|
|
6736
|
-
|
|
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);
|
|
6737
6850
|
return {
|
|
6738
6851
|
loading: false,
|
|
6739
6852
|
error: false,
|
|
@@ -8217,7 +8330,10 @@ const getValueFromOptions$3 = _ref => {
|
|
|
8217
8330
|
// handle async-select-field value transformation
|
|
8218
8331
|
if (isMulti) {
|
|
8219
8332
|
var _context;
|
|
8220
|
-
return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps =>
|
|
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));
|
|
8221
8337
|
}
|
|
8222
8338
|
|
|
8223
8339
|
// in case it is not multiselect, then a single valued async-select-input is being requested and the value should have proper format
|
|
@@ -8232,7 +8348,8 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
8232
8348
|
const intl = reactIntl.useIntl();
|
|
8233
8349
|
const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
|
|
8234
8350
|
const productSelectionsFetcher = useProductSelectionsFetcher$1({
|
|
8235
|
-
limit: props.upperProductSelectionsLimit
|
|
8351
|
+
limit: props.upperProductSelectionsLimit,
|
|
8352
|
+
where: props.where
|
|
8236
8353
|
});
|
|
8237
8354
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
8238
8355
|
projectLanguages: applicationContext.project.languages,
|
|
@@ -8243,8 +8360,8 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
8243
8360
|
dataLocale = _useApplicationContex.dataLocale;
|
|
8244
8361
|
const productSelections = React.useMemo(() => productSelectionsFetcher.productSelections?.results ?? [], [productSelectionsFetcher.productSelections?.results]);
|
|
8245
8362
|
const filteredProductSelections = _filterInstanceProperty__default["default"](productSelections).call(productSelections, ps => {
|
|
8246
|
-
var
|
|
8247
|
-
return !_includesInstanceProperty__default["default"](
|
|
8363
|
+
var _context4;
|
|
8364
|
+
return !_includesInstanceProperty__default["default"](_context4 = props.excludedProductSelectionIds).call(_context4, ps.id);
|
|
8248
8365
|
});
|
|
8249
8366
|
const onOptionClick = event => {
|
|
8250
8367
|
const productSelectionId = event.target.value?.value;
|
|
@@ -8277,8 +8394,8 @@ function ProductSelectionsAsyncSelectDropdown(props) {
|
|
|
8277
8394
|
const handleLoadOptions = async searchTerm => {
|
|
8278
8395
|
const productSelectionOptions = allProductSelectionOptions;
|
|
8279
8396
|
const filteredOptions = _filterInstanceProperty__default["default"](productSelectionOptions).call(productSelectionOptions, productSelection => {
|
|
8280
|
-
var
|
|
8281
|
-
return _includesInstanceProperty__default["default"](
|
|
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());
|
|
8282
8399
|
});
|
|
8283
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);
|
|
8284
8401
|
return [{
|
|
@@ -8348,7 +8465,8 @@ function ProductSelectionBasicSelectDropdown(props) {
|
|
|
8348
8465
|
const intl = reactIntl.useIntl();
|
|
8349
8466
|
const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
|
|
8350
8467
|
const productSelectionsFetcher = useProductSelectionsFetcher$1({
|
|
8351
|
-
limit: props.lowerProductSelectionsLimit
|
|
8468
|
+
limit: props.lowerProductSelectionsLimit,
|
|
8469
|
+
where: props.where
|
|
8352
8470
|
});
|
|
8353
8471
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
8354
8472
|
projectLanguages: applicationContext.project.languages,
|
|
@@ -8451,11 +8569,22 @@ const getValueFromOptions$2 = _ref2 => {
|
|
|
8451
8569
|
};
|
|
8452
8570
|
const createQueryVariables$3 = _ref3 => {
|
|
8453
8571
|
var _context;
|
|
8454
|
-
let searchText = _ref3.searchText
|
|
8572
|
+
let searchText = _ref3.searchText,
|
|
8573
|
+
permissionWhere = _ref3.permissionWhere;
|
|
8455
8574
|
const sanitizedSearchText = sanitize(_trimInstanceProperty__default["default"](searchText).call(searchText, searchText));
|
|
8456
8575
|
const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
|
|
8457
8576
|
const keyQuery = `key = "${sanitizedSearchText}"`;
|
|
8458
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
|
+
}
|
|
8459
8588
|
return {
|
|
8460
8589
|
where: searchTextQuery || undefined
|
|
8461
8590
|
};
|
|
@@ -8480,7 +8609,8 @@ function ProductSelectionsSearchSelectDropdown(props) {
|
|
|
8480
8609
|
const _await$client$query = await client$1.query({
|
|
8481
8610
|
query: ProductSelectionsPickerFetcher,
|
|
8482
8611
|
variables: createQueryVariables$3({
|
|
8483
|
-
searchText
|
|
8612
|
+
searchText,
|
|
8613
|
+
permissionWhere: props.where
|
|
8484
8614
|
}),
|
|
8485
8615
|
context: {
|
|
8486
8616
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
@@ -8799,6 +8929,7 @@ const UPPER_STORES_LIMIT = 500;
|
|
|
8799
8929
|
|
|
8800
8930
|
// map store to options
|
|
8801
8931
|
const mapStoresToOptions = _ref => {
|
|
8932
|
+
var _context, _context2;
|
|
8802
8933
|
let store = _ref.store,
|
|
8803
8934
|
renderSelectInputOptionValuesByField = _ref.renderSelectInputOptionValuesByField,
|
|
8804
8935
|
dataLocale = _ref.dataLocale,
|
|
@@ -8818,7 +8949,7 @@ const mapStoresToOptions = _ref => {
|
|
|
8818
8949
|
value: renderSelectInputOptionValuesByField === 'key' ? store.key : store.id,
|
|
8819
8950
|
key: store.key,
|
|
8820
8951
|
id: store.id,
|
|
8821
|
-
productSelections: store.productSelections?.
|
|
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)
|
|
8822
8953
|
};
|
|
8823
8954
|
};
|
|
8824
8955
|
|
|
@@ -8835,7 +8966,7 @@ const getCustomGroupLabelOption = customLabel => [{
|
|
|
8835
8966
|
|
|
8836
8967
|
const _excluded$6 = ["shouldFetchProductSelections"];
|
|
8837
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; }
|
|
8838
|
-
function _objectSpread$E(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
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; }
|
|
8839
8970
|
const hasErrors$2 = errors => {
|
|
8840
8971
|
var _context;
|
|
8841
8972
|
return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
|
|
@@ -8848,7 +8979,10 @@ const getValueFromOptions$1 = _ref => {
|
|
|
8848
8979
|
isMulti = _ref.isMulti;
|
|
8849
8980
|
// handle async-select-field value transformation
|
|
8850
8981
|
if (isMulti) {
|
|
8851
|
-
return _filterInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store =>
|
|
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
|
+
});
|
|
8852
8986
|
}
|
|
8853
8987
|
|
|
8854
8988
|
// return value as undefined if no options is yet selected. It is needed for cases where users sets initial values as empty string
|
|
@@ -8887,8 +9021,8 @@ const StoresAsyncSelectInput = _ref2 => {
|
|
|
8887
9021
|
});
|
|
8888
9022
|
const hasError = uiKit.AsyncSelectInput.isTouched(props.touched) && hasErrors$2(props.errors) || props.hasError;
|
|
8889
9023
|
const mappedStoresListOptions = React.useMemo(() => {
|
|
8890
|
-
var
|
|
8891
|
-
return _mapInstanceProperty__default["default"](
|
|
9024
|
+
var _context4;
|
|
9025
|
+
return _mapInstanceProperty__default["default"](_context4 = storesListFetcher.stores?.results || []).call(_context4, store => mapStoresToOptions({
|
|
8892
9026
|
store,
|
|
8893
9027
|
dataLocale,
|
|
8894
9028
|
languages: projectLanguages,
|
|
@@ -8907,8 +9041,8 @@ const StoresAsyncSelectInput = _ref2 => {
|
|
|
8907
9041
|
return result;
|
|
8908
9042
|
}
|
|
8909
9043
|
const filteredOptions = _filterInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, storeOption => {
|
|
8910
|
-
var
|
|
8911
|
-
return _includesInstanceProperty__default["default"](
|
|
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());
|
|
8912
9046
|
});
|
|
8913
9047
|
return [...(props.renderLabel ? [{
|
|
8914
9048
|
options: getCustomGroupLabelOption(props.renderLabel)
|
|
@@ -9109,7 +9243,7 @@ var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
|
|
|
9109
9243
|
|
|
9110
9244
|
const _excluded$4 = ["shouldFetchProductSelections"];
|
|
9111
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; }
|
|
9112
|
-
function _objectSpread$C(e) { for (var r = 1; r < arguments.length; r++) { var
|
|
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; }
|
|
9113
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 } } } };
|
|
9114
9248
|
var styles$9 = {
|
|
9115
9249
|
"renderLabelContainer": "stores-search-selector-module__renderLabelContainer___3_PBc",
|
|
@@ -9155,6 +9289,7 @@ const createQueryVariables$1 = _ref => {
|
|
|
9155
9289
|
};
|
|
9156
9290
|
};
|
|
9157
9291
|
const getValueFromOptions = _ref2 => {
|
|
9292
|
+
var _context3, _context4, _context5;
|
|
9158
9293
|
let isMulti = _ref2.isMulti,
|
|
9159
9294
|
value = _ref2.value,
|
|
9160
9295
|
dataLocale = _ref2.dataLocale,
|
|
@@ -9164,7 +9299,7 @@ const getValueFromOptions = _ref2 => {
|
|
|
9164
9299
|
if (!value) {
|
|
9165
9300
|
return undefined;
|
|
9166
9301
|
}
|
|
9167
|
-
const selectedOptions = storesByFieldFetcher.stores
|
|
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({
|
|
9168
9303
|
store,
|
|
9169
9304
|
dataLocale,
|
|
9170
9305
|
languages,
|
|
@@ -9208,8 +9343,9 @@ const StoresSearchSelectInput = _ref3 => {
|
|
|
9208
9343
|
},
|
|
9209
9344
|
fetchPolicy: 'network-only'
|
|
9210
9345
|
}).then(_ref4 => {
|
|
9346
|
+
var _context6, _context7, _context8;
|
|
9211
9347
|
let data = _ref4.data;
|
|
9212
|
-
const result = data.storesByWherePredicate
|
|
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({
|
|
9213
9349
|
store,
|
|
9214
9350
|
dataLocale,
|
|
9215
9351
|
languages: projectLanguages,
|
|
@@ -13568,7 +13704,7 @@ function normalizeProductSettings(settings) {
|
|
|
13568
13704
|
function splitVariantAttributesByConstraint(product, constraint) {
|
|
13569
13705
|
const productAttributeDefinitions = [];
|
|
13570
13706
|
const variantAttributeDefinitions = [];
|
|
13571
|
-
if (product) {
|
|
13707
|
+
if (product.productType?.obj?.attributes) {
|
|
13572
13708
|
if (!constraint) throw new Error('You need to specify a constraint to filter for.');
|
|
13573
13709
|
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
13574
13710
|
const definition = product.productType.obj.attributes[i];
|
|
@@ -13641,10 +13777,10 @@ const computedProperties = {
|
|
|
13641
13777
|
if (product.taxCategory && product.taxCategory.obj) return product.taxCategory.obj.name;
|
|
13642
13778
|
return constants.NO_VALUE_FALLBACK;
|
|
13643
13779
|
},
|
|
13644
|
-
state(
|
|
13645
|
-
let product =
|
|
13646
|
-
language =
|
|
13647
|
-
languages =
|
|
13780
|
+
state(_ref0) {
|
|
13781
|
+
let product = _ref0.product,
|
|
13782
|
+
language = _ref0.language,
|
|
13783
|
+
languages = _ref0.languages;
|
|
13648
13784
|
if (product.state && product.state.obj && product.state.obj.name) return l10n.formatLocalizedString(product.state.obj, {
|
|
13649
13785
|
key: 'name',
|
|
13650
13786
|
locale: language,
|
|
@@ -13652,11 +13788,11 @@ const computedProperties = {
|
|
|
13652
13788
|
});
|
|
13653
13789
|
return constants.NO_VALUE_FALLBACK;
|
|
13654
13790
|
},
|
|
13655
|
-
categories(
|
|
13791
|
+
categories(_ref1) {
|
|
13656
13792
|
var _context6;
|
|
13657
|
-
let product =
|
|
13658
|
-
language =
|
|
13659
|
-
languages =
|
|
13793
|
+
let product = _ref1.product,
|
|
13794
|
+
language = _ref1.language,
|
|
13795
|
+
languages = _ref1.languages;
|
|
13660
13796
|
// If any of the expanded categories in the product
|
|
13661
13797
|
// doesn't have an `obj` key, we should assume that it is a dead reference.
|
|
13662
13798
|
// This scenario occurs when the search index of product-projections
|
|
@@ -13683,12 +13819,12 @@ const computedProperties = {
|
|
|
13683
13819
|
});
|
|
13684
13820
|
}
|
|
13685
13821
|
};
|
|
13686
|
-
const getAttributeValueByType =
|
|
13687
|
-
let type =
|
|
13688
|
-
value =
|
|
13689
|
-
projectDataLocale =
|
|
13690
|
-
intl =
|
|
13691
|
-
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;
|
|
13692
13828
|
switch (type) {
|
|
13693
13829
|
case 'text':
|
|
13694
13830
|
return safelyAddFallback(value.label || value);
|
|
@@ -13864,7 +14000,10 @@ const getTimeZoneId = memoize__default["default"]((selectedTimeZone, timeZones)
|
|
|
13864
14000
|
return selectedTimeZone;
|
|
13865
14001
|
} else {
|
|
13866
14002
|
var _context2;
|
|
13867
|
-
const fallbackTimeZoneId = _findInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](timeZones)).call(_context2, timeZoneId =>
|
|
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
|
+
});
|
|
13868
14007
|
if (fallbackTimeZoneId?.length) {
|
|
13869
14008
|
return fallbackTimeZoneId.toString();
|
|
13870
14009
|
} else {
|