@commercetools-frontend/react-notifications 20.9.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.
Files changed (30) hide show
  1. package/dist/commercetools-frontend-react-notifications.cjs.dev.js +13 -23
  2. package/dist/commercetools-frontend-react-notifications.cjs.prod.js +13 -23
  3. package/dist/commercetools-frontend-react-notifications.esm.js +13 -23
  4. package/dist/declarations/src/components/map-notification-to-component/index.d.ts +4 -4
  5. package/dist/declarations/src/components/map-notification-to-component/map-notification-to-component.d.ts +12 -12
  6. package/dist/declarations/src/components/notification/index.d.ts +1 -1
  7. package/dist/declarations/src/components/notification/messages.d.ts +8 -8
  8. package/dist/declarations/src/components/notification/notification.d.ts +15 -15
  9. package/dist/declarations/src/components/notification/notification.styles.d.ts +10 -10
  10. package/dist/declarations/src/components/notification-kinds/api-error/api-error.d.ts +16 -16
  11. package/dist/declarations/src/components/notification-kinds/api-error/index.d.ts +1 -1
  12. package/dist/declarations/src/components/notification-kinds/api-error-message/api-error-message.d.ts +31 -31
  13. package/dist/declarations/src/components/notification-kinds/api-error-message/index.d.ts +1 -1
  14. package/dist/declarations/src/components/notification-kinds/api-error-message/messages.d.ts +138 -138
  15. package/dist/declarations/src/components/notification-kinds/generic/generic.d.ts +15 -15
  16. package/dist/declarations/src/components/notification-kinds/generic/index.d.ts +1 -1
  17. package/dist/declarations/src/components/notification-kinds/unexpected-error/index.d.ts +1 -1
  18. package/dist/declarations/src/components/notification-kinds/unexpected-error/unexpected-error.d.ts +16 -16
  19. package/dist/declarations/src/components/notifications-list/index.d.ts +2 -2
  20. package/dist/declarations/src/components/notifications-list/notifications-list.d.ts +9 -9
  21. package/dist/declarations/src/components/notifications-list/notifications-list.styles.d.ts +6 -6
  22. package/dist/declarations/src/components/notifications-list/selectors.d.ts +12 -6
  23. package/dist/declarations/src/components/notifications-list/types.d.ts +4 -4
  24. package/dist/declarations/src/components/notifier/index.d.ts +1 -1
  25. package/dist/declarations/src/components/notifier/notifier.d.ts +16 -16
  26. package/dist/declarations/src/export-types.d.ts +2 -2
  27. package/dist/declarations/src/index.d.ts +7 -7
  28. package/dist/declarations/src/utils/filter-data-attributes.d.ts +1 -1
  29. package/dist/declarations/src/version.d.ts +2 -2
  30. package/package.json +15 -15
@@ -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.9.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.9.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.9.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,4 +1,4 @@
1
- import type { Props } from './map-notification-to-component';
2
- export declare type TProps = Props;
3
- export { default } from './map-notification-to-component';
4
- export { useCustomNotificationComponent } from './map-notification-to-component';
1
+ import type { Props } from './map-notification-to-component';
2
+ export declare type TProps = Props;
3
+ export { default } from './map-notification-to-component';
4
+ export { useCustomNotificationComponent } from './map-notification-to-component';
@@ -1,12 +1,12 @@
1
- import type { TAppNotificationGlobal, TAppNotificationPage, TAppNotificationSide } from '@commercetools-frontend/constants';
2
- import { ElementType, ReactNode } from 'react';
3
- export declare type Props = {
4
- mapNotificationToComponent: (notification: TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide) => ElementType | null;
5
- children: ReactNode;
6
- };
7
- declare function NotificationProviderForCustomComponent(props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
8
- declare namespace NotificationProviderForCustomComponent {
9
- var displayName: string;
10
- }
11
- export declare const useCustomNotificationComponent: () => (notification: TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide) => ElementType | null;
12
- export default NotificationProviderForCustomComponent;
1
+ import type { TAppNotificationGlobal, TAppNotificationPage, TAppNotificationSide } from '@commercetools-frontend/constants';
2
+ import { ElementType, ReactNode } from 'react';
3
+ export declare type Props = {
4
+ mapNotificationToComponent: (notification: TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide) => ElementType | null;
5
+ children: ReactNode;
6
+ };
7
+ declare function NotificationProviderForCustomComponent(props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
8
+ declare namespace NotificationProviderForCustomComponent {
9
+ var displayName: string;
10
+ }
11
+ export declare const useCustomNotificationComponent: () => (notification: TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide) => ElementType | null;
12
+ export default NotificationProviderForCustomComponent;
@@ -1 +1 @@
1
- export { default } from './notification';
1
+ export { default } from './notification';
@@ -1,8 +1,8 @@
1
- declare const _default: {
2
- hideNotification: {
3
- id: string;
4
- description: string;
5
- defaultMessage: string;
6
- };
7
- };
8
- export default _default;
1
+ declare const _default: {
2
+ hideNotification: {
3
+ id: string;
4
+ description: string;
5
+ defaultMessage: string;
6
+ };
7
+ };
8
+ export default _default;
@@ -1,15 +1,15 @@
1
- import type { TAppNotificationKind, TAppNotificationDomain } from '@commercetools-frontend/constants';
2
- import { ReactNode, SyntheticEvent } from 'react';
3
- export declare type Props = {
4
- domain: TAppNotificationDomain;
5
- type: TAppNotificationKind;
6
- fixed: boolean;
7
- onCloseClick?: (event: SyntheticEvent) => void;
8
- children: ReactNode;
9
- };
10
- declare const Notification: {
11
- (props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
12
- displayName: string;
13
- defaultProps: Pick<Props, "fixed">;
14
- };
15
- export default Notification;
1
+ import type { TAppNotificationKind, TAppNotificationDomain } from '@commercetools-frontend/constants';
2
+ import { ReactNode, SyntheticEvent } from 'react';
3
+ export declare type Props = {
4
+ domain: TAppNotificationDomain;
5
+ type: TAppNotificationKind;
6
+ fixed: boolean;
7
+ onCloseClick?: (event: SyntheticEvent) => void;
8
+ children: ReactNode;
9
+ };
10
+ declare const Notification: {
11
+ (props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
12
+ displayName: string;
13
+ defaultProps: Pick<Props, "fixed">;
14
+ };
15
+ export default Notification;
@@ -1,10 +1,10 @@
1
- import type { TAppNotificationKind, TAppNotificationDomain } from '@commercetools-frontend/constants';
2
- declare type StyleProps = {
3
- type: TAppNotificationKind;
4
- domain: TAppNotificationDomain;
5
- fixed: boolean;
6
- };
7
- declare const getStylesForIcon: (props: StyleProps) => import("@emotion/utils").SerializedStyles;
8
- declare const getStylesForContent: (props: StyleProps) => import("@emotion/utils").SerializedStyles;
9
- declare const getStylesForNotification: (props: StyleProps) => import("@emotion/utils").SerializedStyles;
10
- export { getStylesForIcon, getStylesForContent, getStylesForNotification };
1
+ import type { TAppNotificationKind, TAppNotificationDomain } from '@commercetools-frontend/constants';
2
+ declare type StyleProps = {
3
+ type: TAppNotificationKind;
4
+ domain: TAppNotificationDomain;
5
+ fixed: boolean;
6
+ };
7
+ declare const getStylesForIcon: (props: StyleProps) => import("@emotion/utils").SerializedStyles;
8
+ declare const getStylesForContent: (props: StyleProps) => import("@emotion/utils").SerializedStyles;
9
+ declare const getStylesForNotification: (props: StyleProps) => import("@emotion/utils").SerializedStyles;
10
+ export { getStylesForIcon, getStylesForContent, getStylesForNotification };
@@ -1,16 +1,16 @@
1
- import type { TAppNotification, TAppNotificationValuesApiError } from '@commercetools-frontend/constants';
2
- import { SyntheticEvent } from 'react';
3
- import { NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_PAGE } from '@commercetools-frontend/constants';
4
- declare 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
+ import type { TAppNotification, TAppNotificationValuesApiError } from '@commercetools-frontend/constants';
2
+ import { SyntheticEvent } from 'react';
3
+ import { NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_PAGE } from '@commercetools-frontend/constants';
4
+ declare 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 +1 @@
1
- export { default } from './api-error';
1
+ export { default } from './api-error';
@@ -1,31 +1,31 @@
1
- import type { TAppNotificationApiError } from '@commercetools-frontend/constants';
2
- declare type ExtraErrorFields = {
3
- errorByExtension?: {
4
- id: string;
5
- key?: string;
6
- };
7
- localizedMessage?: {
8
- [locale: string]: string;
9
- };
10
- field?: string;
11
- duplicateValue?: string;
12
- invalidValue?: string | {
13
- overlappingPrices: string;
14
- } | {
15
- validFrom: string;
16
- validUntil: string;
17
- };
18
- detailedErrorMessage?: string;
19
- attribute?: {
20
- name: string;
21
- };
22
- referencedBy?: string;
23
- };
24
- declare type Props = {
25
- error: TAppNotificationApiError<ExtraErrorFields>;
26
- };
27
- declare const ApiErrorMessage: {
28
- (props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
29
- displayName: string;
30
- };
31
- export default ApiErrorMessage;
1
+ import type { TAppNotificationApiError } from '@commercetools-frontend/constants';
2
+ declare type ExtraErrorFields = {
3
+ errorByExtension?: {
4
+ id: string;
5
+ key?: string;
6
+ };
7
+ localizedMessage?: {
8
+ [locale: string]: string;
9
+ };
10
+ field?: string;
11
+ duplicateValue?: string;
12
+ invalidValue?: string | {
13
+ overlappingPrices: string;
14
+ } | {
15
+ validFrom: string;
16
+ validUntil: string;
17
+ };
18
+ detailedErrorMessage?: string;
19
+ attribute?: {
20
+ name: string;
21
+ };
22
+ referencedBy?: string;
23
+ };
24
+ declare type Props = {
25
+ error: TAppNotificationApiError<ExtraErrorFields>;
26
+ };
27
+ declare const ApiErrorMessage: {
28
+ (props: Props): import("@emotion/react/jsx-runtime").JSX.Element;
29
+ displayName: string;
30
+ };
31
+ export default ApiErrorMessage;
@@ -1 +1 @@
1
- export { default } from './api-error-message';
1
+ export { default } from './api-error-message';
@@ -1,138 +1,138 @@
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
- DuplicateVariantValues: {
48
- id: string;
49
- description: string;
50
- defaultMessage: string;
51
- };
52
- InvalidDateRange: {
53
- id: string;
54
- description: string;
55
- defaultMessage: string;
56
- };
57
- InvalidField: {
58
- id: string;
59
- description: string;
60
- defaultMessage: string;
61
- };
62
- InvalidSlug: {
63
- id: string;
64
- description: string;
65
- defaultMessage: string;
66
- };
67
- PendingOperation: {
68
- id: string;
69
- description: string;
70
- defaultMessage: string;
71
- };
72
- ResourceNotFound: {
73
- id: string;
74
- description: string;
75
- defaultMessage: string;
76
- };
77
- ReferenceExists: {
78
- id: string;
79
- description: string;
80
- defaultMessage: string;
81
- };
82
- RequiredField: {
83
- id: string;
84
- description: string;
85
- defaultMessage: string;
86
- };
87
- RequiredFields: {
88
- id: string;
89
- description: string;
90
- defaultMessage: string;
91
- };
92
- SemanticError: {
93
- id: string;
94
- description: string;
95
- defaultMessage: string;
96
- };
97
- SyntaxError: {
98
- id: string;
99
- description: string;
100
- defaultMessage: string;
101
- };
102
- Unauthorized: {
103
- id: string;
104
- description: string;
105
- defaultMessage: string;
106
- };
107
- Forbidden: {
108
- id: string;
109
- description: string;
110
- defaultMessage: string;
111
- };
112
- ExtensionNoResponse: {
113
- id: string;
114
- description: string;
115
- defaultMessage: string;
116
- };
117
- ExtensionBadResponse: {
118
- id: string;
119
- description: string;
120
- defaultMessage: string;
121
- };
122
- ExtensionUpdateActionsFailed: {
123
- id: string;
124
- description: string;
125
- defaultMessage: string;
126
- };
127
- TaxCategoryDuplicateCountry: {
128
- id: string;
129
- description: string;
130
- defaultMessage: string;
131
- };
132
- MaxResourceLimitExceeded: {
133
- id: string;
134
- description: string;
135
- defaultMessage: string;
136
- };
137
- };
138
- export default _default;
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
+ DuplicateVariantValues: {
48
+ id: string;
49
+ description: string;
50
+ defaultMessage: string;
51
+ };
52
+ InvalidDateRange: {
53
+ id: string;
54
+ description: string;
55
+ defaultMessage: string;
56
+ };
57
+ InvalidField: {
58
+ id: string;
59
+ description: string;
60
+ defaultMessage: string;
61
+ };
62
+ InvalidSlug: {
63
+ id: string;
64
+ description: string;
65
+ defaultMessage: string;
66
+ };
67
+ PendingOperation: {
68
+ id: string;
69
+ description: string;
70
+ defaultMessage: string;
71
+ };
72
+ ResourceNotFound: {
73
+ id: string;
74
+ description: string;
75
+ defaultMessage: string;
76
+ };
77
+ ReferenceExists: {
78
+ id: string;
79
+ description: string;
80
+ defaultMessage: string;
81
+ };
82
+ RequiredField: {
83
+ id: string;
84
+ description: string;
85
+ defaultMessage: string;
86
+ };
87
+ RequiredFields: {
88
+ id: string;
89
+ description: string;
90
+ defaultMessage: string;
91
+ };
92
+ SemanticError: {
93
+ id: string;
94
+ description: string;
95
+ defaultMessage: string;
96
+ };
97
+ SyntaxError: {
98
+ id: string;
99
+ description: string;
100
+ defaultMessage: string;
101
+ };
102
+ Unauthorized: {
103
+ id: string;
104
+ description: string;
105
+ defaultMessage: string;
106
+ };
107
+ Forbidden: {
108
+ id: string;
109
+ description: string;
110
+ defaultMessage: string;
111
+ };
112
+ ExtensionNoResponse: {
113
+ id: string;
114
+ description: string;
115
+ defaultMessage: string;
116
+ };
117
+ ExtensionBadResponse: {
118
+ id: string;
119
+ description: string;
120
+ defaultMessage: string;
121
+ };
122
+ ExtensionUpdateActionsFailed: {
123
+ id: string;
124
+ description: string;
125
+ defaultMessage: string;
126
+ };
127
+ TaxCategoryDuplicateCountry: {
128
+ id: string;
129
+ description: string;
130
+ defaultMessage: string;
131
+ };
132
+ MaxResourceLimitExceeded: {
133
+ id: string;
134
+ description: string;
135
+ defaultMessage: string;
136
+ };
137
+ };
138
+ export default _default;
@@ -1,15 +1,15 @@
1
- import type { TAppNotification, TAppNotificationDomain, TAppNotificationKindSide } from '@commercetools-frontend/constants';
2
- import { SyntheticEvent } from 'react';
3
- declare 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
+ import type { TAppNotification, TAppNotificationDomain, TAppNotificationKindSide } from '@commercetools-frontend/constants';
2
+ import { SyntheticEvent } from 'react';
3
+ declare 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 +1 @@
1
- export { default } from './generic';
1
+ export { default } from './generic';
@@ -1 +1 @@
1
- export { default } from './unexpected-error';
1
+ export { default } from './unexpected-error';
@@ -1,16 +1,16 @@
1
- import type { TAppNotification, TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
2
- import { SyntheticEvent } from 'react';
3
- import { NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_PAGE } from '@commercetools-frontend/constants';
4
- declare 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
+ import type { TAppNotification, TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
2
+ import { SyntheticEvent } from 'react';
3
+ import { NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_PAGE } from '@commercetools-frontend/constants';
4
+ declare 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,2 +1,2 @@
1
- export { default } from './notifications-list';
2
- export { selectPageNotifications } from './selectors';
1
+ export { default } from './notifications-list';
2
+ export { selectPageNotifications } from './selectors';
@@ -1,9 +1,9 @@
1
- import type { TAppNotificationDomain } from '@commercetools-frontend/constants';
2
- declare type Props = {
3
- domain: TAppNotificationDomain;
4
- };
5
- declare const NotificationsList: {
6
- (props: Props): import("@emotion/react/jsx-runtime").JSX.Element | null;
7
- displayName: string;
8
- };
9
- export default NotificationsList;
1
+ import type { TAppNotificationDomain } from '@commercetools-frontend/constants';
2
+ declare type Props = {
3
+ domain: TAppNotificationDomain;
4
+ };
5
+ declare const NotificationsList: {
6
+ (props: Props): import("@emotion/react/jsx-runtime").JSX.Element | null;
7
+ displayName: string;
8
+ };
9
+ export default NotificationsList;
@@ -1,6 +1,6 @@
1
- import type { TAppNotificationDomain } from '@commercetools-frontend/constants';
2
- declare type StyleProps = {
3
- domain: TAppNotificationDomain;
4
- };
5
- declare const getStyles: (props: StyleProps) => import("@emotion/utils").SerializedStyles;
6
- export { getStyles };
1
+ import type { TAppNotificationDomain } from '@commercetools-frontend/constants';
2
+ declare type StyleProps = {
3
+ domain: TAppNotificationDomain;
4
+ };
5
+ declare const getStyles: (props: StyleProps) => import("@emotion/utils").SerializedStyles;
6
+ export { getStyles };
@@ -1,6 +1,12 @@
1
- import type { TAppNotificationGlobal, TAppNotificationPage, TAppNotificationSide } from '@commercetools-frontend/constants';
2
- import type { TAppState } from './types';
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[]>;
1
+ import type { TAppNotificationGlobal, TAppNotificationPage, TAppNotificationSide } from '@commercetools-frontend/constants';
2
+ import type { TAppState } from './types';
3
+ export declare const selectNotifications: (state: TAppState) => (TAppNotificationGlobal | TAppNotificationPage | 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,4 +1,4 @@
1
- import type { TAppNotificationGlobal, TAppNotificationPage, TAppNotificationSide } from '@commercetools-frontend/constants';
2
- export declare type TAppState = {
3
- notifications: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[];
4
- };
1
+ import type { TAppNotificationGlobal, TAppNotificationPage, TAppNotificationSide } from '@commercetools-frontend/constants';
2
+ export declare type TAppState = {
3
+ notifications: (TAppNotificationGlobal | TAppNotificationPage | TAppNotificationSide)[];
4
+ };
@@ -1 +1 @@
1
- export { default } from './notifier';
1
+ export { default } from './notifier';
@@ -1,16 +1,16 @@
1
- import type { TAppNotificationDomain, TAppNotificationKind } from '@commercetools-frontend/constants';
2
- declare type Props = {
3
- domain: TAppNotificationDomain;
4
- kind: TAppNotificationKind;
5
- text?: string;
6
- meta?: {
7
- [key: string]: unknown;
8
- };
9
- dismissAfter?: number;
10
- };
11
- declare const Notifier: {
12
- (props: Props): null;
13
- displayName: string;
14
- defaultProps: Pick<Props, "domain" | "kind">;
15
- };
16
- export default Notifier;
1
+ import type { TAppNotificationDomain, TAppNotificationKind } from '@commercetools-frontend/constants';
2
+ declare type Props = {
3
+ domain: TAppNotificationDomain;
4
+ kind: TAppNotificationKind;
5
+ text?: string;
6
+ meta?: {
7
+ [key: string]: unknown;
8
+ };
9
+ dismissAfter?: number;
10
+ };
11
+ declare const Notifier: {
12
+ (props: Props): null;
13
+ displayName: string;
14
+ defaultProps: Pick<Props, "domain" | "kind">;
15
+ };
16
+ export default Notifier;
@@ -1,2 +1,2 @@
1
- import type { TProps as MapNotificationToComponentProps } from './components/map-notification-to-component';
2
- export declare type TMapNotificationToComponentProps = MapNotificationToComponentProps;
1
+ import type { TProps as MapNotificationToComponentProps } from './components/map-notification-to-component';
2
+ export declare type TMapNotificationToComponentProps = MapNotificationToComponentProps;
@@ -1,7 +1,7 @@
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, selectPageNotifications, } from './components/notifications-list';
6
- export { default as Notifier } from './components/notifier';
7
- export { default as ApiErrorMessage } from './components/notification-kinds/api-error-message';
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, selectPageNotifications, } from './components/notifications-list';
6
+ export { default as Notifier } from './components/notifier';
7
+ export { default as ApiErrorMessage } from './components/notification-kinds/api-error-message';
@@ -1 +1 @@
1
- export default function filterDataAttributes<T extends object>(obj: T): Partial<T>;
1
+ export default function filterDataAttributes<T extends object>(obj: T): Partial<T>;
@@ -1,2 +1,2 @@
1
- declare const _default: "20.9.3";
2
- export default _default;
1
+ declare const _default: "20.10.4";
2
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/react-notifications",
3
- "version": "20.9.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": {
@@ -22,23 +22,23 @@
22
22
  "prepare": "./../../scripts/version.js replace"
23
23
  },
24
24
  "dependencies": {
25
- "@babel/runtime": "7.14.8",
26
- "@babel/runtime-corejs3": "7.14.9",
27
- "@commercetools-frontend/actions-global": "20.9.3",
28
- "@commercetools-frontend/constants": "20.9.3",
29
- "@commercetools-frontend/notifications": "20.9.3",
30
- "@commercetools-frontend/sentry": "20.9.3",
25
+ "@babel/runtime": "7.15.4",
26
+ "@babel/runtime-corejs3": "7.15.4",
27
+ "@commercetools-frontend/actions-global": "20.10.4",
28
+ "@commercetools-frontend/constants": "20.10.1",
29
+ "@commercetools-frontend/notifications": "20.10.1",
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.0",
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",
39
39
  "@types/prop-types": "^15.7.3",
40
- "@types/react": "^17.0.7",
41
- "@types/react-dom": "^17.0.5",
40
+ "@types/react": "^17.0.16",
41
+ "@types/react-dom": "^17.0.9",
42
42
  "@types/react-redux": "^7.1.16",
43
43
  "@types/react-router": "^5.1.13",
44
44
  "@types/react-router-dom": "^5.1.7",
@@ -46,15 +46,15 @@
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
- "@testing-library/react": "12.0.0",
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.6",
56
- "react-redux": "7.2.4",
57
- "react-router-dom": "5.2.0"
55
+ "react-intl": "5.21.0",
56
+ "react-redux": "7.2.6",
57
+ "react-router-dom": "5.3.0"
58
58
  },
59
59
  "peerDependencies": {
60
60
  "react": "17.x",