@open-tender/store 0.5.23 → 0.5.25
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/.DS_Store +0 -0
- package/dist/cjs/slices/kiosk.d.ts +2 -0
- package/dist/cjs/slices/kiosk.js +12 -4
- package/dist/cjs/types/api/kiosk.d.ts +1 -0
- package/dist/esm/slices/kiosk.d.ts +2 -0
- package/dist/esm/slices/kiosk.js +10 -3
- package/dist/esm/types/api/kiosk.d.ts +1 -0
- package/package.json +1 -1
package/dist/.DS_Store
CHANGED
|
Binary file
|
|
@@ -12,6 +12,7 @@ export interface KioskState {
|
|
|
12
12
|
content: KioskContent | null;
|
|
13
13
|
theme: ThemeCloud | null;
|
|
14
14
|
ratio: number;
|
|
15
|
+
displaySettings: any;
|
|
15
16
|
loading: RequestStatus;
|
|
16
17
|
error: RequestError | null;
|
|
17
18
|
retries: number;
|
|
@@ -34,5 +35,6 @@ export declare const selectKioskBrand: (state: AppState) => KioskBrand | null;
|
|
|
34
35
|
export declare const selectKioskContent: (state: AppState) => KioskContent | null;
|
|
35
36
|
export declare const selectKioskTheme: (state: AppState) => ThemeCloud | null;
|
|
36
37
|
export declare const selectKioskRatio: (state: AppState) => number;
|
|
38
|
+
export declare const selectKioskDisplay: (state: AppState) => any;
|
|
37
39
|
export declare const selectKioskContentSection: (page: string) => (state: AppState) => unknown;
|
|
38
40
|
export declare const kioskReducer: import("redux").Reducer<KioskState, import("redux").AnyAction>;
|
package/dist/cjs/slices/kiosk.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var _a;
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.kioskReducer = exports.selectKioskContentSection = exports.selectKioskRatio = exports.selectKioskTheme = exports.selectKioskContent = exports.selectKioskBrand = exports.selectKioskRcId = exports.selectKioskStore = exports.selectKioskVersion = exports.selectKiosk = exports.setKioskRatio = exports.setKioskVersion = exports.incrementKioskRetries = exports.resetKioskRetries = exports.resetKiosk = exports.fetchKioskConfig = exports.KioskActionType = void 0;
|
|
4
|
+
exports.kioskReducer = exports.selectKioskContentSection = exports.selectKioskDisplay = exports.selectKioskRatio = exports.selectKioskTheme = exports.selectKioskContent = exports.selectKioskBrand = exports.selectKioskRcId = exports.selectKioskStore = exports.selectKioskVersion = exports.selectKiosk = exports.setKioskRatio = exports.setKioskVersion = exports.incrementKioskRetries = exports.resetKioskRetries = exports.resetKiosk = exports.fetchKioskConfig = exports.KioskActionType = void 0;
|
|
5
5
|
var tslib_1 = require("tslib");
|
|
6
6
|
var toolkit_1 = require("@reduxjs/toolkit");
|
|
7
7
|
var services_1 = require("../services");
|
|
@@ -18,6 +18,7 @@ var initialState = {
|
|
|
18
18
|
content: null,
|
|
19
19
|
theme: null,
|
|
20
20
|
ratio: 2,
|
|
21
|
+
displaySettings: null,
|
|
21
22
|
loading: 'idle',
|
|
22
23
|
error: null,
|
|
23
24
|
retries: 0
|
|
@@ -38,7 +39,7 @@ exports.fetchKioskConfig = (0, toolkit_1.createAsyncThunk)(KioskActionType.Fetch
|
|
|
38
39
|
var apiUrl = _a.apiUrl;
|
|
39
40
|
var dispatch = _b.dispatch, rejectWithValue = _b.rejectWithValue;
|
|
40
41
|
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
var app, api, _c, kioskConfig, store, err, brand, content, theme, settings, ratio, revenueCenterId, themeEnhanced, themeDevice, err_1;
|
|
42
|
+
var app, api, _c, kioskConfig, store, err, brand, content, theme, settings, ratio, displaySettings, revenueCenterId, themeEnhanced, themeDevice, err_1;
|
|
42
43
|
return tslib_1.__generator(this, function (_d) {
|
|
43
44
|
switch (_d.label) {
|
|
44
45
|
case 0:
|
|
@@ -57,7 +58,7 @@ exports.fetchKioskConfig = (0, toolkit_1.createAsyncThunk)(KioskActionType.Fetch
|
|
|
57
58
|
}
|
|
58
59
|
dispatch((0, config_1.setApi)(api));
|
|
59
60
|
brand = kioskConfig.brand, content = kioskConfig.content, theme = kioskConfig.theme, settings = kioskConfig.settings;
|
|
60
|
-
ratio = settings.ratio;
|
|
61
|
+
ratio = settings.ratio, displaySettings = settings.displaySettings;
|
|
61
62
|
revenueCenterId = store.revenue_center_id;
|
|
62
63
|
themeEnhanced = enhanceTheme(theme);
|
|
63
64
|
themeDevice = (0, utils_1.decorateTheme)(themeEnhanced, ratio);
|
|
@@ -69,6 +70,7 @@ exports.fetchKioskConfig = (0, toolkit_1.createAsyncThunk)(KioskActionType.Fetch
|
|
|
69
70
|
content: content,
|
|
70
71
|
theme: themeDevice,
|
|
71
72
|
ratio: ratio,
|
|
73
|
+
displaySettings: displaySettings,
|
|
72
74
|
error: null,
|
|
73
75
|
loading: 'idle',
|
|
74
76
|
retries: 0
|
|
@@ -102,13 +104,15 @@ var kioskSlice = (0, toolkit_1.createSlice)({
|
|
|
102
104
|
extraReducers: function (builder) {
|
|
103
105
|
builder
|
|
104
106
|
.addCase(exports.fetchKioskConfig.fulfilled, function (state, action) {
|
|
105
|
-
var _a = action.payload, app = _a.app, store = _a.store, revenueCenterId = _a.revenueCenterId, brand = _a.brand, content = _a.content, theme = _a.theme;
|
|
107
|
+
var _a = action.payload, app = _a.app, store = _a.store, revenueCenterId = _a.revenueCenterId, brand = _a.brand, content = _a.content, theme = _a.theme, ratio = _a.ratio, displaySettings = _a.displaySettings;
|
|
106
108
|
state.app = app;
|
|
107
109
|
state.store = store;
|
|
108
110
|
state.revenueCenterId = revenueCenterId;
|
|
109
111
|
state.brand = brand;
|
|
110
112
|
state.content = content;
|
|
111
113
|
state.theme = theme;
|
|
114
|
+
state.ratio = ratio;
|
|
115
|
+
state.displaySettings = displaySettings;
|
|
112
116
|
state.loading = 'idle';
|
|
113
117
|
state.retries = 0;
|
|
114
118
|
state.error = null;
|
|
@@ -139,6 +143,10 @@ var selectKioskTheme = function (state) { return state.kiosk.theme; };
|
|
|
139
143
|
exports.selectKioskTheme = selectKioskTheme;
|
|
140
144
|
var selectKioskRatio = function (state) { return state.kiosk.ratio; };
|
|
141
145
|
exports.selectKioskRatio = selectKioskRatio;
|
|
146
|
+
var selectKioskDisplay = function (state) {
|
|
147
|
+
return state.kiosk.displaySettings;
|
|
148
|
+
};
|
|
149
|
+
exports.selectKioskDisplay = selectKioskDisplay;
|
|
142
150
|
var selectKioskContentSection = function (page) { return function (state) {
|
|
143
151
|
var _a;
|
|
144
152
|
return (_a = state.kiosk.content) === null || _a === void 0 ? void 0 : _a[page];
|
|
@@ -12,6 +12,7 @@ export interface KioskState {
|
|
|
12
12
|
content: KioskContent | null;
|
|
13
13
|
theme: ThemeCloud | null;
|
|
14
14
|
ratio: number;
|
|
15
|
+
displaySettings: any;
|
|
15
16
|
loading: RequestStatus;
|
|
16
17
|
error: RequestError | null;
|
|
17
18
|
retries: number;
|
|
@@ -34,5 +35,6 @@ export declare const selectKioskBrand: (state: AppState) => KioskBrand | null;
|
|
|
34
35
|
export declare const selectKioskContent: (state: AppState) => KioskContent | null;
|
|
35
36
|
export declare const selectKioskTheme: (state: AppState) => ThemeCloud | null;
|
|
36
37
|
export declare const selectKioskRatio: (state: AppState) => number;
|
|
38
|
+
export declare const selectKioskDisplay: (state: AppState) => any;
|
|
37
39
|
export declare const selectKioskContentSection: (page: string) => (state: AppState) => unknown;
|
|
38
40
|
export declare const kioskReducer: import("redux").Reducer<KioskState, import("redux").AnyAction>;
|
package/dist/esm/slices/kiosk.js
CHANGED
|
@@ -15,6 +15,7 @@ var initialState = {
|
|
|
15
15
|
content: null,
|
|
16
16
|
theme: null,
|
|
17
17
|
ratio: 2,
|
|
18
|
+
displaySettings: null,
|
|
18
19
|
loading: 'idle',
|
|
19
20
|
error: null,
|
|
20
21
|
retries: 0
|
|
@@ -35,7 +36,7 @@ export var fetchKioskConfig = createAsyncThunk(KioskActionType.FetchKiosk, funct
|
|
|
35
36
|
var apiUrl = _a.apiUrl;
|
|
36
37
|
var dispatch = _b.dispatch, rejectWithValue = _b.rejectWithValue;
|
|
37
38
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
38
|
-
var app, api, _c, kioskConfig, store, err, brand, content, theme, settings, ratio, revenueCenterId, themeEnhanced, themeDevice, err_1;
|
|
39
|
+
var app, api, _c, kioskConfig, store, err, brand, content, theme, settings, ratio, displaySettings, revenueCenterId, themeEnhanced, themeDevice, err_1;
|
|
39
40
|
return __generator(this, function (_d) {
|
|
40
41
|
switch (_d.label) {
|
|
41
42
|
case 0:
|
|
@@ -54,7 +55,7 @@ export var fetchKioskConfig = createAsyncThunk(KioskActionType.FetchKiosk, funct
|
|
|
54
55
|
}
|
|
55
56
|
dispatch(setApi(api));
|
|
56
57
|
brand = kioskConfig.brand, content = kioskConfig.content, theme = kioskConfig.theme, settings = kioskConfig.settings;
|
|
57
|
-
ratio = settings.ratio;
|
|
58
|
+
ratio = settings.ratio, displaySettings = settings.displaySettings;
|
|
58
59
|
revenueCenterId = store.revenue_center_id;
|
|
59
60
|
themeEnhanced = enhanceTheme(theme);
|
|
60
61
|
themeDevice = decorateTheme(themeEnhanced, ratio);
|
|
@@ -66,6 +67,7 @@ export var fetchKioskConfig = createAsyncThunk(KioskActionType.FetchKiosk, funct
|
|
|
66
67
|
content: content,
|
|
67
68
|
theme: themeDevice,
|
|
68
69
|
ratio: ratio,
|
|
70
|
+
displaySettings: displaySettings,
|
|
69
71
|
error: null,
|
|
70
72
|
loading: 'idle',
|
|
71
73
|
retries: 0
|
|
@@ -99,13 +101,15 @@ var kioskSlice = createSlice({
|
|
|
99
101
|
extraReducers: function (builder) {
|
|
100
102
|
builder
|
|
101
103
|
.addCase(fetchKioskConfig.fulfilled, function (state, action) {
|
|
102
|
-
var _a = action.payload, app = _a.app, store = _a.store, revenueCenterId = _a.revenueCenterId, brand = _a.brand, content = _a.content, theme = _a.theme;
|
|
104
|
+
var _a = action.payload, app = _a.app, store = _a.store, revenueCenterId = _a.revenueCenterId, brand = _a.brand, content = _a.content, theme = _a.theme, ratio = _a.ratio, displaySettings = _a.displaySettings;
|
|
103
105
|
state.app = app;
|
|
104
106
|
state.store = store;
|
|
105
107
|
state.revenueCenterId = revenueCenterId;
|
|
106
108
|
state.brand = brand;
|
|
107
109
|
state.content = content;
|
|
108
110
|
state.theme = theme;
|
|
111
|
+
state.ratio = ratio;
|
|
112
|
+
state.displaySettings = displaySettings;
|
|
109
113
|
state.loading = 'idle';
|
|
110
114
|
state.retries = 0;
|
|
111
115
|
state.error = null;
|
|
@@ -128,6 +132,9 @@ export var selectKioskBrand = function (state) { return state.kiosk.brand; };
|
|
|
128
132
|
export var selectKioskContent = function (state) { return state.kiosk.content; };
|
|
129
133
|
export var selectKioskTheme = function (state) { return state.kiosk.theme; };
|
|
130
134
|
export var selectKioskRatio = function (state) { return state.kiosk.ratio; };
|
|
135
|
+
export var selectKioskDisplay = function (state) {
|
|
136
|
+
return state.kiosk.displaySettings;
|
|
137
|
+
};
|
|
131
138
|
export var selectKioskContentSection = function (page) { return function (state) {
|
|
132
139
|
var _a;
|
|
133
140
|
return (_a = state.kiosk.content) === null || _a === void 0 ? void 0 : _a[page];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.25",
|
|
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",
|