@commercetools-frontend/experimental-components 8.0.6 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-experimental-components.cjs.dev.js +88 -17
- package/dist/commercetools-frontend-experimental-components.cjs.prod.js +88 -17
- package/dist/commercetools-frontend-experimental-components.esm.js +90 -20
- package/dist/declarations/src/components/carousel/carousel.d.ts +0 -1
- package/dist/declarations/src/components/channel-picker-input/channel-picker-input.d.ts +0 -1
- package/dist/declarations/src/components/product-selection-picker/product-selection-picker.d.ts +1 -1
- package/dist/declarations/src/components/recurrent-interval-picker/recurrent-interval-picker.d.ts +1 -1
- package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/mocks/handlers.d.ts +1 -1
- package/dist/declarations/src/components/recurrent-interval-picker/use-recurrence-intervals/use-recurrence-intervals.d.ts +4 -4
- package/dist/declarations/src/components/validated-input/validated-input.d.ts +1 -4
- package/dist/declarations/src/features/picker/shared/hooks/use-current-multiple-options.d.ts +1 -1
- package/dist/declarations/src/features/pim-indexer/components/pim-indexer-context/pim-indexer-context.d.ts +1 -1
- package/dist/declarations/src/fields/numeric-format-input/numeric-format-input.d.ts +3 -4
- package/dist/declarations/src/hooks/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-db-maintenance-notification/index.d.ts +1 -0
- package/dist/declarations/src/hooks/use-db-maintenance-notification/use-db-maintenance-notification.d.ts +7 -0
- package/dist/declarations/src/hooks/use-debounced-promise-callback.d.ts +1 -1
- package/dist/declarations/src/hooks/use-format-localized-field-to-string/use-format-localized-field-to-string.d.ts +1 -1
- package/dist/declarations/src/hooks/use-is-field-duplicated/use-is-field-duplicated.d.ts +1 -5
- package/dist/declarations/src/index.d.ts +2 -2
- package/dist/declarations/src/utils/bulk-notifications/get-bulk-notification.d.ts +2 -2
- package/dist/declarations/src/utils/connector/connector.d.ts +1 -3
- package/dist/declarations/src/utils/pim-query-clauses.d.ts +1 -1
- package/dist/declarations/src/utils/type-definitions/type-definitions.d.ts +1 -1
- package/package.json +16 -16
|
@@ -304,7 +304,7 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
304
304
|
}
|
|
305
305
|
});
|
|
306
306
|
|
|
307
|
-
var messages$
|
|
307
|
+
var messages$S = reactIntl.defineMessages({
|
|
308
308
|
noChannelsFound: {
|
|
309
309
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
310
310
|
description: 'The message to display when no channels were found',
|
|
@@ -423,7 +423,7 @@ const ChannelPickerInput = _ref => {
|
|
|
423
423
|
if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
|
|
424
424
|
}, [isCurrentOptionLoadingFailed, onError, currentOptions]);
|
|
425
425
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
426
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
426
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$S.noChannelsFound), [loadingError, formatMessage]);
|
|
427
427
|
const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
|
|
428
428
|
const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
|
|
429
429
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
@@ -435,7 +435,7 @@ const ChannelPickerInput = _ref => {
|
|
|
435
435
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
436
436
|
id: name,
|
|
437
437
|
name: name,
|
|
438
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
438
|
+
placeholder: placeholder ?? formatMessage(messages$S.placeholder),
|
|
439
439
|
loadOptions: loadOptionsDebounced,
|
|
440
440
|
defaultOptions: true,
|
|
441
441
|
showOptionGroupDivider: true,
|
|
@@ -491,7 +491,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
491
491
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
492
492
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
493
493
|
|
|
494
|
-
var messages$
|
|
494
|
+
var messages$R = reactIntl.defineMessages({
|
|
495
495
|
noProductTypesFound: {
|
|
496
496
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
497
497
|
description: 'The message to display when no product types were found',
|
|
@@ -580,7 +580,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
580
580
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
581
581
|
id: name,
|
|
582
582
|
name: name,
|
|
583
|
-
placeholder: formatMessage(messages$
|
|
583
|
+
placeholder: formatMessage(messages$R.placeholder),
|
|
584
584
|
loadOptions: loadOptionsDebounced,
|
|
585
585
|
defaultOptions: [],
|
|
586
586
|
isClearable: isClearable,
|
|
@@ -593,7 +593,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
593
593
|
onInputChange: handleInputChange,
|
|
594
594
|
onBlur: onBlur,
|
|
595
595
|
value: currentOption.data,
|
|
596
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
596
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$R.noProductTypesFound),
|
|
597
597
|
hasError: hasError || isLoadingFailed,
|
|
598
598
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
599
599
|
menuPortalTarget: document.body,
|
|
@@ -609,7 +609,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
609
609
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
610
610
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
611
611
|
|
|
612
|
-
var messages$
|
|
612
|
+
var messages$Q = reactIntl.defineMessages({
|
|
613
613
|
noStatesFound: {
|
|
614
614
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
615
615
|
description: 'The message to display when no states were found',
|
|
@@ -693,7 +693,7 @@ const StatePickerInput = _ref => {
|
|
|
693
693
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
694
694
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
695
695
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
696
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
696
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noStatesFound), [loadingError, formatMessage]);
|
|
697
697
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
698
698
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
699
699
|
max: "scale",
|
|
@@ -705,7 +705,7 @@ const StatePickerInput = _ref => {
|
|
|
705
705
|
id: name,
|
|
706
706
|
name: name,
|
|
707
707
|
horizontalConstraint: "scale",
|
|
708
|
-
placeholder: formatMessage(messages$
|
|
708
|
+
placeholder: formatMessage(messages$Q.placeholder),
|
|
709
709
|
loadOptions: loadOptionsDebounced,
|
|
710
710
|
defaultOptions: true,
|
|
711
711
|
showOptionGroupDivider: true,
|
|
@@ -762,7 +762,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
762
762
|
};
|
|
763
763
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
764
764
|
|
|
765
|
-
var messages$
|
|
765
|
+
var messages$P = reactIntl.defineMessages({
|
|
766
766
|
bottomOption: {
|
|
767
767
|
id: 'Products.Pickers.bottomOption',
|
|
768
768
|
description: 'The message to display at the end of the options menu',
|
|
@@ -774,7 +774,7 @@ function ownKeys$1t(e, r) { var t = _Object$keys__default["default"](e); if (_Ob
|
|
|
774
774
|
function _objectSpread$1t(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1t(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1t(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
775
775
|
const getBottomOption = formatMessage => ({
|
|
776
776
|
options: [{
|
|
777
|
-
label: formatMessage ? formatMessage(messages$
|
|
777
|
+
label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
|
|
778
778
|
isBottomOption: true,
|
|
779
779
|
isDisabled: true
|
|
780
780
|
}]
|
|
@@ -1935,7 +1935,7 @@ const usePersistedReminder = function () {
|
|
|
1935
1935
|
};
|
|
1936
1936
|
var usePersistedReminder$1 = usePersistedReminder;
|
|
1937
1937
|
|
|
1938
|
-
var messages$
|
|
1938
|
+
var messages$O = reactIntl.defineMessages({
|
|
1939
1939
|
profileUpdated: {
|
|
1940
1940
|
id: 'NotificationText.profileUpdated',
|
|
1941
1941
|
description: 'Label for the notification header',
|
|
@@ -1972,9 +1972,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
1972
1972
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1973
1973
|
as: "p",
|
|
1974
1974
|
isBold: true,
|
|
1975
|
-
intlMessage: messages$
|
|
1975
|
+
intlMessage: messages$O.profileUpdated
|
|
1976
1976
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1977
|
-
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$
|
|
1977
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$O.addMoreInformation), {}, {
|
|
1978
1978
|
values: {
|
|
1979
1979
|
newline: getNewLine
|
|
1980
1980
|
}
|
|
@@ -1983,7 +1983,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
1983
1983
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
1984
1984
|
scale: "xs",
|
|
1985
1985
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1986
|
-
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$
|
|
1986
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$O.informationAndProfileLink), {}, {
|
|
1987
1987
|
values: {
|
|
1988
1988
|
newline: getNewLine,
|
|
1989
1989
|
link: getLinkToProfile
|
|
@@ -2060,6 +2060,76 @@ const useRoleNotificationEffect = () => {
|
|
|
2060
2060
|
};
|
|
2061
2061
|
var useRoleNotificationEffect$1 = useRoleNotificationEffect;
|
|
2062
2062
|
|
|
2063
|
+
var messages$N = reactIntl.defineMessages({
|
|
2064
|
+
dbMaintenanceNotification: {
|
|
2065
|
+
id: 'Global.dbMaintenanceNotification',
|
|
2066
|
+
description: 'Database maintenance notification',
|
|
2067
|
+
defaultMessage: "A <linkDocs>database maintenance</linkDocs> is scheduled for January 22-23 2026. Some of the functionalities of the Merchant Center won't be available during that time, including customizations. Please plan your work accordingly."
|
|
2068
|
+
},
|
|
2069
|
+
dbMaintenanceOngoingNotification: {
|
|
2070
|
+
id: 'Global.dbMaintenanceOngoingNotification',
|
|
2071
|
+
description: 'Ongoing database maintenance notification',
|
|
2072
|
+
defaultMessage: 'Merchant Center database is currently under <linkDocs>planned maintenance</linkDocs>. Some of the functionalities of the Merchant Center are not available, including customizations. Thank you for your patience.'
|
|
2073
|
+
}
|
|
2074
|
+
});
|
|
2075
|
+
|
|
2076
|
+
// Hardcode feature flag name here instead of importing it from the private `constants` package.
|
|
2077
|
+
const ENABLE_DB_MAINTENANCE_NOTIFICATION = 'enableDbMaintenanceNotification';
|
|
2078
|
+
|
|
2079
|
+
// eslint-disable-next-line react/display-name
|
|
2080
|
+
const getLinkDocs = () => msg => jsxRuntime.jsx(uiKit.Link, {
|
|
2081
|
+
isExternal: true,
|
|
2082
|
+
to: "https://docs.commercetools.com/merchant-center/releases/2026-01-19-database-maintenance-on-22-23-january",
|
|
2083
|
+
children: msg
|
|
2084
|
+
}, 'db-maintenance-doc-link');
|
|
2085
|
+
const DISMISSED_DB_MAINTENANCE_UPCOMING = 'dismissed-db-maintenance-upcoming';
|
|
2086
|
+
const DISMISSED_DB_MAINTENANCE_ONGOING = 'dismissed-db-maintenance-ongoing';
|
|
2087
|
+
const PENDING_DB_MAINTENANCE_BANNER = 'pending-db-maintenance-banner';
|
|
2088
|
+
const useDbMaintenanceNotification = () => {
|
|
2089
|
+
const isDbMaintenanceNotificationEnabled = applicationShell.useFlagVariation(ENABLE_DB_MAINTENANCE_NOTIFICATION);
|
|
2090
|
+
const intl = reactIntl.useIntl();
|
|
2091
|
+
const showNotification = actionsGlobal.useShowNotification();
|
|
2092
|
+
const hasShownRef = React.useRef(false);
|
|
2093
|
+
React.useEffect(() => {
|
|
2094
|
+
// If running in Cypress, skip the notification
|
|
2095
|
+
if (typeof window !== 'undefined' && window.Cypress) {
|
|
2096
|
+
localStorage.setItem(DISMISSED_DB_MAINTENANCE_UPCOMING, 'true');
|
|
2097
|
+
return;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
// Show notification if:
|
|
2101
|
+
// 1. value is true (upcoming maintenance), OR
|
|
2102
|
+
// 2. value is false with reason "ongoing" (maintenance is happening now)
|
|
2103
|
+
const isUpcoming = isDbMaintenanceNotificationEnabled?.value === true;
|
|
2104
|
+
const isOngoing = isDbMaintenanceNotificationEnabled?.value === false && isDbMaintenanceNotificationEnabled?.reason === 'ongoing';
|
|
2105
|
+
if (!isUpcoming && !isOngoing) return;
|
|
2106
|
+
const dismissedFlag = isOngoing ? DISMISSED_DB_MAINTENANCE_ONGOING : DISMISSED_DB_MAINTENANCE_UPCOMING;
|
|
2107
|
+
const hasDismissedBanner = !!localStorage.getItem(dismissedFlag);
|
|
2108
|
+
const isPending = !!localStorage.getItem(PENDING_DB_MAINTENANCE_BANNER);
|
|
2109
|
+
if (!hasDismissedBanner && !isPending && !hasShownRef.current || isPending && !hasShownRef.current) {
|
|
2110
|
+
hasShownRef.current = true;
|
|
2111
|
+
localStorage.setItem(PENDING_DB_MAINTENANCE_BANNER, 'true');
|
|
2112
|
+
const notificationKind = isOngoing ? constants.NOTIFICATION_KINDS_SIDE.warning : constants.NOTIFICATION_KINDS_SIDE.info;
|
|
2113
|
+
const messageKey = isOngoing ? 'dbMaintenanceOngoingNotification' : 'dbMaintenanceNotification';
|
|
2114
|
+
const messageObj = messages$N[messageKey];
|
|
2115
|
+
const formattedText = intl.formatMessage(messageObj, {
|
|
2116
|
+
linkDocs: getLinkDocs()
|
|
2117
|
+
});
|
|
2118
|
+
showNotification({
|
|
2119
|
+
kind: notificationKind,
|
|
2120
|
+
domain: constants.DOMAINS.GLOBAL,
|
|
2121
|
+
text: formattedText
|
|
2122
|
+
}, {
|
|
2123
|
+
onDismiss: () => {
|
|
2124
|
+
localStorage.setItem(dismissedFlag, 'true');
|
|
2125
|
+
localStorage.removeItem(PENDING_DB_MAINTENANCE_BANNER);
|
|
2126
|
+
hasShownRef.current = false;
|
|
2127
|
+
}
|
|
2128
|
+
});
|
|
2129
|
+
}
|
|
2130
|
+
}, [showNotification, intl, isDbMaintenanceNotificationEnabled]);
|
|
2131
|
+
};
|
|
2132
|
+
|
|
2063
2133
|
function usePendingRequests() {
|
|
2064
2134
|
const _useState = React.useState(0),
|
|
2065
2135
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14272,7 +14342,7 @@ function normalizeProductSettings(settings) {
|
|
|
14272
14342
|
function splitVariantAttributesByConstraint(product, constraint) {
|
|
14273
14343
|
const productAttributeDefinitions = [];
|
|
14274
14344
|
const variantAttributeDefinitions = [];
|
|
14275
|
-
if (product
|
|
14345
|
+
if (product?.productType?.obj?.attributes) {
|
|
14276
14346
|
if (!constraint) throw new Error('You need to specify a constraint to filter for.');
|
|
14277
14347
|
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
14278
14348
|
const definition = product.productType.obj.attributes[i];
|
|
@@ -14284,7 +14354,7 @@ function splitVariantAttributesByConstraint(product, constraint) {
|
|
|
14284
14354
|
function splitProductAndVariantAttributes(product) {
|
|
14285
14355
|
const productAttributeDefinitions = [];
|
|
14286
14356
|
const variantAttributeDefinitions = [];
|
|
14287
|
-
if (product
|
|
14357
|
+
if (product?.productType?.obj?.attributes) {
|
|
14288
14358
|
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
14289
14359
|
const definition = product.productType.obj.attributes[i];
|
|
14290
14360
|
if (getProductAttributes(definition)) productAttributeDefinitions.push(definition);else variantAttributeDefinitions.push(definition);
|
|
@@ -14814,6 +14884,7 @@ exports.useCurrentOption = useCurrentOption;
|
|
|
14814
14884
|
exports.useCustomFieldsDnDContext = useDnDContext;
|
|
14815
14885
|
exports.useCustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1;
|
|
14816
14886
|
exports.useCustomersPlatformLimits = useCustomersPlatformLimits$1;
|
|
14887
|
+
exports.useDbMaintenanceNotification = useDbMaintenanceNotification;
|
|
14817
14888
|
exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback$1;
|
|
14818
14889
|
exports.useFormatCustomField = useFormatCustomField;
|
|
14819
14890
|
exports.useFormatLocalizedFieldToString = useFormatLocalizedFieldToString;
|
|
@@ -298,7 +298,7 @@ var commonPickerMessages = reactIntl.defineMessages({
|
|
|
298
298
|
}
|
|
299
299
|
});
|
|
300
300
|
|
|
301
|
-
var messages$
|
|
301
|
+
var messages$S = reactIntl.defineMessages({
|
|
302
302
|
noChannelsFound: {
|
|
303
303
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
304
304
|
description: 'The message to display when no channels were found',
|
|
@@ -417,7 +417,7 @@ const ChannelPickerInput = _ref => {
|
|
|
417
417
|
if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
|
|
418
418
|
}, [isCurrentOptionLoadingFailed, onError, currentOptions]);
|
|
419
419
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
420
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
420
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$S.noChannelsFound), [loadingError, formatMessage]);
|
|
421
421
|
const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
|
|
422
422
|
const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
|
|
423
423
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
@@ -429,7 +429,7 @@ const ChannelPickerInput = _ref => {
|
|
|
429
429
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
430
430
|
id: name,
|
|
431
431
|
name: name,
|
|
432
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
432
|
+
placeholder: placeholder ?? formatMessage(messages$S.placeholder),
|
|
433
433
|
loadOptions: loadOptionsDebounced,
|
|
434
434
|
defaultOptions: true,
|
|
435
435
|
showOptionGroupDivider: true,
|
|
@@ -485,7 +485,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
485
485
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
486
486
|
var FormattedDateTime$1 = reactIntl.injectIntl(FormattedDateTime);
|
|
487
487
|
|
|
488
|
-
var messages$
|
|
488
|
+
var messages$R = reactIntl.defineMessages({
|
|
489
489
|
noProductTypesFound: {
|
|
490
490
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
491
491
|
description: 'The message to display when no product types were found',
|
|
@@ -574,7 +574,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
574
574
|
children: jsxRuntime.jsx(uiKit.AsyncSelectInput, {
|
|
575
575
|
id: name,
|
|
576
576
|
name: name,
|
|
577
|
-
placeholder: formatMessage(messages$
|
|
577
|
+
placeholder: formatMessage(messages$R.placeholder),
|
|
578
578
|
loadOptions: loadOptionsDebounced,
|
|
579
579
|
defaultOptions: [],
|
|
580
580
|
isClearable: isClearable,
|
|
@@ -587,7 +587,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
587
587
|
onInputChange: handleInputChange,
|
|
588
588
|
onBlur: onBlur,
|
|
589
589
|
value: currentOption.data,
|
|
590
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
590
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$R.noProductTypesFound),
|
|
591
591
|
hasError: hasError || isLoadingFailed,
|
|
592
592
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
593
593
|
menuPortalTarget: document.body,
|
|
@@ -603,7 +603,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
603
603
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
604
604
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
605
605
|
|
|
606
|
-
var messages$
|
|
606
|
+
var messages$Q = reactIntl.defineMessages({
|
|
607
607
|
noStatesFound: {
|
|
608
608
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
609
609
|
description: 'The message to display when no states were found',
|
|
@@ -687,7 +687,7 @@ const StatePickerInput = _ref => {
|
|
|
687
687
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
688
688
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
689
689
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
690
|
-
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$
|
|
690
|
+
const handleNoOptions = React.useCallback(() => loadingError ? null : formatMessage(messages$Q.noStatesFound), [loadingError, formatMessage]);
|
|
691
691
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
692
692
|
return jsxRuntime.jsx(uiKit.Constraints.Horizontal, {
|
|
693
693
|
max: "scale",
|
|
@@ -699,7 +699,7 @@ const StatePickerInput = _ref => {
|
|
|
699
699
|
id: name,
|
|
700
700
|
name: name,
|
|
701
701
|
horizontalConstraint: "scale",
|
|
702
|
-
placeholder: formatMessage(messages$
|
|
702
|
+
placeholder: formatMessage(messages$Q.placeholder),
|
|
703
703
|
loadOptions: loadOptionsDebounced,
|
|
704
704
|
defaultOptions: true,
|
|
705
705
|
showOptionGroupDivider: true,
|
|
@@ -756,7 +756,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
756
756
|
};
|
|
757
757
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
758
758
|
|
|
759
|
-
var messages$
|
|
759
|
+
var messages$P = reactIntl.defineMessages({
|
|
760
760
|
bottomOption: {
|
|
761
761
|
id: 'Products.Pickers.bottomOption',
|
|
762
762
|
description: 'The message to display at the end of the options menu',
|
|
@@ -768,7 +768,7 @@ function ownKeys$1t(e, r) { var t = _Object$keys__default["default"](e); if (_Ob
|
|
|
768
768
|
function _objectSpread$1t(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context = ownKeys$1t(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context2 = ownKeys$1t(Object(t))).call(_context2, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
769
769
|
const getBottomOption = formatMessage => ({
|
|
770
770
|
options: [{
|
|
771
|
-
label: formatMessage ? formatMessage(messages$
|
|
771
|
+
label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
|
|
772
772
|
isBottomOption: true,
|
|
773
773
|
isDisabled: true
|
|
774
774
|
}]
|
|
@@ -1929,7 +1929,7 @@ const usePersistedReminder = function () {
|
|
|
1929
1929
|
};
|
|
1930
1930
|
var usePersistedReminder$1 = usePersistedReminder;
|
|
1931
1931
|
|
|
1932
|
-
var messages$
|
|
1932
|
+
var messages$O = reactIntl.defineMessages({
|
|
1933
1933
|
profileUpdated: {
|
|
1934
1934
|
id: 'NotificationText.profileUpdated',
|
|
1935
1935
|
description: 'Label for the notification header',
|
|
@@ -1966,9 +1966,9 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
1966
1966
|
children: [jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1967
1967
|
as: "p",
|
|
1968
1968
|
isBold: true,
|
|
1969
|
-
intlMessage: messages$
|
|
1969
|
+
intlMessage: messages$O.profileUpdated
|
|
1970
1970
|
}), jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1971
|
-
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$
|
|
1971
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$O.addMoreInformation), {}, {
|
|
1972
1972
|
values: {
|
|
1973
1973
|
newline: getNewLine
|
|
1974
1974
|
}
|
|
@@ -1977,7 +1977,7 @@ const NotificationText = () => jsxRuntime.jsxs(uiKit.Spacings.Stack, {
|
|
|
1977
1977
|
}), jsxRuntime.jsx(uiKit.Spacings.Stack, {
|
|
1978
1978
|
scale: "xs",
|
|
1979
1979
|
children: jsxRuntime.jsx(uiKit.Text.Body, {
|
|
1980
|
-
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$
|
|
1980
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$O.informationAndProfileLink), {}, {
|
|
1981
1981
|
values: {
|
|
1982
1982
|
newline: getNewLine,
|
|
1983
1983
|
link: getLinkToProfile
|
|
@@ -2054,6 +2054,76 @@ const useRoleNotificationEffect = () => {
|
|
|
2054
2054
|
};
|
|
2055
2055
|
var useRoleNotificationEffect$1 = useRoleNotificationEffect;
|
|
2056
2056
|
|
|
2057
|
+
var messages$N = reactIntl.defineMessages({
|
|
2058
|
+
dbMaintenanceNotification: {
|
|
2059
|
+
id: 'Global.dbMaintenanceNotification',
|
|
2060
|
+
description: 'Database maintenance notification',
|
|
2061
|
+
defaultMessage: "A <linkDocs>database maintenance</linkDocs> is scheduled for January 22-23 2026. Some of the functionalities of the Merchant Center won't be available during that time, including customizations. Please plan your work accordingly."
|
|
2062
|
+
},
|
|
2063
|
+
dbMaintenanceOngoingNotification: {
|
|
2064
|
+
id: 'Global.dbMaintenanceOngoingNotification',
|
|
2065
|
+
description: 'Ongoing database maintenance notification',
|
|
2066
|
+
defaultMessage: 'Merchant Center database is currently under <linkDocs>planned maintenance</linkDocs>. Some of the functionalities of the Merchant Center are not available, including customizations. Thank you for your patience.'
|
|
2067
|
+
}
|
|
2068
|
+
});
|
|
2069
|
+
|
|
2070
|
+
// Hardcode feature flag name here instead of importing it from the private `constants` package.
|
|
2071
|
+
const ENABLE_DB_MAINTENANCE_NOTIFICATION = 'enableDbMaintenanceNotification';
|
|
2072
|
+
|
|
2073
|
+
// eslint-disable-next-line react/display-name
|
|
2074
|
+
const getLinkDocs = () => msg => jsxRuntime.jsx(uiKit.Link, {
|
|
2075
|
+
isExternal: true,
|
|
2076
|
+
to: "https://docs.commercetools.com/merchant-center/releases/2026-01-19-database-maintenance-on-22-23-january",
|
|
2077
|
+
children: msg
|
|
2078
|
+
}, 'db-maintenance-doc-link');
|
|
2079
|
+
const DISMISSED_DB_MAINTENANCE_UPCOMING = 'dismissed-db-maintenance-upcoming';
|
|
2080
|
+
const DISMISSED_DB_MAINTENANCE_ONGOING = 'dismissed-db-maintenance-ongoing';
|
|
2081
|
+
const PENDING_DB_MAINTENANCE_BANNER = 'pending-db-maintenance-banner';
|
|
2082
|
+
const useDbMaintenanceNotification = () => {
|
|
2083
|
+
const isDbMaintenanceNotificationEnabled = applicationShell.useFlagVariation(ENABLE_DB_MAINTENANCE_NOTIFICATION);
|
|
2084
|
+
const intl = reactIntl.useIntl();
|
|
2085
|
+
const showNotification = actionsGlobal.useShowNotification();
|
|
2086
|
+
const hasShownRef = React.useRef(false);
|
|
2087
|
+
React.useEffect(() => {
|
|
2088
|
+
// If running in Cypress, skip the notification
|
|
2089
|
+
if (typeof window !== 'undefined' && window.Cypress) {
|
|
2090
|
+
localStorage.setItem(DISMISSED_DB_MAINTENANCE_UPCOMING, 'true');
|
|
2091
|
+
return;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
// Show notification if:
|
|
2095
|
+
// 1. value is true (upcoming maintenance), OR
|
|
2096
|
+
// 2. value is false with reason "ongoing" (maintenance is happening now)
|
|
2097
|
+
const isUpcoming = isDbMaintenanceNotificationEnabled?.value === true;
|
|
2098
|
+
const isOngoing = isDbMaintenanceNotificationEnabled?.value === false && isDbMaintenanceNotificationEnabled?.reason === 'ongoing';
|
|
2099
|
+
if (!isUpcoming && !isOngoing) return;
|
|
2100
|
+
const dismissedFlag = isOngoing ? DISMISSED_DB_MAINTENANCE_ONGOING : DISMISSED_DB_MAINTENANCE_UPCOMING;
|
|
2101
|
+
const hasDismissedBanner = !!localStorage.getItem(dismissedFlag);
|
|
2102
|
+
const isPending = !!localStorage.getItem(PENDING_DB_MAINTENANCE_BANNER);
|
|
2103
|
+
if (!hasDismissedBanner && !isPending && !hasShownRef.current || isPending && !hasShownRef.current) {
|
|
2104
|
+
hasShownRef.current = true;
|
|
2105
|
+
localStorage.setItem(PENDING_DB_MAINTENANCE_BANNER, 'true');
|
|
2106
|
+
const notificationKind = isOngoing ? constants.NOTIFICATION_KINDS_SIDE.warning : constants.NOTIFICATION_KINDS_SIDE.info;
|
|
2107
|
+
const messageKey = isOngoing ? 'dbMaintenanceOngoingNotification' : 'dbMaintenanceNotification';
|
|
2108
|
+
const messageObj = messages$N[messageKey];
|
|
2109
|
+
const formattedText = intl.formatMessage(messageObj, {
|
|
2110
|
+
linkDocs: getLinkDocs()
|
|
2111
|
+
});
|
|
2112
|
+
showNotification({
|
|
2113
|
+
kind: notificationKind,
|
|
2114
|
+
domain: constants.DOMAINS.GLOBAL,
|
|
2115
|
+
text: formattedText
|
|
2116
|
+
}, {
|
|
2117
|
+
onDismiss: () => {
|
|
2118
|
+
localStorage.setItem(dismissedFlag, 'true');
|
|
2119
|
+
localStorage.removeItem(PENDING_DB_MAINTENANCE_BANNER);
|
|
2120
|
+
hasShownRef.current = false;
|
|
2121
|
+
}
|
|
2122
|
+
});
|
|
2123
|
+
}
|
|
2124
|
+
}, [showNotification, intl, isDbMaintenanceNotificationEnabled]);
|
|
2125
|
+
};
|
|
2126
|
+
|
|
2057
2127
|
function usePendingRequests() {
|
|
2058
2128
|
const _useState = React.useState(0),
|
|
2059
2129
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14177,7 +14247,7 @@ function normalizeProductSettings(settings) {
|
|
|
14177
14247
|
function splitVariantAttributesByConstraint(product, constraint) {
|
|
14178
14248
|
const productAttributeDefinitions = [];
|
|
14179
14249
|
const variantAttributeDefinitions = [];
|
|
14180
|
-
if (product
|
|
14250
|
+
if (product?.productType?.obj?.attributes) {
|
|
14181
14251
|
if (!constraint) throw new Error('You need to specify a constraint to filter for.');
|
|
14182
14252
|
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
14183
14253
|
const definition = product.productType.obj.attributes[i];
|
|
@@ -14189,7 +14259,7 @@ function splitVariantAttributesByConstraint(product, constraint) {
|
|
|
14189
14259
|
function splitProductAndVariantAttributes(product) {
|
|
14190
14260
|
const productAttributeDefinitions = [];
|
|
14191
14261
|
const variantAttributeDefinitions = [];
|
|
14192
|
-
if (product
|
|
14262
|
+
if (product?.productType?.obj?.attributes) {
|
|
14193
14263
|
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
14194
14264
|
const definition = product.productType.obj.attributes[i];
|
|
14195
14265
|
if (getProductAttributes(definition)) productAttributeDefinitions.push(definition);else variantAttributeDefinitions.push(definition);
|
|
@@ -14719,6 +14789,7 @@ exports.useCurrentOption = useCurrentOption;
|
|
|
14719
14789
|
exports.useCustomFieldsDnDContext = useDnDContext;
|
|
14720
14790
|
exports.useCustomerGroupsPlatformLimits = useCustomerGroupsPlatformLimits$1;
|
|
14721
14791
|
exports.useCustomersPlatformLimits = useCustomersPlatformLimits$1;
|
|
14792
|
+
exports.useDbMaintenanceNotification = useDbMaintenanceNotification;
|
|
14722
14793
|
exports.useDebouncedPromiseCallback = useDebouncedPromiseCallback$1;
|
|
14723
14794
|
exports.useFormatCustomField = useFormatCustomField;
|
|
14724
14795
|
exports.useFormatLocalizedFieldToString = useFormatLocalizedFieldToString;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import _mapInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/map';
|
|
2
|
-
import { NO_VALUE_FALLBACK, MC_API_PROXY_TARGETS, GRAPHQL_TARGETS, DOMAINS, SUPPORT_PORTAL_URL } from '@commercetools-frontend/constants';
|
|
2
|
+
import { NO_VALUE_FALLBACK, MC_API_PROXY_TARGETS, GRAPHQL_TARGETS, DOMAINS, NOTIFICATION_KINDS_SIDE, SUPPORT_PORTAL_URL } from '@commercetools-frontend/constants';
|
|
3
3
|
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
4
4
|
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
5
5
|
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
@@ -106,7 +106,7 @@ import memoize from 'memoize-one';
|
|
|
106
106
|
import omitEmpty from 'omit-empty-es';
|
|
107
107
|
import shuffle from 'lodash/shuffle';
|
|
108
108
|
import { useSnapCarousel } from 'react-snap-carousel';
|
|
109
|
-
import { useFeatureToggle, useAdapterStatus } from '@commercetools-frontend/application-shell';
|
|
109
|
+
import { useFeatureToggle, useAdapterStatus, useFlagVariation } from '@commercetools-frontend/application-shell';
|
|
110
110
|
import { graphql, withApollo } from '@apollo/client/react/hoc';
|
|
111
111
|
import flatten from 'lodash/flatten';
|
|
112
112
|
import flowRight from 'lodash/flowRight';
|
|
@@ -202,7 +202,7 @@ var commonPickerMessages = defineMessages({
|
|
|
202
202
|
}
|
|
203
203
|
});
|
|
204
204
|
|
|
205
|
-
var messages$
|
|
205
|
+
var messages$S = defineMessages({
|
|
206
206
|
noChannelsFound: {
|
|
207
207
|
id: 'Products.ChannelPickerInput.noChannelsFound',
|
|
208
208
|
description: 'The message to display when no channels were found',
|
|
@@ -321,7 +321,7 @@ const ChannelPickerInput = _ref => {
|
|
|
321
321
|
if (isCurrentOptionLoadingFailed && onError) onError(currentOptions.error);
|
|
322
322
|
}, [isCurrentOptionLoadingFailed, onError, currentOptions]);
|
|
323
323
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
324
|
-
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$
|
|
324
|
+
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$S.noChannelsFound), [loadingError, formatMessage]);
|
|
325
325
|
const tooltipTitle = !isMulti ? currentSingleOption?.data?.label ?? '' : '';
|
|
326
326
|
const selectedValue = currentOptions.data ?? (isMulti ? [] : null);
|
|
327
327
|
return jsx(Constraints.Horizontal, {
|
|
@@ -333,7 +333,7 @@ const ChannelPickerInput = _ref => {
|
|
|
333
333
|
children: jsx(AsyncSelectInput, {
|
|
334
334
|
id: name,
|
|
335
335
|
name: name,
|
|
336
|
-
placeholder: placeholder ?? formatMessage(messages$
|
|
336
|
+
placeholder: placeholder ?? formatMessage(messages$S.placeholder),
|
|
337
337
|
loadOptions: loadOptionsDebounced,
|
|
338
338
|
defaultOptions: true,
|
|
339
339
|
showOptionGroupDivider: true,
|
|
@@ -389,7 +389,7 @@ let FormattedDateTime = /*#__PURE__*/function (_PureComponent) {
|
|
|
389
389
|
FormattedDateTime.displayName = 'FormattedDateTime';
|
|
390
390
|
var FormattedDateTime$1 = injectIntl(FormattedDateTime);
|
|
391
391
|
|
|
392
|
-
var messages$
|
|
392
|
+
var messages$R = defineMessages({
|
|
393
393
|
noProductTypesFound: {
|
|
394
394
|
id: 'Products.ProductTypePickerInput.noProductTypesFound',
|
|
395
395
|
description: 'The message to display when no product types were found',
|
|
@@ -478,7 +478,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
478
478
|
children: jsx(AsyncSelectInput, {
|
|
479
479
|
id: name,
|
|
480
480
|
name: name,
|
|
481
|
-
placeholder: formatMessage(messages$
|
|
481
|
+
placeholder: formatMessage(messages$R.placeholder),
|
|
482
482
|
loadOptions: loadOptionsDebounced,
|
|
483
483
|
defaultOptions: [],
|
|
484
484
|
isClearable: isClearable,
|
|
@@ -491,7 +491,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
491
491
|
onInputChange: handleInputChange,
|
|
492
492
|
onBlur: onBlur,
|
|
493
493
|
value: currentOption.data,
|
|
494
|
-
noOptionsMessage: () => loadingError ? null : formatMessage(messages$
|
|
494
|
+
noOptionsMessage: () => loadingError ? null : formatMessage(messages$R.noProductTypesFound),
|
|
495
495
|
hasError: hasError || isLoadingFailed,
|
|
496
496
|
menuPortalZIndex: Z_INDEX_DROPDOWN,
|
|
497
497
|
menuPortalTarget: document.body,
|
|
@@ -507,7 +507,7 @@ const ProductTypePickerInput = _ref => {
|
|
|
507
507
|
ProductTypePickerInput.displayName = 'ProductTypePickerInput';
|
|
508
508
|
var ProductTypePickerInput$1 = ProductTypePickerInput;
|
|
509
509
|
|
|
510
|
-
var messages$
|
|
510
|
+
var messages$Q = defineMessages({
|
|
511
511
|
noStatesFound: {
|
|
512
512
|
id: 'Products.StatePickerInput.noStatesFound',
|
|
513
513
|
description: 'The message to display when no states were found',
|
|
@@ -591,7 +591,7 @@ const StatePickerInput = _ref => {
|
|
|
591
591
|
if (isCurrentOptionLoadingFailed) onError(currentOption.error);
|
|
592
592
|
}, [isCurrentOptionLoadingFailed, onError, currentOption]);
|
|
593
593
|
const isLoadingFailed = isCurrentOptionLoadingFailed || Boolean(loadingError);
|
|
594
|
-
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$
|
|
594
|
+
const handleNoOptions = useCallback(() => loadingError ? null : formatMessage(messages$Q.noStatesFound), [loadingError, formatMessage]);
|
|
595
595
|
const tooltipTitle = currentOption?.data?.label ?? '';
|
|
596
596
|
return jsx(Constraints.Horizontal, {
|
|
597
597
|
max: "scale",
|
|
@@ -603,7 +603,7 @@ const StatePickerInput = _ref => {
|
|
|
603
603
|
id: name,
|
|
604
604
|
name: name,
|
|
605
605
|
horizontalConstraint: "scale",
|
|
606
|
-
placeholder: formatMessage(messages$
|
|
606
|
+
placeholder: formatMessage(messages$Q.placeholder),
|
|
607
607
|
loadOptions: loadOptionsDebounced,
|
|
608
608
|
defaultOptions: true,
|
|
609
609
|
showOptionGroupDivider: true,
|
|
@@ -660,7 +660,7 @@ const CustomFieldTooltip = _ref => {
|
|
|
660
660
|
};
|
|
661
661
|
var CustomFieldTooltip$1 = CustomFieldTooltip;
|
|
662
662
|
|
|
663
|
-
var messages$
|
|
663
|
+
var messages$P = defineMessages({
|
|
664
664
|
bottomOption: {
|
|
665
665
|
id: 'Products.Pickers.bottomOption',
|
|
666
666
|
description: 'The message to display at the end of the options menu',
|
|
@@ -672,7 +672,7 @@ function ownKeys$1t(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertyS
|
|
|
672
672
|
function _objectSpread$1t(e) { for (var r = 1; r < arguments.length; r++) { var _context, _context2; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context = ownKeys$1t(Object(t), !0)).call(_context, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context2 = ownKeys$1t(Object(t))).call(_context2, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
673
673
|
const getBottomOption = formatMessage => ({
|
|
674
674
|
options: [{
|
|
675
|
-
label: formatMessage ? formatMessage(messages$
|
|
675
|
+
label: formatMessage ? formatMessage(messages$P.bottomOption) : messages$P.bottomOption,
|
|
676
676
|
isBottomOption: true,
|
|
677
677
|
isDisabled: true
|
|
678
678
|
}]
|
|
@@ -1833,7 +1833,7 @@ const usePersistedReminder = function () {
|
|
|
1833
1833
|
};
|
|
1834
1834
|
var usePersistedReminder$1 = usePersistedReminder;
|
|
1835
1835
|
|
|
1836
|
-
var messages$
|
|
1836
|
+
var messages$O = defineMessages({
|
|
1837
1837
|
profileUpdated: {
|
|
1838
1838
|
id: 'NotificationText.profileUpdated',
|
|
1839
1839
|
description: 'Label for the notification header',
|
|
@@ -1870,9 +1870,9 @@ const NotificationText = () => jsxs(Spacings.Stack, {
|
|
|
1870
1870
|
children: [jsx(Text.Body, {
|
|
1871
1871
|
as: "p",
|
|
1872
1872
|
isBold: true,
|
|
1873
|
-
intlMessage: messages$
|
|
1873
|
+
intlMessage: messages$O.profileUpdated
|
|
1874
1874
|
}), jsx(Text.Body, {
|
|
1875
|
-
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$
|
|
1875
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$O.addMoreInformation), {}, {
|
|
1876
1876
|
values: {
|
|
1877
1877
|
newline: getNewLine
|
|
1878
1878
|
}
|
|
@@ -1881,7 +1881,7 @@ const NotificationText = () => jsxs(Spacings.Stack, {
|
|
|
1881
1881
|
}), jsx(Spacings.Stack, {
|
|
1882
1882
|
scale: "xs",
|
|
1883
1883
|
children: jsx(Text.Body, {
|
|
1884
|
-
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$
|
|
1884
|
+
intlMessage: _objectSpread$1e(_objectSpread$1e({}, messages$O.informationAndProfileLink), {}, {
|
|
1885
1885
|
values: {
|
|
1886
1886
|
newline: getNewLine,
|
|
1887
1887
|
link: getLinkToProfile
|
|
@@ -1958,6 +1958,76 @@ const useRoleNotificationEffect = () => {
|
|
|
1958
1958
|
};
|
|
1959
1959
|
var useRoleNotificationEffect$1 = useRoleNotificationEffect;
|
|
1960
1960
|
|
|
1961
|
+
var messages$N = defineMessages({
|
|
1962
|
+
dbMaintenanceNotification: {
|
|
1963
|
+
id: 'Global.dbMaintenanceNotification',
|
|
1964
|
+
description: 'Database maintenance notification',
|
|
1965
|
+
defaultMessage: "A <linkDocs>database maintenance</linkDocs> is scheduled for January 22-23 2026. Some of the functionalities of the Merchant Center won't be available during that time, including customizations. Please plan your work accordingly."
|
|
1966
|
+
},
|
|
1967
|
+
dbMaintenanceOngoingNotification: {
|
|
1968
|
+
id: 'Global.dbMaintenanceOngoingNotification',
|
|
1969
|
+
description: 'Ongoing database maintenance notification',
|
|
1970
|
+
defaultMessage: 'Merchant Center database is currently under <linkDocs>planned maintenance</linkDocs>. Some of the functionalities of the Merchant Center are not available, including customizations. Thank you for your patience.'
|
|
1971
|
+
}
|
|
1972
|
+
});
|
|
1973
|
+
|
|
1974
|
+
// Hardcode feature flag name here instead of importing it from the private `constants` package.
|
|
1975
|
+
const ENABLE_DB_MAINTENANCE_NOTIFICATION = 'enableDbMaintenanceNotification';
|
|
1976
|
+
|
|
1977
|
+
// eslint-disable-next-line react/display-name
|
|
1978
|
+
const getLinkDocs = () => msg => jsx(Link, {
|
|
1979
|
+
isExternal: true,
|
|
1980
|
+
to: "https://docs.commercetools.com/merchant-center/releases/2026-01-19-database-maintenance-on-22-23-january",
|
|
1981
|
+
children: msg
|
|
1982
|
+
}, 'db-maintenance-doc-link');
|
|
1983
|
+
const DISMISSED_DB_MAINTENANCE_UPCOMING = 'dismissed-db-maintenance-upcoming';
|
|
1984
|
+
const DISMISSED_DB_MAINTENANCE_ONGOING = 'dismissed-db-maintenance-ongoing';
|
|
1985
|
+
const PENDING_DB_MAINTENANCE_BANNER = 'pending-db-maintenance-banner';
|
|
1986
|
+
const useDbMaintenanceNotification = () => {
|
|
1987
|
+
const isDbMaintenanceNotificationEnabled = useFlagVariation(ENABLE_DB_MAINTENANCE_NOTIFICATION);
|
|
1988
|
+
const intl = useIntl();
|
|
1989
|
+
const showNotification = useShowNotification();
|
|
1990
|
+
const hasShownRef = useRef(false);
|
|
1991
|
+
useEffect(() => {
|
|
1992
|
+
// If running in Cypress, skip the notification
|
|
1993
|
+
if (typeof window !== 'undefined' && window.Cypress) {
|
|
1994
|
+
localStorage.setItem(DISMISSED_DB_MAINTENANCE_UPCOMING, 'true');
|
|
1995
|
+
return;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
// Show notification if:
|
|
1999
|
+
// 1. value is true (upcoming maintenance), OR
|
|
2000
|
+
// 2. value is false with reason "ongoing" (maintenance is happening now)
|
|
2001
|
+
const isUpcoming = isDbMaintenanceNotificationEnabled?.value === true;
|
|
2002
|
+
const isOngoing = isDbMaintenanceNotificationEnabled?.value === false && isDbMaintenanceNotificationEnabled?.reason === 'ongoing';
|
|
2003
|
+
if (!isUpcoming && !isOngoing) return;
|
|
2004
|
+
const dismissedFlag = isOngoing ? DISMISSED_DB_MAINTENANCE_ONGOING : DISMISSED_DB_MAINTENANCE_UPCOMING;
|
|
2005
|
+
const hasDismissedBanner = !!localStorage.getItem(dismissedFlag);
|
|
2006
|
+
const isPending = !!localStorage.getItem(PENDING_DB_MAINTENANCE_BANNER);
|
|
2007
|
+
if (!hasDismissedBanner && !isPending && !hasShownRef.current || isPending && !hasShownRef.current) {
|
|
2008
|
+
hasShownRef.current = true;
|
|
2009
|
+
localStorage.setItem(PENDING_DB_MAINTENANCE_BANNER, 'true');
|
|
2010
|
+
const notificationKind = isOngoing ? NOTIFICATION_KINDS_SIDE.warning : NOTIFICATION_KINDS_SIDE.info;
|
|
2011
|
+
const messageKey = isOngoing ? 'dbMaintenanceOngoingNotification' : 'dbMaintenanceNotification';
|
|
2012
|
+
const messageObj = messages$N[messageKey];
|
|
2013
|
+
const formattedText = intl.formatMessage(messageObj, {
|
|
2014
|
+
linkDocs: getLinkDocs()
|
|
2015
|
+
});
|
|
2016
|
+
showNotification({
|
|
2017
|
+
kind: notificationKind,
|
|
2018
|
+
domain: DOMAINS.GLOBAL,
|
|
2019
|
+
text: formattedText
|
|
2020
|
+
}, {
|
|
2021
|
+
onDismiss: () => {
|
|
2022
|
+
localStorage.setItem(dismissedFlag, 'true');
|
|
2023
|
+
localStorage.removeItem(PENDING_DB_MAINTENANCE_BANNER);
|
|
2024
|
+
hasShownRef.current = false;
|
|
2025
|
+
}
|
|
2026
|
+
});
|
|
2027
|
+
}
|
|
2028
|
+
}, [showNotification, intl, isDbMaintenanceNotificationEnabled]);
|
|
2029
|
+
};
|
|
2030
|
+
|
|
1961
2031
|
function usePendingRequests() {
|
|
1962
2032
|
const _useState = useState(0),
|
|
1963
2033
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -14170,7 +14240,7 @@ function normalizeProductSettings(settings) {
|
|
|
14170
14240
|
function splitVariantAttributesByConstraint(product, constraint) {
|
|
14171
14241
|
const productAttributeDefinitions = [];
|
|
14172
14242
|
const variantAttributeDefinitions = [];
|
|
14173
|
-
if (product
|
|
14243
|
+
if (product?.productType?.obj?.attributes) {
|
|
14174
14244
|
if (!constraint) throw new Error('You need to specify a constraint to filter for.');
|
|
14175
14245
|
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
14176
14246
|
const definition = product.productType.obj.attributes[i];
|
|
@@ -14182,7 +14252,7 @@ function splitVariantAttributesByConstraint(product, constraint) {
|
|
|
14182
14252
|
function splitProductAndVariantAttributes(product) {
|
|
14183
14253
|
const productAttributeDefinitions = [];
|
|
14184
14254
|
const variantAttributeDefinitions = [];
|
|
14185
|
-
if (product
|
|
14255
|
+
if (product?.productType?.obj?.attributes) {
|
|
14186
14256
|
for (let i = 0; i < product.productType.obj.attributes.length; i += 1) {
|
|
14187
14257
|
const definition = product.productType.obj.attributes[i];
|
|
14188
14258
|
if (getProductAttributes(definition)) productAttributeDefinitions.push(definition);else variantAttributeDefinitions.push(definition);
|
|
@@ -14521,4 +14591,4 @@ function withPendingRequests() {
|
|
|
14521
14591
|
|
|
14522
14592
|
var CategorySearchPickerOptionFragment = { kind: "Document", definitions: [{ kind: "FragmentDefinition", name: { kind: "Name", value: "CategorySearchPickerOptionFragment" }, typeCondition: { kind: "NamedType", name: { kind: "Name", value: "CategorySearch" } }, directives: [], selectionSet: { kind: "SelectionSet", selections: [{ kind: "Field", name: { kind: "Name", value: "id" }, arguments: [], directives: [] }, { kind: "Field", name: { kind: "Name", value: "externalId" }, 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: "slugAllLocales" }, 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: "parent" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ 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: "ancestors" }, arguments: [], directives: [], selectionSet: { kind: "SelectionSet", selections: [{ 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: 685, source: { body: "query SearchCategoryReference($locale: Locale!, $text: String!) {\n categories: categoryAutocomplete(locale: $locale, text: $text) {\n results {\n ...CategorySearchPickerOptionFragment\n }\n }\n}\n\nquery FetchCategoriesByIds($where: String!) {\n categories(where: $where) {\n results {\n id\n nameAllLocales {\n locale\n value\n }\n }\n }\n}\n\nfragment CategorySearchPickerOptionFragment on CategorySearch {\n id\n externalId\n nameAllLocales {\n locale\n value\n }\n slugAllLocales {\n locale\n value\n }\n parent {\n nameAllLocales {\n locale\n value\n }\n }\n ancestors {\n nameAllLocales {\n locale\n value\n }\n }\n}\n", name: "GraphQL request", locationOffset: { line: 1, column: 1 } } } };
|
|
14523
14593
|
|
|
14524
|
-
export { booleanField as BooleanField, CUSTOM_FIELD_TYPES, Carousel$1 as Carousel, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldInput$1 as CustomFieldInput, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FILTER_TYPES, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LOWER_STORES_LIMIT, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, PlatformLimitsFetcherQuery, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, QUERY_LIMIT, QUERY_MAX_LIMIT, RESOURCES_WITH_PLATFORM_LIMITS, RecurrentIntervalPicker$1 as RecurrentIntervalPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, UPPER_STORES_LIMIT, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributeToCustomField, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionDigit, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getProductAttributes, getProductLevelAttributes, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapShippingRateTierToGraphQL, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, commonPickerMessages as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, serializeAttributeValueForPimSearch, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitProductAndVariantAttributes, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useBusinessUnitsLimits$1 as useBusinessUnitsPlatformLimits, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedReminder$1 as usePersistedReminder, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useShowBulkNotification, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoreSearchIndexStatusFetcher$1 as useStoreSearchIndexStatusFetcher, useStoresListFetcher$1 as useStoresListFetcher, useStoresLimits$1 as useStoresPlatformLimits, useStoresSearchFetcher$1 as useStoresSearchFetcher, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, valueMapping, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };
|
|
14594
|
+
export { booleanField as BooleanField, CUSTOM_FIELD_TYPES, Carousel$1 as Carousel, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner$1 as CenteredLoadingSpinner, ChannelPickerInput$1 as ChannelPickerInput, CountriesPicker, customFieldDefinitionsConnector as CustomFieldDefinitionsConnector, CustomFieldInput$1 as CustomFieldInput, CustomFieldTooltip$1 as CustomFieldTooltip, CustomFieldTypeDefinitionsConnector$1 as CustomFieldTypeDefinitionsConnector, CustomFields$1 as CustomFields, CustomFieldsErrorTextNotification$1 as CustomFieldsErrorTextNotification, CustomFieldsFormField$1 as CustomFieldsFormField, CustomerGroupPickerInput$1 as CustomerGroupPickerInput, DefaultPageSizes, Divider, EMAIL_REGEX, FILTER_TYPES, FileInput$1 as FileInput, FormattedDateTime$1 as FormattedDateTime, FormattedLocalizedString, LOWER_STORES_LIMIT, LabelRange$1 as LabelRange, MC_RESOURCES_WITH_KEYS, MissingValueField$1 as MissingValueField, MultiValueSearchInput$1 as MultiValueSearchInput, numericFormatInput as NumericFormatInput, Option$2 as Option, PRECISION_TYPES, pimIndexerProvider as PimIndexerProvider, PlatformLimitsFetcherQuery, ProductAttributeInput, ProductAttributes, ProductPickerInput$1 as ProductPickerInput, ProductSelectionsPicker as ProductSelectionPicker, QUERY_LIMIT, QUERY_MAX_LIMIT, RESOURCES_WITH_PLATFORM_LIMITS, RecurrentIntervalPicker$1 as RecurrentIntervalPicker, RequestCache$1 as RequestCache, RequiredIndicator$1 as RequiredIndicator, ScrollToFieldError$1 as ScrollToFieldError, SelectableFieldSearchInput$1 as SelectableFieldSearchInput, StoreSelectField$1 as StoreSelectField, StoreSelectInput$1 as StoreSelectInput, ThrottledField$1 as ThrottledField, UPPER_STORES_LIMIT, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, WithPimIndexer$1 as WithPimIndexer, allowedProperties, and, attributeToCustomField, attributesMapToNameValuePairs, base64ToString, messages$c as booleanMessages, buildSearchQuery$1 as buildSearchQuery, businessRoleConstants$1 as businessRoleConstants, messages$7 as businessRoleMessages, businessRoleKeys$1 as businessRoles, capitalizeFirst, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, createGraphQlUpdateActions, createNextSortDefinition$1 as createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, customFields as customFieldsTransformer, dateTransformer$1 as dateTransformer, exact, exists, extractErrorFromGraphQlResponse, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, formatCustomField, formatCustomerAddress, formatCustomerName, formatDateRangeValue, formatDateTime$1 as formatDateTime, formatDiscount, formatMoney$2 as formatMoney, formatMoneyRangeValue, formatMoneyValue, formatPercentage, formatAttribute as formatProductAttribute, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, getDiscountValue, getDisplayName$1 as getDisplayName, getFractionDigit, getFractionedAmount, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds$1 as getPrefixSearchBounds, getPriceChannelName, getProductAttributes, getProductLevelAttributes, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, dateTransformer as graphqlDateTransformer, missingLocaleTransformer as graphqlMissingLocaleTransformer, missingTransformer as graphqlMissingTransformer, numberTransformer as graphqlNumberTransformer, graphqlQueryBuilder, referenceTransformer as graphqlReferenceTransformer, textTransformer as graphqlTextTransformer, hasInvalidInputError$1 as hasInvalidInputError, hasSemanticError$1 as hasSemanticError, injectCustomerGroupsPlatformLimits$1 as injectCustomerGroupsPlatformLimits, injectCustomersPlatformLimits$1 as injectCustomersPlatformLimits, injectDataTablePaginationState$1 as injectDataTablePaginationState, injectModalState$3 as injectModalState, injectNotifications$1 as injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits$1 as injectShippingMethodsPlatformLimits, injectStorage$1 as injectStorage, injectTaxCategoriesPlatformLimits$1 as injectTaxCategoriesPlatformLimits, injectModalState$1 as injectToggleState, injectZonesPlatformLimits$1 as injectZonesPlatformLimits, isEmptyFilter as isEmpty, isEmptyValue, isUUID$1 as isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName$1 as keepDisplayName, mapShippingRateTierToGraphQL, mapStoresToOptions, mapTimeZonesToOptions, minusify, messages$9 as missingValueMessages, nameValuePairsToMap, normalizeProductSettings, not, omitDeep, omitSetsOfSets, or, commonPickerMessages as pickerMessages, range, reorderArrayItems, resolveStatusType, safelyAddFallback, sanitize, searchCategories, serializeAttributeValueForPimSearch, setDisplayName$1 as setDisplayName, setToArray, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitProductAndVariantAttributes, splitVariantAttributesByConstraint, stringToBase64, swapArrayItems, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useBusinessUnitsLimits$1 as useBusinessUnitsPlatformLimits, useCachedCategoryOptions, useCurrentOption, useDnDContext as useCustomFieldsDnDContext, useCustomerGroupsPlatformLimits$1 as useCustomerGroupsPlatformLimits, useCustomersPlatformLimits$1 as useCustomersPlatformLimits, useDbMaintenanceNotification, useDebouncedPromiseCallback$1 as useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, useIsFieldDuplicated$1 as useIsFieldDuplicated, useLoadOptions$1 as useLoadOptions, useLocalizedKeyFallback$1 as useLocalizedKeyFallback, usePendingRequests, usePersistedReminder$1 as usePersistedReminder, usePersistedTableConfiguration$1 as usePersistedTableConfiguration, usePimIndexer, usePrevious$1 as usePrevious, useProductSelectionsFetcher$1 as useProductSelectionsFetcher, useProductSelectionsTotalFetcher$1 as useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect$1 as useRoleNotificationEffect, useShippingMethodsPlatformLimits, useShowBulkNotification, useStorage$1 as useStorage, useStoreKeysInDataFences$1 as useStoreKeysInDataFences, useStoreSearchIndexStatusFetcher$1 as useStoreSearchIndexStatusFetcher, useStoresListFetcher$1 as useStoresListFetcher, useStoresLimits$1 as useStoresPlatformLimits, useStoresSearchFetcher$1 as useStoresSearchFetcher, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher$1 as useTotalNumberOfStoresFetcher, validateFilter$2 as validateCustomField, validations as validateCustomFields, validateFilter$1 as validateDate, validateMultiOptionEnum, validateFilter as validateNumber, validateSingleOptionEnum, validateText, validatedInput, validationMessages, valueMapping, withPendingRequests, withProps$1 as withProps, withRedirectTo$1 as withRedirectTo, withoutEmptyErrorsByField$1 as withoutEmptyErrorsByField, wrapDisplayName$1 as wrapDisplayName };
|
package/dist/declarations/src/components/product-selection-picker/product-selection-picker.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ declare function ProductSelectionsPicker({ lowerProductSelectionsLimit, upperPro
|
|
|
11
11
|
isClearable?: boolean | undefined;
|
|
12
12
|
isReadOnly?: boolean | undefined;
|
|
13
13
|
isDisabled?: boolean | undefined;
|
|
14
|
-
excludedProductSelectionIds?:
|
|
14
|
+
excludedProductSelectionIds?: never[] | undefined;
|
|
15
15
|
title?: string | undefined;
|
|
16
16
|
}): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
17
17
|
declare namespace ProductSelectionsPicker {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TRecurrencePolicyQueryResult } from '../../../../../../types/src/generated/ctp';
|
|
2
2
|
declare const handlers: {
|
|
3
3
|
FetchRecurrencePolicies: {
|
|
4
|
-
all: (policies?: TRecurrencePolicyQueryResult[
|
|
4
|
+
all: (policies?: TRecurrencePolicyQueryResult["results"]) => import("msw").GraphQLHandler<import("msw").GraphQLRequest<import("msw").GraphQLVariables>>;
|
|
5
5
|
};
|
|
6
6
|
};
|
|
7
7
|
export default handlers;
|
|
@@ -4,14 +4,14 @@ type TUseRecurrenceIntervalsProps = {
|
|
|
4
4
|
};
|
|
5
5
|
export declare const useRecurrenceIntervals: ({ where, skip, }: TUseRecurrenceIntervalsProps) => {
|
|
6
6
|
recurrencePolicies: {
|
|
7
|
-
__typename?: "RecurrencePolicy"
|
|
7
|
+
__typename?: "RecurrencePolicy";
|
|
8
8
|
id: string;
|
|
9
9
|
key: string;
|
|
10
|
-
nameAllLocales?: {
|
|
11
|
-
__typename?: "LocalizedString"
|
|
10
|
+
nameAllLocales?: Array<{
|
|
11
|
+
__typename?: "LocalizedString";
|
|
12
12
|
locale: string;
|
|
13
13
|
value: string;
|
|
14
|
-
}
|
|
14
|
+
}> | null;
|
|
15
15
|
}[];
|
|
16
16
|
loading: boolean;
|
|
17
17
|
error: import("@apollo/client").ApolloError | undefined;
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
export default function validatedInput(InnerComponent: any, validators: any, { containerClassName, tooltipContainerClassName }?: {
|
|
2
|
-
containerClassName: any;
|
|
3
|
-
tooltipContainerClassName: any;
|
|
4
|
-
}, { changeHandler, blurHandler }?: {
|
|
1
|
+
export default function validatedInput(InnerComponent: any, validators: any, { containerClassName, tooltipContainerClassName }?: {}, { changeHandler, blurHandler }?: {
|
|
5
2
|
changeHandler?: null | undefined;
|
|
6
3
|
blurHandler?: null | undefined;
|
|
7
4
|
}): import("react").FC<import("react-intl").WithIntlProps<any>> & {
|
|
@@ -50,9 +50,8 @@ export function withPropsForMoney(ownProps: any): {
|
|
|
50
50
|
onChangeValue?: undefined;
|
|
51
51
|
numeralDecimalScale?: undefined;
|
|
52
52
|
};
|
|
53
|
-
declare
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
};
|
|
53
|
+
declare function _default(ownProps: any): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare namespace _default { }
|
|
55
|
+
export default _default;
|
|
57
56
|
export default _default;
|
|
58
57
|
import { PureComponent } from 'react';
|
|
@@ -9,6 +9,7 @@ export { default as useStoreKeysInDataFences } from "./use-store-keys-in-data-fe
|
|
|
9
9
|
export { default as usePersistedReminder } from "./use-persisted-reminder/index.js";
|
|
10
10
|
export { default as useRoleNotificationEffect } from "./use-role-notification-effect/index.js";
|
|
11
11
|
export { default as useRoleNotification } from "./use-role-notification/index.js";
|
|
12
|
+
export { useDbMaintenanceNotification } from "./use-db-maintenance-notification/index.js";
|
|
12
13
|
export { default as usePendingRequests } from "./use-pending-requests/index.js";
|
|
13
14
|
export { default as useEventCallback } from "./use-event-callback/index.js";
|
|
14
15
|
export { default as useLocalizedKeyFallback } from "./use-localized-key-fallback/index.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { useDbMaintenanceNotification } from "./use-db-maintenance-notification.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useDebouncedPromiseCallback: <T, U extends unknown[]>(promiseCallback: (...args: U) => Promise<T>, wait: number) => (...args: U) => Promise<T
|
|
1
|
+
declare const useDebouncedPromiseCallback: <T, U extends unknown[]>(promiseCallback: (...args: U) => Promise<T>, wait: number) => ((...args: U) => Promise<T>);
|
|
2
2
|
export default useDebouncedPromiseCallback;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LocalizedField } from '@commercetools-frontend/l10n/dist/declarations/src/types';
|
|
1
|
+
import { type LocalizedField } from '@commercetools-frontend/l10n/dist/declarations/src/types';
|
|
2
2
|
/**
|
|
3
3
|
* @returns function with the following parameters
|
|
4
4
|
* - {LocalizedStrings} localizedStrings - an array of graphql LocalizedString,
|
|
@@ -23,11 +23,7 @@ export namespace MC_RESOURCES_WITH_KEYS {
|
|
|
23
23
|
let ZONE: string;
|
|
24
24
|
}
|
|
25
25
|
export function getSkipVariables(resourceType: any): {};
|
|
26
|
-
export function getWhereClause({ field, fieldValue, id }?: {
|
|
27
|
-
field: any;
|
|
28
|
-
fieldValue: any;
|
|
29
|
-
id: any;
|
|
30
|
-
}): string | null;
|
|
26
|
+
export function getWhereClause({ field, fieldValue, id }?: {}): string | null;
|
|
31
27
|
export default useIsFieldDuplicated;
|
|
32
28
|
declare function useIsFieldDuplicated(): {
|
|
33
29
|
getQueryVariables: ({ resourceType, field, fieldValue, id }: {
|
|
@@ -44,7 +44,7 @@ import MultiValueSearchInput from "./fields/multi-value-search-input/multi-value
|
|
|
44
44
|
import NumericFormatInput from "./fields/numeric-format-input/numeric-format-input.jsx";
|
|
45
45
|
import ThrottledField from "./fields/throttled-field/throttled-field.jsx";
|
|
46
46
|
import { injectDataTablePaginationState, injectNotifications, wrapDisplayName, withProps, withRedirectTo, injectModalState, injectToggleState, injectStorage, getDisplayName, setDisplayName } from "./hocs/index.js";
|
|
47
|
-
import { useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useIsFieldDuplicated, useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRoleNotificationEffect, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useStoresSearchFetcher, useStoreSearchIndexStatusFetcher, useFormatLocalizedString, usePersistedReminder } from "./hooks/index.js";
|
|
47
|
+
import { useDebouncedPromiseCallback, useFormatLocalizedFieldToString, useIsFieldDuplicated, useLocalizedKeyFallback, usePendingRequests, usePersistedTableConfiguration, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRoleNotificationEffect, useDbMaintenanceNotification, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useStoresSearchFetcher, useStoreSearchIndexStatusFetcher, useFormatLocalizedString, usePersistedReminder } from "./hooks/index.js";
|
|
48
48
|
import { MC_RESOURCES_WITH_KEYS } from "./hooks/use-is-field-duplicated/index.js";
|
|
49
49
|
import { setToArray } from "./utils/array-helpers/array-helpers.js";
|
|
50
50
|
import { isEmptyValue, filterEmptyValues } from "./utils/attributes/attributes.js";
|
|
@@ -114,4 +114,4 @@ import getIndexesOfInvalidValues from "./utils/validation/get-indexes-of-invalid
|
|
|
114
114
|
import withoutEmptyErrorsByField from "./utils/validation/without-empty-errors-by-field.js";
|
|
115
115
|
import withPendingRequests from "./utils/with-pending-requests/with-pending-requests.jsx";
|
|
116
116
|
export { QUERY_LIMIT, QUERY_MAX_LIMIT, LOWER_STORES_LIMIT, UPPER_STORES_LIMIT, } from "./constants/index.js";
|
|
117
|
-
export { allowedProperties, and, attributesMapToNameValuePairs, attributeToCustomField, base64ToString, BooleanField, booleanMessages, buildSearchQuery, businessRoles, businessRoleConstants, businessRoleMessages, capitalizeFirst, Carousel, type CarouselItem, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CustomerGroupPickerInput, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, CountriesPicker, createGraphQlUpdateActions, createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector, CustomFields, useDnDContext as useCustomFieldsDnDContext, CustomFieldsErrorTextNotification, CustomFieldsFormField, CustomFieldInput, customFieldsTransformer, CustomFieldTooltip, dateTransformer, DefaultPageSizes, Divider, EMAIL_REGEX, exact, exists, extractErrorFromGraphQlResponse, FileInput, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, FILTER_TYPES, formatCustomerAddress, formatCustomerName, formatCustomField, formatDateTime, formatDateRangeValue, formatDiscount, formatMoneyRangeValue, formatMoney, formatMoneyValue, formatPercentage, formatProductAttribute, FormattedDateTime, FormattedLocalizedString, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, serializeAttributeValueForPimSearch, getDiscountValue, getDisplayName, getFractionedAmount, getFractionDigit, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds, getProductAttributes, getProductLevelAttributes, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, graphqlDateTransformer, graphqlMissingLocaleTransformer, graphqlMissingTransformer, graphqlNumberTransformer, graphqlQueryBuilder, graphqlReferenceTransformer, graphqlTextTransformer, hasInvalidInputError, hasSemanticError, injectCustomerGroupsPlatformLimits, useBusinessUnitsPlatformLimits, injectCustomersPlatformLimits, injectDataTablePaginationState, injectModalState, injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits, injectStorage, injectTaxCategoriesPlatformLimits, injectToggleState, injectZonesPlatformLimits, isEmpty, isEmptyValue, isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName, LabelRange, mapShippingRateTierToGraphQL, mapTimeZonesToOptions, mapStoresToOptions, MC_RESOURCES_WITH_KEYS, minusify, MissingValueField, missingValueMessages, MultiValueSearchInput, nameValuePairsToMap, normalizeProductSettings, not, NumericFormatInput, omitDeep, omitSetsOfSets, or, Option, pickerMessages, PimIndexerProvider, PlatformLimitsFetcherQuery, PRECISION_TYPES, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionPicker, range, RecurrentIntervalPicker, reorderArrayItems, RequestCache, RequiredIndicator, resolveStatusType, RESOURCES_WITH_PLATFORM_LIMITS, safelyAddFallback, sanitize, ScrollToFieldError, searchCategories, SelectableFieldSearchInput, setToArray, setDisplayName, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, splitProductAndVariantAttributes, StoreSelectField, StoreSelectInput, stringToBase64, swapArrayItems, ThrottledField, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useCustomersPlatformLimits, useCustomerGroupsPlatformLimits, useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, usePersistedReminder, useIsFieldDuplicated, useLocalizedKeyFallback, useLoadOptions, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect, useShowBulkNotification, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useStoresSearchFetcher, useStoreSearchIndexStatusFetcher, useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, useShippingMethodsPlatformLimits, validatedInput, validateCustomField, validateCustomFields, CUSTOM_FIELD_TYPES, validateDate, validateMultiOptionEnum, validateSingleOptionEnum, validateText, validateNumber, validationMessages, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, valueMapping, withProps, withoutEmptyErrorsByField, withPendingRequests, WithPimIndexer, withRedirectTo, wrapDisplayName, };
|
|
117
|
+
export { allowedProperties, and, attributesMapToNameValuePairs, attributeToCustomField, base64ToString, BooleanField, booleanMessages, buildSearchQuery, businessRoles, businessRoleConstants, businessRoleMessages, capitalizeFirst, Carousel, type CarouselItem, CartDiscountReferenceSearch, CategoryReferenceSearch, CategorySearchPickerOptionFragment, CenteredLoadingSpinner, ChannelPickerInput, CustomerGroupPickerInput, clone, coerceToInteger, computedProperties, convertApolloNetworkStatusToLoadingState, convertApolloQueryDataToConnectorData, convertProductSelectionFromGraphQl, convertRatioToPercentage, CountriesPicker, createGraphQlUpdateActions, createNextSortDefinition, createPlatformLimitsQueryVariables, createReducer, createResourceReducer, CustomFieldDefinitionsConnector, CustomFieldTypeDefinitionsConnector, CustomFields, useDnDContext as useCustomFieldsDnDContext, CustomFieldsErrorTextNotification, CustomFieldsFormField, CustomFieldInput, customFieldsTransformer, CustomFieldTooltip, dateTransformer, DefaultPageSizes, Divider, EMAIL_REGEX, exact, exists, extractErrorFromGraphQlResponse, FileInput, filterCustomTypeUpdateActionValues, filterDataAttributes, filterEmptyValues, FILTER_TYPES, formatCustomerAddress, formatCustomerName, formatCustomField, formatDateTime, formatDateRangeValue, formatDiscount, formatMoneyRangeValue, formatMoney, formatMoneyValue, formatPercentage, formatProductAttribute, FormattedDateTime, FormattedLocalizedString, getAncestors, getAttributeValueByType, getAttributeValueType, getBottomOption, getBulkNotification, getCategoryLevel, getCountsFromBulkSummary, serializeAttributeValueForPimSearch, getDiscountValue, getDisplayName, getFractionedAmount, getFractionDigit, getIndexesOfInvalidValues, getMinimumPricesByCurrencyCode, getNetUnitPrice, getPathName, getPrefixSearchBounds, getProductAttributes, getProductLevelAttributes, getPriceChannelName, getReferenceTypeId, getSelectedPrice, getStampToneByPublishState, getTimeZoneId, getTimeZoneLabel, getTypeNameOfType, graphqlCategoryLevelTransformer, graphqlDateTransformer, graphqlMissingLocaleTransformer, graphqlMissingTransformer, graphqlNumberTransformer, graphqlQueryBuilder, graphqlReferenceTransformer, graphqlTextTransformer, hasInvalidInputError, hasSemanticError, injectCustomerGroupsPlatformLimits, useBusinessUnitsPlatformLimits, injectCustomersPlatformLimits, injectDataTablePaginationState, injectModalState, injectNotifications, injectPimIndexer, injectShippingMethodsPlatformLimits, injectStorage, injectTaxCategoriesPlatformLimits, injectToggleState, injectZonesPlatformLimits, isEmpty, isEmptyValue, isUUID, isValidISODate, isValidISODateTime, isValidISOTime, keepDisplayName, LabelRange, mapShippingRateTierToGraphQL, mapTimeZonesToOptions, mapStoresToOptions, MC_RESOURCES_WITH_KEYS, minusify, MissingValueField, missingValueMessages, MultiValueSearchInput, nameValuePairsToMap, normalizeProductSettings, not, NumericFormatInput, omitDeep, omitSetsOfSets, or, Option, pickerMessages, PimIndexerProvider, PlatformLimitsFetcherQuery, PRECISION_TYPES, ProductAttributeInput, ProductAttributes, ProductPickerInput, ProductSelectionPicker, range, RecurrentIntervalPicker, reorderArrayItems, RequestCache, RequiredIndicator, resolveStatusType, RESOURCES_WITH_PLATFORM_LIMITS, safelyAddFallback, sanitize, ScrollToFieldError, searchCategories, SelectableFieldSearchInput, setToArray, setDisplayName, shallowEqual, shouldUpdateAttributeInput, slugify, sortDataByIdsArray, sortRequiresLanguage, splitVariantAttributesByConstraint, splitProductAndVariantAttributes, StoreSelectField, StoreSelectInput, stringToBase64, swapArrayItems, ThrottledField, transformAllToProperNounCase, transformCustomFieldsRawToCustomFields, transformLocalizedFieldsForCategory, truncate, unique, uniqueObjects, useCachedCategoryOptions, useCurrentOption, useCustomersPlatformLimits, useCustomerGroupsPlatformLimits, useDebouncedPromiseCallback, useFormatCustomField, useFormatLocalizedFieldToString, useFormatLocalizedString, usePersistedReminder, useIsFieldDuplicated, useLocalizedKeyFallback, useLoadOptions, usePendingRequests, usePersistedTableConfiguration, usePimIndexer, usePrevious, useProductSelectionsFetcher, useProductSelectionsTotalFetcher, useRecurrenceIntervals, useRoleNotificationEffect, useDbMaintenanceNotification, useShowBulkNotification, useStorage, type UseStorageOptions, useStoreKeysInDataFences, useStoresListFetcher, useStoresSearchFetcher, useStoreSearchIndexStatusFetcher, useStoresPlatformLimits, useTaxCategoriesPlatformLimits, useTotalNumberOfStoresFetcher, useShippingMethodsPlatformLimits, validatedInput, validateCustomField, validateCustomFields, CUSTOM_FIELD_TYPES, validateDate, validateMultiOptionEnum, validateSingleOptionEnum, validateText, validateNumber, validationMessages, VALIDATOR_INTEGER, VALIDATOR_NUMERIC, VALIDATOR_REQUIRED, valueMapping, withProps, withoutEmptyErrorsByField, withPendingRequests, WithPimIndexer, withRedirectTo, wrapDisplayName, };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { MessageDescriptor } from 'react-intl';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type MessageDescriptor } from 'react-intl';
|
|
3
3
|
import { type TShowNotification } from '@commercetools-frontend/actions-global';
|
|
4
4
|
export type TCounts = {
|
|
5
5
|
successful: number;
|
|
@@ -4,9 +4,7 @@ export function convertApolloNetworkStatusToLoadingState(networkStatus: any): {
|
|
|
4
4
|
passivelyRefetching: boolean;
|
|
5
5
|
fetchingMore: boolean;
|
|
6
6
|
};
|
|
7
|
-
export function convertApolloQueryDataToConnectorData(queryData: any, dataKey: any, { mapData }?: {
|
|
8
|
-
mapData: any;
|
|
9
|
-
}): {
|
|
7
|
+
export function convertApolloQueryDataToConnectorData(queryData: any, dataKey: any, { mapData }?: {}): {
|
|
10
8
|
[x: number]: any;
|
|
11
9
|
isLoading: any;
|
|
12
10
|
loadingState: {
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @param {string} [dataLocale] - The locale to use for localized text attributes
|
|
8
8
|
* @returns {*} The serialized primitive value
|
|
9
9
|
*/
|
|
10
|
-
export function serializeAttributeValueForPimSearch(value: any, typeName: string, dataLocale?: string
|
|
10
|
+
export function serializeAttributeValueForPimSearch(value: any, typeName: string, dataLocale?: string): any;
|
|
11
11
|
export function exists(field: any, attributeType: any): {
|
|
12
12
|
exists: {
|
|
13
13
|
field: any;
|
|
@@ -8,7 +8,7 @@ export function filterNotDefinedValues(values: any[] | undefined, definitionName
|
|
|
8
8
|
export function isNotDefinedValue(value: any, definitionName: any): boolean;
|
|
9
9
|
export function getReferenceTypeId(definition: any): any;
|
|
10
10
|
export function getTypeNameOfType(type: any): any;
|
|
11
|
-
export function getAttributeValueType(value: any): "
|
|
11
|
+
export function getAttributeValueType(value: any): "date" | "number" | "text" | "time" | "enum" | "ltext" | "money" | "boolean" | "lenum" | "reference" | "date-time";
|
|
12
12
|
/**
|
|
13
13
|
* Filters out all of those field definitions that are not supporte by
|
|
14
14
|
* CustomAttributes component which are the nested ones (Set of Sets)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/experimental-components",
|
|
3
|
-
"version": "8.0
|
|
3
|
+
"version": "8.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@babel/core": "^7.22.11",
|
|
27
27
|
"@babel/runtime-corejs3": "^7.21.0",
|
|
28
|
-
"@commercetools-frontend/actions-global": "
|
|
29
|
-
"@commercetools-frontend/application-components": "
|
|
30
|
-
"@commercetools-frontend/application-shell": "
|
|
31
|
-
"@commercetools-frontend/application-shell-connectors": "
|
|
32
|
-
"@commercetools-frontend/constants": "
|
|
33
|
-
"@commercetools-frontend/l10n": "
|
|
34
|
-
"@commercetools-frontend/sdk": "
|
|
35
|
-
"@commercetools-frontend/sentry": "
|
|
28
|
+
"@commercetools-frontend/actions-global": "25.1.0",
|
|
29
|
+
"@commercetools-frontend/application-components": "25.1.0",
|
|
30
|
+
"@commercetools-frontend/application-shell": "25.1.0",
|
|
31
|
+
"@commercetools-frontend/application-shell-connectors": "25.1.0",
|
|
32
|
+
"@commercetools-frontend/constants": "25.1.0",
|
|
33
|
+
"@commercetools-frontend/l10n": "25.1.0",
|
|
34
|
+
"@commercetools-frontend/sdk": "25.1.0",
|
|
35
|
+
"@commercetools-frontend/sentry": "25.1.0",
|
|
36
36
|
"@commercetools-frontend/ui-kit": "20.3.0",
|
|
37
37
|
"@commercetools-uikit/design-system": "20.3.0",
|
|
38
38
|
"@commercetools-uikit/select-utils": "20.3.0",
|
|
@@ -62,11 +62,11 @@
|
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@apollo/client": "3.12.4",
|
|
64
64
|
"@commercetools/composable-commerce-test-data": "13.12.0",
|
|
65
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
65
66
|
"@testing-library/react": "16.3.1",
|
|
66
67
|
"@types/debounce-promise": "3.1.9",
|
|
67
|
-
"@types/jest": "^
|
|
68
|
+
"@types/jest": "^30.0.0",
|
|
68
69
|
"@types/react": "19.2.7",
|
|
69
|
-
"@types/testing-library__jest-dom": "^5.14.6",
|
|
70
70
|
"formik": "2.4.6",
|
|
71
71
|
"graphql": "16.11.0",
|
|
72
72
|
"graphql-tag": "2.12.6",
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
"react": "19.2.3",
|
|
75
75
|
"react-dom": "19.2.3",
|
|
76
76
|
"react-intl": "7.1.14",
|
|
77
|
-
"react-redux": "
|
|
77
|
+
"react-redux": "9.2.0",
|
|
78
78
|
"react-required-if": "1.0.3",
|
|
79
79
|
"react-router-dom": "5.3.4",
|
|
80
80
|
"react-test-renderer": "17.0.2",
|
|
81
|
-
"redux": "
|
|
82
|
-
"typescript": "5.
|
|
81
|
+
"redux": "5.0.1",
|
|
82
|
+
"typescript": "5.7.2",
|
|
83
83
|
"@commercetools-local/test-utils": "1.2.25"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
@@ -90,10 +90,10 @@
|
|
|
90
90
|
"react": "17.x || 19.x",
|
|
91
91
|
"react-dom": "17.x || 19.x",
|
|
92
92
|
"react-intl": "6.x || 7.x",
|
|
93
|
-
"react-redux": "7.x",
|
|
93
|
+
"react-redux": "7.x || 9.x",
|
|
94
94
|
"react-required-if": "1.x.x",
|
|
95
95
|
"react-router-dom": "5.x",
|
|
96
|
-
"redux": "4.x"
|
|
96
|
+
"redux": "4.x || 5.x"
|
|
97
97
|
},
|
|
98
98
|
"publishConfig": {
|
|
99
99
|
"access": "public"
|