@open-tender/store 0.1.309 → 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.
package/dist/cjs/slices/kiosk.js
CHANGED
|
@@ -117,22 +117,20 @@ exports.testKioskPrinter = (0, toolkit_1.createAsyncThunk)(KioskActionType.TestK
|
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
119
|
}); });
|
|
120
|
-
exports.fetchPaymentConfigs = (0, toolkit_1.createAsyncThunk)(KioskActionType.FetchPaymentConfigs, function (
|
|
121
|
-
var
|
|
122
|
-
var
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
switch (_e.label) {
|
|
120
|
+
exports.fetchPaymentConfigs = (0, toolkit_1.createAsyncThunk)(KioskActionType.FetchPaymentConfigs, function (_1, _a) { return tslib_1.__awaiter(void 0, [_1, _a], void 0, function (_, _b) {
|
|
121
|
+
var api, response, err_3;
|
|
122
|
+
var getState = _b.getState, rejectWithValue = _b.rejectWithValue;
|
|
123
|
+
return tslib_1.__generator(this, function (_c) {
|
|
124
|
+
switch (_c.label) {
|
|
126
125
|
case 0:
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
api = new services_1.PosAPI(app);
|
|
126
|
+
_c.trys.push([0, 2, , 3]);
|
|
127
|
+
api = getState().config.api;
|
|
130
128
|
return [4 /*yield*/, api.fetchPaymentConfigs()];
|
|
131
129
|
case 1:
|
|
132
|
-
response =
|
|
130
|
+
response = _c.sent();
|
|
133
131
|
return [2 /*return*/, response];
|
|
134
132
|
case 2:
|
|
135
|
-
err_3 =
|
|
133
|
+
err_3 = _c.sent();
|
|
136
134
|
return [2 /*return*/, rejectWithValue(errors_1.errorsApi.tempUnavailable)];
|
|
137
135
|
case 3: return [2 /*return*/];
|
|
138
136
|
}
|
|
@@ -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;
|
package/dist/esm/slices/kiosk.js
CHANGED
|
@@ -114,22 +114,20 @@ export var testKioskPrinter = createAsyncThunk(KioskActionType.TestKioskPrinter,
|
|
|
114
114
|
}
|
|
115
115
|
});
|
|
116
116
|
}); });
|
|
117
|
-
export var fetchPaymentConfigs = createAsyncThunk(KioskActionType.FetchPaymentConfigs, function (
|
|
118
|
-
var
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
switch (_e.label) {
|
|
117
|
+
export var fetchPaymentConfigs = createAsyncThunk(KioskActionType.FetchPaymentConfigs, function (_1, _a) { return __awaiter(void 0, [_1, _a], void 0, function (_, _b) {
|
|
118
|
+
var api, response, err_3;
|
|
119
|
+
var getState = _b.getState, rejectWithValue = _b.rejectWithValue;
|
|
120
|
+
return __generator(this, function (_c) {
|
|
121
|
+
switch (_c.label) {
|
|
123
122
|
case 0:
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
api = new PosAPI(app);
|
|
123
|
+
_c.trys.push([0, 2, , 3]);
|
|
124
|
+
api = getState().config.api;
|
|
127
125
|
return [4 /*yield*/, api.fetchPaymentConfigs()];
|
|
128
126
|
case 1:
|
|
129
|
-
response =
|
|
127
|
+
response = _c.sent();
|
|
130
128
|
return [2 /*return*/, response];
|
|
131
129
|
case 2:
|
|
132
|
-
err_3 =
|
|
130
|
+
err_3 = _c.sent();
|
|
133
131
|
return [2 /*return*/, rejectWithValue(errorsApi.tempUnavailable)];
|
|
134
132
|
case 3: return [2 /*return*/];
|
|
135
133
|
}
|
|
@@ -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",
|