@open-tender/store 1.1.153 → 1.1.155
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/CartItem.js +2 -0
- package/dist/cjs/components/CartUpsellItem.js +2 -0
- package/dist/cjs/components/CartUpsells.js +1 -1
- package/dist/cjs/components/FavsButton.js +2 -0
- package/dist/cjs/components/Header.js +3 -3
- package/dist/cjs/components/Input.js +2 -0
- package/dist/cjs/components/InputButton.js +2 -0
- package/dist/cjs/components/ItemGroup.js +2 -0
- package/dist/cjs/components/ItemSelections.js +2 -0
- package/dist/cjs/components/Loader.js +2 -0
- package/dist/cjs/components/ModalContent.js +2 -0
- package/dist/cjs/components/NutritionalInfo.js +2 -0
- package/dist/cjs/components/OrderDetails.d.ts +1 -1
- package/dist/cjs/components/OrderDetails.js +1 -1
- package/dist/cjs/components/PointsReward.js +2 -0
- package/dist/cjs/components/PointsRewards.js +2 -0
- package/dist/cjs/components/PromoCode.js +2 -0
- package/dist/cjs/components/Quantity.js +2 -0
- package/dist/cjs/components/Reward.js +2 -0
- package/dist/cjs/components/SignInPhone.js +2 -0
- package/dist/cjs/components/SignInQr.d.ts +1 -1
- package/dist/cjs/components/SignInQr.js +2 -0
- package/dist/cjs/components/TextArea.js +2 -0
- package/dist/cjs/components/UpsellItem.js +2 -0
- package/dist/cjs/components/Upsells.js +2 -0
- package/dist/esm/components/CartItem.js +2 -0
- package/dist/esm/components/CartUpsellItem.js +2 -0
- package/dist/esm/components/CartUpsells.js +1 -1
- package/dist/esm/components/FavsButton.js +2 -0
- package/dist/esm/components/Header.js +3 -3
- package/dist/esm/components/Input.js +2 -0
- package/dist/esm/components/InputButton.js +2 -0
- package/dist/esm/components/ItemGroup.js +2 -0
- package/dist/esm/components/ItemSelections.js +2 -0
- package/dist/esm/components/Loader.js +2 -0
- package/dist/esm/components/ModalContent.js +2 -0
- package/dist/esm/components/NutritionalInfo.js +2 -0
- package/dist/esm/components/OrderDetails.d.ts +1 -1
- package/dist/esm/components/OrderDetails.js +1 -1
- package/dist/esm/components/PointsReward.js +2 -0
- package/dist/esm/components/PointsRewards.js +2 -0
- package/dist/esm/components/PromoCode.js +2 -0
- package/dist/esm/components/Quantity.js +2 -0
- package/dist/esm/components/Reward.js +2 -0
- package/dist/esm/components/SignInPhone.js +2 -0
- package/dist/esm/components/SignInQr.d.ts +1 -1
- package/dist/esm/components/SignInQr.js +2 -0
- package/dist/esm/components/TextArea.js +2 -0
- package/dist/esm/components/UpsellItem.js +2 -0
- package/dist/esm/components/Upsells.js +2 -0
- package/package.json +1 -1
|
@@ -20,6 +20,8 @@ var CartItem = function (_a) {
|
|
|
20
20
|
};
|
|
21
21
|
var handlers = { increment: increment, decrement: decrement, edit: edit, remove: remove };
|
|
22
22
|
var renderQuantity = (0, react_1.useCallback)(function (quantity) { return (react_1.default.createElement(Quantity_1.default, { fontSize: 24, iconSize: 28, quantity: quantity, increment: increment, decrement: decrement, children: QuantityView })); }, [increment, decrement, QuantityView]);
|
|
23
|
+
if (!config)
|
|
24
|
+
return null;
|
|
23
25
|
return children({
|
|
24
26
|
item: item,
|
|
25
27
|
config: config,
|
|
@@ -13,7 +13,7 @@ var CartUpsells = function (_a) {
|
|
|
13
13
|
var _b = (0, hooks_1.useAppSelector)(slices_1.selectMenu), categories = _b.categories, soldOut = _b.soldOut;
|
|
14
14
|
var upsellItems = (0, react_1.useMemo)(function () { return (0, utils_1.makeUpsellItemsForCart)(categories, cartIds, soldOut); }, [categories, cartIds, soldOut]);
|
|
15
15
|
var renderCartUpsellItem = (0, react_1.useCallback)(function (item, isLast) { return (react_1.default.createElement(CartUpsellItem_1.default, { key: item.id, item: item, isLast: isLast, children: CartUpsellItemView })); }, [CartUpsellItemView]);
|
|
16
|
-
if (!upsellItems.length)
|
|
16
|
+
if (!config || !upsellItems.length)
|
|
17
17
|
return null;
|
|
18
18
|
return children({
|
|
19
19
|
config: config,
|
|
@@ -9,6 +9,8 @@ var FavsButton = function (_a) {
|
|
|
9
9
|
var imageUrl = (0, hooks_2.useKioskImageUrl)(item);
|
|
10
10
|
var browse = function () { return navigate(path); };
|
|
11
11
|
var handlers = { browse: browse };
|
|
12
|
+
if (!config)
|
|
13
|
+
return null;
|
|
12
14
|
return children({
|
|
13
15
|
config: config,
|
|
14
16
|
handlers: handlers,
|
|
@@ -8,7 +8,7 @@ var SignInButton_1 = tslib_1.__importDefault(require("./SignInButton"));
|
|
|
8
8
|
var Header = function (_a) {
|
|
9
9
|
var to = _a.to, _b = _a.backText, backText = _b === void 0 ? 'Back' : _b, backAction = _a.backAction, pathname = _a.pathname, navigate = _a.navigate, children = _a.children, SignInButtonView = _a.SignInButtonView;
|
|
10
10
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
11
|
-
var
|
|
11
|
+
var config = ((0, hooks_1.useAppSelector)(slices_1.selectKioskConfig) || {}).header;
|
|
12
12
|
var showButtons = !!(backAction || to);
|
|
13
13
|
var display_sign_in = (0, hooks_1.useAppSelector)(slices_1.selectStoreSettings).display_sign_in;
|
|
14
14
|
var back = function () {
|
|
@@ -28,10 +28,10 @@ var Header = function (_a) {
|
|
|
28
28
|
};
|
|
29
29
|
var handlers = { back: back, open: open, startOver: startOver };
|
|
30
30
|
var renderSignInButton = (0, react_1.useCallback)(function () { return (react_1.default.createElement(SignInButton_1.default, { pathname: pathname, navigate: navigate, children: SignInButtonView })); }, [pathname, navigate, SignInButtonView]);
|
|
31
|
-
if (!
|
|
31
|
+
if (!config)
|
|
32
32
|
return null;
|
|
33
33
|
return children({
|
|
34
|
-
config:
|
|
34
|
+
config: config,
|
|
35
35
|
handlers: handlers,
|
|
36
36
|
showButtons: showButtons,
|
|
37
37
|
backText: backText,
|
|
@@ -6,6 +6,8 @@ var InputButton = function (_a) {
|
|
|
6
6
|
var label = _a.label, value = _a.value, open = _a.open, isRequired = _a.isRequired, style = _a.style, labelStyle = _a.labelStyle, children = _a.children;
|
|
7
7
|
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _b.inputButton, labelConfig = _b.label;
|
|
8
8
|
var handlers = { open: open };
|
|
9
|
+
if (!config)
|
|
10
|
+
return null;
|
|
9
11
|
return children({
|
|
10
12
|
config: config,
|
|
11
13
|
labelConfig: labelConfig,
|
|
@@ -13,6 +13,8 @@ var ItemGroup = function (_a) {
|
|
|
13
13
|
var modifierGroup = (0, utils_1.useModifierGroup)(group);
|
|
14
14
|
var renderErrorMessage = (0, react_1.useCallback)(function (icon, children) { return (react_1.default.createElement(ErrorMessage_1.default, { icon: icon, content: children, children: ErrorMessageView })); }, [ErrorMessageView]);
|
|
15
15
|
var renderSuccessMessage = (0, react_1.useCallback)(function (icon, children) { return (react_1.default.createElement(SuccessMessage_1.default, { icon: icon, content: children, children: SuccessMessageView })); }, [SuccessMessageView]);
|
|
16
|
+
if (!config)
|
|
17
|
+
return null;
|
|
16
18
|
return children({
|
|
17
19
|
config: config,
|
|
18
20
|
group: modifierGroup,
|
|
@@ -11,6 +11,8 @@ var ItemSelections = function (_a) {
|
|
|
11
11
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).itemSelections;
|
|
12
12
|
var renderErrorMessage = (0, react_1.useCallback)(function (icon, children) { return (react_1.default.createElement(ErrorMessage_1.default, { icon: icon, content: children, children: ErrorMessageView })); }, [ErrorMessageView]);
|
|
13
13
|
var renderItemOption = (0, react_1.useCallback)(function (group, option) { return (react_1.default.createElement(ItemOptionSelected_1.default, { levels: levels, handlers: handlers, group: group, option: option, children: ItemOptionView })); }, [levels, handlers, ItemOptionView]);
|
|
14
|
+
if (!config)
|
|
15
|
+
return null;
|
|
14
16
|
return children({
|
|
15
17
|
config: config,
|
|
16
18
|
groups: groups,
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var Loader = function (_a) {
|
|
6
6
|
var text = _a.text, style = _a.style, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).loader;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({ config: config, text: text, style: style });
|
|
9
11
|
};
|
|
10
12
|
exports.default = Loader;
|
|
@@ -5,6 +5,8 @@ var slices_1 = require("../slices");
|
|
|
5
5
|
var ModalContent = function (_a) {
|
|
6
6
|
var title = _a.title, subtitle = _a.subtitle, content = _a.content, submit = _a.submit, submitText = _a.submitText, cancel = _a.cancel, cancelText = _a.cancelText, style = _a.style, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).modalContent;
|
|
8
|
+
if (!config)
|
|
9
|
+
return null;
|
|
8
10
|
return children({
|
|
9
11
|
config: config,
|
|
10
12
|
title: title,
|
|
@@ -6,6 +6,8 @@ var NutritionalInfo = function (_a) {
|
|
|
6
6
|
var title = _a.title, subtitle = _a.subtitle, nutritionalInfo = _a.nutritionalInfo, close = _a.close, children = _a.children;
|
|
7
7
|
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _b.nutritionalInfo, modalContentConfig = _b.modalContent;
|
|
8
8
|
var handlers = { close: close };
|
|
9
|
+
if (!config)
|
|
10
|
+
return null;
|
|
9
11
|
return children({
|
|
10
12
|
config: config,
|
|
11
13
|
handlers: handlers,
|
|
@@ -7,5 +7,5 @@ declare const OrderDetails: ({ order, close, children, CheckTotalsView, OrderDet
|
|
|
7
7
|
children: (props: OrderDetailsProps) => ReactNode;
|
|
8
8
|
CheckTotalsView: (props: CheckTotalsProps) => ReactNode;
|
|
9
9
|
OrderDetailsItemView: (props: OrderDetailsItemProps) => ReactNode;
|
|
10
|
-
}) =>
|
|
10
|
+
}) => React.ReactNode;
|
|
11
11
|
export default OrderDetails;
|
|
@@ -23,7 +23,7 @@ var OrderDetails = function (_a) {
|
|
|
23
23
|
var renderCheckTotals = (0, react_1.useCallback)(function () { return react_1.default.createElement(CheckTotals_1.default, { check: order, children: CheckTotalsView }); }, [order, CheckTotalsView]);
|
|
24
24
|
var renderOrderDetailsItem = (0, react_1.useCallback)(function (orderItem) { return (react_1.default.createElement(OrderDetailsItem_1.default, { key: orderItem.id, orderItem: orderItem, children: OrderDetailsItemView })); }, [OrderDetailsItemView]);
|
|
25
25
|
if (!config)
|
|
26
|
-
return
|
|
26
|
+
return null;
|
|
27
27
|
return children({
|
|
28
28
|
config: config,
|
|
29
29
|
modalContentConfig: modalContentConfig,
|
|
@@ -49,6 +49,8 @@ var PointsReward = function (_a) {
|
|
|
49
49
|
callback();
|
|
50
50
|
};
|
|
51
51
|
var renderQuantity = function (quantity, incrementDisabled) { return (react_1.default.createElement(Quantity_1.default, { quantity: quantity, increment: apply, incrementDisabled: incrementDisabled, decrement: remove, fontSize: 24, iconSize: 28, children: QuantityView })); };
|
|
52
|
+
if (!config)
|
|
53
|
+
return null;
|
|
52
54
|
return children({
|
|
53
55
|
config: config,
|
|
54
56
|
item: item,
|
|
@@ -11,6 +11,8 @@ var PointsRewards = function (_a) {
|
|
|
11
11
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).pointsRewards;
|
|
12
12
|
var _b = (0, hooks_2.useCustomerRewards)(), items = _b.items, points = _b.points, pointsApplied = _b.pointsApplied, pointsRemaining = _b.pointsRemaining;
|
|
13
13
|
var renderPointReward = (0, react_1.useCallback)(function (item) { return (react_1.default.createElement(PointsReward_1.default, { item: item, children: PointsRewardView, QuantityView: QuantityView })); }, [PointsRewardView, QuantityView]);
|
|
14
|
+
if (!config)
|
|
15
|
+
return null;
|
|
14
16
|
return children({
|
|
15
17
|
config: config,
|
|
16
18
|
items: items,
|
|
@@ -38,6 +38,8 @@ var PromoCode = function (_a) {
|
|
|
38
38
|
change: setPromoCode
|
|
39
39
|
}); }, [setPromoCode]);
|
|
40
40
|
var renderKeypad = (0, react_1.useCallback)(function () { return (react_1.default.createElement(Keypad_1.default, { type: "default", handlers: keypadHandlers, value: promoCode, children: KeypadView })); }, [keypadHandlers, promoCode, KeypadView]);
|
|
41
|
+
if (!config)
|
|
42
|
+
return null;
|
|
41
43
|
return children({
|
|
42
44
|
config: config,
|
|
43
45
|
handlers: handlers,
|
|
@@ -6,6 +6,8 @@ var Quantity = function (_a) {
|
|
|
6
6
|
var quantity = _a.quantity, increment = _a.increment, _b = _a.incrementDisabled, incrementDisabled = _b === void 0 ? false : _b, decrement = _a.decrement, _c = _a.decrementDisabled, decrementDisabled = _c === void 0 ? false : _c, _d = _a.fontSize, fontSize = _d === void 0 ? 28 : _d, _e = _a.iconSize, iconSize = _e === void 0 ? 36 : _e, _f = _a.strokeWidth, strokeWidth = _f === void 0 ? 2 : _f, _g = _a.className, className = _g === void 0 ? 'quantity' : _g, children = _a.children;
|
|
7
7
|
var _h = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), _j = className, config = _h[_j];
|
|
8
8
|
var handlers = { increment: increment, decrement: decrement };
|
|
9
|
+
if (!config)
|
|
10
|
+
return null;
|
|
9
11
|
return children({
|
|
10
12
|
config: config,
|
|
11
13
|
handlers: handlers,
|
|
@@ -26,6 +26,8 @@ var Reward = function (_a) {
|
|
|
26
26
|
};
|
|
27
27
|
var handlers = { apply: apply, remove: remove };
|
|
28
28
|
var renderApplied = (0, react_1.useCallback)(function () { return react_1.default.createElement(Applied_1.default, { children: AppliedView }); }, [AppliedView]);
|
|
29
|
+
if (!config)
|
|
30
|
+
return null;
|
|
29
31
|
return children({
|
|
30
32
|
config: config,
|
|
31
33
|
handlers: handlers,
|
|
@@ -10,6 +10,8 @@ var SignInQr = function (_a) {
|
|
|
10
10
|
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _b.signInQr, errorMessageConfig = _b.errorMessage, modalContentConfig = _b.modalContent;
|
|
11
11
|
var _c = (0, hooks_2.useSignInQr)(listener, cameraScanner, type, close, callback), handlers = _c.handlers, errMsg = _c.errMsg, scan = _c.scan;
|
|
12
12
|
var CameraComponent = (0, react_1.useMemo)(function () { return scan === null || scan === void 0 ? void 0 : scan.camera; }, [scan]);
|
|
13
|
+
if (!config)
|
|
14
|
+
return null;
|
|
13
15
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
14
16
|
children({
|
|
15
17
|
config: config,
|
|
@@ -14,6 +14,8 @@ var Upsells = function (_a) {
|
|
|
14
14
|
var items = (0, utils_1.makeUpsellItems)(itemIds, itemLookup);
|
|
15
15
|
var handlers = { close: close };
|
|
16
16
|
var renderUpsellItem = (0, react_1.useCallback)(function (item, isLast) { return (react_1.default.createElement(UpsellItem_1.default, { key: item.id, item: item, isLast: isLast, callback: close, children: UpsellItemView })); }, [close, UpsellItemView]);
|
|
17
|
+
if (!config)
|
|
18
|
+
return null;
|
|
17
19
|
return children({
|
|
18
20
|
config: config,
|
|
19
21
|
handlers: handlers,
|
|
@@ -17,6 +17,8 @@ var CartItem = function (_a) {
|
|
|
17
17
|
};
|
|
18
18
|
var handlers = { increment: increment, decrement: decrement, edit: edit, remove: remove };
|
|
19
19
|
var renderQuantity = useCallback(function (quantity) { return (React.createElement(QuantityContainer, { fontSize: 24, iconSize: 28, quantity: quantity, increment: increment, decrement: decrement, children: QuantityView })); }, [increment, decrement, QuantityView]);
|
|
20
|
+
if (!config)
|
|
21
|
+
return null;
|
|
20
22
|
return children({
|
|
21
23
|
item: item,
|
|
22
24
|
config: config,
|
|
@@ -10,7 +10,7 @@ var CartUpsells = function (_a) {
|
|
|
10
10
|
var _b = useAppSelector(selectMenu), categories = _b.categories, soldOut = _b.soldOut;
|
|
11
11
|
var upsellItems = useMemo(function () { return makeUpsellItemsForCart(categories, cartIds, soldOut); }, [categories, cartIds, soldOut]);
|
|
12
12
|
var renderCartUpsellItem = useCallback(function (item, isLast) { return (React.createElement(CartUpsellItemContainer, { key: item.id, item: item, isLast: isLast, children: CartUpsellItemView })); }, [CartUpsellItemView]);
|
|
13
|
-
if (!upsellItems.length)
|
|
13
|
+
if (!config || !upsellItems.length)
|
|
14
14
|
return null;
|
|
15
15
|
return children({
|
|
16
16
|
config: config,
|
|
@@ -5,7 +5,7 @@ import { default as SignInButtonContainer } from './SignInButton';
|
|
|
5
5
|
var Header = function (_a) {
|
|
6
6
|
var to = _a.to, _b = _a.backText, backText = _b === void 0 ? 'Back' : _b, backAction = _a.backAction, pathname = _a.pathname, navigate = _a.navigate, children = _a.children, SignInButtonView = _a.SignInButtonView;
|
|
7
7
|
var dispatch = useAppDispatch();
|
|
8
|
-
var
|
|
8
|
+
var config = (useAppSelector(selectKioskConfig) || {}).header;
|
|
9
9
|
var showButtons = !!(backAction || to);
|
|
10
10
|
var display_sign_in = useAppSelector(selectStoreSettings).display_sign_in;
|
|
11
11
|
var back = function () {
|
|
@@ -25,10 +25,10 @@ var Header = function (_a) {
|
|
|
25
25
|
};
|
|
26
26
|
var handlers = { back: back, open: open, startOver: startOver };
|
|
27
27
|
var renderSignInButton = useCallback(function () { return (React.createElement(SignInButtonContainer, { pathname: pathname, navigate: navigate, children: SignInButtonView })); }, [pathname, navigate, SignInButtonView]);
|
|
28
|
-
if (!
|
|
28
|
+
if (!config)
|
|
29
29
|
return null;
|
|
30
30
|
return children({
|
|
31
|
-
config:
|
|
31
|
+
config: config,
|
|
32
32
|
handlers: handlers,
|
|
33
33
|
showButtons: showButtons,
|
|
34
34
|
backText: backText,
|
|
@@ -4,6 +4,8 @@ var InputButton = function (_a) {
|
|
|
4
4
|
var label = _a.label, value = _a.value, open = _a.open, isRequired = _a.isRequired, style = _a.style, labelStyle = _a.labelStyle, children = _a.children;
|
|
5
5
|
var _b = useAppSelector(selectKioskConfig), config = _b.inputButton, labelConfig = _b.label;
|
|
6
6
|
var handlers = { open: open };
|
|
7
|
+
if (!config)
|
|
8
|
+
return null;
|
|
7
9
|
return children({
|
|
8
10
|
config: config,
|
|
9
11
|
labelConfig: labelConfig,
|
|
@@ -10,6 +10,8 @@ var ItemGroup = function (_a) {
|
|
|
10
10
|
var modifierGroup = useModifierGroup(group);
|
|
11
11
|
var renderErrorMessage = useCallback(function (icon, children) { return (React.createElement(ErrorMessageContainer, { icon: icon, content: children, children: ErrorMessageView })); }, [ErrorMessageView]);
|
|
12
12
|
var renderSuccessMessage = useCallback(function (icon, children) { return (React.createElement(SuccessMessageContainer, { icon: icon, content: children, children: SuccessMessageView })); }, [SuccessMessageView]);
|
|
13
|
+
if (!config)
|
|
14
|
+
return null;
|
|
13
15
|
return children({
|
|
14
16
|
config: config,
|
|
15
17
|
group: modifierGroup,
|
|
@@ -8,6 +8,8 @@ var ItemSelections = function (_a) {
|
|
|
8
8
|
var config = useAppSelector(selectKioskConfig).itemSelections;
|
|
9
9
|
var renderErrorMessage = useCallback(function (icon, children) { return (React.createElement(ErrorMessageContainer, { icon: icon, content: children, children: ErrorMessageView })); }, [ErrorMessageView]);
|
|
10
10
|
var renderItemOption = useCallback(function (group, option) { return (React.createElement(ItemOptionSelectedContainer, { levels: levels, handlers: handlers, group: group, option: option, children: ItemOptionView })); }, [levels, handlers, ItemOptionView]);
|
|
11
|
+
if (!config)
|
|
12
|
+
return null;
|
|
11
13
|
return children({
|
|
12
14
|
config: config,
|
|
13
15
|
groups: groups,
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var Loader = function (_a) {
|
|
4
4
|
var text = _a.text, style = _a.style, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).loader;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({ config: config, text: text, style: style });
|
|
7
9
|
};
|
|
8
10
|
export default Loader;
|
|
@@ -3,6 +3,8 @@ import { selectKioskConfig } from '../slices';
|
|
|
3
3
|
var ModalContent = function (_a) {
|
|
4
4
|
var title = _a.title, subtitle = _a.subtitle, content = _a.content, submit = _a.submit, submitText = _a.submitText, cancel = _a.cancel, cancelText = _a.cancelText, style = _a.style, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).modalContent;
|
|
6
|
+
if (!config)
|
|
7
|
+
return null;
|
|
6
8
|
return children({
|
|
7
9
|
config: config,
|
|
8
10
|
title: title,
|
|
@@ -4,6 +4,8 @@ var NutritionalInfo = function (_a) {
|
|
|
4
4
|
var title = _a.title, subtitle = _a.subtitle, nutritionalInfo = _a.nutritionalInfo, close = _a.close, children = _a.children;
|
|
5
5
|
var _b = useAppSelector(selectKioskConfig), config = _b.nutritionalInfo, modalContentConfig = _b.modalContent;
|
|
6
6
|
var handlers = { close: close };
|
|
7
|
+
if (!config)
|
|
8
|
+
return null;
|
|
7
9
|
return children({
|
|
8
10
|
config: config,
|
|
9
11
|
handlers: handlers,
|
|
@@ -7,5 +7,5 @@ declare const OrderDetails: ({ order, close, children, CheckTotalsView, OrderDet
|
|
|
7
7
|
children: (props: OrderDetailsProps) => ReactNode;
|
|
8
8
|
CheckTotalsView: (props: CheckTotalsProps) => ReactNode;
|
|
9
9
|
OrderDetailsItemView: (props: OrderDetailsItemProps) => ReactNode;
|
|
10
|
-
}) =>
|
|
10
|
+
}) => React.ReactNode;
|
|
11
11
|
export default OrderDetails;
|
|
@@ -20,7 +20,7 @@ var OrderDetails = function (_a) {
|
|
|
20
20
|
var renderCheckTotals = useCallback(function () { return React.createElement(CheckTotalsContainer, { check: order, children: CheckTotalsView }); }, [order, CheckTotalsView]);
|
|
21
21
|
var renderOrderDetailsItem = useCallback(function (orderItem) { return (React.createElement(OrderDetailsItemContainer, { key: orderItem.id, orderItem: orderItem, children: OrderDetailsItemView })); }, [OrderDetailsItemView]);
|
|
22
22
|
if (!config)
|
|
23
|
-
return
|
|
23
|
+
return null;
|
|
24
24
|
return children({
|
|
25
25
|
config: config,
|
|
26
26
|
modalContentConfig: modalContentConfig,
|
|
@@ -47,6 +47,8 @@ var PointsReward = function (_a) {
|
|
|
47
47
|
callback();
|
|
48
48
|
};
|
|
49
49
|
var renderQuantity = function (quantity, incrementDisabled) { return (React.createElement(QuantityContainer, { quantity: quantity, increment: apply, incrementDisabled: incrementDisabled, decrement: remove, fontSize: 24, iconSize: 28, children: QuantityView })); };
|
|
50
|
+
if (!config)
|
|
51
|
+
return null;
|
|
50
52
|
return children({
|
|
51
53
|
config: config,
|
|
52
54
|
item: item,
|
|
@@ -8,6 +8,8 @@ var PointsRewards = function (_a) {
|
|
|
8
8
|
var config = useAppSelector(selectKioskConfig).pointsRewards;
|
|
9
9
|
var _b = useCustomerRewards(), items = _b.items, points = _b.points, pointsApplied = _b.pointsApplied, pointsRemaining = _b.pointsRemaining;
|
|
10
10
|
var renderPointReward = useCallback(function (item) { return (React.createElement(PointsRewardContainer, { item: item, children: PointsRewardView, QuantityView: QuantityView })); }, [PointsRewardView, QuantityView]);
|
|
11
|
+
if (!config)
|
|
12
|
+
return null;
|
|
11
13
|
return children({
|
|
12
14
|
config: config,
|
|
13
15
|
items: items,
|
|
@@ -35,6 +35,8 @@ var PromoCode = function (_a) {
|
|
|
35
35
|
change: setPromoCode
|
|
36
36
|
}); }, [setPromoCode]);
|
|
37
37
|
var renderKeypad = useCallback(function () { return (React.createElement(KeypadContainer, { type: "default", handlers: keypadHandlers, value: promoCode, children: KeypadView })); }, [keypadHandlers, promoCode, KeypadView]);
|
|
38
|
+
if (!config)
|
|
39
|
+
return null;
|
|
38
40
|
return children({
|
|
39
41
|
config: config,
|
|
40
42
|
handlers: handlers,
|
|
@@ -4,6 +4,8 @@ var Quantity = function (_a) {
|
|
|
4
4
|
var quantity = _a.quantity, increment = _a.increment, _b = _a.incrementDisabled, incrementDisabled = _b === void 0 ? false : _b, decrement = _a.decrement, _c = _a.decrementDisabled, decrementDisabled = _c === void 0 ? false : _c, _d = _a.fontSize, fontSize = _d === void 0 ? 28 : _d, _e = _a.iconSize, iconSize = _e === void 0 ? 36 : _e, _f = _a.strokeWidth, strokeWidth = _f === void 0 ? 2 : _f, _g = _a.className, className = _g === void 0 ? 'quantity' : _g, children = _a.children;
|
|
5
5
|
var _h = useAppSelector(selectKioskConfig), _j = className, config = _h[_j];
|
|
6
6
|
var handlers = { increment: increment, decrement: decrement };
|
|
7
|
+
if (!config)
|
|
8
|
+
return null;
|
|
7
9
|
return children({
|
|
8
10
|
config: config,
|
|
9
11
|
handlers: handlers,
|
|
@@ -23,6 +23,8 @@ var Reward = function (_a) {
|
|
|
23
23
|
};
|
|
24
24
|
var handlers = { apply: apply, remove: remove };
|
|
25
25
|
var renderApplied = useCallback(function () { return React.createElement(AppliedContainer, { children: AppliedView }); }, [AppliedView]);
|
|
26
|
+
if (!config)
|
|
27
|
+
return null;
|
|
26
28
|
return children({
|
|
27
29
|
config: config,
|
|
28
30
|
handlers: handlers,
|
|
@@ -7,6 +7,8 @@ var SignInQr = function (_a) {
|
|
|
7
7
|
var _b = useAppSelector(selectKioskConfig), config = _b.signInQr, errorMessageConfig = _b.errorMessage, modalContentConfig = _b.modalContent;
|
|
8
8
|
var _c = useSignInQr(listener, cameraScanner, type, close, callback), handlers = _c.handlers, errMsg = _c.errMsg, scan = _c.scan;
|
|
9
9
|
var CameraComponent = useMemo(function () { return scan === null || scan === void 0 ? void 0 : scan.camera; }, [scan]);
|
|
10
|
+
if (!config)
|
|
11
|
+
return null;
|
|
10
12
|
return (React.createElement(React.Fragment, null,
|
|
11
13
|
children({
|
|
12
14
|
config: config,
|
|
@@ -11,6 +11,8 @@ var Upsells = function (_a) {
|
|
|
11
11
|
var items = makeUpsellItems(itemIds, itemLookup);
|
|
12
12
|
var handlers = { close: close };
|
|
13
13
|
var renderUpsellItem = useCallback(function (item, isLast) { return (React.createElement(UpsellItemContainer, { key: item.id, item: item, isLast: isLast, callback: close, children: UpsellItemView })); }, [close, UpsellItemView]);
|
|
14
|
+
if (!config)
|
|
15
|
+
return null;
|
|
14
16
|
return children({
|
|
15
17
|
config: config,
|
|
16
18
|
handlers: handlers,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.155",
|
|
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",
|