@commercetools-frontend/react-notifications 20.10.3 → 20.10.4

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.
@@ -60,7 +60,7 @@ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanc
60
60
  var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
61
61
 
62
62
  // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
63
- var version = '20.10.3';
63
+ var version = '20.10.4';
64
64
 
65
65
  var Context = /*#__PURE__*/react.createContext(function () {
66
66
  return null;
@@ -580,32 +580,22 @@ var selectNotifications = function selectNotifications(state) {
580
580
  return state.notifications;
581
581
  };
582
582
  var selectGlobalNotifications = reselect.createSelector(selectNotifications, function (notifications) {
583
- var _context, _context2;
584
-
585
- return (// https://stackoverflow.com/a/42487130
586
- _sliceInstanceProperty__default['default'](_context = _filterInstanceProperty__default['default'](_context2 = notifications).call(_context2, function (notification) {
587
- return notification.domain === constants.NOTIFICATION_DOMAINS.GLOBAL;
588
- }) // Return only 1 at a time
589
- ).call(_context, 0, 1)
590
- );
583
+ var _context;
584
+
585
+ return _sliceInstanceProperty__default['default'](_context = _filterInstanceProperty__default['default'](notifications).call(notifications, function (notification) {
586
+ return notification.domain === constants.NOTIFICATION_DOMAINS.GLOBAL;
587
+ }) // Return only 1 at a time
588
+ ).call(_context, 0, 1);
591
589
  });
592
590
  var selectPageNotifications = reselect.createSelector(selectNotifications, function (notifications) {
593
- var _context3;
594
-
595
- return (// https://stackoverflow.com/a/42487130
596
- _filterInstanceProperty__default['default'](_context3 = notifications).call(_context3, function (notification) {
597
- return notification.domain === constants.NOTIFICATION_DOMAINS.PAGE;
598
- })
599
- );
591
+ return _filterInstanceProperty__default['default'](notifications).call(notifications, function (notification) {
592
+ return notification.domain === constants.NOTIFICATION_DOMAINS.PAGE;
593
+ });
600
594
  });
601
595
  var selectSideNotifications = reselect.createSelector(selectNotifications, function (notifications) {
602
- var _context4;
603
-
604
- return (// https://stackoverflow.com/a/42487130
605
- _filterInstanceProperty__default['default'](_context4 = notifications).call(_context4, function (notification) {
606
- return notification.domain === constants.NOTIFICATION_DOMAINS.SIDE;
607
- })
608
- );
596
+ return _filterInstanceProperty__default['default'](notifications).call(notifications, function (notification) {
597
+ return notification.domain === constants.NOTIFICATION_DOMAINS.SIDE;
598
+ });
609
599
  });
610
600
 
611
601
  var getStyles = function getStyles(props) {
@@ -60,7 +60,7 @@ var _sliceInstanceProperty__default = /*#__PURE__*/_interopDefault(_sliceInstanc
60
60
  var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
61
61
 
62
62
  // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
63
- var version = '20.10.3';
63
+ var version = '20.10.4';
64
64
 
65
65
  var Context = /*#__PURE__*/react.createContext(function () {
66
66
  return null;
@@ -557,32 +557,22 @@ var selectNotifications = function selectNotifications(state) {
557
557
  return state.notifications;
558
558
  };
559
559
  var selectGlobalNotifications = reselect.createSelector(selectNotifications, function (notifications) {
560
- var _context, _context2;
561
-
562
- return (// https://stackoverflow.com/a/42487130
563
- _sliceInstanceProperty__default['default'](_context = _filterInstanceProperty__default['default'](_context2 = notifications).call(_context2, function (notification) {
564
- return notification.domain === constants.NOTIFICATION_DOMAINS.GLOBAL;
565
- }) // Return only 1 at a time
566
- ).call(_context, 0, 1)
567
- );
560
+ var _context;
561
+
562
+ return _sliceInstanceProperty__default['default'](_context = _filterInstanceProperty__default['default'](notifications).call(notifications, function (notification) {
563
+ return notification.domain === constants.NOTIFICATION_DOMAINS.GLOBAL;
564
+ }) // Return only 1 at a time
565
+ ).call(_context, 0, 1);
568
566
  });
569
567
  var selectPageNotifications = reselect.createSelector(selectNotifications, function (notifications) {
570
- var _context3;
571
-
572
- return (// https://stackoverflow.com/a/42487130
573
- _filterInstanceProperty__default['default'](_context3 = notifications).call(_context3, function (notification) {
574
- return notification.domain === constants.NOTIFICATION_DOMAINS.PAGE;
575
- })
576
- );
568
+ return _filterInstanceProperty__default['default'](notifications).call(notifications, function (notification) {
569
+ return notification.domain === constants.NOTIFICATION_DOMAINS.PAGE;
570
+ });
577
571
  });
578
572
  var selectSideNotifications = reselect.createSelector(selectNotifications, function (notifications) {
579
- var _context4;
580
-
581
- return (// https://stackoverflow.com/a/42487130
582
- _filterInstanceProperty__default['default'](_context4 = notifications).call(_context4, function (notification) {
583
- return notification.domain === constants.NOTIFICATION_DOMAINS.SIDE;
584
- })
585
- );
573
+ return _filterInstanceProperty__default['default'](notifications).call(notifications, function (notification) {
574
+ return notification.domain === constants.NOTIFICATION_DOMAINS.SIDE;
575
+ });
586
576
  });
587
577
 
588
578
  var getStyles = function getStyles(props) {
@@ -34,7 +34,7 @@ import isNumber from 'lodash/isNumber';
34
34
  import { useShowNotification } from '@commercetools-frontend/actions-global';
35
35
 
36
36
  // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
37
- var version = '20.10.3';
37
+ var version = '20.10.4';
38
38
 
39
39
  var Context = /*#__PURE__*/createContext(function () {
40
40
  return null;
@@ -554,32 +554,22 @@ var selectNotifications = function selectNotifications(state) {
554
554
  return state.notifications;
555
555
  };
556
556
  var selectGlobalNotifications = createSelector(selectNotifications, function (notifications) {
557
- var _context, _context2;
558
-
559
- return (// https://stackoverflow.com/a/42487130
560
- _sliceInstanceProperty(_context = _filterInstanceProperty(_context2 = notifications).call(_context2, function (notification) {
561
- return notification.domain === NOTIFICATION_DOMAINS.GLOBAL;
562
- }) // Return only 1 at a time
563
- ).call(_context, 0, 1)
564
- );
557
+ var _context;
558
+
559
+ return _sliceInstanceProperty(_context = _filterInstanceProperty(notifications).call(notifications, function (notification) {
560
+ return notification.domain === NOTIFICATION_DOMAINS.GLOBAL;
561
+ }) // Return only 1 at a time
562
+ ).call(_context, 0, 1);
565
563
  });
566
564
  var selectPageNotifications = createSelector(selectNotifications, function (notifications) {
567
- var _context3;
568
-
569
- return (// https://stackoverflow.com/a/42487130
570
- _filterInstanceProperty(_context3 = notifications).call(_context3, function (notification) {
571
- return notification.domain === NOTIFICATION_DOMAINS.PAGE;
572
- })
573
- );
565
+ return _filterInstanceProperty(notifications).call(notifications, function (notification) {
566
+ return notification.domain === NOTIFICATION_DOMAINS.PAGE;
567
+ });
574
568
  });
575
569
  var selectSideNotifications = createSelector(selectNotifications, function (notifications) {
576
- var _context4;
577
-
578
- return (// https://stackoverflow.com/a/42487130
579
- _filterInstanceProperty(_context4 = notifications).call(_context4, function (notification) {
580
- return notification.domain === NOTIFICATION_DOMAINS.SIDE;
581
- })
582
- );
570
+ return _filterInstanceProperty(notifications).call(notifications, function (notification) {
571
+ return notification.domain === NOTIFICATION_DOMAINS.SIDE;
572
+ });
583
573
  });
584
574
 
585
575
  var getStyles = function getStyles(props) {
@@ -1,6 +1,12 @@
1
1
  import type { TAppNotificationGlobal, TAppNotificationPage, TAppNotificationSide } from '@commercetools-frontend/constants';
2
2
  import type { TAppState } from './types';
3
3
  export declare const selectNotifications: (state: TAppState) => (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[];
4
- export declare const selectGlobalNotifications: import("reselect").OutputSelector<TAppState, TAppNotificationGlobal[], (res: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[]) => TAppNotificationGlobal[]>;
5
- export declare const selectPageNotifications: import("reselect").OutputSelector<TAppState, TAppNotificationPage[], (res: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[]) => TAppNotificationPage[]>;
6
- export declare const selectSideNotifications: import("reselect").OutputSelector<TAppState, TAppNotificationSide[], (res: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[]) => TAppNotificationSide[]>;
4
+ export declare const selectGlobalNotifications: import("reselect").OutputSelector<[(state: TAppState) => (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[]], TAppNotificationGlobal[], never, ((args_0: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[], ...args_1: unknown[]) => TAppNotificationGlobal[]) & ((...args: any[]) => any) & {
5
+ clearCache: () => void;
6
+ }>;
7
+ export declare const selectPageNotifications: import("reselect").OutputSelector<[(state: TAppState) => (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[]], TAppNotificationPage[], never, ((args_0: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[], ...args_1: unknown[]) => TAppNotificationPage[]) & ((...args: any[]) => any) & {
8
+ clearCache: () => void;
9
+ }>;
10
+ export declare const selectSideNotifications: import("reselect").OutputSelector<[(state: TAppState) => (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[]], TAppNotificationSide[], never, ((args_0: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[], ...args_1: unknown[]) => TAppNotificationSide[]) & ((...args: any[]) => any) & {
11
+ clearCache: () => void;
12
+ }>;
@@ -1,2 +1,2 @@
1
- declare const _default: "20.10.3";
1
+ declare const _default: "20.10.4";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/react-notifications",
3
- "version": "20.10.3",
3
+ "version": "20.10.4",
4
4
  "description": "React bindings for @commercetools-frontend/notifications",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -24,15 +24,15 @@
24
24
  "dependencies": {
25
25
  "@babel/runtime": "7.15.4",
26
26
  "@babel/runtime-corejs3": "7.15.4",
27
- "@commercetools-frontend/actions-global": "20.10.3",
27
+ "@commercetools-frontend/actions-global": "20.10.4",
28
28
  "@commercetools-frontend/constants": "20.10.1",
29
29
  "@commercetools-frontend/notifications": "20.10.1",
30
- "@commercetools-frontend/sentry": "20.10.3",
30
+ "@commercetools-frontend/sentry": "20.10.4",
31
31
  "@commercetools-uikit/design-system": "^12.2.2",
32
32
  "@commercetools-uikit/icon-button": "^12.2.2",
33
33
  "@commercetools-uikit/icons": "^12.2.2",
34
34
  "@commercetools-uikit/spacings": "^12.2.2",
35
- "@emotion/react": "11.4.1",
35
+ "@emotion/react": "11.5.0",
36
36
  "@emotion/styled": "11.3.0",
37
37
  "@types/history": "4.7.9",
38
38
  "@types/lodash": "^4.14.167",
@@ -46,14 +46,14 @@
46
46
  "moment": "^2.29.1",
47
47
  "moment-timezone": "^0.5.32",
48
48
  "prop-types": "15.7.2",
49
- "reselect": "4.0.0"
49
+ "reselect": "4.1.0"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@testing-library/react": "12.1.2",
53
53
  "react": "17.0.2",
54
54
  "react-dom": "17.0.2",
55
- "react-intl": "5.20.12",
56
- "react-redux": "7.2.5",
55
+ "react-intl": "5.21.0",
56
+ "react-redux": "7.2.6",
57
57
  "react-router-dom": "5.3.0"
58
58
  },
59
59
  "peerDependencies": {