@open-tender/store 1.1.140 → 1.1.142
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/Allergen.js +2 -0
- package/dist/cjs/components/Applied.js +2 -0
- package/dist/cjs/components/ButtonLink.js +2 -0
- package/dist/cjs/components/Card.js +2 -0
- package/dist/cjs/components/CategoryNavOther.js +2 -0
- package/dist/cjs/components/CheckTotals.js +2 -0
- package/dist/cjs/components/CheckoutCart.js +2 -0
- package/dist/cjs/components/CheckoutTotals.js +2 -0
- package/dist/cjs/components/ErrorMessage.js +2 -0
- package/dist/cjs/components/Ingredients.js +2 -0
- package/dist/cjs/components/Label.js +2 -0
- package/dist/cjs/components/Main.js +2 -0
- package/dist/cjs/components/MenuCategory.js +2 -0
- package/dist/cjs/components/ModalHeader.js +2 -0
- package/dist/cjs/components/Rewards.js +2 -0
- package/dist/cjs/components/SignIn.js +2 -0
- package/dist/cjs/components/SuccessMessage.js +2 -0
- package/dist/cjs/components/Tag.js +2 -0
- package/dist/cjs/middlewares/idleMiddleware.js +3 -2
- package/dist/esm/components/Allergen.js +2 -0
- package/dist/esm/components/Applied.js +2 -0
- package/dist/esm/components/ButtonLink.js +2 -0
- package/dist/esm/components/Card.js +2 -0
- package/dist/esm/components/CategoryNavOther.js +2 -0
- package/dist/esm/components/CheckTotals.js +2 -0
- package/dist/esm/components/CheckoutCart.js +2 -0
- package/dist/esm/components/CheckoutTotals.js +2 -0
- package/dist/esm/components/ErrorMessage.js +2 -0
- package/dist/esm/components/Ingredients.js +2 -0
- package/dist/esm/components/Label.js +2 -0
- package/dist/esm/components/Main.js +2 -0
- package/dist/esm/components/MenuCategory.js +2 -0
- package/dist/esm/components/ModalHeader.js +2 -0
- package/dist/esm/components/Rewards.js +2 -0
- package/dist/esm/components/SignIn.js +2 -0
- package/dist/esm/components/SuccessMessage.js +2 -0
- package/dist/esm/components/Tag.js +2 -0
- package/dist/esm/middlewares/idleMiddleware.js +3 -2
- package/package.json +1 -1
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var Allergen = function (_a) {
|
|
6
6
|
var allergen = _a.allergen, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).allergen;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, allergen: allergen });
|
|
9
11
|
};
|
|
10
12
|
exports.default = Allergen;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var Applied = function (_a) {
|
|
6
6
|
var children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).applied;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config });
|
|
9
11
|
};
|
|
10
12
|
exports.default = Applied;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var ButtonLink = function (_a) {
|
|
6
6
|
var onClick = _a.onClick, label = _a.label, children = _a.children, style = _a.style;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).buttonLink;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, style: style, children: label, onClick: onClick });
|
|
9
11
|
};
|
|
10
12
|
exports.default = ButtonLink;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var Card = function (_a) {
|
|
6
6
|
var children = _a.children, content = _a.content;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).card;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, children: content });
|
|
9
11
|
};
|
|
10
12
|
exports.default = Card;
|
|
@@ -15,6 +15,8 @@ var CategoryNavOther = function (_a) {
|
|
|
15
15
|
navigate(path);
|
|
16
16
|
};
|
|
17
17
|
var handlers = { browse: browse };
|
|
18
|
+
if (!config)
|
|
19
|
+
return null;
|
|
18
20
|
return children({ config: config, handlers: handlers, title: title, imageUrl: null, apiUrl: apiUrl });
|
|
19
21
|
};
|
|
20
22
|
exports.default = CategoryNavOther;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var CheckTotals = function (_a) {
|
|
6
6
|
var check = _a.check, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).checkTotals;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, check: check });
|
|
9
11
|
};
|
|
10
12
|
exports.default = CheckTotals;
|
|
@@ -9,6 +9,8 @@ var CheckoutCart = function (_a) {
|
|
|
9
9
|
var cart = _a.cart, navigate = _a.navigate, children = _a.children, QuantityView = _a.QuantityView, CartItemView = _a.CartItemView;
|
|
10
10
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).checkoutCart;
|
|
11
11
|
var renderCartItem = (0, react_1.useCallback)(function (item, index) { return (react_1.default.createElement(CartItem_1.default, { QuantityView: QuantityView, navigate: navigate, children: CartItemView, key: "".concat(item.id, "-").concat(index), item: item, isLast: index + 1 === cart.length, isEditable: false })); }, [QuantityView, navigate, CartItemView, cart.length]);
|
|
12
|
+
if (!config)
|
|
13
|
+
return null;
|
|
12
14
|
return children({ config: config, cart: cart, renderCartItem: renderCartItem });
|
|
13
15
|
};
|
|
14
16
|
exports.default = CheckoutCart;
|
|
@@ -11,6 +11,8 @@ var CheckoutTotalsContainer = function (_a) {
|
|
|
11
11
|
var renderCheckTotals = (0, react_1.useCallback)(function () {
|
|
12
12
|
return react_1.default.createElement(CheckTotals_1.default, { children: CheckTotalsView, check: check });
|
|
13
13
|
}, [check, CheckTotalsView]);
|
|
14
|
+
if (!config)
|
|
15
|
+
return null;
|
|
14
16
|
return children({ config: config, renderCheckTotals: renderCheckTotals });
|
|
15
17
|
};
|
|
16
18
|
exports.default = CheckoutTotalsContainer;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var ErrorMessage = function (_a) {
|
|
6
6
|
var content = _a.content, icon = _a.icon, style = _a.style, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).errorMessage;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, icon: icon, style: style, children: content });
|
|
9
11
|
};
|
|
10
12
|
exports.default = ErrorMessage;
|
|
@@ -6,6 +6,8 @@ var Ingredients = function (_a) {
|
|
|
6
6
|
var title = _a.title, subtitle = _a.subtitle, ingredients = _a.ingredients, close = _a.close, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).ingredients;
|
|
8
8
|
var handlers = { close: close };
|
|
9
|
+
if (!config)
|
|
10
|
+
return null;
|
|
9
11
|
return children({ config: config, handlers: handlers, title: title, subtitle: subtitle, ingredients: ingredients });
|
|
10
12
|
};
|
|
11
13
|
exports.default = Ingredients;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var Label = function (_a) {
|
|
6
6
|
var content = _a.content, label = _a.label, isRequired = _a.isRequired, style = _a.style, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).label;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, label: label, isRequired: isRequired, style: style, children: content });
|
|
9
11
|
};
|
|
10
12
|
exports.default = Label;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var Main = function (_a) {
|
|
6
6
|
var children = _a.children, content = _a.content;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).main;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, content: content });
|
|
9
11
|
};
|
|
10
12
|
exports.default = Main;
|
|
@@ -13,6 +13,8 @@ var MenuCategory = function (_a) {
|
|
|
13
13
|
navigate('/menu/category');
|
|
14
14
|
};
|
|
15
15
|
var handlers = { browse: browse };
|
|
16
|
+
if (!config)
|
|
17
|
+
return null;
|
|
16
18
|
return children({ config: config, handlers: handlers, category: category, imageUrl: imageUrl });
|
|
17
19
|
};
|
|
18
20
|
exports.default = MenuCategory;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var ModalHeader = function (_a) {
|
|
6
6
|
var title = _a.title, subtitle = _a.subtitle, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).modalHeader;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, title: title, subtitle: subtitle });
|
|
9
11
|
};
|
|
10
12
|
exports.default = ModalHeader;
|
|
@@ -9,6 +9,8 @@ var Rewards = function (_a) {
|
|
|
9
9
|
var title = _a.title, subtitle = _a.subtitle, rewards = _a.rewards, children = _a.children, RewardView = _a.RewardView, AppliedView = _a.AppliedView;
|
|
10
10
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).rewards;
|
|
11
11
|
var renderReward = (0, react_1.useCallback)(function (reward, isLast) { return (react_1.default.createElement(Reward_1.default, { reward: reward, isLast: isLast, children: RewardView, AppliedView: AppliedView })); }, [RewardView, AppliedView]);
|
|
12
|
+
if (!config)
|
|
13
|
+
return null;
|
|
12
14
|
return children({ config: config, title: title, subtitle: subtitle, rewards: rewards, renderReward: renderReward });
|
|
13
15
|
};
|
|
14
16
|
exports.default = Rewards;
|
|
@@ -32,6 +32,8 @@ var SignIn = function (_a) {
|
|
|
32
32
|
dispatch((0, slices_1.fetchCustomer)({ customerId: customerId, endpoints: endpoints }));
|
|
33
33
|
}
|
|
34
34
|
}, [dispatch, customerId]);
|
|
35
|
+
if (!config)
|
|
36
|
+
return null;
|
|
35
37
|
return children({ config: config, handlers: handlers, msg: msg, buttonLinkConfig: buttonLinkConfig });
|
|
36
38
|
};
|
|
37
39
|
exports.default = SignIn;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var SuccessMessage = function (_a) {
|
|
6
6
|
var content = _a.content, icon = _a.icon, style = _a.style, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).successMessage;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, icon: icon, style: style, children: content });
|
|
9
11
|
};
|
|
10
12
|
exports.default = SuccessMessage;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var Tag = function (_a) {
|
|
6
6
|
var tag = _a.tag, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).tag;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, tag: tag });
|
|
9
11
|
};
|
|
10
12
|
exports.default = Tag;
|
|
@@ -15,10 +15,11 @@ var idleMiddleware = function (store) { return function (next) { return function
|
|
|
15
15
|
store.dispatch((0, slices_1.setIsIdle)(false));
|
|
16
16
|
var prevTimerId = state.idle.timerId;
|
|
17
17
|
clearTimeout(prevTimerId);
|
|
18
|
-
var pageTimeout = (_b = (_a = state.kiosk.store) === null || _a === void 0 ? void 0 : _a.page_timeout) !== null && _b !== void 0 ? _b :
|
|
18
|
+
var pageTimeout = (_b = (_a = state.kiosk.store) === null || _a === void 0 ? void 0 : _a.page_timeout) !== null && _b !== void 0 ? _b : 0;
|
|
19
|
+
var timeout = pageTimeout > 0 ? pageTimeout : DEFAULT_PAGE_TIMEOUT * 1000;
|
|
19
20
|
var timerId = setTimeout(function () {
|
|
20
21
|
store.dispatch((0, slices_1.setIsIdle)(true));
|
|
21
|
-
},
|
|
22
|
+
}, timeout);
|
|
22
23
|
store.dispatch((0, slices_1.setIdleTimerId)(timerId));
|
|
23
24
|
return result;
|
|
24
25
|
}; }; };
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var Allergen = function (_a) {
|
|
4
4
|
var allergen = _a.allergen, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).allergen;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, allergen: allergen });
|
|
7
9
|
};
|
|
8
10
|
export default Allergen;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var ButtonLink = function (_a) {
|
|
4
4
|
var onClick = _a.onClick, label = _a.label, children = _a.children, style = _a.style;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).buttonLink;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, style: style, children: label, onClick: onClick });
|
|
7
9
|
};
|
|
8
10
|
export default ButtonLink;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var Card = function (_a) {
|
|
4
4
|
var children = _a.children, content = _a.content;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).card;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, children: content });
|
|
7
9
|
};
|
|
8
10
|
export default Card;
|
|
@@ -13,6 +13,8 @@ var CategoryNavOther = function (_a) {
|
|
|
13
13
|
navigate(path);
|
|
14
14
|
};
|
|
15
15
|
var handlers = { browse: browse };
|
|
16
|
+
if (!config)
|
|
17
|
+
return null;
|
|
16
18
|
return children({ config: config, handlers: handlers, title: title, imageUrl: null, apiUrl: apiUrl });
|
|
17
19
|
};
|
|
18
20
|
export default CategoryNavOther;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var CheckTotals = function (_a) {
|
|
4
4
|
var check = _a.check, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).checkTotals;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, check: check });
|
|
7
9
|
};
|
|
8
10
|
export default CheckTotals;
|
|
@@ -6,6 +6,8 @@ var CheckoutCart = function (_a) {
|
|
|
6
6
|
var cart = _a.cart, navigate = _a.navigate, children = _a.children, QuantityView = _a.QuantityView, CartItemView = _a.CartItemView;
|
|
7
7
|
var config = useAppSelector(selectKioskConfig).checkoutCart;
|
|
8
8
|
var renderCartItem = useCallback(function (item, index) { return (React.createElement(CartItemContainer, { QuantityView: QuantityView, navigate: navigate, children: CartItemView, key: "".concat(item.id, "-").concat(index), item: item, isLast: index + 1 === cart.length, isEditable: false })); }, [QuantityView, navigate, CartItemView, cart.length]);
|
|
9
|
+
if (!config)
|
|
10
|
+
return null;
|
|
9
11
|
return children({ config: config, cart: cart, renderCartItem: renderCartItem });
|
|
10
12
|
};
|
|
11
13
|
export default CheckoutCart;
|
|
@@ -8,6 +8,8 @@ var CheckoutTotalsContainer = function (_a) {
|
|
|
8
8
|
var renderCheckTotals = useCallback(function () {
|
|
9
9
|
return React.createElement(CheckTotalsContainer, { children: CheckTotalsView, check: check });
|
|
10
10
|
}, [check, CheckTotalsView]);
|
|
11
|
+
if (!config)
|
|
12
|
+
return null;
|
|
11
13
|
return children({ config: config, renderCheckTotals: renderCheckTotals });
|
|
12
14
|
};
|
|
13
15
|
export default CheckoutTotalsContainer;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var ErrorMessage = function (_a) {
|
|
4
4
|
var content = _a.content, icon = _a.icon, style = _a.style, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).errorMessage;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, icon: icon, style: style, children: content });
|
|
7
9
|
};
|
|
8
10
|
export default ErrorMessage;
|
|
@@ -4,6 +4,8 @@ var Ingredients = function (_a) {
|
|
|
4
4
|
var title = _a.title, subtitle = _a.subtitle, ingredients = _a.ingredients, close = _a.close, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).ingredients;
|
|
6
6
|
var handlers = { close: close };
|
|
7
|
+
if (!config)
|
|
8
|
+
return null;
|
|
7
9
|
return children({ config: config, handlers: handlers, title: title, subtitle: subtitle, ingredients: ingredients });
|
|
8
10
|
};
|
|
9
11
|
export default Ingredients;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var Label = function (_a) {
|
|
4
4
|
var content = _a.content, label = _a.label, isRequired = _a.isRequired, style = _a.style, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).label;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, label: label, isRequired: isRequired, style: style, children: content });
|
|
7
9
|
};
|
|
8
10
|
export default Label;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var Main = function (_a) {
|
|
4
4
|
var children = _a.children, content = _a.content;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).main;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, content: content });
|
|
7
9
|
};
|
|
8
10
|
export default Main;
|
|
@@ -11,6 +11,8 @@ var MenuCategory = function (_a) {
|
|
|
11
11
|
navigate('/menu/category');
|
|
12
12
|
};
|
|
13
13
|
var handlers = { browse: browse };
|
|
14
|
+
if (!config)
|
|
15
|
+
return null;
|
|
14
16
|
return children({ config: config, handlers: handlers, category: category, imageUrl: imageUrl });
|
|
15
17
|
};
|
|
16
18
|
export default MenuCategory;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var ModalHeader = function (_a) {
|
|
4
4
|
var title = _a.title, subtitle = _a.subtitle, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).modalHeader;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, title: title, subtitle: subtitle });
|
|
7
9
|
};
|
|
8
10
|
export default ModalHeader;
|
|
@@ -6,6 +6,8 @@ var Rewards = function (_a) {
|
|
|
6
6
|
var title = _a.title, subtitle = _a.subtitle, rewards = _a.rewards, children = _a.children, RewardView = _a.RewardView, AppliedView = _a.AppliedView;
|
|
7
7
|
var config = useAppSelector(selectKioskConfig).rewards;
|
|
8
8
|
var renderReward = useCallback(function (reward, isLast) { return (React.createElement(RewardContainer, { reward: reward, isLast: isLast, children: RewardView, AppliedView: AppliedView })); }, [RewardView, AppliedView]);
|
|
9
|
+
if (!config)
|
|
10
|
+
return null;
|
|
9
11
|
return children({ config: config, title: title, subtitle: subtitle, rewards: rewards, renderReward: renderReward });
|
|
10
12
|
};
|
|
11
13
|
export default Rewards;
|
|
@@ -30,6 +30,8 @@ var SignIn = function (_a) {
|
|
|
30
30
|
dispatch(fetchCustomer({ customerId: customerId, endpoints: endpoints }));
|
|
31
31
|
}
|
|
32
32
|
}, [dispatch, customerId]);
|
|
33
|
+
if (!config)
|
|
34
|
+
return null;
|
|
33
35
|
return children({ config: config, handlers: handlers, msg: msg, buttonLinkConfig: buttonLinkConfig });
|
|
34
36
|
};
|
|
35
37
|
export default SignIn;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var SuccessMessage = function (_a) {
|
|
4
4
|
var content = _a.content, icon = _a.icon, style = _a.style, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).successMessage;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, icon: icon, style: style, children: content });
|
|
7
9
|
};
|
|
8
10
|
export default SuccessMessage;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var Tag = function (_a) {
|
|
4
4
|
var tag = _a.tag, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).tag;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, tag: tag });
|
|
7
9
|
};
|
|
8
10
|
export default Tag;
|
|
@@ -12,10 +12,11 @@ export var idleMiddleware = function (store) { return function (next) { return f
|
|
|
12
12
|
store.dispatch(setIsIdle(false));
|
|
13
13
|
var prevTimerId = state.idle.timerId;
|
|
14
14
|
clearTimeout(prevTimerId);
|
|
15
|
-
var pageTimeout = (_b = (_a = state.kiosk.store) === null || _a === void 0 ? void 0 : _a.page_timeout) !== null && _b !== void 0 ? _b :
|
|
15
|
+
var pageTimeout = (_b = (_a = state.kiosk.store) === null || _a === void 0 ? void 0 : _a.page_timeout) !== null && _b !== void 0 ? _b : 0;
|
|
16
|
+
var timeout = pageTimeout > 0 ? pageTimeout : DEFAULT_PAGE_TIMEOUT * 1000;
|
|
16
17
|
var timerId = setTimeout(function () {
|
|
17
18
|
store.dispatch(setIsIdle(true));
|
|
18
|
-
},
|
|
19
|
+
}, timeout);
|
|
19
20
|
store.dispatch(setIdleTimerId(timerId));
|
|
20
21
|
return result;
|
|
21
22
|
}; }; };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.142",
|
|
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",
|