@commercetools-frontend/actions-global 24.7.1 → 24.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commercetools-frontend-actions-global.cjs.d.ts +2 -2
- package/dist/commercetools-frontend-actions-global.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-actions-global.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-actions-global.esm.js +1 -1
- package/dist/declarations/src/actions/handle-action-error.d.ts +2 -2
- package/dist/declarations/src/actions/index.d.ts +5 -5
- package/dist/declarations/src/actions/show-api-error-notification.d.ts +1 -1
- package/dist/declarations/src/actions/show-notification.d.ts +1 -1
- package/dist/declarations/src/export-types.d.ts +1 -1
- package/dist/declarations/src/hooks/index.d.ts +5 -5
- package/dist/declarations/src/hooks/use-hide-all-page-notifications.d.ts +1 -1
- package/dist/declarations/src/hooks/use-on-action-error.d.ts +2 -14
- package/dist/declarations/src/hooks/use-show-api-error-notification.d.ts +1 -1
- package/dist/declarations/src/hooks/use-show-notification.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +5 -5
- package/package.json +11 -11
- package/dist/commercetools-frontend-actions-global.cjs.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./declarations/src/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
export * from "./declarations/src/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1hY3Rpb25zLWdsb2JhbC5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4vZGVjbGFyYXRpb25zL3NyYy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
|
|
@@ -39,7 +39,7 @@ var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defin
|
|
|
39
39
|
var isNumber__default = /*#__PURE__*/_interopDefault(isNumber);
|
|
40
40
|
|
|
41
41
|
// NOTE: This string will be replaced on build time with the package version.
|
|
42
|
-
var version = "24.
|
|
42
|
+
var version = "24.8.0";
|
|
43
43
|
|
|
44
44
|
function ownKeys$1(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; }
|
|
45
45
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -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 on build time with the package version.
|
|
40
|
-
var version = "24.
|
|
40
|
+
var version = "24.8.0";
|
|
41
41
|
|
|
42
42
|
function ownKeys$1(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; }
|
|
43
43
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty__default["default"](_context2 = ownKeys$1(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors__default["default"] ? _Object$defineProperties__default["default"](e, _Object$getOwnPropertyDescriptors__default["default"](t)) : _forEachInstanceProperty__default["default"](_context3 = ownKeys$1(Object(t))).call(_context3, function (r) { _Object$defineProperty__default["default"](e, r, _Object$getOwnPropertyDescriptor__default["default"](t, r)); }); } return e; }
|
|
@@ -19,7 +19,7 @@ import { useCallback } from 'react';
|
|
|
19
19
|
import { useDispatch } from 'react-redux';
|
|
20
20
|
|
|
21
21
|
// NOTE: This string will be replaced on build time with the package version.
|
|
22
|
-
var version = "24.
|
|
22
|
+
var version = "24.8.0";
|
|
23
23
|
|
|
24
24
|
function ownKeys$1(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; }
|
|
25
25
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var _context2, _context3; var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? _forEachInstanceProperty(_context2 = ownKeys$1(Object(t), !0)).call(_context2, function (r) { _defineProperty(e, r, t[r]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(e, _Object$getOwnPropertyDescriptors(t)) : _forEachInstanceProperty(_context3 = ownKeys$1(Object(t))).call(_context3, function (r) { _Object$defineProperty(e, r, _Object$getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ThunkDispatch } from 'redux-thunk';
|
|
2
2
|
import type { TAppNotificationApiError, TStatusCode } from '@commercetools-frontend/constants';
|
|
3
|
-
import showApiErrorNotification from
|
|
4
|
-
import showUnexpectedErrorNotification from
|
|
3
|
+
import showApiErrorNotification from "./show-api-error-notification.js";
|
|
4
|
+
import showUnexpectedErrorNotification from "./show-unexpected-error-notification.js";
|
|
5
5
|
type ApiError = {
|
|
6
6
|
statusCode: TStatusCode;
|
|
7
7
|
body: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as handleActionError } from
|
|
2
|
-
export { default as hideAllPageNotifications } from
|
|
3
|
-
export { default as showApiErrorNotification } from
|
|
4
|
-
export { default as showNotification } from
|
|
5
|
-
export { default as showUnexpectedErrorNotification } from
|
|
1
|
+
export { default as handleActionError } from "./handle-action-error.js";
|
|
2
|
+
export { default as hideAllPageNotifications } from "./hide-all-page-notifications.js";
|
|
3
|
+
export { default as showApiErrorNotification } from "./show-api-error-notification.js";
|
|
4
|
+
export { default as showNotification } from "./show-notification.js";
|
|
5
|
+
export { default as showUnexpectedErrorNotification } from "./show-unexpected-error-notification.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TApiErrorNotificationOptions } from
|
|
1
|
+
import type { TApiErrorNotificationOptions } from "../types.js";
|
|
2
2
|
export default function showApiErrorNotification({ errors, }: TApiErrorNotificationOptions): import("@commercetools-frontend/notifications").TAddNotificationAction<import("@commercetools-frontend/constants").TAppNotificationOfDomain & {
|
|
3
3
|
kind: import("@commercetools-frontend/constants").TAppNotificationKindPage;
|
|
4
4
|
} & {
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { TNotificationMetaOptions, TNotification } from '@commercetools-frontend/notifications';
|
|
2
|
-
import type { TShowNotification } from
|
|
2
|
+
import type { TShowNotification } from "../types.js";
|
|
3
3
|
export default function showNotification<Notification extends TShowNotification>(notification: Notification, meta?: TNotificationMetaOptions): import("@commercetools-frontend/notifications").TAddNotificationAction<Notification & TNotification>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { DispatchActionError } from
|
|
1
|
+
import type { DispatchActionError } from "./actions/handle-action-error.js";
|
|
2
2
|
export type TDispatchActionError = DispatchActionError;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as useShowNotification } from
|
|
2
|
-
export { default as useShowApiErrorNotification } from
|
|
3
|
-
export { default as useShowUnexpectedErrorNotification } from
|
|
4
|
-
export { default as useHideAllPageNotifications } from
|
|
5
|
-
export { default as useOnActionError } from
|
|
1
|
+
export { default as useShowNotification } from "./use-show-notification.js";
|
|
2
|
+
export { default as useShowApiErrorNotification } from "./use-show-api-error-notification.js";
|
|
3
|
+
export { default as useShowUnexpectedErrorNotification } from "./use-show-unexpected-error-notification.js";
|
|
4
|
+
export { default as useHideAllPageNotifications } from "./use-hide-all-page-notifications.js";
|
|
5
|
+
export { default as useOnActionError } from "./use-on-action-error.js";
|
|
@@ -1,14 +1,2 @@
|
|
|
1
|
-
import type { ActionError } from
|
|
2
|
-
export default function useOnActionError(): (error: ActionError) =>
|
|
3
|
-
kind: import("@commercetools-frontend/constants").TAppNotificationKindPage;
|
|
4
|
-
} & {
|
|
5
|
-
id: number;
|
|
6
|
-
text?: undefined;
|
|
7
|
-
values?: import("@commercetools-frontend/constants").TAppNotificationValuesApiError<{}> | undefined;
|
|
8
|
-
} & import("@commercetools-frontend/notifications").TNotification> | import("@commercetools-frontend/notifications").TAddNotificationAction<import("@commercetools-frontend/constants").TAppNotificationOfDomain & {
|
|
9
|
-
kind: import("@commercetools-frontend/constants").TAppNotificationKindPage;
|
|
10
|
-
} & {
|
|
11
|
-
id: number;
|
|
12
|
-
text?: undefined;
|
|
13
|
-
values?: import("@commercetools-frontend/constants").TAppNotificationValuesUnexpectedError | undefined;
|
|
14
|
-
} & import("@commercetools-frontend/notifications").TNotification> | null;
|
|
1
|
+
import type { ActionError } from "../actions/handle-action-error.js";
|
|
2
|
+
export default function useOnActionError(): (error: ActionError) => import("redux").UnknownAction;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { TNotificationMetaOptions, TAddNotificationAction, TNotification } from '@commercetools-frontend/notifications';
|
|
2
|
-
import type { TShowNotification } from
|
|
2
|
+
import type { TShowNotification } from "../types.js";
|
|
3
3
|
type TNotificationHook<Notification extends TShowNotification> = (content: Notification, meta?: TNotificationMetaOptions) => TAddNotificationAction<Notification & TNotification>;
|
|
4
4
|
/**
|
|
5
5
|
* Dispatch a notification.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as version } from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export { default as version } from "./version.js";
|
|
2
|
+
export * from "./actions/index.js";
|
|
3
|
+
export * from "./hooks/index.js";
|
|
4
|
+
export * from "./types.js";
|
|
5
|
+
export * from "./export-types.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/actions-global",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.8.0",
|
|
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": {
|
|
@@ -30,26 +30,26 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.22.15",
|
|
32
32
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
33
|
-
"@commercetools-frontend/browser-history": "24.
|
|
34
|
-
"@commercetools-frontend/constants": "24.
|
|
35
|
-
"@commercetools-frontend/notifications": "24.
|
|
36
|
-
"@commercetools-frontend/sentry": "24.
|
|
33
|
+
"@commercetools-frontend/browser-history": "24.8.0",
|
|
34
|
+
"@commercetools-frontend/constants": "24.8.0",
|
|
35
|
+
"@commercetools-frontend/notifications": "24.8.0",
|
|
36
|
+
"@commercetools-frontend/sentry": "24.8.0",
|
|
37
37
|
"@types/lodash": "^4.14.198",
|
|
38
38
|
"@types/react": "^19.0.3",
|
|
39
39
|
"@types/react-redux": "^7.1.26",
|
|
40
40
|
"lodash": "4.17.21",
|
|
41
|
-
"redux-thunk": "
|
|
41
|
+
"redux-thunk": "3.1.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@types/jest": "^29.5.
|
|
44
|
+
"@types/jest": "^29.5.14",
|
|
45
45
|
"jest": "29.7.0",
|
|
46
46
|
"react": "19.0.0",
|
|
47
|
-
"react-redux": "
|
|
48
|
-
"redux": "
|
|
47
|
+
"react-redux": "9.2.0",
|
|
48
|
+
"redux": "5.0.1"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"react": "19.x",
|
|
52
|
-
"react-redux": "7.x",
|
|
53
|
-
"redux": "4.x"
|
|
52
|
+
"react-redux": "7.x || 9.x",
|
|
53
|
+
"redux": "4.x || 5.x"
|
|
54
54
|
}
|
|
55
55
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-frontend-actions-global.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|