@open-tender/store 0.5.22 → 0.5.23
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 -2
- package/dist/cjs/slices/kiosk.js +3 -3
- package/dist/cjs/types/api/kiosk.d.ts +4 -0
- package/dist/cjs/utils/order.d.ts +1 -1
- package/dist/esm/slices/kiosk.d.ts +2 -2
- package/dist/esm/slices/kiosk.js +3 -3
- package/dist/esm/types/api/kiosk.d.ts +4 -0
- package/dist/esm/utils/order.d.ts +1 -1
- package/package.json +1 -1
package/dist/.DS_Store
CHANGED
|
Binary file
|
|
@@ -11,7 +11,7 @@ export interface KioskState {
|
|
|
11
11
|
brand: KioskBrand | null;
|
|
12
12
|
content: KioskContent | null;
|
|
13
13
|
theme: ThemeCloud | null;
|
|
14
|
-
ratio:
|
|
14
|
+
ratio: number;
|
|
15
15
|
loading: RequestStatus;
|
|
16
16
|
error: RequestError | null;
|
|
17
17
|
retries: number;
|
|
@@ -33,6 +33,6 @@ export declare const selectKioskRcId: (state: AppState) => number | null;
|
|
|
33
33
|
export declare const selectKioskBrand: (state: AppState) => KioskBrand | null;
|
|
34
34
|
export declare const selectKioskContent: (state: AppState) => KioskContent | null;
|
|
35
35
|
export declare const selectKioskTheme: (state: AppState) => ThemeCloud | null;
|
|
36
|
-
export declare const selectKioskRatio: (state: AppState) =>
|
|
36
|
+
export declare const selectKioskRatio: (state: AppState) => number;
|
|
37
37
|
export declare const selectKioskContentSection: (page: string) => (state: AppState) => unknown;
|
|
38
38
|
export declare const kioskReducer: import("redux").Reducer<KioskState, import("redux").AnyAction>;
|
package/dist/cjs/slices/kiosk.js
CHANGED
|
@@ -38,7 +38,7 @@ exports.fetchKioskConfig = (0, toolkit_1.createAsyncThunk)(KioskActionType.Fetch
|
|
|
38
38
|
var apiUrl = _a.apiUrl;
|
|
39
39
|
var dispatch = _b.dispatch, rejectWithValue = _b.rejectWithValue;
|
|
40
40
|
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
|
|
41
|
-
var app, api, _c, kioskConfig, store, err, brand, content, theme,
|
|
41
|
+
var app, api, _c, kioskConfig, store, err, brand, content, theme, settings, ratio, revenueCenterId, themeEnhanced, themeDevice, err_1;
|
|
42
42
|
return tslib_1.__generator(this, function (_d) {
|
|
43
43
|
switch (_d.label) {
|
|
44
44
|
case 0:
|
|
@@ -56,9 +56,9 @@ exports.fetchKioskConfig = (0, toolkit_1.createAsyncThunk)(KioskActionType.Fetch
|
|
|
56
56
|
return [2 /*return*/, rejectWithValue(err)];
|
|
57
57
|
}
|
|
58
58
|
dispatch((0, config_1.setApi)(api));
|
|
59
|
-
brand = kioskConfig.brand, content = kioskConfig.content, theme = kioskConfig.theme;
|
|
59
|
+
brand = kioskConfig.brand, content = kioskConfig.content, theme = kioskConfig.theme, settings = kioskConfig.settings;
|
|
60
|
+
ratio = settings.ratio;
|
|
60
61
|
revenueCenterId = store.revenue_center_id;
|
|
61
|
-
ratio = 2;
|
|
62
62
|
themeEnhanced = enhanceTheme(theme);
|
|
63
63
|
themeDevice = (0, utils_1.decorateTheme)(themeEnhanced, ratio);
|
|
64
64
|
return [2 /*return*/, {
|
|
@@ -5,8 +5,12 @@ export interface Dimensions {
|
|
|
5
5
|
}
|
|
6
6
|
export declare type KioskBrand = Record<string, unknown>;
|
|
7
7
|
export declare type KioskContent = Record<string, unknown>;
|
|
8
|
+
export interface KioskSettings {
|
|
9
|
+
ratio: number;
|
|
10
|
+
}
|
|
8
11
|
export interface KioskConfig {
|
|
9
12
|
brand: KioskBrand;
|
|
10
13
|
content: KioskContent;
|
|
11
14
|
theme: ThemeCloud;
|
|
15
|
+
settings: KioskSettings;
|
|
12
16
|
}
|
|
@@ -73,7 +73,7 @@ export declare const calcPrices: (item: CartItem) => {
|
|
|
73
73
|
similarItems: number[];
|
|
74
74
|
};
|
|
75
75
|
export declare const calcNutrition: (item: CartItem) => NutritionalInfo | null;
|
|
76
|
-
export declare const makeCartItem: (item: MenuItem, isEdit?: boolean, soldOut?: SoldOut, simpleItem?: SimpleCartItem, hasPoints?: boolean) => {
|
|
76
|
+
export declare const makeCartItem: (item: MenuItem, isEdit?: boolean, soldOut?: SoldOut, simpleItem?: SimpleCartItem | null, hasPoints?: boolean) => {
|
|
77
77
|
groups: {
|
|
78
78
|
quantity: number;
|
|
79
79
|
options: {
|
|
@@ -11,7 +11,7 @@ export interface KioskState {
|
|
|
11
11
|
brand: KioskBrand | null;
|
|
12
12
|
content: KioskContent | null;
|
|
13
13
|
theme: ThemeCloud | null;
|
|
14
|
-
ratio:
|
|
14
|
+
ratio: number;
|
|
15
15
|
loading: RequestStatus;
|
|
16
16
|
error: RequestError | null;
|
|
17
17
|
retries: number;
|
|
@@ -33,6 +33,6 @@ export declare const selectKioskRcId: (state: AppState) => number | null;
|
|
|
33
33
|
export declare const selectKioskBrand: (state: AppState) => KioskBrand | null;
|
|
34
34
|
export declare const selectKioskContent: (state: AppState) => KioskContent | null;
|
|
35
35
|
export declare const selectKioskTheme: (state: AppState) => ThemeCloud | null;
|
|
36
|
-
export declare const selectKioskRatio: (state: AppState) =>
|
|
36
|
+
export declare const selectKioskRatio: (state: AppState) => number;
|
|
37
37
|
export declare const selectKioskContentSection: (page: string) => (state: AppState) => unknown;
|
|
38
38
|
export declare const kioskReducer: import("redux").Reducer<KioskState, import("redux").AnyAction>;
|
package/dist/esm/slices/kiosk.js
CHANGED
|
@@ -35,7 +35,7 @@ export var fetchKioskConfig = createAsyncThunk(KioskActionType.FetchKiosk, funct
|
|
|
35
35
|
var apiUrl = _a.apiUrl;
|
|
36
36
|
var dispatch = _b.dispatch, rejectWithValue = _b.rejectWithValue;
|
|
37
37
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
38
|
-
var app, api, _c, kioskConfig, store, err, brand, content, theme,
|
|
38
|
+
var app, api, _c, kioskConfig, store, err, brand, content, theme, settings, ratio, revenueCenterId, themeEnhanced, themeDevice, err_1;
|
|
39
39
|
return __generator(this, function (_d) {
|
|
40
40
|
switch (_d.label) {
|
|
41
41
|
case 0:
|
|
@@ -53,9 +53,9 @@ export var fetchKioskConfig = createAsyncThunk(KioskActionType.FetchKiosk, funct
|
|
|
53
53
|
return [2 /*return*/, rejectWithValue(err)];
|
|
54
54
|
}
|
|
55
55
|
dispatch(setApi(api));
|
|
56
|
-
brand = kioskConfig.brand, content = kioskConfig.content, theme = kioskConfig.theme;
|
|
56
|
+
brand = kioskConfig.brand, content = kioskConfig.content, theme = kioskConfig.theme, settings = kioskConfig.settings;
|
|
57
|
+
ratio = settings.ratio;
|
|
57
58
|
revenueCenterId = store.revenue_center_id;
|
|
58
|
-
ratio = 2;
|
|
59
59
|
themeEnhanced = enhanceTheme(theme);
|
|
60
60
|
themeDevice = decorateTheme(themeEnhanced, ratio);
|
|
61
61
|
return [2 /*return*/, {
|
|
@@ -5,8 +5,12 @@ export interface Dimensions {
|
|
|
5
5
|
}
|
|
6
6
|
export declare type KioskBrand = Record<string, unknown>;
|
|
7
7
|
export declare type KioskContent = Record<string, unknown>;
|
|
8
|
+
export interface KioskSettings {
|
|
9
|
+
ratio: number;
|
|
10
|
+
}
|
|
8
11
|
export interface KioskConfig {
|
|
9
12
|
brand: KioskBrand;
|
|
10
13
|
content: KioskContent;
|
|
11
14
|
theme: ThemeCloud;
|
|
15
|
+
settings: KioskSettings;
|
|
12
16
|
}
|
|
@@ -73,7 +73,7 @@ export declare const calcPrices: (item: CartItem) => {
|
|
|
73
73
|
similarItems: number[];
|
|
74
74
|
};
|
|
75
75
|
export declare const calcNutrition: (item: CartItem) => NutritionalInfo | null;
|
|
76
|
-
export declare const makeCartItem: (item: MenuItem, isEdit?: boolean, soldOut?: SoldOut, simpleItem?: SimpleCartItem, hasPoints?: boolean) => {
|
|
76
|
+
export declare const makeCartItem: (item: MenuItem, isEdit?: boolean, soldOut?: SoldOut, simpleItem?: SimpleCartItem | null, hasPoints?: boolean) => {
|
|
77
77
|
groups: {
|
|
78
78
|
quantity: number;
|
|
79
79
|
options: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.23",
|
|
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",
|