@commercetools-frontend/experimental-components 8.0.5 → 8.0.6

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.
@@ -35,11 +35,11 @@ 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 react$1 = require('@emotion/react');
39
40
  var fastEquals = require('fast-equals');
40
41
  var jsxRuntime = require('@emotion/react/jsx-runtime');
41
42
  var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
42
- var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
43
43
  var designSystem = require('@commercetools-uikit/design-system');
44
44
  var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
45
45
  var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
@@ -47,7 +47,6 @@ var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
47
47
  var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
48
48
  var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
49
49
  var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
50
- var _taggedTemplateLiteral = require('@babel/runtime-corejs3/helpers/taggedTemplateLiteral');
51
50
  var _sliceInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/slice');
52
51
  var _someInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/some');
53
52
  var oneLine = require('common-tags/lib/oneLine');
@@ -87,6 +86,7 @@ var classnames = require('classnames');
87
86
  var commonTags = require('common-tags');
88
87
  var has = require('lodash/has');
89
88
  var warning = require('tiny-warning');
89
+ var _concatInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/concat');
90
90
  var _Math$trunc = require('@babel/runtime-corejs3/core-js-stable/math/trunc');
91
91
  var _Number$isNaN = require('@babel/runtime-corejs3/core-js-stable/number/is-nan');
92
92
  var Cleave = require('cleave.js/react');
@@ -163,8 +163,8 @@ var _Map__default = /*#__PURE__*/_interopDefault(_Map);
163
163
  var _everyInstanceProperty__default = /*#__PURE__*/_interopDefault(_everyInstanceProperty);
164
164
  var _Promise__default = /*#__PURE__*/_interopDefault(_Promise);
165
165
  var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
166
+ var _bindInstanceProperty__default = /*#__PURE__*/_interopDefault(_bindInstanceProperty);
166
167
  var _trimInstanceProperty__default = /*#__PURE__*/_interopDefault(_trimInstanceProperty);
167
- var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
168
168
  var _Reflect$construct__default = /*#__PURE__*/_interopDefault(_Reflect$construct);
169
169
  var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanceProperty);
170
170
  var _someInstanceProperty__default = /*#__PURE__*/_interopDefault(_someInstanceProperty);
@@ -191,6 +191,7 @@ var _sortInstanceProperty__default = /*#__PURE__*/_interopDefault(_sortInstanceP
191
191
  var classnames__default = /*#__PURE__*/_interopDefault(classnames);
192
192
  var has__default = /*#__PURE__*/_interopDefault(has);
193
193
  var warning__default = /*#__PURE__*/_interopDefault(warning);
194
+ var _concatInstanceProperty__default = /*#__PURE__*/_interopDefault(_concatInstanceProperty);
194
195
  var _Math$trunc__default = /*#__PURE__*/_interopDefault(_Math$trunc);
195
196
  var _Number$isNaN__default = /*#__PURE__*/_interopDefault(_Number$isNaN);
196
197
  var Cleave__default = /*#__PURE__*/_interopDefault(Cleave);
@@ -303,7 +304,7 @@ var commonPickerMessages = reactIntl.defineMessages({
303
304
  }
304
305
  });
305
306
 
306
- var messages$S = reactIntl.defineMessages({
307
+ var messages$R = reactIntl.defineMessages({
307
308
  noChannelsFound: {
308
309
  id: 'Products.ChannelPickerInput.noChannelsFound',
309
310
  description: 'The message to display when no channels were found',
@@ -321,9 +322,8 @@ function _objectSpread$1v(e) { for (var r = 1; r < arguments.length; r++) { var
321
322
  var GetChannelsQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelsQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channels" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "ListValue", values: [{ kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, { kind: "StringValue", value: "key", block: false }] } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "60" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
322
323
  var GetChannelQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetChannelQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "channel" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputChannel" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
323
324
  var PickerInputChannel = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputChannel" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "Channel" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 392, source: { body: "fragment PickerInputChannel on Channel {\n id\n key\n nameAllLocales {\n locale\n value\n }\n}\n\nquery GetChannelsQuery($where: String, $sortByNamePath: String!) {\n channels(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputChannel\n }\n }\n}\n\nquery GetChannelQuery($id: String) {\n channel(id: $id) {\n ...PickerInputChannel\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
324
- const getRolesClause = roles => roles && roles.length > 0 ? "roles contains any (".concat(_mapInstanceProperty__default["default"](roles).call(roles, role => "\"".concat(role, "\"")).join(','), ")") : undefined;
325
+ const getRolesClause = roles => roles && roles.length > 0 ? `roles contains any (${_mapInstanceProperty__default["default"](roles).call(roles, role => `"${role}"`).join(',')})` : undefined;
325
326
  const ChannelPickerInput = _ref => {
326
- var _currentSingleOption$, _currentSingleOption$2, _currentOptions$data;
327
327
  let isClearable = _ref.isClearable,
328
328
  isDisabled = _ref.isDisabled,
329
329
  _ref$isReadOnly = _ref.isReadOnly,
@@ -348,7 +348,7 @@ const ChannelPickerInput = _ref => {
348
348
  const variables = React.useMemo(() => {
349
349
  const rolesClause = getRolesClause(roles);
350
350
  return _objectSpread$1v({
351
- sortByNamePath: "name.".concat(dataLocale)
351
+ sortByNamePath: `name.${dataLocale}`
352
352
  }, rolesClause && {
353
353
  extraWhere: rolesClause
354
354
  });
@@ -369,7 +369,7 @@ const ChannelPickerInput = _ref => {
369
369
  }
370
370
  return channel;
371
371
  }, [formatLocalizedFieldToString]);
372
- const prefixSearchFields = React.useMemo(() => ["name.".concat(dataLocale), 'key'], [dataLocale]);
372
+ const prefixSearchFields = React.useMemo(() => [`name.${dataLocale}`, 'key'], [dataLocale]);
373
373
  const loadOptions = useLoadOptions$1({
374
374
  query: GetChannelsQuery,
375
375
  variables,
@@ -416,16 +416,16 @@ const ChannelPickerInput = _ref => {
416
416
  const handleInputChange = React.useCallback(newValue => {
417
417
  setLoadingError(null);
418
418
  // FIXME: useHandlers hook is not properly typed
419
- handleInternalInputChange === null || handleInternalInputChange === void 0 || handleInternalInputChange(newValue);
419
+ handleInternalInputChange?.(newValue);
420
420
  }, [handleInternalInputChange]);
421
- const isCurrentOptionLoadingFailed = Boolean(currentOptions === null || currentOptions === void 0 ? void 0 : currentOptions.error);
421
+ const isCurrentOptionLoadingFailed = Boolean(currentOptions?.error);
422
422
  React.useEffect(() => {
423
423
  if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
424
424
  }, [isCurrentOptionLoadingFailed, onError, currentOptions]);
425
425
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
426
- const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$S.noChannelsFound), [loadingError, formatMessage]);
427
- const tooltipTitle = !isMulti ? (_currentSingleOption$ = currentSingleOption === null || currentSingleOption === void 0 || (_currentSingleOption$2 = currentSingleOption.data) === null || _currentSingleOption$2 === void 0 ? void 0 : _currentSingleOption$2.label) !== null && _currentSingleOption$ !== void 0 ? _currentSingleOption$ : '' : '';
428
- const selectedValue = (_currentOptions$data = currentOptions.data) !== null && _currentOptions$data !== void 0 ? _currentOptions$data : isMulti ? [] : null;
426
+ const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$R.noChannelsFound), [loadingError, formatMessage]);
427
+ const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
428
+ const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
429
429
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
430
430
  max: "scale",
431
431
  children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
@@ -435,7 +435,7 @@ const ChannelPickerInput = _ref => {
435
435
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
436
436
  id: name,
437
437
  name: name,
438
- placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$S.placeholder),
438
+ placeholder: placeholder ?? formatMessage(messages$R.placeholder),
439
439
  loadOptions: loadOptionsDebounced,
440
440
  defaultOptions: true,
441
441
  showOptionGroupDivider: true,
@@ -478,10 +478,9 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
478
478
  value: function render() {
479
479
  return jsxRuntime.jsx(applicationShellConnectors.ApplicationContext, {
480
480
  render: _ref => {
481
- var _this$props;
482
481
  let user = _ref.user;
483
482
  return formatDateTime$1(this.props.type, this.props.value, {
484
- timeZone: (this === null || this === void 0 || (_this$props = this.props) === null || _this$props === void 0 ? void 0 : _this$props.timeZone) || (user === null || user === void 0 ? void 0 : user.timeZone),
483
+ timeZone: this?.props?.timeZone || user?.timeZone,
485
484
  locale: this.props.intl.locale
486
485
  });
487
486
  }
@@ -492,7 +491,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
492
491
  FormattedDateTime.displayName = 'FormattedDateTime';
493
492
  var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
494
493
 
495
- var messages$R = reactIntl.defineMessages({
494
+ var messages$Q = reactIntl.defineMessages({
496
495
  noProductTypesFound: {
497
496
  id: 'Products.ProductTypePickerInput.noProductTypesFound',
498
497
  description: 'The message to display when no product types were found',
@@ -520,7 +519,6 @@ const convertProductTypeToOption = productType => {
520
519
  };
521
520
  };
522
521
  const ProductTypePickerInput = _ref => {
523
- var _currentOption$data$l, _currentOption$data;
524
522
  let isClearable = _ref.isClearable,
525
523
  isDisabled = _ref.isDisabled,
526
524
  isReadOnly = _ref.isReadOnly,
@@ -552,9 +550,8 @@ const ProductTypePickerInput = _ref => {
552
550
  itemToOption: convertProductTypeToOption
553
551
  });
554
552
  const handleLoadOptions = React.useCallback(inputValue => loadProductTypes(inputValue).then(_ref3 => {
555
- var _data$productTypes;
556
553
  let data = _ref3.data;
557
- return ((_data$productTypes = data.productTypes) === null || _data$productTypes === void 0 ? void 0 : _data$productTypes.results) || [];
554
+ return data.productTypes?.results || [];
558
555
  }).then(productTypes => _mapInstanceProperty__default["default"](productTypes).call(productTypes, convertProductTypeToOption)).catch(error => {
559
556
  setLoadingError(error);
560
557
  onError(error);
@@ -568,12 +565,12 @@ const ProductTypePickerInput = _ref => {
568
565
  setLoadingError(null);
569
566
  handleInternalInputChange(event);
570
567
  }, [handleInternalInputChange]);
571
- const isCurrentOptionLoadingFailed = Boolean(currentOption === null || currentOption === void 0 ? void 0 : currentOption.error);
568
+ const isCurrentOptionLoadingFailed = Boolean(currentOption?.error);
572
569
  React.useEffect(() => {
573
570
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
574
571
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
575
572
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
576
- const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 || (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
573
+ const tooltipTitle = currentOption?.data?.label ?? '';
577
574
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
578
575
  max: "scale",
579
576
  children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner$1, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
@@ -583,7 +580,7 @@ const ProductTypePickerInput = _ref => {
583
580
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
584
581
  id: name,
585
582
  name: name,
586
- placeholder: formatMessage(messages$R.placeholder),
583
+ placeholder: formatMessage(messages$Q.placeholder),
587
584
  loadOptions: loadOptionsDebounced,
588
585
  defaultOptions: [],
589
586
  isClearable: isClearable,
@@ -596,7 +593,7 @@ const ProductTypePickerInput = _ref => {
596
593
  onInputChange: handleInputChange,
597
594
  onBlur: onBlur,
598
595
  value: currentOption.data,
599
- noOptionsMessage: () => loadingError ? null : formatMessage(messages$R.noProductTypesFound),
596
+ noOptionsMessage: () => loadingError ? null : formatMessage(messages$Q.noProductTypesFound),
600
597
  hasError: hasError || isLoadingFailed,
601
598
  menuPortalZIndex: Z_INDEX_DROPDOWN,
602
599
  menuPortalTarget: document.body,
@@ -612,7 +609,7 @@ const ProductTypePickerInput = _ref => {
612
609
  ProductTypePickerInput.displayName = 'ProductTypePickerInput';
613
610
  var ProductTypePickerInput$1 = ProductTypePickerInput;
614
611
 
615
- var messages$Q = reactIntl.defineMessages({
612
+ var messages$P = reactIntl.defineMessages({
616
613
  noStatesFound: {
617
614
  id: 'Products.StatePickerInput.noStatesFound',
618
615
  description: 'The message to display when no states were found',
@@ -628,7 +625,6 @@ var messages$Q = reactIntl.defineMessages({
628
625
  var GetStatesQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetStatesQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "states" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "ListValue", values: [{ kind: "Variable", name: { kind: "Name", value: "sortByNamePath" } }, { kind: "StringValue", value: "key", block: false }] } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "60" } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 377, source: { body: "query GetStatesQuery($where: String, $sortByNamePath: String!) {\n states(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery GetStateQuery($id: String) {\n state(id: $id) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
629
626
  var GetStateQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetStateQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "state" }, 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: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 377, source: { body: "query GetStatesQuery($where: String, $sortByNamePath: String!) {\n states(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery GetStateQuery($id: String) {\n state(id: $id) {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
630
627
  const StatePickerInput = _ref => {
631
- var _currentOption$data$l, _currentOption$data;
632
628
  let isClearable = _ref.isClearable,
633
629
  isDisabled = _ref.isDisabled,
634
630
  isReadOnly = _ref.isReadOnly,
@@ -644,7 +640,7 @@ const StatePickerInput = _ref => {
644
640
  formatMessage = _useIntl.formatMessage;
645
641
  const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
646
642
  const variables = React.useMemo(() => ({
647
- sortByNamePath: "name.".concat(dataLocale)
643
+ sortByNamePath: `name.${dataLocale}`
648
644
  }), [dataLocale]);
649
645
  const convertStateToOption = React.useCallback(state => {
650
646
  const localizedName = formatLocalizedFieldToString(state.nameAllLocales);
@@ -659,7 +655,7 @@ const StatePickerInput = _ref => {
659
655
  _useState2 = _slicedToArray(_useState, 2),
660
656
  loadingError = _useState2[0],
661
657
  setLoadingError = _useState2[1];
662
- const prefixSearchFields = React.useMemo(() => ["name.".concat(dataLocale), 'key'], [dataLocale]);
658
+ const prefixSearchFields = React.useMemo(() => [`name.${dataLocale}`, 'key'], [dataLocale]);
663
659
  const loadOptions = useLoadOptions$1({
664
660
  query: GetStatesQuery,
665
661
  variables,
@@ -692,13 +688,13 @@ const StatePickerInput = _ref => {
692
688
  setLoadingError(null);
693
689
  handleInternalInputChange(event);
694
690
  }, [handleInternalInputChange]);
695
- const isCurrentOptionLoadingFailed = Boolean(currentOption === null || currentOption === void 0 ? void 0 : currentOption.error);
691
+ const isCurrentOptionLoadingFailed = Boolean(currentOption?.error);
696
692
  React.useEffect(() => {
697
693
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
698
694
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
699
695
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
700
- const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noStatesFound), [loadingError, formatMessage]);
701
- const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 || (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
696
+ const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$P.noStatesFound), [loadingError, formatMessage]);
697
+ const tooltipTitle = currentOption?.data?.label ?? '';
702
698
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
703
699
  max: "scale",
704
700
  children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner$1, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
@@ -709,7 +705,7 @@ const StatePickerInput = _ref => {
709
705
  id: name,
710
706
  name: name,
711
707
  horizontalConstraint: "scale",
712
- placeholder: formatMessage(messages$Q.placeholder),
708
+ placeholder: formatMessage(messages$P.placeholder),
713
709
  loadOptions: loadOptionsDebounced,
714
710
  defaultOptions: true,
715
711
  showOptionGroupDivider: true,
@@ -766,7 +762,7 @@ const CustomFieldTooltip = _ref => {
766
762
  };
767
763
  var CustomFieldTooltip$1 = CustomFieldTooltip;
768
764
 
769
- var messages$P = reactIntl.defineMessages({
765
+ var messages$O = reactIntl.defineMessages({
770
766
  bottomOption: {
771
767
  id: 'Products.Pickers.bottomOption',
772
768
  description: 'The message to display at the end of the options menu',
@@ -778,7 +774,7 @@ function ownKeys$1t(e, r) { var t = _Object$keys__default["default"](e); if (_Ob
778
774
  function _objectSpread$1t(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$1t(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$1t(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
779
775
  const getBottomOption = formatMessage => ({
780
776
  options: [{
781
- label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
777
+ label: formatMessage ? formatMessage(messages$O.bottomOption) : messages$O.bottomOption,
782
778
  isBottomOption: true,
783
779
  isDisabled: true
784
780
  }]
@@ -814,10 +810,10 @@ const useHandlers = onChange => {
814
810
  setInputValue(changedValue);
815
811
  }, []);
816
812
  const handleChange = useEventCallback$1(event => {
817
- var _context, _event$target$value;
813
+ var _context;
818
814
  const eventWithExtractedValue = _objectSpread$1s(_objectSpread$1s({}, event), {}, {
819
815
  target: _objectSpread$1s(_objectSpread$1s({}, event.target), {}, {
820
- value: _Array$isArray__default["default"](event.target.value) ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item === null || item === void 0 ? void 0 : item.value) : (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value
816
+ value: _Array$isArray__default["default"](event.target.value) ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item?.value) : event.target.value?.value
821
817
  })
822
818
  });
823
819
  onChange(eventWithExtractedValue);
@@ -828,25 +824,22 @@ var useHandlers$1 = useHandlers;
828
824
 
829
825
  const _excluded$f = ["extraWhere"];
830
826
  function ownKeys$1r(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
831
- function _objectSpread$1r(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$1r(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$1r(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
827
+ function _objectSpread$1r(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$1r(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$1r(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
832
828
  function _arrayLikeToArray$1(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
833
829
  const constructPrefixSearchPredicate$1 = function () {
834
830
  let prefixSearchFields = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
835
831
  let lowerBound = arguments.length > 1 ? arguments[1] : undefined;
836
832
  let upperBound = arguments.length > 2 ? arguments[2] : undefined;
837
833
  const constructPrefixSearchExpression = field => {
838
- var _context, _context2, _context3, _context4, _context5;
834
+ var _context, _context2;
839
835
  const path = field.split('.');
840
836
  const _path$slice$reverse = _reverseInstanceProperty__default["default"](_context = _sliceInstanceProperty__default["default"](path).call(path)).call(_context),
841
837
  _path$slice$reverse2 = _toArray(_path$slice$reverse),
842
838
  finalValueInPath = _path$slice$reverse2[0],
843
839
  remainPathInReverse = _sliceInstanceProperty__default["default"](_context2 = _arrayLikeToArray$1(_path$slice$reverse2)).call(_context2, 1);
844
- const comparison = _concatInstanceProperty__default["default"](_context3 = _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = "".concat(finalValueInPath, " >= \"")).call(_context5, lowerBound, "\" and ")).call(_context4, finalValueInPath, " < \"")).call(_context3, upperBound, "\"");
840
+ const comparison = `${finalValueInPath} >= "${lowerBound}" and ${finalValueInPath} < "${upperBound}"`;
845
841
  if (remainPathInReverse.length) {
846
- return _reduceInstanceProperty__default["default"](remainPathInReverse).call(remainPathInReverse, (nestedPath, nextPath) => {
847
- var _context6;
848
- return _concatInstanceProperty__default["default"](_context6 = "".concat(nextPath, "(")).call(_context6, nestedPath, ")");
849
- }, comparison);
842
+ return _reduceInstanceProperty__default["default"](remainPathInReverse).call(remainPathInReverse, (nestedPath, nextPath) => `${nextPath}(${nestedPath})`, comparison);
850
843
  }
851
844
  return comparison;
852
845
  };
@@ -862,7 +855,7 @@ const useLoadOptions = _ref => {
862
855
  let where;
863
856
  if (inputValue.length) {
864
857
  if (isUUID$1(inputValue)) {
865
- where = "id = \"".concat(inputValue, "\"");
858
+ where = `id = "${inputValue}"`;
866
859
  } else {
867
860
  const _getPrefixSearchBound = getPrefixSearchBounds$1(inputValue),
868
861
  _getPrefixSearchBound2 = _slicedToArray(_getPrefixSearchBound, 2),
@@ -871,12 +864,11 @@ const useLoadOptions = _ref => {
871
864
  where = constructPrefixSearchPredicate$1(prefixSearchFields, lowerBound, upperBound);
872
865
  }
873
866
  }
874
- const _ref2 = variables !== null && variables !== void 0 ? variables : {},
867
+ const _ref2 = variables ?? {},
875
868
  extraWhere = _ref2.extraWhere,
876
869
  restVariables = _objectWithoutProperties(_ref2, _excluded$f);
877
870
  if (typeof extraWhere === 'string') {
878
- var _context7;
879
- where = where ? _concatInstanceProperty__default["default"](_context7 = "(".concat(where, ") and ")).call(_context7, variables.extraWhere) : variables.extraWhere;
871
+ where = where ? `(${where}) and ${variables.extraWhere}` : variables.extraWhere;
880
872
  }
881
873
  return client$1.query({
882
874
  query,
@@ -908,12 +900,12 @@ const useExecuteGraphQLRequest = () => {
908
900
  };
909
901
  const createSearchProductsFromPIMAction = (searchTerm, projectKey) => sdk.actions.post({
910
902
  mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.PIM_SEARCH,
911
- uri: "/".concat(projectKey, "/search/product-types"),
903
+ uri: `/${projectKey}/search/product-types`,
912
904
  payload: {
913
905
  query: {
914
906
  wildcard: {
915
907
  field: 'name',
916
- value: "*".concat(searchTerm, "*"),
908
+ value: `*${searchTerm}*`,
917
909
  caseInsensitive: true
918
910
  }
919
911
  },
@@ -927,9 +919,9 @@ const useFetchProductTypesFromPIM = _ref => {
927
919
  const dispatch = sdk.useAsyncDispatch();
928
920
  const executeGraphQLRequest = useExecuteGraphQLRequest();
929
921
  const fetchProductTypesFromPim = React.useCallback(async searchTerm => {
930
- var _result$hits$map, _result$hits;
922
+ var _context, _context2;
931
923
  const result = await dispatch(createSearchProductsFromPIMAction(searchTerm, projectKey));
932
- const ids = (_result$hits$map = result === null || result === void 0 || (_result$hits = result.hits) === null || _result$hits === void 0 ? void 0 : _mapInstanceProperty__default["default"](_result$hits).call(_result$hits, hit => hit.id)) !== null && _result$hits$map !== void 0 ? _result$hits$map : [];
924
+ const ids = ((_context = result?.hits) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(hit => hit.id) ?? [];
933
925
  // Avoid sending any requests if it's clear that nothing is found
934
926
  if (ids.length === 0) {
935
927
  return {
@@ -964,22 +956,19 @@ const useFetchProductTypesFromPIM = _ref => {
964
956
  */
965
957
  const constructNestedExpression = (reversedPath, predicate) => {
966
958
  if (reversedPath.length > 0) {
967
- return _reduceInstanceProperty__default["default"](reversedPath).call(reversedPath, (nextNestedValue, nestedSelection) => {
968
- var _context;
969
- return _concatInstanceProperty__default["default"](_context = "".concat(nestedSelection, "(")).call(_context, nextNestedValue, ")");
970
- }, predicate);
959
+ return _reduceInstanceProperty__default["default"](reversedPath).call(reversedPath, (nextNestedValue, nestedSelection) => `${nestedSelection}(${nextNestedValue})`, predicate);
971
960
  }
972
961
  return predicate;
973
962
  };
974
963
  const constructPrefixSearchPredicate = (prefixSearchFields, lowerBound, upperBound) => {
975
964
  const constructPrefixSearchExpression = field => {
976
- var _context2, _context3, _context4, _context5, _context6;
965
+ var _context3, _context4;
977
966
  const parts = field.split('.');
978
- const _parts$slice$reverse = _reverseInstanceProperty__default["default"](_context2 = _sliceInstanceProperty__default["default"](parts).call(parts)).call(_context2),
967
+ const _parts$slice$reverse = _reverseInstanceProperty__default["default"](_context3 = _sliceInstanceProperty__default["default"](parts).call(parts)).call(_context3),
979
968
  _parts$slice$reverse2 = _toArray(_parts$slice$reverse),
980
969
  valueToNest = _parts$slice$reverse2[0],
981
- reversedPathToNestedValue = _sliceInstanceProperty__default["default"](_context3 = _arrayLikeToArray(_parts$slice$reverse2)).call(_context3, 1);
982
- const predicateExpression = _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = _concatInstanceProperty__default["default"](_context6 = "".concat(valueToNest, " >= \"")).call(_context6, lowerBound, "\" and ")).call(_context5, valueToNest, " < \"")).call(_context4, upperBound, "\"");
970
+ reversedPathToNestedValue = _sliceInstanceProperty__default["default"](_context4 = _arrayLikeToArray(_parts$slice$reverse2)).call(_context4, 1);
971
+ const predicateExpression = `${valueToNest} >= "${lowerBound}" and ${valueToNest} < "${upperBound}"`;
983
972
  return constructNestedExpression(reversedPathToNestedValue, predicateExpression);
984
973
  };
985
974
  return _mapInstanceProperty__default["default"](prefixSearchFields).call(prefixSearchFields, constructPrefixSearchExpression).join(' or ');
@@ -988,7 +977,7 @@ const constructWherePredicate = (inputValue, prefixSearchFields) => {
988
977
  let wherePredicate;
989
978
  if (inputValue.length) {
990
979
  if (isUUID$1(inputValue)) {
991
- wherePredicate = "id = \"".concat(inputValue, "\"");
980
+ wherePredicate = `id = "${inputValue}"`;
992
981
  } else {
993
982
  const _getPrefixSearchBound = getPrefixSearchBounds$1(inputValue),
994
983
  _getPrefixSearchBound2 = _slicedToArray(_getPrefixSearchBound, 2),
@@ -1013,7 +1002,6 @@ const useFetchProductTypessFromCTP = _ref2 => {
1013
1002
  }, [prefixSearchFields, executeGraphQLRequest]);
1014
1003
  };
1015
1004
  const usePimStatus = () => {
1016
- var _data$indicesExist;
1017
1005
  const _useQuery = react.useQuery(FetchIndicesExist$1, {
1018
1006
  context: {
1019
1007
  target: constants.GRAPHQL_TARGETS.PIM_INDEXER
@@ -1023,20 +1011,17 @@ const usePimStatus = () => {
1023
1011
  data = _useQuery.data;
1024
1012
  return {
1025
1013
  data,
1026
- isProjectIndexed: Boolean(data === null || data === void 0 || (_data$indicesExist = data.indicesExist) === null || _data$indicesExist === void 0 || (_data$indicesExist = _data$indicesExist.productTypes) === null || _data$indicesExist === void 0 ? void 0 : _data$indicesExist.searchableIndexExists)
1014
+ isProjectIndexed: Boolean(data?.indicesExist?.productTypes?.searchableIndexExists)
1027
1015
  };
1028
1016
  };
1029
1017
  const useProductTypeOptions = _ref3 => {
1030
1018
  let prefixSearchFields = _ref3.prefixSearchFields;
1031
1019
  const _usePimStatus = usePimStatus(),
1032
1020
  isProjectIndexed = _usePimStatus.isProjectIndexed;
1033
- const _useApplicationContex = applicationShellConnectors.useApplicationContext(context => {
1034
- var _context$project;
1035
- return {
1036
- dataLocale: context.dataLocale,
1037
- projectKey: (_context$project = context.project) === null || _context$project === void 0 ? void 0 : _context$project.key
1038
- };
1039
- }),
1021
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(context => ({
1022
+ dataLocale: context.dataLocale,
1023
+ projectKey: context.project?.key
1024
+ })),
1040
1025
  dataLocale = _useApplicationContex.dataLocale,
1041
1026
  projectKey = _useApplicationContex.projectKey;
1042
1027
  const fetchProductTypesFromPim = useFetchProductTypesFromPIM({
@@ -1054,7 +1039,6 @@ const useProductTypeOptions = _ref3 => {
1054
1039
  var useProductTypeOptions$1 = useProductTypeOptions;
1055
1040
 
1056
1041
  function useCurrentOption(_ref) {
1057
- var _context;
1058
1042
  let id = _ref.id,
1059
1043
  typename = _ref.typename,
1060
1044
  query = _ref.query,
@@ -1068,7 +1052,7 @@ function useCurrentOption(_ref) {
1068
1052
  // load from cache when possible to speed up initial render
1069
1053
  const canReadFromCache = !skip && id && typename && fragment;
1070
1054
  const cacheItem = canReadFromCache ? apolloClient.readFragment({
1071
- id: _concatInstanceProperty__default["default"](_context = "".concat(typename, ":")).call(_context, id),
1055
+ id: `${typename}:${id}`,
1072
1056
  fragment
1073
1057
  }) : undefined;
1074
1058
  const shouldFetch = !skip && Boolean(id) && !cacheItem;
@@ -1094,7 +1078,7 @@ function useCurrentOption(_ref) {
1094
1078
  };
1095
1079
  }
1096
1080
  const queryItem = queryData && queryDataToItem(queryData);
1097
- const item = queryItem !== null && queryItem !== void 0 ? queryItem : cacheItem;
1081
+ const item = queryItem ?? cacheItem;
1098
1082
  const loading = item ? false : queryLoading;
1099
1083
  const error = item ? undefined : queryError;
1100
1084
  const data = item && itemToOption(item);
@@ -1106,7 +1090,6 @@ function useCurrentOption(_ref) {
1106
1090
  }
1107
1091
 
1108
1092
  function useCurrentMultipleOptions(_ref) {
1109
- var _context2;
1110
1093
  let ids = _ref.ids,
1111
1094
  typename = _ref.typename,
1112
1095
  query = _ref.query,
@@ -1121,9 +1104,8 @@ function useCurrentMultipleOptions(_ref) {
1121
1104
  let missingIds = [];
1122
1105
  if (canReadFromCache) {
1123
1106
  _forEachInstanceProperty__default["default"](ids).call(ids, id => {
1124
- var _context;
1125
1107
  const item = apolloClient.readFragment({
1126
- id: _concatInstanceProperty__default["default"](_context = "".concat(typename, ":")).call(_context, id),
1108
+ id: `${typename}:${id}`,
1127
1109
  fragment
1128
1110
  });
1129
1111
  if (item) {
@@ -1139,8 +1121,8 @@ function useCurrentMultipleOptions(_ref) {
1139
1121
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
1140
1122
  },
1141
1123
  variables: {
1142
- where: "id in (".concat(_mapInstanceProperty__default["default"](missingIds).call(missingIds, id => "\"".concat(id, "\"")).join(','), ")"),
1143
- sortByNamePath: "name.".concat(dataLocale)
1124
+ where: `id in (${_mapInstanceProperty__default["default"](missingIds).call(missingIds, id => `"${id}"`).join(',')})`,
1125
+ sortByNamePath: `name.${dataLocale}`
1144
1126
  },
1145
1127
  skip: !shouldFetch
1146
1128
  }),
@@ -1151,7 +1133,7 @@ function useCurrentMultipleOptions(_ref) {
1151
1133
  const allItems = [...cacheItems, ...queryItems];
1152
1134
  const isIncomplete = allItems.length < ids.length;
1153
1135
  const loading = isIncomplete && queryLoading;
1154
- const error = queryError || (isIncomplete && !loading ? new Error(_concatInstanceProperty__default["default"](_context2 = "Incomplete data: could not retrieve all ".concat(ids.length, " channel items. Got ")).call(_context2, allItems.length, ".")) : undefined);
1136
+ const error = queryError || (isIncomplete && !loading ? new Error(`Incomplete data: could not retrieve all ${ids.length} channel items. Got ${allItems.length}.`) : undefined);
1155
1137
  React.useEffect(() => {
1156
1138
  if (error && !queryError) {
1157
1139
  sentry.reportErrorToSentry(error);
@@ -1190,26 +1172,22 @@ const setDisplayName = nextDisplayName => Component => {
1190
1172
  };
1191
1173
  var setDisplayName$1 = setDisplayName;
1192
1174
 
1193
- const wrapDisplayName = (BaseComponent, hocName) => {
1194
- var _context;
1195
- return _concatInstanceProperty__default["default"](_context = "".concat(hocName, "(")).call(_context, getDisplayName$1(BaseComponent), ")");
1196
- };
1175
+ const wrapDisplayName = (BaseComponent, hocName) => `${hocName}(${getDisplayName$1(BaseComponent)})`;
1197
1176
  var wrapDisplayName$1 = wrapDisplayName;
1198
1177
 
1199
1178
  function ownKeys$1q(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
1200
1179
  function _objectSpread$1q(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1q(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1q(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1201
1180
  const injectDataTablePaginationState = initialValues => Component => {
1202
1181
  const WithDataTablePaginationState = props => {
1203
- var _initialValues$tableS, _initialValues$tableS2;
1204
1182
  const _usePaginationState = uiKit.usePaginationState({
1205
- page: initialValues === null || initialValues === void 0 ? void 0 : initialValues.page,
1206
- perPage: initialValues === null || initialValues === void 0 ? void 0 : initialValues.perPage
1183
+ page: initialValues?.page,
1184
+ perPage: initialValues?.perPage
1207
1185
  }),
1208
1186
  page = _usePaginationState.page,
1209
1187
  perPage = _usePaginationState.perPage;
1210
1188
  const tableSorting = uiKit.useDataTableSortingState({
1211
- key: initialValues === null || initialValues === void 0 || (_initialValues$tableS = initialValues.tableSorting) === null || _initialValues$tableS === void 0 ? void 0 : _initialValues$tableS.key,
1212
- order: initialValues === null || initialValues === void 0 || (_initialValues$tableS2 = initialValues.tableSorting) === null || _initialValues$tableS2 === void 0 ? void 0 : _initialValues$tableS2.order
1189
+ key: initialValues?.tableSorting?.key,
1190
+ order: initialValues?.tableSorting?.order
1213
1191
  });
1214
1192
  return jsxRuntime.jsx(Component, _objectSpread$1q(_objectSpread$1q({}, props), {}, {
1215
1193
  dataTablePaginationState: {
@@ -1244,7 +1222,7 @@ const injectNotifications = function () {
1244
1222
  [propName]: notifications
1245
1223
  }));
1246
1224
  };
1247
- WrappedComponent.displayName = "withNotifications(".concat(getDisplayName$1(Component));
1225
+ WrappedComponent.displayName = `withNotifications(${getDisplayName$1(Component)}`;
1248
1226
  return WrappedComponent;
1249
1227
  };
1250
1228
  };
@@ -1348,7 +1326,7 @@ const safeParse = value => {
1348
1326
  if (value === null) return value;
1349
1327
  try {
1350
1328
  return JSON.parse(value);
1351
- } catch (_unused) {
1329
+ } catch {
1352
1330
  return value;
1353
1331
  }
1354
1332
  };
@@ -1358,10 +1336,7 @@ const isNil = value => typeof value === 'undefined' || value === null;
1358
1336
  const useStorage = (storageKey, initialStorageValue, options) => {
1359
1337
  var _context;
1360
1338
  const mergedOptions = _objectSpread$1k(_objectSpread$1k({}, defaultOptions$2), options);
1361
- const userId = applicationShellConnectors.useApplicationContext(context => {
1362
- var _context$user;
1363
- return (_context$user = context.user) === null || _context$user === void 0 ? void 0 : _context$user.id;
1364
- });
1339
+ const userId = applicationShellConnectors.useApplicationContext(context => context.user?.id);
1365
1340
  const scopedStorageKey = _filterInstanceProperty__default["default"](_context = [mergedOptions.segregateByUser && userId, storageKey]).call(_context, Boolean).join('/');
1366
1341
  const readFromStorage = React.useCallback(() => {
1367
1342
  const rawStorageValue = getStorage(mergedOptions.storageType).getItem(scopedStorageKey);
@@ -1380,9 +1355,8 @@ const useStorage = (storageKey, initialStorageValue, options) => {
1380
1355
  return parsedStorageValue;
1381
1356
  }, [mergedOptions.storageType, scopedStorageKey]);
1382
1357
  const initializeStorageValue = () => {
1383
- var _ref, _readFromStorage;
1384
1358
  // default the storage value to the initial provided value when provided
1385
- return (_ref = (_readFromStorage = readFromStorage()) !== null && _readFromStorage !== void 0 ? _readFromStorage : initialStorageValue) !== null && _ref !== void 0 ? _ref : null;
1359
+ return readFromStorage() ?? initialStorageValue ?? null;
1386
1360
  };
1387
1361
  const _useState = React.useState(initializeStorageValue),
1388
1362
  _useState2 = _slicedToArray(_useState, 2),
@@ -1442,13 +1416,10 @@ const injectStorage = options => WrappedComponent => {
1442
1416
  var injectStorage$1 = injectStorage;
1443
1417
 
1444
1418
  const useFormatLocalizedString = () => {
1445
- const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
1446
- var _applicationContext$p;
1447
- return {
1448
- dataLocale: applicationContext.dataLocale,
1449
- projectLanguages: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages
1450
- };
1451
- }),
1419
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
1420
+ dataLocale: applicationContext.dataLocale,
1421
+ projectLanguages: applicationContext.project?.languages
1422
+ })),
1452
1423
  dataLocale = _useApplicationContex.dataLocale,
1453
1424
  projectLanguages = _useApplicationContex.projectLanguages;
1454
1425
  const localizedFormatString = React.useCallback((value, options) => l10n.formatLocalizedString({
@@ -1457,7 +1428,7 @@ const useFormatLocalizedString = () => {
1457
1428
  key: 'k',
1458
1429
  locale: dataLocale,
1459
1430
  fallbackOrder: projectLanguages,
1460
- fallback: options === null || options === void 0 ? void 0 : options.fallback
1431
+ fallback: options?.fallback
1461
1432
  }), [dataLocale, projectLanguages]);
1462
1433
  return localizedFormatString;
1463
1434
  };
@@ -1474,7 +1445,7 @@ const useFormatLocalizedString = () => {
1474
1445
  function useFormatLocalizedFieldToString() {
1475
1446
  const formatLocalizedString = useFormatLocalizedString();
1476
1447
  const formatLocalizedFieldToString = React.useCallback((localizedField, fallback) => {
1477
- const localizedString = l10n.transformLocalizedFieldToLocalizedString(localizedField !== null && localizedField !== void 0 ? localizedField : undefined);
1448
+ const localizedString = l10n.transformLocalizedFieldToLocalizedString(localizedField ?? undefined);
1478
1449
  return formatLocalizedString(localizedString, {
1479
1450
  fallback
1480
1451
  });
@@ -1483,7 +1454,7 @@ function useFormatLocalizedFieldToString() {
1483
1454
  }
1484
1455
 
1485
1456
  function ownKeys$1i(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
1486
- function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$1i(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$1i(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1457
+ function _objectSpread$1i(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1i(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1i(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1487
1458
  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 } } } };
1488
1459
  const MC_RESOURCES_WITH_KEYS = {
1489
1460
  ASSOCIATE_ROLE: 'ASSOCIATE_ROLE',
@@ -1563,14 +1534,13 @@ const getSkipVariables = resourceType => {
1563
1534
  });
1564
1535
  };
1565
1536
  const getWhereClause$1 = function () {
1566
- var _context, _context2, _context3;
1567
1537
  let _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
1568
1538
  field = _ref.field,
1569
1539
  fieldValue = _ref.fieldValue,
1570
1540
  id = _ref.id;
1571
1541
  if (!id && !fieldValue) return null;
1572
- if (!id) return _concatInstanceProperty__default["default"](_context = "".concat(field, " = \"")).call(_context, fieldValue, "\"");
1573
- return _concatInstanceProperty__default["default"](_context2 = _concatInstanceProperty__default["default"](_context3 = "".concat(field, " = \"")).call(_context3, fieldValue, "\" and id != \"")).call(_context2, id, "\"");
1542
+ if (!id) return `${field} = "${fieldValue}"`;
1543
+ return `${field} = "${fieldValue}" and id != "${id}"`;
1574
1544
  };
1575
1545
  const getQueryVariables = _ref2 => {
1576
1546
  let resourceType = _ref2.resourceType,
@@ -1589,7 +1559,6 @@ const getQueryVariables = _ref2 => {
1589
1559
  }, skipVariables);
1590
1560
  };
1591
1561
  const useIsFieldDuplicated = () => {
1592
- var _Object$values$;
1593
1562
  const _useLazyQuery = hooks.useLazyQuery(FetchResourceTypeDuplicatedField, {
1594
1563
  context: {
1595
1564
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
@@ -1604,7 +1573,7 @@ const useIsFieldDuplicated = () => {
1604
1573
  return {
1605
1574
  getQueryVariables,
1606
1575
  isLoading: loading,
1607
- isFieldDuplicated: data ? ((_Object$values$ = _Object$values__default["default"](data)[0]) === null || _Object$values$ === void 0 ? void 0 : _Object$values$.total) > 0 : null,
1576
+ isFieldDuplicated: data ? _Object$values__default["default"](data)[0]?.total > 0 : null,
1608
1577
  queryIsFieldDuplicated: execute
1609
1578
  };
1610
1579
  };
@@ -1620,33 +1589,33 @@ const usePrevious = value => {
1620
1589
  var usePrevious$1 = usePrevious;
1621
1590
 
1622
1591
  function ownKeys$1h(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
1623
- function _objectSpread$1h(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$1h(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$1h(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1592
+ function _objectSpread$1h(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$1h(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$1h(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
1624
1593
  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 } } } };
1625
1594
  const filterStoresOutdatedDanglingProductSelections = storesQueryResult => {
1626
- var _storesQueryResult$re;
1595
+ var _context, _context2;
1627
1596
  if (!storesQueryResult) return null;
1628
1597
  return {
1629
1598
  total: storesQueryResult.total,
1630
1599
  count: storesQueryResult.count,
1631
1600
  offset: storesQueryResult.offset,
1632
- results: (_storesQueryResult$re = storesQueryResult.results) === null || _storesQueryResult$re === void 0 ? void 0 : _mapInstanceProperty__default["default"](_storesQueryResult$re).call(_storesQueryResult$re, store => {
1633
- var _store$productSelecti;
1601
+ results: ((_context = storesQueryResult.results) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(store => {
1602
+ var _context3, _context4;
1634
1603
  return _objectSpread$1h(_objectSpread$1h({}, store), {}, {
1635
- productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _filterInstanceProperty__default["default"](_store$productSelecti).call(_store$productSelecti, productSelectionRef => Boolean(productSelectionRef.productSelection))
1604
+ productSelections: ((_context3 = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _filterInstanceProperty__default["default"](_context3), _context3))?.(productSelectionRef => Boolean(productSelectionRef.productSelection))
1636
1605
  });
1637
1606
  })
1638
1607
  };
1639
1608
  };
1640
1609
  const createQueryVariables$6 = ownProps => {
1641
- var _context, _ownProps$storeIds, _context2;
1610
+ var _context5, _context6;
1642
1611
  return _objectSpread$1h(_objectSpread$1h(_objectSpread$1h({
1643
1612
  limit: ownProps.limit,
1644
1613
  offset: ownProps.offset,
1645
1614
  sort: _sortInstanceProperty__default["default"](ownProps)
1646
1615
  }, Boolean(ownProps.stores) && {
1647
- where: "key in (".concat(_mapInstanceProperty__default["default"](_context = ownProps.stores).call(_context, store => "\"".concat(store, "\"")).join(', '), ")")
1648
- }), Boolean((_ownProps$storeIds = ownProps.storeIds) === null || _ownProps$storeIds === void 0 ? void 0 : _ownProps$storeIds.length) && {
1649
- where: "id in (".concat(_mapInstanceProperty__default["default"](_context2 = ownProps.storeIds).call(_context2, storeId => "\"".concat(storeId, "\"")).join(', '), ")")
1616
+ where: `key in (${_mapInstanceProperty__default["default"](_context5 = ownProps.stores).call(_context5, store => `"${store}"`).join(', ')})`
1617
+ }), Boolean(ownProps.storeIds?.length) && {
1618
+ where: `id in (${_mapInstanceProperty__default["default"](_context6 = ownProps.storeIds).call(_context6, storeId => `"${storeId}"`).join(', ')})`
1650
1619
  }), {}, {
1651
1620
  excludeExtendedStoresList: ownProps.excludeExtendedStoresList,
1652
1621
  excludeProductSelections: ownProps.excludeProductSelections
@@ -1672,10 +1641,7 @@ const useStoresListFetcher = props => {
1672
1641
  projectKey: props.projectKey
1673
1642
  },
1674
1643
  fetchPolicy: 'network-only',
1675
- onError: graphqlErrorResponse => {
1676
- var _props$onError;
1677
- return (_props$onError = props.onError) === null || _props$onError === void 0 ? void 0 : _props$onError.call(props, graphqlErrorResponse);
1678
- }
1644
+ onError: graphqlErrorResponse => props.onError?.(graphqlErrorResponse)
1679
1645
  }),
1680
1646
  data = _useQuery.data,
1681
1647
  refetch = _useQuery.refetch,
@@ -1683,7 +1649,7 @@ const useStoresListFetcher = props => {
1683
1649
  return {
1684
1650
  isLoading: loading,
1685
1651
  refetch,
1686
- stores: filterStoresOutdatedDanglingProductSelections(data === null || data === void 0 ? void 0 : data.stores),
1652
+ stores: filterStoresOutdatedDanglingProductSelections(data?.stores),
1687
1653
  refetchQuery: {
1688
1654
  query: FetchStoresQuery,
1689
1655
  variables: queryVariables,
@@ -1738,7 +1704,7 @@ const searchForStores = _ref => {
1738
1704
  offset = _ref$offset === void 0 ? 0 : _ref$offset;
1739
1705
  return sdk.actions.post({
1740
1706
  mcApiProxyTarget: 'stores-search',
1741
- uri: "/".concat(projectKey),
1707
+ uri: `/${projectKey}`,
1742
1708
  payload: {
1743
1709
  query: createSearchQuery(searchBy, searchTerm, language),
1744
1710
  limit,
@@ -1774,7 +1740,6 @@ const useStoresSearchFetcher = () => {
1774
1740
  searchBy = _ref2.searchBy,
1775
1741
  language = _ref2.language;
1776
1742
  try {
1777
- var _result$results, _result$total;
1778
1743
  setIsLoading(true);
1779
1744
  const result = await dispatch(searchForStores({
1780
1745
  projectKey,
@@ -1785,8 +1750,8 @@ const useStoresSearchFetcher = () => {
1785
1750
  offset
1786
1751
  }));
1787
1752
  setStoreSearchResults({
1788
- hits: (_result$results = result.results) !== null && _result$results !== void 0 ? _result$results : [],
1789
- total: (_result$total = result.total) !== null && _result$total !== void 0 ? _result$total : 0,
1753
+ hits: result.results ?? [],
1754
+ total: result.total ?? 0,
1790
1755
  searchTerm,
1791
1756
  searchBy
1792
1757
  });
@@ -1815,7 +1780,7 @@ const fetchProjectStoresStatus = _ref => {
1815
1780
  let projectKey = _ref.projectKey;
1816
1781
  return sdk.actions.get({
1817
1782
  mcApiProxyTarget: 'stores-search-indexing-status',
1818
- uri: "/".concat(projectKey)
1783
+ uri: `/${projectKey}`
1819
1784
  });
1820
1785
  };
1821
1786
  const useStoreSearchIndexStatusFetcher = _ref2 => {
@@ -1842,7 +1807,7 @@ const useStoreSearchIndexStatusFetcher = _ref2 => {
1842
1807
  if (searchIsNotReady) {
1843
1808
  result = 'NotReady';
1844
1809
  }
1845
- if ((error === null || error === void 0 ? void 0 : error.name) === 'NetworkError') {
1810
+ if (error?.name === 'NetworkError') {
1846
1811
  result = 'NotReached';
1847
1812
  }
1848
1813
  } finally {
@@ -1864,18 +1829,13 @@ const useStoreSearchIndexStatusFetcher = _ref2 => {
1864
1829
  };
1865
1830
  var useStoreSearchIndexStatusFetcher$1 = useStoreSearchIndexStatusFetcher;
1866
1831
 
1867
- const toPermission = (permission, resourceName) => {
1868
- var _context;
1869
- return camelCase__default["default"](_concatInstanceProperty__default["default"](_context = "can ".concat(permission, " ")).call(_context, resourceName));
1870
- };
1871
- const createPermissionsComposePath = permission => // e.g applicationContext.permissions?.canViewOrders
1872
- "permissions.".concat(permission);
1873
- const createDataFencesComposePath = resourceName => permission => {
1874
- var _context2;
1875
- return (// e.g applicationContext.dataFences?.store?.orders?.canViewOrders?.values
1876
- _concatInstanceProperty__default["default"](_context2 = "dataFences.store.".concat(resourceName, ".")).call(_context2, permission, ".values")
1877
- );
1878
- };
1832
+ const toPermission = (permission, resourceName) => camelCase__default["default"](`can ${permission} ${resourceName}`);
1833
+ const createPermissionsComposePath = permission =>
1834
+ // e.g applicationContext.permissions?.canViewOrders
1835
+ `permissions.${permission}`;
1836
+ const createDataFencesComposePath = resourceName => permission =>
1837
+ // e.g applicationContext.dataFences?.store?.orders?.canViewOrders?.values
1838
+ `dataFences.store.${resourceName}.${permission}.values`;
1879
1839
  const useStoreKeysInDataFences = _ref => {
1880
1840
  let resourceName = _ref.resourceName,
1881
1841
  _ref$permission = _ref.permission,
@@ -1975,7 +1935,7 @@ const usePersistedReminder = function () {
1975
1935
  };
1976
1936
  var usePersistedReminder$1 = usePersistedReminder;
1977
1937
 
1978
- var messages$O = reactIntl.defineMessages({
1938
+ var messages$N = reactIntl.defineMessages({
1979
1939
  profileUpdated: {
1980
1940
  id: 'NotificationText.profileUpdated',
1981
1941
  description: 'Label for the notification header',
@@ -2012,9 +1972,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2012
1972
  children: [jsxRuntime.jsx(uiKit.Text.Body, {
2013
1973
  as: "p",
2014
1974
  isBold: true,
2015
- intlMessage: messages$O.profileUpdated
1975
+ intlMessage: messages$N.profileUpdated
2016
1976
  }), jsxRuntime.jsx(uiKit.Text.Body, {
2017
- intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$O.addMoreInformation), {}, {
1977
+ intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$N.addMoreInformation), {}, {
2018
1978
  values: {
2019
1979
  newline: getNewLine
2020
1980
  }
@@ -2023,7 +1983,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
2023
1983
  }), jsxRuntime.jsx(uiKit.Spacings.Stack, {
2024
1984
  scale: "xs",
2025
1985
  children: jsxRuntime.jsx(uiKit.Text.Body, {
2026
- intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$O.informationAndProfileLink), {}, {
1986
+ intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$N.informationAndProfileLink), {}, {
2027
1987
  values: {
2028
1988
  newline: getNewLine,
2029
1989
  link: getLinkToProfile
@@ -2151,7 +2111,7 @@ const useEventCallback = (fn, dependencies) => {
2151
2111
  };
2152
2112
  var useEventCallback$1 = useEventCallback;
2153
2113
 
2154
- var messages$N = reactIntl.defineMessages({
2114
+ var messages$M = reactIntl.defineMessages({
2155
2115
  fallbackHint: {
2156
2116
  id: 'KeyFallback.fallbackHint',
2157
2117
  description: 'key fallback for a specified resource key (e.g name)',
@@ -2175,7 +2135,7 @@ const useLocalizedKeyFallback = () => {
2175
2135
  return values => {
2176
2136
  if (!values.resource) return null;
2177
2137
  const localizedString = values.resource[values.localizedStringFieldName];
2178
- const fallbackHintWithKey = intl.formatMessage(messages$N.fallbackHint, {
2138
+ const fallbackHintWithKey = intl.formatMessage(messages$M.fallbackHint, {
2179
2139
  key: values.resource.key
2180
2140
  });
2181
2141
  if (!localizedString) return fallbackHintWithKey;
@@ -2266,7 +2226,7 @@ const usePersistedTableConfiguration = props => {
2266
2226
  * Therefore, if it will be missing from the local storage and hence we use the [] as default.
2267
2227
  */
2268
2228
  const getVisibleColumns = React.useCallback(() => {
2269
- if (cachedVisibleTableConfiguration !== null && cachedVisibleTableConfiguration !== void 0 && cachedVisibleTableConfiguration.columnsConfig) {
2229
+ if (cachedVisibleTableConfiguration?.columnsConfig) {
2270
2230
  return retrieveColumnsWithCachedConfiguration({
2271
2231
  allAvailableColumnsConfiguration,
2272
2232
  cachedVisibleTableConfiguration: cachedVisibleTableConfiguration.columnsConfig,
@@ -2280,8 +2240,8 @@ const usePersistedTableConfiguration = props => {
2280
2240
  return {
2281
2241
  visibleColumns,
2282
2242
  visibleColumnKeys,
2283
- cachedVisibleColumnsConfiguration: cachedVisibleTableConfiguration === null || cachedVisibleTableConfiguration === void 0 ? void 0 : cachedVisibleTableConfiguration.columnsConfig,
2284
- cachedDisplaySettings: cachedVisibleTableConfiguration === null || cachedVisibleTableConfiguration === void 0 ? void 0 : cachedVisibleTableConfiguration.displaySettings,
2243
+ cachedVisibleColumnsConfiguration: cachedVisibleTableConfiguration?.columnsConfig,
2244
+ cachedDisplaySettings: cachedVisibleTableConfiguration?.displaySettings,
2285
2245
  handleCachedTableConfigurationUpdate: update => handleCacheUpdate({
2286
2246
  update,
2287
2247
  cachedVisibleTableConfiguration,
@@ -2293,7 +2253,6 @@ var usePersistedTableConfiguration$1 = usePersistedTableConfiguration;
2293
2253
 
2294
2254
  var FetchProductSelectionsTotal = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelectionsTotal" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 74, source: { body: "query FetchProductSelectionsTotal {\n productSelections {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
2295
2255
  const useProductSelectionsTotalFetcher = props => {
2296
- var _data$productSelectio;
2297
2256
  const _useQuery = hooks.useQuery(FetchProductSelectionsTotal, {
2298
2257
  context: {
2299
2258
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
@@ -2304,7 +2263,7 @@ const useProductSelectionsTotalFetcher = props => {
2304
2263
  refetch = _useQuery.refetch;
2305
2264
  return {
2306
2265
  isLoading: loading,
2307
- total: data === null || data === void 0 || (_data$productSelectio = data.productSelections) === null || _data$productSelectio === void 0 ? void 0 : _data$productSelectio.total,
2266
+ total: data?.productSelections?.total,
2308
2267
  refetch
2309
2268
  };
2310
2269
  };
@@ -2316,7 +2275,7 @@ function _objectSpread$1c(e) { for (var r = 1; r < arguments.length; r++) { var
2316
2275
  // eslint-disable-next-line import/prefer-default-export
2317
2276
  const convertProductSelectionsFromGraphQl = productSelections => {
2318
2277
  var _context;
2319
- return (productSelections === null || productSelections === void 0 ? void 0 : productSelections.results) && _objectSpread$1c(_objectSpread$1c({}, productSelections), {}, {
2278
+ return productSelections?.results && _objectSpread$1c(_objectSpread$1c({}, productSelections), {}, {
2320
2279
  results: _mapInstanceProperty__default["default"](_context = productSelections.results).call(_context, productSelection => _objectSpread$1c({}, l10n.applyTransformedLocalizedFields(productSelection, [{
2321
2280
  from: 'nameAllLocales',
2322
2281
  to: 'name'
@@ -2354,70 +2313,15 @@ const useProductSelectionsFetcher = props => {
2354
2313
  refetch = _useQuery.refetch;
2355
2314
  return {
2356
2315
  isLoading: loading,
2357
- productSelections: convertProductSelectionsFromGraphQl(data === null || data === void 0 ? void 0 : data.productSelections) || emptyProductSelections,
2316
+ productSelections: convertProductSelectionsFromGraphQl(data?.productSelections) || emptyProductSelections,
2358
2317
  refetch
2359
2318
  };
2360
2319
  };
2361
2320
  var useProductSelectionsFetcher$1 = useProductSelectionsFetcher;
2362
2321
 
2363
- var messages$M = reactIntl.defineMessages({
2364
- identityBannerNotification: {
2365
- id: 'Global.identityBannerNotification',
2366
- description: 'Identity banner notification',
2367
- defaultMessage: '🎉 <b>Introducing Identity</b>: A more secure sign-in system is coming soon to unify user accounts across commercetools products. You will need to create your new identity account when the time comes but your current Merchant Center access will stay the same.'
2368
- }
2369
- });
2370
-
2371
- const getBoldText = chunks => jsxRuntime.jsx(uiKit.Text.Body, {
2372
- tone: "inverted",
2373
- as: "span",
2374
- fontWeight: "bold",
2375
- children: chunks
2376
- }, "bold-text");
2377
- const DISMISSED_IDENTITY_BANNER = 'dismissed-identity-banner';
2378
- const PENDING_IDENTITY_BANNER = 'pending-identity-banner';
2379
- // Hardcode feature flag name here instead of importing it from the private `constants` package.
2380
- const ENABLE_IDENTITY_BANNER_NOTIFICATION = 'identityBannerNotification';
2381
- const useIdentityBannerNotification = () => {
2382
- const isIdentityBannerNotificationEnabled = applicationShell.useFeatureToggle(ENABLE_IDENTITY_BANNER_NOTIFICATION);
2383
- const intl = reactIntl.useIntl();
2384
- const showNotification = actionsGlobal.useShowNotification();
2385
- const hasShownRef = React.useRef(false);
2386
- React.useEffect(() => {
2387
- // If running in Cypress, always mark the banner as dismissed
2388
- if (typeof window !== 'undefined' && window.Cypress) {
2389
- localStorage.setItem('dismissed-identity-banner', 'true');
2390
- return;
2391
- }
2392
- if (isIdentityBannerNotificationEnabled !== true) return;
2393
- const hasDismissedBanner = !!localStorage.getItem(DISMISSED_IDENTITY_BANNER);
2394
- const isPending = !!localStorage.getItem(PENDING_IDENTITY_BANNER);
2395
- if (!hasDismissedBanner && !isPending && !hasShownRef.current || isPending && !hasShownRef.current) {
2396
- hasShownRef.current = true;
2397
- localStorage.setItem(PENDING_IDENTITY_BANNER, 'true');
2398
- showNotification({
2399
- kind: constants.NOTIFICATION_KINDS_SIDE.info,
2400
- domain: constants.DOMAINS.GLOBAL,
2401
- // @ts-expect-error: notification `text` expects a string but the formatted message is a ReactNode
2402
- // due to the injected `b` component. Apparently, it still works but the types are not correct.
2403
- text: intl.formatMessage(messages$M.identityBannerNotification, {
2404
- b: getBoldText
2405
- })
2406
- }, {
2407
- onDismiss: () => {
2408
- localStorage.setItem(DISMISSED_IDENTITY_BANNER, 'true');
2409
- localStorage.removeItem(PENDING_IDENTITY_BANNER);
2410
- hasShownRef.current = false;
2411
- }
2412
- });
2413
- }
2414
- // }
2415
- }, [showNotification, intl, isIdentityBannerNotificationEnabled]);
2416
- };
2417
-
2418
2322
  const setToArray = function () {
2419
2323
  let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
2420
- return "id in (".concat(_mapInstanceProperty__default["default"](values).call(values, value => "\"".concat(value, "\"")).join(', '), ")");
2324
+ return `id in (${_mapInstanceProperty__default["default"](values).call(values, value => `"${value}"`).join(', ')})`;
2421
2325
  };
2422
2326
 
2423
2327
  function capitalizeFirst(text) {
@@ -2485,7 +2389,6 @@ function validateSingleFilter(_ref) {
2485
2389
  return _includesInstanceProperty__default["default"](invalidValues).call(invalidValues, value);
2486
2390
  }
2487
2391
 
2488
- var _templateObject$4, _templateObject2$2;
2489
2392
  const dateFormatDayStart$1 = 'YYYY-MM-DDT00:00:00.000';
2490
2393
  const dateFormatDayEnd$1 = 'YYYY-MM-DDT23:59:59.999';
2491
2394
  const getDateTimeInUTC = (date, timezone, format) => {
@@ -2495,8 +2398,7 @@ const getDateTimeInUTC = (date, timezone, format) => {
2495
2398
  const noTimeSpecified = momentDate.hours() === 0 && momentDate.minutes() === 0 && momentDate.seconds() === 0;
2496
2399
  // if it's a date then convert it to UTC datetime based on timezone
2497
2400
  if (noTimeSpecified) {
2498
- var _moment$tz;
2499
- const offset = ((_moment$tz = moment__default["default"](date).tz(timezone)) === null || _moment$tz === void 0 ? void 0 : _moment$tz.utcOffset()) || 0;
2401
+ const offset = moment__default["default"](date).tz(timezone)?.utcOffset() || 0;
2500
2402
  const formattedDate = momentDate.format(format);
2501
2403
  const formattedDateWithOffset = moment__default["default"](formattedDate).add(offset, 'minutes').format(dateFormat);
2502
2404
  // console.log(formattedDateWithOffset);
@@ -2509,7 +2411,6 @@ const getDateTimeInUTC = (date, timezone, format) => {
2509
2411
  function dateTransformer$1(filterKey, filters) {
2510
2412
  let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator$1;
2511
2413
  const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
2512
- var _context, _context2;
2513
2414
  let type = _ref.type,
2514
2415
  value = _ref.value,
2515
2416
  timezone = _ref.timezone;
@@ -2519,13 +2420,19 @@ function dateTransformer$1(filterKey, filters) {
2519
2420
  })) return '';
2520
2421
  switch (type) {
2521
2422
  case FILTER_TYPES.lessThan:
2522
- return _concatInstanceProperty__default["default"](_context = "".concat(filterKey, " < \"")).call(_context, getDateTimeInUTC(value, timezone, dateFormatDayStart$1), "\"");
2423
+ return `${filterKey} < "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"`;
2523
2424
  case FILTER_TYPES.moreThan:
2524
- return _concatInstanceProperty__default["default"](_context2 = "".concat(filterKey, " > \"")).call(_context2, getDateTimeInUTC(value, timezone, dateFormatDayEnd$1), "\"");
2425
+ return `${filterKey} > "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}"`;
2525
2426
  case FILTER_TYPES.equalTo:
2526
- return oneLine__default["default"](_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteral(["\n (", " >= \"", "\"\n and ", " <= \"", "\")\n "])), filterKey, getDateTimeInUTC(value, timezone, dateFormatDayStart$1), filterKey, getDateTimeInUTC(value, timezone, dateFormatDayEnd$1));
2427
+ return oneLine__default["default"]`
2428
+ (${filterKey} >= "${getDateTimeInUTC(value, timezone, dateFormatDayStart$1)}"
2429
+ and ${filterKey} <= "${getDateTimeInUTC(value, timezone, dateFormatDayEnd$1)}")
2430
+ `;
2527
2431
  case FILTER_TYPES.range:
2528
- return oneLine__default["default"](_templateObject2$2 || (_templateObject2$2 = _taggedTemplateLiteral(["\n (", " >= \"", "\"\n and ", " <= \"", "\")\n "])), filterKey, getDateTimeInUTC(value.from, timezone, dateFormatDayStart$1), filterKey, getDateTimeInUTC(value.to, timezone, dateFormatDayEnd$1));
2432
+ return oneLine__default["default"]`
2433
+ (${filterKey} >= "${getDateTimeInUTC(value.from, timezone, dateFormatDayStart$1)}"
2434
+ and ${filterKey} <= "${getDateTimeInUTC(value.to, timezone, dateFormatDayEnd$1)}")
2435
+ `;
2529
2436
  default:
2530
2437
  return '';
2531
2438
  }
@@ -2541,7 +2448,7 @@ function dateTransformer$1(filterKey, filters) {
2541
2448
  * (createdAt >= "2018-02-15T00:00:00.000+01:00" and createdAt <= "2018-02-15T23:59:59.999+01:00")
2542
2449
  * ) or some_more_filters
2543
2450
  */
2544
- return queryString === '' ? null : "(".concat(queryString, ")");
2451
+ return queryString === '' ? null : `(${queryString})`;
2545
2452
  }
2546
2453
  function defaultFilterValidator$1(_ref2) {
2547
2454
  let type = _ref2.type,
@@ -2557,25 +2464,19 @@ function defaultFilterValidator$1(_ref2) {
2557
2464
 
2558
2465
  var localizedTextTransformer = localizedString => {
2559
2466
  var _context;
2560
- return _mapInstanceProperty__default["default"](_context = _Object$keys__default["default"](localizedString)).call(_context, locale => {
2561
- var _context2;
2562
- return _concatInstanceProperty__default["default"](_context2 = "".concat(locale, " = \"")).call(_context2, localizedString[locale], "\"");
2563
- }).join(' and ');
2467
+ return _mapInstanceProperty__default["default"](_context = _Object$keys__default["default"](localizedString)).call(_context, locale => `${locale} = "${localizedString[locale]}"`).join(' and ');
2564
2468
  };
2565
2469
 
2566
- const getCentAmountClause = (value, operator, locale) => {
2567
- var _context;
2568
- return _concatInstanceProperty__default["default"](_context = "centAmount ".concat(operator, " ")).call(_context, uiKit.MoneyInput.convertToMoneyValue(value, locale).centAmount);
2569
- };
2470
+ const getCentAmountClause = (value, operator, locale) => `centAmount ${operator} ${uiKit.MoneyInput.convertToMoneyValue(value, locale).centAmount}`;
2570
2471
  function moneyTransformer(value, option, locale) {
2571
2472
  const clauses = [];
2572
2473
  if (option === FILTER_TYPES.range) {
2573
- clauses[0] = "currencyCode = \"".concat(value.from.currencyCode, "\"");
2474
+ clauses[0] = `currencyCode = "${value.from.currencyCode}"`;
2574
2475
  clauses[1] = getCentAmountClause(value.from, '>=', locale);
2575
2476
  clauses[2] = getCentAmountClause(value.to, '<=', locale);
2576
2477
  return clauses.join(' and ');
2577
2478
  }
2578
- clauses[0] = "currencyCode = \"".concat(value.currencyCode, "\"");
2479
+ clauses[0] = `currencyCode = "${value.currencyCode}"`;
2579
2480
  switch (option) {
2580
2481
  case FILTER_TYPES.lessThan:
2581
2482
  clauses[1] = getCentAmountClause(value, '<', locale);
@@ -2592,7 +2493,6 @@ function moneyTransformer(value, option, locale) {
2592
2493
  return clauses.join(' and ');
2593
2494
  }
2594
2495
 
2595
- var _templateObject$3, _templateObject2$1;
2596
2496
  const formatTime = 'HH:mm:ss.SSS';
2597
2497
 
2598
2498
  /* TimeInput only allows HH:mm:ss and adds the seconds as 00 and
@@ -2614,7 +2514,6 @@ const defaultFilterValidator = _ref => {
2614
2514
  const timeTransformer = function (filterKey, filters) {
2615
2515
  let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultFilterValidator;
2616
2516
  const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref2 => {
2617
- var _context, _context2;
2618
2517
  let type = _ref2.type,
2619
2518
  value = _ref2.value;
2620
2519
  if (!filterValidator({
@@ -2623,13 +2522,19 @@ const timeTransformer = function (filterKey, filters) {
2623
2522
  })) return '';
2624
2523
  switch (type) {
2625
2524
  case FILTER_TYPES.lessThan:
2626
- return _concatInstanceProperty__default["default"](_context = "".concat(filterKey, " < \"")).call(_context, value, "\"");
2525
+ return `${filterKey} < "${value}"`;
2627
2526
  case FILTER_TYPES.moreThan:
2628
- return _concatInstanceProperty__default["default"](_context2 = "".concat(filterKey, " > \"")).call(_context2, value, "\"");
2527
+ return `${filterKey} > "${value}"`;
2629
2528
  case FILTER_TYPES.equalTo:
2630
- return oneLine__default["default"](_templateObject$3 || (_templateObject$3 = _taggedTemplateLiteral(["\n (", " >= \"", "\"\n and ", " <= \"", "\")\n "])), filterKey, value, filterKey, getEndOfSecond(value));
2529
+ return oneLine__default["default"]`
2530
+ (${filterKey} >= "${value}"
2531
+ and ${filterKey} <= "${getEndOfSecond(value)}")
2532
+ `;
2631
2533
  case FILTER_TYPES.range:
2632
- return oneLine__default["default"](_templateObject2$1 || (_templateObject2$1 = _taggedTemplateLiteral(["\n (", " >= \"", "\"\n and ", " <= \"", "\")\n "])), filterKey, value.from, filterKey, getEndOfSecond(value.to));
2534
+ return oneLine__default["default"]`
2535
+ (${filterKey} >= "${value.from}"
2536
+ and ${filterKey} <= "${getEndOfSecond(value.to)}")
2537
+ `;
2633
2538
  default:
2634
2539
  return '';
2635
2540
  }
@@ -2645,19 +2550,21 @@ const timeTransformer = function (filterKey, filters) {
2645
2550
  * (pickUpTime >= "14:00" and pickUpTime <= "15:00")
2646
2551
  * ) or some_more_filters
2647
2552
  */
2648
- return queryString === '' ? null : "(".concat(queryString, ")");
2553
+ return queryString === '' ? null : `(${queryString})`;
2649
2554
  };
2650
2555
 
2651
- var _templateObject$2;
2652
2556
  function formatDateRangeValue(value, type) {
2653
2557
  let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
2654
2558
  locale: 'en',
2655
2559
  timeZone: moment__default$1["default"].tz.guess()
2656
2560
  };
2657
2561
  if (value.from === value.to) return formatDateTime$1(type, value.from, options);
2658
- if (value.from && value.to) return oneLine__default["default"](_templateObject$2 || (_templateObject$2 = _taggedTemplateLiteral(["\n ", " -\n ", "\n "])), formatDateTime$1(type, value.from, options), formatDateTime$1(type, value.to, options));
2659
- if (value.from) return "from ".concat(formatDateTime$1(type, value.from, options));
2660
- if (value.to) return "to ".concat(formatDateTime$1(type, value.to, options));
2562
+ if (value.from && value.to) return oneLine__default["default"]`
2563
+ ${formatDateTime$1(type, value.from, options)} -
2564
+ ${formatDateTime$1(type, value.to, options)}
2565
+ `;
2566
+ if (value.from) return `from ${formatDateTime$1(type, value.from, options)}`;
2567
+ if (value.to) return `to ${formatDateTime$1(type, value.to, options)}`;
2661
2568
  return '';
2662
2569
  }
2663
2570
  function formatDateTime$1(type, value) {
@@ -3855,13 +3762,13 @@ const getData = (code, field) => {
3855
3762
  const getFractionDigit = code => getData(code, 'fractionDigit');
3856
3763
 
3857
3764
  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; }
3858
- function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1b(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1b(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
3765
+ function _objectSpread$1b(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1b(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1b(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
3859
3766
  function formatMoneyRangeValue(value, intl) {
3860
- var _context;
3861
3767
  if (value.from === value.to) return formatMoneyValue(value.from, value.currency, intl);
3862
- if (value.from && value.to) return _concatInstanceProperty__default["default"](_context = "".concat(formatMoneyValue(value.from, value.currency, intl), " -\n ")).call(_context, formatMoneyValue(value.to, value.currency, intl));
3863
- if (value.from) return "from ".concat(formatMoneyValue(value.from, value.currency, intl));
3864
- if (value.to) return "to ".concat(formatMoneyValue(value.to, value.currency, intl));
3768
+ if (value.from && value.to) return `${formatMoneyValue(value.from, value.currency, intl)} -
3769
+ ${formatMoneyValue(value.to, value.currency, intl)}`;
3770
+ if (value.from) return `from ${formatMoneyValue(value.from, value.currency, intl)}`;
3771
+ if (value.to) return `to ${formatMoneyValue(value.to, value.currency, intl)}`;
3865
3772
  return '';
3866
3773
  }
3867
3774
  function formatMoneyValue(amount, currency, intl) {
@@ -3881,8 +3788,7 @@ function getFractionedAmount(moneyValue) {
3881
3788
  return amount / 10 ** fractionDigits;
3882
3789
  }
3883
3790
  function formatMoney$2(moneyValue, intl, options) {
3884
- var _moneyValue$fractione;
3885
- return intl.formatNumber((_moneyValue$fractione = moneyValue.fractionedAmount) !== null && _moneyValue$fractione !== void 0 ? _moneyValue$fractione : getFractionedAmount(moneyValue), _objectSpread$1b({
3791
+ return intl.formatNumber(moneyValue.fractionedAmount ?? getFractionedAmount(moneyValue), _objectSpread$1b({
3886
3792
  style: 'currency',
3887
3793
  currency: moneyValue.currencyCode,
3888
3794
  minimumFractionDigits: moneyValue.fractionDigits
@@ -3903,13 +3809,11 @@ var messages$L = reactIntl.defineMessages({
3903
3809
  });
3904
3810
 
3905
3811
  const formatEnum = _ref => {
3906
- var _context;
3907
3812
  let value = _ref.value,
3908
3813
  fallbackValue = _ref.fallbackValue;
3909
- return value.label || _concatInstanceProperty__default["default"](_context = "".concat(fallbackValue, " (")).call(_context, value.key, ")");
3814
+ return value.label || `${fallbackValue} (${value.key})`;
3910
3815
  };
3911
3816
  const formatLenum = _ref2 => {
3912
- var _context2;
3913
3817
  let value = _ref2.value,
3914
3818
  language = _ref2.language,
3915
3819
  languages = _ref2.languages,
@@ -3917,7 +3821,7 @@ const formatLenum = _ref2 => {
3917
3821
  return l10n.formatLocalizedString(value, {
3918
3822
  key: 'label',
3919
3823
  locale: language,
3920
- fallback: _concatInstanceProperty__default["default"](_context2 = "".concat(fallbackValue, " (")).call(_context2, value.key, ")"),
3824
+ fallback: `${fallbackValue} (${value.key})`,
3921
3825
  fallbackOrder: languages
3922
3826
  });
3923
3827
  };
@@ -3953,7 +3857,6 @@ const formatDate = _ref6 => {
3953
3857
  });
3954
3858
  };
3955
3859
  const formatDateTime = _ref7 => {
3956
- var _context3;
3957
3860
  let value = _ref7.value,
3958
3861
  userTimeZone = _ref7.userTimeZone,
3959
3862
  intl = _ref7.intl;
@@ -3969,7 +3872,7 @@ const formatDateTime = _ref7 => {
3969
3872
  // defaults to utc if timeZone is not provided
3970
3873
  timeZone: userTimeZone || 'utc'
3971
3874
  });
3972
- return _concatInstanceProperty__default["default"](_context3 = "".concat(date, " (")).call(_context3, time, ")");
3875
+ return `${date} (${time})`;
3973
3876
  };
3974
3877
  const formatBoolean = _ref8 => {
3975
3878
  let value = _ref8.value,
@@ -3992,7 +3895,7 @@ const formatUnknown = _ref0 => {
3992
3895
  fallbackValue = _ref0.fallbackValue;
3993
3896
  // NOTE This is reporting within the render function, which is supposed to
3994
3897
  // be pure. This is quite bad as this is a side-effect in the render fn.
3995
- sentry.reportErrorToSentry(new Error("Unhandled custom attribute type '".concat(type.name, "' for value")), {
3898
+ sentry.reportErrorToSentry(new Error(`Unhandled custom attribute type '${type.name}' for value`), {
3996
3899
  extra: {
3997
3900
  value
3998
3901
  }
@@ -4067,10 +3970,9 @@ const attributeTypeNames = {
4067
3970
  Number: 'number'
4068
3971
  };
4069
3972
  const convertToAttributeType = customFieldType => {
4070
- var _customFieldType$elem;
4071
3973
  if (isNil__default["default"](customFieldType)) return customFieldType;
4072
3974
  const attributeTypeName = attributeTypeNames[customFieldType.name];
4073
- const elementTypeName = attributeTypeNames[(_customFieldType$elem = customFieldType.elementType) === null || _customFieldType$elem === void 0 ? void 0 : _customFieldType$elem.name];
3975
+ const elementTypeName = attributeTypeNames[customFieldType.elementType?.name];
4074
3976
  return {
4075
3977
  name: attributeTypeName,
4076
3978
  elementType: {
@@ -4118,14 +4020,11 @@ function formatCustomField(_ref) {
4118
4020
  }
4119
4021
  function useFormatCustomField() {
4120
4022
  const intl = reactIntl.useIntl();
4121
- const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
4122
- var _applicationContext$p, _applicationContext$u;
4123
- return {
4124
- language: applicationContext.dataLocale,
4125
- languages: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages,
4126
- userTimeZone: (_applicationContext$u = applicationContext.user) === null || _applicationContext$u === void 0 ? void 0 : _applicationContext$u.timeZone
4127
- };
4128
- }),
4023
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
4024
+ language: applicationContext.dataLocale,
4025
+ languages: applicationContext.project?.languages,
4026
+ userTimeZone: applicationContext.user?.timeZone
4027
+ })),
4129
4028
  language = _useApplicationContex.language,
4130
4029
  languages = _useApplicationContex.languages,
4131
4030
  userTimeZone = _useApplicationContex.userTimeZone;
@@ -4157,9 +4056,8 @@ function useFormatCustomField() {
4157
4056
  // e.g
4158
4057
  // where: `masterData(current(name(en >= "${lowerBound}" and en < "${upperBound}")))`
4159
4058
  const getPrefixSearchBounds = input => {
4160
- var _context;
4161
4059
  const getNextCharacter = character => String.fromCharCode(character.charCodeAt() + 1);
4162
- return [input, _concatInstanceProperty__default["default"](_context = "".concat(_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1))).call(_context, getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1)))];
4060
+ return [input, `${_sliceInstanceProperty__default["default"](input).call(input, 0, input.length - 1)}${getNextCharacter(_sliceInstanceProperty__default["default"](input).call(input, input.length - 1))}`];
4163
4061
  };
4164
4062
  var getPrefixSearchBounds$1 = getPrefixSearchBounds;
4165
4063
 
@@ -4359,7 +4257,7 @@ const convertChangeValueAction = actionPayload => {
4359
4257
  * as its dynamic content can not be typed in SDL for the mutation.
4360
4258
  */
4361
4259
  const convertAction = (actionName, actionPayload) => {
4362
- var _actionPayload$type, _context3, _actionPayload$geoLoc, _actionPayload$geoLoc2, _actionPayload$shippi, _context4, _context5, _context6, _context7;
4260
+ var _context3, _context4, _context5, _context6, _context7;
4363
4261
  const getNameFromPayload = payload => {
4364
4262
  // changeName for `Organizations`
4365
4263
  if (typeof payload.name === 'string') return payload;
@@ -4430,7 +4328,7 @@ const convertAction = (actionName, actionPayload) => {
4430
4328
  case 'setCustomType':
4431
4329
  return {
4432
4330
  [actionName]: {
4433
- typeId: (_actionPayload$type = actionPayload.type) === null || _actionPayload$type === void 0 ? void 0 : _actionPayload$type.id,
4331
+ typeId: actionPayload.type?.id,
4434
4332
  fields: actionPayload.fields ? _mapInstanceProperty__default["default"](_context3 = _Object$entries__default["default"](actionPayload.fields)).call(_context3, _ref => {
4435
4333
  let _ref2 = _slicedToArray(_ref, 2),
4436
4334
  customField = _ref2[0],
@@ -4460,10 +4358,10 @@ const convertAction = (actionName, actionPayload) => {
4460
4358
  };
4461
4359
  case 'setGeoLocation':
4462
4360
  return {
4463
- [actionName]: actionPayload !== null && actionPayload !== void 0 && actionPayload.geoLocation ? {
4361
+ [actionName]: actionPayload?.geoLocation ? {
4464
4362
  geoLocation: {
4465
4363
  type: 'Point',
4466
- coordinates: [_parseFloat__default["default"]((_actionPayload$geoLoc = actionPayload.geoLocation) === null || _actionPayload$geoLoc === void 0 ? void 0 : _actionPayload$geoLoc.longitude), _parseFloat__default["default"]((_actionPayload$geoLoc2 = actionPayload.geoLocation) === null || _actionPayload$geoLoc2 === void 0 ? void 0 : _actionPayload$geoLoc2.latitude)]
4364
+ coordinates: [_parseFloat__default["default"](actionPayload.geoLocation?.longitude), _parseFloat__default["default"](actionPayload.geoLocation?.latitude)]
4467
4365
  }
4468
4366
  } : {
4469
4367
  undefined
@@ -4599,7 +4497,7 @@ const convertAction = (actionName, actionPayload) => {
4599
4497
  case 'setShippingRateInputType':
4600
4498
  return {
4601
4499
  [actionName]: {
4602
- shippingRateInputType: (_actionPayload$shippi = actionPayload.shippingRateInputType) !== null && _actionPayload$shippi !== void 0 && _actionPayload$shippi.type ? {
4500
+ shippingRateInputType: actionPayload.shippingRateInputType?.type ? {
4603
4501
  [actionPayload.shippingRateInputType.type]: {
4604
4502
  values: actionPayload.shippingRateInputType.type === 'CartClassification' ? _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](actionPayload.shippingRateInputType)).call(_context4, value => ({
4605
4503
  key: value.key,
@@ -4661,8 +4559,8 @@ const convertAction = (actionName, actionPayload) => {
4661
4559
  case 'addAddress':
4662
4560
  case 'changeAddress':
4663
4561
  {
4664
- var _actionPayload$addres, _context8, _actionPayload$addres2;
4665
- const _ref3 = ((_actionPayload$addres = actionPayload.address) === null || _actionPayload$addres === void 0 ? void 0 : _actionPayload$addres.custom) || {},
4562
+ var _context8;
4563
+ const _ref3 = actionPayload.address?.custom || {},
4666
4564
  _ref3$fields = _ref3.fields,
4667
4565
  fields = _ref3$fields === void 0 ? {} : _ref3$fields;
4668
4566
  const customFields = isEmpty__default["default"](fields) ? null : _mapInstanceProperty__default["default"](_context8 = _Object$entries__default["default"](fields)).call(_context8, _ref4 => {
@@ -4674,7 +4572,7 @@ const convertAction = (actionName, actionPayload) => {
4674
4572
  value: _JSON$stringify__default["default"](value)
4675
4573
  };
4676
4574
  });
4677
- const custom = (_actionPayload$addres2 = actionPayload.address) !== null && _actionPayload$addres2 !== void 0 && (_actionPayload$addres2 = _actionPayload$addres2.custom) !== null && _actionPayload$addres2 !== void 0 && (_actionPayload$addres2 = _actionPayload$addres2.type) !== null && _actionPayload$addres2 !== void 0 && _actionPayload$addres2.id ? {
4575
+ const custom = actionPayload.address?.custom?.type?.id ? {
4678
4576
  type: {
4679
4577
  id: actionPayload.address.custom.type.id
4680
4578
  },
@@ -4705,7 +4603,7 @@ const convertAction = (actionName, actionPayload) => {
4705
4603
  value: _JSON$stringify__default["default"](value)
4706
4604
  };
4707
4605
  });
4708
- const customType = type !== null && type !== void 0 && type.id ? {
4606
+ const customType = type?.id ? {
4709
4607
  id: type.id
4710
4608
  } : null;
4711
4609
  return {
@@ -4728,11 +4626,10 @@ const createGraphQlUpdateActions = actions => _reduceInstanceProperty__default["
4728
4626
  return [...previousActions, convertAction(actionName, actionPayload)];
4729
4627
  }, []);
4730
4628
  const extractErrorFromGraphQlResponse = graphQlResponse => {
4731
- var _graphQlResponse$netw, _graphQlResponse$grap;
4732
- if (((_graphQlResponse$netw = graphQlResponse.networkError) === null || _graphQlResponse$netw === void 0 || (_graphQlResponse$netw = _graphQlResponse$netw.result) === null || _graphQlResponse$netw === void 0 || (_graphQlResponse$netw = _graphQlResponse$netw.errors) === null || _graphQlResponse$netw === void 0 ? void 0 : _graphQlResponse$netw.length) > 0) {
4629
+ if (graphQlResponse.networkError?.result?.errors?.length > 0) {
4733
4630
  return graphQlResponse.networkError.result.errors;
4734
4631
  }
4735
- if (((_graphQlResponse$grap = graphQlResponse.graphQLErrors) === null || _graphQlResponse$grap === void 0 ? void 0 : _graphQlResponse$grap.length) > 0) {
4632
+ if (graphQlResponse.graphQLErrors?.length > 0) {
4736
4633
  return graphQlResponse.graphQLErrors;
4737
4634
  }
4738
4635
  return graphQlResponse;
@@ -4792,18 +4689,16 @@ function omitDeep(obj, fieldsToOmit) {
4792
4689
  }
4793
4690
 
4794
4691
  function ownKeys$19(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
4795
- function _objectSpread$19(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$19(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$19(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4692
+ function _objectSpread$19(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$19(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$19(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
4796
4693
  function getPriceChannelName(price) {
4797
- var _ref, _price$channel$name, _price$channel, _price$channel2;
4798
- return (_ref = (_price$channel$name = (_price$channel = price.channel) === null || _price$channel === void 0 ? void 0 : _price$channel.name) !== null && _price$channel$name !== void 0 ? _price$channel$name : (_price$channel2 = price.channel) === null || _price$channel2 === void 0 ? void 0 : _price$channel2.key) !== null && _ref !== void 0 ? _ref : null;
4694
+ return price.channel?.name ?? price.channel?.key ?? null;
4799
4695
  }
4800
4696
  function getDiscountValue(price) {
4801
- var _price$value, _price$value2, _price$discounted;
4802
4697
  let preciseAmount;
4803
4698
  let fractionedAmount;
4804
- if (((_price$value = price.value) === null || _price$value === void 0 ? void 0 : _price$value.type) === PRECISION_TYPES.highPrecision && price.discounted.value.type === PRECISION_TYPES.highPrecision) {
4699
+ if (price.value?.type === PRECISION_TYPES.highPrecision && price.discounted.value.type === PRECISION_TYPES.highPrecision) {
4805
4700
  preciseAmount = price.value.preciseAmount - price.discounted.value.preciseAmount;
4806
- } else if (((_price$value2 = price.value) === null || _price$value2 === void 0 ? void 0 : _price$value2.type) === PRECISION_TYPES.highPrecision && ((_price$discounted = price.discounted) === null || _price$discounted === void 0 || (_price$discounted = _price$discounted.value) === null || _price$discounted === void 0 ? void 0 : _price$discounted.type) === PRECISION_TYPES.centPrecision) {
4701
+ } else if (price.value?.type === PRECISION_TYPES.highPrecision && price.discounted?.value?.type === PRECISION_TYPES.centPrecision) {
4807
4702
  fractionedAmount = getFractionedAmount(price.value) - getFractionedAmount(price.discounted.value);
4808
4703
  }
4809
4704
  return price.discounted ? _objectSpread$19(_objectSpread$19({}, price.value), {}, {
@@ -4815,34 +4710,32 @@ function getDiscountValue(price) {
4815
4710
  });
4816
4711
  }
4817
4712
  function getSelectedPrice(price) {
4818
- var _price$discounted2;
4819
4713
  let isCartDiscountBestDealDiscountType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
4820
- return isCartDiscountBestDealDiscountType ? price : (_price$discounted2 = price.discounted) !== null && _price$discounted2 !== void 0 ? _price$discounted2 : price;
4821
- }
4822
- function getNetUnitPrice(_ref2) {
4823
- var _lineItem$perMethodTa, _filteredPerMethodTax;
4824
- let lineItem = _ref2.lineItem,
4825
- shouldRoundAmount = _ref2.shouldRoundAmount,
4826
- _ref2$isCartDiscountB = _ref2.isCartDiscountBestDealDiscountType,
4827
- isCartDiscountBestDealDiscountType = _ref2$isCartDiscountB === void 0 ? false : _ref2$isCartDiscountB;
4714
+ return isCartDiscountBestDealDiscountType ? price : price.discounted ?? price;
4715
+ }
4716
+ function getNetUnitPrice(_ref) {
4717
+ var _context, _context2;
4718
+ let lineItem = _ref.lineItem,
4719
+ shouldRoundAmount = _ref.shouldRoundAmount,
4720
+ _ref$isCartDiscountBe = _ref.isCartDiscountBestDealDiscountType,
4721
+ isCartDiscountBestDealDiscountType = _ref$isCartDiscountBe === void 0 ? false : _ref$isCartDiscountBe;
4828
4722
  const price = getSelectedPrice(lineItem.price, isCartDiscountBestDealDiscountType);
4829
- const filteredPerMethodTaxRate = lineItem === null || lineItem === void 0 || (_lineItem$perMethodTa = lineItem.perMethodTaxRate) === null || _lineItem$perMethodTa === void 0 ? void 0 : _filterInstanceProperty__default["default"](_lineItem$perMethodTa).call(_lineItem$perMethodTa, perMethodTax => {
4830
- var _lineItem$shippingDet;
4831
- return (lineItem === null || lineItem === void 0 || (_lineItem$shippingDet = lineItem.shippingDetails) === null || _lineItem$shippingDet === void 0 || (_lineItem$shippingDet = _lineItem$shippingDet.targets) === null || _lineItem$shippingDet === void 0 ? void 0 : _findIndexInstanceProperty__default["default"](_lineItem$shippingDet).call(_lineItem$shippingDet, target => (target === null || target === void 0 ? void 0 : target.shippingMethodKey) === (perMethodTax === null || perMethodTax === void 0 ? void 0 : perMethodTax.shippingMethodKey))) >= 0;
4723
+ const filteredPerMethodTaxRate = ((_context = lineItem?.perMethodTaxRate) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _filterInstanceProperty__default["default"](_context), _context))?.(perMethodTax => {
4724
+ var _context3, _context4;
4725
+ 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;
4832
4726
  });
4833
4727
 
4834
4728
  // when shipping mode is multi with the same tax rate
4835
- if ((filteredPerMethodTaxRate === null || filteredPerMethodTaxRate === void 0 ? void 0 : filteredPerMethodTaxRate.length) > 0 && (_filteredPerMethodTax = filteredPerMethodTaxRate[0]) !== null && _filteredPerMethodTax !== void 0 && (_filteredPerMethodTax = _filteredPerMethodTax.taxRate) !== null && _filteredPerMethodTax !== void 0 && _filteredPerMethodTax.includedInPrice) {
4836
- var _price$value3, _price$value4;
4729
+ if (filteredPerMethodTaxRate?.length > 0 && filteredPerMethodTaxRate[0]?.taxRate?.includedInPrice) {
4837
4730
  const taxRate = filteredPerMethodTaxRate[0].taxRate;
4838
4731
  let centAmount;
4839
4732
  // should accept 0 value
4840
- if (typeof ((_price$value3 = price.value) === null || _price$value3 === void 0 ? void 0 : _price$value3.centAmount) === 'number') {
4733
+ if (typeof price.value?.centAmount === 'number') {
4841
4734
  const amount = price.value.centAmount / (1 + taxRate.amount);
4842
4735
  centAmount = shouldRoundAmount ? Math.round(amount) : amount;
4843
4736
  }
4844
4737
  let preciseAmount;
4845
- if (((_price$value4 = price.value) === null || _price$value4 === void 0 ? void 0 : _price$value4.type) === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
4738
+ if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + taxRate.amount);
4846
4739
  return _objectSpread$19(_objectSpread$19({}, price.value), {}, {
4847
4740
  centAmount,
4848
4741
  preciseAmount
@@ -4851,15 +4744,14 @@ function getNetUnitPrice(_ref2) {
4851
4744
 
4852
4745
  // when shipping mode is single
4853
4746
  if (lineItem.taxRate && lineItem.taxRate.includedInPrice) {
4854
- var _price$value5, _price$value6;
4855
4747
  let centAmount;
4856
4748
  // should accept 0 value
4857
- if (typeof ((_price$value5 = price.value) === null || _price$value5 === void 0 ? void 0 : _price$value5.centAmount) === 'number') {
4749
+ if (typeof price.value?.centAmount === 'number') {
4858
4750
  const amount = price.value.centAmount / (1 + lineItem.taxRate.amount);
4859
4751
  centAmount = shouldRoundAmount ? Math.round(amount) : amount;
4860
4752
  }
4861
4753
  let preciseAmount;
4862
- if (((_price$value6 = price.value) === null || _price$value6 === void 0 ? void 0 : _price$value6.type) === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
4754
+ if (price.value?.type === PRECISION_TYPES.highPrecision) preciseAmount = price.value.preciseAmount / (1 + lineItem.taxRate.amount);
4863
4755
  return _objectSpread$19(_objectSpread$19({}, price.value), {}, {
4864
4756
  centAmount,
4865
4757
  preciseAmount
@@ -4893,18 +4785,18 @@ const transformCustomFieldFromGraphQLResponse = resource => {
4893
4785
  key: resource.custom.type.key,
4894
4786
  name: l10n.transformLocalizedFieldToLocalizedString(resource.custom.type.nameAllLocales),
4895
4787
  fieldDefinitions: _mapInstanceProperty__default["default"](_context = resource.custom.type.fieldDefinitions).call(_context, fieldDefinition => {
4896
- var _fieldDefinition$type, _context2, _fieldDefinition$type2, _context3;
4788
+ var _context2, _context3;
4897
4789
  return {
4898
4790
  name: fieldDefinition.name,
4899
4791
  required: fieldDefinition.required,
4900
- type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 || (_fieldDefinition$type = _fieldDefinition$type.elementType) === null || _fieldDefinition$type === void 0 ? void 0 : _fieldDefinition$type.name) === 'LocalizedEnum' ? _objectSpread$18(_objectSpread$18({}, fieldDefinition.type), {}, {
4792
+ type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$18(_objectSpread$18({}, fieldDefinition.type), {}, {
4901
4793
  elementType: _objectSpread$18(_objectSpread$18({}, fieldDefinition.type.elementType), {}, {
4902
4794
  values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
4903
4795
  key: value.key,
4904
4796
  label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
4905
4797
  }))
4906
4798
  })
4907
- }) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$18(_objectSpread$18({}, fieldDefinition.type), {}, {
4799
+ }) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$18(_objectSpread$18({}, fieldDefinition.type), {}, {
4908
4800
  values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
4909
4801
  key: value.key,
4910
4802
  label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
@@ -4931,7 +4823,7 @@ const convertProductSelectionFromGraphQl = productSelection => {
4931
4823
  from: 'nameAllLocales',
4932
4824
  to: 'name'
4933
4825
  }])), {}, {
4934
- custom: productSelection !== null && productSelection !== void 0 && productSelection.custom ? transformCustomFieldFromGraphQLResponse(productSelection) : null
4826
+ custom: productSelection?.custom ? transformCustomFieldFromGraphQLResponse(productSelection) : null
4935
4827
  });
4936
4828
  };
4937
4829
 
@@ -5054,7 +4946,7 @@ function omitSetsOfSets() {
5054
4946
  * duplicated in original values
5055
4947
  */
5056
4948
  function unique(values, properties) {
5057
- var _context2;
4949
+ var _context;
5058
4950
  let ignoredValues = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : ['', null, undefined];
5059
4951
  const duplicateValues = [];
5060
4952
  let realValues;
@@ -5063,20 +4955,19 @@ function unique(values, properties) {
5063
4955
  realValues = _filterInstanceProperty__default["default"](values).call(values, value => !_includesInstanceProperty__default["default"](ignoredValues).call(ignoredValues, value));
5064
4956
  if (!realValues.length) return [];
5065
4957
  if (properties) realValues = _mapInstanceProperty__default["default"](realValues).call(realValues, value => _reduceInstanceProperty__default["default"](properties).call(properties, (prev, curr) => {
5066
- var _context;
5067
4958
  const currentValue = value[curr] || '';
5068
- return _concatInstanceProperty__default["default"](_context = "".concat(prev, ":")).call(_context, currentValue);
4959
+ return `${prev}:${currentValue}`;
5069
4960
  }, ''));else realValues = _sliceInstanceProperty__default["default"](values).call(values, 0);
5070
4961
 
5071
4962
  // TODO: checking for dupes like this is slow, find a better way
5072
- _reduceInstanceProperty__default["default"](_context2 = _sortInstanceProperty__default["default"](realValues).call(realValues)).call(_context2, (prev, curr) => {
4963
+ _reduceInstanceProperty__default["default"](_context = _sortInstanceProperty__default["default"](realValues).call(realValues)).call(_context, (prev, curr) => {
5073
4964
  if (curr === null) return curr;
5074
4965
  if (curr !== '' && prev === curr && _indexOfInstanceProperty__default["default"](duplicateValues).call(duplicateValues, curr) === -1) duplicateValues.push(curr);
5075
4966
  return curr;
5076
4967
  });
5077
4968
  if (properties) return _mapInstanceProperty__default["default"](duplicateValues).call(duplicateValues, value => {
5078
- var _context3;
5079
- const parts = _sliceInstanceProperty__default["default"](_context3 = value.split(':')).call(_context3, 1);
4969
+ var _context2;
4970
+ const parts = _sliceInstanceProperty__default["default"](_context2 = value.split(':')).call(_context2, 1);
5080
4971
  return _reduceInstanceProperty__default["default"](properties).call(properties, (prev, curr, index) => {
5081
4972
  // eslint-disable-next-line no-param-reassign
5082
4973
  prev[curr] = parts[index];
@@ -5095,14 +4986,14 @@ function unique(values, properties) {
5095
4986
  * @return Array<Object> returns an array of objects with all duplicated values
5096
4987
  */
5097
4988
  function uniqueObjects(items) {
5098
- var _context4;
4989
+ var _context3;
5099
4990
  const emptyValues = [undefined, null, ''];
5100
- const itemsWorkingSet = items && items.length ? _filterInstanceProperty__default["default"](_context4 = _sliceInstanceProperty__default["default"](items).call(items)).call(_context4, x => !_includesInstanceProperty__default["default"](emptyValues).call(emptyValues, x)) : [];
4991
+ const itemsWorkingSet = items && items.length ? _filterInstanceProperty__default["default"](_context3 = _sliceInstanceProperty__default["default"](items).call(items)).call(_context3, x => !_includesInstanceProperty__default["default"](emptyValues).call(emptyValues, x)) : [];
5101
4992
  const duplicateValues = _reduceInstanceProperty__default["default"](itemsWorkingSet).call(itemsWorkingSet, (acc, item, index) => {
5102
- var _context5;
4993
+ var _context4;
5103
4994
  if (item === null) return acc;
5104
- const isDuplicate = _reduceInstanceProperty__default["default"](_context5 = _sliceInstanceProperty__default["default"](itemsWorkingSet).call(itemsWorkingSet, index + 1) // get sub-array after this index
5105
- ).call(_context5, (duplicateAcc, comparisonItem, comparisonIndex) => {
4995
+ const isDuplicate = _reduceInstanceProperty__default["default"](_context4 = _sliceInstanceProperty__default["default"](itemsWorkingSet).call(itemsWorkingSet, index + 1) // get sub-array after this index
4996
+ ).call(_context4, (duplicateAcc, comparisonItem, comparisonIndex) => {
5106
4997
  if (comparisonItem === null) return duplicateAcc;
5107
4998
 
5108
4999
  // check if its a dupe
@@ -5231,7 +5122,7 @@ function getCategoriesByIds(apolloClient, options) {
5231
5122
  return apolloClient.query({
5232
5123
  query: FetchCategoriesByIds,
5233
5124
  variables: {
5234
- where: "id in (".concat(_mapInstanceProperty__default["default"](_context2 = options.ids).call(_context2, id => "\"".concat(id, "\"")).join(', '), ")")
5125
+ where: `id in (${_mapInstanceProperty__default["default"](_context2 = options.ids).call(_context2, id => `"${id}"`).join(', ')})`
5235
5126
  },
5236
5127
  context: {
5237
5128
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
@@ -5251,8 +5142,8 @@ function getCategoriesByIds(apolloClient, options) {
5251
5142
  var SearchCartDiscount = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "SearchCartDiscount" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "IntValue", value: "500" } }, { 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: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 425, source: { body: "query SearchCartDiscount($where: String) {\n cartDiscounts(limit: 500, where: $where) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n\nquery FetchCartDiscountById($cartDiscountId: String!) {\n cartDiscount(id: $cartDiscountId) {\n id\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
5252
5143
  var FetchCartDiscountById = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchCartDiscountById" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "cartDiscountId" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscount" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "cartDiscountId" } } }], 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: 425, source: { body: "query SearchCartDiscount($where: String) {\n cartDiscounts(limit: 500, where: $where) {\n total\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nquery CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n\nquery FetchCartDiscountById($cartDiscountId: String!) {\n cartDiscount(id: $cartDiscountId) {\n id\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
5253
5144
  const transformCartDiscountResponse = response => {
5254
- var _context, _response$data;
5255
- return _mapInstanceProperty__default["default"](_context = ((_response$data = response.data) === null || _response$data === void 0 ? void 0 : _response$data.cartDiscounts.results) || []).call(_context, cartDiscount => transformLocalizedFieldsForCartDiscount(cartDiscount));
5145
+ var _context;
5146
+ return _mapInstanceProperty__default["default"](_context = response.data?.cartDiscounts.results || []).call(_context, cartDiscount => transformLocalizedFieldsForCartDiscount(cartDiscount));
5256
5147
  };
5257
5148
  function queryCartDiscounts(apolloClient) {
5258
5149
  return apolloClient.query({
@@ -5264,14 +5155,14 @@ function queryCartDiscounts(apolloClient) {
5264
5155
  }).then(transformCartDiscountResponse);
5265
5156
  }
5266
5157
  const getWhereClause = function () {
5267
- var _context2, _context3, _context4;
5158
+ var _context2, _context3;
5268
5159
  let searchText = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '';
5269
5160
  let language = arguments.length > 1 ? arguments[1] : undefined;
5270
5161
  const query = _trimInstanceProperty__default["default"](_context2 = _JSON$stringify__default["default"](searchText)).call(_context2);
5271
- const idQuery = isUUID$1(searchText) && "id = ".concat(query);
5272
- const nameQuery = _concatInstanceProperty__default["default"](_context3 = "name(".concat(language, " = ")).call(_context3, query, ")");
5273
- const keyQuery = "key = ".concat(query);
5274
- return _filterInstanceProperty__default["default"](_context4 = [idQuery, nameQuery, keyQuery]).call(_context4, Boolean).join(' or ');
5162
+ const idQuery = isUUID$1(searchText) && `id = ${query}`;
5163
+ const nameQuery = `name(${language} = ${query})`;
5164
+ const keyQuery = `key = ${query}`;
5165
+ return _filterInstanceProperty__default["default"](_context3 = [idQuery, nameQuery, keyQuery]).call(_context3, Boolean).join(' or ');
5275
5166
  };
5276
5167
  function searchCartDiscountsByExactMatch(apolloClient, options) {
5277
5168
  return apolloClient.query({
@@ -5294,10 +5185,7 @@ function getCartDiscountById(apolloClient, options) {
5294
5185
  context: {
5295
5186
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
5296
5187
  }
5297
- }).then(response => {
5298
- var _response$data2;
5299
- return (_response$data2 = response.data) !== null && _response$data2 !== void 0 && _response$data2.cartDiscount ? transformLocalizedFieldsForCartDiscount(response.data.cartDiscount) : null;
5300
- });
5188
+ }).then(response => response.data?.cartDiscount ? transformLocalizedFieldsForCartDiscount(response.data.cartDiscount) : null);
5301
5189
  }
5302
5190
 
5303
5191
  function _EMOTION_STRINGIFIED_CSS_ERROR__$f() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
@@ -5388,11 +5276,11 @@ var _ref$e = process.env.NODE_ENV === "production" ? {
5388
5276
  };
5389
5277
  function ReferenceSearch(props) {
5390
5278
  const ids = React.useMemo(() => {
5391
- var _props$value, _props$value2;
5392
- return props.value ? props.isMulti ? (_props$value = props.value) === null || _props$value === void 0 ? void 0 : _mapInstanceProperty__default["default"](_props$value).call(_props$value, _ref3 => {
5279
+ var _context, _context2;
5280
+ return props.value ? props.isMulti ? ((_context = props.value) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(_ref3 => {
5393
5281
  let id = _ref3.id;
5394
5282
  return id;
5395
- }) : [(_props$value2 = props.value) === null || _props$value2 === void 0 ? void 0 : _props$value2.id] : [];
5283
+ }) : [props.value?.id] : [];
5396
5284
  }, [props.value, props.isMulti]);
5397
5285
  const _useReferenceSearchIt = useReferenceSearchItems({
5398
5286
  loadItemsBySearchTerm: props.loadItemsBySearchTerm,
@@ -5404,14 +5292,14 @@ function ReferenceSearch(props) {
5404
5292
  areSomeItemsMissing = _useReferenceSearchIt.areSomeItemsMissing,
5405
5293
  handleLoadItems = _useReferenceSearchIt.handleLoadItems;
5406
5294
  if (areItemsLoading) return null;
5407
- const value = props.isMulti ? items : items === null || items === void 0 ? void 0 : items[0];
5295
+ const value = props.isMulti ? items : items?.[0];
5408
5296
  let filterValue = null;
5409
5297
  if (value) filterValue = props.isMulti ? _mapInstanceProperty__default["default"](value).call(value, props.mapItemToOption) : props.mapItemToOption(value);
5410
5298
  const tooltipTitle = value || props.value ? props.mapItemToOption(value || props.value).label : '';
5411
5299
  const loadItems = value => _Promise__default["default"].resolve(handleLoadItems(value)).then(items => _mapInstanceProperty__default["default"](items).call(items, item => props.mapItemToOption(item)));
5412
5300
  const handleChange = event => {
5413
- var _context, _event$target$value;
5414
- const option = props.isMulti ? _mapInstanceProperty__default["default"](_context = event.target.value).call(_context, item => item.value) : ((_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value) || null;
5301
+ var _context3;
5302
+ const option = props.isMulti ? _mapInstanceProperty__default["default"](_context3 = event.target.value).call(_context3, item => item.value) : event.target.value?.value || null;
5415
5303
  props.onChange(option);
5416
5304
  };
5417
5305
  const containerStyles = _ref$e;
@@ -5527,7 +5415,7 @@ function CartDiscountReferenceSearch(props) {
5527
5415
  }),
5528
5416
  loading = _useQuery.loading,
5529
5417
  data = _useQuery.data;
5530
- const isExactMatch = (data === null || data === void 0 ? void 0 : data.cartDiscounts.total) > QUERY_MAX_LIMIT;
5418
+ const isExactMatch = data?.cartDiscounts.total > QUERY_MAX_LIMIT;
5531
5419
  const _useIntl = reactIntl.useIntl(),
5532
5420
  formatMessage = _useIntl.formatMessage;
5533
5421
  const apolloClient = client.useApolloClient();
@@ -5628,9 +5516,8 @@ const messages$G = reactIntl.defineMessages({
5628
5516
  var messages$H = messages$G;
5629
5517
 
5630
5518
  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; }
5631
- function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$14(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$14(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5519
+ function _objectSpread$14(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$14(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$14(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5632
5520
  function Option(props) {
5633
- var _context, _context2;
5634
5521
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
5635
5522
  language: applicationContext.dataLocale,
5636
5523
  languages: applicationContext.project.languages
@@ -5651,19 +5538,19 @@ function Option(props) {
5651
5538
  fallbackOrder: languages
5652
5539
  })
5653
5540
  }), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
5654
- children: _concatInstanceProperty__default["default"](_context = "".concat(formatMessage(messages$H.parentCategory), ": ")).call(_context, l10n.formatLocalizedString(category.parent, {
5541
+ children: `${formatMessage(messages$H.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
5655
5542
  key: 'name',
5656
5543
  locale: language,
5657
5544
  fallbackOrder: languages
5658
- }))
5545
+ })}`
5659
5546
  }), jsxRuntime.jsx(uiKit.Text.Detail, {
5660
- children: "Slug: ".concat(l10n.formatLocalizedString(category, {
5547
+ children: `Slug: ${l10n.formatLocalizedString(category, {
5661
5548
  key: 'slug',
5662
5549
  locale: language,
5663
5550
  fallbackOrder: languages
5664
- }))
5551
+ })}`
5665
5552
  }), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
5666
- children: _concatInstanceProperty__default["default"](_context2 = "".concat(formatMessage(messages$H.externalId), ": ")).call(_context2, category.externalId || constants.NO_VALUE_FALLBACK)
5553
+ children: `${formatMessage(messages$H.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
5667
5554
  })]
5668
5555
  })
5669
5556
  }));
@@ -5727,7 +5614,7 @@ var CategorySearchPickerOptionFragment$1 = { kind: "Document", definitions: [{ k
5727
5614
  function useCachedCategoryOptions(ids) {
5728
5615
  const apolloClient = client.useApolloClient();
5729
5616
  const fragments = _mapInstanceProperty__default["default"](ids).call(ids, id => apolloClient.readFragment({
5730
- id: "CategorySearch:".concat(id),
5617
+ id: `CategorySearch:${id}`,
5731
5618
  fragment: CategorySearchPickerOptionFragment$1
5732
5619
  }));
5733
5620
  return _mapInstanceProperty__default["default"](fragments).call(fragments, category => transformLocalizedFieldsForCategory(category, [{
@@ -5808,7 +5695,7 @@ const PaginationIconButton = _ref => {
5808
5695
  onClick = _ref.onClick,
5809
5696
  rest = _objectWithoutProperties(_ref, _excluded$c);
5810
5697
  return jsxRuntime.jsx("button", _objectSpread$11(_objectSpread$11({
5811
- css: [baseButtonStyles, /*#__PURE__*/react$1.css("svg{fill:", ICON_COLOR$1, ";}transition:transform ", uiKit.designTokens.transitionStandard, ";:hover{transform:translateX(\n ", animationOrientation === 'left' ? "calc(0px - var(--spacing-10))" : "var(--spacing-10)", "\n );}padding-left:1px;padding-right:1px;:focus{border:1px solid ", ICON_COLOR$1, ";border-radius:", uiKit.designTokens.borderRadius1, ";padding-left:0px;padding-right:0px;}" + (process.env.NODE_ENV === "production" ? "" : ";label:PaginationIconButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24taWNvbi1idXR0b24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCUyIsImZpbGUiOiJwYWdpbmF0aW9uLWljb24tYnV0dG9uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZGVzaWduVG9rZW5zIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCB7IGJhc2VCdXR0b25TdHlsZXMgfSBmcm9tICcuL3NoYXJlZC9zdHlsZXMnO1xuXG4vLyBUT0RPOiBJbnRlZ3JhdGUgZGVzaWduIHRva2V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RpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czF9O1xuICAgICAgICAgIHBhZGRpbmctbGVmdDogMHB4O1xuICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcbiAgICAgICAgfVxuICAgICAgYCxcbiAgICBdfVxuICAgIG9uQ2xpY2s9e29uQ2xpY2t9XG4gICAgey4uLnJlc3R9XG4gID5cbiAgICB7Y2hpbGRyZW59XG4gIDwvYnV0dG9uPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvbkljb25CdXR0b247XG4iXX0= */"), process.env.NODE_ENV === "production" ? "" : ";label:PaginationIconButton;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24taWNvbi1idXR0b24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1CSSIsImZpbGUiOiJwYWdpbmF0aW9uLWljb24tYnV0dG9uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZGVzaWduVG9rZW5zIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCB7IGJhc2VCdXR0b25TdHlsZXMgfSBmcm9tICcuL3NoYXJlZC9zdHlsZXMnO1xuXG4vLyBUT0RPOiBJbnRlZ3JhdGUgZGVzaWduIHRva2VuIHdoZW4gcmVkZXNpZ24gaXMgY29tcGxldGVcbmNvbnN0IElDT05fQ09MT1IgPSAnIzYzNTlmZic7XG5cbmNvbnN0IFBhZ2luYXRpb25JY29uQnV0dG9uID0gKHtcbiAgYW5pbWF0aW9uT3JpZW50YXRpb24sXG4gIGNoaWxkcm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Q2xpY2s9e29uQ2xpY2t9XG4gICAgey4uLnJlc3R9XG4gID5cbiAgICB7Y2hpbGRyZW59XG4gIDwvYnV0dG9uPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvbkljb25CdXR0b247XG4iXX0= */"],
5698
+ css: [baseButtonStyles, /*#__PURE__*/react$1.css("svg{fill:", ICON_COLOR$1, ";}transition:transform ", uiKit.designTokens.transitionStandard, ";:hover{transform:translateX(\n ", animationOrientation === 'left' ? `calc(0px - var(--spacing-10))` : `var(--spacing-10)`, "\n );}padding-left:1px;padding-right:1px;:focus{border:1px solid ", ICON_COLOR$1, ";border-radius:", uiKit.designTokens.borderRadius1, ";padding-left:0px;padding-right:0px;}" + (process.env.NODE_ENV === "production" ? "" : ";label:PaginationIconButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24taWNvbi1idXR0b24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXFCUyIsImZpbGUiOiJwYWdpbmF0aW9uLWljb24tYnV0dG9uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZGVzaWduVG9rZW5zIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCB7IGJhc2VCdXR0b25TdHlsZXMgfSBmcm9tICcuL3NoYXJlZC9zdHlsZXMnO1xuXG4vLyBUT0RPOiBJbnRlZ3JhdGUgZGVzaWduIHRva2VuIHdoZW4gcmVkZXNpZ24gaXMgY29tcGxldGVcbmNvbnN0IElDT05fQ09MT1IgPSAnIzYzNTlmZic7XG5cbmNvbnN0IFBhZ2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gIHBhZGRpbmctcmlnaHQ6IDBweDtcbiAgICAgICAgfVxuICAgICAgYCxcbiAgICBdfVxuICAgIG9uQ2xpY2s9e29uQ2xpY2t9XG4gICAgey4uLnJlc3R9XG4gID5cbiAgICB7Y2hpbGRyZW59XG4gIDwvYnV0dG9uPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvbkljb25CdXR0b247XG4iXX0= */"), process.env.NODE_ENV === "production" ? "" : ";label:PaginationIconButton;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24taWNvbi1idXR0b24udHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1CSSIsImZpbGUiOiJwYWdpbmF0aW9uLWljb24tYnV0dG9uLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHR5cGUgUmVhY3RFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgZGVzaWduVG9rZW5zIH0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCB7IGJhc2VCdXR0b25TdHlsZXMgfSBmcm9tICcuL3NoYXJlZC9zdHlsZXMnO1xuXG4vLyBUT0RPOiBJbnRlZ3JhdGUgZGVzaWduIHRva2VuIHdoZW4gcmVkZXNpZ24gaXMgY29tcGxldGVcbmNvbnN0IElDT05fQ09MT1IgPSAnIzYzNTlmZic7XG5cbmNvbnN0IFBhZ2luYXRpb25JY29uQnV0dG9uID0gKHtcbiAgYW5pbWF0aW9uT3JpZW50YXRpb24sXG4gIGNoaWxkcmVuLFxuICBvbkNsaWNrLFxuICAuLi5yZXN0XG59OiB7XG4gIGFuaW1hdGlvbk9yaWVudGF0aW9uOiAnbGVmdCcgfCAncmlnaH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uZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvbkljb25CdXR0b247XG4iXX0= */"],
5812
5699
  onClick: onClick
5813
5700
  }, rest), {}, {
5814
5701
  children: children
@@ -5818,20 +5705,19 @@ var PaginationIconButton$1 = PaginationIconButton;
5818
5705
 
5819
5706
  const _excluded$b = ["isFilled", "onClick"];
5820
5707
  function ownKeys$10(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
5821
- function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$10(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$10(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5708
+ function _objectSpread$10(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$10(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$10(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5822
5709
  const ICON_HEIGHT = '10px';
5823
5710
  const ICON_WIDTH = ICON_HEIGHT;
5824
5711
  // TODO: Integrate design tokens when redesign is complete
5825
5712
  const ICON_COLOR = '#6359FF';
5826
5713
  const ICON_HOVER_COLOR = '#B1ACFF';
5827
5714
  const PaginationSelectionButton = _ref => {
5828
- var _context;
5829
5715
  let _ref$isFilled = _ref.isFilled,
5830
5716
  isFilled = _ref$isFilled === void 0 ? false : _ref$isFilled,
5831
5717
  onClick = _ref.onClick,
5832
5718
  rest = _objectWithoutProperties(_ref, _excluded$b);
5833
5719
  return jsxRuntime.jsx("button", _objectSpread$10({
5834
- css: [baseButtonStyles, /*#__PURE__*/react$1.css("height:", ICON_HEIGHT, ";width:", ICON_WIDTH, ";border-radius:", uiKit.designTokens.borderRadius6, ";border:", isFilled ? 'none' : _concatInstanceProperty__default["default"](_context = "".concat(uiKit.designTokens.borderWidth1, " solid ")).call(_context, uiKit.designTokens.colorNeutral), ";background:", isFilled ? ICON_COLOR : 'none', ";transition:", uiKit.designTokens.transitionStandard, ";:hover{background:", isFilled ? undefined : ICON_HOVER_COLOR, ";}:focus{border:", uiKit.designTokens.borderWidth1, " solid ", ICON_COLOR, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:PaginationSelectionButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUJTIiwiZmlsZSI6InBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IHsgYmFzZUJ1dHRvblN0eWxlcyB9IGZ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ZpbGxlZCA/IHVuZGVmaW5lZCA6IElDT05fSE9WRVJfQ09MT1J9O1xuICAgICAgICB9XG4gICAgICAgIDpmb2N1cyB7XG4gICAgICAgICAgYm9yZGVyOiAke2Rlc2lnblRva2Vucy5ib3JkZXJXaWR0aDF9IHNvbGlkICR7SUNPTl9DT0xPUn07XG4gICAgICAgIH1cbiAgICAgIGAsXG4gICAgXX1cbiAgICBvbkNsaWNrPXtvbkNsaWNrfVxuICAgIHsuLi5yZXN0fVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvbjtcbiJdfQ== */"), process.env.NODE_ENV === "production" ? "" : ";label:PaginationSelectionButton;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJJIiwiZmlsZSI6InBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IHsgYmFzZUJ1dHRvblN0eWxlcyB9IGZyb20gJy4vc2hhcmVkL3N0eWxlcyc7XG5cbmNvbnN0IElDT05fSEVJR0hUID0gJzEwcHgnO1xuY29uc3QgSUNPTl9XSURUSCA9IElDT05fSEVJR0hUO1xuLy8gVE9ETzogSW50ZWdyYXRlIGRlc2lnbiB0b2tlbnMgd2hlbiByZWRlc2lnbiBpcyBjb21wbGV0ZVxuY29uc3QgSUNPTl9DT0xPUiA9ICcjNjM1OUZGJztcbmNvbnN0IElDT05fSE9W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Li5yZXN0fVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvbjtcbiJdfQ== */"],
5720
+ css: [baseButtonStyles, /*#__PURE__*/react$1.css("height:", ICON_HEIGHT, ";width:", ICON_WIDTH, ";border-radius:", uiKit.designTokens.borderRadius6, ";border:", isFilled ? 'none' : `${uiKit.designTokens.borderWidth1} solid ${uiKit.designTokens.colorNeutral}`, ";background:", isFilled ? ICON_COLOR : 'none', ";transition:", uiKit.designTokens.transitionStandard, ";:hover{background:", isFilled ? undefined : ICON_HOVER_COLOR, ";}:focus{border:", uiKit.designTokens.borderWidth1, " solid ", ICON_COLOR, ";}" + (process.env.NODE_ENV === "production" ? "" : ";label:PaginationSelectionButton;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBcUJTIiwiZmlsZSI6InBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IHsgYmFzZUJ1dHRvblN0eWxlcyB9IGZyb20gJy4vc2hhcmVkL3N0eWxlcyc7XG5cbmNvbnN0IElDT05fSEVJR0hUID0gJzEwcHgnO1xuY29uc3QgSUNPTl9XSURUSCA9IElDT05fSEVJR0hUO1xuLy8gVE9ETzogSW50ZWdyYXRlIGRlc2lnbiB0b2tlbnMgd2hlbiByZWRlc2lnbiBpcyBjb21wbGV0ZVxuY29uc3QgSUNPTl9DT0xPUiA9IC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bkNsaWNrPXtvbkNsaWNrfVxuICAgIHsuLi5yZXN0fVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvbjtcbiJdfQ== */"), process.env.NODE_ENV === "production" ? "" : ";label:PaginationSelectionButton;", process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJJIiwiZmlsZSI6InBhZ2luYXRpb24tc2VsZWN0aW9uLWJ1dHRvbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IHsgYmFzZUJ1dHRvblN0eWxlcyB9IGZyb20gJy4vc2hhcmVkL3N0eWxlcyc7XG5cbmNvbnN0IElDT05fSEVJR0hUID0gJzEwcHgnO1xuY29uc3QgSUNPTl9XSURUSCA9IElDT05fSEVJR0hUO1xuLy8gVE9ETzogSW50ZWdyYXRlIGRlc2lnbiB0b2tlbnMgd2hlbiByZWRlc2lnbiBpcyBjb21wbGV0ZVxuY29uc3QgSUNPTl9DT0xPUiA9ICcjNjM1OUZGJztcbmNvbnN0IElDT05fSE9WRVJfQ09MT1IgPSAnI0IxQUNGRic7XG5cbmNvbnN0IFBhZ2luYXRpb25TZWxlY3Rpb25CdXR0b24gPSAoe1xuICBpc0ZpbGxlZCA9IGZhbHNlLFxuICBvbkNsaWNrLFxuICAuLi5yZXN0XG59OiB7XG4gIGlzRmlsbGVkPzogYm9vbGVhbjtcbiAgb25DbGljazogKCkgPT4gdm9pZDtcbn0pID0+IChcbiAgPGJ1dHRvblxuICAgIGNzcz17W1xuICAgICAgYmFzZUJ1dHRvblN0eWxlcyxcbiAgICAgIGNzc2BcbiAgICAgICAgaGVpZ2h0OiAke0lDT05fSEVJR0hUfTtcbiAgICAgICAgd2lkdGg6ICR7SUNPTl9XSURUSH07XG4gICAgICAgIGJvcmRlci1yYWRpdXM6ICR7ZGVzaWduVG9rZW5zLmJvcmRlclJhZGl1czZ9O1xuICAgICAgICBib3JkZXI6ICR7aXNGaWxsZWRcbiAgICAgICAgICA/ICdub25lJ1xuICAgICAgICAgIDogYCR7ZGVzaWduVG9rZW5zLmJvcmRlcldpZHRoMX0gc29saWQgJHtkZXNpZ25Ub2tlbnMuY29sb3JOZXV0cmFsfWB9O1xuICAgICAgICBiYWNrZ3JvdW5kOiAke2lzRmlsbGVkID8gSUNPTl9DT0xPUiA6ICdub25lJ307XG4gICAgICAgIHRyYW5zaXRpb246ICR7ZGVzaWduVG9rZW5zLnRyYW5zaXRpb25TdGFuZGFyZH07XG4gICAgICAgIDpob3ZlciB7XG4gICAgICAgICAgYmFja2dyb3VuZDogJHtpc0ZpbGxlZCA/IHVuZGVmaW5lZCA6IElDT05fSE9WRVJfQ09MT1J9O1xuICAgICAgICB9XG4gICAgICAgIDpmb2N1cyB7XG4gICAgICAgICAgYm9yZGVyOiAke2Rlc2lnblRva2Vucy5ib3JkZXJXaWR0aDF9IHNvbGlkICR7SUNPTl9DT0xPUn07XG4gICAgICAgIH1cbiAgICAgIGAsXG4gICAgXX1cbiAgICBvbkNsaWNrPXtvbkNsaWNrfVxuICAgIHsuLi5yZXN0fVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgUGFnaW5hdGlvblNlbGVjdGlvbkJ1dHRvbjtcbiJdfQ== */"],
5835
5721
  onClick: onClick
5836
5722
  }, rest));
5837
5723
  };
@@ -5853,12 +5739,9 @@ const BaseCarousel = _ref2 => {
5853
5739
  _useState2 = _slicedToArray(_useState, 2),
5854
5740
  shuffledItems = _useState2[0],
5855
5741
  setShuffledItems = _useState2[1];
5856
- const _useApplicationContex = applicationShellConnectors.useApplicationContext(context => {
5857
- var _context$project;
5858
- return {
5859
- projectKey: (_context$project = context.project) === null || _context$project === void 0 ? void 0 : _context$project.key
5860
- };
5861
- }),
5742
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(context => ({
5743
+ projectKey: context.project?.key
5744
+ })),
5862
5745
  projectKey = _useApplicationContex.projectKey;
5863
5746
  const handleFilterItemsWhenFlagDisabled = idx => {
5864
5747
  const newItems = _filterInstanceProperty__default["default"](shuffledItems).call(shuffledItems, (_, idx1) => idx !== idx1);
@@ -5886,7 +5769,7 @@ const BaseCarousel = _ref2 => {
5886
5769
  }
5887
5770
  };
5888
5771
  const getLinkTo = activeItem => {
5889
- if (!(activeItem !== null && activeItem !== void 0 && activeItem.linkTo)) return undefined;
5772
+ if (!activeItem?.linkTo) return undefined;
5890
5773
  return activeItem.isExternal ? activeItem.linkTo() : activeItem.linkTo(projectKey);
5891
5774
  };
5892
5775
 
@@ -5898,7 +5781,7 @@ const BaseCarousel = _ref2 => {
5898
5781
  return null;
5899
5782
  }
5900
5783
  return jsxRuntime.jsxs("div", {
5901
- css: /*#__PURE__*/react$1.css("width:", fullWidth ? '100%' : "".concat(CAROUSEL_WIDTH, "px"), ";position:relative;" + (process.env.NODE_ENV === "production" ? "" : ";label:BaseCarousel;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhcm91c2VsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtSGMiLCJmaWxlIjoiY2Fyb3VzZWwudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBSZWFjdEVsZW1lbnQsIHVzZVN0YXRlLCB1c2VFZmZlY3QgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW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wgPyAnX2JsYW5rJyA6ICdfc2VsZid9XG4gICAgICAgICAgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiXG4gICAgICAgID5cbiAgICAgICAgICA8Q2FyZFxuICAgICAgICAgICAgaW5zZXRTY2FsZT17J25vbmUnfVxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge319XG4gICAgICAgICAgICB0eXBlPXtib3JkZXJsZXNzID8gJ2ZsYXQnIDogdW5kZWZpbmVkfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICAgICAgc2Nyb2xsLXNuYXAtdHlwZTogeCBtYW5kYXRvcnk7XG4gICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgICAgcGFkZGluZy1ib3R0b206ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmc2MH07XG4gICAgICAgICAgICAgIGB9XG4gICAgICAgICAgICAgIHJlZj17c2Nyb2xsUmVmfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICB7c2h1ZmZsZWRJdGVtcy5tYXAoKGl0ZW0sIGlkeCkgPT5cbiAgICAgICAgICAgICAgICByZW5kZXJJdGVtKHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeClcbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvQ2FyZD5cbiAgICAgICAgPC9hPlxuICAgICAgKSA6IChcbiAgICAgICAgPENhcmRcbiAgICAgICAgICBpbnNldFNjYWxlPXsnbm9uZSd9XG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge319XG4gICAgICAgICAgdHlwZT17Ym9yZGVybGVzcyA/ICdmbGF0JyA6IHVuZGVmaW5lZH1cbiAgICAgICAgPlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICAgIHNjcm9sbC1zbmFwLXR5cGU6IHggbWFuZGF0b3J5O1xuICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nNjB9O1xuICAgICAgICAgICAgYH1cbiAgICAgICAgICAgIHJlZj17c2Nyb2xsUmVmfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtzaHVmZmxlZEl0ZW1zLm1hcCgoaXRlbSwgaWR4KSA9PlxuICAgICAgICAgICAgICByZW5kZXJJdGVtKHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeClcbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvQ2FyZD5cbiAgICAgICl9XG5cbiAgICAgIDxkaXZcbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgIGJvdHRvbTogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZ019O1xuICAgICAgICAgIGxlZnQ6IDUwJTtcbiAgICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTtcbiAgICAgICAgYH1cbiAgICAgID5cbiAgICAgICAgPGRpdlxuICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgICAgICAgICAgbGVmdDogLTUwJTtcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICR7ZGVzaWduVG9rZW5zLmNvbG9yU3VyZmFjZX07XG4gICAgICAgICAgICBwb2ludGVyLWV2ZW50czogYXV0bztcbiAgICAgICAgICAgIGhlaWdodDogJHtQQUdJTkFUSU9OX0NPTlRST0xfSEVJR0hUfXB4O1xuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogJHtkZXNpZ25Ub2tlbnMuYm9yZGVyUmFkaXVzNH07XG4gICAgICAgICAgICBwYWRkaW5nLWxlZnQ6ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmcyNX07XG4gICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAke2Rlc2lnblRva2Vucy5zcGFjaW5nMjV9O1xuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgICAgICAgYH1cbiAgICAgICAgPlxuICAgICAgICAgIDxTcGFjaW5ncy5JbmxpbmVcbiAgICAgICAgICAgIHNjYWxlPVwibVwiXG4gICAgICAgICAgICBqdXN0aWZ5Q29udGVudD1cImNlbnRlclwiXG4gICAgICAgICAgICBhbGlnbkl0ZW1zPVwiY2VudGVyXCJcbiAgICAgICAgICA+XG4gICAgICAgICAgICA8UGFnaW5hdGlvbkljb25CdXR0b25cbiAgICAgICAgICAgICAgYW5pbWF0aW9uT3JpZW50YXRpb249XCJsZWZ0XCJcbiAgICAgICAgICAgICAgb25DbGljaz17aGFuZGxlUHJldn1cbiAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cImdvIHRvIHByZXZpb3VzIHNsaWRlXCJcbiAgICAgICAgICAgICAgZGF0YS10ZXN0aWQ9XCJnby10by1wcmV2aW91cy1zbGlkZS1idXR0b25cIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVMZWZ0SWNvbiBzaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSWNvbkJ1dHRvbj5cbiAgICAgICAgICAgIHtwYWdlcy5tYXAoKF8sIGkpID0+IChcbiAgICAgICAgICAgICAgPFBhZ2luYXRpb25TZWxlY3Rpb25CdXR0b25cbiAgICAgICAgICAgICAgICBrZXk9e2l9XG4gICAgICAgICAgICAgICAgaXNGaWxsZWQ9e2FjdGl2ZVBhZ2VJbmRleCA9PT0gaX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBnb1RvKGkpfVxuICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9e2BnbyB0byBzbGlkZSAke2kgKyAxfWB9XG4gICAgICAgICAgICAgICAgZGF0YS10ZXN0aWQ9e2Bnby10by1zbGlkZS0ke2kgKyAxfS1idXR0b25gfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKSl9XG4gICAgICAgICAgICA8UGFnaW5hdGlvbkljb25CdXR0b25cbiAgICAgICAgICAgICAgYW5pbWF0aW9uT3JpZW50YXRpb249XCJyaWdodFwiXG4gICAgICAgICAgICAgIG9uQ2xpY2s9e2hhbmRsZU5leHR9XG4gICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJnbyB0byBuZXh0IHNsaWRlXCJcbiAgICAgICAgICAgICAgZGF0YS10ZXN0aWQ9XCJnby10by1uZXh0LXNsaWRlLWJ1dHRvblwiXG4gICAgICAgICAgICA+XG4gICAgICAgICAgICAgIDxBbmdsZVJpZ2h0SWNvbiBzaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSWNvbkJ1dHRvbj5cbiAgICAgICAgICA8L1NwYWNpbmdzLklubGluZT5cbiAgICAgICAgPC9kaXY+XG4gICAgICA8L2Rpdj5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbnR5cGUgQ2Fyb3VzZWxQcm9wcyA9IHtcbiAgaXRlbXM6IENhcm91c2VsSXRlbVtdO1xuICBmdWxsV2lkdGg/OiBib29sZWFuO1xuICBib3JkZXJsZXNzPzogYm9vbGVhbjtcbiAgaGFzUGFkZGluZ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bGV4LXNocmluazogMDtcbiAgICAgICAgc2Nyb2xsLXNuYXAtYWxpZ246IHN0YXJ0O1xuICAgICAgYH1cbiAgICA+XG4gICAgICA8U3BhY2luZ3MuU3RhY2s+XG4gICAgICAgIHtpdGVtLmltZ1NyYyAmJiBpdGVtLmltZ0FsdCAmJiAoXG4gICAgICAgICAgPGltZ1xuICAgICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgICAgICAgICBoZWlnaHQ6ICR7SU1BR0VfQVJFQV9IRUlHSFR9cHg7XG4gICAgICAgICAgICBgfVxuICAgICAgICAgICAgc3JjPXtpdGVtLmltZ1NyY31cbiAgICAgICAgICAgIGFsdD17aW50bC5mb3JtYXRNZXNzYWdlKGl0ZW0uaW1nQWx0KX1cbiAgICAgICAgICAvPlxuICAgICAgICApfVxuICAgICAgICA8ZGl2XG4gICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICBwYWRkaW5nOiAwICR7aGFzUGFkZGluZyA/IGRlc2lnblRva2Vucy5zcGFjaW5nTCA6IDB9IDBcbiAgICAgICAgICAgICAgJHtoYXNQYWRkaW5nID8gZGVzaWduVG9rZW5zLnNwYWNpbmdMIDogMH07XG4gICAgICAgICAgYH1cbiAgICAgICAgPlxuICAgICAgICAgIDxTcGFjaW5ncy5TdGFjayBzY2FsZT1cInhzXCIgYWxpZ25JdGVtcz1cImZsZXgtc3RhcnRcIj5cbiAgICAgICAgICAgIHtpdGVtLnN0YW1wTGFiZWwgJiYgaXRlbS5zdGFtcFRvbmUgJiYgKFxuICAgICAgICAgICAgICA8U3RhbXBcbiAgICAgICAgICAgICAgICB0b25lPXtpdGVtLnN0YW1wVG9uZX1cbiAgICAgICAgICAgICAgICBsYWJlbD17aW50bC5mb3JtYXRNZXNzYWdlKGl0ZW0uc3RhbXBMYWJlbCl9XG4gICAgICAgICAgICAgICAgaXNDb25kZW5zZWQ9eyEhaXRlbT8uaXNTdGFtcENvbmRlbnNlZH1cbiAgICAgICAgICAgICAgLz5cbiAgICAgICAgICAgICl9XG4gICAgICAgICAgICA8VGV4dC5Cb2R5IGludGxNZXNzYWdlPXtpdGVtLnRleHRDb250ZW50fSAvPlxuICAgICAgICAgIDwvU3BhY2luZ3MuU3RhY2s+XG4gICAgICAgIDwvZGl2PlxuICAgICAgPC9TcGFjaW5ncy5TdGFjaz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG5cbmNvbnN0IENhcm91c2VsID0gKHtcbiAgaXRlbXMsXG4gIGZ1bGxXaWR0aCA9IGZhbHNlLFxuICBib3JkZXJsZXNzID0gdHJ1ZSxcbiAgaGFzUGFkZGluZyA9IHRydWUsXG59OiBDYXJvdXNlbFByb3BzKSA9PiB7XG4gIHJldHVybiAoXG4gICAgPEJhc2VDYXJvdXNlbFxuICAgICAgZnVsbFdpZHRoPXtmdWxsV2lkdGh9XG4gICAgICBib3JkZXJsZXNzPXtib3JkZXJsZXNzfVxuICAgICAgaXRlbXM9e2l0ZW1zfVxuICAgICAgcmVuZGVySXRlbT17KHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeCkgPT4gKFxuICAgICAgICA8Q2Fyb3VzZWxDb250ZW50XG4gICAgICAgICAga2V5PXtpdGVtLmlkfVxuICAgICAgICAgIGhhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZD17aGFuZGxlRmlsdGVySXRlbXNXaGVuRmxhZ0Rpc2FibGVkfVxuICAgICAgICAgIGl0ZW09e2l0ZW19XG4gICAgICAgICAgaWR4PXtpZHh9XG4gICAgICAgICAgaGFzUGFkZGluZz17aGFzUGFkZGluZ31cbiAgICAgICAgLz5cbiAgICAgICl9XG4gICAgLz5cbiAgKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IENhcm91c2VsO1xuIl19 */"),
5784
+ css: /*#__PURE__*/react$1.css("width:", fullWidth ? '100%' : `${CAROUSEL_WIDTH}px`, ";position:relative;" + (process.env.NODE_ENV === "production" ? "" : ";label:BaseCarousel;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhcm91c2VsLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtSGMiLCJmaWxlIjoiY2Fyb3VzZWwudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgdHlwZSBSZWFjdEVsZW1lbnQsIHVzZVN0YXRlLCB1c2VFZmZlY3QgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgc2h1ZmZsZSBmcm9tICdsb2Rhc2gvc2h1ZmZsZSc7XG5pbXBvcnQgeyB1c2VJbnRsLCB0eXBlIE1lc3NhZ2VEZXNjcmlwdG9yIH0gZnJvbSAncmVhY3QtaW50bCc7XG5pbXBvcnQgeyB1c2VTbmFwQ2Fyb3VzZWwgfSBmcm9tICdyZWFjdC1zbmFwLWNhcm91c2VsJztcbmltcG9ydCB7IHVzZUZlYXR1cmVUb2dnbGUgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1zaGVsbCc7XG5pbXBvcnQgeyB1c2VBcHBsaWNhdGlvbkNvbnRleHQgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC9hcHBsaWNhdGlvbi1zaGVsbC1jb25uZWN0b3JzJztcbmltcG9ydCB7XG4gIENhcmQsXG4gIFNwYWNpbmdzLFxuICBTdGFtcCxcbiAgVGV4dCxcbiAgQW5nbGVMZWZ0SWNvbixcbiAgQW5nbGVSaWdodEljb24sXG4gIGRlc2lnblRva2Vucyxcbn0gZnJvbSAnQGNvbW1lcmNldG9vbHMtZnJvbnRlbmQvdWkta2l0JztcbmltcG9ydCBQYWdpbmF0aW9uSWNvbk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YWxseVxuICAgICAgICAgIHJlbmRlcmVkIGFzIGEgTGluayBjb21wb25lbnQsIGR1ZSB0byB0aGUgZGlmZmVyZW5jZXMgYmV0d2VlbiBjYXJvdXNlbCBzbGlkZXMgdGhhdFxuICAgICAgICAgIGhhdmUgZXh0ZXJuYWwgbGlua3MgYW5kIHRob3NlIHRoYXQgZG9uJ3QuXG4gICAgICAgKi99XG5cbiAgICAgIHtjdXJyZW50SXRlbS5saW5rVG8gPyAoXG4gICAgICAgIDxhXG4gICAgICAgICAgaHJlZj17Z2V0TGlua1RvKGN1cnJlbnRJdGVtKX1cbiAgICAgICAgICB0YXJnZXQ9e2N1cnJlbnRJdGVtLmlzRXh0ZXJuYWwgPyAnX2JsYW5rJyA6ICdfc2VsZid9XG4gICAgICAgICAgcmVsPVwibm9vcGVuZXIgbm9yZWZlcnJlclwiXG4gICAgICAgID5cbiAgICAgICAgICA8Q2FyZFxuICAgICAgICAgICAgaW5zZXRTY2FsZT17J25vbmUnfVxuICAgICAgICAgICAgb25DbGljaz17KCkgPT4ge319XG4gICAgICAgICAgICB0eXBlPXtib3JkZXJsZXNzID8gJ2ZsYXQnIDogdW5kZWZpbmVkfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICAgICAgc2Nyb2xsLXNuYXAtdHlwZTogeCBtYW5kYXRvcnk7XG4gICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcbiAgICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgICAgcGFkZGluZy1ib3R0b206ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmc2MH07XG4gICAgICAgICAgICAgIGB9XG4gICAgICAgICAgICAgIHJlZj17c2Nyb2xsUmVmfVxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICB7c2h1ZmZsZWRJdGVtcy5tYXAoKGl0ZW0sIGlkeCkgPT5cbiAgICAgICAgICAgICAgICByZW5kZXJJdGVtKHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeClcbiAgICAgICAgICAgICAgKX1cbiAgICAgICAgICAgIDwvZGl2PlxuICAgICAgICAgIDwvQ2FyZD5cbiAgICAgICAgPC9hPlxuICAgICAgKSA6IChcbiAgICAgICAgPENhcmRcbiAgICAgICAgICBpbnNldFNjYWxlPXsnbm9uZSd9XG4gICAgICAgICAgb25DbGljaz17KCkgPT4ge319XG4gICAgICAgICAgdHlwZT17Ym9yZGVybGVzcyA/ICdmbGF0JyA6IHVuZGVmaW5lZH1cbiAgICAgICAgPlxuICAgICAgICAgIDxkaXZcbiAgICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgICAgICAgICAgIHNjcm9sbC1zbmFwLXR5cGU6IHggbWFuZGF0b3J5O1xuICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xuICAgICAgICAgICAgICBtYXJnaW46IDA7XG4gICAgICAgICAgICAgIHBhZGRpbmctYm90dG9tOiAke2Rlc2lnblRva2Vucy5zcGFjaW5nNjB9O1xuICAgICAgICAgICAgYH1cbiAgICAgICAgICAgIHJlZj17c2Nyb2xsUmVmfVxuICAgICAgICAgID5cbiAgICAgICAgICAgIHtzaHVmZmxlZEl0ZW1zLm1hcCgoaXRlbSwgaWR4KSA9PlxuICAgICAgICAgICAgICByZW5kZXJJdGVtKHsgaXRlbSB9LCBoYW5kbGVGaWx0ZXJJdGVtc1doZW5GbGFnRGlzYWJsZWQsIGlkeClcbiAgICAgICAgICAgICl9XG4gICAgICAgICAgPC9kaXY+XG4gICAgICAgIDwvQ2FyZD5cbiAgICAgICl9XG5cbiAgICAgIDxkaXZcbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgICAgICAgIGJvdHRvbTogJHtkZXNpZ25Ub2tlbnMuc3BhY2luZ019O1xuICAgICAgICAgIGxlZnQ6IDUwJTtcbiAgICAgICAgICBwb2ludGVyLWV2ZW50czogbm9uZTtcbiAgICAgICAgYH1cbiAgICAgID5cbiAgICAgICAgPGRpdlxuICAgICAgICAgIGNzcz17Y3NzYFxuICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xuICAgICAgICAgICAgbGVmdDogLTUwJTtcbiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICR7ZGVzaWduVG9rZW5zLmNvbG9yU3VyZmFjZX07XG4gICAgICAgICAgICBwb2ludGVyLWV2ZW50czogYXV0bztcbiAgICAgICAgICAgIGhlaWdodDogJHtQQUdJTkFUSU9OX0NPTlRST0xfSEVJR0hUfXB4O1xuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogJHtkZXNpZ25Ub2tlbnMuYm9yZGVyUmFkaXVzNH07XG4gICAgICAgICAgICBwYWRkaW5nLWxlZnQ6ICR7ZGVzaWduVG9rZW5zLnNwYWNpbmcyNX07XG4gICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAke2Rlc2lnblRva2Vucy5zcGFjaW5nMjV9O1xuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XG4gICAgICAgICAgYH1cbiAgICAgICAgPlxuICAgICAgICAgIDxTcGFjaW5ncy5JbmxpbmVcbiAgICAgICAgICAgIHNjYWxlPVwibVwiXG4gICAgICAgICAgICBqdXN0aWZ5Q29udGVudD1cImNlbnRlclwiXG4gICAgICAgICAgICBhbGlnbkl0ZW1zPVwiY2VudGVyXCJcbiAgICAgICAgICA+XG4gICAgICAgICAgICA8UGFnaW5hdGlvbkljb25CdXR0b25cbiAgICAgICAgICAgICAgYW5pbWF0aW9uT3JpZW50YXRpb249XCJsZWZ0XCJcbiAgICAgICAgICAgICAgb25DbGljaz17aGFuZGxlUHJldn1cbiAgICAgICAgICAgICAgYXJpYS1sYWJlbD1cImdvIHRvIHByZXZpb3VzIHNsaWRlXCJcbiAgICAgICAgICAgICAgZGF0YS10ZXN0aWQ9XCJnby10by1wcmV2aW91cy1zbGlkZS1idXR0b25cIlxuICAgICAgICAgICAgPlxuICAgICAgICAgICAgICA8QW5nbGVMZWZ0SWNvbiBzaXplPVwic21hbGxcIiAvPlxuICAgICAgICAgICAgPC9QYWdpbmF0aW9uSWNvbkJ1dHRvbj5cbiAgICAgICAgICAgIHtwYWdlcy5tYXAoKF8sIGkpID0+IChcbiAgICAgICAgICAgICAgPFBhZ2luYXRpb25TZWxlY3Rpb25CdXR0b25cbiAgICAgICAgICAgICAgICBrZXk9e2l9XG4gICAgICAgICAgICAgICAgaXNGaWxsZWQ9e2FjdGl2ZVBhZ2VJbmRleCA9PT0gaX1cbiAgICAgICAgICAgICAgICBvbkNsaWNrPXsoKSA9PiBnb1RvKGkpfVxuICAgICAgICAgICAgICAgIGFyaWEtbGFiZWw9e2BnbyB0byBzbGlkZSAke2kgKyAxfWB9XG4gICAgICAgICAgICAgICAgZGF0YS10ZXN0aWQ9e2Bnby10by1zbGlkZS0ke2kgKyAxfS1idXR0b25gfVxuICAgICAgICAgICAgICAvPlxuICAgICAgICAgICAgKSl9XG4gICAgICAgICAgICA8UGFnaW5hdGlvbkljb25CdXR0b25cbiAgICAgICAgICAgICAgYW5pbWF0aW9uT3JpZW50YXRpb249XCJyaWdodFwiXG4gICAgICAgICAgICAgIG9uQ2xpY2s9e2hhbmRsZU5leHR9XG4gICAgICAgICAgICAgIGFyaWEtbGFiZWw9XCJnbyB0byBuZXh0IHNsaWRlXCJcbiAgICAgICAgICAgICAgZGF0YS10ZXN0aWQ9XCJnby10by1uZXh0LXNsaWRlLWJ1dHRvblwiXG4gIC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ICAgICAga2V5PXtpdGVtLmlkfVxuICAgICAgICAgIGhhbmRsZUZpbHRlckl0ZW1zV2hlbkZsYWdEaXNhYmxlZD17aGFuZGxlRmlsdGVySXRlbXNXaGVuRmxhZ0Rpc2FibGVkfVxuICAgICAgICAgIGl0ZW09e2l0ZW19XG4gICAgICAgICAgaWR4PXtpZHh9XG4gICAgICAgICAgaGFzUGFkZGluZz17aGFzUGFkZGluZ31cbiAgICAgICAgLz5cbiAgICAgICl9XG4gICAgLz5cbiAgKTtcbn07XG5cbmV4cG9ydCBkZWZhdWx0IENhcm91c2VsO1xuIl19 */"),
5902
5785
  role: "region",
5903
5786
  "aria-roledescription": "carousel",
5904
5787
  "aria-label": "rotunda",
@@ -5948,8 +5831,8 @@ const BaseCarousel = _ref2 => {
5948
5831
  }), _mapInstanceProperty__default["default"](pages).call(pages, (_, i) => jsxRuntime.jsx(PaginationSelectionButton$1, {
5949
5832
  isFilled: activePageIndex === i,
5950
5833
  onClick: () => goTo(i),
5951
- "aria-label": "go to slide ".concat(i + 1),
5952
- "data-testid": "go-to-slide-".concat(i + 1, "-button")
5834
+ "aria-label": `go to slide ${i + 1}`,
5835
+ "data-testid": `go-to-slide-${i + 1}-button`
5953
5836
  }, i)), jsxRuntime.jsx(PaginationIconButton$1, {
5954
5837
  animationOrientation: "right",
5955
5838
  onClick: handleNext,
@@ -5990,7 +5873,7 @@ const CarouselContent = _ref3 => {
5990
5873
  return jsxRuntime.jsx("div", {
5991
5874
  role: "group",
5992
5875
  "aria-roledescription": "slide",
5993
- "aria-label": "slide-".concat(idx + 1),
5876
+ "aria-label": `slide-${idx + 1}`,
5994
5877
  css: _ref$c,
5995
5878
  children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
5996
5879
  children: [item.imgSrc && item.imgAlt && jsxRuntime.jsx("img", {
@@ -6005,7 +5888,7 @@ const CarouselContent = _ref3 => {
6005
5888
  children: [item.stampLabel && item.stampTone && jsxRuntime.jsx(uiKit.Stamp, {
6006
5889
  tone: item.stampTone,
6007
5890
  label: intl.formatMessage(item.stampLabel),
6008
- isCondensed: !!(item !== null && item !== void 0 && item.isStampCondensed)
5891
+ isCondensed: !!item?.isStampCondensed
6009
5892
  }), jsxRuntime.jsx(uiKit.Text.Body, {
6010
5893
  intlMessage: item.textContent
6011
5894
  })]
@@ -6058,26 +5941,26 @@ var messages$E = reactIntl.defineMessages({
6058
5941
  });
6059
5942
 
6060
5943
  function ownKeys$$(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
6061
- function _objectSpread$$(e) { for (var r = 1; r < arguments.length; r++) { var _context4, _context5; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context4 = ownKeys$$(Object(t), !0)).call(_context4, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context5 = ownKeys$$(Object(t))).call(_context5, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
5944
+ function _objectSpread$$(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$$(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$$(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
6062
5945
  const emptyCountryOption = intl => [{
6063
5946
  label: intl.formatMessage(messages$E.countriesAsyncSelectDropdownTypeAheadPrompt),
6064
5947
  value: undefined,
6065
5948
  isDisabled: true
6066
5949
  }];
6067
5950
  function CountriesAsyncSelectDropdown(props) {
6068
- var _context2;
5951
+ var _context6;
6069
5952
  const intl = reactIntl.useIntl();
6070
5953
  const handleLoadOptions = async searchTerm => {
6071
- var _props$options, _props$options2;
6072
- const filteredOptions = (_props$options = props.options) === null || _props$options === void 0 ? void 0 : _filterInstanceProperty__default["default"](_props$options).call(_props$options, country => {
6073
- var _context;
6074
- return _includesInstanceProperty__default["default"](_context = country.label.toLowerCase()).call(_context, searchTerm.toLowerCase());
5954
+ var _context, _context2, _context4, _context5;
5955
+ const filteredOptions = ((_context = props.options) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _filterInstanceProperty__default["default"](_context), _context))?.(country => {
5956
+ var _context3;
5957
+ return _includesInstanceProperty__default["default"](_context3 = country.label.toLowerCase()).call(_context3, searchTerm.toLowerCase());
6075
5958
  });
6076
5959
  if (searchTerm) {
6077
5960
  return _sliceInstanceProperty__default["default"](filteredOptions).call(filteredOptions, 0, props.countriesAsyncLoadingLimit);
6078
5961
  }
6079
5962
  return [{
6080
- options: (_props$options2 = props.options) === null || _props$options2 === void 0 ? void 0 : _sliceInstanceProperty__default["default"](_props$options2).call(_props$options2, 0, props.countriesAsyncLoadingLimit)
5963
+ options: ((_context4 = props.options) == null ? void 0 : _bindInstanceProperty__default["default"](_context5 = Function.call).call(_context5, _sliceInstanceProperty__default["default"](_context4), _context4))?.(0, props.countriesAsyncLoadingLimit)
6081
5964
  }, {
6082
5965
  options: emptyCountryOption(intl)
6083
5966
  }];
@@ -6086,10 +5969,7 @@ function CountriesAsyncSelectDropdown(props) {
6086
5969
  const countries = event.target.value;
6087
5970
  props.onChange({
6088
5971
  target: _objectSpread$$(_objectSpread$$({}, event.target), {}, {
6089
- value: _mapInstanceProperty__default["default"](countries).call(countries, country => {
6090
- var _country$value;
6091
- return (_country$value = country === null || country === void 0 ? void 0 : country.value) !== null && _country$value !== void 0 ? _country$value : country;
6092
- })
5972
+ value: _mapInstanceProperty__default["default"](countries).call(countries, country => country?.value ?? country)
6093
5973
  })
6094
5974
  });
6095
5975
  };
@@ -6102,9 +5982,9 @@ function CountriesAsyncSelectDropdown(props) {
6102
5982
  isMulti: props.isMulti,
6103
5983
  showOptionGroupDivider: true,
6104
5984
  isSearchable: true,
6105
- value: _mapInstanceProperty__default["default"](_context2 = props.value).call(_context2, countryCode => {
6106
- var _context3;
6107
- return _findInstanceProperty__default["default"](_context3 = props.options).call(_context3, country => country.value === countryCode);
5985
+ value: _mapInstanceProperty__default["default"](_context6 = props.value).call(_context6, countryCode => {
5986
+ var _context7;
5987
+ return _findInstanceProperty__default["default"](_context7 = props.options).call(_context7, country => country.value === countryCode);
6108
5988
  }),
6109
5989
  placeholder: intl.formatMessage(messages$E.countriesAsyncSelectPlaceholder),
6110
5990
  loadOptions: handleLoadOptions,
@@ -6142,7 +6022,6 @@ const _excluded$a = ["countriesAsyncLoadingLimit", "isMulti", "isRequired", "has
6142
6022
  function ownKeys$_(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
6143
6023
  function _objectSpread$_(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$_(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$_(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
6144
6024
  function CountriesPicker(_ref) {
6145
- var _props$options;
6146
6025
  let _ref$countriesAsyncLo = _ref.countriesAsyncLoadingLimit,
6147
6026
  countriesAsyncLoadingLimit = _ref$countriesAsyncLo === void 0 ? COUNTRIES_ASYNC_LOADING_LIMIT : _ref$countriesAsyncLo,
6148
6027
  _ref$isMulti = _ref.isMulti,
@@ -6152,7 +6031,7 @@ function CountriesPicker(_ref) {
6152
6031
  _ref$hasWarning = _ref.hasWarning,
6153
6032
  hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
6154
6033
  props = _objectWithoutProperties(_ref, _excluded$a);
6155
- const CustomCountriesPicker = ((_props$options = props.options) === null || _props$options === void 0 ? void 0 : _props$options.length) <= countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
6034
+ const CustomCountriesPicker = props.options?.length <= countriesAsyncLoadingLimit ? CountriesBasicSelectDropdown : CountriesAsyncSelectDropdown;
6156
6035
  return jsxRuntime.jsx(uiKit.Spacings.Stack, {
6157
6036
  children: jsxRuntime.jsx(CustomCountriesPicker, _objectSpread$_({
6158
6037
  countriesAsyncLoadingLimit: countriesAsyncLoadingLimit,
@@ -6180,7 +6059,6 @@ var GetCustomerGroupsQuery = { kind: "Document", definitions: [{ kind: "Operatio
6180
6059
  var GetCustomerGroupQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "GetCustomerGroupQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "id" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "customerGroup" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "id" }, value: { kind: "Variable", name: { kind: "Name", value: "id" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "FragmentSpread", name: { kind: "Name", value: "PickerInputCustomerGroups" }, directives: [] }] } }] } }, { kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputCustomerGroups" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomerGroup" } }, 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: "name" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 406, source: { body: "fragment PickerInputCustomerGroups on CustomerGroup {\n id\n key\n name\n}\n\nquery GetCustomerGroupsQuery($where: String, $sortByNamePath: String!) {\n customerGroups(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputCustomerGroups\n }\n }\n}\n\nquery GetCustomerGroupQuery($id: String) {\n customerGroup(id: $id) {\n ...PickerInputCustomerGroups\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
6181
6060
  var PickerInputCustomerGroups = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "PickerInputCustomerGroups" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CustomerGroup" } }, 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: "name" }, arguments: [], directives: [] }] } }], loc: { start: 0, end: 406, source: { body: "fragment PickerInputCustomerGroups on CustomerGroup {\n id\n key\n name\n}\n\nquery GetCustomerGroupsQuery($where: String, $sortByNamePath: String!) {\n customerGroups(where: $where, sort: [$sortByNamePath, \"key\"], limit: 60) {\n total\n results {\n ...PickerInputCustomerGroups\n }\n }\n}\n\nquery GetCustomerGroupQuery($id: String) {\n customerGroup(id: $id) {\n ...PickerInputCustomerGroups\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
6182
6061
  const CustomerGroupPickerInput = _ref => {
6183
- var _currentOption$data$l, _currentOption$data;
6184
6062
  let isClearable = _ref.isClearable,
6185
6063
  isDisabled = _ref.isDisabled,
6186
6064
  isReadOnly = _ref.isReadOnly,
@@ -6249,13 +6127,13 @@ const CustomerGroupPickerInput = _ref => {
6249
6127
  setLoadingError(null);
6250
6128
  handleInternalInputChange(event);
6251
6129
  }, [handleInternalInputChange]);
6252
- const isCurrentOptionLoadingFailed = Boolean(currentOption === null || currentOption === void 0 ? void 0 : currentOption.error);
6130
+ const isCurrentOptionLoadingFailed = Boolean(currentOption?.error);
6253
6131
  React.useEffect(() => {
6254
6132
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
6255
6133
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
6256
6134
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
6257
6135
  const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$D.noCustomerGroupsFound), [loadingError, formatMessage]);
6258
- const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 || (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
6136
+ const tooltipTitle = currentOption?.data?.label ?? '';
6259
6137
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
6260
6138
  max: "scale",
6261
6139
  children: jsxRuntime.jsxs(uiKit.Spacings.Stack, {
@@ -6265,7 +6143,7 @@ const CustomerGroupPickerInput = _ref => {
6265
6143
  children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
6266
6144
  id: name,
6267
6145
  name: name,
6268
- placeholder: placeholder !== null && placeholder !== void 0 ? placeholder : formatMessage(messages$D.placeholder),
6146
+ placeholder: placeholder ?? formatMessage(messages$D.placeholder),
6269
6147
  loadOptions: loadOptionsDebounced,
6270
6148
  defaultOptions: true,
6271
6149
  showOptionGroupDivider: true,
@@ -6297,7 +6175,14 @@ function Divider(_ref) {
6297
6175
  isDashed = _ref$isDashed === void 0 ? false : _ref$isDashed,
6298
6176
  _ref$orientation = _ref.orientation,
6299
6177
  orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation;
6300
- const dividerStyles = /*#__PURE__*/react$1.css("box-sizing:border-box;margin:0;border:0;border-color:var(--color-neutral-90);border-style:", isDashed ? 'dashed' : 'solid', ";", orientation === 'horizontal' ? "\n width: 100%;\n border-top-width: 1px;\n " : "\n width: 1px;\n height: 2vmax; \n border-left-width: 1px;\n ", ";" + (process.env.NODE_ENV === "production" ? "" : ";label:dividerStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRpdmlkZXIuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU8yQiIsImZpbGUiOiJkaXZpZGVyLmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIERpdmlkZXIoe1xuICBpc0Rhc2hlZCA9IGZhbHNlLFxuICBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcbn0pIHtcbiAgY29uc3QgZGl2aWRlclN0eWxlcyA9IGNzc2BcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgIG1hcmdpbjogMDtcbiAgICBib3JkZXI6IDA7XG4gICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1jb2xvci1uZXV0cmFsLTkwKTtcbiAgICBib3JkZXItc3R5bGU6ICR7aXNEYXNoZWQgPyAnZGFzaGVkJyA6ICdzb2xpZCd9O1xuXG4gICAgJHtvcmllbnRhdGlvbiA9PT0gJ2hvcml6b250YWwnXG4gICAgICA/IGBcbiAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgYm9yZGVyLXRvcC13aWR0aDogMXB4O1xuICAgIGBcbiAgICAgIDogYFxuICAgICAgd2lkdGg6IDFweDtcbiAgICAgIGhlaWdodDogMnZtYXg7IFxuICAgICAgYm9yZGVyLWxlZnQtd2lkdGg6IDFweDtcbiAgICBgfVxuICBgO1xuICByZXR1cm4gPGhyIGNzcz17ZGl2aWRlclN0eWxlc30gLz47XG59XG5EaXZpZGVyLmRpc3BsYXlOYW1lID0gJ0RpdmlkZXInO1xuRGl2aWRlci5wcm9wVHlwZXMgPSB7XG4gIGlzRGFzaGVkOiBQcm9wVHlwZXMuYm9vbCxcbiAgb3JpZW50YXRpb246IFByb3BUeXBlcy5zdHJpbmcsXG59O1xuIl19 */");
6178
+ const dividerStyles = /*#__PURE__*/react$1.css("box-sizing:border-box;margin:0;border:0;border-color:var(--color-neutral-90);border-style:", isDashed ? 'dashed' : 'solid', ";", orientation === 'horizontal' ? `
6179
+ width: 100%;
6180
+ border-top-width: 1px;
6181
+ ` : `
6182
+ width: 1px;
6183
+ height: 2vmax;
6184
+ border-left-width: 1px;
6185
+ `, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:dividerStyles;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImRpdmlkZXIuanN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU8yQiIsImZpbGUiOiJkaXZpZGVyLmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIERpdmlkZXIoe1xuICBpc0Rhc2hlZCA9IGZhbHNlLFxuICBvcmllbnRhdGlvbiA9ICdob3Jpem9udGFsJyxcbn0pIHtcbiAgY29uc3QgZGl2aWRlclN0eWxlcyA9IGNzc2BcbiAgICBib3gtc2l6aW5nOiBib3JkZXItYm94O1xuICAgIG1hcmdpbjogMDtcbiAgICBib3JkZXI6IDA7XG4gICAgYm9yZGVyLWNvbG9yOiB2YXIoLS1jb2xvci1uZXV0cmFsLTkwKTtcbiAgICBib3JkZXItc3R5bGU6ICR7aXNEYXNoZWQgPyAnZGFzaGVkJyA6ICdzb2xpZCd9O1xuXG4gICAgJHtvcmllbnRhdGlvbiA9PT0gJ2hvcml6b250YWwnXG4gICAgICA/IGBcbiAgICAgIHdpZHRoOiAxMDAlO1xuICAgICAgYm9yZGVyLXRvcC13aWR0aDogMXB4O1xuICAgIGBcbiAgICAgIDogYFxuICAgICAgd2lkdGg6IDFweDtcbiAgICAgIGhlaWdodDogMnZtYXg7IFxuICAgICAgYm9yZGVyLWxlZnQtd2lkdGg6IDFweDtcbiAgICBgfVxuICBgO1xuICByZXR1cm4gPGhyIGNzcz17ZGl2aWRlclN0eWxlc30gLz47XG59XG5EaXZpZGVyLmRpc3BsYXlOYW1lID0gJ0RpdmlkZXInO1xuRGl2aWRlci5wcm9wVHlwZXMgPSB7XG4gIGlzRGFzaGVkOiBQcm9wVHlwZXMuYm9vbCxcbiAgb3JpZW50YXRpb246IFByb3BUeXBlcy5zdHJpbmcsXG59O1xuIl19 */");
6301
6186
  return jsxRuntime.jsx("hr", {
6302
6187
  css: dividerStyles
6303
6188
  });
@@ -6370,9 +6255,9 @@ const CustomFieldErrors = props => {
6370
6255
  isFormValid = _useFormikContext.isValid;
6371
6256
  const errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
6372
6257
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
6373
- children: [props.isTouched || !isFormValid && (errors === null || errors === void 0 ? void 0 : errors.missing) && jsxRuntime.jsx(_.ErrorMessage, {
6258
+ children: [props.isTouched || !isFormValid && errors?.missing && jsxRuntime.jsx(_.ErrorMessage, {
6374
6259
  intlMessage: validationMessages.required
6375
- }), props.isTouched || !isFormValid && (errors === null || errors === void 0 ? void 0 : errors.duplicated) && jsxRuntime.jsx(_.ErrorMessage, {
6260
+ }), props.isTouched || !isFormValid && errors?.duplicated && jsxRuntime.jsx(_.ErrorMessage, {
6376
6261
  intlMessage: validationMessages.unique
6377
6262
  })]
6378
6263
  });
@@ -6477,7 +6362,7 @@ const ExpandButton = props => props.totalValues > 1 ? jsxRuntime.jsxs(uiKit.Spac
6477
6362
  }), jsxRuntime.jsx(uiKit.FlatButton, {
6478
6363
  tone: "primary",
6479
6364
  icon: props.isExpanded ? jsxRuntime.jsx(uiKit.AngleUpIcon, {}) : jsxRuntime.jsx(uiKit.AngleDownIcon, {}),
6480
- label: props.isExpanded ? "Hide set items (".concat(props.totalValues, ")") : "Show all set items (".concat(props.totalValues, ")"),
6365
+ label: props.isExpanded ? `Hide set items (${props.totalValues})` : `Show all set items (${props.totalValues})`,
6481
6366
  onClick: props.onExpand
6482
6367
  })]
6483
6368
  }) : null;
@@ -6518,7 +6403,7 @@ SetButtons.displayName = 'SetButtons';
6518
6403
  var SetButtons$1 = SetButtons;
6519
6404
 
6520
6405
  function ownKeys$Y(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
6521
- function _objectSpread$Y(e) { for (var r = 1; r < arguments.length; r++) { var _context3, _context4; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context3 = ownKeys$Y(Object(t), !0)).call(_context3, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context4 = ownKeys$Y(Object(t))).call(_context4, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
6406
+ function _objectSpread$Y(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$Y(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$Y(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
6522
6407
  const getDuplicateErrors = setValues => {
6523
6408
  /* eslint-disable no-plusplus */
6524
6409
  const result = [];
@@ -6558,13 +6443,10 @@ const getItemIndex = name => {
6558
6443
  return _parseInt__default["default"](rawIndex, 10);
6559
6444
  };
6560
6445
  const makeKeys = amount => times__default["default"](amount, () => uuid.v4());
6561
- const makeItemFieldName = (fieldName, index) => {
6562
- var _context;
6563
- return _concatInstanceProperty__default["default"](_context = "".concat(fieldName, ".[")).call(_context, index, "]");
6564
- };
6446
+ const makeItemFieldName = (fieldName, index) => `${fieldName}.[${index}]`;
6565
6447
  const makeMapForAllItems = (fieldName, items, value) => _reduceInstanceProperty__default["default"](items).call(items, (result, item, index) => set__default["default"](result, makeItemFieldName(fieldName, index), value), {});
6566
6448
  function CustomInputSet(props) {
6567
- var _context2;
6449
+ var _context;
6568
6450
  const _useToggleState = uiKit.useToggleState(false),
6569
6451
  _useToggleState2 = _slicedToArray(_useToggleState, 2),
6570
6452
  isExpanded = _useToggleState2[0],
@@ -6586,7 +6468,7 @@ function CustomInputSet(props) {
6586
6468
  _useState4 = _slicedToArray(_useState3, 2),
6587
6469
  keys = _useState4[0],
6588
6470
  setKeys = _useState4[1];
6589
- const totalAmount = internalValue === null || internalValue === void 0 ? void 0 : internalValue.length;
6471
+ const totalAmount = internalValue?.length;
6590
6472
  const amountToRender = isExpanded ? totalAmount : 1;
6591
6473
  const updateInternalValue = newValue => {
6592
6474
  const valueToSet = isEmpty$1(newValue) ? [undefined] : newValue;
@@ -6633,8 +6515,8 @@ function CustomInputSet(props) {
6633
6515
  // in <CustomFieldComponent /> where proper component for given field/attribute
6634
6516
  // type is selected.
6635
6517
  const type = getType(props.fieldDefinition);
6636
- const typeName = type === null || type === void 0 ? void 0 : type.name.toLowerCase();
6637
- const areButtonsTopAligned = _includesInstanceProperty__default["default"](_context2 = [CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.localizedenum, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.string, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.reference]).call(_context2, typeName);
6518
+ const typeName = type?.name.toLowerCase();
6519
+ const areButtonsTopAligned = _includesInstanceProperty__default["default"](_context = [CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.localizedenum, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.string, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.reference]).call(_context, typeName);
6638
6520
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
6639
6521
  children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
6640
6522
  children: jsxRuntime.jsx("label", {
@@ -6753,17 +6635,16 @@ function CustomDateTimeInput(props) {
6753
6635
  CustomDateTimeInput.displayName = 'CustomDateTimeInput';
6754
6636
 
6755
6637
  const convertTypeValuesToOptions$1 = reselect.defaultMemoize(typeValues => _mapInstanceProperty__default["default"](typeValues).call(typeValues, typeValue => ({
6756
- label: typeValue.label || "".concat(typeValue.key, " (key)"),
6638
+ label: typeValue.label || `${typeValue.key} (key)`,
6757
6639
  value: typeValue.key
6758
6640
  })));
6759
6641
  function CustomEnumInput(props) {
6760
- var _options$find$label, _options$find;
6761
6642
  const options = convertTypeValuesToOptions$1(_valuesInstanceProperty__default["default"](props.fieldDefinition.type));
6762
6643
  const handleChange = makeChangeHandler(rawValue => {
6763
6644
  props.setFieldValue(props.name, !rawValue ? undefined : rawValue);
6764
6645
  props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
6765
6646
  });
6766
- const tooltipTitle = props.value ? (_options$find$label = (_options$find = _findInstanceProperty__default["default"](options).call(options, option => option.value === props.value)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : '' : '';
6647
+ const tooltipTitle = props.value ? _findInstanceProperty__default["default"](options).call(options, option => option.value === props.value)?.label ?? '' : '';
6767
6648
  return jsxRuntime.jsx(CustomFieldTooltip$1, {
6768
6649
  title: tooltipTitle,
6769
6650
  children: jsxRuntime.jsx(uiKit.SelectInput, {
@@ -6792,13 +6673,12 @@ const convertTypeValuesToOptions = reselect.defaultMemoize((type, dataLocale, la
6792
6673
  key: 'label',
6793
6674
  locale: dataLocale,
6794
6675
  fallbackOrder: languages,
6795
- fallback: "".concat(value.key, " (key)")
6676
+ fallback: `${value.key} (key)`
6796
6677
  }),
6797
6678
  value: value.key
6798
6679
  }));
6799
6680
  });
6800
6681
  function CustomLocalizedEnumInput(props) {
6801
- var _options$find$label, _options$find;
6802
6682
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
6803
6683
  languages: applicationContext.project.languages,
6804
6684
  dataLocale: applicationContext.dataLocale
@@ -6810,7 +6690,7 @@ function CustomLocalizedEnumInput(props) {
6810
6690
  props.setFieldValue(props.name, rawValue);
6811
6691
  props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
6812
6692
  });
6813
- const tooltipTitle = props.value ? (_options$find$label = (_options$find = _findInstanceProperty__default["default"](options).call(options, option => option.value === props.value)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : '' : '';
6693
+ const tooltipTitle = props.value ? _findInstanceProperty__default["default"](options).call(options, option => option.value === props.value)?.label ?? '' : '';
6814
6694
  return jsxRuntime.jsx(CustomFieldTooltip$1, {
6815
6695
  title: tooltipTitle,
6816
6696
  children: jsxRuntime.jsx(uiKit.SelectInput, {
@@ -6839,7 +6719,6 @@ const getSubfieldLanguage = subfieldName => {
6839
6719
  return subfieldName.substring(lastDotIndex + 1);
6840
6720
  };
6841
6721
  function CustomLocalizedTextInput(props) {
6842
- var _value$language;
6843
6722
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
6844
6723
  language: applicationContext.dataLocale,
6845
6724
  languages: applicationContext.project.languages
@@ -6865,7 +6744,7 @@ function CustomLocalizedTextInput(props) {
6865
6744
  props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
6866
6745
  });
6867
6746
  const InputComponent = isMultiLine ? uiKit.LocalizedMultilineTextInput : uiKit.LocalizedTextInput;
6868
- const tooltipTitle = isMultiLine ? '' : value ? (_value$language = value[language]) !== null && _value$language !== void 0 ? _value$language : '' : '';
6747
+ const tooltipTitle = isMultiLine ? '' : value ? value[language] ?? '' : '';
6869
6748
  return jsxRuntime.jsx(CustomFieldTooltip$1, {
6870
6749
  title: tooltipTitle,
6871
6750
  children: jsxRuntime.jsx(InputComponent, {
@@ -6913,7 +6792,7 @@ const fixAmount = value => {
6913
6792
  // data user just entered effectively preventing full data from being entered.
6914
6793
  const fixEnteredValue = (newValue, initialValue, currencies) => {
6915
6794
  const withFixedCurrency = fixCurrencyCode(newValue, currencies);
6916
- if (!(initialValue !== null && initialValue !== void 0 && initialValue.amount)) {
6795
+ if (!initialValue?.amount) {
6917
6796
  return fixAmount(withFixedCurrency);
6918
6797
  }
6919
6798
  return withFixedCurrency;
@@ -6985,22 +6864,22 @@ function CustomMoneyInput(props) {
6985
6864
  CustomMoneyInput.displayName = 'CustomMoneyInput';
6986
6865
 
6987
6866
  function ownKeys$V(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; }
6988
- function _objectSpread$V(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$V(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$V(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
6867
+ function _objectSpread$V(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$V(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$V(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
6989
6868
  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 } } } };
6990
6869
  const mapAttributeDefinition = definition => {
6991
- var _context, _definition$type, _context2, _context3, _definition$type2, _context4;
6870
+ var _context, _context2, _context3, _context4;
6992
6871
  return _objectSpread$V(_objectSpread$V({}, definition), {}, {
6993
6872
  required: definition.isRequired,
6994
6873
  inputTip: l10n.transformLocalizedFieldToLocalizedString(definition.inputTipAllLocales),
6995
6874
  label: l10n.transformLocalizedFieldToLocalizedString(definition.labelAllLocales),
6996
- type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, (_definition$type = definition.type) === null || _definition$type === void 0 || (_definition$type = _definition$type.elementType) === null || _definition$type === void 0 ? void 0 : _definition$type.name) ? _objectSpread$V(_objectSpread$V({}, definition.type), {}, {
6875
+ type: _includesInstanceProperty__default["default"](_context = ['enum', 'lenum']).call(_context, definition.type?.elementType?.name) ? _objectSpread$V(_objectSpread$V({}, definition.type), {}, {
6997
6876
  elementType: _objectSpread$V(_objectSpread$V({}, definition.type.elementType), {}, {
6998
6877
  values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](definition.type.elementType).results).call(_context2, value => ({
6999
6878
  key: value.key,
7000
6879
  label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
7001
6880
  }))
7002
6881
  })
7003
- }) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, (_definition$type2 = definition.type) === null || _definition$type2 === void 0 ? void 0 : _definition$type2.name) ? _objectSpread$V(_objectSpread$V({}, definition.type), {}, {
6882
+ }) : _includesInstanceProperty__default["default"](_context3 = ['enum', 'lenum']).call(_context3, definition.type?.name) ? _objectSpread$V(_objectSpread$V({}, definition.type), {}, {
7004
6883
  values: _mapInstanceProperty__default["default"](_context4 = _valuesInstanceProperty__default["default"](definition.type).results).call(_context4, value => ({
7005
6884
  key: value.key,
7006
6885
  label: value.label || l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
@@ -7024,8 +6903,8 @@ function useNestedProductType(fieldDefinition) {
7024
6903
  loading = _useQuery.loading,
7025
6904
  error = _useQuery.error;
7026
6905
  if (!loading && !error) {
7027
- var _data$productType, _context5;
7028
- const attributeDefinitions = (_data$productType = data.productType) === null || _data$productType === void 0 ? void 0 : _mapInstanceProperty__default["default"](_context5 = _data$productType.attributeDefinitions.results).call(_context5, mapAttributeDefinition);
6906
+ var _context5, _context6, _context7;
6907
+ 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);
7029
6908
  return {
7030
6909
  loading: false,
7031
6910
  error: false,
@@ -7341,8 +7220,7 @@ CustomNestedInput.displayName = 'CustomNestedInput';
7341
7220
  var CustomNestedInput$1 = CustomNestedInput;
7342
7221
 
7343
7222
  function CustomNumberInput(props) {
7344
- var _props$value;
7345
- const value = (_props$value = props.value) !== null && _props$value !== void 0 ? _props$value : '';
7223
+ const value = props.value ?? '';
7346
7224
  const handleChange = makeChangeHandler(rawValue => {
7347
7225
  props.setFieldValue(props.name, !rawValue ? undefined : Number(rawValue));
7348
7226
  props.renderWarnings && props.handleWarningChange(props.name, props.fieldDefinition, rawValue);
@@ -7416,8 +7294,7 @@ function CustomCategoryReferenceInput(props) {
7416
7294
  CustomCategoryReferenceInput.displayName = 'CustomCategoryReferenceInput';
7417
7295
 
7418
7296
  function CustomChannelReferenceInput(props) {
7419
- var _props$value;
7420
- const value = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.id) || '';
7297
+ const value = props.value?.id || '';
7421
7298
  return jsxRuntime.jsx(ChannelPickerInput$1, {
7422
7299
  value: value,
7423
7300
  name: props.name,
@@ -7453,7 +7330,6 @@ const DropdownIndicator = () => jsxRuntime.jsx(uiKit.SearchIcon, {
7453
7330
  });
7454
7331
  DropdownIndicator.displayName = 'DropdownIndicator';
7455
7332
  const ProductPickerInput = _ref => {
7456
- var _currentOption$data$l, _currentOption$data;
7457
7333
  let isClearable = _ref.isClearable,
7458
7334
  isDisabled = _ref.isDisabled,
7459
7335
  isReadOnly = _ref.isReadOnly,
@@ -7474,20 +7350,19 @@ const ProductPickerInput = _ref => {
7474
7350
  loadingError = _useState2[0],
7475
7351
  setLoadingError = _useState2[1];
7476
7352
  const convertProductToOption = React.useCallback(product => {
7477
- var _masterData$current;
7478
7353
  if (!product) return null;
7479
7354
  const id = product.id,
7480
7355
  key = product.key,
7481
7356
  masterData = product.masterData;
7482
- const localizedName = formatLocalizedFieldToString((_masterData$current = masterData.current) === null || _masterData$current === void 0 ? void 0 : _masterData$current.nameAllLocales);
7357
+ const localizedName = formatLocalizedFieldToString(masterData.current?.nameAllLocales);
7483
7358
  return {
7484
- label: localizedName + (key ? " (key: ".concat(key, ")") : ''),
7359
+ label: localizedName + (key ? ` (key: ${key})` : ''),
7485
7360
  value: id,
7486
7361
  name: localizedName,
7487
7362
  key
7488
7363
  };
7489
7364
  }, [formatLocalizedFieldToString]);
7490
- const prefixSearchFields = React.useMemo(() => ["masterData.current.name.".concat(dataLocale), 'key'], [dataLocale]);
7365
+ const prefixSearchFields = React.useMemo(() => [`masterData.current.name.${dataLocale}`, 'key'], [dataLocale]);
7491
7366
  const loadOptions = useLoadOptions$1({
7492
7367
  query: GetProductsQuery,
7493
7368
  prefixSearchFields
@@ -7518,12 +7393,12 @@ const ProductPickerInput = _ref => {
7518
7393
  setLoadingError(null);
7519
7394
  handleInternalInputChange(event);
7520
7395
  }, [handleInternalInputChange]);
7521
- const isCurrentOptionLoadingFailed = Boolean(currentOption === null || currentOption === void 0 ? void 0 : currentOption.error);
7396
+ const isCurrentOptionLoadingFailed = Boolean(currentOption?.error);
7522
7397
  React.useEffect(() => {
7523
7398
  if (isCurrentOptionLoadingFailed) onError(currentOption.error);
7524
7399
  }, [isCurrentOptionLoadingFailed, onError, currentOption]);
7525
7400
  const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
7526
- const tooltipTitle = (_currentOption$data$l = currentOption === null || currentOption === void 0 || (_currentOption$data = currentOption.data) === null || _currentOption$data === void 0 ? void 0 : _currentOption$data.label) !== null && _currentOption$data$l !== void 0 ? _currentOption$data$l : '';
7401
+ const tooltipTitle = currentOption?.data?.label ?? '';
7527
7402
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
7528
7403
  max: "scale",
7529
7404
  children: currentOption.loading ? jsxRuntime.jsx(CenteredLoadingSpinner$1, {}) : jsxRuntime.jsxs(uiKit.Spacings.Stack, {
@@ -7564,8 +7439,7 @@ ProductPickerInput.displayName = 'ProductPickerInput';
7564
7439
  var ProductPickerInput$1 = ProductPickerInput;
7565
7440
 
7566
7441
  function CustomProductReferenceInput(props) {
7567
- var _props$value;
7568
- const value = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.id) || '';
7442
+ const value = props.value?.id || '';
7569
7443
  return jsxRuntime.jsx(ProductPickerInput$1, {
7570
7444
  value: value,
7571
7445
  name: props.name,
@@ -7583,8 +7457,7 @@ function CustomProductReferenceInput(props) {
7583
7457
  CustomProductReferenceInput.displayName = 'CustomProductReferenceInput';
7584
7458
 
7585
7459
  function CustomProductTypeReferenceInput(props) {
7586
- var _props$value;
7587
- const value = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.id) || '';
7460
+ const value = props.value?.id || '';
7588
7461
  return jsxRuntime.jsx(ProductTypePickerInput$1, {
7589
7462
  value: value,
7590
7463
  name: props.name,
@@ -7601,8 +7474,7 @@ function CustomProductTypeReferenceInput(props) {
7601
7474
  CustomProductTypeReferenceInput.displayName = 'CustomProductTypeReferenceInput';
7602
7475
 
7603
7476
  function CustomRawIdReferenceInput(props) {
7604
- var _props$value;
7605
- const value = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.id) || '';
7477
+ const value = props.value?.id || '';
7606
7478
  return jsxRuntime.jsx(CustomFieldTooltip$1, {
7607
7479
  title: value,
7608
7480
  children: jsxRuntime.jsx(uiKit.TextInput, {
@@ -7620,8 +7492,7 @@ function CustomRawIdReferenceInput(props) {
7620
7492
  CustomRawIdReferenceInput.displayName = 'CustomRawIdReferenceInput';
7621
7493
 
7622
7494
  function CustomStateReferenceInput(props) {
7623
- var _props$value;
7624
- const value = ((_props$value = props.value) === null || _props$value === void 0 ? void 0 : _props$value.id) || '';
7495
+ const value = props.value?.id || '';
7625
7496
  return jsxRuntime.jsx(StatePickerInput$1, {
7626
7497
  value: value,
7627
7498
  name: props.name,
@@ -7759,14 +7630,12 @@ const nonSetComponents = {
7759
7630
  };
7760
7631
  const CustomFieldInput = /*#__PURE__*/React.memo(props => {
7761
7632
  const InputComponent = React.useMemo(() => {
7762
- var _props$fieldDefinitio;
7763
- const typeName = (_props$fieldDefinitio = props.fieldDefinition.type) === null || _props$fieldDefinitio === void 0 ? void 0 : _props$fieldDefinitio.name.toLowerCase();
7633
+ const typeName = props.fieldDefinition.type?.name.toLowerCase();
7764
7634
  if (typeName === 'set') {
7765
- var _getSetElementType;
7766
7635
  // Boolean is the only set element with peculiarities (i.e. way more
7767
7636
  // convenient for user to work with it as with select input with three values:
7768
7637
  // [true], [false] and [true, false]).
7769
- if (((_getSetElementType = getType(props.fieldDefinition)) === null || _getSetElementType === void 0 ? void 0 : _getSetElementType.name.toLowerCase()) === CUSTOM_FIELD_TYPES.boolean) {
7638
+ if (getType(props.fieldDefinition)?.name.toLowerCase() === CUSTOM_FIELD_TYPES.boolean) {
7770
7639
  return CustomBooleanInputSet;
7771
7640
  }
7772
7641
  // All the rest sets are just a fancy wrapper around single-item components
@@ -7796,12 +7665,11 @@ var CustomFieldInput$1 = CustomFieldInput;
7796
7665
  const DEFAULT_LENGTH = 50;
7797
7666
  const DEFAULT_END = '...';
7798
7667
  function truncate (text) {
7799
- var _context;
7800
7668
  let length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : DEFAULT_LENGTH;
7801
7669
  let end = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : DEFAULT_END;
7802
7670
  if (!text) return '';
7803
7671
  if (text.length < length) return text;
7804
- return _concatInstanceProperty__default["default"](_context = "".concat(text.substring(0, length))).call(_context, end);
7672
+ return `${text.substring(0, length)}${end}`;
7805
7673
  }
7806
7674
 
7807
7675
  var messages$y = reactIntl.defineMessages({
@@ -7847,10 +7715,9 @@ function _objectSpread$T(e) { for (var r = 1; r < arguments.length; r++) { var _
7847
7715
  function _EMOTION_STRINGIFIED_CSS_ERROR__$9() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
7848
7716
  var CartDiscountsCount = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "CartDiscountsCount" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 61, source: { body: "query CartDiscountsCount {\n cartDiscounts {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
7849
7717
  const CustomFieldsLabelHint = _ref2 => {
7850
- var _type$name;
7851
7718
  let fieldDefinition = _ref2.fieldDefinition;
7852
7719
  const type = getType(fieldDefinition);
7853
- const isReference = ((_type$name = type.name) === null || _type$name === void 0 ? void 0 : _type$name.toLowerCase()) === 'reference';
7720
+ const isReference = type.name?.toLowerCase() === 'reference';
7854
7721
  const referenceTypeId = type.referenceTypeId;
7855
7722
  const isCartDiscountsReference = isReference && referenceTypeId === SEARCHABLE_REFERENCES.cartDiscount;
7856
7723
  const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
@@ -7868,7 +7735,7 @@ const CustomFieldsLabelHint = _ref2 => {
7868
7735
  data = _useQuery.data,
7869
7736
  loading = _useQuery.loading;
7870
7737
  if (loading) return null;
7871
- if ((data === null || data === void 0 ? void 0 : data.cartDiscounts.total) > QUERY_MAX_LIMIT) {
7738
+ if (data?.cartDiscounts.total > QUERY_MAX_LIMIT) {
7872
7739
  return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
7873
7740
  alignItems: "center",
7874
7741
  children: [jsxRuntime.jsx(uiKit.WarningIcon, {
@@ -7895,12 +7762,12 @@ function CustomFieldsProductTypeReferenceSubtitle() {
7895
7762
  // TODO(pa3): this logic may be misplaced and probably
7896
7763
  // should belong to <CustomReferenceInput /> component instead.
7897
7764
  function CustomFieldsLabelSubtitle(_ref3) {
7898
- var _type$name2, _context;
7765
+ var _context;
7899
7766
  let fieldDefinition = _ref3.fieldDefinition;
7900
7767
  const _useIntl2 = reactIntl.useIntl(),
7901
7768
  formatMessage = _useIntl2.formatMessage;
7902
7769
  const type = getType(fieldDefinition);
7903
- const isReference = ((_type$name2 = type.name) === null || _type$name2 === void 0 ? void 0 : _type$name2.toLowerCase()) === 'reference';
7770
+ const isReference = type.name?.toLowerCase() === 'reference';
7904
7771
  if (!isReference) return null;
7905
7772
  const referenceTypeId = type.referenceTypeId;
7906
7773
  const referenceTypeName = capitalizeFirst(referenceTypeId);
@@ -7914,7 +7781,7 @@ function CustomFieldsLabelSubtitle(_ref3) {
7914
7781
  } else if (referenceTypeId === SEARCHABLE_REFERENCES.state) {
7915
7782
  return formatMessage(messages$y.stateReferenceLabel);
7916
7783
  } else {
7917
- return "".concat(referenceTypeName, " ID");
7784
+ return `${referenceTypeName} ID`;
7918
7785
  }
7919
7786
  }
7920
7787
  const Portal = props => /*#__PURE__*/ReactDOM__default["default"].createPortal(props.children, document.body);
@@ -7931,7 +7798,7 @@ function CustomFieldsCountIndicator(_ref4) {
7931
7798
  const formatLocalizedField = useFormatLocalizedFieldToString();
7932
7799
  const _useIntl3 = reactIntl.useIntl(),
7933
7800
  formatMessage = _useIntl3.formatMessage;
7934
- return (assignedAttributeGroups === null || assignedAttributeGroups === void 0 ? void 0 : assignedAttributeGroups.length) > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
7801
+ return assignedAttributeGroups?.length > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
7935
7802
  title: formatMessage(messages$y.attributeGroupCountTooltip, {
7936
7803
  attributeGroups: _mapInstanceProperty__default["default"](assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
7937
7804
  count: assignedAttributeGroups.length
@@ -8198,17 +8065,15 @@ const useDnDContext = () => {
8198
8065
 
8199
8066
  const _excluded$9 = ["renderCustomWarnings", "WrapperComponent"];
8200
8067
  function ownKeys$N(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; }
8201
- function _objectSpread$N(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$N(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$N(Object(t))).call(_context0, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
8068
+ function _objectSpread$N(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$N(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$N(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
8202
8069
  const ENABLED_FALLBACK_ATTRIBUTE_TYPES = [CUSTOM_FIELD_TYPES.enum, CUSTOM_FIELD_TYPES.lenum, CUSTOM_FIELD_TYPES.number, CUSTOM_FIELD_TYPES.text, CUSTOM_FIELD_TYPES.boolean, CUSTOM_FIELD_TYPES.money, CUSTOM_FIELD_TYPES.datetime, CUSTOM_FIELD_TYPES.date, CUSTOM_FIELD_TYPES.reference, CUSTOM_FIELD_TYPES.time, CUSTOM_FIELD_TYPES.set];
8203
8070
  const getFieldName = (parentName, fieldName) => {
8204
- var _context;
8205
8071
  if (!parentName) return fieldName;
8206
- return _concatInstanceProperty__default["default"](_context = "".concat(parentName, ".")).call(_context, fieldName);
8072
+ return `${parentName}.${fieldName}`;
8207
8073
  };
8208
8074
  const isAttributeType = function () {
8209
- var _fieldDefinitionType$;
8210
8075
  let fieldDefinitionType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
8211
- return _includesInstanceProperty__default["default"](ATTRIBUTE_TYPES).call(ATTRIBUTE_TYPES, fieldDefinitionType.name) || fieldDefinitionType.name === 'set' && _includesInstanceProperty__default["default"](SET_ATTRIBUTE_TYPES).call(SET_ATTRIBUTE_TYPES, fieldDefinitionType === null || fieldDefinitionType === void 0 || (_fieldDefinitionType$ = fieldDefinitionType.elementType) === null || _fieldDefinitionType$ === void 0 ? void 0 : _fieldDefinitionType$.name);
8076
+ return _includesInstanceProperty__default["default"](ATTRIBUTE_TYPES).call(ATTRIBUTE_TYPES, fieldDefinitionType.name) || fieldDefinitionType.name === 'set' && _includesInstanceProperty__default["default"](SET_ATTRIBUTE_TYPES).call(SET_ATTRIBUTE_TYPES, fieldDefinitionType?.elementType?.name);
8212
8077
  };
8213
8078
  const isNested = fieldDefinition => {
8214
8079
  const type = fieldDefinition.type;
@@ -8249,11 +8114,11 @@ const CustomFieldsInternal = _ref => {
8249
8114
  return jsxRuntime.jsx(DroppableWrapper, {
8250
8115
  onDragEnd: onDragEnd,
8251
8116
  children: _mapInstanceProperty__default["default"](fieldDefinitions).call(fieldDefinitions, (fieldDefinition, index) => {
8252
- var _context2, _context3, _context4, _context5, _context6;
8117
+ var _context;
8253
8118
  const fieldName = getFieldName(props.name, fieldDefinition.name);
8254
8119
  const isTouched = Boolean(formik.getIn(touched, fieldName));
8255
8120
  const isFieldDisabled = props.isDisabled && !isAttributeType(fieldDefinition.type);
8256
- const shouldUseAdditionalInfoProp = _includesInstanceProperty__default["default"](_context2 = [CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.localizedenum]).call(_context2, fieldDefinition.type.name);
8121
+ const shouldUseAdditionalInfoProp = _includesInstanceProperty__default["default"](_context = [CUSTOM_FIELD_TYPES.ltext, CUSTOM_FIELD_TYPES.localizedstring, CUSTOM_FIELD_TYPES.localizedenum]).call(_context, fieldDefinition.type.name);
8257
8122
  const shouldDisplayFallbackRow = !shouldUseAdditionalInfoProp && _includesInstanceProperty__default["default"](ENABLED_FALLBACK_ATTRIBUTE_TYPES).call(ENABLED_FALLBACK_ATTRIBUTE_TYPES, fieldDefinition.type.name);
8258
8123
  const fieldErrors = formik.getIn(errors, fieldName);
8259
8124
  const value = props.inputValuesConverter(fieldName, formik.getIn(values, fieldName));
@@ -8277,51 +8142,48 @@ const CustomFieldsInternal = _ref => {
8277
8142
  onBlur: handleBlur,
8278
8143
  setFieldValue: props.setFieldValue,
8279
8144
  hasError: hasError,
8280
- hasWarning: props.renderWarnings && (status === null || status === void 0 ? void 0 : status.warnings[fieldName]),
8145
+ hasWarning: props.renderWarnings && status?.warnings[fieldName],
8281
8146
  handleWarningChange: props.handleWarningChange,
8282
8147
  renderWarnings: props.renderWarnings,
8283
- additionalInfo: shouldUseAdditionalInfoProp && props !== null && props !== void 0 && props.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
8148
+ additionalInfo: shouldUseAdditionalInfoProp && props?.additionalInfoHandler ? props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) : undefined
8284
8149
  };
8285
8150
  const Field = jsxRuntime.jsx(FieldComponent, _objectSpread$N({}, fieldProps));
8286
8151
  // the several values inside the key are needed to make sure the field is re-rendered when those values change
8287
8152
  return jsxRuntime.jsx(formik.FastField, {
8288
8153
  name: fieldName,
8289
8154
  validate: validate,
8290
- children: () => {
8291
- var _context7, _context8;
8292
- return jsxRuntime.jsx(DraggableWrapper, {
8293
- draggableKey: _concatInstanceProperty__default["default"](_context7 = "".concat(fieldName, "-")).call(_context7, index),
8294
- draggableId: _concatInstanceProperty__default["default"](_context8 = "".concat(fieldName, "-")).call(_context8, index),
8295
- index: index,
8296
- children: jsxRuntime.jsx(uiKit.Spacings.Stack, {
8297
- scale: "xs",
8298
- children: jsxRuntime.jsxs("div", {
8299
- "aria-invalid": _Object$keys__default["default"](fieldErrors !== null && fieldErrors !== void 0 ? fieldErrors : {}).length > 0,
8300
- "aria-errormessage": "".concat(fieldName, "-error"),
8301
- id: "".concat(fieldName, "-error"),
8302
- children: [jsxRuntime.jsx(CustomFieldsLabel$1, {
8303
- name: fieldName,
8304
- fieldDefinition: fieldDefinition
8305
- }), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
8306
- scale: "xs",
8307
- alignItems: "stretch",
8308
- children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
8309
- children: Field
8310
- }) : Field, shouldDisplayFallbackRow && props.additionalInfoHandler && jsxRuntime.jsx(uiKit.Text.Wrap, {
8311
- children: jsxRuntime.jsx(uiKit.Text.Detail, {
8312
- tone: "tertiary",
8313
- children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) || ''
8314
- })
8315
- }), props.renderWarnings && (status === null || status === void 0 ? void 0 : status.warnings[fieldName]) && renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
8316
- isTouched: isTouched,
8317
- errors: fieldErrors
8318
- })]
8155
+ children: () => jsxRuntime.jsx(DraggableWrapper, {
8156
+ draggableKey: `${fieldName}-${index}`,
8157
+ draggableId: `${fieldName}-${index}`,
8158
+ index: index,
8159
+ children: jsxRuntime.jsx(uiKit.Spacings.Stack, {
8160
+ scale: "xs",
8161
+ children: jsxRuntime.jsxs("div", {
8162
+ "aria-invalid": _Object$keys__default["default"](fieldErrors ?? {}).length > 0,
8163
+ "aria-errormessage": `${fieldName}-error`,
8164
+ id: `${fieldName}-error`,
8165
+ children: [jsxRuntime.jsx(CustomFieldsLabel$1, {
8166
+ name: fieldName,
8167
+ fieldDefinition: fieldDefinition
8168
+ }), jsxRuntime.jsxs(uiKit.Spacings.Stack, {
8169
+ scale: "xs",
8170
+ alignItems: "stretch",
8171
+ children: [WrapperComponent ? jsxRuntime.jsx(WrapperComponent, {
8172
+ children: Field
8173
+ }) : Field, shouldDisplayFallbackRow && props.additionalInfoHandler && jsxRuntime.jsx(uiKit.Text.Wrap, {
8174
+ children: jsxRuntime.jsx(uiKit.Text.Detail, {
8175
+ tone: "tertiary",
8176
+ children: props.additionalInfoHandler(fieldDefinition, locale, timeZone, userLocale) || ''
8177
+ })
8178
+ }), props.renderWarnings && status?.warnings[fieldName] && renderCustomWarnings(fieldDefinition), jsxRuntime.jsx(CustomFieldErrors$1, {
8179
+ isTouched: isTouched,
8180
+ errors: fieldErrors
8319
8181
  })]
8320
- })
8182
+ })]
8321
8183
  })
8322
- });
8323
- }
8324
- }, _concatInstanceProperty__default["default"](_context3 = _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = _concatInstanceProperty__default["default"](_context6 = "".concat(fieldName, "-")).call(_context6, index, "-")).call(_context5, fieldKey, "-")).call(_context4, locale, "-")).call(_context3, userLocale));
8184
+ })
8185
+ })
8186
+ }, `${fieldName}-${index}-${fieldKey}-${locale}-${userLocale}`);
8325
8187
  })
8326
8188
  });
8327
8189
  };
@@ -8332,9 +8194,9 @@ function ownKeys$M(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
8332
8194
  function _objectSpread$M(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$M(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$M(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
8333
8195
  const getTypeName = type => type.name.toLowerCase();
8334
8196
  const findLabel = (enumType, key) => {
8335
- var _enumType$values$find, _enumType$values$find2, _context;
8197
+ var _context;
8336
8198
  const emptyValue = getTypeName(enumType) === 'enum' ? '' : {};
8337
- return (_enumType$values$find = (_enumType$values$find2 = _findInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](enumType)).call(_context, value => value.key === key)) === null || _enumType$values$find2 === void 0 ? void 0 : _enumType$values$find2.label) !== null && _enumType$values$find !== void 0 ? _enumType$values$find : emptyValue;
8199
+ return _findInstanceProperty__default["default"](_context = _valuesInstanceProperty__default["default"](enumType)).call(_context, value => value.key === key)?.label ?? emptyValue;
8338
8200
  };
8339
8201
  const convertEnumValues = (value, attributeDefinition) => {
8340
8202
  var _context2, _context3;
@@ -8400,7 +8262,7 @@ const attributesMapToNameValuePairs = map => {
8400
8262
  const _excluded$8 = ["WrapperComponent"];
8401
8263
  const getAttributeShortName = (fullName, attributesPrefix) => {
8402
8264
  if (!attributesPrefix) return fullName;
8403
- return fullName.replace("".concat(attributesPrefix, "."), '');
8265
+ return fullName.replace(`${attributesPrefix}.`, '');
8404
8266
  };
8405
8267
  function ProductAttributes(_ref) {
8406
8268
  let WrapperComponent = _ref.WrapperComponent,
@@ -8499,7 +8361,7 @@ var pickerMessages = reactIntl.defineMessages({
8499
8361
  });
8500
8362
 
8501
8363
  function ownKeys$L(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; }
8502
- function _objectSpread$L(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$L(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$L(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
8364
+ function _objectSpread$L(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$L(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$L(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
8503
8365
  const PRODUCT_SELECTION_MODES = {
8504
8366
  INCLUSION: 'Individual',
8505
8367
  EXCLUSION: 'IndividualExclusion'
@@ -8510,11 +8372,10 @@ const PRODUCT_SELECTION_MODES_LABELS = {
8510
8372
  };
8511
8373
  const getMode = mode => mode === PRODUCT_SELECTION_MODES.INCLUSION || mode === PRODUCT_SELECTION_MODES_LABELS.INCLUSION ? 'inclusion' : 'exclusion';
8512
8374
  const addModeToLabel = function (ps) {
8513
- var _context;
8514
8375
  let enableExcludingProducts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
8515
8376
  if (!ps) return undefined;
8516
8377
  return _objectSpread$L(_objectSpread$L({}, ps), {}, {
8517
- label: _concatInstanceProperty__default["default"](_context = "".concat(ps === null || ps === void 0 ? void 0 : ps.label)).call(_context, enableExcludingProducts ? " (type: ".concat(getMode(ps === null || ps === void 0 ? void 0 : ps.mode), ")") : '')
8378
+ label: `${ps?.label}${enableExcludingProducts ? ` (type: ${getMode(ps?.mode)})` : ''}`
8518
8379
  });
8519
8380
  };
8520
8381
 
@@ -8531,7 +8392,10 @@ const getValueFromOptions$3 = _ref => {
8531
8392
  // handle async-select-field value transformation
8532
8393
  if (isMulti) {
8533
8394
  var _context;
8534
- return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => currentlySelectedProductSelections === null || currentlySelectedProductSelections === void 0 ? void 0 : _includesInstanceProperty__default["default"](currentlySelectedProductSelections).call(currentlySelectedProductSelections, ps.value))).call(_context, ps => addModeToLabel(ps, enableExcludingProducts));
8395
+ return _mapInstanceProperty__default["default"](_context = _filterInstanceProperty__default["default"](allProductSelectionOptions).call(allProductSelectionOptions, ps => {
8396
+ var _context2, _context3;
8397
+ return ((_context2 = currentlySelectedProductSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _includesInstanceProperty__default["default"](_context2), _context2))?.(ps.value);
8398
+ })).call(_context, ps => addModeToLabel(ps, enableExcludingProducts));
8535
8399
  }
8536
8400
 
8537
8401
  // in case it is not multiselect, then a single valued async-select-input is being requested and the value should have proper format
@@ -8543,7 +8407,6 @@ const emptyStoreOption$1 = intl => [{
8543
8407
  isDisabled: true
8544
8408
  }];
8545
8409
  function ProductSelectionsAsyncSelectDropdown(props) {
8546
- var _productSelectionsFet3;
8547
8410
  const intl = reactIntl.useIntl();
8548
8411
  const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
8549
8412
  const productSelectionsFetcher = useProductSelectionsFetcher$1({
@@ -8557,17 +8420,13 @@ function ProductSelectionsAsyncSelectDropdown(props) {
8557
8420
  })),
8558
8421
  projectLanguages = _useApplicationContex.projectLanguages,
8559
8422
  dataLocale = _useApplicationContex.dataLocale;
8560
- const productSelections = React.useMemo(() => {
8561
- var _productSelectionsFet, _productSelectionsFet2;
8562
- return (_productSelectionsFet = (_productSelectionsFet2 = productSelectionsFetcher.productSelections) === null || _productSelectionsFet2 === void 0 ? void 0 : _productSelectionsFet2.results) !== null && _productSelectionsFet !== void 0 ? _productSelectionsFet : [];
8563
- }, [(_productSelectionsFet3 = productSelectionsFetcher.productSelections) === null || _productSelectionsFet3 === void 0 ? void 0 : _productSelectionsFet3.results]);
8423
+ const productSelections = React.useMemo(() => productSelectionsFetcher.productSelections?.results ?? [], [productSelectionsFetcher.productSelections?.results]);
8564
8424
  const filteredProductSelections = _filterInstanceProperty__default["default"](productSelections).call(productSelections, ps => {
8565
- var _context2;
8566
- return !_includesInstanceProperty__default["default"](_context2 = props.excludedProductSelectionIds).call(_context2, ps.id);
8425
+ var _context4;
8426
+ return !_includesInstanceProperty__default["default"](_context4 = props.excludedProductSelectionIds).call(_context4, ps.id);
8567
8427
  });
8568
8428
  const onOptionClick = event => {
8569
- var _event$target$value;
8570
- const productSelectionId = (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value;
8429
+ const productSelectionId = event.target.value?.value;
8571
8430
  const currentProductSelection = _findInstanceProperty__default["default"](productSelections).call(productSelections, productSelection => productSelection.id === productSelectionId);
8572
8431
  props.onChange(currentProductSelection);
8573
8432
  };
@@ -8597,8 +8456,8 @@ function ProductSelectionsAsyncSelectDropdown(props) {
8597
8456
  const handleLoadOptions = async searchTerm => {
8598
8457
  const productSelectionOptions = allProductSelectionOptions;
8599
8458
  const filteredOptions = _filterInstanceProperty__default["default"](productSelectionOptions).call(productSelectionOptions, productSelection => {
8600
- var _context3, _context4;
8601
- return _includesInstanceProperty__default["default"](_context3 = productSelection.label.toLowerCase()).call(_context3, searchTerm.toLowerCase()) || productSelection.key && _includesInstanceProperty__default["default"](_context4 = productSelection.key.toLowerCase()).call(_context4, searchTerm.toLowerCase());
8459
+ var _context5, _context6;
8460
+ 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());
8602
8461
  });
8603
8462
  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);
8604
8463
  return [{
@@ -8650,7 +8509,6 @@ const mapProductSelectionsToOptions$1 = memoize__default["default"](function ()
8650
8509
  let enableExcludingProducts = arguments.length > 4 ? arguments[4] : undefined;
8651
8510
  const selectedPSList = _Array$isArray__default["default"](selectedPS) ? selectedPS : [selectedPS];
8652
8511
  return _mapInstanceProperty__default["default"](productSelections).call(productSelections, productSelection => {
8653
- var _context;
8654
8512
  const label = l10n.formatLocalizedString(productSelection, {
8655
8513
  key: 'name',
8656
8514
  locale: dataLocale,
@@ -8659,14 +8517,13 @@ const mapProductSelectionsToOptions$1 = memoize__default["default"](function ()
8659
8517
  return {
8660
8518
  id: productSelection.id,
8661
8519
  value: productSelection.id,
8662
- label: _concatInstanceProperty__default["default"](_context = "".concat(label)).call(_context, _includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? " (type: ".concat(getMode(productSelection.mode), ")") : ''),
8520
+ label: `${label}${_includesInstanceProperty__default["default"](selectedPSList).call(selectedPSList, productSelection.id) && enableExcludingProducts ? ` (type: ${getMode(productSelection.mode)})` : ''}`,
8663
8521
  key: productSelection.key,
8664
8522
  mode: getMode(productSelection.mode)
8665
8523
  };
8666
8524
  });
8667
8525
  });
8668
8526
  function ProductSelectionBasicSelectDropdown(props) {
8669
- var _productSelectionsFet, _productSelectionsFet2;
8670
8527
  const intl = reactIntl.useIntl();
8671
8528
  const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
8672
8529
  const productSelectionsFetcher = useProductSelectionsFetcher$1({
@@ -8680,10 +8537,10 @@ function ProductSelectionBasicSelectDropdown(props) {
8680
8537
  projectLanguages = _useApplicationContex.projectLanguages,
8681
8538
  dataLocale = _useApplicationContex.dataLocale;
8682
8539
  if (productSelectionsFetcher.isLoading) return jsxRuntime.jsx(CenteredLoadingSpinner$1, {});
8683
- const productSelections = (_productSelectionsFet = (_productSelectionsFet2 = productSelectionsFetcher.productSelections) === null || _productSelectionsFet2 === void 0 ? void 0 : _productSelectionsFet2.results) !== null && _productSelectionsFet !== void 0 ? _productSelectionsFet : [];
8540
+ const productSelections = productSelectionsFetcher.productSelections?.results ?? [];
8684
8541
  const filteredProductSelections = _filterInstanceProperty__default["default"](productSelections).call(productSelections, ps => {
8685
- var _context2;
8686
- return !_includesInstanceProperty__default["default"](_context2 = props.excludedProductSelectionIds).call(_context2, ps.id);
8542
+ var _context;
8543
+ return !_includesInstanceProperty__default["default"](_context = props.excludedProductSelectionIds).call(_context, ps.id);
8687
8544
  });
8688
8545
  const onOptionClick = event => {
8689
8546
  const productSelectionId = event.target.value;
@@ -8720,15 +8577,11 @@ function ProductSelectionBasicSelectDropdown(props) {
8720
8577
  }
8721
8578
 
8722
8579
  var ProductSelectionsPickerFetcher$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "ProductSelectionsPickerFetcher" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, 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: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "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: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 223, source: { body: "query ProductSelectionsPickerFetcher($where: String!) {\n productSelections(where: $where) {\n results {\n id\n key\n version\n nameAllLocales {\n locale\n value\n }\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
8723
- const createQueryVariables$4 = (productSelections, predicateField) => {
8724
- var _context;
8725
- return {
8726
- where: _concatInstanceProperty__default["default"](_context = "".concat(predicateField, " in (")).call(_context, _mapInstanceProperty__default["default"](productSelections).call(productSelections, ps => "\"".concat(ps, "\"")).join(', '), ")"),
8727
- limit: 500
8728
- };
8729
- };
8580
+ const createQueryVariables$4 = (productSelections, predicateField) => ({
8581
+ where: `${predicateField} in (${_mapInstanceProperty__default["default"](productSelections).call(productSelections, ps => `"${ps}"`).join(', ')})`,
8582
+ limit: 500
8583
+ });
8730
8584
  const useProductSelectionsByFieldFetcher = (productSelections, predicateField) => {
8731
- var _productSelectionsQue, _productSelectionsQue2;
8732
8585
  const productSelectionList = _Array$isArray__default["default"](productSelections) ? productSelections : [productSelections];
8733
8586
  const productSelectionsQuery = react.useQuery(ProductSelectionsPickerFetcher$1, {
8734
8587
  context: {
@@ -8738,7 +8591,7 @@ const useProductSelectionsByFieldFetcher = (productSelections, predicateField) =
8738
8591
  skip: productSelectionList.length === 0
8739
8592
  });
8740
8593
  return {
8741
- productSelections: (_productSelectionsQue = (_productSelectionsQue2 = productSelectionsQuery.data) === null || _productSelectionsQue2 === void 0 ? void 0 : _productSelectionsQue2.productSelections.results) !== null && _productSelectionsQue !== void 0 ? _productSelectionsQue : [],
8594
+ productSelections: productSelectionsQuery.data?.productSelections.results ?? [],
8742
8595
  isLoading: productSelectionsQuery.loading
8743
8596
  };
8744
8597
  };
@@ -8781,13 +8634,12 @@ const createQueryVariables$3 = _ref3 => {
8781
8634
  let searchText = _ref3.searchText,
8782
8635
  permissionWhere = _ref3.permissionWhere;
8783
8636
  const sanitizedSearchText = sanitize(_trimInstanceProperty__default["default"](searchText).call(searchText, searchText));
8784
- const idQuery = isUUID$1(sanitizedSearchText) && "id = \"".concat(sanitizedSearchText, "\"");
8785
- const keyQuery = "key = \"".concat(sanitizedSearchText, "\"");
8637
+ const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
8638
+ const keyQuery = `key = "${sanitizedSearchText}"`;
8786
8639
  const searchTextQuery = _filterInstanceProperty__default["default"](_context = [idQuery, keyQuery]).call(_context, Boolean).join(' or ');
8787
8640
  if (searchTextQuery && permissionWhere) {
8788
- var _context2;
8789
8641
  return {
8790
- where: _concatInstanceProperty__default["default"](_context2 = "(".concat(searchTextQuery, ") and (")).call(_context2, permissionWhere, ")")
8642
+ where: `(${searchTextQuery}) and (${permissionWhere})`
8791
8643
  };
8792
8644
  }
8793
8645
  if (permissionWhere) {
@@ -8800,7 +8652,7 @@ const createQueryVariables$3 = _ref3 => {
8800
8652
  };
8801
8653
  };
8802
8654
  function ProductSelectionsSearchSelectDropdown(props) {
8803
- var _context4;
8655
+ var _context3;
8804
8656
  const intl = reactIntl.useIntl();
8805
8657
  const enableExcludingProducts = applicationShell.useFeatureToggle(EXCLUDING_PRODUCTS);
8806
8658
  const _useState = React.useState([]),
@@ -8816,7 +8668,6 @@ function ProductSelectionsSearchSelectDropdown(props) {
8816
8668
  dataLocale = _useApplicationContex.dataLocale;
8817
8669
  const productSelectionsByFieldFetcher = useProductSelectionsByFieldFetcher$1(props.value, props.renderSelectInputOptionValuesByField);
8818
8670
  const handleLoadOptions = async searchText => {
8819
- var _data$productSelectio, _data$productSelectio2;
8820
8671
  const _await$client$query = await client$1.query({
8821
8672
  query: ProductSelectionsPickerFetcher,
8822
8673
  variables: createQueryVariables$3({
@@ -8829,11 +8680,11 @@ function ProductSelectionsSearchSelectDropdown(props) {
8829
8680
  fetchPolicy: 'network-only'
8830
8681
  }),
8831
8682
  data = _await$client$query.data;
8832
- const matchedProductSelections = (_data$productSelectio = data === null || data === void 0 || (_data$productSelectio2 = data.productSelections) === null || _data$productSelectio2 === void 0 ? void 0 : _data$productSelectio2.results) !== null && _data$productSelectio !== void 0 ? _data$productSelectio : [];
8683
+ const matchedProductSelections = data?.productSelections?.results ?? [];
8833
8684
  const updatedProductSelections = _mapInstanceProperty__default["default"](matchedProductSelections).call(matchedProductSelections, convertProductSelectionFromGraphQl);
8834
8685
  const filteredProductSelections = _filterInstanceProperty__default["default"](updatedProductSelections).call(updatedProductSelections, ps => {
8835
- var _context3;
8836
- return !_includesInstanceProperty__default["default"](_context3 = props.excludedProductSelectionIds).call(_context3, ps.id);
8686
+ var _context2;
8687
+ return !_includesInstanceProperty__default["default"](_context2 = props.excludedProductSelectionIds).call(_context2, ps.id);
8837
8688
  });
8838
8689
  setProductSelectionResults(filteredProductSelections);
8839
8690
  return mapProductSelectionsToOptions({
@@ -8845,8 +8696,7 @@ function ProductSelectionsSearchSelectDropdown(props) {
8845
8696
  };
8846
8697
  const loadOptionsDebounced = debounce__default["default"](handleLoadOptions, 500);
8847
8698
  const onOptionClick = event => {
8848
- var _event$target$value;
8849
- const productSelectionId = (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value;
8699
+ const productSelectionId = event.target.value?.value;
8850
8700
  const currentProductSelection = _findInstanceProperty__default["default"](productionSelectionResults).call(productionSelectionResults, productSelection => productSelection.id === productSelectionId);
8851
8701
  props.onChange(currentProductSelection);
8852
8702
  };
@@ -8858,7 +8708,7 @@ function ProductSelectionsSearchSelectDropdown(props) {
8858
8708
  value: getValueFromOptions$2({
8859
8709
  currentlySelectedProductSelections: props.value,
8860
8710
  productSelectionFieldOptions: mapProductSelectionsToOptions({
8861
- productSelections: _mapInstanceProperty__default["default"](_context4 = productSelectionsByFieldFetcher.productSelections).call(_context4, convertProductSelectionFromGraphQl),
8711
+ productSelections: _mapInstanceProperty__default["default"](_context3 = productSelectionsByFieldFetcher.productSelections).call(_context3, convertProductSelectionFromGraphQl),
8862
8712
  dataLocale,
8863
8713
  projectLanguages,
8864
8714
  renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField
@@ -8898,11 +8748,11 @@ function ModeSelectInputOption(props) {
8898
8748
  scale: "xs",
8899
8749
  children: [jsxRuntime.jsx(uiKit.Text.Detail, {
8900
8750
  isBold: true,
8901
- children: (data === null || data === void 0 ? void 0 : data.label) || noValueFallback
8751
+ children: data?.label || noValueFallback
8902
8752
  }), jsxRuntime.jsxs(uiKit.Text.Detail, {
8903
- children: ["Key: ", (data === null || data === void 0 ? void 0 : data.key) || noValueFallback]
8753
+ children: ["Key: ", data?.key || noValueFallback]
8904
8754
  }), jsxRuntime.jsxs(uiKit.Text.Detail, {
8905
- children: ["Type: ", (data === null || data === void 0 ? void 0 : data.mode) || noValueFallback]
8755
+ children: ["Type: ", data?.mode || noValueFallback]
8906
8756
  })]
8907
8757
  })
8908
8758
  }));
@@ -9007,7 +8857,6 @@ function ownKeys$I(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
9007
8857
  function _objectSpread$I(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$I(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$I(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
9008
8858
  var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Int" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 220, source: { body: "query FetchRecurrencePolicies($where: String, $limit: Int!) {\n recurrencePolicies(where: $where, limit: $limit) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
9009
8859
  const useRecurrenceIntervals = _ref => {
9010
- var _data$recurrencePolic, _data$recurrencePolic2;
9011
8860
  let where = _ref.where,
9012
8861
  _ref$skip = _ref.skip,
9013
8862
  skip = _ref$skip === void 0 ? false : _ref$skip;
@@ -9027,7 +8876,7 @@ const useRecurrenceIntervals = _ref => {
9027
8876
  loading = _useQuery.loading,
9028
8877
  error = _useQuery.error;
9029
8878
  return {
9030
- recurrencePolicies: (_data$recurrencePolic = data === null || data === void 0 || (_data$recurrencePolic2 = data.recurrencePolicies) === null || _data$recurrencePolic2 === void 0 ? void 0 : _data$recurrencePolic2.results) !== null && _data$recurrencePolic !== void 0 ? _data$recurrencePolic : [],
8879
+ recurrencePolicies: data?.recurrencePolicies?.results ?? [],
9031
8880
  loading,
9032
8881
  error
9033
8882
  };
@@ -9048,16 +8897,14 @@ const RecurrentIntervalPicker = _ref => {
9048
8897
  _ref$isReadOnly = _ref.isReadOnly,
9049
8898
  isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
9050
8899
  _ref$isMulti = _ref.isMulti,
9051
- isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti;
8900
+ isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti,
8901
+ dataTestId = _ref['data-testid'];
9052
8902
  const _useIntl = reactIntl.useIntl(),
9053
8903
  formatMessage = _useIntl.formatMessage;
9054
- const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
9055
- var _applicationContext$p;
9056
- return {
9057
- dataLocale: applicationContext.dataLocale,
9058
- projectKey: (_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.key
9059
- };
9060
- }),
8904
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
8905
+ dataLocale: applicationContext.dataLocale,
8906
+ projectKey: applicationContext.project?.key
8907
+ })),
9061
8908
  dataLocale = _useApplicationContex.dataLocale,
9062
8909
  projectKey = _useApplicationContex.projectKey;
9063
8910
  const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
@@ -9065,9 +8912,9 @@ const RecurrentIntervalPicker = _ref => {
9065
8912
  const where = React.useMemo(() => {
9066
8913
  if (!isReadOnly || !value) return undefined;
9067
8914
  if (_Array$isArray__default["default"](value)) {
9068
- return "id in (".concat(_mapInstanceProperty__default["default"](value).call(value, id => "\"".concat(id, "\"")).join(','), ")");
8915
+ return `id in (${_mapInstanceProperty__default["default"](value).call(value, id => `"${id}"`).join(',')})`;
9069
8916
  }
9070
- return "id=\"".concat(value, "\"");
8917
+ return `id="${value}"`;
9071
8918
  }, [isReadOnly, value]);
9072
8919
  const _useRecurrenceInterva = useRecurrenceIntervals({
9073
8920
  where,
@@ -9124,7 +8971,8 @@ const RecurrentIntervalPicker = _ref => {
9124
8971
  isDisabled: isDisabled || loading || noRecurrentIntervalsConfigured,
9125
8972
  onChange: onChange,
9126
8973
  onBlur: onBlur,
9127
- hasError: !loading && !error && selectedIsMissingInData
8974
+ hasError: !loading && !error && selectedIsMissingInData,
8975
+ "data-testid": dataTestId
9128
8976
  }), error ? jsxRuntime.jsx(uiKit.Text.Body, {
9129
8977
  tone: "negative",
9130
8978
  intlMessage: commonPickerMessages.loadingErrorMessage
@@ -9137,7 +8985,7 @@ const RecurrentIntervalPicker = _ref => {
9137
8985
  intlMessage: _objectSpread$H(_objectSpread$H({}, messages$w.noRecurrentIntervalsConfigured), {}, {
9138
8986
  values: {
9139
8987
  linkToSettings: msg => jsxRuntime.jsx(uiKit.Link, {
9140
- to: "/".concat(projectKey, "/settings/project/intervals"),
8988
+ to: `/${projectKey}/settings/project/intervals`,
9141
8989
  children: msg
9142
8990
  }, "link-to-settings")
9143
8991
  }
@@ -9177,17 +9025,17 @@ const ScrollToFieldError = () => {
9177
9025
  // Get a reference to the label.
9178
9026
  const firstElementId = firstErrorElement.getAttribute('id');
9179
9027
  if (firstElementId) {
9180
- var _ref, _ref2, _document$querySelect, _elementToScrollTo$sc;
9181
- const localizedInputIndex = _indexOfInstanceProperty__default["default"](firstElementId).call(firstElementId, ".".concat(dataLocale));
9028
+ const localizedInputIndex = _indexOfInstanceProperty__default["default"](firstElementId).call(firstElementId, `.${dataLocale}`);
9182
9029
 
9183
9030
  // check if locale is appended then remove it from id
9184
- const id = localizedInputIndex > -1 ? firstElementId.replace(".".concat(dataLocale), '') : firstElementId;
9031
+ const id = localizedInputIndex > -1 ? firstElementId.replace(`.${dataLocale}`, '') : firstElementId;
9185
9032
 
9186
9033
  // Scroll to the label (if found), otherwise to the input element itself.
9187
9034
 
9188
- const elementToScrollTo = // div is used only for custom fields
9189
- (_ref = (_ref2 = (_document$querySelect = document.querySelector("div[aria-errormessage=\"".concat(firstElementId, "\"]"))) !== null && _document$querySelect !== void 0 ? _document$querySelect : document.querySelector("label[for=\"".concat(id, "\"]"))) !== null && _ref2 !== void 0 ? _ref2 : document.querySelector("label#".concat(id))) !== null && _ref !== void 0 ? _ref : firstErrorElement;
9190
- (_elementToScrollTo$sc = elementToScrollTo.scrollIntoView) === null || _elementToScrollTo$sc === void 0 || _elementToScrollTo$sc.call(elementToScrollTo, {
9035
+ const elementToScrollTo =
9036
+ // div is used only for custom fields
9037
+ document.querySelector(`div[aria-errormessage="${firstElementId}"]`) ?? document.querySelector(`label[for="${id}"]`) ?? document.querySelector(`label#${id}`) ?? firstErrorElement;
9038
+ elementToScrollTo.scrollIntoView?.({
9191
9039
  behavior: 'smooth',
9192
9040
  block: 'center'
9193
9041
  });
@@ -9212,8 +9060,7 @@ var messages$v = reactIntl.defineMessages({
9212
9060
  });
9213
9061
 
9214
9062
  const SelectableFieldSearchInput = props => {
9215
- var _props$initialValue, _props$placeholder;
9216
- const _useState = React.useState((_props$initialValue = props.initialValue) !== null && _props$initialValue !== void 0 ? _props$initialValue : ''),
9063
+ const _useState = React.useState(props.initialValue ?? ''),
9217
9064
  _useState2 = _slicedToArray(_useState, 2),
9218
9065
  searchText = _useState2[0],
9219
9066
  setSearchText = _useState2[1];
@@ -9249,7 +9096,7 @@ const SelectableFieldSearchInput = props => {
9249
9096
  });
9250
9097
  },
9251
9098
  onReset: props.onReset,
9252
- placeholder: (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : intl.formatMessage(messages$v.placeholder),
9099
+ placeholder: props.placeholder ?? intl.formatMessage(messages$v.placeholder),
9253
9100
  isDisabled: props.disabled
9254
9101
  })
9255
9102
  });
@@ -9297,7 +9144,7 @@ var messages$u = reactIntl.defineMessages({
9297
9144
 
9298
9145
  // map store to options
9299
9146
  const mapStoresToOptions = _ref => {
9300
- var _store$productSelecti;
9147
+ var _context, _context2;
9301
9148
  let store = _ref.store,
9302
9149
  renderSelectInputOptionValuesByField = _ref.renderSelectInputOptionValuesByField,
9303
9150
  dataLocale = _ref.dataLocale,
@@ -9310,14 +9157,14 @@ const mapStoresToOptions = _ref => {
9310
9157
  key: 'name',
9311
9158
  locale: dataLocale,
9312
9159
  fallbackOrder: languages,
9313
- fallback: "".concat(store.key, " (key)")
9160
+ fallback: `${store.key} (key)`
9314
9161
  });
9315
9162
  return {
9316
9163
  label: localizedName,
9317
9164
  value: renderSelectInputOptionValuesByField === 'key' ? store.key : store.id,
9318
9165
  key: store.key,
9319
9166
  id: store.id,
9320
- productSelections: (_store$productSelecti = store.productSelections) === null || _store$productSelecti === void 0 ? void 0 : _mapInstanceProperty__default["default"](_store$productSelecti).call(_store$productSelecti, productSelectionRef => productSelectionRef.productSelection.id)
9167
+ productSelections: ((_context = store.productSelections) == null ? void 0 : _bindInstanceProperty__default["default"](_context2 = Function.call).call(_context2, _mapInstanceProperty__default["default"](_context), _context))?.(productSelectionRef => productSelectionRef.productSelection.id)
9321
9168
  };
9322
9169
  };
9323
9170
 
@@ -9334,7 +9181,7 @@ const getCustomGroupLabelOption = customLabel => [{
9334
9181
 
9335
9182
  const _excluded$6 = ["shouldFetchProductSelections"];
9336
9183
  function ownKeys$G(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; }
9337
- function _objectSpread$G(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$G(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$G(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
9184
+ function _objectSpread$G(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$G(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$G(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
9338
9185
  const hasErrors$2 = errors => {
9339
9186
  var _context;
9340
9187
  return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
@@ -9347,7 +9194,10 @@ const getValueFromOptions$1 = _ref => {
9347
9194
  isMulti = _ref.isMulti;
9348
9195
  // handle async-select-field value transformation
9349
9196
  if (isMulti) {
9350
- return _filterInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store => currentlySelectedStores === null || currentlySelectedStores === void 0 ? void 0 : _includesInstanceProperty__default["default"](currentlySelectedStores).call(currentlySelectedStores, store.value));
9197
+ return _filterInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, store => {
9198
+ var _context2, _context3;
9199
+ return ((_context2 = currentlySelectedStores) == null ? void 0 : _bindInstanceProperty__default["default"](_context3 = Function.call).call(_context3, _includesInstanceProperty__default["default"](_context2), _context2))?.(store.value);
9200
+ });
9351
9201
  }
9352
9202
 
9353
9203
  // return value as undefined if no options is yet selected. It is needed for cases where users sets initial values as empty string
@@ -9368,13 +9218,10 @@ const StoresAsyncSelectInput = _ref2 => {
9368
9218
  shouldFetchProductSelections = _ref2$shouldFetchProd === void 0 ? false : _ref2$shouldFetchProd,
9369
9219
  props = _objectWithoutProperties(_ref2, _excluded$6);
9370
9220
  const intl = reactIntl.useIntl();
9371
- const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
9372
- var _applicationContext$p, _applicationContext$p2;
9373
- return {
9374
- dataLocale: applicationContext.dataLocale,
9375
- projectLanguages: isEmpty__default["default"]((_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages) ? props.projectLanguages : (_applicationContext$p2 = applicationContext.project) === null || _applicationContext$p2 === void 0 ? void 0 : _applicationContext$p2.languages
9376
- };
9377
- }),
9221
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
9222
+ dataLocale: applicationContext.dataLocale,
9223
+ projectLanguages: isEmpty__default["default"](applicationContext.project?.languages) ? props.projectLanguages : applicationContext.project?.languages
9224
+ })),
9378
9225
  dataLocale = _useApplicationContex.dataLocale,
9379
9226
  projectLanguages = _useApplicationContex.projectLanguages;
9380
9227
  const keysOfStores = props.allAccessibleStoreKeysThroughDataFencePermissions;
@@ -9384,13 +9231,13 @@ const StoresAsyncSelectInput = _ref2 => {
9384
9231
  sort: 'createdAt asc',
9385
9232
  excludeExtendedStoresList: true,
9386
9233
  excludeProductSelections: !shouldFetchProductSelections,
9387
- stores: (keysOfStores === null || keysOfStores === void 0 ? void 0 : keysOfStores.length) && keysOfStores,
9234
+ stores: keysOfStores?.length && keysOfStores,
9388
9235
  projectKey: props.projectKey
9389
9236
  });
9390
9237
  const hasError = uiKit.AsyncSelectInput.isTouched(props.touched) && hasErrors$2(props.errors) || props.hasError;
9391
9238
  const mappedStoresListOptions = React.useMemo(() => {
9392
- var _context2, _storesListFetcher$st;
9393
- return _mapInstanceProperty__default["default"](_context2 = ((_storesListFetcher$st = storesListFetcher.stores) === null || _storesListFetcher$st === void 0 ? void 0 : _storesListFetcher$st.results) || []).call(_context2, store => mapStoresToOptions({
9239
+ var _context4;
9240
+ return _mapInstanceProperty__default["default"](_context4 = storesListFetcher.stores?.results || []).call(_context4, store => mapStoresToOptions({
9394
9241
  store,
9395
9242
  dataLocale,
9396
9243
  languages: projectLanguages,
@@ -9409,8 +9256,8 @@ const StoresAsyncSelectInput = _ref2 => {
9409
9256
  return result;
9410
9257
  }
9411
9258
  const filteredOptions = _filterInstanceProperty__default["default"](mappedStoresListOptions).call(mappedStoresListOptions, storeOption => {
9412
- var _context3, _context4;
9413
- return _includesInstanceProperty__default["default"](_context3 = storeOption.label.toLowerCase()).call(_context3, searchTerm.toLowerCase()) || storeOption.key && _includesInstanceProperty__default["default"](_context4 = storeOption.key.toLowerCase()).call(_context4, searchTerm.toLowerCase());
9259
+ var _context5, _context6;
9260
+ 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());
9414
9261
  });
9415
9262
  return [...(props.renderLabel ? [{
9416
9263
  options: getCustomGroupLabelOption(props.renderLabel)
@@ -9478,13 +9325,10 @@ const StoresBasicSelectInput = _ref => {
9478
9325
  shouldFetchProductSelections = _ref$shouldFetchProdu === void 0 ? false : _ref$shouldFetchProdu,
9479
9326
  props = _objectWithoutProperties(_ref, _excluded$5);
9480
9327
  const intl = reactIntl.useIntl();
9481
- const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
9482
- var _applicationContext$p, _applicationContext$p2;
9483
- return {
9484
- dataLocale: applicationContext.dataLocale,
9485
- projectLanguages: isEmpty__default["default"]((_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages) ? props.projectLanguages : (_applicationContext$p2 = applicationContext.project) === null || _applicationContext$p2 === void 0 ? void 0 : _applicationContext$p2.languages
9486
- };
9487
- }),
9328
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
9329
+ dataLocale: applicationContext.dataLocale,
9330
+ projectLanguages: isEmpty__default["default"](applicationContext.project?.languages) ? props.projectLanguages : applicationContext.project?.languages
9331
+ })),
9488
9332
  dataLocale = _useApplicationContex.dataLocale,
9489
9333
  projectLanguages = _useApplicationContex.projectLanguages;
9490
9334
  const keysOfStores = props.allAccessibleStoreKeysThroughDataFencePermissions;
@@ -9494,32 +9338,31 @@ const StoresBasicSelectInput = _ref => {
9494
9338
  sort: 'createdAt asc',
9495
9339
  excludeExtendedStoresList: true,
9496
9340
  excludeProductSelections: !shouldFetchProductSelections,
9497
- stores: (keysOfStores === null || keysOfStores === void 0 ? void 0 : keysOfStores.length) && keysOfStores,
9341
+ stores: keysOfStores?.length && keysOfStores,
9498
9342
  projectKey: props.projectKey
9499
9343
  });
9500
9344
  const hasError = uiKit.SelectInput.isTouched(props.touched) && hasErrors$1(props.errors) || props.hasError;
9501
9345
  const mappedStoresListOptions = React.useMemo(() => {
9502
- var _context2, _storesListFetcher$st;
9503
- const results = _mapInstanceProperty__default["default"](_context2 = ((_storesListFetcher$st = storesListFetcher.stores) === null || _storesListFetcher$st === void 0 ? void 0 : _storesListFetcher$st.results) || []).call(_context2, store => mapStoresToOptions({
9346
+ var _context2;
9347
+ const results = _mapInstanceProperty__default["default"](_context2 = storesListFetcher.stores?.results || []).call(_context2, store => mapStoresToOptions({
9504
9348
  store,
9505
9349
  dataLocale,
9506
9350
  languages: projectLanguages,
9507
9351
  renderSelectInputOptionValuesByField: props.renderSelectInputOptionValuesByField
9508
9352
  }));
9509
- return props !== null && props !== void 0 && props.renderLabel ? [{
9353
+ return props?.renderLabel ? [{
9510
9354
  options: getCustomGroupLabelOption(props.renderLabel)
9511
9355
  }, {
9512
9356
  options: results
9513
9357
  }] : results;
9514
- }, [dataLocale, storesListFetcher.stores, props.renderSelectInputOptionValuesByField, props === null || props === void 0 ? void 0 : props.renderLabel]);
9358
+ }, [dataLocale, storesListFetcher.stores, props.renderSelectInputOptionValuesByField, props?.renderLabel]);
9515
9359
  const handleChange = event => {
9516
- var _event$target$value$v, _event$target$value;
9517
- const value = (_event$target$value$v = (_event$target$value = event.target.value) === null || _event$target$value === void 0 ? void 0 : _event$target$value.value) !== null && _event$target$value$v !== void 0 ? _event$target$value$v : event.target.value;
9518
- const listOptions = props !== null && props !== void 0 && props.renderLabel ? mappedStoresListOptions[1].options : mappedStoresListOptions;
9360
+ const value = event.target.value?.value ?? event.target.value;
9361
+ const listOptions = props?.renderLabel ? mappedStoresListOptions[1].options : mappedStoresListOptions;
9519
9362
  const currentStore = _findInstanceProperty__default["default"](listOptions).call(listOptions, store => store.value === value);
9520
9363
 
9521
9364
  // We need complete store info including productSelections
9522
- if (!shouldFetchProductSelections && !(props !== null && props !== void 0 && props.renderLabel)) {
9365
+ if (!shouldFetchProductSelections && !props?.renderLabel) {
9523
9366
  props.onChange(event);
9524
9367
  } else {
9525
9368
  props.onChange({
@@ -9571,7 +9414,6 @@ var StoresBasicSelectInput$1 = StoresBasicSelectInput;
9571
9414
 
9572
9415
  var TotalNumberOfStores = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "TotalNumberOfStores" }, variableDefinitions: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "totalNumberOfStores" }, name: { kind: "Name", value: "stores" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }] } }] } }], loc: { start: 0, end: 76, source: { body: "query TotalNumberOfStores {\n totalNumberOfStores: stores {\n total\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
9573
9416
  const useTotalNumberOfStoresFetcher = projectKey => {
9574
- var _totalNumberOfStoresQ;
9575
9417
  const totalNumberOfStoresQuery = react.useQuery(TotalNumberOfStores, {
9576
9418
  context: {
9577
9419
  target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM,
@@ -9580,26 +9422,22 @@ const useTotalNumberOfStoresFetcher = projectKey => {
9580
9422
  fetchPolicy: 'network-only'
9581
9423
  });
9582
9424
  return {
9583
- total: (_totalNumberOfStoresQ = totalNumberOfStoresQuery.data) === null || _totalNumberOfStoresQ === void 0 ? void 0 : _totalNumberOfStoresQ.totalNumberOfStores.total,
9425
+ total: totalNumberOfStoresQuery.data?.totalNumberOfStores.total,
9584
9426
  isLoading: totalNumberOfStoresQuery.loading
9585
9427
  };
9586
9428
  };
9587
9429
  var useTotalNumberOfStoresFetcher$1 = useTotalNumberOfStoresFetcher;
9588
9430
 
9589
9431
  var FetchStoresByField = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchStoresByField" }, 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: "excludeProductSelections" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", alias: { kind: "Name", value: "storesByField" }, name: { kind: "Name", value: "stores" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }, { kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { 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: 473, source: { body: "query FetchStoresByField(\n $where: String!\n $excludeProductSelections: Boolean!\n $limit: Int\n) {\n storesByField: stores(where: $where, limit: $limit) {\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 } } } };
9590
- const createQueryVariables$2 = (stores, predicateField, shouldFetchProductSelections) => {
9591
- var _context;
9592
- return {
9593
- where: _concatInstanceProperty__default["default"](_context = "".concat(predicateField, " in (")).call(_context, _mapInstanceProperty__default["default"](stores).call(stores, store => "\"".concat(store, "\"")).join(', '), ")"),
9594
- limit: 500,
9595
- excludeProductSelections: !shouldFetchProductSelections
9596
- };
9597
- };
9432
+ const createQueryVariables$2 = (stores, predicateField, shouldFetchProductSelections) => ({
9433
+ where: `${predicateField} in (${_mapInstanceProperty__default["default"](stores).call(stores, store => `"${store}"`).join(', ')})`,
9434
+ limit: 500,
9435
+ excludeProductSelections: !shouldFetchProductSelections
9436
+ });
9598
9437
  const emptyStoresQueryResult = {
9599
9438
  results: []
9600
9439
  };
9601
9440
  const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
9602
- var _storesQuery$data;
9603
9441
  let shouldFetchProductSelections = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
9604
9442
  // incase of single select input stores are sent as single string literal
9605
9443
  const storesList = _Array$isArray__default["default"](stores) ? stores : [stores];
@@ -9612,7 +9450,7 @@ const useStoresByFieldFetcher = function (stores, predicateField, projectKey) {
9612
9450
  skip: storesList.length === 0
9613
9451
  });
9614
9452
  return {
9615
- stores: ((_storesQuery$data = storesQuery.data) === null || _storesQuery$data === void 0 ? void 0 : _storesQuery$data.storesByField) || emptyStoresQueryResult,
9453
+ stores: storesQuery.data?.storesByField || emptyStoresQueryResult,
9616
9454
  isLoading: storesQuery.loading
9617
9455
  };
9618
9456
  };
@@ -9620,7 +9458,7 @@ var useStoresByFieldFetcher$1 = useStoresByFieldFetcher;
9620
9458
 
9621
9459
  const _excluded$4 = ["shouldFetchProductSelections"];
9622
9460
  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; }
9623
- function _objectSpread$E(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$E(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$E(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
9461
+ function _objectSpread$E(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$E(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$E(Object(t))).call(_context0, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
9624
9462
  function _EMOTION_STRINGIFIED_CSS_ERROR__$7() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
9625
9463
  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 } } } }; // check wether there are any errors
9626
9464
  const hasErrors = errors => {
@@ -9628,16 +9466,16 @@ const hasErrors = errors => {
9628
9466
  return errors && _someInstanceProperty__default["default"](_context = _Object$values__default["default"](errors)).call(_context, Boolean);
9629
9467
  };
9630
9468
  const createQueryVariables$1 = _ref2 => {
9631
- var _context2, _context3;
9469
+ var _context2;
9632
9470
  let searchText = _ref2.searchText,
9633
9471
  dataLocale = _ref2.dataLocale,
9634
9472
  allAccessibleStoreKeysThroughDataFencePermissions = _ref2.allAccessibleStoreKeysThroughDataFencePermissions,
9635
9473
  shouldFetchProductSelections = _ref2.shouldFetchProductSelections;
9636
9474
  const sanitizedSearchText = sanitize(_trimInstanceProperty__default["default"](searchText).call(searchText, searchText));
9637
- const keyQuery = "key = \"".concat(sanitizedSearchText, "\"");
9475
+ const keyQuery = `key = "${sanitizedSearchText}"`;
9638
9476
 
9639
9477
  // if the user has data fence permissions then we only allow stores to fetched that user has access to
9640
- if (allAccessibleStoreKeysThroughDataFencePermissions !== null && allAccessibleStoreKeysThroughDataFencePermissions !== void 0 && allAccessibleStoreKeysThroughDataFencePermissions.length) {
9478
+ if (allAccessibleStoreKeysThroughDataFencePermissions?.length) {
9641
9479
  // if the current search term match the accessible stores keys, then proceed with fetching the store
9642
9480
  if (_includesInstanceProperty__default["default"](allAccessibleStoreKeysThroughDataFencePermissions).call(allAccessibleStoreKeysThroughDataFencePermissions, sanitizedSearchText)) {
9643
9481
  return {
@@ -9653,9 +9491,9 @@ const createQueryVariables$1 = _ref2 => {
9653
9491
  excludeProductSelections: !shouldFetchProductSelections
9654
9492
  };
9655
9493
  }
9656
- const idQuery = isUUID$1(sanitizedSearchText) && "id = \"".concat(sanitizedSearchText, "\"");
9657
- const nameQuery = _concatInstanceProperty__default["default"](_context2 = "name(".concat(dataLocale, " = \"")).call(_context2, sanitizedSearchText, "\")");
9658
- const searchTextQuery = _filterInstanceProperty__default["default"](_context3 = [idQuery, nameQuery, keyQuery]).call(_context3, Boolean).join(' or ');
9494
+ const idQuery = isUUID$1(sanitizedSearchText) && `id = "${sanitizedSearchText}"`;
9495
+ const nameQuery = `name(${dataLocale} = "${sanitizedSearchText}")`;
9496
+ const searchTextQuery = _filterInstanceProperty__default["default"](_context2 = [idQuery, nameQuery, keyQuery]).call(_context2, Boolean).join(' or ');
9659
9497
  return {
9660
9498
  skipFetchingStores: false,
9661
9499
  where: searchTextQuery,
@@ -9663,7 +9501,7 @@ const createQueryVariables$1 = _ref2 => {
9663
9501
  };
9664
9502
  };
9665
9503
  const getValueFromOptions = _ref3 => {
9666
- var _storesByFieldFetcher, _context4;
9504
+ var _context3, _context4, _context5;
9667
9505
  let isMulti = _ref3.isMulti,
9668
9506
  value = _ref3.value,
9669
9507
  dataLocale = _ref3.dataLocale,
@@ -9673,7 +9511,7 @@ const getValueFromOptions = _ref3 => {
9673
9511
  if (!value) {
9674
9512
  return undefined;
9675
9513
  }
9676
- const selectedOptions = (_storesByFieldFetcher = storesByFieldFetcher.stores) === null || _storesByFieldFetcher === void 0 ? void 0 : _mapInstanceProperty__default["default"](_context4 = _storesByFieldFetcher.results).call(_context4, store => mapStoresToOptions({
9514
+ 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({
9677
9515
  store,
9678
9516
  dataLocale,
9679
9517
  languages,
@@ -9700,13 +9538,10 @@ const StoresSearchSelectInput = _ref4 => {
9700
9538
  shouldFetchProductSelections = _ref4$shouldFetchProd === void 0 ? false : _ref4$shouldFetchProd,
9701
9539
  props = _objectWithoutProperties(_ref4, _excluded$4);
9702
9540
  // hooks
9703
- const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => {
9704
- var _applicationContext$p, _applicationContext$p2;
9705
- return {
9706
- dataLocale: applicationContext.dataLocale,
9707
- projectLanguages: isEmpty__default["default"]((_applicationContext$p = applicationContext.project) === null || _applicationContext$p === void 0 ? void 0 : _applicationContext$p.languages) ? props.projectLanguages : (_applicationContext$p2 = applicationContext.project) === null || _applicationContext$p2 === void 0 ? void 0 : _applicationContext$p2.languages
9708
- };
9709
- }),
9541
+ const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
9542
+ dataLocale: applicationContext.dataLocale,
9543
+ projectLanguages: isEmpty__default["default"](applicationContext.project?.languages) ? props.projectLanguages : applicationContext.project?.languages
9544
+ })),
9710
9545
  dataLocale = _useApplicationContex.dataLocale,
9711
9546
  projectLanguages = _useApplicationContex.projectLanguages;
9712
9547
  const intl = reactIntl.useIntl();
@@ -9728,9 +9563,9 @@ const StoresSearchSelectInput = _ref4 => {
9728
9563
  },
9729
9564
  fetchPolicy: 'network-only'
9730
9565
  }).then(_ref5 => {
9731
- var _data$storesByWherePr, _context5;
9566
+ var _context6, _context7, _context8;
9732
9567
  let data = _ref5.data;
9733
- const result = (_data$storesByWherePr = data.storesByWherePredicate) === null || _data$storesByWherePr === void 0 ? void 0 : _mapInstanceProperty__default["default"](_context5 = _data$storesByWherePr.results).call(_context5, store => mapStoresToOptions({
9568
+ 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({
9734
9569
  store,
9735
9570
  dataLocale,
9736
9571
  languages: projectLanguages,
@@ -9754,7 +9589,7 @@ const StoresSearchSelectInput = _ref4 => {
9754
9589
  css: renderLabelContainerStyles,
9755
9590
  children: [jsxRuntime.jsx("div", {
9756
9591
  css: customLabelStyles,
9757
- children: (props === null || props === void 0 ? void 0 : props.renderLabel) && (props === null || props === void 0 ? void 0 : props.renderLabel)
9592
+ children: props?.renderLabel && props?.renderLabel
9758
9593
  }), jsxRuntime.jsx("div", {
9759
9594
  children: intl.formatMessage(inputValue ? messages$u.searchSelectInputNoOptionsFoundMessage : messages$u.searchSelectInputNoValueMessage)
9760
9595
  })]
@@ -9965,7 +9800,6 @@ const StoreSelectField = _ref => {
9965
9800
  StoreSelectField.displayName = 'StoreSelectField';
9966
9801
  var StoreSelectField$1 = StoreSelectField;
9967
9802
 
9968
- var _templateObject$1;
9969
9803
  function ownKeys$B(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; }
9970
9804
  function _objectSpread$B(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$B(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$B(Object(t))).call(_context6, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
9971
9805
  function _callSuper$6(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct$6() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
@@ -10040,7 +9874,10 @@ const VALIDATOR_INTEGER = {
10040
9874
  * has emitted a warning once in the logs, not for every instance
10041
9875
  */
10042
9876
  let hasWarned = false;
10043
- const warningMessage = commonTags.oneLineTrim(_templateObject$1 || (_templateObject$1 = _taggedTemplateLiteral(["\n `validatedInput` is no longer supported.\n Please use `formik` instead.\n"], ["\n \\`validatedInput\\` is no longer supported.\n Please use \\`formik\\` instead.\n"])));
9877
+ const warningMessage = commonTags.oneLineTrim`
9878
+ \`validatedInput\` is no longer supported.
9879
+ Please use \`formik\` instead.
9880
+ `;
10044
9881
  const ToolTipWrapperComponent = /*#__PURE__*/React.forwardRef((_ref2, ref) => {
10045
9882
  let children = _ref2.children;
10046
9883
  return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
@@ -10196,7 +10033,7 @@ function validatedInput(InnerComponent, validators) {
10196
10033
  }
10197
10034
  }]);
10198
10035
  }(React.PureComponent);
10199
- ValidatedInput.displayName = "ValidatedInput(".concat(_InnerComponent.displayName, ")");
10036
+ ValidatedInput.displayName = `ValidatedInput(${_InnerComponent.displayName})`;
10200
10037
  ValidatedInput.defaultProps = {
10201
10038
  isValid: true,
10202
10039
  getInputRef: () => {}
@@ -10224,7 +10061,7 @@ function simpleInput(type) {
10224
10061
  value: function render() {
10225
10062
  return jsxRuntime.jsx("input", {
10226
10063
  className: classnames__default["default"](this.props.className),
10227
- css: /*#__PURE__*/react$1.css(this.props.isValid ? '' : "border-color: ".concat(uiKit.designTokens.colorError, "!important;border: 1px solid;"), ";" + (process.env.NODE_ENV === "production" ? "" : ";label:simpleInput;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInZhbGlkYXRlZC1pbnB1dC5qc3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBOFRrQiIsImZ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tcbn1cbiJdfQ== */"),
10064
+ css: /*#__PURE__*/react$1.css(this.props.isValid ? '' : `border-color: ${uiKit.designTokens.colorError}!important;border: 1px solid;`, ";" + (process.env.NODE_ENV === "production" ? "" : ";label:simpleInput;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInZhbGlkYXRlZC1pbnB1dC5qc3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBOFRrQiIsImZpbGUiOiJ2YWxpZGF0ZWQtaW5wdXQuanN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgUHVyZUNvbXBvbmVudCwgZm9yd2FyZFJlZiB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCBQcm9wVHlwZXMgZnJvbSAncHJvcC10eXBlcyc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgY2xhc3NuYW1lcyBmcm9tICdjbGFzc25hbWVzJztcbmltcG9ydCB7IG9uZUxpbmVUcmltIH0gZnJvbSAnY29tbW9uLXRhZ3MnO1xuaW1wb3J0IHsgZGVlcEVxdWFsIH0gZnJvbSAnZmFzdC1lcXVhbHMnO1xuaW1wb3J0IGhhcyBmcm9tICdsb2Rhc2gvaGFzJztcbmltcG9ydCBpc05pbCBmcm9tICdsb2Rhc2gvaXNOaWwnO1xuaW1wb3J0IHsgaW5qZWN0SW50bCB9IGZyb20gJ3JlYWN0LWludGwnO1xuaW1wb3J0IHdhcm5pbmcgZnJvbSAndGlueS13YXJuaW5nJztcbmltcG9ydCB7XG4gIENvbnN0cmFpbnRzLFxuICBUb29sdGlwLFxuICBkZXNpZ25Ub2tlbnMsXG59IGZyb20gJ0Bjb21tZXJjZXRvb2xzLWZyb250ZW5kL3VpLWtpdCc7XG5pbXBvcnQgKiBhcyBudW1iZXJzIGZyb20gJy4uLy4uL3V0aWxzL251bWJlcn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Y3NzYFxuICAgICAgICAgICAgZGlzcGxheTogaW5saW5lO1xuICAgICAgICAgIGB9XG4gICAgICAgID5cbiAgICAgICAgICA8VG9vbHRpcFxuICAgICAgICAgICAgcGxhY2VtZW50PVwidG9wXCJcbiAgICAgICAgICAgIHRpdGxlPXtcbiAgICAgICAgICAgICAgKGZpcnN0RmFpbGVkVmFsaWRhdG9yICYmXG4gICAgICAgICAgICAgICAgdGhpcy5wcm9wcy5pbnRsLmZvcm1hdE1lc3NhZ2UoZmlyc3RGYWlsZWRWYWxpZGF0b3IubWVzc2FnZSkpIHx8XG4gICAgICAgICAgICAgICcnXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpc09wZW49eyFpc1ZhbGlkfVxuICAgICAgICAgICAgY29tcG9uZW50cz17e1xuICAgICAgICAgICAgICBXcmFwcGVyQ29tcG9uZW50OiBUb29sVGlwV3JhcHBlckNvbXBvbmVudCxcbiAgICAgICAgICAgIH19XG4gICAgICAgICAgPlxuICAgICAgICAgICAgPF9Jbm5lckNvbXBvbmVudCB7Li4uY29tcG9uZW50UHJvcHN9IC8+XG4gICAgICAgICAgPC9Ub29sdGlwPlxuICAgICAgICA8L2Rpdj5cbiAgICAgICk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIGluamVjdEludGwoVmFsaWRhdGVkSW5wdXQpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gc2ltcGxlSW5wdXQodHlwZSkge1xuICByZXR1cm4gY2xhc3MgZXh0ZW5kcyBQdXJlQ29tcG9uZW50IHtcbiAgICBzdGF0aWMgZGlzcGxheU5hbWUgPSAnU2ltcGxlSW5wdXQnO1xuXG4gICAgc3RhdGljIHByb3BUeXBlcyA9IHtcbiAgICAgIGNsYXNzTmFtZTogUHJvcFR5cGVzLnN0cmluZyxcbiAgICAgIGRpc2FibGVkOiBQcm9wVHlwZXMuYm9vbCxcbiAgICAgIGlzVmFsaWQ6IFByb3BUeXBlcy5ib29sLmlzUmVxdWlyZWQsXG4gIC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9wcy5nZXRJbnB1dFJlZn1cbiAgICAgICAgICB2YWx1ZT17dGhpcy5wcm9wcy52YWx1ZSA9PT0gdW5kZWZpbmVkID8gJycgOiB0aGlzLnByb3BzLnZhbHVlfVxuICAgICAgICAgIHR5cGU9e3R5cGV9XG4gICAgICAgICAgb25CbHVyPXt0aGlzLmhhbmRsZUJsdXJ9XG4gICAgICAgICAgb25DaGFuZ2U9e3RoaXMucHJvcHMub25DaGFuZ2V9XG4gICAgICAgIC8+XG4gICAgICApO1xuICAgIH1cbiAgfTtcbn1cbiJdfQ== */"),
10228
10065
  name: this.props.name,
10229
10066
  disabled: this.props.disabled,
10230
10067
  ref: this.props.getInputRef,
@@ -10260,7 +10097,7 @@ let CustomFieldDefinitionsConnector = /*#__PURE__*/function (_Component) {
10260
10097
  value: function componentDidMount() {
10261
10098
  var _context;
10262
10099
  const hasUnsupportedResource = _someInstanceProperty__default["default"](_context = this.props.resources).call(_context, resource => !_includesInstanceProperty__default["default"](customizableResources$1).call(customizableResources$1, resource));
10263
- !!hasUnsupportedResource ? process.env.NODE_ENV !== "production" ? invariant__default["default"](false, "core/components/custom-field-definitions-connector: some of the specified resources are not supported.") : invariant__default["default"](false) : void 0;
10100
+ !!hasUnsupportedResource ? process.env.NODE_ENV !== "production" ? invariant__default["default"](false, `core/components/custom-field-definitions-connector: some of the specified resources are not supported.`) : invariant__default["default"](false) : void 0;
10264
10101
  }
10265
10102
  }, {
10266
10103
  key: "render",
@@ -10278,9 +10115,9 @@ CustomFieldDefinitionsConnector.displayName = 'CustomFieldDefinitionsConnector';
10278
10115
  CustomFieldDefinitionsConnector.defaultProps = {
10279
10116
  resources: []
10280
10117
  };
10281
- const stringifyResources$1 = resources => _mapInstanceProperty__default["default"](resources).call(resources, resource => "\"".concat(resource, "\"")).join();
10118
+ const stringifyResources$1 = resources => _mapInstanceProperty__default["default"](resources).call(resources, resource => `"${resource}"`).join();
10282
10119
  const mapPropsToOptions = ownProps => {
10283
- const where = ownProps.resources.length > 0 ? "resourceTypeIds contains any (".concat(stringifyResources$1(ownProps.resources), ")") : undefined;
10120
+ const where = ownProps.resources.length > 0 ? `resourceTypeIds contains any (${stringifyResources$1(ownProps.resources)})` : undefined;
10284
10121
  return {
10285
10122
  variables: {
10286
10123
  where,
@@ -10341,19 +10178,19 @@ const graphQlDocToForm = typeDefinition => {
10341
10178
  key: typeDefinition.key,
10342
10179
  name: l10n.transformLocalizedFieldToLocalizedString(typeDefinition.nameAllLocales),
10343
10180
  fieldDefinitions: _mapInstanceProperty__default["default"](_context = typeDefinition.fieldDefinitions).call(_context, fieldDefinition => {
10344
- var _fieldDefinition$type, _context2, _fieldDefinition$type2, _context3;
10181
+ var _context2, _context3;
10345
10182
  return {
10346
10183
  name: fieldDefinition.name,
10347
10184
  required: fieldDefinition.required,
10348
10185
  inputHint: fieldDefinition.inputHint,
10349
- type: ((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 || (_fieldDefinition$type = _fieldDefinition$type.elementType) === null || _fieldDefinition$type === void 0 ? void 0 : _fieldDefinition$type.name) === 'LocalizedEnum' ? _objectSpread$z(_objectSpread$z({}, fieldDefinition.type), {}, {
10186
+ type: fieldDefinition.type?.elementType?.name === 'LocalizedEnum' ? _objectSpread$z(_objectSpread$z({}, fieldDefinition.type), {}, {
10350
10187
  elementType: _objectSpread$z(_objectSpread$z({}, fieldDefinition.type.elementType), {}, {
10351
10188
  values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type.elementType)).call(_context2, value => ({
10352
10189
  key: value.key,
10353
10190
  label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
10354
10191
  }))
10355
10192
  })
10356
- }) : ((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum' ? _objectSpread$z(_objectSpread$z({}, fieldDefinition.type), {}, {
10193
+ }) : fieldDefinition.type?.name === 'LocalizedEnum' ? _objectSpread$z(_objectSpread$z({}, fieldDefinition.type), {}, {
10357
10194
  values: _mapInstanceProperty__default["default"](_context3 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context3, value => ({
10358
10195
  key: value.key,
10359
10196
  label: l10n.transformLocalizedFieldToLocalizedString(value.labelAllLocales)
@@ -10385,7 +10222,7 @@ const formToGraphQlDoc = formCustomFields => ({
10385
10222
  // TODO(pa3): find usages and make sure only 1 param is passed
10386
10223
  const createEmptyCustomFields = typeDefinition => ({
10387
10224
  fields: {},
10388
- type: (typeDefinition === null || typeDefinition === void 0 ? void 0 : typeDefinition.type) || {
10225
+ type: typeDefinition?.type || {
10389
10226
  fieldDefinitions: []
10390
10227
  }
10391
10228
  });
@@ -10410,7 +10247,7 @@ let CustomFieldTypeDefinitionsConnector = /*#__PURE__*/function (_Component) {
10410
10247
  value: function componentDidMount() {
10411
10248
  var _context;
10412
10249
  const hasUnsupportedResource = _someInstanceProperty__default["default"](_context = this.props.resources).call(_context, resource => !_includesInstanceProperty__default["default"](customizableResources).call(customizableResources, resource));
10413
- !!hasUnsupportedResource ? process.env.NODE_ENV !== "production" ? invariant__default["default"](false, "core/components/custom-field-definitions-connector: some of the specified resources are not supported.") : invariant__default["default"](false) : void 0;
10250
+ !!hasUnsupportedResource ? process.env.NODE_ENV !== "production" ? invariant__default["default"](false, `core/components/custom-field-definitions-connector: some of the specified resources are not supported.`) : invariant__default["default"](false) : void 0;
10414
10251
  }
10415
10252
  }, {
10416
10253
  key: "render",
@@ -10433,9 +10270,9 @@ CustomFieldTypeDefinitionsConnector.graphQlDocToForm = graphQlDocToForm;
10433
10270
  CustomFieldTypeDefinitionsConnector.formToRestDoc = formToRestDoc;
10434
10271
  CustomFieldTypeDefinitionsConnector.formToGraphQlDoc = formToGraphQlDoc;
10435
10272
  CustomFieldTypeDefinitionsConnector.createEmptyCustomFields = createEmptyCustomFields;
10436
- const stringifyResources = resources => _mapInstanceProperty__default["default"](resources).call(resources, resource => "\"".concat(resource, "\"")).join();
10273
+ const stringifyResources = resources => _mapInstanceProperty__default["default"](resources).call(resources, resource => `"${resource}"`).join();
10437
10274
  const createGraphQlOptions = ownProps => {
10438
- const where = ownProps.resources.length > 0 ? "resourceTypeIds contains any (".concat(stringifyResources(ownProps.resources), ")") : undefined;
10275
+ const where = ownProps.resources.length > 0 ? `resourceTypeIds contains any (${stringifyResources(ownProps.resources)})` : undefined;
10439
10276
  return {
10440
10277
  variables: {
10441
10278
  where,
@@ -10486,7 +10323,7 @@ const extractDuplicatedValues = (values, type, language, languages) => {
10486
10323
  let validatedValues = [];
10487
10324
  if (type.name.toLowerCase() === 'money') {
10488
10325
  validatedValues = unique(values, ['amount', 'currencyCode']);
10489
- } else if (type.name.toLowerCase() === 'reference') validatedValues = unique(_filterInstanceProperty__default["default"](values).call(values, value => value === null || value === void 0 ? void 0 : value.id), ['id']);else if (type.name.toLowerCase() === 'localizedstring') {
10326
+ } else if (type.name.toLowerCase() === 'reference') validatedValues = unique(_filterInstanceProperty__default["default"](values).call(values, value => value?.id), ['id']);else if (type.name.toLowerCase() === 'localizedstring') {
10490
10327
  validatedValues = unique(values, languages);
10491
10328
  } else validatedValues = unique(values);
10492
10329
  return validatedValues;
@@ -10625,10 +10462,9 @@ var messages$s = reactIntl.defineMessages({
10625
10462
  const FIELD_NAME = 'custom';
10626
10463
 
10627
10464
  function ownKeys$w(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; }
10628
- function _objectSpread$w(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$w(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$w(Object(t))).call(_context8, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
10465
+ function _objectSpread$w(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$w(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$w(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
10629
10466
  const transformFieldType = fieldDefinition => {
10630
- var _fieldDefinition$type, _fieldDefinition$type2;
10631
- if (((_fieldDefinition$type = fieldDefinition.type) === null || _fieldDefinition$type === void 0 || (_fieldDefinition$type = _fieldDefinition$type.elementType) === null || _fieldDefinition$type === void 0 ? void 0 : _fieldDefinition$type.name) === 'LocalizedEnum') {
10467
+ if (fieldDefinition.type?.elementType?.name === 'LocalizedEnum') {
10632
10468
  var _context;
10633
10469
  return _objectSpread$w(_objectSpread$w({}, fieldDefinition.type), {}, {
10634
10470
  elementType: _objectSpread$w(_objectSpread$w({}, fieldDefinition.type.elementType), {}, {
@@ -10638,7 +10474,7 @@ const transformFieldType = fieldDefinition => {
10638
10474
  }))
10639
10475
  })
10640
10476
  });
10641
- } else if (((_fieldDefinition$type2 = fieldDefinition.type) === null || _fieldDefinition$type2 === void 0 ? void 0 : _fieldDefinition$type2.name) === 'LocalizedEnum') {
10477
+ } else if (fieldDefinition.type?.name === 'LocalizedEnum') {
10642
10478
  var _context2;
10643
10479
  return _objectSpread$w(_objectSpread$w({}, fieldDefinition.type), {}, {
10644
10480
  values: _mapInstanceProperty__default["default"](_context2 = _valuesInstanceProperty__default["default"](fieldDefinition.type)).call(_context2, value => ({
@@ -10685,9 +10521,9 @@ const createFormStateFromResource = resource => {
10685
10521
  };
10686
10522
  };
10687
10523
  const createGraphQlDocFromFormState = formState => {
10688
- var _formState$FIELD_NAME, _context5;
10524
+ var _context5;
10689
10525
  // Unset the custom type if it's not in the form state
10690
- if (!((_formState$FIELD_NAME = formState[FIELD_NAME]) !== null && _formState$FIELD_NAME !== void 0 && (_formState$FIELD_NAME = _formState$FIELD_NAME.type) !== null && _formState$FIELD_NAME !== void 0 && _formState$FIELD_NAME.id)) {
10526
+ if (!formState[FIELD_NAME]?.type?.id) {
10691
10527
  return {
10692
10528
  [FIELD_NAME]: {}
10693
10529
  };
@@ -10713,8 +10549,7 @@ const createGraphQlDocFromFormState = formState => {
10713
10549
 
10714
10550
  // Creates a root field name accessor for `custom` form state
10715
10551
  const createRootFieldName = rootFieldName => {
10716
- var _context6;
10717
- return rootFieldName ? _concatInstanceProperty__default["default"](_context6 = "".concat(rootFieldName, ".")).call(_context6, FIELD_NAME) : FIELD_NAME;
10552
+ return rootFieldName ? `${rootFieldName}.${FIELD_NAME}` : FIELD_NAME;
10718
10553
  };
10719
10554
 
10720
10555
  function ownKeys$v(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; }
@@ -10723,8 +10558,7 @@ const typeDefinitionsExist = typeDefinitions => {
10723
10558
  return typeDefinitions.length > 0;
10724
10559
  };
10725
10560
  const typeDefinitionSelected = (formValues, rootFieldName) => {
10726
- var _getIn, _getIn2;
10727
- return ((_getIn = formik.getIn(formValues, rootFieldName)) === null || _getIn === void 0 ? void 0 : _getIn.type) && ((_getIn2 = formik.getIn(formValues, rootFieldName)) === null || _getIn2 === void 0 || (_getIn2 = _getIn2.type) === null || _getIn2 === void 0 ? void 0 : _getIn2.obj);
10561
+ return formik.getIn(formValues, rootFieldName)?.type && formik.getIn(formValues, rootFieldName)?.type?.obj;
10728
10562
  };
10729
10563
  const typeDefinitionContainsFieldDefinitions = (formValues, rootFieldName) => {
10730
10564
  return formik.getIn(formValues, rootFieldName).type.obj.key && formik.getIn(formValues, rootFieldName).type.obj.fieldDefinitions.length > 0;
@@ -10764,7 +10598,7 @@ const CustomFieldsInputWrapper = _ref2 => {
10764
10598
  max: "scale",
10765
10599
  children: jsxRuntime.jsx(CustomFields$1, {
10766
10600
  isReadOnly: isReadOnly,
10767
- name: "".concat(rootFieldName, ".fields"),
10601
+ name: `${rootFieldName}.fields`,
10768
10602
  fieldDefinitions: isReadOnly && hideEmptyFields ? fieldDefinitionsWithValues(formValues, rootFieldName) : formik.getIn(formValues, rootFieldName).type.obj.fieldDefinitions
10769
10603
  })
10770
10604
  });
@@ -10802,7 +10636,6 @@ const createFormStateFromTypeDefinition = selectedTypeDefinition => {
10802
10636
  };
10803
10637
  };
10804
10638
  const CustomTypeSubform = _ref => {
10805
- var _getIn3, _getIn4;
10806
10639
  let typeDefinitions = _ref.typeDefinitions,
10807
10640
  isReadOnly = _ref.isReadOnly,
10808
10641
  isCondensed = _ref.isCondensed,
@@ -10828,16 +10661,15 @@ const CustomTypeSubform = _ref => {
10828
10661
  const handleTypeDefinitionSelect = React.useCallback(event => {
10829
10662
  const selectedTypeDefinition = _findInstanceProperty__default["default"](typeDefinitions).call(typeDefinitions, typeDefinition => typeDefinition.type.key === event.target.value);
10830
10663
  if (selectedTypeDefinition) {
10831
- var _initialValueCustomTy;
10832
10664
  const initialValueCustomType = formik.getIn(initialValues, rootFieldName);
10833
- const selectedCustomTypeKey = selectedTypeDefinition === null || selectedTypeDefinition === void 0 ? void 0 : selectedTypeDefinition.type.key;
10665
+ const selectedCustomTypeKey = selectedTypeDefinition?.type.key;
10834
10666
  let newFieldValue;
10835
10667
 
10836
10668
  /**
10837
10669
  * If the user selects the same custom type that was already selected, we need to reset the `custom` field
10838
10670
  * back to its initial value to ensure that the form state is consistent with the initial values.
10839
10671
  */
10840
- if ((initialValueCustomType === null || initialValueCustomType === void 0 || (_initialValueCustomTy = initialValueCustomType.type) === null || _initialValueCustomTy === void 0 || (_initialValueCustomTy = _initialValueCustomTy.obj) === null || _initialValueCustomTy === void 0 ? void 0 : _initialValueCustomTy.key) === selectedCustomTypeKey) {
10672
+ if (initialValueCustomType?.type?.obj?.key === selectedCustomTypeKey) {
10841
10673
  newFieldValue = initialValueCustomType;
10842
10674
  /**
10843
10675
  * Otherwise, set the `custom` field to the new custom type definition.
@@ -10856,8 +10688,7 @@ const CustomTypeSubform = _ref => {
10856
10688
  }
10857
10689
  }, [typeDefinitions, setFieldValue, validateForm, rootFieldName]);
10858
10690
  const typeDefinitionSelected = formValues => {
10859
- var _getIn, _getIn2;
10860
- return ((_getIn = formik.getIn(formValues, rootFieldName)) === null || _getIn === void 0 ? void 0 : _getIn.type) && ((_getIn2 = formik.getIn(formValues, rootFieldName)) === null || _getIn2 === void 0 || (_getIn2 = _getIn2.type) === null || _getIn2 === void 0 ? void 0 : _getIn2.obj);
10691
+ return formik.getIn(formValues, rootFieldName)?.type && formik.getIn(formValues, rootFieldName)?.type?.obj;
10861
10692
  };
10862
10693
 
10863
10694
  // if the user has read-only permissions, empty fields are hidden, and no type definition is selected, hide the component
@@ -10872,9 +10703,9 @@ const CustomTypeSubform = _ref => {
10872
10703
  children: jsxRuntime.jsx(uiKit.SelectInput, {
10873
10704
  isClearable: true,
10874
10705
  "data-testid": "custom-type-select",
10875
- name: "".concat(rootFieldName, ".type.obj.key"),
10876
- options: mapTypeDefinitionsToOptions(typeDefinitions, language, languages, (_getIn3 = formik.getIn(formValues, rootFieldName)) === null || _getIn3 === void 0 || (_getIn3 = _getIn3.type) === null || _getIn3 === void 0 ? void 0 : _getIn3.id),
10877
- value: (_getIn4 = formik.getIn(formValues, rootFieldName)) === null || _getIn4 === void 0 || (_getIn4 = _getIn4.type) === null || _getIn4 === void 0 || (_getIn4 = _getIn4.obj) === null || _getIn4 === void 0 ? void 0 : _getIn4.key,
10706
+ name: `${rootFieldName}.type.obj.key`,
10707
+ options: mapTypeDefinitionsToOptions(typeDefinitions, language, languages, formik.getIn(formValues, rootFieldName)?.type?.id),
10708
+ value: formik.getIn(formValues, rootFieldName)?.type?.obj?.key,
10878
10709
  onChange: handleTypeDefinitionSelect,
10879
10710
  placeholder: formatMessage(messages$s.typesPlaceholder),
10880
10711
  isReadOnly: isReadOnly
@@ -10960,7 +10791,7 @@ var fetchPimIndexStatus = (apolloClient, projectKey) => async dispatch => {
10960
10791
  try {
10961
10792
  await dispatch(sdk.actions.head({
10962
10793
  mcApiProxyTarget: constants.MC_API_PROXY_TARGETS.PIM_SEARCH,
10963
- uri: "/".concat(projectKey, "/search/products")
10794
+ uri: `/${projectKey}/search/products`
10964
10795
  }));
10965
10796
  return {
10966
10797
  status: 'indexed'
@@ -11033,9 +10864,9 @@ const getIndexingJobIds = _ref => {
11033
10864
  productTypes = _ref$data.productTypes,
11034
10865
  productSelections = _ref$data.productSelections;
11035
10866
  return {
11036
- productsJobId: (products === null || products === void 0 ? void 0 : products.indexingJobId) || (products === null || products === void 0 ? void 0 : products.existingIndexingJobId),
11037
- productTypesJobId: (productTypes === null || productTypes === void 0 ? void 0 : productTypes.indexingJobId) || (productTypes === null || productTypes === void 0 ? void 0 : productTypes.existingIndexingJobId),
11038
- productSelectionsJobId: (productSelections === null || productSelections === void 0 ? void 0 : productSelections.indexingJobId) || (productSelections === null || productSelections === void 0 ? void 0 : productSelections.existingIndexingJobId)
10867
+ productsJobId: products?.indexingJobId || products?.existingIndexingJobId,
10868
+ productTypesJobId: productTypes?.indexingJobId || productTypes?.existingIndexingJobId,
10869
+ productSelectionsJobId: productSelections?.indexingJobId || productSelections?.existingIndexingJobId
11039
10870
  };
11040
10871
  };
11041
10872
  let PimIndexerProvider = /*#__PURE__*/function (_PureComponent) {
@@ -11319,7 +11150,7 @@ function ownKeys$r(e, r) { var t = _Object$keys__default["default"](e); if (_Obj
11319
11150
  function _objectSpread$r(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$r(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$r(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
11320
11151
  const resourcesWithPlatformLimits = _Object$keys__default["default"](RESOURCES_WITH_PLATFORM_LIMITS);
11321
11152
  const createQueryVariables = platformLimit => _reduceInstanceProperty__default["default"](resourcesWithPlatformLimits).call(resourcesWithPlatformLimits, (previousIncludedLimits, nextNameOfLimit) => _objectSpread$r({
11322
- [camelCase__default["default"]("should include ".concat(nextNameOfLimit))]: platformLimit ? nextNameOfLimit === platformLimit : true
11153
+ [camelCase__default["default"](`should include ${nextNameOfLimit}`)]: platformLimit ? nextNameOfLimit === platformLimit : true
11323
11154
  }, previousIncludedLimits), {});
11324
11155
  var createPlatformLimitsQueryVariables = createQueryVariables;
11325
11156
 
@@ -11336,7 +11167,7 @@ const usePlatformLimitsFetcher = platformLimit => {
11336
11167
  error = _useQuery.error,
11337
11168
  data = _useQuery.data,
11338
11169
  refetch = _useQuery.refetch;
11339
- const platformLimits = !loading ? omit__default["default"](data === null || data === void 0 ? void 0 : data.limits, '__typename') : {};
11170
+ const platformLimits = !loading ? omit__default["default"](data?.limits, '__typename') : {};
11340
11171
  return {
11341
11172
  isLoading: loading,
11342
11173
  error,
@@ -11474,7 +11305,7 @@ const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
11474
11305
  isExternal: true,
11475
11306
  to: constants.SUPPORT_PORTAL_URL,
11476
11307
  children: msg
11477
- }, "msg-".concat(msg));
11308
+ }, `msg-${msg}`);
11478
11309
  const PlatformLimitWarningNotification = _ref => {
11479
11310
  let resource = _ref.resource,
11480
11311
  limit = _ref.limit;
@@ -11536,11 +11367,10 @@ const getPlatformLimitsStatus = _ref3 => {
11536
11367
  total = _ref3.total,
11537
11368
  intl = _ref3.intl;
11538
11369
  if (limit) {
11539
- var _context;
11540
- return _concatInstanceProperty__default["default"](_context = "(".concat(intl.formatNumber(current), "/")).call(_context, intl.formatNumber(limit), ")");
11370
+ return `(${intl.formatNumber(current)}/${intl.formatNumber(limit)})`;
11541
11371
  }
11542
11372
  if (total) {
11543
- return "(".concat(intl.formatNumber(total), ")");
11373
+ return `(${intl.formatNumber(total)})`;
11544
11374
  }
11545
11375
  return '';
11546
11376
  };
@@ -11561,18 +11391,17 @@ const useShippingMethodsPlatformLimitsFetcher = () => {
11561
11391
  var useShippingMethodsPlatformLimitsFetcher$1 = useShippingMethodsPlatformLimitsFetcher;
11562
11392
 
11563
11393
  const useShippingMethodsPlatformLimits$1 = () => {
11564
- var _platformLimits$shipp;
11565
11394
  const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
11566
11395
  platformLimits = _useShippingMethodsPl.platformLimits;
11567
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$shipp = platformLimits.shippingMethods) !== null && _platformLimits$shipp !== void 0 && _platformLimits$shipp.total)) {
11396
+ if (!platformLimits?.shippingMethods?.total) {
11568
11397
  return {
11569
11398
  hasReachedShippingMethodsWarningLimit: false,
11570
11399
  hasReachedShippingMethodsErrorLimit: false
11571
11400
  };
11572
11401
  }
11573
- const _platformLimits$shipp2 = platformLimits.shippingMethods.total,
11574
- limit = _platformLimits$shipp2.limit,
11575
- current = _platformLimits$shipp2.current;
11402
+ const _platformLimits$shipp = platformLimits.shippingMethods.total,
11403
+ limit = _platformLimits$shipp.limit,
11404
+ current = _platformLimits$shipp.current;
11576
11405
  const hasReachedShippingMethodsWarningLimit = getHasExceededWarningThreshold({
11577
11406
  limit,
11578
11407
  current
@@ -11589,13 +11418,12 @@ const useShippingMethodsPlatformLimits$1 = () => {
11589
11418
  var useShippingMethodsPlatformLimitsStatus = useShippingMethodsPlatformLimits$1;
11590
11419
 
11591
11420
  const PlatformLimitsShippingMethodsNotifications = () => {
11592
- var _platformLimits$shipp;
11593
11421
  const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
11594
11422
  platformLimits = _useShippingMethodsPl.platformLimits;
11595
11423
  const _useShippingMethodsPl2 = useShippingMethodsPlatformLimitsStatus(),
11596
11424
  hasReachedShippingMethodsWarningLimit = _useShippingMethodsPl2.hasReachedShippingMethodsWarningLimit,
11597
11425
  hasReachedShippingMethodsErrorLimit = _useShippingMethodsPl2.hasReachedShippingMethodsErrorLimit;
11598
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$shipp = platformLimits.shippingMethods) !== null && _platformLimits$shipp !== void 0 && _platformLimits$shipp.total)) {
11426
+ if (!platformLimits?.shippingMethods?.total) {
11599
11427
  return null;
11600
11428
  }
11601
11429
  if (hasReachedShippingMethodsErrorLimit) {
@@ -11643,13 +11471,12 @@ var messages$n = reactIntl.defineMessages({
11643
11471
  });
11644
11472
 
11645
11473
  const PlatformLimitsShippingMethodsStatus = _ref => {
11646
- var _platformLimits$shipp, _platformLimits$shipp2;
11647
11474
  let total = _ref.total;
11648
11475
  const intl = reactIntl.useIntl();
11649
11476
  const _useShippingMethodsPl = useShippingMethodsPlatformLimitsFetcher$1(),
11650
11477
  platformLimits = _useShippingMethodsPl.platformLimits;
11651
- const current = platformLimits === null || platformLimits === void 0 || (_platformLimits$shipp = platformLimits.shippingMethods) === null || _platformLimits$shipp === void 0 || (_platformLimits$shipp = _platformLimits$shipp.total) === null || _platformLimits$shipp === void 0 ? void 0 : _platformLimits$shipp.current;
11652
- const limit = platformLimits === null || platformLimits === void 0 || (_platformLimits$shipp2 = platformLimits.shippingMethods) === null || _platformLimits$shipp2 === void 0 || (_platformLimits$shipp2 = _platformLimits$shipp2.total) === null || _platformLimits$shipp2 === void 0 ? void 0 : _platformLimits$shipp2.limit;
11478
+ const current = platformLimits?.shippingMethods?.total?.current;
11479
+ const limit = platformLimits?.shippingMethods?.total?.limit;
11653
11480
  return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
11654
11481
  scale: "s",
11655
11482
  alignItems: "baseline",
@@ -11721,18 +11548,17 @@ const useTaxCategoriesPlatformLimitsFetcher = () => {
11721
11548
  var useTaxCategoriesPlatformLimitsFetcher$1 = useTaxCategoriesPlatformLimitsFetcher;
11722
11549
 
11723
11550
  const useTaxCategoriesPlatformLimits$1 = () => {
11724
- var _platformLimits$taxCa;
11725
11551
  const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
11726
11552
  platformLimits = _useTaxCategoriesPlat.platformLimits;
11727
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$taxCa = platformLimits.taxCategories) !== null && _platformLimits$taxCa !== void 0 && _platformLimits$taxCa.total)) {
11553
+ if (!platformLimits?.taxCategories?.total) {
11728
11554
  return {
11729
11555
  hasReachedTaxCategoriesWarningLimit: false,
11730
11556
  hasReachedTaxCategoriesErrorLimit: false
11731
11557
  };
11732
11558
  }
11733
- const _platformLimits$taxCa2 = platformLimits.taxCategories.total,
11734
- limit = _platformLimits$taxCa2.limit,
11735
- current = _platformLimits$taxCa2.current;
11559
+ const _platformLimits$taxCa = platformLimits.taxCategories.total,
11560
+ limit = _platformLimits$taxCa.limit,
11561
+ current = _platformLimits$taxCa.current;
11736
11562
  const hasReachedTaxCategoriesWarningLimit = getHasExceededWarningThreshold({
11737
11563
  limit,
11738
11564
  current
@@ -11749,13 +11575,12 @@ const useTaxCategoriesPlatformLimits$1 = () => {
11749
11575
  var useTaxCategoriesPlatformLimitsStatus = useTaxCategoriesPlatformLimits$1;
11750
11576
 
11751
11577
  const PlatformLimitsTaxCategoriesNotifications = () => {
11752
- var _platformLimits$taxCa;
11753
11578
  const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
11754
11579
  platformLimits = _useTaxCategoriesPlat.platformLimits;
11755
11580
  const _useTaxCategoriesPlat2 = useTaxCategoriesPlatformLimitsStatus(),
11756
11581
  hasReachedTaxCategoriesWarningLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesWarningLimit,
11757
11582
  hasReachedTaxCategoriesErrorLimit = _useTaxCategoriesPlat2.hasReachedTaxCategoriesErrorLimit;
11758
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$taxCa = platformLimits.taxCategories) !== null && _platformLimits$taxCa !== void 0 && _platformLimits$taxCa.total)) {
11583
+ if (!platformLimits?.taxCategories?.total) {
11759
11584
  return null;
11760
11585
  }
11761
11586
  if (hasReachedTaxCategoriesErrorLimit) {
@@ -11803,13 +11628,12 @@ var messages$l = reactIntl.defineMessages({
11803
11628
  });
11804
11629
 
11805
11630
  const PlatformLimitsTaxCategoriesStatus = _ref => {
11806
- var _platformLimits$taxCa, _platformLimits$taxCa2;
11807
11631
  let total = _ref.total;
11808
11632
  const intl = reactIntl.useIntl();
11809
11633
  const _useTaxCategoriesPlat = useTaxCategoriesPlatformLimitsFetcher$1(),
11810
11634
  platformLimits = _useTaxCategoriesPlat.platformLimits;
11811
- const current = platformLimits === null || platformLimits === void 0 || (_platformLimits$taxCa = platformLimits.taxCategories) === null || _platformLimits$taxCa === void 0 || (_platformLimits$taxCa = _platformLimits$taxCa.total) === null || _platformLimits$taxCa === void 0 ? void 0 : _platformLimits$taxCa.current;
11812
- const limit = platformLimits === null || platformLimits === void 0 || (_platformLimits$taxCa2 = platformLimits.taxCategories) === null || _platformLimits$taxCa2 === void 0 || (_platformLimits$taxCa2 = _platformLimits$taxCa2.total) === null || _platformLimits$taxCa2 === void 0 ? void 0 : _platformLimits$taxCa2.limit;
11635
+ const current = platformLimits?.taxCategories?.total?.current;
11636
+ const limit = platformLimits?.taxCategories?.total?.limit;
11813
11637
  return jsxRuntime.jsx(StatusText, {
11814
11638
  intlMessage: messages$l.taxCategoriesStatus,
11815
11639
  children: getPlatformLimitsStatus({
@@ -11875,18 +11699,17 @@ const useZonesPlatformLimitsFetcher = () => {
11875
11699
  var useZonesPlatformLimitsFetcher$1 = useZonesPlatformLimitsFetcher;
11876
11700
 
11877
11701
  const useZonesPlatformLimits$1 = () => {
11878
- var _platformLimits$zones;
11879
11702
  const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
11880
11703
  platformLimits = _useZonesPlatformLimi.platformLimits;
11881
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$zones = platformLimits.zones) !== null && _platformLimits$zones !== void 0 && _platformLimits$zones.total)) {
11704
+ if (!platformLimits?.zones?.total) {
11882
11705
  return {
11883
11706
  hasReachedZonesWarningLimit: false,
11884
11707
  hasReachedZonesErrorLimit: false
11885
11708
  };
11886
11709
  }
11887
- const _platformLimits$zones2 = platformLimits.zones.total,
11888
- limit = _platformLimits$zones2.limit,
11889
- current = _platformLimits$zones2.current;
11710
+ const _platformLimits$zones = platformLimits.zones.total,
11711
+ limit = _platformLimits$zones.limit,
11712
+ current = _platformLimits$zones.current;
11890
11713
  const hasReachedZonesWarningLimit = getHasExceededWarningThreshold({
11891
11714
  limit,
11892
11715
  current
@@ -11903,13 +11726,12 @@ const useZonesPlatformLimits$1 = () => {
11903
11726
  var useZonesPlatformLimitsStatus = useZonesPlatformLimits$1;
11904
11727
 
11905
11728
  const PlatformLimitsZonesNotifications = () => {
11906
- var _platformLimits$zones;
11907
11729
  const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
11908
11730
  platformLimits = _useZonesPlatformLimi.platformLimits;
11909
11731
  const _useZonesPlatformLimi2 = useZonesPlatformLimitsStatus(),
11910
11732
  hasReachedZonesWarningLimit = _useZonesPlatformLimi2.hasReachedZonesWarningLimit,
11911
11733
  hasReachedZonesErrorLimit = _useZonesPlatformLimi2.hasReachedZonesErrorLimit;
11912
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$zones = platformLimits.zones) !== null && _platformLimits$zones !== void 0 && _platformLimits$zones.total)) {
11734
+ if (!platformLimits?.zones?.total) {
11913
11735
  return null;
11914
11736
  }
11915
11737
  if (hasReachedZonesErrorLimit) {
@@ -11957,13 +11779,12 @@ var messages$j = reactIntl.defineMessages({
11957
11779
  });
11958
11780
 
11959
11781
  const PlatformLimitsZonesStatus = _ref => {
11960
- var _platformLimits$zones, _platformLimits$zones2;
11961
11782
  let total = _ref.total;
11962
11783
  const intl = reactIntl.useIntl();
11963
11784
  const _useZonesPlatformLimi = useZonesPlatformLimitsFetcher$1(),
11964
11785
  platformLimits = _useZonesPlatformLimi.platformLimits;
11965
- const current = platformLimits === null || platformLimits === void 0 || (_platformLimits$zones = platformLimits.zones) === null || _platformLimits$zones === void 0 || (_platformLimits$zones = _platformLimits$zones.total) === null || _platformLimits$zones === void 0 ? void 0 : _platformLimits$zones.current;
11966
- const limit = platformLimits === null || platformLimits === void 0 || (_platformLimits$zones2 = platformLimits.zones) === null || _platformLimits$zones2 === void 0 || (_platformLimits$zones2 = _platformLimits$zones2.total) === null || _platformLimits$zones2 === void 0 ? void 0 : _platformLimits$zones2.limit;
11786
+ const current = platformLimits?.zones?.total?.current;
11787
+ const limit = platformLimits?.zones?.total?.limit;
11967
11788
  return jsxRuntime.jsx(StatusText, {
11968
11789
  intlMessage: messages$j.zonesStatus,
11969
11790
  children: getPlatformLimitsStatus({
@@ -12029,18 +11850,17 @@ const useCustomersPlatformLimitsFetcher = () => {
12029
11850
  var useCustomersPlatformLimitsFetcher$1 = useCustomersPlatformLimitsFetcher;
12030
11851
 
12031
11852
  const useCustomersPlatformLimits$2 = () => {
12032
- var _platformLimits$custo;
12033
11853
  const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
12034
11854
  platformLimits = _useCustomersPlatform.platformLimits;
12035
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$custo = platformLimits.customers) !== null && _platformLimits$custo !== void 0 && _platformLimits$custo.total)) {
11855
+ if (!platformLimits?.customers?.total) {
12036
11856
  return {
12037
11857
  hasReachedCustomersWarningLimit: false,
12038
11858
  hasReachedCustomersErrorLimit: false
12039
11859
  };
12040
11860
  }
12041
- const _platformLimits$custo2 = platformLimits.customers.total,
12042
- limit = _platformLimits$custo2.limit,
12043
- current = _platformLimits$custo2.current;
11861
+ const _platformLimits$custo = platformLimits.customers.total,
11862
+ limit = _platformLimits$custo.limit,
11863
+ current = _platformLimits$custo.current;
12044
11864
  const hasReachedCustomersWarningLimit = getHasExceededWarningThreshold({
12045
11865
  limit,
12046
11866
  current
@@ -12071,13 +11891,12 @@ const useCustomersPlatormLimitsModalState = () => {
12071
11891
  var useCustomersPlatormLimitsModalState$1 = useCustomersPlatormLimitsModalState;
12072
11892
 
12073
11893
  const PlatformLimitsCustomersNotifications = () => {
12074
- var _platformLimits$custo;
12075
11894
  const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
12076
11895
  platformLimits = _useCustomersPlatform.platformLimits;
12077
11896
  const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
12078
11897
  hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
12079
11898
  hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
12080
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$custo = platformLimits.customers) !== null && _platformLimits$custo !== void 0 && _platformLimits$custo.total)) {
11899
+ if (!platformLimits?.customers?.total) {
12081
11900
  return jsxRuntime.jsx("div", {});
12082
11901
  }
12083
11902
  if (hasReachedCustomersErrorLimit) {
@@ -12136,16 +11955,15 @@ var _ref$4 = process.env.NODE_ENV === "production" ? {
12136
11955
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__$4
12137
11956
  };
12138
11957
  const PlatformLimitsCustomersStatus = () => {
12139
- var _platformLimits$custo;
12140
11958
  const intl = reactIntl.useIntl();
12141
11959
  const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
12142
11960
  platformLimits = _useCustomersPlatform.platformLimits;
12143
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$custo = platformLimits.customers) !== null && _platformLimits$custo !== void 0 && _platformLimits$custo.total)) {
11961
+ if (!platformLimits?.customers?.total) {
12144
11962
  return null;
12145
11963
  }
12146
- const _platformLimits$custo2 = platformLimits.customers.total,
12147
- current = _platformLimits$custo2.current,
12148
- limit = _platformLimits$custo2.limit;
11964
+ const _platformLimits$custo = platformLimits.customers.total,
11965
+ current = _platformLimits$custo.current,
11966
+ limit = _platformLimits$custo.limit;
12149
11967
  return jsxRuntime.jsx("div", {
12150
11968
  css: _ref$4,
12151
11969
  children: jsxRuntime.jsx(uiKit.Text.Detail, {
@@ -12327,7 +12145,6 @@ PlatformLimitsCustomersCombined.displayName = 'PlatformLimitsCustomersCombined';
12327
12145
  var CustomersCombined = PlatformLimitsCustomersCombined;
12328
12146
 
12329
12147
  const useCustomersPlatformLimits = () => {
12330
- var _platformLimits$custo;
12331
12148
  const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
12332
12149
  platformLimits = _useCustomersPlatform.platformLimits,
12333
12150
  refetch = _useCustomersPlatform.refetch;
@@ -12335,7 +12152,7 @@ const useCustomersPlatformLimits = () => {
12335
12152
  hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
12336
12153
  hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
12337
12154
  const interceptNavigation = useInterceptNavigation$1(hasReachedCustomersErrorLimit);
12338
- const maxGroupsPerCustomerLimit = platformLimits === null || platformLimits === void 0 || (_platformLimits$custo = platformLimits.customers) === null || _platformLimits$custo === void 0 || (_platformLimits$custo = _platformLimits$custo.maxGroupsPerCustomer) === null || _platformLimits$custo === void 0 ? void 0 : _platformLimits$custo.limit;
12155
+ const maxGroupsPerCustomerLimit = platformLimits?.customers?.maxGroupsPerCustomer?.limit;
12339
12156
  return {
12340
12157
  CustomersLimits: {
12341
12158
  Notifications: CustomersNotification,
@@ -12371,17 +12188,16 @@ const injectCustomersPlatformLimits = () => WrappedComponent => {
12371
12188
  var injectCustomersPlatformLimits$1 = injectCustomersPlatformLimits;
12372
12189
 
12373
12190
  const useBusinessUnitsPlatformLimitsFetcher = () => {
12374
- var _platformLimits$busin, _platformLimits$busin2, _platformLimits$busin3, _platformLimits$busin4;
12375
12191
  const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.businessUnits),
12376
12192
  isLoading = _usePlatformLimitsFet.isLoading,
12377
12193
  error = _usePlatformLimitsFet.error,
12378
12194
  platformLimits = _usePlatformLimitsFet.platformLimits,
12379
12195
  refetch = _usePlatformLimitsFet.refetch;
12380
12196
  const formattedPlatformLimits = {
12381
- businessUnitsMaxDivisionsLimit: (_platformLimits$busin = platformLimits.businessUnits) === null || _platformLimits$busin === void 0 ? void 0 : _platformLimits$busin.maxDivisions.limit,
12382
- businessUnitsMaxDepthLimit: (_platformLimits$busin2 = platformLimits.businessUnits) === null || _platformLimits$busin2 === void 0 ? void 0 : _platformLimits$busin2.maxDepthLimit.limit,
12383
- businessUnitsMaxAssociatesLimit: (_platformLimits$busin3 = platformLimits.businessUnits) === null || _platformLimits$busin3 === void 0 ? void 0 : _platformLimits$busin3.maxAssociates.limit,
12384
- businessUnitsMaxAssociateRolesLimit: (_platformLimits$busin4 = platformLimits.businessUnits) === null || _platformLimits$busin4 === void 0 ? void 0 : _platformLimits$busin4.maxAssociateRoles.limit
12197
+ businessUnitsMaxDivisionsLimit: platformLimits.businessUnits?.maxDivisions.limit,
12198
+ businessUnitsMaxDepthLimit: platformLimits.businessUnits?.maxDepthLimit.limit,
12199
+ businessUnitsMaxAssociatesLimit: platformLimits.businessUnits?.maxAssociates.limit,
12200
+ businessUnitsMaxAssociateRolesLimit: platformLimits.businessUnits?.maxAssociateRoles.limit
12385
12201
  };
12386
12202
  return {
12387
12203
  isLoading,
@@ -12419,18 +12235,17 @@ const useCustomerGroupsPlatformLimitsFetcher = () => {
12419
12235
  var useCustomerGroupsPlatformLimitsFetcher$1 = useCustomerGroupsPlatformLimitsFetcher;
12420
12236
 
12421
12237
  const useCustomerGroupsPlatformLimitsStatus = () => {
12422
- var _platformLimits$custo;
12423
12238
  const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
12424
12239
  platformLimits = _useCustomerGroupsPla.platformLimits;
12425
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$custo = platformLimits.customerGroups) !== null && _platformLimits$custo !== void 0 && _platformLimits$custo.total)) {
12240
+ if (!platformLimits?.customerGroups?.total) {
12426
12241
  return {
12427
12242
  hasReachedCustomerGroupsWarningLimit: false,
12428
12243
  hasReachedCustomerGroupsErrorLimit: false
12429
12244
  };
12430
12245
  }
12431
- const _platformLimits$custo2 = platformLimits.customerGroups.total,
12432
- limit = _platformLimits$custo2.limit,
12433
- current = _platformLimits$custo2.current;
12246
+ const _platformLimits$custo = platformLimits.customerGroups.total,
12247
+ limit = _platformLimits$custo.limit,
12248
+ current = _platformLimits$custo.current;
12434
12249
  const hasReachedCustomerGroupsWarningLimit = getHasExceededWarningThreshold({
12435
12250
  limit,
12436
12251
  current
@@ -12461,13 +12276,12 @@ const useCustomerGroupsPlatormLimitsModalState = () => {
12461
12276
  var useCustomerGroupsPlatormLimitsModalState$1 = useCustomerGroupsPlatormLimitsModalState;
12462
12277
 
12463
12278
  const PlatformLimitsCustomerGroupsNotifications = () => {
12464
- var _platformLimits$custo;
12465
12279
  const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
12466
12280
  platformLimits = _useCustomerGroupsPla.platformLimits;
12467
12281
  const _useCustomerGroupsPla2 = useCustomerGroupsPlatformLimitsStatus$1(),
12468
12282
  hasReachedCustomerGroupsWarningLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsWarningLimit,
12469
12283
  hasReachedCustomerGroupsErrorLimit = _useCustomerGroupsPla2.hasReachedCustomerGroupsErrorLimit;
12470
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$custo = platformLimits.customerGroups) !== null && _platformLimits$custo !== void 0 && _platformLimits$custo.total)) {
12284
+ if (!platformLimits?.customerGroups?.total) {
12471
12285
  return jsxRuntime.jsx("div", {});
12472
12286
  }
12473
12287
  if (hasReachedCustomerGroupsErrorLimit) {
@@ -12526,16 +12340,15 @@ var _ref$3 = process.env.NODE_ENV === "production" ? {
12526
12340
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__$3
12527
12341
  };
12528
12342
  const PlatformLimitsCustomerGroupsStatus = () => {
12529
- var _platformLimits$custo;
12530
12343
  const intl = reactIntl.useIntl();
12531
12344
  const _useCustomerGroupsPla = useCustomerGroupsPlatformLimitsFetcher$1(),
12532
12345
  platformLimits = _useCustomerGroupsPla.platformLimits;
12533
- if (!(platformLimits !== null && platformLimits !== void 0 && (_platformLimits$custo = platformLimits.customerGroups) !== null && _platformLimits$custo !== void 0 && _platformLimits$custo.total)) {
12346
+ if (!platformLimits?.customerGroups?.total) {
12534
12347
  return null;
12535
12348
  }
12536
- const _platformLimits$custo2 = platformLimits.customerGroups.total,
12537
- current = _platformLimits$custo2.current,
12538
- limit = _platformLimits$custo2.limit;
12349
+ const _platformLimits$custo = platformLimits.customerGroups.total,
12350
+ current = _platformLimits$custo.current,
12351
+ limit = _platformLimits$custo.limit;
12539
12352
  return jsxRuntime.jsx("div", {
12540
12353
  css: _ref$3,
12541
12354
  children: jsxRuntime.jsx(uiKit.Text.Detail, {
@@ -12757,18 +12570,17 @@ const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
12757
12570
  var injectCustomerGroupsPlatformLimits$1 = injectCustomerGroupsPlatformLimits;
12758
12571
 
12759
12572
  const useStoresPlatformLimitsFetcher = () => {
12760
- var _platformLimits$store, _platformLimits$store2, _platformLimits$store3, _platformLimits$store4, _platformLimits$store5;
12761
12573
  const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.stores),
12762
12574
  isLoading = _usePlatformLimitsFet.isLoading,
12763
12575
  error = _usePlatformLimitsFet.error,
12764
12576
  platformLimits = _usePlatformLimitsFet.platformLimits,
12765
12577
  refetch = _usePlatformLimitsFet.refetch;
12766
12578
  const formattedPlatformLimits = {
12767
- total: (_platformLimits$store = platformLimits.stores) === null || _platformLimits$store === void 0 ? void 0 : _platformLimits$store.total.limit,
12768
- storeLimit: (_platformLimits$store2 = platformLimits.stores) === null || _platformLimits$store2 === void 0 ? void 0 : _platformLimits$store2.total.limit,
12769
- storeCurrent: (_platformLimits$store3 = platformLimits.stores) === null || _platformLimits$store3 === void 0 ? void 0 : _platformLimits$store3.total.current,
12770
- inventorySupplyChannels: (_platformLimits$store4 = platformLimits.stores) === null || _platformLimits$store4 === void 0 ? void 0 : _platformLimits$store4.inventorySupplyChannels.limit,
12771
- productDistributionChannels: (_platformLimits$store5 = platformLimits.stores) === null || _platformLimits$store5 === void 0 ? void 0 : _platformLimits$store5.productDistributionChannels.limit
12579
+ total: platformLimits.stores?.total.limit,
12580
+ storeLimit: platformLimits.stores?.total.limit,
12581
+ storeCurrent: platformLimits.stores?.total.current,
12582
+ inventorySupplyChannels: platformLimits.stores?.inventorySupplyChannels.limit,
12583
+ productDistributionChannels: platformLimits.stores?.productDistributionChannels.limit
12772
12584
  };
12773
12585
  return {
12774
12586
  isLoading,
@@ -12782,7 +12594,7 @@ var useStoresPlatformLimitsFetcher$1 = useStoresPlatformLimitsFetcher;
12782
12594
  const useStoresPlatformLimits = () => {
12783
12595
  const _useStoresPlatformLim = useStoresPlatformLimitsFetcher$1(),
12784
12596
  platformLimits = _useStoresPlatformLim.platformLimits;
12785
- if (!(platformLimits !== null && platformLimits !== void 0 && platformLimits.total)) {
12597
+ if (!platformLimits?.total) {
12786
12598
  return {
12787
12599
  hasReachedStoresWarningLimit: false,
12788
12600
  hasReachedStoresErrorLimit: false
@@ -12843,7 +12655,6 @@ const valueMapping = {
12843
12655
  all: [true, false]
12844
12656
  };
12845
12657
  const BooleanField = _ref => {
12846
- var _context;
12847
12658
  let _ref$isRequired = _ref.isRequired,
12848
12659
  isRequired = _ref$isRequired === void 0 ? false : _ref$isRequired,
12849
12660
  _ref$disabled = _ref.disabled,
@@ -12862,7 +12673,7 @@ const BooleanField = _ref => {
12862
12673
  }];
12863
12674
  if (props.isMulti) options.push({
12864
12675
  value: 'all',
12865
- label: _concatInstanceProperty__default["default"](_context = "".concat(yesLabel, " / ")).call(_context, noLabel)
12676
+ label: `${yesLabel} / ${noLabel}`
12866
12677
  });
12867
12678
  return jsxRuntime.jsx(uiKit.SelectInput, {
12868
12679
  name: props.name,
@@ -12974,7 +12785,7 @@ const MultiValueSelectorDropdown = props => {
12974
12785
  truncate: true,
12975
12786
  intlMessage: _objectSpread$7(_objectSpread$7({}, messages$8.filterWholeInput), {}, {
12976
12787
  values: {
12977
- values: "\"".concat(props.value, "\"")
12788
+ values: `"${props.value}"`
12978
12789
  }
12979
12790
  })
12980
12791
  })
@@ -12985,7 +12796,7 @@ const MultiValueSelectorDropdown = props => {
12985
12796
  truncate: true,
12986
12797
  intlMessage: _objectSpread$7(_objectSpread$7({}, messages$8.filterSeparateValues), {}, {
12987
12798
  values: {
12988
- values: "\"".concat(props.multiValue.join('", "'), "\"") || props.value
12799
+ values: `"${props.multiValue.join('", "')}"` || props.value
12989
12800
  }
12990
12801
  })
12991
12802
  })
@@ -13182,7 +12993,7 @@ let NumericFormatInput = /*#__PURE__*/function (_PureComponent) {
13182
12993
  },
13183
12994
  name: this.props.name,
13184
12995
  className: classnames__default["default"](this.props.className),
13185
- css: /*#__PURE__*/react$1.css(this.props.isValid ? '' : "border-color: ".concat(uiKit.designTokens.colorError, "!important;border: 1px solid;"), " ", this.props.disabled ? 'cursor: not-allowed;' : '', ";" + (process.env.NODE_ENV === "production" ? "" : ";label:NumericFormatInput;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm51bWVyaWMtZm9ybWF0LWlucHV0LmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpSmdCIiwiZmlsZSI6Im51bWVyaWMtZm9ybWF0LWlucHV0LmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFB1cmVDb21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgUHJvcFR5cGVzIGZyb20gJ3Byb3AtdHlwZXMnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IGNsYXNzbmFtZXMgZnJvbSAnY2xhc3NuYW1lcyc7XG5pbXBvcnQgQ2xlYXZlIGZyb20gJ2NsZWF2ZS5qcy9yZWFjdCc7XG5pbXBvcnQgb25lTGluZSBmcm9tICdjb21tb24tdGFncy9saWIvb25lTGluZSc7XG5pbXBvcnQgaXNGaW5pdGUgZnJvbSAnbG9kYXNoL2lzRmluaXRlJztcbmltcG9ydCBpc05pbCBmcm9tICdsb2Rhc2gvaXNOaWwnO1xuaW1wb3J0IGlzVW5kZWZpbmVkIGZyb20gJ2xvZGFzaC9pc1VuZGVmaW5lZCc7XG5pbXBvcnQgeyBkZXNpZ25Ub2tlbnMgfSBmcm9tICdAY29tbWVyY2V0b29scy1mcm9udGVuZC91aS1raXQnO1xuaW1wb3J0IHtcbiAgd2l0aFByb3BzLFxuICBmaWx0ZXJEYXRhQXR0cmlidXRlcyxcbiAgZ2V0U2VwYXJhdG9yc0ZvckxvY2FsZSxcbiAgaXNOdW1iZXJpc2gsXG59IGZyb20gJy4uLy4uL2ludGVybmFsLWluZGV4JztcblxuQ2xlYXZlLmRpc3BsYXlOYW1lID0gJ0Ns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sdWUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbnVtZXJhbERlY2ltYWxTY2FsZTogMixcbiAgICAgIH1cbiAgICA6IHt9O1xuXG5leHBvcnQgZGVmYXVsdCB3aXRoUHJvcHMod2l0aFByb3BzRm9yTW9uZXkpKE51bWVyaWNGb3JtYXRJbnB1dCk7XG4iXX0= */"),
12996
+ css: /*#__PURE__*/react$1.css(this.props.isValid ? '' : `border-color: ${uiKit.designTokens.colorError}!important;border: 1px solid;`, " ", this.props.disabled ? 'cursor: not-allowed;' : '', ";" + (process.env.NODE_ENV === "production" ? "" : ";label:NumericFormatInput;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm51bWVyaWMtZm9ybWF0LWlucHV0LmpzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpSmdCIiwiZmlsZSI6Im51bWVyaWMtZm9ybWF0LWlucHV0LmpzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IFB1cmVDb21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgUHJvcFR5cGVzIGZyb20gJ3Byb3AtdHlwZXMnO1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IGNsYXNzbmFtZXMgZnJvbSAnY2xhc3NuYW1lcyc7XG5pbXBvcnQgQ2xlYXZlIGZyb20gJ2NsZWF2ZS5qcy9yZWFjdCc7XG5pbXBvcnQgb25lTGluZSBmcm9tICdjb21tb24tdGFncy9saWIvb25lTGluZSc7XG5pbXBvcnQgaXNGaW5pdGUgZnJvbSAnbG9kYXNoL2lzRmluaXRlJztcbmltcG9ydCBpc05pbCBmcm9tICdsb2Rhc2gvaXNOaWwnO1xuaW1wb3J0IGlzVW5kZWZpbmVkIGZyb20gJ2xvZGFzaC9pc1VuZGVmaW5lZCc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WFsIHZhbHVlXG4gICAgICAgICAgICAvLyByZWY6IGh0dHBzOi8vZ2l0aHViLmNvbS9jb21tZXJjZXRvb2xzL21lcmNoYW50LWNlbnRlci1mcm9udGVuZC9wdWxsLzc3MFxuICAgICAgICAgICAgb3duUHJvcHMub25DaGFuZ2VWYWx1ZShNYXRoLnRydW5jKE1hdGgucm91bmQodmFsdWUgKiAxMDApKSk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIG93blByb3BzLm9uQ2hhbmdlVmFsdWUodmFsdWUpO1xuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgbnVtZXJhbERlY2ltYWxTY2FsZTogMixcbiAgICAgIH1cbiAgICA6IHt9O1xuXG5leHBvcnQgZGVmYXVsdCB3aXRoUHJvcHMod2l0aFByb3BzRm9yTW9uZXkpKE51bWVyaWNGb3JtYXRJbnB1dCk7XG4iXX0= */"),
13186
12997
  onChange: this.handleChange,
13187
12998
  onInit: this.handleInit,
13188
12999
  onBlur: this.handleBlur,
@@ -13310,7 +13121,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
13310
13121
  };
13311
13122
  _this.doDelayedUpdate = (updateFunction, event, eventType) => {
13312
13123
  const self = _this;
13313
- const timeoutKey = "".concat(eventType, "Timeout");
13124
+ const timeoutKey = `${eventType}Timeout`;
13314
13125
  // TODO: can't we just use one variable?
13315
13126
  clearTimeout(_this[timeoutKey]);
13316
13127
  _this[timeoutKey] = _setTimeout__default["default"](() => {
@@ -13341,7 +13152,7 @@ let ThrottledField = /*#__PURE__*/function (_PureComponent) {
13341
13152
  }, this.props.onEnter ? {
13342
13153
  onKeyDown: this.handleEnter
13343
13154
  } : {}), filterDataAttributes(this.props));
13344
- const inputId = "throttled-field-".concat(this.props.name);
13155
+ const inputId = `throttled-field-${this.props.name}`;
13345
13156
  return jsxRuntime.jsxs(jsxRuntime.Fragment, {
13346
13157
  children: [jsxRuntime.jsx(uiKit.AccessibleHidden, {
13347
13158
  children: jsxRuntime.jsx("label", {
@@ -13429,17 +13240,16 @@ function isEmpty(value) {
13429
13240
  }
13430
13241
 
13431
13242
  const buildSearchQuery = (searchQuery, searchMode, fragments) => {
13432
- var _fragments$searchMode;
13433
13243
  if (!searchQuery) return '';
13434
13244
  const buildAllFieldsQueryString = query => {
13435
13245
  const fragmentsArray = _Object$values__default["default"](fragments);
13436
- return "( ".concat(_mapInstanceProperty__default["default"](fragmentsArray).call(fragmentsArray, fragment => fragment.getQuery(query)).join(' or '), " )");
13246
+ return `( ${_mapInstanceProperty__default["default"](fragmentsArray).call(fragmentsArray, fragment => fragment.getQuery(query)).join(' or ')} )`;
13437
13247
  };
13438
13248
  const trimmedSearchQuery = oneLine__default["default"](searchQuery);
13439
13249
  if (searchMode === 'allFields') {
13440
13250
  return buildAllFieldsQueryString(trimmedSearchQuery);
13441
13251
  }
13442
- if (!fragments[searchMode] || typeof ((_fragments$searchMode = fragments[searchMode]) === null || _fragments$searchMode === void 0 ? void 0 : _fragments$searchMode.getQuery) !== 'function') {
13252
+ if (!fragments[searchMode] || typeof fragments[searchMode]?.getQuery !== 'function') {
13443
13253
  return '';
13444
13254
  }
13445
13255
  return fragments[searchMode].getQuery(trimmedSearchQuery);
@@ -13759,11 +13569,11 @@ function createResourceReducer(options) {
13759
13569
 
13760
13570
  // TODO: validate constant keys
13761
13571
  const actionsMap = {
13762
- ["".concat(plural, "_FETCHED")]: (_, action) => ({
13572
+ [`${plural}_FETCHED`]: (_, action) => ({
13763
13573
  currentQueryResult: action.payload
13764
13574
  }),
13765
- ["".concat(single, "_UPDATED_IN_LIST")]: updateStatusInList(mergeData),
13766
- ["".concat(single, "_DELETED_IN_LIST")]: (state, _ref) => {
13575
+ [`${single}_UPDATED_IN_LIST`]: updateStatusInList(mergeData),
13576
+ [`${single}_DELETED_IN_LIST`]: (state, _ref) => {
13767
13577
  let payload = _ref.payload;
13768
13578
  const results = state.currentQueryResult.results;
13769
13579
  return {
@@ -13775,27 +13585,27 @@ function createResourceReducer(options) {
13775
13585
  })
13776
13586
  };
13777
13587
  },
13778
- ["".concat(single, "_FETCHED")]: (_, _ref3) => {
13588
+ [`${single}_FETCHED`]: (_, _ref3) => {
13779
13589
  let payload = _ref3.payload;
13780
13590
  return {
13781
13591
  currentVisible: payload
13782
13592
  };
13783
13593
  },
13784
- ["".concat(single, "_CREATED")]: (_ref4, _ref5) => {
13594
+ [`${single}_CREATED`]: (_ref4, _ref5) => {
13785
13595
  let currentVisible = _ref4.currentVisible;
13786
13596
  let payload = _ref5.payload;
13787
13597
  return {
13788
13598
  currentVisible: mergeData(payload, currentVisible)
13789
13599
  };
13790
13600
  },
13791
- ["".concat(single, "_UPDATED")]: (_ref6, _ref7) => {
13601
+ [`${single}_UPDATED`]: (_ref6, _ref7) => {
13792
13602
  let currentVisible = _ref6.currentVisible;
13793
13603
  let payload = _ref7.payload;
13794
13604
  return {
13795
13605
  currentVisible: mergeData(payload, currentVisible)
13796
13606
  };
13797
13607
  },
13798
- ["".concat(single, "_DELETED")]: () => ({
13608
+ [`${single}_DELETED`]: () => ({
13799
13609
  currentVisible: null
13800
13610
  })
13801
13611
  };
@@ -13812,12 +13622,11 @@ function formatCustomerAddress(_ref) {
13812
13622
  }
13813
13623
 
13814
13624
  function formatCustomerName(_ref) {
13815
- var _context;
13816
13625
  let firstName = _ref.firstName,
13817
13626
  lastName = _ref.lastName;
13818
13627
  if (firstName && !lastName) return _trimInstanceProperty__default["default"](firstName).call(firstName);
13819
13628
  if (!firstName && lastName) return _trimInstanceProperty__default["default"](lastName).call(lastName);
13820
- if (firstName && lastName) return _concatInstanceProperty__default["default"](_context = "".concat(_trimInstanceProperty__default["default"](firstName).call(firstName), " ")).call(_context, _trimInstanceProperty__default["default"](lastName).call(lastName));
13629
+ if (firstName && lastName) return `${_trimInstanceProperty__default["default"](firstName).call(firstName)} ${_trimInstanceProperty__default["default"](lastName).call(lastName)}`;
13821
13630
  return constants.NO_VALUE_FALLBACK;
13822
13631
  }
13823
13632
 
@@ -13846,23 +13655,21 @@ function base64ToString(value) {
13846
13655
  }
13847
13656
 
13848
13657
  const composeNumberPredicateFromFilter = (target, value, option) => {
13849
- var _context, _context2, _context3, _context4, _context5, _context6;
13850
13658
  switch (option) {
13851
13659
  case FILTER_TYPES.lessThan:
13852
- return _concatInstanceProperty__default["default"](_context = "".concat(target, " < ")).call(_context, value);
13660
+ return `${target} < ${value}`;
13853
13661
  case FILTER_TYPES.moreThan:
13854
- return _concatInstanceProperty__default["default"](_context2 = "".concat(target, " > ")).call(_context2, value);
13662
+ return `${target} > ${value}`;
13855
13663
  case FILTER_TYPES.equalTo:
13856
- return _concatInstanceProperty__default["default"](_context3 = "".concat(target, " = ")).call(_context3, value);
13664
+ return `${target} = ${value}`;
13857
13665
  case FILTER_TYPES.range:
13858
- return _concatInstanceProperty__default["default"](_context4 = _concatInstanceProperty__default["default"](_context5 = _concatInstanceProperty__default["default"](_context6 = "".concat(target, " >= ")).call(_context6, value.from, " and ")).call(_context5, target, " <= ")).call(_context4, value.to);
13666
+ return `${target} >= ${value.from} and ${target} <= ${value.to}`;
13859
13667
  default:
13860
13668
  return '';
13861
13669
  }
13862
13670
  };
13863
13671
  function customFields (filter, locale) {
13864
13672
  const customFieldsPredicates = _mapInstanceProperty__default["default"](filter).call(filter, customFieldFilter => {
13865
- var _context7, _context8, _context9, _context0, _context1;
13866
13673
  const _customFieldFilter$va = customFieldFilter.value,
13867
13674
  target = _customFieldFilter$va.target,
13868
13675
  type = _customFieldFilter$va.type,
@@ -13870,14 +13677,14 @@ function customFields (filter, locale) {
13870
13677
  option = _customFieldFilter$va.option;
13871
13678
  switch (type.name) {
13872
13679
  case FIELD_TYPES.Boolean:
13873
- return _concatInstanceProperty__default["default"](_context7 = "".concat(target, " = ")).call(_context7, value.value);
13680
+ return `${target} = ${value.value}`;
13874
13681
  case FIELD_TYPES.String:
13875
- return _concatInstanceProperty__default["default"](_context8 = "".concat(target, " = \"")).call(_context8, value, "\"");
13682
+ return `${target} = "${value}"`;
13876
13683
  case FIELD_TYPES.LocalizedString:
13877
- return _concatInstanceProperty__default["default"](_context9 = "".concat(target, "(")).call(_context9, localizedTextTransformer(value), ")");
13684
+ return `${target}(${localizedTextTransformer(value)})`;
13878
13685
  case FIELD_TYPES.Enum:
13879
13686
  case FIELD_TYPES.LocalizedEnum:
13880
- return _concatInstanceProperty__default["default"](_context0 = "".concat(target, " = \"")).call(_context0, value.value, "\"");
13687
+ return `${target} = "${value.value}"`;
13881
13688
  case FIELD_TYPES.Time:
13882
13689
  return timeTransformer(target, [{
13883
13690
  type: option,
@@ -13892,14 +13699,14 @@ function customFields (filter, locale) {
13892
13699
  case FIELD_TYPES.Number:
13893
13700
  return composeNumberPredicateFromFilter(target, value, option);
13894
13701
  case FIELD_TYPES.Money:
13895
- return _concatInstanceProperty__default["default"](_context1 = "".concat(target, "(")).call(_context1, moneyTransformer(value, option, locale), ")");
13702
+ return `${target}(${moneyTransformer(value, option, locale)})`;
13896
13703
  case FIELD_TYPES.Reference:
13897
13704
  case FIELD_TYPES.Set:
13898
13705
  default:
13899
13706
  throw new Error('Custom field type not recognized');
13900
13707
  }
13901
13708
  });
13902
- return "(custom(fields(".concat(customFieldsPredicates.join(' and '), ")))");
13709
+ return `(custom(fields(${customFieldsPredicates.join(' and ')})))`;
13903
13710
  }
13904
13711
 
13905
13712
  /**
@@ -13940,10 +13747,8 @@ function graphqlQueryBuilder(_ref) {
13940
13747
  }
13941
13748
 
13942
13749
  function numberTransformer(filterKey, filters) {
13943
- var _context3;
13944
13750
  let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : isFilterValid$2;
13945
13751
  const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
13946
- var _context, _context2;
13947
13752
  let type = _ref.type,
13948
13753
  value = _ref.value;
13949
13754
  if (!filterValidator({
@@ -13952,19 +13757,19 @@ function numberTransformer(filterKey, filters) {
13952
13757
  })) return '';
13953
13758
  switch (type) {
13954
13759
  case 'lessThan':
13955
- return "(* to ".concat(_parseInt__default["default"](value) - 1, ")");
13760
+ return `(* to ${_parseInt__default["default"](value) - 1})`;
13956
13761
  case 'moreThan':
13957
- return "(".concat(_parseInt__default["default"](value) + 1, " to *)");
13762
+ return `(${_parseInt__default["default"](value) + 1} to *)`;
13958
13763
  case 'equalTo':
13959
- return _concatInstanceProperty__default["default"](_context = "(".concat(value, " to ")).call(_context, value, ")");
13764
+ return `(${value} to ${value})`;
13960
13765
  case 'range':
13961
- return _concatInstanceProperty__default["default"](_context2 = "(".concat(value.from, " to ")).call(_context2, value.to, ")");
13766
+ return `(${value.from} to ${value.to})`;
13962
13767
  default:
13963
13768
  return '';
13964
13769
  }
13965
13770
  });
13966
13771
  const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(', ');
13967
- return queryString === '' ? null : _concatInstanceProperty__default["default"](_context3 = "".concat(filterKey, ": range")).call(_context3, queryString);
13772
+ return queryString === '' ? null : `${filterKey}: range${queryString}`;
13968
13773
  }
13969
13774
  function isFilterValid$2(_ref2) {
13970
13775
  let type = _ref2.type,
@@ -13991,11 +13796,9 @@ function graphqlCategoryLevelTransformer(filterKey, filters, filterValidator) {
13991
13796
  return _filterInstanceProperty__default["default"](_context = [levelFilterQuery, lastLevelFilterQuery]).call(_context, Boolean);
13992
13797
  }
13993
13798
 
13994
- var _templateObject, _templateObject2;
13995
13799
  const dateFormatDayStart = 'YYYY-MM-DDT00:00:00.000Z';
13996
13800
  const dateFormatDayEnd = 'YYYY-MM-DDT23:59:59.999Z';
13997
13801
  function dateTransformer(filterKey, filters) {
13998
- var _context;
13999
13802
  let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : isFilterValid$1;
14000
13803
  const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
14001
13804
  let type = _ref.type,
@@ -14006,19 +13809,25 @@ function dateTransformer(filterKey, filters) {
14006
13809
  })) return '';
14007
13810
  switch (type) {
14008
13811
  case 'lessThan':
14009
- return "(* to \"".concat(moment__default["default"](value).format(dateFormatDayStart), "\")");
13812
+ return `(* to "${moment__default["default"](value).format(dateFormatDayStart)}")`;
14010
13813
  case 'moreThan':
14011
- return "(\"".concat(moment__default["default"](value).format(dateFormatDayEnd), "\" to *)");
13814
+ return `("${moment__default["default"](value).format(dateFormatDayEnd)}" to *)`;
14012
13815
  case 'equalTo':
14013
- return oneLine__default["default"](_templateObject || (_templateObject = _taggedTemplateLiteral(["\n (\"", "\"\n to \"", "\")\n "])), moment__default["default"](value).format(dateFormatDayStart), moment__default["default"](value).format(dateFormatDayEnd));
13816
+ return oneLine__default["default"]`
13817
+ ("${moment__default["default"](value).format(dateFormatDayStart)}"
13818
+ to "${moment__default["default"](value).format(dateFormatDayEnd)}")
13819
+ `;
14014
13820
  case 'range':
14015
- return oneLine__default["default"](_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n (\"", "\"\n to \"", "\")\n "])), moment__default["default"](value.from).format(dateFormatDayStart), moment__default["default"](value.to).format(dateFormatDayEnd));
13821
+ return oneLine__default["default"]`
13822
+ ("${moment__default["default"](value.from).format(dateFormatDayStart)}"
13823
+ to "${moment__default["default"](value.to).format(dateFormatDayEnd)}")
13824
+ `;
14016
13825
  default:
14017
13826
  return '';
14018
13827
  }
14019
13828
  });
14020
13829
  const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(', ');
14021
- return queryString === '' ? null : _concatInstanceProperty__default["default"](_context = "".concat(filterKey, ": range")).call(_context, queryString);
13830
+ return queryString === '' ? null : `${filterKey}: range${queryString}`;
14022
13831
  }
14023
13832
  function isFilterValid$1(_ref2) {
14024
13833
  let type = _ref2.type,
@@ -14036,20 +13845,18 @@ function missingTransformer(filterKey, filters) {
14036
13845
  // Note: we assume for now that there can only be 1 missing filter value,
14037
13846
  // as the API doesn't support yet multiple OR values (for missing).
14038
13847
  if (filters.length === 0) return null;
14039
- return "".concat(filterKey, ":missing");
13848
+ return `${filterKey}:missing`;
14040
13849
  }
14041
13850
 
14042
13851
  function missingLocaleTransformer(filterKey, filters) {
14043
- var _context;
14044
13852
  // Note: we assume for now that there can only be 1 missing filter value,
14045
13853
  // as the API doesn't support yet multiple OR values (for missing).
14046
13854
  if (filters.length === 0) return null;
14047
13855
  const missingLocale = filters[0].value.value;
14048
- return _concatInstanceProperty__default["default"](_context = "".concat(filterKey, ".")).call(_context, missingLocale, ":missing");
13856
+ return `${filterKey}.${missingLocale}:missing`;
14049
13857
  }
14050
13858
 
14051
13859
  function referenceTransformer(filterKey, filters) {
14052
- var _context;
14053
13860
  let filterValidator = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : isFilterValid;
14054
13861
  const queries = _mapInstanceProperty__default["default"](filters).call(filters, _ref => {
14055
13862
  let type = _ref.type,
@@ -14060,29 +13867,28 @@ function referenceTransformer(filterKey, filters) {
14060
13867
  })) return '';
14061
13868
  switch (type) {
14062
13869
  case 'equalTo':
14063
- return "\"".concat(value, "\"");
13870
+ return `"${value}"`;
14064
13871
  default:
14065
13872
  return '';
14066
13873
  }
14067
13874
  });
14068
13875
  const queryString = _filterInstanceProperty__default["default"](queries).call(queries, q => q !== '').join(', ');
14069
- return queryString === '' ? null : _concatInstanceProperty__default["default"](_context = "".concat(filterKey, ".id: ")).call(_context, queryString);
13876
+ return queryString === '' ? null : `${filterKey}.id: ${queryString}`;
14070
13877
  }
14071
13878
  function isFilterValid(_ref2) {
14072
- var _context2;
13879
+ var _context;
14073
13880
  let type = _ref2.type,
14074
13881
  value = _ref2.value;
14075
- if (type === 'equalTo' && !_includesInstanceProperty__default["default"](_context2 = [null, undefined, '']).call(_context2, value)) return true;
13882
+ if (type === 'equalTo' && !_includesInstanceProperty__default["default"](_context = [null, undefined, '']).call(_context, value)) return true;
14076
13883
  return false;
14077
13884
  }
14078
13885
 
14079
13886
  function textTransformer(filterKey, queries) {
14080
- var _context;
14081
13887
  if (queries.length === 0) return null;
14082
13888
 
14083
13889
  // Note: we assume for now that there can only be 1 text filter.
14084
13890
  const queryValue = queries[0].value;
14085
- return queryValue ? _concatInstanceProperty__default["default"](_context = "".concat(filterKey, ":\"")).call(_context, queryValue, "\"") : null;
13891
+ return queryValue ? `${filterKey}:"${queryValue}"` : null;
14086
13892
  }
14087
13893
 
14088
13894
  function isValidISOTime(_ref) {
@@ -14168,8 +13974,8 @@ function validateFilter$2(_ref, intl) {
14168
13974
  };
14169
13975
  }
14170
13976
  if (value.option === FILTER_TYPES.range) {
14171
- const from = validateValue(filterValue === null || filterValue === void 0 ? void 0 : filterValue.from, typeName, intl);
14172
- const to = from ? null : validateValue(filterValue === null || filterValue === void 0 ? void 0 : filterValue.to, typeName, intl);
13977
+ const from = validateValue(filterValue?.from, typeName, intl);
13978
+ const to = from ? null : validateValue(filterValue?.to, typeName, intl);
14173
13979
  return from || to ? {
14174
13980
  input: {
14175
13981
  from,
@@ -14207,16 +14013,16 @@ function validateFilter$1(_ref, intl) {
14207
14013
  type = _ref.type;
14208
14014
  if (type === 'range') {
14209
14015
  if (validateSingleFilter({
14210
- value: value === null || value === void 0 ? void 0 : value.from
14016
+ value: value?.from
14211
14017
  })) return {
14212
14018
  from: intl.formatMessage(messages$4.rangeMissingValue)
14213
14019
  };
14214
14020
  if (validateSingleFilter({
14215
- value: value === null || value === void 0 ? void 0 : value.to
14021
+ value: value?.to
14216
14022
  })) return {
14217
14023
  to: intl.formatMessage(messages$4.rangeMissingValue)
14218
14024
  };
14219
- if (moment__default["default"](value === null || value === void 0 ? void 0 : value.to).isBefore(value === null || value === void 0 ? void 0 : value.from)) return {
14025
+ if (moment__default["default"](value?.to).isBefore(value?.from)) return {
14220
14026
  from: intl.formatMessage(messages$4.rangeToSmallerThanFrom)
14221
14027
  };
14222
14028
  } else if (type === 'equalTo' || type === 'lessThan' || type === 'moreThan') {
@@ -14294,14 +14100,14 @@ const validateText = function (text, intl) {
14294
14100
 
14295
14101
  function formatDiscount(discount, currencyCode, intl) {
14296
14102
  var _context;
14297
- if (discount.type === 'relative') return "".concat(discount.permyriad / 100, "%");
14103
+ if (discount.type === 'relative') return `${discount.permyriad / 100}%`;
14298
14104
  if (!discount.money) return null;
14299
14105
  const moneyForCurrencyCode = _findInstanceProperty__default["default"](_context = discount.money).call(_context, discountMoney => discountMoney.currencyCode === currencyCode);
14300
14106
  return moneyForCurrencyCode ? formatMoney$2(moneyForCurrencyCode, intl) : null;
14301
14107
  }
14302
14108
 
14303
14109
  function formatPercentage(percentage) {
14304
- return "".concat(percentage, "%");
14110
+ return `${percentage}%`;
14305
14111
  }
14306
14112
  function convertRatioToPercentage(ratio) {
14307
14113
  return _parseFloat__default["default"]((ratio * 100).toFixed(2));
@@ -14315,10 +14121,7 @@ function convertRatioToPercentage(ratio) {
14315
14121
  * @returns {boolean}
14316
14122
  */
14317
14123
  const hasErrorCode = (unmappedApiErrors, errorCode) => {
14318
- return _Array$isArray__default["default"](unmappedApiErrors) && _someInstanceProperty__default["default"](unmappedApiErrors).call(unmappedApiErrors, error => {
14319
- var _error$extensions;
14320
- return ((_error$extensions = error.extensions) === null || _error$extensions === void 0 ? void 0 : _error$extensions.code) === errorCode;
14321
- });
14124
+ return _Array$isArray__default["default"](unmappedApiErrors) && _someInstanceProperty__default["default"](unmappedApiErrors).call(unmappedApiErrors, error => error.extensions?.code === errorCode);
14322
14125
  };
14323
14126
  var hasErrorCode$1 = hasErrorCode;
14324
14127
 
@@ -14333,7 +14136,7 @@ function minusify(value) {
14333
14136
  return minus.concat(value);
14334
14137
  }
14335
14138
 
14336
- const flattenOperator = (operator, clauses) => compact__default["default"](_reduceInstanceProperty__default["default"](clauses).call(clauses, (result, clause) => _concatInstanceProperty__default["default"](result).call(result, (clause === null || clause === void 0 ? void 0 : clause[operator]) || clause), []));
14139
+ const flattenOperator = (operator, clauses) => compact__default["default"](_reduceInstanceProperty__default["default"](clauses).call(clauses, (result, clause) => _concatInstanceProperty__default["default"](result).call(result, clause?.[operator] || clause), []));
14337
14140
  const argsToArray = args => _reduceInstanceProperty__default["default"](args).call(args, (result, item) => _concatInstanceProperty__default["default"](result).call(result, item), []);
14338
14141
  const exists = (field, attributeType) => ({
14339
14142
  exists: {
@@ -14361,6 +14164,45 @@ const range = (field, attributeType, _ref) => {
14361
14164
  }
14362
14165
  };
14363
14166
  };
14167
+
14168
+ /**
14169
+ * Serializes attribute values to primitives suitable for PIM search queries.
14170
+ * Handles complex attribute types like enum, lenum, ltext, money, and reference.
14171
+ *
14172
+ * @param {*} value - The attribute value to serialize
14173
+ * @param {string} typeName - The attribute type name (e.g., 'enum', 'lenum', 'ltext')
14174
+ * @param {string} [dataLocale] - The locale to use for localized text attributes
14175
+ * @returns {*} The serialized primitive value
14176
+ */
14177
+ function serializeAttributeValueForPimSearch(value, typeName, dataLocale) {
14178
+ if (value == null) return value;
14179
+ switch (typeName) {
14180
+ case 'enum':
14181
+ case 'lenum':
14182
+ // Extract key from enum object { key: 'xl', label: '...' }
14183
+ return typeof value === 'object' && value.key ? value.key : value;
14184
+ case 'ltext':
14185
+ // For localized text, use the specified locale or first available
14186
+ if (typeof value === 'object' && !_Array$isArray__default["default"](value)) {
14187
+ return dataLocale && value[dataLocale] ? value[dataLocale] : _Object$values__default["default"](value)[0];
14188
+ }
14189
+ return value;
14190
+ case 'money':
14191
+ // Money objects have { centAmount, currencyCode }
14192
+ // For PIM search, return the object as-is - caller will handle it specially
14193
+ return value;
14194
+ case 'reference':
14195
+ // Reference objects have { id, typeId }
14196
+ // For PIM search, we need just the ID
14197
+ if (typeof value === 'object' && value.id) {
14198
+ return value.id;
14199
+ }
14200
+ return value;
14201
+ default:
14202
+ // Primitives (text, number, boolean, date/time) pass through unchanged
14203
+ return value;
14204
+ }
14205
+ }
14364
14206
  const or = function () {
14365
14207
  for (var _len = arguments.length, clauses = new Array(_len), _key = 0; _key < _len; _key++) {
14366
14208
  clauses[_key] = arguments[_key];
@@ -14391,7 +14233,7 @@ const not = function () {
14391
14233
  const safelyAddFallback = function (string) {
14392
14234
  let fallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : constants.NO_VALUE_FALLBACK;
14393
14235
  if (string === '') return fallback;
14394
- return string !== null && string !== void 0 ? string : fallback;
14236
+ return string ?? fallback;
14395
14237
  };
14396
14238
 
14397
14239
  var messages = reactIntl.defineMessages({
@@ -14428,10 +14270,9 @@ function normalizeProductSettings(settings) {
14428
14270
  // FIXME: the returned productAttributeDefinitions won't be accurate in case a
14429
14271
  // different constraint than ATTRIBUTE_CONSTRAINTS.SAME_FOR_ALL was passed
14430
14272
  function splitVariantAttributesByConstraint(product, constraint) {
14431
- var _product$productType;
14432
14273
  const productAttributeDefinitions = [];
14433
14274
  const variantAttributeDefinitions = [];
14434
- if ((_product$productType = product.productType) !== null && _product$productType !== void 0 && (_product$productType = _product$productType.obj) !== null && _product$productType !== void 0 && _product$productType.attributes) {
14275
+ if (product.productType?.obj?.attributes) {
14435
14276
  if (!constraint) throw new Error('You need to specify a constraint to filter for.');
14436
14277
  for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
14437
14278
  const definition = product.productType.obj.attributes[i];
@@ -14441,10 +14282,9 @@ function splitVariantAttributesByConstraint(product, constraint) {
14441
14282
  return [productAttributeDefinitions, variantAttributeDefinitions];
14442
14283
  }
14443
14284
  function splitProductAndVariantAttributes(product) {
14444
- var _product$productType2;
14445
14285
  const productAttributeDefinitions = [];
14446
14286
  const variantAttributeDefinitions = [];
14447
- if ((_product$productType2 = product.productType) !== null && _product$productType2 !== void 0 && (_product$productType2 = _product$productType2.obj) !== null && _product$productType2 !== void 0 && _product$productType2.attributes) {
14287
+ if (product.productType?.obj?.attributes) {
14448
14288
  for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
14449
14289
  const definition = product.productType.obj.attributes[i];
14450
14290
  if (getProductAttributes(definition)) productAttributeDefinitions.push(definition);else variantAttributeDefinitions.push(definition);
@@ -14542,19 +14382,19 @@ const computedProperties = {
14542
14382
  // has been deleted. See MC-1925 for further information.
14543
14383
  const filteredCategories = _filterInstanceProperty__default["default"](_context6 = product.categories).call(_context6, category => category.obj !== undefined);
14544
14384
  return _mapInstanceProperty__default["default"](filteredCategories).call(filteredCategories, category => {
14545
- var _context7;
14546
14385
  const categoryPath = getPathName(category, language, languages);
14547
14386
  const ancestors = getAncestors(category, language);
14548
- const externalIdValue = category.obj.externalId ? // hardcoding "ext. ID" since this is not part of a message to be
14387
+ const externalIdValue = category.obj.externalId ?
14388
+ // hardcoding "ext. ID" since this is not part of a message to be
14549
14389
  // translated. This has been communicated with Jenn
14550
- "| ext. ID: ".concat(category.obj.externalId) : '';
14390
+ `| ext. ID: ${category.obj.externalId}` : '';
14551
14391
  return {
14552
14392
  id: category.id,
14553
- name: _concatInstanceProperty__default["default"](_context7 = "".concat(l10n.formatLocalizedString(category.obj, {
14393
+ name: `${l10n.formatLocalizedString(category.obj, {
14554
14394
  key: 'name',
14555
14395
  locale: language,
14556
14396
  fallbackOrder: languages
14557
- }), " ")).call(_context7, externalIdValue),
14397
+ })} ${externalIdValue}`,
14558
14398
  path: categoryPath,
14559
14399
  level: ancestors.length
14560
14400
  };
@@ -14591,13 +14431,13 @@ const getAttributeValueByType = _ref10 => {
14591
14431
  value: value
14592
14432
  });
14593
14433
  case 'enum':
14594
- return safelyAddFallback(value.label, "".concat(value.key, " (key)"));
14434
+ return safelyAddFallback(value.label, `${value.key} (key)`);
14595
14435
  case 'lenum':
14596
14436
  return safelyAddFallback(l10n.formatLocalizedString(value, {
14597
14437
  key: 'label',
14598
14438
  locale: projectDataLocale,
14599
14439
  fallbackOrder: projectLanguages
14600
- }), "".concat(value.key, " (key)"));
14440
+ }), `${value.key} (key)`);
14601
14441
  case 'number':
14602
14442
  return safelyAddFallback(value);
14603
14443
  case 'boolean':
@@ -14614,12 +14454,12 @@ const getAttributeValueByType = _ref10 => {
14614
14454
 
14615
14455
  // TODO: rename to isProductLevelAttribute since it returns a boolean
14616
14456
  const getProductLevelAttributes = attribueDefinition => {
14617
- return (attribueDefinition === null || attribueDefinition === void 0 ? void 0 : attribueDefinition.level) === ATTRIBUTE_LEVELS.PRODUCT;
14457
+ return attribueDefinition?.level === ATTRIBUTE_LEVELS.PRODUCT;
14618
14458
  };
14619
14459
 
14620
14460
  // TODO: rename to isProductAttribute since it returns a boolean
14621
14461
  const getProductAttributes = attribueDefinition => {
14622
- return (attribueDefinition === null || attribueDefinition === void 0 ? void 0 : attribueDefinition.attributeConstraint) === ATTRIBUTE_CONSTRAINTS.SAME_FOR_ALL || getProductLevelAttributes(attribueDefinition);
14462
+ return attribueDefinition?.attributeConstraint === ATTRIBUTE_CONSTRAINTS.SAME_FOR_ALL || getProductLevelAttributes(attribueDefinition);
14623
14463
  };
14624
14464
 
14625
14465
  let RequestCache = /*#__PURE__*/function () {
@@ -14730,7 +14570,6 @@ const reorderArrayItems = (array, from, to) => {
14730
14570
  const mapTimeZonesToOptions = memoize__default["default"](timeZones => {
14731
14571
  var _context;
14732
14572
  return _mapInstanceProperty__default["default"](_context = _Object$entries__default["default"](timeZones)).call(_context, _ref => {
14733
- var _context2;
14734
14573
  let _ref2 = _slicedToArray(_ref, 2),
14735
14574
  code = _ref2[0],
14736
14575
  value = _ref2[1];
@@ -14739,7 +14578,7 @@ const mapTimeZonesToOptions = memoize__default["default"](timeZones => {
14739
14578
  //E.g. `(GMT +02:00) Central European Time - Berlin`
14740
14579
  // unicode clock hex code: \u25F7
14741
14580
  //
14742
- label: _concatInstanceProperty__default["default"](_context2 = "(GMT ".concat(value.offset, ") ")).call(_context2, value.name)
14581
+ label: `(GMT ${value.offset}) ${value.name}`
14743
14582
  };
14744
14583
  });
14745
14584
  });
@@ -14747,12 +14586,12 @@ const getTimeZoneId = memoize__default["default"]((selectedTimeZone, timeZones)
14747
14586
  if (timeZones[selectedTimeZone]) {
14748
14587
  return selectedTimeZone;
14749
14588
  } else {
14750
- var _context3;
14751
- const fallbackTimeZoneId = _findInstanceProperty__default["default"](_context3 = _Object$keys__default["default"](timeZones)).call(_context3, timeZoneId => {
14752
- var _timeZones$timeZoneId;
14753
- return (_timeZones$timeZoneId = timeZones[timeZoneId]) === null || _timeZones$timeZoneId === void 0 || (_timeZones$timeZoneId = _timeZones$timeZoneId.translationFor) === null || _timeZones$timeZoneId === void 0 ? void 0 : _someInstanceProperty__default["default"](_timeZones$timeZoneId).call(_timeZones$timeZoneId, fallbackTimeZone => fallbackTimeZone === selectedTimeZone);
14589
+ var _context2;
14590
+ const fallbackTimeZoneId = _findInstanceProperty__default["default"](_context2 = _Object$keys__default["default"](timeZones)).call(_context2, timeZoneId => {
14591
+ var _context3, _context4;
14592
+ return ((_context3 = timeZones[timeZoneId]?.translationFor) == null ? void 0 : _bindInstanceProperty__default["default"](_context4 = Function.call).call(_context4, _someInstanceProperty__default["default"](_context3), _context3))?.(fallbackTimeZone => fallbackTimeZone === selectedTimeZone);
14754
14593
  });
14755
- if (fallbackTimeZoneId !== null && fallbackTimeZoneId !== void 0 && fallbackTimeZoneId.length) {
14594
+ if (fallbackTimeZoneId?.length) {
14756
14595
  return fallbackTimeZoneId.toString();
14757
14596
  } else {
14758
14597
  return 'UTC';
@@ -14760,10 +14599,9 @@ const getTimeZoneId = memoize__default["default"]((selectedTimeZone, timeZones)
14760
14599
  }
14761
14600
  });
14762
14601
  const getTimeZoneLabel = memoize__default["default"]((selectedTimeZone, timeZones) => {
14763
- var _context4;
14764
14602
  const timeZoneId = getTimeZoneId(selectedTimeZone, timeZones);
14765
14603
  const timeZoneData = timeZones[timeZoneId];
14766
- return _concatInstanceProperty__default["default"](_context4 = "(GMT ".concat(timeZoneData.offset, ") ")).call(_context4, timeZoneData.name);
14604
+ return `(GMT ${timeZoneData.offset}) ${timeZoneData.name}`;
14767
14605
  });
14768
14606
 
14769
14607
  function ownKeys(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -14952,6 +14790,7 @@ exports.resolveStatusType = resolveStatusType;
14952
14790
  exports.safelyAddFallback = safelyAddFallback;
14953
14791
  exports.sanitize = sanitize;
14954
14792
  exports.searchCategories = searchCategories;
14793
+ exports.serializeAttributeValueForPimSearch = serializeAttributeValueForPimSearch;
14955
14794
  exports.setDisplayName = setDisplayName$1;
14956
14795
  exports.setToArray = setToArray;
14957
14796
  exports.shallowEqual = shallowEqual;
@@ -14979,7 +14818,6 @@ exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback$1;
14979
14818
  exports.useFormatCustomField = useFormatCustomField;
14980
14819
  exports.useFormatLocalizedFieldToString = useFormatLocalizedFieldToString;
14981
14820
  exports.useFormatLocalizedString = useFormatLocalizedString;
14982
- exports.useIdentityBannerNotification = useIdentityBannerNotification;
14983
14821
  exports.useIsFieldDuplicated = useIsFieldDuplicated$1;
14984
14822
  exports.useLoadOptions = useLoadOptions$1;
14985
14823
  exports.useLocalizedKeyFallback = useLocalizedKeyFallback$1;