@open-tender/store 1.1.145 → 1.1.147
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/components/CategoryItem.js +4 -2
- package/dist/cjs/components/CategoryNav.js +4 -2
- package/dist/cjs/components/CategoryNavItem.js +2 -0
- package/dist/cjs/components/IdleModal.js +1 -1
- package/dist/cjs/slices/idle.js +1 -1
- package/dist/esm/components/CategoryItem.js +4 -2
- package/dist/esm/components/CategoryNav.js +4 -2
- package/dist/esm/components/CategoryNavItem.js +2 -0
- package/dist/esm/components/IdleModal.js +1 -1
- package/dist/esm/slices/idle.js +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ var CategoryItem = function (_a) {
|
|
|
8
8
|
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, placeholder = _a.placeholder, navigate = _a.navigate, children = _a.children;
|
|
9
9
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
10
10
|
var apiUrl = (0, hooks_1.useAppSelector)(slices_1.selectKioskApi);
|
|
11
|
-
var
|
|
11
|
+
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).categoryItem;
|
|
12
12
|
var display_cals = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings).display_cals;
|
|
13
13
|
var soldOut = (0, hooks_1.useAppSelector)(slices_1.selectMenu).soldOut;
|
|
14
14
|
var cartCounts = (0, hooks_1.useAppSelector)(slices_1.selectCartCounts);
|
|
@@ -24,9 +24,11 @@ var CategoryItem = function (_a) {
|
|
|
24
24
|
navigate('/menu/item');
|
|
25
25
|
};
|
|
26
26
|
var handlers = { browse: browse };
|
|
27
|
+
if (!config)
|
|
28
|
+
return null;
|
|
27
29
|
return children({
|
|
28
30
|
item: cartItem,
|
|
29
|
-
config:
|
|
31
|
+
config: config,
|
|
30
32
|
handlers: handlers,
|
|
31
33
|
apiUrl: apiUrl,
|
|
32
34
|
placeholder: placeholder,
|
|
@@ -10,14 +10,16 @@ var CategoryNav = function (_a) {
|
|
|
10
10
|
var children = _a.children, navigate = _a.navigate, CategoryNavOtherView = _a.CategoryNavOtherView, CategoryNavItemView = _a.CategoryNavItemView;
|
|
11
11
|
var _b = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings), display_featured = _b.display_featured, display_favorites = _b.display_favorites, display_recents = _b.display_recents;
|
|
12
12
|
var customer = ((0, hooks_1.useAppSelector)(slices_1.selectCustomerIdentified) || {}).customer;
|
|
13
|
-
var
|
|
13
|
+
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).categoryNav;
|
|
14
14
|
var _c = (0, hooks_1.useAppSelector)(slices_1.selectMenu), categories = _c.categories, featured = _c.featured, rest = tslib_1.__rest(_c, ["categories", "featured"]);
|
|
15
15
|
var favorites = customer && display_favorites ? rest.favorites : [];
|
|
16
16
|
var recents = customer && display_recents ? rest.recents : [];
|
|
17
17
|
var renderCategoryNavOther = (0, react_1.useCallback)(function (title, path) { return (react_1.default.createElement(CategoryNavOther_1.default, { navigate: navigate, title: title, path: path, children: CategoryNavOtherView })); }, [navigate, CategoryNavOtherView]);
|
|
18
18
|
var renderCategoryNavItem = (0, react_1.useCallback)(function (item) { return (react_1.default.createElement(CategoryNavItem_1.default, { key: item.id, navigate: navigate, category: item, children: CategoryNavItemView })); }, [navigate, CategoryNavItemView]);
|
|
19
|
+
if (!config)
|
|
20
|
+
return null;
|
|
19
21
|
return children({
|
|
20
|
-
config:
|
|
22
|
+
config: config,
|
|
21
23
|
categories: categories,
|
|
22
24
|
featured: display_featured ? featured : [],
|
|
23
25
|
favorites: favorites,
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var react_1 = require("react");
|
|
4
4
|
var hooks_1 = require("../app/hooks");
|
|
5
5
|
var slices_1 = require("../slices");
|
|
6
|
-
var WAITING_TIME_IN_SECONDS =
|
|
6
|
+
var WAITING_TIME_IN_SECONDS = 5;
|
|
7
7
|
var IdleModal = function (_a) {
|
|
8
8
|
var close = _a.close, navigate = _a.navigate, children = _a.children;
|
|
9
9
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
package/dist/cjs/slices/idle.js
CHANGED
|
@@ -19,7 +19,7 @@ var idleSlice = (0, toolkit_1.createSlice)({
|
|
|
19
19
|
state.timerId = action.payload;
|
|
20
20
|
},
|
|
21
21
|
setHasOrder: function (state, action) {
|
|
22
|
-
state.
|
|
22
|
+
state.hasOrder = action.payload;
|
|
23
23
|
},
|
|
24
24
|
setIsIdle: function (state, action) {
|
|
25
25
|
state.isIdle = action.payload;
|
|
@@ -6,7 +6,7 @@ var CategoryItem = function (_a) {
|
|
|
6
6
|
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, placeholder = _a.placeholder, navigate = _a.navigate, children = _a.children;
|
|
7
7
|
var dispatch = useAppDispatch();
|
|
8
8
|
var apiUrl = useAppSelector(selectKioskApi);
|
|
9
|
-
var
|
|
9
|
+
var config = useAppSelector(selectKioskConfig).categoryItem;
|
|
10
10
|
var display_cals = useAppSelector(selectStoreSettings).display_cals;
|
|
11
11
|
var soldOut = useAppSelector(selectMenu).soldOut;
|
|
12
12
|
var cartCounts = useAppSelector(selectCartCounts);
|
|
@@ -22,9 +22,11 @@ var CategoryItem = function (_a) {
|
|
|
22
22
|
navigate('/menu/item');
|
|
23
23
|
};
|
|
24
24
|
var handlers = { browse: browse };
|
|
25
|
+
if (!config)
|
|
26
|
+
return null;
|
|
25
27
|
return children({
|
|
26
28
|
item: cartItem,
|
|
27
|
-
config:
|
|
29
|
+
config: config,
|
|
28
30
|
handlers: handlers,
|
|
29
31
|
apiUrl: apiUrl,
|
|
30
32
|
placeholder: placeholder,
|
|
@@ -8,14 +8,16 @@ var CategoryNav = function (_a) {
|
|
|
8
8
|
var children = _a.children, navigate = _a.navigate, CategoryNavOtherView = _a.CategoryNavOtherView, CategoryNavItemView = _a.CategoryNavItemView;
|
|
9
9
|
var _b = useAppSelector(selectStoreSettings), display_featured = _b.display_featured, display_favorites = _b.display_favorites, display_recents = _b.display_recents;
|
|
10
10
|
var customer = (useAppSelector(selectCustomerIdentified) || {}).customer;
|
|
11
|
-
var
|
|
11
|
+
var config = useAppSelector(selectKioskConfig).categoryNav;
|
|
12
12
|
var _c = useAppSelector(selectMenu), categories = _c.categories, featured = _c.featured, rest = __rest(_c, ["categories", "featured"]);
|
|
13
13
|
var favorites = customer && display_favorites ? rest.favorites : [];
|
|
14
14
|
var recents = customer && display_recents ? rest.recents : [];
|
|
15
15
|
var renderCategoryNavOther = useCallback(function (title, path) { return (React.createElement(CategoryNavOtherContainer, { navigate: navigate, title: title, path: path, children: CategoryNavOtherView })); }, [navigate, CategoryNavOtherView]);
|
|
16
16
|
var renderCategoryNavItem = useCallback(function (item) { return (React.createElement(CategoryNavItemContainer, { key: item.id, navigate: navigate, category: item, children: CategoryNavItemView })); }, [navigate, CategoryNavItemView]);
|
|
17
|
+
if (!config)
|
|
18
|
+
return null;
|
|
17
19
|
return children({
|
|
18
|
-
config:
|
|
20
|
+
config: config,
|
|
19
21
|
categories: categories,
|
|
20
22
|
featured: display_featured ? featured : [],
|
|
21
23
|
favorites: favorites,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useEffect, useMemo } from 'react';
|
|
2
2
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
3
3
|
import { resetCart, resetCustomer, resetCustomerIdentify, resetIdleState, resetMenu, resetPosCheckout, selectKioskConfig, setOrderId } from '../slices';
|
|
4
|
-
var WAITING_TIME_IN_SECONDS =
|
|
4
|
+
var WAITING_TIME_IN_SECONDS = 5;
|
|
5
5
|
var IdleModal = function (_a) {
|
|
6
6
|
var close = _a.close, navigate = _a.navigate, children = _a.children;
|
|
7
7
|
var dispatch = useAppDispatch();
|
package/dist/esm/slices/idle.js
CHANGED
|
@@ -16,7 +16,7 @@ var idleSlice = createSlice({
|
|
|
16
16
|
state.timerId = action.payload;
|
|
17
17
|
},
|
|
18
18
|
setHasOrder: function (state, action) {
|
|
19
|
-
state.
|
|
19
|
+
state.hasOrder = action.payload;
|
|
20
20
|
},
|
|
21
21
|
setIsIdle: function (state, action) {
|
|
22
22
|
state.isIdle = action.payload;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.147",
|
|
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",
|