@open-tender/store 0.1.310 → 0.1.311
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Notifications } from '@open-tender/types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
|
-
export declare const showNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/showNotification">, hideNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/hideNotification">;
|
|
3
|
+
export declare const showNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/showNotification">, hideNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/hideNotification">, hideAllNotifications: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notifications/hideAllNotifications">;
|
|
4
4
|
export declare const selectNotifications: (state: AppState) => Notifications;
|
|
5
5
|
export declare const notificationsReducer: import("redux").Reducer<Notifications>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.notificationsReducer = exports.selectNotifications = exports.hideNotification = exports.showNotification = void 0;
|
|
4
|
+
exports.notificationsReducer = exports.selectNotifications = exports.hideAllNotifications = exports.hideNotification = exports.showNotification = void 0;
|
|
5
5
|
var utils_1 = require("@open-tender/utils");
|
|
6
6
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
var types_1 = require("./types");
|
|
@@ -16,10 +16,11 @@ var notificationsSlice = (0, toolkit_1.createSlice)({
|
|
|
16
16
|
hideNotification: function (state, action) {
|
|
17
17
|
// state = state.filter(i => i.id !== action.payload)
|
|
18
18
|
state.splice(state.findIndex(function (i) { return i.id === action.payload; }), 1);
|
|
19
|
-
}
|
|
19
|
+
},
|
|
20
|
+
hideAllNotifications: function () { return []; }
|
|
20
21
|
}
|
|
21
22
|
});
|
|
22
|
-
exports.showNotification = (_a = notificationsSlice.actions, _a.showNotification), exports.hideNotification = _a.hideNotification;
|
|
23
|
+
exports.showNotification = (_a = notificationsSlice.actions, _a.showNotification), exports.hideNotification = _a.hideNotification, exports.hideAllNotifications = _a.hideAllNotifications;
|
|
23
24
|
var selectNotifications = function (state) { return state.notifications; };
|
|
24
25
|
exports.selectNotifications = selectNotifications;
|
|
25
26
|
exports.notificationsReducer = notificationsSlice.reducer;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Notifications } from '@open-tender/types';
|
|
2
2
|
import { AppState } from '../app';
|
|
3
|
-
export declare const showNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/showNotification">, hideNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/hideNotification">;
|
|
3
|
+
export declare const showNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/showNotification">, hideNotification: import("@reduxjs/toolkit").ActionCreatorWithPayload<any, "notifications/hideNotification">, hideAllNotifications: import("@reduxjs/toolkit").ActionCreatorWithoutPayload<"notifications/hideAllNotifications">;
|
|
4
4
|
export declare const selectNotifications: (state: AppState) => Notifications;
|
|
5
5
|
export declare const notificationsReducer: import("redux").Reducer<Notifications>;
|
|
@@ -13,9 +13,10 @@ var notificationsSlice = createSlice({
|
|
|
13
13
|
hideNotification: function (state, action) {
|
|
14
14
|
// state = state.filter(i => i.id !== action.payload)
|
|
15
15
|
state.splice(state.findIndex(function (i) { return i.id === action.payload; }), 1);
|
|
16
|
-
}
|
|
16
|
+
},
|
|
17
|
+
hideAllNotifications: function () { return []; }
|
|
17
18
|
}
|
|
18
19
|
});
|
|
19
|
-
export var showNotification = (_a = notificationsSlice.actions, _a.showNotification), hideNotification = _a.hideNotification;
|
|
20
|
+
export var showNotification = (_a = notificationsSlice.actions, _a.showNotification), hideNotification = _a.hideNotification, hideAllNotifications = _a.hideAllNotifications;
|
|
20
21
|
export var selectNotifications = function (state) { return state.notifications; };
|
|
21
22
|
export var notificationsReducer = notificationsSlice.reducer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.311",
|
|
4
4
|
"description": "A library of hooks, reducers, utility functions, and types for use with Open Tender applications that utilize our in-store POS API",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|