@commercetools-frontend/notifications 24.7.2 → 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-notifications.cjs.d.ts +2 -2
- package/dist/commercetools-frontend-notifications.cjs.dev.js +1 -1
- package/dist/commercetools-frontend-notifications.cjs.prod.js +1 -1
- package/dist/commercetools-frontend-notifications.esm.js +1 -1
- package/dist/declarations/src/action-creators.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +6 -6
- package/dist/declarations/src/middleware.d.ts +3 -3
- package/dist/declarations/src/reducer.d.ts +1 -1
- package/dist/declarations/src/types.d.ts +3 -1
- package/package.json +3 -3
- package/dist/commercetools-frontend-notifications.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1ub3RpZmljYXRpb25zLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi9kZWNsYXJhdGlvbnMvc3JjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
|
|
@@ -30,7 +30,7 @@ var _Map__default = /*#__PURE__*/_interopDefault(_Map);
|
|
|
30
30
|
var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
|
|
31
31
|
|
|
32
32
|
// NOTE: This string will be replaced on build time with the package version.
|
|
33
|
-
var version = "24.
|
|
33
|
+
var version = "24.8.0";
|
|
34
34
|
|
|
35
35
|
const ADD_NOTIFICATION = 'ADD_NOTIFICATION';
|
|
36
36
|
const REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION';
|
|
@@ -30,7 +30,7 @@ var _Map__default = /*#__PURE__*/_interopDefault(_Map);
|
|
|
30
30
|
var _setTimeout__default = /*#__PURE__*/_interopDefault(_setTimeout);
|
|
31
31
|
|
|
32
32
|
// NOTE: This string will be replaced on build time with the package version.
|
|
33
|
-
var version = "24.
|
|
33
|
+
var version = "24.8.0";
|
|
34
34
|
|
|
35
35
|
const ADD_NOTIFICATION = 'ADD_NOTIFICATION';
|
|
36
36
|
const REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION';
|
|
@@ -12,7 +12,7 @@ import _Map from '@babel/runtime-corejs3/core-js-stable/map';
|
|
|
12
12
|
import _setTimeout from '@babel/runtime-corejs3/core-js-stable/set-timeout';
|
|
13
13
|
|
|
14
14
|
// NOTE: This string will be replaced on build time with the package version.
|
|
15
|
-
var version = "24.
|
|
15
|
+
var version = "24.8.0";
|
|
16
16
|
|
|
17
17
|
const ADD_NOTIFICATION = 'ADD_NOTIFICATION';
|
|
18
18
|
const REMOVE_NOTIFICATION = 'REMOVE_NOTIFICATION';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { TNotificationMetaOptions, TRemoveNotificationAction, TNotification, TAddNotificationAction } from
|
|
1
|
+
import type { TNotificationMetaOptions, TRemoveNotificationAction, TNotification, TAddNotificationAction } from "./types.js";
|
|
2
2
|
export declare function addNotification<Payload extends TNotification>(notification: Payload, meta?: TNotificationMetaOptions): TAddNotificationAction<Payload>;
|
|
3
3
|
export declare function removeNotification(id: TNotification['id']): TRemoveNotificationAction;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { default as version } from
|
|
2
|
-
export * from
|
|
3
|
-
export { default as middleware } from
|
|
4
|
-
export { default as reducer } from
|
|
5
|
-
export { addNotification, removeNotification } from
|
|
6
|
-
export { ADD_NOTIFICATION, REMOVE_NOTIFICATION } from
|
|
1
|
+
export { default as version } from "./version.js";
|
|
2
|
+
export * from "./types.js";
|
|
3
|
+
export { default as middleware } from "./middleware.js";
|
|
4
|
+
export { default as reducer } from "./reducer.js";
|
|
5
|
+
export { addNotification, removeNotification } from "./action-creators.js";
|
|
6
|
+
export { ADD_NOTIFICATION, REMOVE_NOTIFICATION } from "./action-types.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { Dispatch, MiddlewareAPI } from 'redux';
|
|
2
|
-
import type { TNotification, TNotificationAction } from
|
|
3
|
-
declare const middleware: <Payload extends TNotification>({ dispatch }: MiddlewareAPI) => (next: Dispatch<TNotificationAction<Payload>>) => (action: TNotificationAction<Payload>) => import("./types").TRemoveNotificationAction | {
|
|
2
|
+
import type { TNotification, TNotificationAction } from "./types.js";
|
|
3
|
+
declare const middleware: <Payload extends TNotification>({ dispatch }: MiddlewareAPI) => (next: Dispatch<TNotificationAction<Payload>>) => (action: TNotificationAction<Payload>) => import("./types.js").TRemoveNotificationAction | {
|
|
4
4
|
payload: Payload & {
|
|
5
5
|
id: number;
|
|
6
6
|
};
|
|
7
7
|
dismiss: () => void;
|
|
8
|
-
meta?: import("./types").TNotificationMetaOptions
|
|
8
|
+
meta?: import("./types.js").TNotificationMetaOptions;
|
|
9
9
|
type: "ADD_NOTIFICATION";
|
|
10
10
|
};
|
|
11
11
|
export default middleware;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type { TNotification, TNotificationAction, TNotificationState } from
|
|
1
|
+
import type { TNotification, TNotificationAction, TNotificationState } from "./types.js";
|
|
2
2
|
export default function notificationsReducer<Payload extends TNotification>(state: TNotificationState<Payload> | undefined, action: TNotificationAction<Payload>): TNotificationState<Payload>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Action } from 'redux';
|
|
2
|
-
import { ADD_NOTIFICATION, REMOVE_NOTIFICATION } from
|
|
2
|
+
import { ADD_NOTIFICATION, REMOVE_NOTIFICATION } from "./action-types.js";
|
|
3
3
|
export type TNotification = {
|
|
4
4
|
id?: number;
|
|
5
5
|
};
|
|
@@ -12,9 +12,11 @@ export interface TAddNotificationAction<Payload extends TNotification> extends A
|
|
|
12
12
|
payload: Payload;
|
|
13
13
|
meta?: TNotificationMetaOptions;
|
|
14
14
|
dismiss?: () => void;
|
|
15
|
+
[key: string]: unknown;
|
|
15
16
|
}
|
|
16
17
|
export interface TRemoveNotificationAction extends Action<typeof REMOVE_NOTIFICATION> {
|
|
17
18
|
payload: TNotification;
|
|
19
|
+
[key: string]: unknown;
|
|
18
20
|
}
|
|
19
21
|
export type TNotificationAction<Payload extends TNotification> = TAddNotificationAction<Payload> | TRemoveNotificationAction;
|
|
20
22
|
export type TNotificationState<Payload extends TNotification> = Payload[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/notifications",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.8.0",
|
|
4
4
|
"description": "A general-purpose notification system built on top of redux",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"@babel/runtime-corejs3": "^7.22.15"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"redux": "
|
|
35
|
+
"redux": "5.0.1"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"redux": "4.x"
|
|
38
|
+
"redux": "4.x || 5.x"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-frontend-notifications.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|