@commercetools-frontend/experimental-components 6.4.5 → 7.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +386 -145
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +385 -144
- package/dist/commercetools-frontend-experimental-components.esm.js +368 -141
- package/dist/declarations/src/components/channel-picker-input/channel-picker-input.d.ts +3 -3
- package/dist/declarations/src/components/divider/divider.d.ts +2 -2
- package/dist/declarations/src/components/formatted-date-time/formatted-date-time.d.ts +0 -1
- package/dist/declarations/src/components/recurrent-interval-picker/index.d.ts +2 -0
- package/dist/declarations/src/components/recurrent-interval-picker/recurrent-interval-picker.d.ts +13 -0
- package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/index.d.ts +1 -0
- package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/use-recurrence-intervals.d.ts +20 -0
- package/dist/declarations/src/components/store-select-input/constants.d.ts +2 -0
- package/dist/declarations/src/components/validated-input/validated-input.d.ts +7 -38
- package/dist/declarations/src/constants/index.d.ts +1 -0
- package/dist/declarations/src/custom-fields/custom-field-definitions-connector/custom-field-definitions-connector.d.ts +0 -1
- package/dist/declarations/src/custom-fields/custom-field-type-definitions-connector/custom-field-type-definitions-connector.d.ts +0 -1
- package/dist/declarations/src/custom-fields/custom-fields/constants.d.ts +36 -0
- package/dist/declarations/src/custom-fields/custom-fields/custom-field-input.d.ts +2 -0
- package/dist/declarations/src/custom-fields/custom-fields/index.d.ts +2 -1
- package/dist/declarations/src/features/picker/shared/hooks/use-load-options.d.ts +1 -1
- package/dist/declarations/src/features/picker/shared/hooks/use-product-type-options.d.ts +2 -2
- package/dist/declarations/src/features/pim-indexer/components/pim-indexer-provider/pim-indexer-provider.d.ts +0 -1
- package/dist/declarations/src/features/pim-indexer/components/with-pim-indexer/with-pim-indexer.d.ts +0 -1
- package/dist/declarations/src/features/platform-limits/business-units/hooks/index.d.ts +2 -0
- package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits/use-business-units-platform-limits.d.ts +10 -0
- package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits-fetcher/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/business-units/hooks/use-business-units-platform-limits-fetcher/use-business-units-platform-limits-fetcher.d.ts +12 -0
- package/dist/declarations/src/features/platform-limits/business-units/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/customer-groups/hooks/use-customer-groups-platform-limits/use-customer-groups-platform-limits.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/customer-groups/hooks/use-customer-groups-platform-limits-fetcher/use-customer-groups-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/customers/hooks/use-customers-platform-limits/use-customers-platform-limits.d.ts +2 -1
- package/dist/declarations/src/features/platform-limits/customers/hooks/use-customers-platform-limits-fetcher/use-customers-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/index.d.ts +3 -0
- package/dist/declarations/src/features/platform-limits/shared/components/index.d.ts +2 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/error/error.d.ts +12 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/error/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/notifications.d.ts +7 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/warning/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/components/notifications/warning/warning.d.ts +12 -0
- package/dist/declarations/src/features/platform-limits/shared/components/status-text/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/components/status-text/status-text.d.ts +12 -0
- package/dist/declarations/src/features/platform-limits/shared/constants.d.ts +13 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/index.d.ts +3 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-intercept-navigation/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-intercept-navigation/use-intercept-navigation.d.ts +7 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-limits-modal-state/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-limits-modal-state/use-limits-modal-state.d.ts +6 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/index.d.ts +3 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/platform-limits-query-variables.d.ts +2 -0
- package/dist/declarations/src/features/platform-limits/shared/hooks/use-platform-limits-fetcher/use-platform-limits-fetcher.d.ts +7 -0
- package/dist/declarations/src/features/platform-limits/shared/index.d.ts +4 -0
- package/dist/declarations/src/features/platform-limits/shared/utils/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/shared/utils/utils.d.ts +14 -0
- package/dist/declarations/src/features/platform-limits/shipping-methods/hooks/use-shipping-methods-platform-limits/use-shipping-methods-platform-limits.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/shipping-methods/hooks/use-shipping-methods-platform-limits-fetcher/use-shipping-methods-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/stores/hooks/index.d.ts +3 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits/use-store-platform-limits.d.ts +15 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-fetcher/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-fetcher/use-store-platform-limits-fetcher.d.ts +13 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-status/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/stores/hooks/use-store-platform-limits-status/use-store-platform-limits-status.d.ts +5 -0
- package/dist/declarations/src/features/platform-limits/stores/index.d.ts +1 -0
- package/dist/declarations/src/features/platform-limits/tax-categories/hooks/use-tax-categories-platform-limits/use-tax-categories-platform-limits.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/tax-categories/hooks/use-tax-categories-platform-limits-fetcher/use-tax-categories-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/zones/hooks/use-zones-platform-limits/use-zones-platform-limits.d.ts +1 -1
- package/dist/declarations/src/features/platform-limits/zones/hooks/use-zones-platform-limits-fetcher/use-zones-platform-limits-fetcher.d.ts +1 -1
- package/dist/declarations/src/fields/numeric-format-input/numeric-format-input.d.ts +0 -1
- package/dist/declarations/src/fields/search-input/search-input.d.ts +0 -1
- package/dist/declarations/src/fields/throttled-field/throttled-field.d.ts +0 -1
- package/dist/declarations/src/hooks/index.d.ts +0 -1
- package/dist/declarations/src/hooks/use-persisted-reminder/use-persisted-reminder.d.ts +1 -1
- package/dist/declarations/src/hooks/use-previous/use-previous.d.ts +1 -1
- package/dist/declarations/src/hooks/use-product-selections-fetcher/use-product-selections-fetcher.d.ts +1 -6
- package/dist/declarations/src/hooks/use-stores-list-fetcher/use-stores-list-fetcher.d.ts +1 -8
- package/dist/declarations/src/index.d.ts +9 -8
- package/dist/declarations/src/utils/type-definitions/type-definitions.d.ts +1 -1
- package/dist/styles.css +43 -43
- package/package.json +25 -31
- package/dist/declarations/src/hooks/use-did-form-validation-fail/index.d.ts +0 -1
- package/dist/declarations/src/hooks/use-did-form-validation-fail/use-did-form-validation-fail.d.ts +0 -1
- package/dist/declarations/src/utils/store-data-fence-product-selection/index.d.ts +0 -1
- package/dist/declarations/src/utils/store-data-fence-product-selection/store-data-fence-product-selection.d.ts +0 -1
|
@@ -76,7 +76,7 @@ var applicationShell = require('@commercetools-frontend/application-shell');
|
|
|
76
76
|
var _ = require('@commercetools-frontend/ui-kit/');
|
|
77
77
|
var PropTypes = require('prop-types');
|
|
78
78
|
var react$1 = require('@emotion/react');
|
|
79
|
-
var
|
|
79
|
+
var dnd = require('@hello-pangea/dnd');
|
|
80
80
|
var ReactDOM = require('react-dom');
|
|
81
81
|
var _indexOfInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/index-of');
|
|
82
82
|
var selectUtils = require('@commercetools-uikit/select-utils');
|
|
@@ -229,6 +229,9 @@ const CenteredLoadingSpinner = () => jsxRuntime.jsx("div", {
|
|
|
229
229
|
CenteredLoadingSpinner.displayName = 'CenteredLoadingSpinner';
|
|
230
230
|
var CenteredLoadingSpinner$1 = CenteredLoadingSpinner;
|
|
231
231
|
|
|
232
|
+
const LOWER_STORES_LIMIT = 60;
|
|
233
|
+
const UPPER_STORES_LIMIT = 500;
|
|
234
|
+
|
|
232
235
|
const QUERY_MAX_LIMIT = 500;
|
|
233
236
|
const SHOW_TOOLTIP_CHARS_COUNT = 40;
|
|
234
237
|
const SEARCHABLE_REFERENCES = {
|
|
@@ -272,7 +275,7 @@ const PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES = 'productTailoringForAtt
|
|
|
272
275
|
// TODO: apply a more robust solution to overlaying issues
|
|
273
276
|
const Z_INDEX_DROPDOWN = 30000;
|
|
274
277
|
|
|
275
|
-
var
|
|
278
|
+
var commonPickerMessages = reactIntl.defineMessages({
|
|
276
279
|
loadingErrorMessage: {
|
|
277
280
|
id: 'Pickers.loadingErrorMessage',
|
|
278
281
|
description: 'Message shown to used when picker fails to load data from server.',
|
|
@@ -285,7 +288,7 @@ var pickerMessages$1 = reactIntl.defineMessages({
|
|
|
285
288
|
}
|
|
286
289
|
});
|
|
287
290
|
|
|
288
|
-
var messages$
|
|
291
|
+
var messages$S = reactIntl.defineMessages({
|
|
289
292
|
noChannelsFound: {
|
|
290
293
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
291
294
|
description: 'The message to display when no channels were found',
|
|
@@ -307,16 +310,19 @@ const getRolesClause = roles => roles && roles.length > 0 ? `roles contains any
|
|
|
307
310
|
const ChannelPickerInput = _ref => {
|
|
308
311
|
let isClearable = _ref.isClearable,
|
|
309
312
|
isDisabled = _ref.isDisabled,
|
|
310
|
-
isReadOnly = _ref.isReadOnly,
|
|
313
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
314
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly,
|
|
311
315
|
onChange = _ref.onChange,
|
|
312
316
|
name = _ref.name,
|
|
313
317
|
onBlur = _ref.onBlur,
|
|
314
318
|
value = _ref.value,
|
|
315
319
|
hasError = _ref.hasError,
|
|
316
|
-
onError = _ref.onError,
|
|
320
|
+
_ref$onError = _ref.onError,
|
|
321
|
+
onError = _ref$onError === void 0 ? null : _ref$onError,
|
|
317
322
|
placeholder = _ref.placeholder,
|
|
318
323
|
roles = _ref.roles,
|
|
319
|
-
hasWarning = _ref.hasWarning,
|
|
324
|
+
_ref$hasWarning = _ref.hasWarning,
|
|
325
|
+
hasWarning = _ref$hasWarning === void 0 ? false : _ref$hasWarning,
|
|
320
326
|
_ref$isMulti = _ref.isMulti,
|
|
321
327
|
isMulti = _ref$isMulti === void 0 ? false : _ref$isMulti;
|
|
322
328
|
const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
@@ -400,7 +406,7 @@ const ChannelPickerInput = _ref => {
|
|
|
400
406
|
if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
|
|
401
407
|
}, [isCurrentOptionLoadingFailed, onError, currentOptions]);
|
|
402
408
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
403
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
409
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$S.noChannelsFound), [loadingError, formatMessage]);
|
|
404
410
|
const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
|
|
405
411
|
const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
|
|
406
412
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
@@ -412,7 +418,7 @@ const ChannelPickerInput = _ref => {
|
|
|
412
418
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
413
419
|
id: name,
|
|
414
420
|
name: name,
|
|
415
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
421
|
+
placeholder: placeholder ?? formatMessage(messages$S.placeholder),
|
|
416
422
|
loadOptions: loadOptionsDebounced,
|
|
417
423
|
defaultOptions: true,
|
|
418
424
|
showOptionGroupDivider: true,
|
|
@@ -435,7 +441,7 @@ const ChannelPickerInput = _ref => {
|
|
|
435
441
|
})
|
|
436
442
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
437
443
|
tone: "negative",
|
|
438
|
-
intlMessage:
|
|
444
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
439
445
|
})]
|
|
440
446
|
})
|
|
441
447
|
});
|
|
@@ -469,7 +475,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
469
475
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
470
476
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
471
477
|
|
|
472
|
-
var messages$
|
|
478
|
+
var messages$R = reactIntl.defineMessages({
|
|
473
479
|
noProductTypesFound: {
|
|
474
480
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
475
481
|
description: 'The message to display when no product types were found',
|
|
@@ -558,7 +564,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
558
564
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
559
565
|
id: name,
|
|
560
566
|
name: name,
|
|
561
|
-
placeholder: formatMessage(messages$
|
|
567
|
+
placeholder: formatMessage(messages$R.placeholder),
|
|
562
568
|
loadOptions: loadOptionsDebounced,
|
|
563
569
|
defaultOptions: [],
|
|
564
570
|
isClearable: isClearable,
|
|
@@ -571,7 +577,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
571
577
|
onInputChange: handleInputChange,
|
|
572
578
|
onBlur: onBlur,
|
|
573
579
|
value: currentOption.data,
|
|
574
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
580
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$R.noProductTypesFound),
|
|
575
581
|
hasError: hasError || isLoadingFailed,
|
|
576
582
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
577
583
|
menuPortalTarget: document.body,
|
|
@@ -579,7 +585,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
579
585
|
})
|
|
580
586
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
581
587
|
tone: "negative",
|
|
582
|
-
intlMessage:
|
|
588
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
583
589
|
})]
|
|
584
590
|
})
|
|
585
591
|
});
|
|
@@ -587,7 +593,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
587
593
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
588
594
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
589
595
|
|
|
590
|
-
var messages$
|
|
596
|
+
var messages$Q = reactIntl.defineMessages({
|
|
591
597
|
noStatesFound: {
|
|
592
598
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
593
599
|
description: 'The message to display when no states were found',
|
|
@@ -671,7 +677,7 @@ const StatePickerInput = _ref => {
|
|
|
671
677
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
672
678
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
673
679
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
674
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
680
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noStatesFound), [loadingError, formatMessage]);
|
|
675
681
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
676
682
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
677
683
|
max: "scale",
|
|
@@ -683,7 +689,7 @@ const StatePickerInput = _ref => {
|
|
|
683
689
|
id: name,
|
|
684
690
|
name: name,
|
|
685
691
|
horizontalConstraint: "scale",
|
|
686
|
-
placeholder: formatMessage(messages$
|
|
692
|
+
placeholder: formatMessage(messages$Q.placeholder),
|
|
687
693
|
loadOptions: loadOptionsDebounced,
|
|
688
694
|
defaultOptions: true,
|
|
689
695
|
showOptionGroupDivider: true,
|
|
@@ -705,7 +711,7 @@ const StatePickerInput = _ref => {
|
|
|
705
711
|
}, dataLocale)
|
|
706
712
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
707
713
|
tone: "negative",
|
|
708
|
-
intlMessage:
|
|
714
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
709
715
|
})]
|
|
710
716
|
})
|
|
711
717
|
});
|
|
@@ -740,7 +746,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
740
746
|
};
|
|
741
747
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
742
748
|
|
|
743
|
-
var messages$
|
|
749
|
+
var messages$P = reactIntl.defineMessages({
|
|
744
750
|
bottomOption: {
|
|
745
751
|
id: 'Products.Pickers.bottomOption',
|
|
746
752
|
description: 'The message to display at the end of the options menu',
|
|
@@ -752,7 +758,7 @@ function ownKeys$1p(e, r) { var t = _Object$keys__default["default"](e); if (_Ob
|
|
|
752
758
|
function _objectSpread$1p(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1p(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1p(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
753
759
|
const getBottomOption = formatMessage => ({
|
|
754
760
|
options: [{
|
|
755
|
-
label: formatMessage ? formatMessage(messages$
|
|
761
|
+
label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
|
|
756
762
|
isBottomOption: true,
|
|
757
763
|
isDisabled: true
|
|
758
764
|
}]
|
|
@@ -1353,7 +1359,7 @@ ThrottledField.defaultProps = {
|
|
|
1353
1359
|
};
|
|
1354
1360
|
var ThrottledField$1 = ThrottledField;
|
|
1355
1361
|
|
|
1356
|
-
var messages$
|
|
1362
|
+
var messages$O = reactIntl.defineMessages({
|
|
1357
1363
|
buttonLabel: {
|
|
1358
1364
|
id: 'SearchInput.buttonLabel',
|
|
1359
1365
|
description: 'Label for "Search" button.',
|
|
@@ -1458,7 +1464,7 @@ let SearchInput = /*#__PURE__*/function (_Component) {
|
|
|
1458
1464
|
"data-testid": this.props.testId || 'search-input',
|
|
1459
1465
|
value: this.state.text,
|
|
1460
1466
|
label: this.props.label,
|
|
1461
|
-
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$
|
|
1467
|
+
placeholder: this.props.placeholder || this.props.intl.formatMessage(messages$O.placeholder),
|
|
1462
1468
|
inputRef: this.props.inputRef || this.setInputRef,
|
|
1463
1469
|
onChange: this.handleInputChange,
|
|
1464
1470
|
onEnter: this.handleEnter,
|
|
@@ -2028,34 +2034,6 @@ const useStoreKeysInDataFences = _ref => {
|
|
|
2028
2034
|
};
|
|
2029
2035
|
var useStoreKeysInDataFences$1 = useStoreKeysInDataFences;
|
|
2030
2036
|
|
|
2031
|
-
function useDidFormValidationFail() {
|
|
2032
|
-
const _useState = React.useState(false),
|
|
2033
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
2034
|
-
didFormValidationFail = _useState2[0],
|
|
2035
|
-
setDidFormValidationFail = _useState2[1];
|
|
2036
|
-
const _useState3 = React.useState(false),
|
|
2037
|
-
_useState4 = _slicedToArray(_useState3, 2),
|
|
2038
|
-
wasValidationRequested = _useState4[0],
|
|
2039
|
-
setWasValidationRequested = _useState4[1];
|
|
2040
|
-
const _useFormikContext = formik.useFormikContext(),
|
|
2041
|
-
dirty = _useFormikContext.dirty,
|
|
2042
|
-
isValid = _useFormikContext.isValid,
|
|
2043
|
-
isValidating = _useFormikContext.isValidating;
|
|
2044
|
-
React.useEffect(() => {
|
|
2045
|
-
if (dirty) setWasValidationRequested(false);
|
|
2046
|
-
}, [dirty]);
|
|
2047
|
-
React.useEffect(() => {
|
|
2048
|
-
if (isValidating) setWasValidationRequested(true);
|
|
2049
|
-
}, [isValidating]);
|
|
2050
|
-
React.useEffect(() => {
|
|
2051
|
-
if (wasValidationRequested && !isValid) {
|
|
2052
|
-
setDidFormValidationFail(true);
|
|
2053
|
-
setWasValidationRequested(false);
|
|
2054
|
-
}
|
|
2055
|
-
}, [isValid, setWasValidationRequested, setDidFormValidationFail, wasValidationRequested]);
|
|
2056
|
-
return Boolean(didFormValidationFail);
|
|
2057
|
-
}
|
|
2058
|
-
|
|
2059
2037
|
function ownKeys$1a(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
2060
2038
|
function _objectSpread$1a(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1a(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1a(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
2061
2039
|
const TEN_MINUTES_IN_MS = 600000;
|
|
@@ -2132,7 +2110,7 @@ const usePersistedReminder = function () {
|
|
|
2132
2110
|
};
|
|
2133
2111
|
var usePersistedReminder$1 = usePersistedReminder;
|
|
2134
2112
|
|
|
2135
|
-
var messages$
|
|
2113
|
+
var messages$N = reactIntl.defineMessages({
|
|
2136
2114
|
profileUpdated: {
|
|
2137
2115
|
id: 'NotificationText.profileUpdated',
|
|
2138
2116
|
description: 'Label for the notification header',
|
|
@@ -2156,22 +2134,22 @@ const LinkToProfile = props => {
|
|
|
2156
2134
|
return jsxRuntime.jsx(uiKit.Link, {
|
|
2157
2135
|
to: "/account/profile",
|
|
2158
2136
|
children: props.children
|
|
2159
|
-
});
|
|
2137
|
+
}, "link");
|
|
2160
2138
|
};
|
|
2161
2139
|
LinkToProfile.displayName = 'LinkToProfile';
|
|
2162
2140
|
const getLinkToProfile = msg => jsxRuntime.jsx(LinkToProfile, {
|
|
2163
2141
|
children: msg
|
|
2164
|
-
});
|
|
2165
|
-
const getNewLine = () => jsxRuntime.jsx("br", {});
|
|
2142
|
+
}, "linkToProfile");
|
|
2143
|
+
const getNewLine = () => jsxRuntime.jsx("br", {}, crypto.randomUUID());
|
|
2166
2144
|
const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
2167
2145
|
children: [jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
2168
2146
|
scale: "xs",
|
|
2169
2147
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2170
2148
|
as: "p",
|
|
2171
2149
|
isBold: true,
|
|
2172
|
-
intlMessage: messages$
|
|
2150
|
+
intlMessage: messages$N.profileUpdated
|
|
2173
2151
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2174
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
2152
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$N.addMoreInformation), {}, {
|
|
2175
2153
|
values: {
|
|
2176
2154
|
newline: getNewLine
|
|
2177
2155
|
}
|
|
@@ -2180,7 +2158,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
2180
2158
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
2181
2159
|
scale: "xs",
|
|
2182
2160
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
2183
|
-
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$
|
|
2161
|
+
intlMessage: _objectSpread$19(_objectSpread$19({}, messages$N.informationAndProfileLink), {}, {
|
|
2184
2162
|
values: {
|
|
2185
2163
|
newline: getNewLine,
|
|
2186
2164
|
link: getLinkToProfile
|
|
@@ -2263,8 +2241,11 @@ function usePendingRequests() {
|
|
|
2263
2241
|
pendingRequests = _useState2[0],
|
|
2264
2242
|
setPendingRequests = _useState2[1];
|
|
2265
2243
|
const isUnmountedRef = React.useRef(false);
|
|
2266
|
-
React.useEffect(() =>
|
|
2267
|
-
isUnmountedRef.current =
|
|
2244
|
+
React.useEffect(() => {
|
|
2245
|
+
isUnmountedRef.current = false;
|
|
2246
|
+
return () => {
|
|
2247
|
+
isUnmountedRef.current = true;
|
|
2248
|
+
};
|
|
2268
2249
|
}, []);
|
|
2269
2250
|
const change = React.useCallback(delta => {
|
|
2270
2251
|
// FIXME: isMounted is an anti pattern
|
|
@@ -2305,7 +2286,7 @@ const useEventCallback = (fn, dependencies) => {
|
|
|
2305
2286
|
};
|
|
2306
2287
|
var useEventCallback$1 = useEventCallback;
|
|
2307
2288
|
|
|
2308
|
-
var messages$
|
|
2289
|
+
var messages$M = reactIntl.defineMessages({
|
|
2309
2290
|
fallbackHint: {
|
|
2310
2291
|
id: 'KeyFallback.fallbackHint',
|
|
2311
2292
|
description: 'key fallback for a specified resource key (e.g name)',
|
|
@@ -2329,7 +2310,7 @@ const useLocalizedKeyFallback = () => {
|
|
|
2329
2310
|
return values => {
|
|
2330
2311
|
if (!values.resource) return null;
|
|
2331
2312
|
const localizedString = values.resource[values.localizedStringFieldName];
|
|
2332
|
-
const fallbackHintWithKey = intl.formatMessage(messages$
|
|
2313
|
+
const fallbackHintWithKey = intl.formatMessage(messages$M.fallbackHint, {
|
|
2333
2314
|
key: values.resource.key
|
|
2334
2315
|
});
|
|
2335
2316
|
if (!localizedString) return fallbackHintWithKey;
|
|
@@ -2477,7 +2458,7 @@ const convertProductSelectionsFromGraphQl = productSelections => {
|
|
|
2477
2458
|
});
|
|
2478
2459
|
};
|
|
2479
2460
|
|
|
2480
|
-
var FetchProductSelections = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sort" } }, type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, defaultValue: { kind: "NullValue" }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "Variable", name: { kind: "Name", value: "sort" } } }, { kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "count" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "offset" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end:
|
|
2461
|
+
var FetchProductSelections = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchProductSelections" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "limit" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "offset" } }, type: { kind: "NamedType", name: { kind: "Name", value: "Int" } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "sort" } }, type: { kind: "ListType", type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "String" } } } }, defaultValue: { kind: "NullValue" }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, defaultValue: { kind: "NullValue" }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "productSelections" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "limit" }, value: { kind: "Variable", name: { kind: "Name", value: "limit" } } }, { kind: "Argument", name: { kind: "Name", value: "offset" }, value: { kind: "Variable", name: { kind: "Name", value: "offset" } } }, { kind: "Argument", name: { kind: "Name", value: "sort" }, value: { kind: "Variable", name: { kind: "Name", value: "sort" } } }, { kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "count" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "offset" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "version" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "createdAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "lastModifiedAt" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "mode" }, arguments: [], directives: [] }] } }] } }] } }], loc: { start: 0, end: 424, source: { body: "query FetchProductSelections(\n $limit: Int = null\n $offset: Int = null\n $sort: [String!] = null\n $where: String = null\n) {\n productSelections(\n limit: $limit\n offset: $offset\n sort: $sort\n where: $where\n ) {\n total\n count\n offset\n results {\n id\n version\n key\n nameAllLocales {\n locale\n value\n }\n createdAt\n lastModifiedAt\n mode\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
2481
2462
|
const createQueryVariables$5 = function () {
|
|
2482
2463
|
let ownProps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
2483
2464
|
return {
|
|
@@ -3989,7 +3970,7 @@ function formatMoney$2(moneyValue, intl, options) {
|
|
|
3989
3970
|
}, options));
|
|
3990
3971
|
}
|
|
3991
3972
|
|
|
3992
|
-
var messages$
|
|
3973
|
+
var messages$L = reactIntl.defineMessages({
|
|
3993
3974
|
booleanYes: {
|
|
3994
3975
|
id: 'AttributeTypeFormats.boolean.yes',
|
|
3995
3976
|
description: 'The label for boolean attribute `true` value',
|
|
@@ -4071,7 +4052,7 @@ const formatDateTime = _ref7 => {
|
|
|
4071
4052
|
const formatBoolean = _ref8 => {
|
|
4072
4053
|
let value = _ref8.value,
|
|
4073
4054
|
intl = _ref8.intl;
|
|
4074
|
-
return value ? intl.formatMessage(messages$
|
|
4055
|
+
return value ? intl.formatMessage(messages$L.booleanYes) : intl.formatMessage(messages$L.booleanNo);
|
|
4075
4056
|
};
|
|
4076
4057
|
const formatNilType = _ref9 => {
|
|
4077
4058
|
let value = _ref9.value,
|
|
@@ -4466,6 +4447,12 @@ const convertAction = (actionName, actionPayload) => {
|
|
|
4466
4447
|
localizedName: l10n.transformLocalizedStringToLocalizedField(actionPayload.localizedName)
|
|
4467
4448
|
}
|
|
4468
4449
|
};
|
|
4450
|
+
case 'setSlug':
|
|
4451
|
+
return {
|
|
4452
|
+
[actionName]: {
|
|
4453
|
+
slug: l10n.transformLocalizedStringToLocalizedField(actionPayload.slug)
|
|
4454
|
+
}
|
|
4455
|
+
};
|
|
4469
4456
|
case 'setLineItemCustomField':
|
|
4470
4457
|
return {
|
|
4471
4458
|
[actionName]: {
|
|
@@ -5197,7 +5184,7 @@ function uniqueObjects(items) {
|
|
|
5197
5184
|
|
|
5198
5185
|
*/
|
|
5199
5186
|
|
|
5200
|
-
const messages$
|
|
5187
|
+
const messages$K = reactIntl.defineMessages({
|
|
5201
5188
|
unique: {
|
|
5202
5189
|
id: 'Validation.unique',
|
|
5203
5190
|
description: 'An error message to show if the field must be unique',
|
|
@@ -5239,7 +5226,7 @@ const messages$J = reactIntl.defineMessages({
|
|
|
5239
5226
|
defaultMessage: 'Invalid ID format. Please enter a valid ID.'
|
|
5240
5227
|
}
|
|
5241
5228
|
});
|
|
5242
|
-
var validationMessages = messages$
|
|
5229
|
+
var validationMessages = messages$K;
|
|
5243
5230
|
|
|
5244
5231
|
function getIndexesOfInvalidValues(values) {
|
|
5245
5232
|
let invalidValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
@@ -5498,7 +5485,7 @@ function ReferenceSearch(props) {
|
|
|
5498
5485
|
});
|
|
5499
5486
|
}
|
|
5500
5487
|
|
|
5501
|
-
const messages$
|
|
5488
|
+
const messages$I = reactIntl.defineMessages({
|
|
5502
5489
|
placeholder: {
|
|
5503
5490
|
id: 'CartDiscountReferenceSearch.placeholder',
|
|
5504
5491
|
description: 'Placeholder for search for a cart discount',
|
|
@@ -5525,7 +5512,7 @@ const messages$H = reactIntl.defineMessages({
|
|
|
5525
5512
|
defaultMessage: 'Enter search term'
|
|
5526
5513
|
}
|
|
5527
5514
|
});
|
|
5528
|
-
var messages$
|
|
5515
|
+
var messages$J = messages$I;
|
|
5529
5516
|
|
|
5530
5517
|
function ownKeys$11(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5531
5518
|
function _objectSpread$11(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$11(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$11(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -5550,7 +5537,7 @@ function Option$1(props) {
|
|
|
5550
5537
|
fallbackOrder: languages
|
|
5551
5538
|
})
|
|
5552
5539
|
}), jsxRuntime.jsxs(uiKit.Text.Detail, {
|
|
5553
|
-
children: [formatMessage(messages$
|
|
5540
|
+
children: [formatMessage(messages$J.key), ": ", cartDiscount.key || constants.NO_VALUE_FALLBACK]
|
|
5554
5541
|
})]
|
|
5555
5542
|
})
|
|
5556
5543
|
}));
|
|
@@ -5626,10 +5613,10 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5626
5613
|
onBlur: props.onBlur,
|
|
5627
5614
|
onChange: props.onChange,
|
|
5628
5615
|
value: returnNullIfEmpty(props.value),
|
|
5629
|
-
placeholderLabel: formatMessage(messages$
|
|
5630
|
-
searchPromptLabel: formatMessage(messages$
|
|
5631
|
-
noResultsLabel: formatMessage(messages$
|
|
5632
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5616
|
+
placeholderLabel: formatMessage(messages$J.placeholder),
|
|
5617
|
+
searchPromptLabel: formatMessage(messages$J.searchPrompt),
|
|
5618
|
+
noResultsLabel: formatMessage(messages$J.noResults),
|
|
5619
|
+
referenceIsMissingLabel: formatMessage(messages$J.isMissing),
|
|
5633
5620
|
mapItemToOption: mapItemToOption,
|
|
5634
5621
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5635
5622
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5639,7 +5626,7 @@ function CartDiscountReferenceSearch(props) {
|
|
|
5639
5626
|
});
|
|
5640
5627
|
}
|
|
5641
5628
|
|
|
5642
|
-
const messages$
|
|
5629
|
+
const messages$G = reactIntl.defineMessages({
|
|
5643
5630
|
placeholder: {
|
|
5644
5631
|
id: 'CategoryReferenceSearch.placeholder',
|
|
5645
5632
|
description: 'Placeholder for search for a category',
|
|
@@ -5671,7 +5658,7 @@ const messages$F = reactIntl.defineMessages({
|
|
|
5671
5658
|
defaultMessage: 'Parent Category'
|
|
5672
5659
|
}
|
|
5673
5660
|
});
|
|
5674
|
-
var messages$
|
|
5661
|
+
var messages$H = messages$G;
|
|
5675
5662
|
|
|
5676
5663
|
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; }
|
|
5677
5664
|
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; }
|
|
@@ -5696,7 +5683,7 @@ function Option(props) {
|
|
|
5696
5683
|
fallbackOrder: languages
|
|
5697
5684
|
})
|
|
5698
5685
|
}), category.parent && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5699
|
-
children: `${formatMessage(messages$
|
|
5686
|
+
children: `${formatMessage(messages$H.parentCategory)}: ${l10n.formatLocalizedString(category.parent, {
|
|
5700
5687
|
key: 'name',
|
|
5701
5688
|
locale: language,
|
|
5702
5689
|
fallbackOrder: languages
|
|
@@ -5708,7 +5695,7 @@ function Option(props) {
|
|
|
5708
5695
|
fallbackOrder: languages
|
|
5709
5696
|
})}`
|
|
5710
5697
|
}), category.externalId && jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
5711
|
-
children: `${formatMessage(messages$
|
|
5698
|
+
children: `${formatMessage(messages$H.externalId)}: ${category.externalId || constants.NO_VALUE_FALLBACK}`
|
|
5712
5699
|
})]
|
|
5713
5700
|
})
|
|
5714
5701
|
}));
|
|
@@ -5756,10 +5743,10 @@ function CategoryReferenceSearch(props) {
|
|
|
5756
5743
|
onBlur: props.onBlur,
|
|
5757
5744
|
onChange: props.onChange,
|
|
5758
5745
|
value: props.value,
|
|
5759
|
-
placeholderLabel: formatMessage(messages$
|
|
5760
|
-
searchPromptLabel: formatMessage(messages$
|
|
5761
|
-
noResultsLabel: formatMessage(messages$
|
|
5762
|
-
referenceIsMissingLabel: formatMessage(messages$
|
|
5746
|
+
placeholderLabel: formatMessage(messages$H.placeholder),
|
|
5747
|
+
searchPromptLabel: formatMessage(messages$H.searchPrompt),
|
|
5748
|
+
noResultsLabel: formatMessage(messages$H.noResults),
|
|
5749
|
+
referenceIsMissingLabel: formatMessage(messages$H.isMissing),
|
|
5763
5750
|
mapItemToOption: mapItemToOption,
|
|
5764
5751
|
loadItemsBySearchTerm: loadItemsBySearchTerm,
|
|
5765
5752
|
loadItemsByIds: loadItemsByIds,
|
|
@@ -5836,7 +5823,7 @@ const Button = _ref => {
|
|
|
5836
5823
|
Button.displayName = 'Button';
|
|
5837
5824
|
var Button$1 = Button;
|
|
5838
5825
|
|
|
5839
|
-
var messages$
|
|
5826
|
+
var messages$F = reactIntl.defineMessages({
|
|
5840
5827
|
chooseFile: {
|
|
5841
5828
|
id: 'ButtonFileInput.chooseFile',
|
|
5842
5829
|
description: 'The label text of the field for upload local file',
|
|
@@ -5853,7 +5840,7 @@ var styles$f = {
|
|
|
5853
5840
|
};
|
|
5854
5841
|
const FileInput = _ref => {
|
|
5855
5842
|
let _ref$children = _ref.children,
|
|
5856
|
-
children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$
|
|
5843
|
+
children = _ref$children === void 0 ? jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$Y({}, messages$F.chooseFile)) : _ref$children,
|
|
5857
5844
|
_ref$allowMultiple = _ref.allowMultiple,
|
|
5858
5845
|
allowMultiple = _ref$allowMultiple === void 0 ? false : _ref$allowMultiple,
|
|
5859
5846
|
_ref$acceptTypes = _ref.acceptTypes,
|
|
@@ -5876,7 +5863,7 @@ const FileInput = _ref => {
|
|
|
5876
5863
|
FileInput.displayName = 'FileInput';
|
|
5877
5864
|
var FileInput$1 = FileInput;
|
|
5878
5865
|
|
|
5879
|
-
var messages$
|
|
5866
|
+
var messages$E = reactIntl.defineMessages({
|
|
5880
5867
|
countriesBasicSelectPlaceholder: {
|
|
5881
5868
|
id: 'CountriesPicker.countriesBasicSelectPlaceholder',
|
|
5882
5869
|
description: 'Placeholder of the basic field for countries',
|
|
@@ -5897,7 +5884,7 @@ var messages$D = reactIntl.defineMessages({
|
|
|
5897
5884
|
function ownKeys$X(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
5898
5885
|
function _objectSpread$X(e) { for (var r = 1; r < arguments.length; r++) { var _context8, _context9; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context8 = ownKeys$X(Object(t), !0)).call(_context8, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context9 = ownKeys$X(Object(t))).call(_context9, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
5899
5886
|
const emptyCountryOption = intl => [{
|
|
5900
|
-
label: intl.formatMessage(messages$
|
|
5887
|
+
label: intl.formatMessage(messages$E.countriesAsyncSelectDropdownTypeAheadPrompt),
|
|
5901
5888
|
value: undefined,
|
|
5902
5889
|
isDisabled: true
|
|
5903
5890
|
}];
|
|
@@ -5940,7 +5927,7 @@ function CountriesAsyncSelectDropdown(props) {
|
|
|
5940
5927
|
var _context7;
|
|
5941
5928
|
return _findInstanceProperty__default["default"](_context7 = props.options).call(_context7, country => country.value === countryCode);
|
|
5942
5929
|
}),
|
|
5943
|
-
placeholder: intl.formatMessage(messages$
|
|
5930
|
+
placeholder: intl.formatMessage(messages$E.countriesAsyncSelectPlaceholder),
|
|
5944
5931
|
loadOptions: handleLoadOptions,
|
|
5945
5932
|
onChange: onOptionChange,
|
|
5946
5933
|
isDisabled: props.isDisabled,
|
|
@@ -5960,7 +5947,7 @@ function CountriesBasicSelectDropdown(props) {
|
|
|
5960
5947
|
value: props.value,
|
|
5961
5948
|
isRequired: props.isRequired,
|
|
5962
5949
|
description: props.description,
|
|
5963
|
-
placeholder: intl.formatMessage(messages$
|
|
5950
|
+
placeholder: intl.formatMessage(messages$E.countriesBasicSelectPlaceholder),
|
|
5964
5951
|
options: props.options,
|
|
5965
5952
|
onChange: props.onChange,
|
|
5966
5953
|
isDisabled: props.isDisabled,
|
|
@@ -5996,7 +5983,7 @@ function CountriesPicker(_ref) {
|
|
|
5996
5983
|
});
|
|
5997
5984
|
}
|
|
5998
5985
|
|
|
5999
|
-
var messages$
|
|
5986
|
+
var messages$D = reactIntl.defineMessages({
|
|
6000
5987
|
noCustomerGroupsFound: {
|
|
6001
5988
|
id: 'Prices.CustomerGroupPickerInput.noCustomerGroupsFound',
|
|
6002
5989
|
description: 'The message to display when no customer groups were found',
|
|
@@ -6086,7 +6073,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
6086
6073
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
6087
6074
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
6088
6075
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
6089
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
6076
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$D.noCustomerGroupsFound), [loadingError, formatMessage]);
|
|
6090
6077
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
6091
6078
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
6092
6079
|
max: "scale",
|
|
@@ -6097,7 +6084,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
6097
6084
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
6098
6085
|
id: name,
|
|
6099
6086
|
name: name,
|
|
6100
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
6087
|
+
placeholder: placeholder ?? formatMessage(messages$D.placeholder),
|
|
6101
6088
|
loadOptions: loadOptionsDebounced,
|
|
6102
6089
|
defaultOptions: true,
|
|
6103
6090
|
showOptionGroupDivider: true,
|
|
@@ -6116,7 +6103,7 @@ const CustomerGroupPickerInput = _ref => {
|
|
|
6116
6103
|
})
|
|
6117
6104
|
}), isLoadingFailed && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6118
6105
|
tone: "negative",
|
|
6119
|
-
intlMessage:
|
|
6106
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
6120
6107
|
})]
|
|
6121
6108
|
})
|
|
6122
6109
|
});
|
|
@@ -6132,7 +6119,8 @@ var styles$e = {
|
|
|
6132
6119
|
"divider-dashed": "divider-module__divider-dashed___2Em8A divider-module__divider___4-vdy"
|
|
6133
6120
|
};
|
|
6134
6121
|
function Divider(_ref) {
|
|
6135
|
-
let isDashed = _ref.isDashed,
|
|
6122
|
+
let _ref$isDashed = _ref.isDashed,
|
|
6123
|
+
isDashed = _ref$isDashed === void 0 ? false : _ref$isDashed,
|
|
6136
6124
|
_ref$orientation = _ref.orientation,
|
|
6137
6125
|
orientation = _ref$orientation === void 0 ? 'horizontal' : _ref$orientation;
|
|
6138
6126
|
return jsxRuntime.jsx("hr", {
|
|
@@ -6203,12 +6191,13 @@ const mergeSetItemsErrors = errors => _reduceInstanceProperty__default["default"
|
|
|
6203
6191
|
const CustomFieldErrors = props => {
|
|
6204
6192
|
// We want to highlight fields with errors not only after a form submission,
|
|
6205
6193
|
// but also after manually triggered form validation.
|
|
6206
|
-
const
|
|
6194
|
+
const _useFormikContext = formik.useFormikContext(),
|
|
6195
|
+
isFormValid = _useFormikContext.isValid;
|
|
6207
6196
|
const errors = _Array$isArray__default["default"](props.errors) ? mergeSetItemsErrors(props.errors) : props.errors;
|
|
6208
6197
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
6209
|
-
children: [props.isTouched ||
|
|
6198
|
+
children: [props.isTouched || !isFormValid && errors?.missing && jsxRuntime.jsx(_.ErrorMessage, {
|
|
6210
6199
|
intlMessage: validationMessages.required
|
|
6211
|
-
}), props.isTouched ||
|
|
6200
|
+
}), props.isTouched || !isFormValid && errors?.duplicated && jsxRuntime.jsx(_.ErrorMessage, {
|
|
6212
6201
|
intlMessage: validationMessages.unique
|
|
6213
6202
|
})]
|
|
6214
6203
|
});
|
|
@@ -6233,7 +6222,7 @@ const makeChangeHandler = setValue => event => {
|
|
|
6233
6222
|
// attributes.
|
|
6234
6223
|
const omitUnknownValues = (valuesAsMap, fieldDefinitionsAsMap) => omitBy__default["default"](valuesAsMap, (value, key) => isNil__default["default"](fieldDefinitionsAsMap[key]));
|
|
6235
6224
|
|
|
6236
|
-
var messages$
|
|
6225
|
+
var messages$C = reactIntl.defineMessages({
|
|
6237
6226
|
booleanSetInputYesLabel: {
|
|
6238
6227
|
id: 'CustomBooleanInputSet.booleanSetInputYesLabel',
|
|
6239
6228
|
description: 'Custom boolean input set Yes label',
|
|
@@ -6275,13 +6264,13 @@ function CustomBooleanInputSet(props) {
|
|
|
6275
6264
|
formatMessage = _useIntl.formatMessage;
|
|
6276
6265
|
const options = React.useMemo(() => [{
|
|
6277
6266
|
value: 'true',
|
|
6278
|
-
label: formatMessage(messages$
|
|
6267
|
+
label: formatMessage(messages$C.booleanSetInputYesLabel)
|
|
6279
6268
|
}, {
|
|
6280
6269
|
value: 'false',
|
|
6281
|
-
label: formatMessage(messages$
|
|
6270
|
+
label: formatMessage(messages$C.booleanSetInputNoLabel)
|
|
6282
6271
|
}, {
|
|
6283
6272
|
value: 'all',
|
|
6284
|
-
label: formatMessage(messages$
|
|
6273
|
+
label: formatMessage(messages$C.booleanSetInputAllLabel)
|
|
6285
6274
|
}], [formatMessage]);
|
|
6286
6275
|
const handleChange = makeChangeHandler(rawValue => {
|
|
6287
6276
|
const nullifiedIfNeeded = !rawValue ? undefined : valueToBooleanSet(rawValue);
|
|
@@ -6865,7 +6854,7 @@ const NestingLevelContext = /*#__PURE__*/React.createContext(0);
|
|
|
6865
6854
|
var NestingLevelContext$1 = NestingLevelContext;
|
|
6866
6855
|
|
|
6867
6856
|
// eslint-disable-next-line import/prefer-default-export
|
|
6868
|
-
const messages$
|
|
6857
|
+
const messages$B = reactIntl.defineMessages({
|
|
6869
6858
|
aboveFifthLevelWarning: {
|
|
6870
6859
|
id: 'attributeInputByType.nestedAttributes.aboveFifthLevelWarning',
|
|
6871
6860
|
description: 'Warning message shown when nested attribute are above the fifth level',
|
|
@@ -6877,9 +6866,9 @@ const messages$A = reactIntl.defineMessages({
|
|
|
6877
6866
|
defaultMessage: 'Empty'
|
|
6878
6867
|
}
|
|
6879
6868
|
});
|
|
6880
|
-
var customFieldsMessages = messages$
|
|
6869
|
+
var customFieldsMessages = messages$B;
|
|
6881
6870
|
|
|
6882
|
-
var messages$
|
|
6871
|
+
var messages$A = reactIntl.defineMessages({
|
|
6883
6872
|
updateButton: {
|
|
6884
6873
|
id: 'NestedAttributes.Details.updateButton',
|
|
6885
6874
|
description: 'Update button label',
|
|
@@ -6964,7 +6953,7 @@ const EditButton = props => {
|
|
|
6964
6953
|
formatMessage = _useIntl.formatMessage;
|
|
6965
6954
|
return jsxRuntime.jsx(uiKit.Tooltip, {
|
|
6966
6955
|
placement: "top",
|
|
6967
|
-
title: formatMessage(messages$
|
|
6956
|
+
title: formatMessage(messages$A.editTooltip),
|
|
6968
6957
|
children: jsxRuntime.jsx(uiKit.IconButton, {
|
|
6969
6958
|
label: "Edit",
|
|
6970
6959
|
isDisabled: props.isDisabled,
|
|
@@ -6980,12 +6969,12 @@ const DropChangesConfirmation = props => {
|
|
|
6980
6969
|
formatMessage = _useIntl2.formatMessage;
|
|
6981
6970
|
return jsxRuntime.jsx(applicationComponents.ConfirmationDialog, {
|
|
6982
6971
|
isOpen: props.isOpen || false,
|
|
6983
|
-
title: formatMessage(messages$
|
|
6984
|
-
labelPrimary: formatMessage(messages$
|
|
6972
|
+
title: formatMessage(messages$A.confirmationDialogTitle),
|
|
6973
|
+
labelPrimary: formatMessage(messages$A.nestedAttributesConfirmLabel),
|
|
6985
6974
|
onConfirm: props.onConfirm,
|
|
6986
6975
|
onCancel: props.onCancel,
|
|
6987
6976
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
6988
|
-
intlMessage: messages$
|
|
6977
|
+
intlMessage: messages$A.confirmationDialogBody
|
|
6989
6978
|
})
|
|
6990
6979
|
});
|
|
6991
6980
|
};
|
|
@@ -7010,11 +6999,11 @@ const NestedAttributeModalPage = props => {
|
|
|
7010
6999
|
children: [jsxRuntime.jsx(uiKit.SecondaryButton, {
|
|
7011
7000
|
isDisabled: !formik$1.dirty,
|
|
7012
7001
|
iconLeft: jsxRuntime.jsx(uiKit.RevertIcon, {}),
|
|
7013
|
-
label: formatMessage(messages$
|
|
7002
|
+
label: formatMessage(messages$A.cancelButton),
|
|
7014
7003
|
onClick: formik$1.resetForm
|
|
7015
7004
|
}), jsxRuntime.jsx(applicationComponents.CustomFormModalPage.FormPrimaryButton, {
|
|
7016
7005
|
isDisabled: !formik$1.dirty,
|
|
7017
|
-
label: formatMessage(messages$
|
|
7006
|
+
label: formatMessage(messages$A.updateButton),
|
|
7018
7007
|
onClick: formik$1.handleSubmit
|
|
7019
7008
|
})]
|
|
7020
7009
|
}),
|
|
@@ -7056,7 +7045,7 @@ const NestedInputControls = props => {
|
|
|
7056
7045
|
if (nextNestingLevel >= 6) return jsxRuntime.jsx(MaxNestingLevelReached, {});
|
|
7057
7046
|
const hasAttributes = props.productType.attributeDefinitions.length > 0;
|
|
7058
7047
|
if (!hasAttributes) return jsxRuntime.jsx(uiKit.Text.Body, {
|
|
7059
|
-
intlMessage: messages$
|
|
7048
|
+
intlMessage: messages$A.emptyProductType,
|
|
7060
7049
|
tone: "secondary"
|
|
7061
7050
|
});
|
|
7062
7051
|
return jsxRuntime.jsxs(uiKit.Spacings.Inline, {
|
|
@@ -7132,7 +7121,7 @@ const CustomNestedInput = /*#__PURE__*/React.memo(props => {
|
|
|
7132
7121
|
if (nestingLevel !== 0) parentFormik.submitForm();else showNotification({
|
|
7133
7122
|
kind: 'success',
|
|
7134
7123
|
domain: constants.DOMAINS.SIDE,
|
|
7135
|
-
text: formatMessage(messages$
|
|
7124
|
+
text: formatMessage(messages$A.attributeUpdateSucceeded)
|
|
7136
7125
|
});
|
|
7137
7126
|
setSubmitting(false);
|
|
7138
7127
|
},
|
|
@@ -7251,7 +7240,7 @@ function CustomChannelReferenceInput(props) {
|
|
|
7251
7240
|
}
|
|
7252
7241
|
CustomChannelReferenceInput.displayName = 'CustomChannelReferenceInput';
|
|
7253
7242
|
|
|
7254
|
-
var messages$
|
|
7243
|
+
var messages$z = reactIntl.defineMessages({
|
|
7255
7244
|
noProductsFound: {
|
|
7256
7245
|
id: 'Shared.ProductPickerInput.noProductsFound',
|
|
7257
7246
|
description: 'The message to display when no products were found',
|
|
@@ -7349,7 +7338,7 @@ const ProductPickerInput = _ref => {
|
|
|
7349
7338
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
7350
7339
|
id: name,
|
|
7351
7340
|
name: name,
|
|
7352
|
-
placeholder: formatMessage(messages$
|
|
7341
|
+
placeholder: formatMessage(messages$z.placeholder),
|
|
7353
7342
|
loadOptions: loadOptionsDebounced,
|
|
7354
7343
|
defaultOptions: [],
|
|
7355
7344
|
isClearable: isClearable,
|
|
@@ -7363,7 +7352,7 @@ const ProductPickerInput = _ref => {
|
|
|
7363
7352
|
onInputChange: handleInputChange,
|
|
7364
7353
|
onBlur: onBlur,
|
|
7365
7354
|
value: currentOption.data,
|
|
7366
|
-
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$
|
|
7355
|
+
noOptionsMessage: () => isLoadingFailed ? null : formatMessage(messages$z.noProductsFound),
|
|
7367
7356
|
hasError: hasError || isLoadingFailed,
|
|
7368
7357
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
7369
7358
|
menuPortalTarget: document.body,
|
|
@@ -7371,7 +7360,7 @@ const ProductPickerInput = _ref => {
|
|
|
7371
7360
|
})
|
|
7372
7361
|
}), isLoadingFailed && showLoadingErrorMessage && jsxRuntime.jsx(uiKit.Text.Body, {
|
|
7373
7362
|
tone: "negative",
|
|
7374
|
-
intlMessage:
|
|
7363
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
7375
7364
|
})]
|
|
7376
7365
|
})
|
|
7377
7366
|
});
|
|
@@ -7603,7 +7592,7 @@ const CustomFieldInput = /*#__PURE__*/React.memo(props => {
|
|
|
7603
7592
|
CustomFieldInput.displayName = 'CustomFieldInput';
|
|
7604
7593
|
var CustomFieldInput$1 = CustomFieldInput;
|
|
7605
7594
|
|
|
7606
|
-
var messages$
|
|
7595
|
+
var messages$y = reactIntl.defineMessages({
|
|
7607
7596
|
productReferenceLabel: {
|
|
7608
7597
|
id: 'CustomFieldsLabel.productReferenceLabel',
|
|
7609
7598
|
description: 'Label shown above the product picker input.',
|
|
@@ -7671,7 +7660,7 @@ const CustomFieldsLabelHint = _ref2 => {
|
|
|
7671
7660
|
children: [jsxRuntime.jsx(uiKit.WarningIcon, {
|
|
7672
7661
|
size: "medium",
|
|
7673
7662
|
color: "warning"
|
|
7674
|
-
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$
|
|
7663
|
+
}), jsxRuntime.jsx(reactIntl.FormattedMessage, _objectSpread$P({}, messages$y.cartDiscountMoreThan500))]
|
|
7675
7664
|
});
|
|
7676
7665
|
}
|
|
7677
7666
|
return l10n.formatLocalizedString(fieldDefinition, {
|
|
@@ -7685,8 +7674,8 @@ function CustomFieldsProductTypeReferenceSubtitle() {
|
|
|
7685
7674
|
formatMessage = _useIntl.formatMessage;
|
|
7686
7675
|
const _usePimStatus = usePimStatus(),
|
|
7687
7676
|
isProjectIndexed = _usePimStatus.isProjectIndexed;
|
|
7688
|
-
if (isProjectIndexed) return formatMessage(messages$
|
|
7689
|
-
return formatMessage(messages$
|
|
7677
|
+
if (isProjectIndexed) return formatMessage(messages$y.productTypeReferenceLabelI);
|
|
7678
|
+
return formatMessage(messages$y.productTypeReferenceLabel);
|
|
7690
7679
|
}
|
|
7691
7680
|
|
|
7692
7681
|
// TODO(pa3): this logic may be misplaced and probably
|
|
@@ -7703,13 +7692,13 @@ function CustomFieldsLabelSubtitle(_ref3) {
|
|
|
7703
7692
|
const referenceTypeName = capitalizeFirst(referenceTypeId);
|
|
7704
7693
|
if (_includesInstanceProperty__default["default"](_context = [SEARCHABLE_REFERENCES.category, SEARCHABLE_REFERENCES.cartDiscount]).call(_context, referenceTypeId)) return referenceTypeName;
|
|
7705
7694
|
if (referenceTypeId === SEARCHABLE_REFERENCES.product) {
|
|
7706
|
-
return formatMessage(messages$
|
|
7695
|
+
return formatMessage(messages$y.productReferenceLabel);
|
|
7707
7696
|
} else if (referenceTypeId === SEARCHABLE_REFERENCES.productType) {
|
|
7708
7697
|
return jsxRuntime.jsx(CustomFieldsProductTypeReferenceSubtitle, {});
|
|
7709
7698
|
} else if (referenceTypeId === SEARCHABLE_REFERENCES.channel) {
|
|
7710
|
-
return formatMessage(messages$
|
|
7699
|
+
return formatMessage(messages$y.channelReferenceLabel);
|
|
7711
7700
|
} else if (referenceTypeId === SEARCHABLE_REFERENCES.state) {
|
|
7712
|
-
return formatMessage(messages$
|
|
7701
|
+
return formatMessage(messages$y.stateReferenceLabel);
|
|
7713
7702
|
} else {
|
|
7714
7703
|
return `${referenceTypeName} ID`;
|
|
7715
7704
|
}
|
|
@@ -7725,7 +7714,7 @@ function CustomFieldsCountIndicator(_ref4) {
|
|
|
7725
7714
|
const _useIntl3 = reactIntl.useIntl(),
|
|
7726
7715
|
formatMessage = _useIntl3.formatMessage;
|
|
7727
7716
|
return assignedAttributeGroups?.length > 1 ? jsxRuntime.jsx(uiKit.Tooltip, {
|
|
7728
|
-
title: formatMessage(messages$
|
|
7717
|
+
title: formatMessage(messages$y.attributeGroupCountTooltip, {
|
|
7729
7718
|
attributeGroups: _mapInstanceProperty__default["default"](assignedAttributeGroups).call(assignedAttributeGroups, assignedAttributeGroup => formatLocalizedField(assignedAttributeGroup.nameAllLocales)).join(', '),
|
|
7730
7719
|
count: assignedAttributeGroups.length
|
|
7731
7720
|
}),
|
|
@@ -7782,7 +7771,7 @@ const CustomFieldsLabel = /*#__PURE__*/React.memo(_ref5 => {
|
|
|
7782
7771
|
CustomFieldsLabel.displayName = 'CustomFieldsTitle';
|
|
7783
7772
|
var CustomFieldsLabel$1 = CustomFieldsLabel;
|
|
7784
7773
|
|
|
7785
|
-
var messages$
|
|
7774
|
+
var messages$x = reactIntl.defineMessages({
|
|
7786
7775
|
referencedProductType: {
|
|
7787
7776
|
id: 'NestedAttributes.referencedProductType',
|
|
7788
7777
|
description: 'Product type referenced hint',
|
|
@@ -7793,7 +7782,7 @@ var messages$w = reactIntl.defineMessages({
|
|
|
7793
7782
|
function ownKeys$O(e, r) { var t = _Object$keys__default["default"](e); if (_Object$getOwnPropertySymbols__default["default"]) { var o = _Object$getOwnPropertySymbols__default["default"](e); r && (o = _filterInstanceProperty__default["default"](o).call(o, function (r) { return _Object$getOwnPropertyDescriptor__default["default"](e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
7794
7783
|
function _objectSpread$O(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$O(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$O(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
7795
7784
|
function ProductTypeReference(props) {
|
|
7796
|
-
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$
|
|
7785
|
+
const productTypeMessage = _objectSpread$O(_objectSpread$O({}, messages$x.referencedProductType), {}, {
|
|
7797
7786
|
values: {
|
|
7798
7787
|
productTypeName: props.productType.name
|
|
7799
7788
|
}
|
|
@@ -7817,7 +7806,7 @@ function CustomNestedFieldInput(props) {
|
|
|
7817
7806
|
color: "error"
|
|
7818
7807
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
7819
7808
|
tone: "negative",
|
|
7820
|
-
intlMessage:
|
|
7809
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
7821
7810
|
})]
|
|
7822
7811
|
});
|
|
7823
7812
|
if (!productType) return null;
|
|
@@ -7882,7 +7871,7 @@ const DraggableWrapper = _ref2 => {
|
|
|
7882
7871
|
return children;
|
|
7883
7872
|
}
|
|
7884
7873
|
};
|
|
7885
|
-
return jsxRuntime.jsx(
|
|
7874
|
+
return jsxRuntime.jsx(dnd.Draggable, {
|
|
7886
7875
|
draggableId: draggableId,
|
|
7887
7876
|
index: index,
|
|
7888
7877
|
children: (provided, snapshot) => {
|
|
@@ -7921,9 +7910,9 @@ function _objectSpread$L(e) { for (var r = 1; r < arguments.length; r++) { var _
|
|
|
7921
7910
|
const DroppableWrapper = _ref => {
|
|
7922
7911
|
let children = _ref.children,
|
|
7923
7912
|
onDragEnd = _ref.onDragEnd;
|
|
7924
|
-
return jsxRuntime.jsx(
|
|
7913
|
+
return jsxRuntime.jsx(dnd.DragDropContext, {
|
|
7925
7914
|
onDragEnd: onDragEnd,
|
|
7926
|
-
children: jsxRuntime.jsx(
|
|
7915
|
+
children: jsxRuntime.jsx(dnd.Droppable, {
|
|
7927
7916
|
droppableId: "droppable",
|
|
7928
7917
|
children: provided => jsxRuntime.jsxs("div", _objectSpread$L(_objectSpread$L({
|
|
7929
7918
|
ref: provided.innerRef
|
|
@@ -8018,7 +8007,8 @@ const CustomFieldsInternal = _ref => {
|
|
|
8018
8007
|
touched = _useFormikContext.touched,
|
|
8019
8008
|
values = _valuesInstanceProperty__default["default"](_useFormikContext),
|
|
8020
8009
|
handleBlur = _useFormikContext.handleBlur,
|
|
8021
|
-
status = _useFormikContext.status
|
|
8010
|
+
status = _useFormikContext.status,
|
|
8011
|
+
isFormValid = _useFormikContext.isValid;
|
|
8022
8012
|
const _useIntl = reactIntl.useIntl(),
|
|
8023
8013
|
locale = _useIntl.locale;
|
|
8024
8014
|
const _useApplicationContex = applicationShellConnectors.useApplicationContext(applicationContext => ({
|
|
@@ -8030,7 +8020,6 @@ const CustomFieldsInternal = _ref => {
|
|
|
8030
8020
|
const isTailoringAttributesEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES);
|
|
8031
8021
|
const isTailoringAttributeForOtherTypes = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_TYPES_OTHER_THAN_TEXT);
|
|
8032
8022
|
const isTailoringFallbackEnabled = applicationShell.useFeatureToggle(PRODUCT_TAILORING_FOR_ATTRIBUTES_FALLBACK_VALUES);
|
|
8033
|
-
const didFormValidationFail = useDidFormValidationFail();
|
|
8034
8023
|
const fieldDefinitions = omitSetsOfSets(props.fieldDefinitions);
|
|
8035
8024
|
const _useDnDContext = useDnDContext(),
|
|
8036
8025
|
DroppableWrapper = _useDnDContext.DroppableWrapper,
|
|
@@ -8052,7 +8041,7 @@ const CustomFieldsInternal = _ref => {
|
|
|
8052
8041
|
|
|
8053
8042
|
// We want to highlight fields with errors not only after a form submission,
|
|
8054
8043
|
// but also after manually triggered form validation.
|
|
8055
|
-
const hasError = Boolean(fieldErrors) && (isTouched ||
|
|
8044
|
+
const hasError = Boolean(fieldErrors) && (isTouched || !isFormValid);
|
|
8056
8045
|
const validate = value => {
|
|
8057
8046
|
if (fieldDefinition.required && isNil__default["default"](value)) return {
|
|
8058
8047
|
missing: true
|
|
@@ -8757,6 +8746,146 @@ function ProductSelectionsPicker(_ref) {
|
|
|
8757
8746
|
});
|
|
8758
8747
|
}
|
|
8759
8748
|
|
|
8749
|
+
var messages$w = reactIntl.defineMessages({
|
|
8750
|
+
placeholder: {
|
|
8751
|
+
id: 'RecurrentIntervalPicker.placeholder',
|
|
8752
|
+
description: 'The placeholder of the input',
|
|
8753
|
+
defaultMessage: 'Not restricted to any recurrent interval'
|
|
8754
|
+
},
|
|
8755
|
+
missingOptionLabel: {
|
|
8756
|
+
id: 'RecurrentIntervalPicker.missingOptionLabel',
|
|
8757
|
+
description: 'The label of the option when the recurrent interval is not found',
|
|
8758
|
+
defaultMessage: 'Unknown recurrent interval ({value})'
|
|
8759
|
+
},
|
|
8760
|
+
missingSelectedWarning: {
|
|
8761
|
+
id: 'RecurrentIntervalPicker.missingSelectedWarning',
|
|
8762
|
+
description: 'The warning message shown below the input when the selected recurrent interval is not found in the options',
|
|
8763
|
+
defaultMessage: 'The selected recurrent interval could not be retrieved. Please check your recurrence policy configuration.'
|
|
8764
|
+
},
|
|
8765
|
+
noRecurrentIntervalsConfigured: {
|
|
8766
|
+
id: 'RecurrentIntervalPicker.noRecurrentIntervalsConfigured',
|
|
8767
|
+
description: 'Banner warning message shown when no recurrent intervals are configured in the project',
|
|
8768
|
+
defaultMessage: 'No recurrent intervals configured. Please check your recurrence policy configuration'
|
|
8769
|
+
}
|
|
8770
|
+
});
|
|
8771
|
+
|
|
8772
|
+
var FetchRecurrencePolicies = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "FetchRecurrencePolicies" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "where" } }, type: { kind: "NamedType", name: { kind: "Name", value: "String" } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "recurrencePolicies" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "where" }, value: { kind: "Variable", name: { kind: "Name", value: "where" } } }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "results" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "key" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "nameAllLocales" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "locale" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "value" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 191, source: { body: "query FetchRecurrencePolicies($where: String) {\n recurrencePolicies(where: $where) {\n results {\n id\n key\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
8773
|
+
const isRecurringOrdersDisabledError = error => {
|
|
8774
|
+
var _context;
|
|
8775
|
+
return error.extensions?.code === '403' && _includesInstanceProperty__default["default"](_context = error.message).call(_context, "The feature 'recurring-orders' is not enabled for this project. Please contact commercetools support.");
|
|
8776
|
+
};
|
|
8777
|
+
// @TODO: Remove these error checks when the feature is enabled by default
|
|
8778
|
+
const useRecurrenceIntervals = _ref => {
|
|
8779
|
+
let where = _ref.where,
|
|
8780
|
+
_ref$skip = _ref.skip,
|
|
8781
|
+
skip = _ref$skip === void 0 ? false : _ref$skip;
|
|
8782
|
+
const _useQuery = client.useQuery(FetchRecurrencePolicies, {
|
|
8783
|
+
context: {
|
|
8784
|
+
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
8785
|
+
},
|
|
8786
|
+
fetchPolicy: 'cache-and-network',
|
|
8787
|
+
variables: where ? {
|
|
8788
|
+
where
|
|
8789
|
+
} : undefined,
|
|
8790
|
+
skip
|
|
8791
|
+
}),
|
|
8792
|
+
data = _useQuery.data,
|
|
8793
|
+
loading = _useQuery.loading,
|
|
8794
|
+
rawError = _useQuery.error;
|
|
8795
|
+
const extractedErrors = rawError ? extractErrorFromGraphQlResponse(rawError) : [];
|
|
8796
|
+
const isRecurringOrdersDisabled = extractedErrors.length > 0 &&
|
|
8797
|
+
// If the only error is a 403 with the specific message, we assume the feature is disabled.
|
|
8798
|
+
_everyInstanceProperty__default["default"](extractedErrors).call(extractedErrors, isRecurringOrdersDisabledError);
|
|
8799
|
+
const error = isRecurringOrdersDisabled ? undefined : rawError;
|
|
8800
|
+
return {
|
|
8801
|
+
recurrencePolicies: data?.recurrencePolicies?.results ?? [],
|
|
8802
|
+
loading,
|
|
8803
|
+
error,
|
|
8804
|
+
isRecurringOrdersDisabled
|
|
8805
|
+
};
|
|
8806
|
+
};
|
|
8807
|
+
|
|
8808
|
+
const RecurrentIntervalPicker = _ref => {
|
|
8809
|
+
let name = _ref.name,
|
|
8810
|
+
value = _ref.value,
|
|
8811
|
+
onChange = _ref.onChange,
|
|
8812
|
+
onBlur = _ref.onBlur,
|
|
8813
|
+
onError = _ref.onError,
|
|
8814
|
+
_ref$isClearable = _ref.isClearable,
|
|
8815
|
+
isClearable = _ref$isClearable === void 0 ? true : _ref$isClearable,
|
|
8816
|
+
_ref$isDisabled = _ref.isDisabled,
|
|
8817
|
+
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
8818
|
+
_ref$isReadOnly = _ref.isReadOnly,
|
|
8819
|
+
isReadOnly = _ref$isReadOnly === void 0 ? false : _ref$isReadOnly;
|
|
8820
|
+
const _useIntl = reactIntl.useIntl(),
|
|
8821
|
+
formatMessage = _useIntl.formatMessage;
|
|
8822
|
+
const dataLocale = applicationShellConnectors.useApplicationContext(applicationContext => applicationContext.dataLocale);
|
|
8823
|
+
const formatLocalizedFieldToString = useFormatLocalizedFieldToString();
|
|
8824
|
+
const skip = isReadOnly && !value;
|
|
8825
|
+
const where = isReadOnly && value ? `id="${value}"` : undefined;
|
|
8826
|
+
const _useRecurrenceInterva = useRecurrenceIntervals({
|
|
8827
|
+
where,
|
|
8828
|
+
skip
|
|
8829
|
+
}),
|
|
8830
|
+
recurrencePolicies = _useRecurrenceInterva.recurrencePolicies,
|
|
8831
|
+
loading = _useRecurrenceInterva.loading,
|
|
8832
|
+
error = _useRecurrenceInterva.error;
|
|
8833
|
+
const selectedIsMissingInData = Boolean(value) && !_someInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => policy.id === value);
|
|
8834
|
+
const options = React.useMemo(() => {
|
|
8835
|
+
if (loading) return [];
|
|
8836
|
+
const mapped = _mapInstanceProperty__default["default"](recurrencePolicies).call(recurrencePolicies, policy => ({
|
|
8837
|
+
value: policy.id,
|
|
8838
|
+
label: formatLocalizedFieldToString(policy.nameAllLocales, policy.key)
|
|
8839
|
+
}));
|
|
8840
|
+
|
|
8841
|
+
// If the selected value cannot be loaded, add it as a missing option
|
|
8842
|
+
if (selectedIsMissingInData && value) {
|
|
8843
|
+
const label = formatMessage(messages$w.missingOptionLabel, {
|
|
8844
|
+
value
|
|
8845
|
+
});
|
|
8846
|
+
return [{
|
|
8847
|
+
value,
|
|
8848
|
+
label
|
|
8849
|
+
}, ...mapped];
|
|
8850
|
+
}
|
|
8851
|
+
return mapped;
|
|
8852
|
+
}, [recurrencePolicies, selectedIsMissingInData, value, dataLocale, formatMessage, formatLocalizedFieldToString, loading]);
|
|
8853
|
+
const noRecurrentIntervalsConfigured = !loading && recurrencePolicies.length === 0;
|
|
8854
|
+
React.useEffect(() => {
|
|
8855
|
+
if (error && onError) {
|
|
8856
|
+
onError(error);
|
|
8857
|
+
}
|
|
8858
|
+
}, [error, onError]);
|
|
8859
|
+
return jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
8860
|
+
scale: "s",
|
|
8861
|
+
children: [jsxRuntime.jsx(uiKit.SelectInput, {
|
|
8862
|
+
id: name,
|
|
8863
|
+
name: name,
|
|
8864
|
+
value: value,
|
|
8865
|
+
placeholder: messages$w.placeholder.defaultMessage,
|
|
8866
|
+
options: options,
|
|
8867
|
+
isClearable: isClearable,
|
|
8868
|
+
isReadOnly: isReadOnly,
|
|
8869
|
+
isDisabled: isDisabled || loading || noRecurrentIntervalsConfigured,
|
|
8870
|
+
onChange: onChange,
|
|
8871
|
+
onBlur: onBlur,
|
|
8872
|
+
hasError: !loading && !error && selectedIsMissingInData
|
|
8873
|
+
}), error ? jsxRuntime.jsx(uiKit.Text.Body, {
|
|
8874
|
+
tone: "negative",
|
|
8875
|
+
intlMessage: commonPickerMessages.loadingErrorMessage
|
|
8876
|
+
}) : selectedIsMissingInData ? jsxRuntime.jsx(uiKit.Text.Body, {
|
|
8877
|
+
tone: "negative",
|
|
8878
|
+
intlMessage: messages$w.missingSelectedWarning
|
|
8879
|
+
}) : null, !error && noRecurrentIntervalsConfigured && jsxRuntime.jsx(uiKit.ContentNotification, {
|
|
8880
|
+
type: "warning",
|
|
8881
|
+
children: jsxRuntime.jsx(uiKit.Text.Detail, {
|
|
8882
|
+
intlMessage: messages$w.noRecurrentIntervalsConfigured
|
|
8883
|
+
})
|
|
8884
|
+
})]
|
|
8885
|
+
});
|
|
8886
|
+
};
|
|
8887
|
+
var RecurrentIntervalPicker$1 = RecurrentIntervalPicker;
|
|
8888
|
+
|
|
8760
8889
|
// NOTE: this component is duplicated in `app-shell/from-core`.
|
|
8761
8890
|
var styles$b = {
|
|
8762
8891
|
"colored": "required-indicator-module__colored____YUFm",
|
|
@@ -8913,9 +9042,6 @@ var messages$u = reactIntl.defineMessages({
|
|
|
8913
9042
|
}
|
|
8914
9043
|
});
|
|
8915
9044
|
|
|
8916
|
-
const LOWER_STORES_LIMIT = 60;
|
|
8917
|
-
const UPPER_STORES_LIMIT = 500;
|
|
8918
|
-
|
|
8919
9045
|
// map store to options
|
|
8920
9046
|
const mapStoresToOptions = _ref => {
|
|
8921
9047
|
var _context, _context2;
|
|
@@ -10888,9 +11014,9 @@ const createQueryVariables = platformLimit => _reduceInstanceProperty__default["
|
|
|
10888
11014
|
}, previousIncludedLimits), {});
|
|
10889
11015
|
var createPlatformLimitsQueryVariables = createQueryVariables;
|
|
10890
11016
|
|
|
10891
|
-
var PlatformLimitsFetcherQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2107, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
11017
|
+
var PlatformLimitsFetcherQuery$1 = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxGroupsPerCustomer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2158, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n maxGroupsPerCustomer {\n limit\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
10892
11018
|
const usePlatformLimitsFetcher = platformLimit => {
|
|
10893
|
-
const _useQuery = react.useQuery(PlatformLimitsFetcherQuery, {
|
|
11019
|
+
const _useQuery = react.useQuery(PlatformLimitsFetcherQuery$1, {
|
|
10894
11020
|
variables: createPlatformLimitsQueryVariables(platformLimit),
|
|
10895
11021
|
context: {
|
|
10896
11022
|
target: constants.GRAPHQL_TARGETS.COMMERCETOOLS_PLATFORM
|
|
@@ -10911,6 +11037,8 @@ const usePlatformLimitsFetcher = platformLimit => {
|
|
|
10911
11037
|
};
|
|
10912
11038
|
var usePlatformLimitsFetcher$1 = usePlatformLimitsFetcher;
|
|
10913
11039
|
|
|
11040
|
+
var PlatformLimitsFetcherQuery = { kind: "Document", definitions: [{ kind: "OperationDefinition", operation: "query", name: { kind: "Name", value: "PlatformLimitsFetcherQuery" }, variableDefinitions: [{ kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }, { kind: "VariableDefinition", variable: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } }, type: { kind: "NonNullType", type: { kind: "NamedType", name: { kind: "Name", value: "Boolean" } } }, directives: [] }], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limits" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "shoppingLists" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShoppingLists" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "lineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "textLineItems" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "productDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeProductDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActive" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "cartDiscounts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCartDiscounts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "totalActiveWithoutDiscountCodes" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "stores" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeStores" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "inventorySupplyChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "productDistributionChannels" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customers" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomers" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxGroupsPerCustomer" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "customerGroups" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCustomerGroups" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "zones" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeZones" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "taxCategories" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeTaxCategories" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "shippingMethods" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeShippingMethods" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "carts" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeCarts" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "total" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "current" }, arguments: [], directives: [] }] } }] } }, { kind: "Field", name: { kind: "Name", value: "businessUnits" }, arguments: [], directives: [{ kind: "Directive", name: { kind: "Name", value: "include" }, arguments: [{ kind: "Argument", name: { kind: "Name", value: "if" }, value: { kind: "Variable", name: { kind: "Name", value: "shouldIncludeBusinessUnits" } } }] }], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "maxDivisions" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxDepthLimit" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociates" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }, { kind: "Field", name: { kind: "Name", value: "maxAssociateRoles" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "limit" }, arguments: [], directives: [] }] } }] } }] } }] } }], loc: { start: 0, end: 2158, source: { body: "query PlatformLimitsFetcherQuery(\n $shouldIncludeShoppingLists: Boolean!\n $shouldIncludeProductDiscounts: Boolean!\n $shouldIncludeCartDiscounts: Boolean!\n $shouldIncludeStores: Boolean!\n $shouldIncludeCustomers: Boolean!\n $shouldIncludeCustomerGroups: Boolean!\n $shouldIncludeZones: Boolean!\n $shouldIncludeTaxCategories: Boolean!\n $shouldIncludeShippingMethods: Boolean!\n $shouldIncludeCarts: Boolean!\n $shouldIncludeBusinessUnits: Boolean!\n) {\n limits {\n shoppingLists @include(if: $shouldIncludeShoppingLists) {\n total {\n limit\n current\n }\n lineItems {\n limit\n }\n textLineItems {\n limit\n }\n }\n productDiscounts @include(if: $shouldIncludeProductDiscounts) {\n totalActive {\n limit\n current\n }\n }\n cartDiscounts @include(if: $shouldIncludeCartDiscounts) {\n totalActiveWithoutDiscountCodes {\n limit\n current\n }\n }\n stores @include(if: $shouldIncludeStores) {\n total {\n limit\n current\n }\n inventorySupplyChannels {\n limit\n }\n productDistributionChannels {\n limit\n }\n }\n customers @include(if: $shouldIncludeCustomers) {\n total {\n limit\n current\n }\n maxGroupsPerCustomer {\n limit\n }\n }\n customerGroups @include(if: $shouldIncludeCustomerGroups) {\n total {\n limit\n current\n }\n }\n zones @include(if: $shouldIncludeZones) {\n total {\n limit\n current\n }\n }\n taxCategories @include(if: $shouldIncludeTaxCategories) {\n total {\n limit\n current\n }\n }\n shippingMethods @include(if: $shouldIncludeShippingMethods) {\n total {\n limit\n current\n }\n }\n carts @include(if: $shouldIncludeCarts) {\n total {\n limit\n current\n }\n }\n businessUnits @include(if: $shouldIncludeBusinessUnits) {\n maxDivisions {\n limit\n }\n maxDepthLimit {\n limit\n }\n maxAssociates {\n limit\n }\n maxAssociateRoles {\n limit\n }\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
11041
|
+
|
|
10914
11042
|
const useLimitsModalState = function () {
|
|
10915
11043
|
let isInitiallyOpen = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
10916
11044
|
const _useState = React.useState(isInitiallyOpen),
|
|
@@ -11037,7 +11165,7 @@ const getCustomerSupportLink = msg => jsxRuntime.jsx(uiKit.Link, {
|
|
|
11037
11165
|
isExternal: true,
|
|
11038
11166
|
to: constants.SUPPORT_PORTAL_URL,
|
|
11039
11167
|
children: msg
|
|
11040
|
-
});
|
|
11168
|
+
}, `msg-${msg}`);
|
|
11041
11169
|
const PlatformLimitWarningNotification = _ref => {
|
|
11042
11170
|
let resource = _ref.resource,
|
|
11043
11171
|
limit = _ref.limit;
|
|
@@ -11875,11 +12003,13 @@ var CustomersCombined = PlatformLimitsCustomersCombined;
|
|
|
11875
12003
|
|
|
11876
12004
|
const useCustomersPlatformLimits = () => {
|
|
11877
12005
|
const _useCustomersPlatform = useCustomersPlatformLimitsFetcher$1(),
|
|
12006
|
+
platformLimits = _useCustomersPlatform.platformLimits,
|
|
11878
12007
|
refetch = _useCustomersPlatform.refetch;
|
|
11879
12008
|
const _useCustomersPlatform2 = useCustomersPlatformLimitsStatus(),
|
|
11880
12009
|
hasReachedCustomersWarningLimit = _useCustomersPlatform2.hasReachedCustomersWarningLimit,
|
|
11881
12010
|
hasReachedCustomersErrorLimit = _useCustomersPlatform2.hasReachedCustomersErrorLimit;
|
|
11882
12011
|
const interceptNavigation = useInterceptNavigation$1(hasReachedCustomersErrorLimit);
|
|
12012
|
+
const maxGroupsPerCustomerLimit = platformLimits?.customers?.maxGroupsPerCustomer?.limit;
|
|
11883
12013
|
return {
|
|
11884
12014
|
CustomersLimits: {
|
|
11885
12015
|
Notifications: CustomersNotification,
|
|
@@ -11889,6 +12019,7 @@ const useCustomersPlatformLimits = () => {
|
|
|
11889
12019
|
ErrorModal: CustomersErrorModal
|
|
11890
12020
|
},
|
|
11891
12021
|
refetchCustomersPlatformLimits: refetch,
|
|
12022
|
+
maxGroupsPerCustomerLimit,
|
|
11892
12023
|
interceptNavigation,
|
|
11893
12024
|
status: {
|
|
11894
12025
|
hasReachedCustomersWarningLimit,
|
|
@@ -11913,6 +12044,38 @@ const injectCustomersPlatformLimits = () => WrappedComponent => {
|
|
|
11913
12044
|
};
|
|
11914
12045
|
var injectCustomersPlatformLimits$1 = injectCustomersPlatformLimits;
|
|
11915
12046
|
|
|
12047
|
+
const useBusinessUnitsPlatformLimitsFetcher = () => {
|
|
12048
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.businessUnits),
|
|
12049
|
+
isLoading = _usePlatformLimitsFet.isLoading,
|
|
12050
|
+
error = _usePlatformLimitsFet.error,
|
|
12051
|
+
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
12052
|
+
refetch = _usePlatformLimitsFet.refetch;
|
|
12053
|
+
const formattedPlatformLimits = {
|
|
12054
|
+
businessUnitsMaxDivisionsLimit: platformLimits.businessUnits?.maxDivisions.limit,
|
|
12055
|
+
businessUnitsMaxDepthLimit: platformLimits.businessUnits?.maxDepthLimit.limit,
|
|
12056
|
+
businessUnitsMaxAssociatesLimit: platformLimits.businessUnits?.maxAssociates.limit,
|
|
12057
|
+
businessUnitsMaxAssociateRolesLimit: platformLimits.businessUnits?.maxAssociateRoles.limit
|
|
12058
|
+
};
|
|
12059
|
+
return {
|
|
12060
|
+
isLoading,
|
|
12061
|
+
error,
|
|
12062
|
+
platformLimits: formattedPlatformLimits,
|
|
12063
|
+
refetch
|
|
12064
|
+
};
|
|
12065
|
+
};
|
|
12066
|
+
var useBusinessUnitsPlatformLimitsFetcher$1 = useBusinessUnitsPlatformLimitsFetcher;
|
|
12067
|
+
|
|
12068
|
+
const useBusinessUnitsLimits = () => {
|
|
12069
|
+
const _useBusinessUnitsPlat = useBusinessUnitsPlatformLimitsFetcher$1(),
|
|
12070
|
+
refetch = _useBusinessUnitsPlat.refetch,
|
|
12071
|
+
platformLimits = _useBusinessUnitsPlat.platformLimits;
|
|
12072
|
+
return {
|
|
12073
|
+
BusinessUnitsLimits: platformLimits,
|
|
12074
|
+
refetchBusinessUnitsPlatformLimits: refetch
|
|
12075
|
+
};
|
|
12076
|
+
};
|
|
12077
|
+
var useBusinessUnitsLimits$1 = useBusinessUnitsLimits;
|
|
12078
|
+
|
|
11916
12079
|
const useCustomerGroupsPlatformLimitsFetcher = () => {
|
|
11917
12080
|
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.customerGroups),
|
|
11918
12081
|
isLoading = _usePlatformLimitsFet.isLoading,
|
|
@@ -12260,6 +12423,72 @@ const injectCustomerGroupsPlatformLimits = () => WrappedComponent => {
|
|
|
12260
12423
|
};
|
|
12261
12424
|
var injectCustomerGroupsPlatformLimits$1 = injectCustomerGroupsPlatformLimits;
|
|
12262
12425
|
|
|
12426
|
+
const useStoresPlatformLimitsFetcher = () => {
|
|
12427
|
+
const _usePlatformLimitsFet = usePlatformLimitsFetcher$1(RESOURCES_WITH_PLATFORM_LIMITS.stores),
|
|
12428
|
+
isLoading = _usePlatformLimitsFet.isLoading,
|
|
12429
|
+
error = _usePlatformLimitsFet.error,
|
|
12430
|
+
platformLimits = _usePlatformLimitsFet.platformLimits,
|
|
12431
|
+
refetch = _usePlatformLimitsFet.refetch;
|
|
12432
|
+
const formattedPlatformLimits = {
|
|
12433
|
+
total: platformLimits.stores?.total.limit,
|
|
12434
|
+
storeLimit: platformLimits.stores?.total.limit,
|
|
12435
|
+
storeCurrent: platformLimits.stores?.total.current,
|
|
12436
|
+
inventorySupplyChannels: platformLimits.stores?.inventorySupplyChannels.limit,
|
|
12437
|
+
productDistributionChannels: platformLimits.stores?.productDistributionChannels.limit
|
|
12438
|
+
};
|
|
12439
|
+
return {
|
|
12440
|
+
isLoading,
|
|
12441
|
+
error,
|
|
12442
|
+
platformLimits: formattedPlatformLimits,
|
|
12443
|
+
refetch
|
|
12444
|
+
};
|
|
12445
|
+
};
|
|
12446
|
+
var useStoresPlatformLimitsFetcher$1 = useStoresPlatformLimitsFetcher;
|
|
12447
|
+
|
|
12448
|
+
const useStoresPlatformLimits = () => {
|
|
12449
|
+
const _useStoresPlatformLim = useStoresPlatformLimitsFetcher$1(),
|
|
12450
|
+
platformLimits = _useStoresPlatformLim.platformLimits;
|
|
12451
|
+
if (!platformLimits?.total) {
|
|
12452
|
+
return {
|
|
12453
|
+
hasReachedStoresWarningLimit: false,
|
|
12454
|
+
hasReachedStoresErrorLimit: false
|
|
12455
|
+
};
|
|
12456
|
+
}
|
|
12457
|
+
const storeLimit = platformLimits.storeLimit,
|
|
12458
|
+
storeCurrent = platformLimits.storeCurrent;
|
|
12459
|
+
const hasReachedStoresWarningLimit = getHasExceededWarningThreshold({
|
|
12460
|
+
limit: storeLimit,
|
|
12461
|
+
current: storeCurrent
|
|
12462
|
+
});
|
|
12463
|
+
const hasReachedStoresErrorLimit = getHasExceededLimit({
|
|
12464
|
+
limit: storeLimit,
|
|
12465
|
+
current: storeCurrent
|
|
12466
|
+
});
|
|
12467
|
+
return {
|
|
12468
|
+
hasReachedStoresWarningLimit,
|
|
12469
|
+
hasReachedStoresErrorLimit
|
|
12470
|
+
};
|
|
12471
|
+
};
|
|
12472
|
+
var useStoresPlatformLimitsStatus = useStoresPlatformLimits;
|
|
12473
|
+
|
|
12474
|
+
const useStoresLimits = () => {
|
|
12475
|
+
const _useStoresPlatformLim = useStoresPlatformLimitsFetcher$1(),
|
|
12476
|
+
refetch = _useStoresPlatformLim.refetch,
|
|
12477
|
+
platformLimits = _useStoresPlatformLim.platformLimits;
|
|
12478
|
+
const _useStoresPlatformLim2 = useStoresPlatformLimitsStatus(),
|
|
12479
|
+
hasReachedStoresWarningLimit = _useStoresPlatformLim2.hasReachedStoresWarningLimit,
|
|
12480
|
+
hasReachedStoresErrorLimit = _useStoresPlatformLim2.hasReachedStoresErrorLimit;
|
|
12481
|
+
return {
|
|
12482
|
+
StoreLimits: platformLimits,
|
|
12483
|
+
refetchStoresPlatformLimits: refetch,
|
|
12484
|
+
status: {
|
|
12485
|
+
hasReachedStoresWarningLimit,
|
|
12486
|
+
hasReachedStoresErrorLimit
|
|
12487
|
+
}
|
|
12488
|
+
};
|
|
12489
|
+
};
|
|
12490
|
+
var useStoresLimits$1 = useStoresLimits;
|
|
12491
|
+
|
|
12263
12492
|
var messages$c = reactIntl.defineMessages({
|
|
12264
12493
|
yes: {
|
|
12265
12494
|
id: 'BooleanField.yes',
|
|
@@ -13701,6 +13930,9 @@ function resolveStatusType(product) {
|
|
|
13701
13930
|
if (published && !hasStagedChanges) return PRODUCT_STATUSES.PUBLISHED;
|
|
13702
13931
|
return PRODUCT_STATUSES.UNPUBLISHED;
|
|
13703
13932
|
}
|
|
13933
|
+
function getStampToneByPublishState(statusCode) {
|
|
13934
|
+
if (statusCode === PRODUCT_STATUSES.UNPUBLISHED) return 'secondary';else if (statusCode === PRODUCT_STATUSES.PUBLISHED) return 'positive';else if (statusCode === PRODUCT_STATUSES.MODIFIED) return 'warning';
|
|
13935
|
+
}
|
|
13704
13936
|
const computedProperties = {
|
|
13705
13937
|
// TODO: show relative time as tooltip
|
|
13706
13938
|
// `intl.formatRelative(<DATETIME>)`
|
|
@@ -13943,11 +14175,6 @@ function slugify(text) {
|
|
|
13943
14175
|
.replace(/-+$/, ''); // Trim - from end of text
|
|
13944
14176
|
}
|
|
13945
14177
|
|
|
13946
|
-
const contextProjects = ['context-medium-data-playground', 'context-demo-data-project-1', 'context-demo-data-project-10', 'context-demo-data-project-11', 'context-demo-data-project-12', 'context-demo-data-project-8', 'context-demo-data-project-13', 'context-demo-data-project-9', 'context-demo-data-project-14', 'context-demo-data-project-15', 'context-big-data-playground', 'context-without-stores', 'context-playground', 'context-small-data-playground'];
|
|
13947
|
-
const isStoreDataFenceProductSelection = projectKey => {
|
|
13948
|
-
return _includesInstanceProperty__default["default"](contextProjects).call(contextProjects, projectKey);
|
|
13949
|
-
};
|
|
13950
|
-
|
|
13951
14178
|
function swapArrayItems(array, from, to) {
|
|
13952
14179
|
const result = [...array];
|
|
13953
14180
|
result[to] = array[from];
|
|
@@ -14029,6 +14256,7 @@ var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kin
|
|
|
14029
14256
|
|
|
14030
14257
|
exports.BooleanField = booleanField;
|
|
14031
14258
|
exports.Button = Button$1;
|
|
14259
|
+
exports.CUSTOM_FIELD_TYPES = CUSTOM_FIELD_TYPES;
|
|
14032
14260
|
exports.CartDiscountReferenceSearch = CartDiscountReferenceSearch;
|
|
14033
14261
|
exports.CategoryReferenceSearch = CategoryReferenceSearch;
|
|
14034
14262
|
exports.CategorySearchPickerOptionFragment = CategorySearchPickerOptionFragment;
|
|
@@ -14036,6 +14264,7 @@ exports.CenteredLoadingSpinner = CenteredLoadingSpinner$1;
|
|
|
14036
14264
|
exports.ChannelPickerInput = ChannelPickerInput$1;
|
|
14037
14265
|
exports.CountriesPicker = CountriesPicker;
|
|
14038
14266
|
exports.CustomFieldDefinitionsConnector = customFieldDefinitionsConnector;
|
|
14267
|
+
exports.CustomFieldInput = CustomFieldInput$1;
|
|
14039
14268
|
exports.CustomFieldTooltip = CustomFieldTooltip$1;
|
|
14040
14269
|
exports.CustomFieldTypeDefinitionsConnector = CustomFieldTypeDefinitionsConnector$1;
|
|
14041
14270
|
exports.CustomFields = CustomFields$1;
|
|
@@ -14048,6 +14277,7 @@ exports.EMAIL_REGEX = EMAIL_REGEX;
|
|
|
14048
14277
|
exports.FileInput = FileInput$1;
|
|
14049
14278
|
exports.FormattedDateTime = FormattedDateTime$1;
|
|
14050
14279
|
exports.FormattedLocalizedString = FormattedLocalizedString;
|
|
14280
|
+
exports.LOWER_STORES_LIMIT = LOWER_STORES_LIMIT;
|
|
14051
14281
|
exports.LabelRange = LabelRange$1;
|
|
14052
14282
|
exports.MC_RESOURCES_WITH_KEYS = MC_RESOURCES_WITH_KEYS;
|
|
14053
14283
|
exports.MissingValueField = MissingValueField$1;
|
|
@@ -14056,11 +14286,15 @@ exports.NumericFormatInput = numericFormatInput;
|
|
|
14056
14286
|
exports.Option = Option$2;
|
|
14057
14287
|
exports.PRECISION_TYPES = PRECISION_TYPES;
|
|
14058
14288
|
exports.PimIndexerProvider = pimIndexerProvider;
|
|
14289
|
+
exports.PlatformLimitsFetcherQuery = PlatformLimitsFetcherQuery;
|
|
14059
14290
|
exports.ProductAttributeInput = ProductAttributeInput;
|
|
14060
14291
|
exports.ProductAttributes = ProductAttributes;
|
|
14061
14292
|
exports.ProductPickerInput = ProductPickerInput$1;
|
|
14062
14293
|
exports.ProductSelectionPicker = ProductSelectionsPicker;
|
|
14063
14294
|
exports.QUERY_LIMIT = QUERY_LIMIT;
|
|
14295
|
+
exports.QUERY_MAX_LIMIT = QUERY_MAX_LIMIT;
|
|
14296
|
+
exports.RESOURCES_WITH_PLATFORM_LIMITS = RESOURCES_WITH_PLATFORM_LIMITS;
|
|
14297
|
+
exports.RecurrentIntervalPicker = RecurrentIntervalPicker$1;
|
|
14064
14298
|
exports.RequestCache = RequestCache$1;
|
|
14065
14299
|
exports.RequiredIndicator = RequiredIndicator$1;
|
|
14066
14300
|
exports.ScrollToFieldError = ScrollToFieldError$1;
|
|
@@ -14069,12 +14303,14 @@ exports.SelectableFieldSearchInput = SelectableFieldSearchInput$1;
|
|
|
14069
14303
|
exports.StoreSelectField = StoreSelectField$1;
|
|
14070
14304
|
exports.StoreSelectInput = StoreSelectInput$1;
|
|
14071
14305
|
exports.ThrottledField = ThrottledField$1;
|
|
14306
|
+
exports.UPPER_STORES_LIMIT = UPPER_STORES_LIMIT;
|
|
14072
14307
|
exports.VALIDATOR_INTEGER = VALIDATOR_INTEGER;
|
|
14073
14308
|
exports.VALIDATOR_NUMERIC = VALIDATOR_NUMERIC;
|
|
14074
14309
|
exports.VALIDATOR_REQUIRED = VALIDATOR_REQUIRED;
|
|
14075
14310
|
exports.WithPimIndexer = WithPimIndexer$1;
|
|
14076
14311
|
exports.allowedProperties = allowedProperties;
|
|
14077
14312
|
exports.and = and;
|
|
14313
|
+
exports.attributeToCustomField = attributeToCustomField;
|
|
14078
14314
|
exports.attributesMapToNameValuePairs = attributesMapToNameValuePairs;
|
|
14079
14315
|
exports.base64ToString = base64ToString;
|
|
14080
14316
|
exports.booleanMessages = messages$c;
|
|
@@ -14092,6 +14328,7 @@ exports.convertProductSelectionFromGraphQl = convertProductSelectionFromGraphQl;
|
|
|
14092
14328
|
exports.convertRatioToPercentage = convertRatioToPercentage;
|
|
14093
14329
|
exports.createGraphQlUpdateActions = createGraphQlUpdateActions;
|
|
14094
14330
|
exports.createNextSortDefinition = createNextSortDefinition$1;
|
|
14331
|
+
exports.createPlatformLimitsQueryVariables = createPlatformLimitsQueryVariables;
|
|
14095
14332
|
exports.createReducer = createReducer;
|
|
14096
14333
|
exports.createResourceReducer = createResourceReducer;
|
|
14097
14334
|
exports.customFieldsTransformer = customFields;
|
|
@@ -14131,6 +14368,7 @@ exports.getPrefixSearchBounds = getPrefixSearchBounds$1;
|
|
|
14131
14368
|
exports.getPriceChannelName = getPriceChannelName;
|
|
14132
14369
|
exports.getReferenceTypeId = getReferenceTypeId;
|
|
14133
14370
|
exports.getSelectedPrice = getSelectedPrice;
|
|
14371
|
+
exports.getStampToneByPublishState = getStampToneByPublishState;
|
|
14134
14372
|
exports.getTimeZoneId = getTimeZoneId;
|
|
14135
14373
|
exports.getTimeZoneLabel = getTimeZoneLabel;
|
|
14136
14374
|
exports.getTypeNameOfType = getTypeNameOfType;
|
|
@@ -14157,12 +14395,12 @@ exports.injectToggleState = injectModalState$1;
|
|
|
14157
14395
|
exports.injectZonesPlatformLimits = injectZonesPlatformLimits$1;
|
|
14158
14396
|
exports.isEmpty = isEmptyFilter;
|
|
14159
14397
|
exports.isEmptyValue = isEmptyValue;
|
|
14160
|
-
exports.isStoreDataFenceProductSelection = isStoreDataFenceProductSelection;
|
|
14161
14398
|
exports.isUUID = isUUID$1;
|
|
14162
14399
|
exports.isValidISODate = isValidISODate;
|
|
14163
14400
|
exports.isValidISODateTime = isValidISODateTime;
|
|
14164
14401
|
exports.isValidISOTime = isValidISOTime;
|
|
14165
14402
|
exports.keepDisplayName = keepDisplayName$1;
|
|
14403
|
+
exports.mapShippingRateTierToGraphQL = mapShippingRateTierToGraphQL;
|
|
14166
14404
|
exports.mapStoresToOptions = mapStoresToOptions;
|
|
14167
14405
|
exports.mapTimeZonesToOptions = mapTimeZonesToOptions;
|
|
14168
14406
|
exports.minusify = minusify;
|
|
@@ -14173,14 +14411,14 @@ exports.not = not;
|
|
|
14173
14411
|
exports.omitDeep = omitDeep;
|
|
14174
14412
|
exports.omitSetsOfSets = omitSetsOfSets;
|
|
14175
14413
|
exports.or = or;
|
|
14176
|
-
exports.pickerMessages =
|
|
14414
|
+
exports.pickerMessages = commonPickerMessages;
|
|
14177
14415
|
exports.range = range;
|
|
14178
14416
|
exports.reorderArrayItems = reorderArrayItems;
|
|
14179
14417
|
exports.resolveStatusType = resolveStatusType;
|
|
14180
14418
|
exports.safelyAddFallback = safelyAddFallback;
|
|
14181
14419
|
exports.sanitize = sanitize;
|
|
14182
14420
|
exports.searchCategories = searchCategories;
|
|
14183
|
-
exports.searchInputMessages = messages$
|
|
14421
|
+
exports.searchInputMessages = messages$O;
|
|
14184
14422
|
exports.setDisplayName = setDisplayName$1;
|
|
14185
14423
|
exports.setToArray = setToArray;
|
|
14186
14424
|
exports.shallowEqual = shallowEqual;
|
|
@@ -14197,6 +14435,7 @@ exports.transformLocalizedFieldsForCategory = transformLocalizedFieldsForCategor
|
|
|
14197
14435
|
exports.truncate = truncate;
|
|
14198
14436
|
exports.unique = unique;
|
|
14199
14437
|
exports.uniqueObjects = uniqueObjects;
|
|
14438
|
+
exports.useBusinessUnitsPlatformLimits = useBusinessUnitsLimits$1;
|
|
14200
14439
|
exports.useCachedCategoryOptions = useCachedCategoryOptions;
|
|
14201
14440
|
exports.useCurrentOption = useCurrentOption;
|
|
14202
14441
|
exports.useCustomFieldsDnDContext = useDnDContext;
|
|
@@ -14214,11 +14453,13 @@ exports.usePimIndexer = usePimIndexer;
|
|
|
14214
14453
|
exports.usePrevious = usePrevious$1;
|
|
14215
14454
|
exports.useProductSelectionsFetcher = useProductSelectionsFetcher$1;
|
|
14216
14455
|
exports.useProductSelectionsTotalFetcher = useProductSelectionsTotalFetcher$1;
|
|
14456
|
+
exports.useRecurrenceIntervals = useRecurrenceIntervals;
|
|
14217
14457
|
exports.useRoleNotificationEffect = useRoleNotificationEffect$1;
|
|
14218
14458
|
exports.useShippingMethodsPlatformLimits = useShippingMethodsPlatformLimits;
|
|
14219
14459
|
exports.useStorage = useStorage$1;
|
|
14220
14460
|
exports.useStoreKeysInDataFences = useStoreKeysInDataFences$1;
|
|
14221
14461
|
exports.useStoresListFetcher = useStoresListFetcher$1;
|
|
14462
|
+
exports.useStoresPlatformLimits = useStoresLimits$1;
|
|
14222
14463
|
exports.useTaxCategoriesPlatformLimits = useTaxCategoriesPlatformLimits;
|
|
14223
14464
|
exports.useTotalNumberOfStoresFetcher = useTotalNumberOfStoresFetcher$1;
|
|
14224
14465
|
exports.validateCustomField = validateFilter$2;
|