@open-tender/store 1.1.113 → 1.1.115
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.
|
@@ -41,11 +41,59 @@ export declare const selectConfig: (state: AppState) => ConfigState;
|
|
|
41
41
|
export declare const selectApi: (state: AppState) => PosAPI;
|
|
42
42
|
export declare const selectVersion: (state: AppState) => string | null | undefined;
|
|
43
43
|
export declare const selectDevices: (state: AppState) => Devices | null;
|
|
44
|
-
export declare const selectStore: (state: AppState) => Store | null;
|
|
45
44
|
export declare const selectSelectOptions: (state: AppState) => SelectOptions;
|
|
46
45
|
export declare const selectMenuColors: (state: AppState) => MenuColors;
|
|
47
46
|
export declare const selectTimezone: () => Timezone;
|
|
48
47
|
export declare const selectLoyalty: (state: AppState) => boolean;
|
|
49
48
|
export declare const selectPinpad: (state: AppState) => boolean;
|
|
50
49
|
export declare const selectCashDrawer: (state: AppState) => boolean;
|
|
50
|
+
export declare const selectStore: (state: AppState) => Store | null;
|
|
51
|
+
export declare const selectStoreSettings: ((state: {
|
|
52
|
+
alerts: import("@open-tender/types").Alerts;
|
|
53
|
+
arrivals: import("./arrivals").ArrivalsState;
|
|
54
|
+
cartSummary: import("./cartSummary").CartSummaryState;
|
|
55
|
+
checkout: import("./checkout").CheckoutState;
|
|
56
|
+
config: ConfigState;
|
|
57
|
+
customer: import("./customer").CustomerState;
|
|
58
|
+
customerIdentify: import("./customerIdentify").CustomerIdentifyState;
|
|
59
|
+
deals: import("./deals").DealsState;
|
|
60
|
+
discounts: import("./discounts").DiscountsState;
|
|
61
|
+
errorAlerts: import("./errorAlerts").ErrorAlertsState;
|
|
62
|
+
kds: import("./kds").KdsState;
|
|
63
|
+
kiosk: import("./kiosk").KioskState;
|
|
64
|
+
menu: import("./menu").MenuState;
|
|
65
|
+
menuPages: import("./menuPages").MenuPagesState;
|
|
66
|
+
modal: import("./modal").ModalState;
|
|
67
|
+
notifications: import("@open-tender/types").Notifications;
|
|
68
|
+
offlineAuths: import("./offlineAuths").OfflineAuthsState;
|
|
69
|
+
order: import("./order").OrderState;
|
|
70
|
+
pos: import("./pos").PosState;
|
|
71
|
+
punches: import("./punches").PunchesState;
|
|
72
|
+
refund: import("./refund").RefundState;
|
|
73
|
+
sendReceipt: import("./sendReceipt").SendReceiptState;
|
|
74
|
+
settings: import("./settings").SettingsState;
|
|
75
|
+
sidebar: import("./sidebar").SidebarState;
|
|
76
|
+
surcharges: import("./surcharges").SurchargesState;
|
|
77
|
+
taxes: import("./taxes").TaxesState;
|
|
78
|
+
}) => Store) & {
|
|
79
|
+
clearCache: () => void;
|
|
80
|
+
resultsCount: () => number;
|
|
81
|
+
resetResultsCount: () => void;
|
|
82
|
+
} & {
|
|
83
|
+
resultFunc: (resultFuncArgs_0: Store | null) => Store;
|
|
84
|
+
memoizedResultFunc: ((resultFuncArgs_0: Store | null) => Store) & {
|
|
85
|
+
clearCache: () => void;
|
|
86
|
+
resultsCount: () => number;
|
|
87
|
+
resetResultsCount: () => void;
|
|
88
|
+
};
|
|
89
|
+
lastResult: () => Store;
|
|
90
|
+
dependencies: [(state: AppState) => Store | null];
|
|
91
|
+
recomputations: () => number;
|
|
92
|
+
resetRecomputations: () => void;
|
|
93
|
+
dependencyRecomputations: () => number;
|
|
94
|
+
resetDependencyRecomputations: () => void;
|
|
95
|
+
} & {
|
|
96
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
97
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
98
|
+
};
|
|
51
99
|
export declare const configReducer: import("redux").Reducer<ConfigState>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.configReducer = exports.selectCashDrawer = exports.selectPinpad = exports.selectLoyalty = exports.selectTimezone = exports.selectMenuColors = exports.selectSelectOptions = exports.
|
|
4
|
+
exports.configReducer = exports.selectStoreSettings = exports.selectStore = exports.selectCashDrawer = exports.selectPinpad = exports.selectLoyalty = exports.selectTimezone = exports.selectMenuColors = exports.selectSelectOptions = exports.selectDevices = exports.selectVersion = exports.selectApi = exports.selectConfig = exports.setApiTerminal = exports.setApi = exports.setVersion = exports.incrementRetries = exports.resetRetries = exports.resetConfig = exports.fetchConfig = exports.ConfigActionType = void 0;
|
|
5
5
|
var tslib_1 = require("tslib");
|
|
6
6
|
var utils_1 = require("@open-tender/utils");
|
|
7
7
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
@@ -165,8 +165,6 @@ var selectVersion = function (state) { return state.config.version; };
|
|
|
165
165
|
exports.selectVersion = selectVersion;
|
|
166
166
|
var selectDevices = function (state) { return state.config.devices; };
|
|
167
167
|
exports.selectDevices = selectDevices;
|
|
168
|
-
var selectStore = function (state) { return state.config.store; };
|
|
169
|
-
exports.selectStore = selectStore;
|
|
170
168
|
var selectSelectOptions = function (state) {
|
|
171
169
|
return state.config.selectOptions || [];
|
|
172
170
|
};
|
|
@@ -189,4 +187,9 @@ var selectPinpad = function (state) { return state.config.hasPinpad; };
|
|
|
189
187
|
exports.selectPinpad = selectPinpad;
|
|
190
188
|
var selectCashDrawer = function (state) { return state.config.hasCashDrawer; };
|
|
191
189
|
exports.selectCashDrawer = selectCashDrawer;
|
|
190
|
+
var selectStore = function (state) { return state.config.store; };
|
|
191
|
+
exports.selectStore = selectStore;
|
|
192
|
+
exports.selectStoreSettings = (0, toolkit_1.createSelector)(exports.selectStore, function (store) {
|
|
193
|
+
return tslib_1.__assign({}, store);
|
|
194
|
+
});
|
|
192
195
|
exports.configReducer = configSlice.reducer;
|
|
@@ -41,11 +41,59 @@ export declare const selectConfig: (state: AppState) => ConfigState;
|
|
|
41
41
|
export declare const selectApi: (state: AppState) => PosAPI;
|
|
42
42
|
export declare const selectVersion: (state: AppState) => string | null | undefined;
|
|
43
43
|
export declare const selectDevices: (state: AppState) => Devices | null;
|
|
44
|
-
export declare const selectStore: (state: AppState) => Store | null;
|
|
45
44
|
export declare const selectSelectOptions: (state: AppState) => SelectOptions;
|
|
46
45
|
export declare const selectMenuColors: (state: AppState) => MenuColors;
|
|
47
46
|
export declare const selectTimezone: () => Timezone;
|
|
48
47
|
export declare const selectLoyalty: (state: AppState) => boolean;
|
|
49
48
|
export declare const selectPinpad: (state: AppState) => boolean;
|
|
50
49
|
export declare const selectCashDrawer: (state: AppState) => boolean;
|
|
50
|
+
export declare const selectStore: (state: AppState) => Store | null;
|
|
51
|
+
export declare const selectStoreSettings: ((state: {
|
|
52
|
+
alerts: import("@open-tender/types").Alerts;
|
|
53
|
+
arrivals: import("./arrivals").ArrivalsState;
|
|
54
|
+
cartSummary: import("./cartSummary").CartSummaryState;
|
|
55
|
+
checkout: import("./checkout").CheckoutState;
|
|
56
|
+
config: ConfigState;
|
|
57
|
+
customer: import("./customer").CustomerState;
|
|
58
|
+
customerIdentify: import("./customerIdentify").CustomerIdentifyState;
|
|
59
|
+
deals: import("./deals").DealsState;
|
|
60
|
+
discounts: import("./discounts").DiscountsState;
|
|
61
|
+
errorAlerts: import("./errorAlerts").ErrorAlertsState;
|
|
62
|
+
kds: import("./kds").KdsState;
|
|
63
|
+
kiosk: import("./kiosk").KioskState;
|
|
64
|
+
menu: import("./menu").MenuState;
|
|
65
|
+
menuPages: import("./menuPages").MenuPagesState;
|
|
66
|
+
modal: import("./modal").ModalState;
|
|
67
|
+
notifications: import("@open-tender/types").Notifications;
|
|
68
|
+
offlineAuths: import("./offlineAuths").OfflineAuthsState;
|
|
69
|
+
order: import("./order").OrderState;
|
|
70
|
+
pos: import("./pos").PosState;
|
|
71
|
+
punches: import("./punches").PunchesState;
|
|
72
|
+
refund: import("./refund").RefundState;
|
|
73
|
+
sendReceipt: import("./sendReceipt").SendReceiptState;
|
|
74
|
+
settings: import("./settings").SettingsState;
|
|
75
|
+
sidebar: import("./sidebar").SidebarState;
|
|
76
|
+
surcharges: import("./surcharges").SurchargesState;
|
|
77
|
+
taxes: import("./taxes").TaxesState;
|
|
78
|
+
}) => Store) & {
|
|
79
|
+
clearCache: () => void;
|
|
80
|
+
resultsCount: () => number;
|
|
81
|
+
resetResultsCount: () => void;
|
|
82
|
+
} & {
|
|
83
|
+
resultFunc: (resultFuncArgs_0: Store | null) => Store;
|
|
84
|
+
memoizedResultFunc: ((resultFuncArgs_0: Store | null) => Store) & {
|
|
85
|
+
clearCache: () => void;
|
|
86
|
+
resultsCount: () => number;
|
|
87
|
+
resetResultsCount: () => void;
|
|
88
|
+
};
|
|
89
|
+
lastResult: () => Store;
|
|
90
|
+
dependencies: [(state: AppState) => Store | null];
|
|
91
|
+
recomputations: () => number;
|
|
92
|
+
resetRecomputations: () => void;
|
|
93
|
+
dependencyRecomputations: () => number;
|
|
94
|
+
resetDependencyRecomputations: () => void;
|
|
95
|
+
} & {
|
|
96
|
+
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
97
|
+
memoize: typeof import("reselect").weakMapMemoize;
|
|
98
|
+
};
|
|
51
99
|
export declare const configReducer: import("redux").Reducer<ConfigState>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
import { __assign, __awaiter, __generator } from "tslib";
|
|
3
3
|
import { currentLocalDateStr, getUserTimezone } from '@open-tender/utils';
|
|
4
|
-
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
|
|
4
|
+
import { createSlice, createAsyncThunk, createSelector } from '@reduxjs/toolkit';
|
|
5
5
|
import { PosAPI } from '../services';
|
|
6
6
|
import { errorsApi } from '../services/errors';
|
|
7
7
|
import { setKdsItemTypes, setKdsPrepStations } from './kds';
|
|
@@ -158,7 +158,6 @@ export var selectConfig = function (state) { return state.config; };
|
|
|
158
158
|
export var selectApi = function (state) { return state.config.api; };
|
|
159
159
|
export var selectVersion = function (state) { return state.config.version; };
|
|
160
160
|
export var selectDevices = function (state) { return state.config.devices; };
|
|
161
|
-
export var selectStore = function (state) { return state.config.store; };
|
|
162
161
|
export var selectSelectOptions = function (state) {
|
|
163
162
|
return state.config.selectOptions || [];
|
|
164
163
|
};
|
|
@@ -175,4 +174,8 @@ export var selectLoyalty = function (state) {
|
|
|
175
174
|
};
|
|
176
175
|
export var selectPinpad = function (state) { return state.config.hasPinpad; };
|
|
177
176
|
export var selectCashDrawer = function (state) { return state.config.hasCashDrawer; };
|
|
177
|
+
export var selectStore = function (state) { return state.config.store; };
|
|
178
|
+
export var selectStoreSettings = createSelector(selectStore, function (store) {
|
|
179
|
+
return __assign({}, store);
|
|
180
|
+
});
|
|
178
181
|
export var configReducer = configSlice.reducer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.115",
|
|
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",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@emotion/react": "^11.11.1",
|
|
64
|
-
"@open-tender/types": "^0.4.
|
|
65
|
-
"@open-tender/ui": "^0.3.
|
|
64
|
+
"@open-tender/types": "^0.4.62",
|
|
65
|
+
"@open-tender/ui": "^0.3.84",
|
|
66
66
|
"@open-tender/utils": "^0.4.39",
|
|
67
67
|
"@reduxjs/toolkit": "^2.0.1",
|
|
68
68
|
"date-fns": "2.30.0",
|