@commercetools-frontend/react-notifications 0.0.0-fec-156-react19-20250526132659 → 0.0.0-fix-serialize-javascript-20260428090559

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/commercetools-frontend-react-notifications.cjs.d.ts +2 -2
  2. package/dist/commercetools-frontend-react-notifications.cjs.dev.js +4 -46
  3. package/dist/commercetools-frontend-react-notifications.cjs.prod.js +4 -23
  4. package/dist/commercetools-frontend-react-notifications.esm.js +4 -45
  5. package/dist/declarations/src/components/map-notification-to-component/index.d.ts +3 -3
  6. package/dist/declarations/src/components/notification/index.d.ts +1 -1
  7. package/dist/declarations/src/components/notification-kinds/api-error-message/index.d.ts +1 -1
  8. package/dist/declarations/src/components/notifications-list/index.d.ts +1 -1
  9. package/dist/declarations/src/components/notifications-list/selectors.d.ts +1 -1
  10. package/dist/declarations/src/components/notifier/index.d.ts +1 -1
  11. package/dist/declarations/src/components/notifier/notifier.d.ts +2 -1
  12. package/dist/declarations/src/export-types.d.ts +1 -1
  13. package/dist/declarations/src/index.d.ts +8 -8
  14. package/package.json +20 -21
  15. package/dist/commercetools-frontend-react-notifications.cjs.d.ts.map +0 -1
  16. package/dist/declarations/src/components/notification/messages.d.ts +0 -8
  17. package/dist/declarations/src/components/notification/notification.styles.d.ts +0 -12
  18. package/dist/declarations/src/components/notification-kinds/api-error/api-error.d.ts +0 -16
  19. package/dist/declarations/src/components/notification-kinds/api-error/index.d.ts +0 -1
  20. package/dist/declarations/src/components/notification-kinds/api-error-message/messages.d.ts +0 -153
  21. package/dist/declarations/src/components/notification-kinds/generic/generic.d.ts +0 -15
  22. package/dist/declarations/src/components/notification-kinds/generic/index.d.ts +0 -1
  23. package/dist/declarations/src/components/notification-kinds/unexpected-error/index.d.ts +0 -1
  24. package/dist/declarations/src/components/notification-kinds/unexpected-error/unexpected-error.d.ts +0 -16
  25. package/dist/declarations/src/components/notifications-list/notifications-list.styles.d.ts +0 -6
  26. package/dist/declarations/src/utils/filter-data-attributes.d.ts +0 -1
@@ -1,2 +1,2 @@
1
- export * from "./declarations/src/index";
2
- //# sourceMappingURL=commercetools-frontend-react-notifications.cjs.d.ts.map
1
+ export * from "./declarations/src/index.js";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1yZWFjdC1ub3RpZmljYXRpb25zLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi9kZWNsYXJhdGlvbnMvc3JjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _pt = require('prop-types');
6
5
  var react = require('react');
7
6
  var jsxRuntime = require('@emotion/react/jsx-runtime');
8
7
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
@@ -40,7 +39,6 @@ var actionsGlobal = require('@commercetools-frontend/actions-global');
40
39
 
41
40
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
42
41
 
43
- var _pt__default = /*#__PURE__*/_interopDefault(_pt);
44
42
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
45
43
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
46
44
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
@@ -61,7 +59,7 @@ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanc
61
59
  var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
62
60
 
63
61
  // NOTE: This string will be replaced on build time with the package version.
64
- var version = "23.3.0";
62
+ var version = "27.4.2";
65
63
 
66
64
  const Context = /*#__PURE__*/react.createContext(() => null);
67
65
  function NotificationProviderForCustomComponent(props) {
@@ -70,10 +68,6 @@ function NotificationProviderForCustomComponent(props) {
70
68
  children: props.children
71
69
  });
72
70
  }
73
- NotificationProviderForCustomComponent.propTypes = process.env.NODE_ENV !== "production" ? {
74
- mapNotificationToComponent: _pt__default["default"].func.isRequired,
75
- children: _pt__default["default"].node.isRequired
76
- } : {};
77
71
  NotificationProviderForCustomComponent.displayName = 'NotificationProviderForCustomComponent';
78
72
  const useCustomNotificationComponent = () => react.useContext(Context);
79
73
 
@@ -185,10 +179,6 @@ const NotificationIcon = props => {
185
179
  color: props.color
186
180
  });
187
181
  };
188
- NotificationIcon.propTypes = process.env.NODE_ENV !== "production" ? {
189
- type: _pt__default["default"].any.isRequired,
190
- color: _pt__default["default"].oneOf(['error', 'warning', 'info', 'solid', 'neutral60', 'surface', 'primary', 'primary40']).isRequired
191
- } : {};
192
182
  NotificationIcon.displayName = 'NotificationIcon';
193
183
  const Notification = _ref => {
194
184
  let _ref$fixed = _ref.fixed,
@@ -230,13 +220,6 @@ const Notification = _ref => {
230
220
  }) : null]
231
221
  }));
232
222
  };
233
- Notification.propTypes = process.env.NODE_ENV !== "production" ? {
234
- domain: _pt__default["default"].any.isRequired,
235
- type: _pt__default["default"].any.isRequired,
236
- fixed: _pt__default["default"].bool,
237
- onCloseClick: _pt__default["default"].func,
238
- children: _pt__default["default"].node.isRequired
239
- } : {};
240
223
  Notification.displayName = 'Notification';
241
224
 
242
225
  var apiErrorMessages = reactIntl.defineMessages({
@@ -285,12 +268,12 @@ var apiErrorMessages = reactIntl.defineMessages({
285
268
  DuplicatePriceScope: {
286
269
  id: 'ApiError.DuplicatePriceScope',
287
270
  description: 'User tries to create a price with the exact same values as for an already existing price',
288
- defaultMessage: 'A price with the same scope already exists for this product variant. Make sure that the combination of currency, country, customer group, channel and valid dates is unique per price.'
271
+ defaultMessage: 'A price with the same scope already exists for this product variant. Make sure that the combination of currency, country, customer group, channel, valid dates and recurrence policy is unique per price.'
289
272
  },
290
273
  DuplicateStandalonePriceScope: {
291
274
  id: 'ApiError.DuplicateStandalonePriceScope',
292
275
  description: 'User tries to create a standalone price with the exact same values as for an already existing standalone price',
293
- defaultMessage: 'A price with the same scope already exists for this product variant. The combination of currency, country, customer group, channel and validity date must be unique for each price per SKU.'
276
+ defaultMessage: 'A price with the same scope already exists for this product variant. The combination of currency, country, customer group, channel, validity date and recurrence policy must be unique for each price per SKU.'
294
277
  },
295
278
  DuplicateVariantValues: {
296
279
  id: 'ApiError.DuplicateVariantValues',
@@ -397,7 +380,7 @@ var apiErrorMessages = reactIntl.defineMessages({
397
380
 
398
381
  function ownKeys$3(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; }
399
382
  function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$3(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$3(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
400
- const regexInvalidOperationRequiredAttribute = /^Required attribute '(.*)' cannot be removed/;
383
+ const regexInvalidOperationRequiredAttribute = /^Required attribute '([^']+)' cannot be removed/;
401
384
 
402
385
  // `error` fields for REST errors
403
386
  // `error.extensions` fields for GraphQL errors
@@ -453,9 +436,6 @@ const FormattedErrorMessage = props => {
453
436
  children: _filterInstanceProperty__default["default"](_context2 = [props.error.message, props.error.detailedErrorMessage && `(${props.error.detailedErrorMessage})`]).call(_context2, Boolean).join(' ')
454
437
  });
455
438
  };
456
- FormattedErrorMessage.propTypes = {
457
- error: _pt__default["default"].any.isRequired
458
- };
459
439
  FormattedErrorMessage.displayName = 'FormattedErrorMessage';
460
440
  const ApiErrorMessage = props => {
461
441
  const intl = reactIntl.useIntl();
@@ -469,9 +449,6 @@ const ApiErrorMessage = props => {
469
449
  }
470
450
  return jsxRuntime.jsx(FormattedErrorMessage, _objectSpread$3({}, props));
471
451
  };
472
- ApiErrorMessage.propTypes = process.env.NODE_ENV !== "production" ? {
473
- error: _pt__default["default"].any.isRequired
474
- } : {};
475
452
  ApiErrorMessage.displayName = 'ApiErrorMessage';
476
453
  function getSpecialFormattedMessageByErrorCode(error, intl) {
477
454
  var _context3, _context4, _context5;
@@ -564,10 +541,6 @@ const ApiErrorNotification = props => {
564
541
  })
565
542
  });
566
543
  };
567
- ApiErrorNotification.propTypes = process.env.NODE_ENV !== "production" ? {
568
- notification: _pt__default["default"].any.isRequired,
569
- dismiss: _pt__default["default"].func.isRequired
570
- } : {};
571
544
  ApiErrorNotification.displayName = 'ApiErrorNotification';
572
545
 
573
546
  const GenericNotification = props => jsxRuntime.jsx(Notification, {
@@ -576,10 +549,6 @@ const GenericNotification = props => jsxRuntime.jsx(Notification, {
576
549
  onCloseClick: props.dismiss,
577
550
  children: props.notification.text
578
551
  });
579
- GenericNotification.propTypes = process.env.NODE_ENV !== "production" ? {
580
- notification: _pt__default["default"].any.isRequired,
581
- dismiss: _pt__default["default"].func.isRequired
582
- } : {};
583
552
  GenericNotification.displayName = 'GenericNotification';
584
553
 
585
554
  function ownKeys$2(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; }
@@ -596,10 +565,6 @@ const UnexpectedErrorNotification = props => jsxRuntime.jsx(Notification, {
596
565
  })]
597
566
  })
598
567
  });
599
- UnexpectedErrorNotification.propTypes = process.env.NODE_ENV !== "production" ? {
600
- notification: _pt__default["default"].any.isRequired,
601
- dismiss: _pt__default["default"].func.isRequired
602
- } : {};
603
568
  UnexpectedErrorNotification.displayName = 'UnexpectedErrorNotification';
604
569
 
605
570
  const getStyles = props => {
@@ -834,13 +799,6 @@ const Notifier = _ref => {
834
799
 
835
800
  return null;
836
801
  };
837
- Notifier.propTypes = {
838
- domain: _pt__default["default"].any.isRequired,
839
- kind: _pt__default["default"].any.isRequired,
840
- text: _pt__default["default"].string,
841
- meta: _pt__default["default"].objectOf(_pt__default["default"].any),
842
- dismissAfter: _pt__default["default"].number
843
- };
844
802
  Notifier.displayName = 'Notifier';
845
803
 
846
804
  exports.ApiErrorMessage = ApiErrorMessage;
@@ -2,7 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _pt = require('prop-types');
6
5
  var react = require('react');
7
6
  var jsxRuntime = require('@emotion/react/jsx-runtime');
8
7
  var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
@@ -40,7 +39,6 @@ var actionsGlobal = require('@commercetools-frontend/actions-global');
40
39
 
41
40
  function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
42
41
 
43
- var _pt__default = /*#__PURE__*/_interopDefault(_pt);
44
42
  var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
45
43
  var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
46
44
  var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
@@ -61,7 +59,7 @@ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanc
61
59
  var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
62
60
 
63
61
  // NOTE: This string will be replaced on build time with the package version.
64
- var version = "23.3.0";
62
+ var version = "27.4.2";
65
63
 
66
64
  const Context = /*#__PURE__*/react.createContext(() => null);
67
65
  function NotificationProviderForCustomComponent(props) {
@@ -70,7 +68,6 @@ function NotificationProviderForCustomComponent(props) {
70
68
  children: props.children
71
69
  });
72
70
  }
73
- NotificationProviderForCustomComponent.propTypes = {};
74
71
  NotificationProviderForCustomComponent.displayName = 'NotificationProviderForCustomComponent';
75
72
  const useCustomNotificationComponent = () => react.useContext(Context);
76
73
 
@@ -182,7 +179,6 @@ const NotificationIcon = props => {
182
179
  color: props.color
183
180
  });
184
181
  };
185
- NotificationIcon.propTypes = {};
186
182
  NotificationIcon.displayName = 'NotificationIcon';
187
183
  const Notification = _ref => {
188
184
  let _ref$fixed = _ref.fixed,
@@ -224,7 +220,6 @@ const Notification = _ref => {
224
220
  }) : null]
225
221
  }));
226
222
  };
227
- Notification.propTypes = {};
228
223
  Notification.displayName = 'Notification';
229
224
 
230
225
  var apiErrorMessages = reactIntl.defineMessages({
@@ -273,12 +268,12 @@ var apiErrorMessages = reactIntl.defineMessages({
273
268
  DuplicatePriceScope: {
274
269
  id: 'ApiError.DuplicatePriceScope',
275
270
  description: 'User tries to create a price with the exact same values as for an already existing price',
276
- defaultMessage: 'A price with the same scope already exists for this product variant. Make sure that the combination of currency, country, customer group, channel and valid dates is unique per price.'
271
+ defaultMessage: 'A price with the same scope already exists for this product variant. Make sure that the combination of currency, country, customer group, channel, valid dates and recurrence policy is unique per price.'
277
272
  },
278
273
  DuplicateStandalonePriceScope: {
279
274
  id: 'ApiError.DuplicateStandalonePriceScope',
280
275
  description: 'User tries to create a standalone price with the exact same values as for an already existing standalone price',
281
- defaultMessage: 'A price with the same scope already exists for this product variant. The combination of currency, country, customer group, channel and validity date must be unique for each price per SKU.'
276
+ defaultMessage: 'A price with the same scope already exists for this product variant. The combination of currency, country, customer group, channel, validity date and recurrence policy must be unique for each price per SKU.'
282
277
  },
283
278
  DuplicateVariantValues: {
284
279
  id: 'ApiError.DuplicateVariantValues',
@@ -385,7 +380,7 @@ var apiErrorMessages = reactIntl.defineMessages({
385
380
 
386
381
  function ownKeys$3(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; }
387
382
  function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context6 = ownKeys$3(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context7 = ownKeys$3(Object(t))).call(_context7, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
388
- const regexInvalidOperationRequiredAttribute = /^Required attribute '(.*)' cannot be removed/;
383
+ const regexInvalidOperationRequiredAttribute = /^Required attribute '([^']+)' cannot be removed/;
389
384
 
390
385
  // `error` fields for REST errors
391
386
  // `error.extensions` fields for GraphQL errors
@@ -441,9 +436,6 @@ const FormattedErrorMessage = props => {
441
436
  children: _filterInstanceProperty__default["default"](_context2 = [props.error.message, props.error.detailedErrorMessage && `(${props.error.detailedErrorMessage})`]).call(_context2, Boolean).join(' ')
442
437
  });
443
438
  };
444
- FormattedErrorMessage.propTypes = {
445
- error: _pt__default["default"].any.isRequired
446
- };
447
439
  FormattedErrorMessage.displayName = 'FormattedErrorMessage';
448
440
  const ApiErrorMessage = props => {
449
441
  const intl = reactIntl.useIntl();
@@ -457,7 +449,6 @@ const ApiErrorMessage = props => {
457
449
  }
458
450
  return jsxRuntime.jsx(FormattedErrorMessage, _objectSpread$3({}, props));
459
451
  };
460
- ApiErrorMessage.propTypes = {};
461
452
  ApiErrorMessage.displayName = 'ApiErrorMessage';
462
453
  function getSpecialFormattedMessageByErrorCode(error, intl) {
463
454
  var _context3, _context4, _context5;
@@ -550,7 +541,6 @@ const ApiErrorNotification = props => {
550
541
  })
551
542
  });
552
543
  };
553
- ApiErrorNotification.propTypes = {};
554
544
  ApiErrorNotification.displayName = 'ApiErrorNotification';
555
545
 
556
546
  const GenericNotification = props => jsxRuntime.jsx(Notification, {
@@ -559,7 +549,6 @@ const GenericNotification = props => jsxRuntime.jsx(Notification, {
559
549
  onCloseClick: props.dismiss,
560
550
  children: props.notification.text
561
551
  });
562
- GenericNotification.propTypes = {};
563
552
  GenericNotification.displayName = 'GenericNotification';
564
553
 
565
554
  function ownKeys$2(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; }
@@ -576,7 +565,6 @@ const UnexpectedErrorNotification = props => jsxRuntime.jsx(Notification, {
576
565
  })]
577
566
  })
578
567
  });
579
- UnexpectedErrorNotification.propTypes = {};
580
568
  UnexpectedErrorNotification.displayName = 'UnexpectedErrorNotification';
581
569
 
582
570
  const getStyles = props => {
@@ -805,13 +793,6 @@ const Notifier = _ref => {
805
793
 
806
794
  return null;
807
795
  };
808
- Notifier.propTypes = {
809
- domain: _pt__default["default"].any.isRequired,
810
- kind: _pt__default["default"].any.isRequired,
811
- text: _pt__default["default"].string,
812
- meta: _pt__default["default"].objectOf(_pt__default["default"].any),
813
- dismissAfter: _pt__default["default"].number
814
- };
815
796
  Notifier.displayName = 'Notifier';
816
797
 
817
798
  exports.ApiErrorMessage = ApiErrorMessage;
@@ -1,4 +1,3 @@
1
- import _pt from 'prop-types';
2
1
  import { createContext, useContext, useEffect } from 'react';
3
2
  import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
4
3
  import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
@@ -35,7 +34,7 @@ import isNumber from 'lodash/isNumber';
35
34
  import { useShowNotification } from '@commercetools-frontend/actions-global';
36
35
 
37
36
  // NOTE: This string will be replaced on build time with the package version.
38
- var version = "23.3.0";
37
+ var version = "27.4.2";
39
38
 
40
39
  const Context = /*#__PURE__*/createContext(() => null);
41
40
  function NotificationProviderForCustomComponent(props) {
@@ -44,10 +43,6 @@ function NotificationProviderForCustomComponent(props) {
44
43
  children: props.children
45
44
  });
46
45
  }
47
- NotificationProviderForCustomComponent.propTypes = process.env.NODE_ENV !== "production" ? {
48
- mapNotificationToComponent: _pt.func.isRequired,
49
- children: _pt.node.isRequired
50
- } : {};
51
46
  NotificationProviderForCustomComponent.displayName = 'NotificationProviderForCustomComponent';
52
47
  const useCustomNotificationComponent = () => useContext(Context);
53
48
 
@@ -159,10 +154,6 @@ const NotificationIcon = props => {
159
154
  color: props.color
160
155
  });
161
156
  };
162
- NotificationIcon.propTypes = process.env.NODE_ENV !== "production" ? {
163
- type: _pt.any.isRequired,
164
- color: _pt.oneOf(['error', 'warning', 'info', 'solid', 'neutral60', 'surface', 'primary', 'primary40']).isRequired
165
- } : {};
166
157
  NotificationIcon.displayName = 'NotificationIcon';
167
158
  const Notification = _ref => {
168
159
  let _ref$fixed = _ref.fixed,
@@ -204,13 +195,6 @@ const Notification = _ref => {
204
195
  }) : null]
205
196
  }));
206
197
  };
207
- Notification.propTypes = process.env.NODE_ENV !== "production" ? {
208
- domain: _pt.any.isRequired,
209
- type: _pt.any.isRequired,
210
- fixed: _pt.bool,
211
- onCloseClick: _pt.func,
212
- children: _pt.node.isRequired
213
- } : {};
214
198
  Notification.displayName = 'Notification';
215
199
 
216
200
  var apiErrorMessages = defineMessages({
@@ -259,12 +243,12 @@ var apiErrorMessages = defineMessages({
259
243
  DuplicatePriceScope: {
260
244
  id: 'ApiError.DuplicatePriceScope',
261
245
  description: 'User tries to create a price with the exact same values as for an already existing price',
262
- defaultMessage: 'A price with the same scope already exists for this product variant. Make sure that the combination of currency, country, customer group, channel and valid dates is unique per price.'
246
+ defaultMessage: 'A price with the same scope already exists for this product variant. Make sure that the combination of currency, country, customer group, channel, valid dates and recurrence policy is unique per price.'
263
247
  },
264
248
  DuplicateStandalonePriceScope: {
265
249
  id: 'ApiError.DuplicateStandalonePriceScope',
266
250
  description: 'User tries to create a standalone price with the exact same values as for an already existing standalone price',
267
- defaultMessage: 'A price with the same scope already exists for this product variant. The combination of currency, country, customer group, channel and validity date must be unique for each price per SKU.'
251
+ defaultMessage: 'A price with the same scope already exists for this product variant. The combination of currency, country, customer group, channel, validity date and recurrence policy must be unique for each price per SKU.'
268
252
  },
269
253
  DuplicateVariantValues: {
270
254
  id: 'ApiError.DuplicateVariantValues',
@@ -371,7 +355,7 @@ var apiErrorMessages = defineMessages({
371
355
 
372
356
  function ownKeys$3(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
373
357
  function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var _context6, _context7; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context6 = ownKeys$3(Object(t), !0)).call(_context6, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context7 = ownKeys$3(Object(t))).call(_context7, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
374
- const regexInvalidOperationRequiredAttribute = /^Required attribute '(.*)' cannot be removed/;
358
+ const regexInvalidOperationRequiredAttribute = /^Required attribute '([^']+)' cannot be removed/;
375
359
 
376
360
  // `error` fields for REST errors
377
361
  // `error.extensions` fields for GraphQL errors
@@ -427,9 +411,6 @@ const FormattedErrorMessage = props => {
427
411
  children: _filterInstanceProperty(_context2 = [props.error.message, props.error.detailedErrorMessage && `(${props.error.detailedErrorMessage})`]).call(_context2, Boolean).join(' ')
428
412
  });
429
413
  };
430
- FormattedErrorMessage.propTypes = {
431
- error: _pt.any.isRequired
432
- };
433
414
  FormattedErrorMessage.displayName = 'FormattedErrorMessage';
434
415
  const ApiErrorMessage = props => {
435
416
  const intl = useIntl();
@@ -443,9 +424,6 @@ const ApiErrorMessage = props => {
443
424
  }
444
425
  return jsx(FormattedErrorMessage, _objectSpread$3({}, props));
445
426
  };
446
- ApiErrorMessage.propTypes = process.env.NODE_ENV !== "production" ? {
447
- error: _pt.any.isRequired
448
- } : {};
449
427
  ApiErrorMessage.displayName = 'ApiErrorMessage';
450
428
  function getSpecialFormattedMessageByErrorCode(error, intl) {
451
429
  var _context3, _context4, _context5;
@@ -538,10 +516,6 @@ const ApiErrorNotification = props => {
538
516
  })
539
517
  });
540
518
  };
541
- ApiErrorNotification.propTypes = process.env.NODE_ENV !== "production" ? {
542
- notification: _pt.any.isRequired,
543
- dismiss: _pt.func.isRequired
544
- } : {};
545
519
  ApiErrorNotification.displayName = 'ApiErrorNotification';
546
520
 
547
521
  const GenericNotification = props => jsx(Notification, {
@@ -550,10 +524,6 @@ const GenericNotification = props => jsx(Notification, {
550
524
  onCloseClick: props.dismiss,
551
525
  children: props.notification.text
552
526
  });
553
- GenericNotification.propTypes = process.env.NODE_ENV !== "production" ? {
554
- notification: _pt.any.isRequired,
555
- dismiss: _pt.func.isRequired
556
- } : {};
557
527
  GenericNotification.displayName = 'GenericNotification';
558
528
 
559
529
  function ownKeys$2(e, r) { var t = _Object$keys(e); if (_Object$getOwnPropertySymbols) { var o = _Object$getOwnPropertySymbols(e); r && (o = _filterInstanceProperty(o).call(o, function (r) { return _Object$getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -570,10 +540,6 @@ const UnexpectedErrorNotification = props => jsx(Notification, {
570
540
  })]
571
541
  })
572
542
  });
573
- UnexpectedErrorNotification.propTypes = process.env.NODE_ENV !== "production" ? {
574
- notification: _pt.any.isRequired,
575
- dismiss: _pt.func.isRequired
576
- } : {};
577
543
  UnexpectedErrorNotification.displayName = 'UnexpectedErrorNotification';
578
544
 
579
545
  const getStyles = props => {
@@ -808,13 +774,6 @@ const Notifier = _ref => {
808
774
 
809
775
  return null;
810
776
  };
811
- Notifier.propTypes = {
812
- domain: _pt.any.isRequired,
813
- kind: _pt.any.isRequired,
814
- text: _pt.string,
815
- meta: _pt.objectOf(_pt.any),
816
- dismissAfter: _pt.number
817
- };
818
777
  Notifier.displayName = 'Notifier';
819
778
 
820
779
  export { ApiErrorMessage, Notification, NotificationProviderForCustomComponent, NotificationsList, Notifier, selectGlobalNotifications, selectPageNotifications, selectSideNotifications, version };
@@ -1,4 +1,4 @@
1
- import type { Props } from './map-notification-to-component';
1
+ import type { Props } from "./map-notification-to-component.js";
2
2
  export type TProps = Props;
3
- export { default } from './map-notification-to-component';
4
- export { useCustomNotificationComponent } from './map-notification-to-component';
3
+ export { default } from "./map-notification-to-component.js";
4
+ export { useCustomNotificationComponent } from "./map-notification-to-component.js";
@@ -1 +1 @@
1
- export { default } from './notification';
1
+ export { default } from "./notification.js";
@@ -1 +1 @@
1
- export { default } from './api-error-message';
1
+ export { default } from "./api-error-message.js";
@@ -1 +1 @@
1
- export { default } from './notifications-list';
1
+ export { default } from "./notifications-list.js";
@@ -1,5 +1,5 @@
1
1
  import type { TAppNotificationGlobal, TAppNotificationPage, TAppNotificationSide } from '@commercetools-frontend/constants';
2
- import type { TAppState } from './types';
2
+ import type { TAppState } from "./types.js";
3
3
  export declare const selectNotifications: (state: TAppState) => (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[];
4
4
  export declare const selectGlobalNotifications: ((state: TAppState) => TAppNotificationGlobal[]) & import("reselect").OutputSelectorFields<(args_0: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[]) => TAppNotificationGlobal[], {
5
5
  clearCache: () => void;
@@ -1 +1 @@
1
- export { default } from './notifier';
1
+ export { default } from "./notifier.js";
@@ -1,8 +1,9 @@
1
+ import { type ReactNode } from 'react';
1
2
  import type { TAppNotificationDomain, TAppNotificationKind } from '@commercetools-frontend/constants';
2
3
  type Props = {
3
4
  domain: TAppNotificationDomain;
4
5
  kind: TAppNotificationKind;
5
- text?: string;
6
+ text?: ReactNode;
6
7
  meta?: {
7
8
  [key: string]: unknown;
8
9
  };
@@ -1,2 +1,2 @@
1
- import type { TProps as MapNotificationToComponentProps } from './components/map-notification-to-component';
1
+ import type { TProps as MapNotificationToComponentProps } from "./components/map-notification-to-component/index.js";
2
2
  export type TMapNotificationToComponentProps = MapNotificationToComponentProps;
@@ -1,8 +1,8 @@
1
- export { default as version } from './version';
2
- export * from './export-types';
3
- export { default as NotificationProviderForCustomComponent } from './components/map-notification-to-component';
4
- export { default as Notification } from './components/notification';
5
- export { default as NotificationsList } from './components/notifications-list';
6
- export { selectSideNotifications, selectGlobalNotifications, selectPageNotifications, } from './components/notifications-list/selectors';
7
- export { default as Notifier } from './components/notifier';
8
- export { default as ApiErrorMessage } from './components/notification-kinds/api-error-message';
1
+ export { default as version } from "./version.js";
2
+ export * from "./export-types.js";
3
+ export { default as NotificationProviderForCustomComponent } from "./components/map-notification-to-component/index.js";
4
+ export { default as Notification } from "./components/notification/index.js";
5
+ export { default as NotificationsList } from "./components/notifications-list/index.js";
6
+ export { selectSideNotifications, selectGlobalNotifications, selectPageNotifications, } from "./components/notifications-list/selectors.js";
7
+ export { default as Notifier } from "./components/notifier/index.js";
8
+ export { default as ApiErrorMessage } from "./components/notification-kinds/api-error-message/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/react-notifications",
3
- "version": "0.0.0-fec-156-react19-20250526132659",
3
+ "version": "0.0.0-fix-serialize-javascript-20260428090559",
4
4
  "description": "React bindings for @commercetools-frontend/notifications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -30,18 +30,18 @@
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.22.15",
32
32
  "@babel/runtime-corejs3": "^7.22.15",
33
- "@commercetools-frontend/actions-global": "0.0.0-fec-156-react19-20250526132659",
34
- "@commercetools-frontend/application-components": "0.0.0-fec-156-react19-20250526132659",
35
- "@commercetools-frontend/constants": "0.0.0-fec-156-react19-20250526132659",
36
- "@commercetools-frontend/notifications": "0.0.0-fec-156-react19-20250526132659",
37
- "@commercetools-frontend/sentry": "0.0.0-fec-156-react19-20250526132659",
38
- "@commercetools-uikit/design-system": "fec-155-react-19",
39
- "@commercetools-uikit/hooks": "fec-155-react-19",
40
- "@commercetools-uikit/icon-button": "fec-155-react-19",
41
- "@commercetools-uikit/icons": "fec-155-react-19",
42
- "@commercetools-uikit/secondary-icon-button": "fec-155-react-19",
43
- "@commercetools-uikit/spacings": "fec-155-react-19",
44
- "@commercetools-uikit/utils": "fec-155-react-19",
33
+ "@commercetools-frontend/actions-global": "0.0.0-fix-serialize-javascript-20260428090559",
34
+ "@commercetools-frontend/application-components": "0.0.0-fix-serialize-javascript-20260428090559",
35
+ "@commercetools-frontend/constants": "0.0.0-fix-serialize-javascript-20260428090559",
36
+ "@commercetools-frontend/notifications": "0.0.0-fix-serialize-javascript-20260428090559",
37
+ "@commercetools-frontend/sentry": "0.0.0-fix-serialize-javascript-20260428090559",
38
+ "@commercetools-uikit/design-system": "^20.4.0",
39
+ "@commercetools-uikit/hooks": "^20.4.0",
40
+ "@commercetools-uikit/icon-button": "^20.4.0",
41
+ "@commercetools-uikit/icons": "^20.4.0",
42
+ "@commercetools-uikit/secondary-icon-button": "^20.4.0",
43
+ "@commercetools-uikit/spacings": "^20.4.0",
44
+ "@commercetools-uikit/utils": "^20.4.0",
45
45
  "@emotion/react": "^11.14.0",
46
46
  "@emotion/styled": "^11.14.0",
47
47
  "@types/history": "^4.7.11",
@@ -49,31 +49,30 @@
49
49
  "@types/prop-types": "^15.7.5",
50
50
  "@types/react": "^19.0.3",
51
51
  "@types/react-dom": "^19.0.2",
52
- "@types/react-redux": "^7.1.26",
53
52
  "@types/react-router": "^5.1.20",
54
53
  "@types/react-router-dom": "^5.3.3",
55
- "lodash": "4.17.21",
54
+ "lodash": "4.18.1",
56
55
  "moment": "^2.29.4",
57
- "moment-timezone": "^0.5.40",
56
+ "moment-timezone": "^0.6.0",
58
57
  "prop-types": "15.8.1",
59
58
  "reselect": "4.1.8"
60
59
  },
61
60
  "devDependencies": {
62
- "@types/jest": "^29.5.4",
61
+ "@types/jest": "^29.5.14",
63
62
  "@types/testing-library__jest-dom": "^5.14.9",
64
- "jest": "29.7.0",
65
- "jest-mock": "29.7.0",
63
+ "jest": "30.2.0",
64
+ "jest-mock": "30.2.0",
66
65
  "react": "19.0.0",
67
66
  "react-dom": "19.0.0",
68
67
  "react-intl": "^7.1.4",
69
- "react-redux": "7.2.9",
68
+ "react-redux": "9.2.0",
70
69
  "react-router-dom": "5.3.4"
71
70
  },
72
71
  "peerDependencies": {
73
72
  "react": "19.x",
74
73
  "react-dom": "19.x",
75
74
  "react-intl": "7.x",
76
- "react-redux": "7.x",
75
+ "react-redux": "7.x || 9.x",
77
76
  "react-router-dom": "5.x"
78
77
  }
79
78
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"commercetools-frontend-react-notifications.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
@@ -1,8 +0,0 @@
1
- declare const _default: {
2
- hideNotification: {
3
- id: string;
4
- description: string;
5
- defaultMessage: string;
6
- };
7
- };
8
- export default _default;
@@ -1,12 +0,0 @@
1
- import { type SerializedStyles } from '@emotion/react';
2
- import type { TAppNotificationKind, TAppNotificationDomain } from '@commercetools-frontend/constants';
3
- type StyleProps = {
4
- type: TAppNotificationKind;
5
- domain: TAppNotificationDomain;
6
- fixed: boolean;
7
- };
8
- declare const getStylesForNotificationIcon: (props: StyleProps) => SerializedStyles;
9
- declare const getStylesForCloseIcon: (props: StyleProps) => SerializedStyles;
10
- declare const getStylesForContent: (props: StyleProps) => SerializedStyles;
11
- declare const getStylesForNotification: (props: StyleProps) => SerializedStyles;
12
- export { getStylesForNotificationIcon, getStylesForCloseIcon, getStylesForContent, getStylesForNotification, };
@@ -1,16 +0,0 @@
1
- import { SyntheticEvent } from 'react';
2
- import type { TAppNotification, TAppNotificationValuesApiError } from '@commercetools-frontend/constants';
3
- import { NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_PAGE } from '@commercetools-frontend/constants';
4
- type Props = {
5
- notification: TAppNotification<{
6
- domain: typeof NOTIFICATION_DOMAINS.PAGE;
7
- kind: (typeof NOTIFICATION_KINDS_PAGE)['api-error'];
8
- values: TAppNotificationValuesApiError;
9
- }>;
10
- dismiss: (event: SyntheticEvent) => void;
11
- };
12
- declare const ApiErrorNotification: {
13
- (props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
14
- displayName: string;
15
- };
16
- export default ApiErrorNotification;
@@ -1 +0,0 @@
1
- export { default } from './api-error';
@@ -1,153 +0,0 @@
1
- declare const _default: {
2
- General: {
3
- id: string;
4
- description: string;
5
- defaultMessage: string;
6
- };
7
- OverlappingPrices: {
8
- id: string;
9
- description: string;
10
- defaultMessage: string;
11
- };
12
- ConcurrentModificationBulkEdit: {
13
- id: string;
14
- description: string;
15
- defaultMessage: string;
16
- };
17
- ConcurrentModification: {
18
- id: string;
19
- description: string;
20
- defaultMessage: string;
21
- };
22
- DuplicateAttributeValue: {
23
- id: string;
24
- description: string;
25
- defaultMessage: string;
26
- };
27
- DuplicateAttributeValues: {
28
- id: string;
29
- description: string;
30
- defaultMessage: string;
31
- };
32
- DuplicateField: {
33
- id: string;
34
- description: string;
35
- defaultMessage: string;
36
- };
37
- DuplicateSlug: {
38
- id: string;
39
- description: string;
40
- defaultMessage: string;
41
- };
42
- DuplicatePriceScope: {
43
- id: string;
44
- description: string;
45
- defaultMessage: string;
46
- };
47
- DuplicateStandalonePriceScope: {
48
- id: string;
49
- description: string;
50
- defaultMessage: string;
51
- };
52
- DuplicateVariantValues: {
53
- id: string;
54
- description: string;
55
- defaultMessage: string;
56
- };
57
- InvalidDateRange: {
58
- id: string;
59
- description: string;
60
- defaultMessage: string;
61
- };
62
- InvalidField: {
63
- id: string;
64
- description: string;
65
- defaultMessage: string;
66
- };
67
- InvalidSlug: {
68
- id: string;
69
- description: string;
70
- defaultMessage: string;
71
- };
72
- OverlappingPriceValidity: {
73
- id: string;
74
- description: string;
75
- defaultMessage: string;
76
- };
77
- OverlappingStandalonePriceValidity: {
78
- id: string;
79
- description: string;
80
- defaultMessage: string;
81
- };
82
- PendingOperation: {
83
- id: string;
84
- description: string;
85
- defaultMessage: string;
86
- };
87
- ResourceNotFound: {
88
- id: string;
89
- description: string;
90
- defaultMessage: string;
91
- };
92
- ReferenceExists: {
93
- id: string;
94
- description: string;
95
- defaultMessage: string;
96
- };
97
- RequiredField: {
98
- id: string;
99
- description: string;
100
- defaultMessage: string;
101
- };
102
- RequiredFields: {
103
- id: string;
104
- description: string;
105
- defaultMessage: string;
106
- };
107
- SemanticError: {
108
- id: string;
109
- description: string;
110
- defaultMessage: string;
111
- };
112
- SyntaxError: {
113
- id: string;
114
- description: string;
115
- defaultMessage: string;
116
- };
117
- Unauthorized: {
118
- id: string;
119
- description: string;
120
- defaultMessage: string;
121
- };
122
- Forbidden: {
123
- id: string;
124
- description: string;
125
- defaultMessage: string;
126
- };
127
- ExtensionNoResponse: {
128
- id: string;
129
- description: string;
130
- defaultMessage: string;
131
- };
132
- ExtensionBadResponse: {
133
- id: string;
134
- description: string;
135
- defaultMessage: string;
136
- };
137
- ExtensionUpdateActionsFailed: {
138
- id: string;
139
- description: string;
140
- defaultMessage: string;
141
- };
142
- TaxCategoryDuplicateCountry: {
143
- id: string;
144
- description: string;
145
- defaultMessage: string;
146
- };
147
- MaxResourceLimitExceeded: {
148
- id: string;
149
- description: string;
150
- defaultMessage: string;
151
- };
152
- };
153
- export default _default;
@@ -1,15 +0,0 @@
1
- import { SyntheticEvent } from 'react';
2
- import type { TAppNotification, TAppNotificationDomain, TAppNotificationKindSide } from '@commercetools-frontend/constants';
3
- type Props = {
4
- notification: TAppNotification<{
5
- domain: TAppNotificationDomain;
6
- kind: TAppNotificationKindSide;
7
- text: string;
8
- }>;
9
- dismiss: (event: SyntheticEvent) => void;
10
- };
11
- declare const GenericNotification: {
12
- (props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
13
- displayName: string;
14
- };
15
- export default GenericNotification;
@@ -1 +0,0 @@
1
- export { default } from './generic';
@@ -1 +0,0 @@
1
- export { default } from './unexpected-error';
@@ -1,16 +0,0 @@
1
- import { SyntheticEvent } from 'react';
2
- import type { TAppNotification, TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
3
- import { NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_PAGE } from '@commercetools-frontend/constants';
4
- type Props = {
5
- notification: TAppNotification<{
6
- domain: typeof NOTIFICATION_DOMAINS.PAGE;
7
- kind: (typeof NOTIFICATION_KINDS_PAGE)['unexpected-error'];
8
- values: TAppNotificationValuesUnexpectedError;
9
- }>;
10
- dismiss: (event: SyntheticEvent) => void;
11
- };
12
- declare const UnexpectedErrorNotification: {
13
- (props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
14
- displayName: string;
15
- };
16
- export default UnexpectedErrorNotification;
@@ -1,6 +0,0 @@
1
- import type { TAppNotificationDomain } from '@commercetools-frontend/constants';
2
- type StyleProps = {
3
- domain: TAppNotificationDomain;
4
- };
5
- declare const getStyles: (props: StyleProps) => import("@emotion/react").SerializedStyles;
6
- export { getStyles };
@@ -1 +0,0 @@
1
- export default function filterDataAttributes<T extends object>(obj: T): Partial<T>;