@commercetools-frontend/actions-global 20.9.4 → 20.10.1

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.
@@ -37,7 +37,7 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
37
37
  var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
38
38
 
39
39
  // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
40
- var version = '20.9.4';
40
+ var version = '20.10.1';
41
41
 
42
42
  function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default['default'](object); if (_Object$getOwnPropertySymbols__default['default']) { var symbols = _Object$getOwnPropertySymbols__default['default'](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default['default'](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default['default'](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
43
43
 
@@ -35,7 +35,7 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
35
35
  var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
36
36
 
37
37
  // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
38
- var version = '20.9.4';
38
+ var version = '20.10.1';
39
39
 
40
40
  function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys__default['default'](object); if (_Object$getOwnPropertySymbols__default['default']) { var symbols = _Object$getOwnPropertySymbols__default['default'](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default['default'](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default['default'](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
41
41
 
@@ -18,7 +18,7 @@ import { useCallback } from 'react';
18
18
  import { useDispatch } from 'react-redux';
19
19
 
20
20
  // NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
21
- var version = '20.9.4';
21
+ var version = '20.10.1';
22
22
 
23
23
  function ownKeys$1(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
24
24
 
@@ -1,15 +1,15 @@
1
- import type { ThunkDispatch } from 'redux-thunk';
2
- import type { TAppNotificationApiError, TStatusCode } from '@commercetools-frontend/constants';
3
- import showApiErrorNotification from './show-api-error-notification';
4
- import showUnexpectedErrorNotification from './show-unexpected-error-notification';
5
- declare type ApiError = {
6
- statusCode: TStatusCode;
7
- body: {
8
- message: string;
9
- errors?: TAppNotificationApiError | TAppNotificationApiError[];
10
- };
11
- };
12
- export declare type ActionError = Error | ApiError;
13
- export declare type DispatchActionError = ThunkDispatch<null, null, ReturnType<typeof showApiErrorNotification> | ReturnType<typeof showUnexpectedErrorNotification>>;
14
- export default function handleActionError(error: ActionError): (dispatch: DispatchActionError) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<import("..").TApiErrorNotification, "id">> | null;
15
- export {};
1
+ import type { ThunkDispatch } from 'redux-thunk';
2
+ import type { TAppNotificationApiError, TStatusCode } from '@commercetools-frontend/constants';
3
+ import showApiErrorNotification from './show-api-error-notification';
4
+ import showUnexpectedErrorNotification from './show-unexpected-error-notification';
5
+ declare type ApiError = {
6
+ statusCode: TStatusCode;
7
+ body: {
8
+ message: string;
9
+ errors?: TAppNotificationApiError | TAppNotificationApiError[];
10
+ };
11
+ };
12
+ export declare type ActionError = Error | ApiError;
13
+ export declare type DispatchActionError = ThunkDispatch<null, null, ReturnType<typeof showApiErrorNotification> | ReturnType<typeof showUnexpectedErrorNotification>>;
14
+ export default function handleActionError(error: ActionError): (dispatch: DispatchActionError) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<import("..").TApiErrorNotification, "id">> | null;
15
+ export {};
@@ -1,6 +1,6 @@
1
- import { HIDE_ALL_PAGE_NOTIFICATIONS } from '@commercetools-frontend/constants';
2
- declare type HideAllPageNotificationAction = {
3
- type: typeof HIDE_ALL_PAGE_NOTIFICATIONS;
4
- };
5
- export default function hideAllPageNotifications(): HideAllPageNotificationAction;
6
- export {};
1
+ import { HIDE_ALL_PAGE_NOTIFICATIONS } from '@commercetools-frontend/constants';
2
+ declare type HideAllPageNotificationAction = {
3
+ type: typeof HIDE_ALL_PAGE_NOTIFICATIONS;
4
+ };
5
+ export default function hideAllPageNotifications(): HideAllPageNotificationAction;
6
+ export {};
@@ -1,5 +1,5 @@
1
- export { default as handleActionError } from './handle-action-error';
2
- export { default as hideAllPageNotifications } from './hide-all-page-notifications';
3
- export { default as showApiErrorNotification } from './show-api-error-notification';
4
- export { default as showNotification } from './show-notification';
5
- export { default as showUnexpectedErrorNotification } from './show-unexpected-error-notification';
1
+ export { default as handleActionError } from './handle-action-error';
2
+ export { default as hideAllPageNotifications } from './hide-all-page-notifications';
3
+ export { default as showApiErrorNotification } from './show-api-error-notification';
4
+ export { default as showNotification } from './show-notification';
5
+ export { default as showUnexpectedErrorNotification } from './show-unexpected-error-notification';
@@ -1,2 +1,2 @@
1
- import type { TApiErrorNotification, TApiErrorNotificationOptions } from '../types';
2
- export default function showApiErrorNotification({ errors, }: TApiErrorNotificationOptions): import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<TApiErrorNotification, "id">>;
1
+ import type { TApiErrorNotification, TApiErrorNotificationOptions } from '../types';
2
+ export default function showApiErrorNotification({ errors, }: TApiErrorNotificationOptions): import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<TApiErrorNotification, "id">>;
@@ -1,3 +1,3 @@
1
- import type { TNotificationMetaOptions } from '@commercetools-frontend/notifications';
2
- import type { TShowNotification } from '../types';
3
- export default function showNotification<Notification extends TShowNotification>(notification: Notification, meta?: TNotificationMetaOptions): import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<Notification, "id">>;
1
+ import type { TNotificationMetaOptions } from '@commercetools-frontend/notifications';
2
+ import type { TShowNotification } from '../types';
3
+ export default function showNotification<Notification extends TShowNotification>(notification: Notification, meta?: TNotificationMetaOptions): import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<Notification, "id">>;
@@ -1,3 +1,3 @@
1
- import type { TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
2
- import type { TUnexpectedErrorNotification } from '../types';
3
- export default function showUnexpectedErrorNotification({ errorId, }?: TAppNotificationValuesUnexpectedError): import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<TUnexpectedErrorNotification, "id">>;
1
+ import type { TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
2
+ import type { TUnexpectedErrorNotification } from '../types';
3
+ export default function showUnexpectedErrorNotification({ errorId, }?: TAppNotificationValuesUnexpectedError): import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<TUnexpectedErrorNotification, "id">>;
@@ -1,2 +1,2 @@
1
- import type { DispatchActionError } from './actions/handle-action-error';
2
- export declare type TDispatchActionError = DispatchActionError;
1
+ import type { DispatchActionError } from './actions/handle-action-error';
2
+ export declare type TDispatchActionError = DispatchActionError;
@@ -1,5 +1,5 @@
1
- export { default as useShowNotification } from './use-show-notification';
2
- export { default as useShowApiErrorNotification } from './use-show-api-error-notification';
3
- export { default as useShowUnexpectedErrorNotification } from './use-show-unexpected-error-notification';
4
- export { default as useHideAllPageNotifications } from './use-hide-all-page-notifications';
5
- export { default as useOnActionError } from './use-on-action-error';
1
+ export { default as useShowNotification } from './use-show-notification';
2
+ export { default as useShowApiErrorNotification } from './use-show-api-error-notification';
3
+ export { default as useShowUnexpectedErrorNotification } from './use-show-unexpected-error-notification';
4
+ export { default as useHideAllPageNotifications } from './use-hide-all-page-notifications';
5
+ export { default as useOnActionError } from './use-on-action-error';
@@ -1,3 +1,3 @@
1
- export default function useHideAllPageNotifications(): () => {
2
- type: "HIDE_ALL_PAGE_NOTIFICATIONS";
3
- };
1
+ export default function useHideAllPageNotifications(): () => {
2
+ type: "HIDE_ALL_PAGE_NOTIFICATIONS";
3
+ };
@@ -1,2 +1,2 @@
1
- import type { ActionError } from '../actions/handle-action-error';
2
- export default function useOnActionError(): (error: ActionError) => (dispatch: import("../actions/handle-action-error").DispatchActionError) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<import("..").TApiErrorNotification, "id">> | null;
1
+ import type { ActionError } from '../actions/handle-action-error';
2
+ export default function useOnActionError(): (error: ActionError) => (dispatch: import("../actions/handle-action-error").DispatchActionError) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<import("..").TApiErrorNotification, "id">> | null;
@@ -1,2 +1,2 @@
1
- import type { TApiErrorNotificationOptions } from '../types';
2
- export default function useShowApiErrorNotification(): (options: TApiErrorNotificationOptions) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<import("../types").TApiErrorNotification, "id">>;
1
+ import type { TApiErrorNotificationOptions } from '../types';
2
+ export default function useShowApiErrorNotification(): (options: TApiErrorNotificationOptions) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<import("../types").TApiErrorNotification, "id">>;
@@ -1,3 +1,3 @@
1
- import type { TNotificationMetaOptions } from '@commercetools-frontend/notifications';
2
- import type { TShowNotification } from '../types';
3
- export default function useShowNotification<Notification extends TShowNotification>(notificationFragment?: Partial<Notification>): (content: Notification, meta?: TNotificationMetaOptions | undefined) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<Notification, "id">>;
1
+ import type { TNotificationMetaOptions } from '@commercetools-frontend/notifications';
2
+ import type { TShowNotification } from '../types';
3
+ export default function useShowNotification<Notification extends TShowNotification>(notificationFragment?: Partial<Notification>): (content: Notification, meta?: TNotificationMetaOptions | undefined) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<Notification, "id">>;
@@ -1,2 +1,2 @@
1
- import type { TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
2
- export default function useShowUnexpectedErrorNotification(): (options: TAppNotificationValuesUnexpectedError) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<import("..").TUnexpectedErrorNotification, "id">>;
1
+ import type { TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
2
+ export default function useShowUnexpectedErrorNotification(): (options: TAppNotificationValuesUnexpectedError) => import("@commercetools-frontend/notifications").TAddNotificationAction<Pick<import("..").TUnexpectedErrorNotification, "id">>;
@@ -1,5 +1,5 @@
1
- export { default as version } from './version';
2
- export * from './actions';
3
- export * from './hooks';
4
- export * from './types';
5
- export * from './export-types';
1
+ export { default as version } from './version';
2
+ export * from './actions';
3
+ export * from './hooks';
4
+ export * from './types';
5
+ export * from './export-types';
@@ -1,20 +1,20 @@
1
- import type { TNotification } from '@commercetools-frontend/notifications';
2
- import type { TAppNotification, TAppNotificationDomain, TAppNotificationKind, TAppNotificationApiError, TAppNotificationValuesApiError, TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
3
- export declare type TShowNotification = TNotification & {
4
- domain: TAppNotificationDomain;
5
- kind: TAppNotificationKind;
6
- text?: string;
7
- };
8
- export declare type TApiErrorNotification = TNotification & TAppNotification<{
9
- domain: 'page';
10
- kind: 'api-error';
11
- values: TAppNotificationValuesApiError;
12
- }>;
13
- export declare type TUnexpectedErrorNotification = TNotification & TAppNotification<{
14
- domain: 'page';
15
- kind: 'unexpected-error';
16
- values: TAppNotificationValuesUnexpectedError;
17
- }>;
18
- export declare type TApiErrorNotificationOptions = {
19
- errors: TAppNotificationApiError | TAppNotificationApiError[];
20
- };
1
+ import type { TNotification } from '@commercetools-frontend/notifications';
2
+ import type { TAppNotification, TAppNotificationDomain, TAppNotificationKind, TAppNotificationApiError, TAppNotificationValuesApiError, TAppNotificationValuesUnexpectedError } from '@commercetools-frontend/constants';
3
+ export declare type TShowNotification = TNotification & {
4
+ domain: TAppNotificationDomain;
5
+ kind: TAppNotificationKind;
6
+ text?: string;
7
+ };
8
+ export declare type TApiErrorNotification = TNotification & TAppNotification<{
9
+ domain: 'page';
10
+ kind: 'api-error';
11
+ values: TAppNotificationValuesApiError;
12
+ }>;
13
+ export declare type TUnexpectedErrorNotification = TNotification & TAppNotification<{
14
+ domain: 'page';
15
+ kind: 'unexpected-error';
16
+ values: TAppNotificationValuesUnexpectedError;
17
+ }>;
18
+ export declare type TApiErrorNotificationOptions = {
19
+ errors: TAppNotificationApiError | TAppNotificationApiError[];
20
+ };
@@ -1,2 +1,2 @@
1
- declare const _default: "20.9.4";
2
- export default _default;
1
+ declare const _default: "20.10.1";
2
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercetools-frontend/actions-global",
3
- "version": "20.9.4",
3
+ "version": "20.10.1",
4
4
  "description": "Global redux actions for a MC application",
5
5
  "bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
6
6
  "repository": {
@@ -22,12 +22,12 @@
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/browser-history": "20.9.3",
28
- "@commercetools-frontend/constants": "20.9.3",
29
- "@commercetools-frontend/notifications": "20.9.3",
30
- "@commercetools-frontend/sentry": "20.9.4",
25
+ "@babel/runtime": "7.15.4",
26
+ "@babel/runtime-corejs3": "7.15.4",
27
+ "@commercetools-frontend/browser-history": "20.10.1",
28
+ "@commercetools-frontend/constants": "20.10.1",
29
+ "@commercetools-frontend/notifications": "20.10.1",
30
+ "@commercetools-frontend/sentry": "20.10.1",
31
31
  "@types/lodash": "^4.14.167",
32
32
  "@types/react": "^17.0.16",
33
33
  "@types/react-redux": "^7.1.16",
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "react": "17.0.2",
39
- "react-redux": "7.2.4",
39
+ "react-redux": "7.2.5",
40
40
  "redux": "4.1.1"
41
41
  },
42
42
  "peerDependencies": {