@open-tender/store 1.1.6 → 1.1.8
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.d.ts +1 -1
- package/dist/cjs/components/Allergen.js +1 -2
- package/dist/cjs/components/Applied.d.ts +1 -1
- package/dist/cjs/components/Applied.js +1 -2
- package/dist/cjs/components/ButtonLink.d.ts +1 -1
- package/dist/cjs/components/ButtonLink.js +1 -2
- package/dist/cjs/components/Card.d.ts +1 -1
- package/dist/cjs/components/Card.js +1 -2
- package/dist/cjs/components/Cart.d.ts +3 -2
- package/dist/cjs/components/Cart.js +4 -4
- package/dist/cjs/components/CartItem.d.ts +3 -2
- package/dist/cjs/components/CartItem.js +3 -2
- package/dist/cjs/components/CartUpsellItem.d.ts +3 -2
- package/dist/cjs/components/CartUpsellItem.js +3 -4
- package/dist/cjs/components/CartUpsells.d.ts +3 -2
- package/dist/cjs/components/CartUpsells.js +3 -3
- package/dist/cjs/components/CategoryItem.d.ts +3 -2
- package/dist/cjs/components/CategoryItem.js +3 -4
- package/dist/cjs/components/CategoryNav.d.ts +3 -2
- package/dist/cjs/components/CategoryNav.js +4 -4
- package/dist/cjs/components/CategoryNavItem.d.ts +3 -2
- package/dist/cjs/components/CategoryNavItem.js +4 -3
- package/dist/cjs/components/CategoryNavOther.d.ts +3 -2
- package/dist/cjs/components/CategoryNavOther.js +3 -4
- package/dist/cjs/components/CheckTotals.d.ts +1 -1
- package/dist/cjs/components/CheckTotals.js +1 -2
- package/dist/cjs/components/Discount.d.ts +3 -2
- package/dist/cjs/components/Discount.js +3 -4
- package/dist/cjs/components/ErrorMessage.d.ts +1 -1
- package/dist/cjs/components/ErrorMessage.js +1 -2
- package/dist/cjs/components/Header.d.ts +1 -1
- package/dist/cjs/components/Header.js +1 -1
- package/dist/cjs/components/Ingredients.d.ts +1 -1
- package/dist/cjs/components/Ingredients.js +1 -2
- package/dist/cjs/components/Input.d.ts +1 -1
- package/dist/cjs/components/Input.js +2 -3
- package/dist/cjs/components/ItemGroup.d.ts +3 -3
- package/dist/cjs/components/ItemGroup.js +10 -4
- package/dist/cjs/components/ItemGroups.d.ts +3 -2
- package/dist/cjs/components/ItemGroups.js +2 -2
- package/dist/cjs/components/ItemOption.d.ts +3 -2
- package/dist/cjs/components/ItemOption.js +4 -4
- package/dist/cjs/components/ItemSelections.d.ts +3 -2
- package/dist/cjs/components/ItemSelections.js +2 -2
- package/dist/cjs/components/Label.d.ts +1 -1
- package/dist/cjs/components/Label.js +1 -2
- package/dist/cjs/components/Loader.d.ts +1 -1
- package/dist/cjs/components/Loader.js +1 -2
- package/dist/cjs/components/MadeForNotes.d.ts +1 -1
- package/dist/cjs/components/MadeForNotes.js +2 -2
- package/dist/cjs/components/MenuCategory.d.ts +1 -1
- package/dist/cjs/components/MenuCategory.js +1 -2
- package/dist/cjs/components/MenuOther.d.ts +3 -2
- package/dist/cjs/components/MenuOther.js +9 -3
- package/dist/cjs/components/Modal.d.ts +1 -1
- package/dist/cjs/components/Modal.js +1 -2
- package/dist/cjs/components/ModalContent.d.ts +1 -1
- package/dist/cjs/components/ModalContent.js +1 -2
- package/dist/cjs/components/ModalHeader.d.ts +1 -1
- package/dist/cjs/components/ModalHeader.js +1 -2
- package/dist/cjs/components/NutritionalInfo.d.ts +1 -1
- package/dist/cjs/components/NutritionalInfo.js +2 -3
- package/dist/cjs/components/Option.d.ts +3 -2
- package/dist/cjs/components/Option.js +3 -3
- package/dist/cjs/components/OrderCard.d.ts +3 -2
- package/dist/cjs/components/OrderCard.js +8 -7
- package/dist/cjs/components/PointsReward.d.ts +3 -2
- package/dist/cjs/components/PointsReward.js +6 -5
- package/dist/cjs/components/PointsRewards.d.ts +3 -2
- package/dist/cjs/components/PointsRewards.js +3 -3
- package/dist/cjs/components/Reward.d.ts +2 -1
- package/dist/cjs/components/Reward.js +3 -2
- package/dist/cjs/components/Rewards.d.ts +2 -1
- package/dist/cjs/components/Rewards.js +2 -2
- package/dist/cjs/components/UpsellItem.d.ts +2 -1
- package/dist/cjs/components/UpsellItem.js +2 -2
- package/dist/cjs/components/Upsells.d.ts +2 -1
- package/dist/cjs/components/Upsells.js +2 -2
- package/dist/esm/components/Allergen.d.ts +1 -1
- package/dist/esm/components/Allergen.js +1 -2
- package/dist/esm/components/Applied.d.ts +1 -1
- package/dist/esm/components/Applied.js +1 -2
- package/dist/esm/components/ButtonLink.d.ts +1 -1
- package/dist/esm/components/ButtonLink.js +1 -2
- package/dist/esm/components/Card.d.ts +1 -1
- package/dist/esm/components/Card.js +1 -2
- package/dist/esm/components/Cart.d.ts +3 -2
- package/dist/esm/components/Cart.js +5 -5
- package/dist/esm/components/CartItem.d.ts +3 -2
- package/dist/esm/components/CartItem.js +4 -3
- package/dist/esm/components/CartUpsellItem.d.ts +3 -2
- package/dist/esm/components/CartUpsellItem.js +3 -4
- package/dist/esm/components/CartUpsells.d.ts +3 -2
- package/dist/esm/components/CartUpsells.js +4 -4
- package/dist/esm/components/CategoryItem.d.ts +3 -2
- package/dist/esm/components/CategoryItem.js +3 -4
- package/dist/esm/components/CategoryNav.d.ts +3 -2
- package/dist/esm/components/CategoryNav.js +5 -5
- package/dist/esm/components/CategoryNavItem.d.ts +3 -2
- package/dist/esm/components/CategoryNavItem.js +5 -4
- package/dist/esm/components/CategoryNavOther.d.ts +3 -2
- package/dist/esm/components/CategoryNavOther.js +3 -4
- package/dist/esm/components/CheckTotals.d.ts +1 -1
- package/dist/esm/components/CheckTotals.js +1 -2
- package/dist/esm/components/Discount.d.ts +3 -2
- package/dist/esm/components/Discount.js +3 -4
- package/dist/esm/components/ErrorMessage.d.ts +1 -1
- package/dist/esm/components/ErrorMessage.js +1 -2
- package/dist/esm/components/Header.d.ts +1 -1
- package/dist/esm/components/Header.js +2 -2
- package/dist/esm/components/Ingredients.d.ts +1 -1
- package/dist/esm/components/Ingredients.js +1 -2
- package/dist/esm/components/Input.d.ts +1 -1
- package/dist/esm/components/Input.js +2 -3
- package/dist/esm/components/ItemGroup.d.ts +3 -3
- package/dist/esm/components/ItemGroup.js +10 -5
- package/dist/esm/components/ItemGroups.d.ts +3 -2
- package/dist/esm/components/ItemGroups.js +3 -3
- package/dist/esm/components/ItemOption.d.ts +3 -2
- package/dist/esm/components/ItemOption.js +4 -4
- package/dist/esm/components/ItemSelections.d.ts +3 -2
- package/dist/esm/components/ItemSelections.js +3 -3
- package/dist/esm/components/Label.d.ts +1 -1
- package/dist/esm/components/Label.js +1 -2
- package/dist/esm/components/Loader.d.ts +1 -1
- package/dist/esm/components/Loader.js +1 -2
- package/dist/esm/components/MadeForNotes.d.ts +1 -1
- package/dist/esm/components/MadeForNotes.js +3 -3
- package/dist/esm/components/MenuCategory.d.ts +1 -1
- package/dist/esm/components/MenuCategory.js +1 -2
- package/dist/esm/components/MenuOther.d.ts +3 -2
- package/dist/esm/components/MenuOther.js +9 -3
- package/dist/esm/components/Modal.d.ts +1 -1
- package/dist/esm/components/Modal.js +1 -2
- package/dist/esm/components/ModalContent.d.ts +1 -1
- package/dist/esm/components/ModalContent.js +1 -2
- package/dist/esm/components/ModalHeader.d.ts +1 -1
- package/dist/esm/components/ModalHeader.js +1 -2
- package/dist/esm/components/NutritionalInfo.d.ts +1 -1
- package/dist/esm/components/NutritionalInfo.js +2 -3
- package/dist/esm/components/Option.d.ts +3 -2
- package/dist/esm/components/Option.js +4 -4
- package/dist/esm/components/OrderCard.d.ts +3 -2
- package/dist/esm/components/OrderCard.js +9 -8
- package/dist/esm/components/PointsReward.d.ts +3 -2
- package/dist/esm/components/PointsReward.js +7 -6
- package/dist/esm/components/PointsRewards.d.ts +3 -2
- package/dist/esm/components/PointsRewards.js +4 -4
- package/dist/esm/components/Reward.d.ts +2 -1
- package/dist/esm/components/Reward.js +3 -2
- package/dist/esm/components/Rewards.d.ts +2 -1
- package/dist/esm/components/Rewards.js +2 -2
- package/dist/esm/components/UpsellItem.d.ts +2 -1
- package/dist/esm/components/UpsellItem.js +2 -2
- package/dist/esm/components/Upsells.d.ts +2 -1
- package/dist/esm/components/Upsells.js +2 -2
- package/package.json +3 -3
|
@@ -3,6 +3,6 @@ import { AllergenProps } from '@open-tender/ui';
|
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
declare const Allergen: ({ allergen, children }: {
|
|
5
5
|
allergen: AllergenType;
|
|
6
|
-
children
|
|
6
|
+
children: (props: AllergenProps) => ReactNode;
|
|
7
7
|
}) => ReactNode;
|
|
8
8
|
export default Allergen;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var Allergen = function (_a) {
|
|
7
|
-
var allergen = _a.allergen,
|
|
6
|
+
var allergen = _a.allergen, children = _a.children;
|
|
8
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).allergen;
|
|
9
8
|
return children({ config: config, allergen: allergen });
|
|
10
9
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppliedProps } from '@open-tender/ui';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
declare const Applied: ({ children }: {
|
|
4
|
-
children
|
|
4
|
+
children: (props: AppliedProps) => ReactNode;
|
|
5
5
|
}) => ReactNode;
|
|
6
6
|
export default Applied;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var Applied = function (_a) {
|
|
7
|
-
var
|
|
6
|
+
var children = _a.children;
|
|
8
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).applied;
|
|
9
8
|
return children({ config: config });
|
|
10
9
|
};
|
|
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
declare const ButtonLink: ({ onClick, label, children, style }: {
|
|
4
4
|
onClick: () => void;
|
|
5
5
|
label: string;
|
|
6
|
-
children
|
|
6
|
+
children: (props: ButtonLinkProps) => ReactNode;
|
|
7
7
|
style?: Styles;
|
|
8
8
|
}) => ReactNode;
|
|
9
9
|
export default ButtonLink;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var ButtonLink = function (_a) {
|
|
7
|
-
var onClick = _a.onClick, label = _a.label,
|
|
6
|
+
var onClick = _a.onClick, label = _a.label, children = _a.children, style = _a.style;
|
|
8
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).buttonLink;
|
|
9
8
|
return children({ config: config, style: style, children: label, onClick: onClick });
|
|
10
9
|
};
|
|
@@ -2,6 +2,6 @@ import { CardProps } from '@open-tender/ui';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
declare const Card: ({ children, content }: {
|
|
4
4
|
content: ReactNode;
|
|
5
|
-
children
|
|
5
|
+
children: (props: CardProps) => ReactNode;
|
|
6
6
|
}) => ReactNode;
|
|
7
7
|
export default Card;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var Card = function (_a) {
|
|
7
|
-
var
|
|
6
|
+
var children = _a.children, content = _a.content;
|
|
8
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).card;
|
|
9
8
|
return children({ config: config, children: content });
|
|
10
9
|
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CartProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
-
declare const Cart: ({ navigate, children }: {
|
|
3
|
+
declare const Cart: ({ navigate, children, apiUrl }: {
|
|
4
4
|
navigate: (route: string) => void;
|
|
5
|
-
children
|
|
5
|
+
children: (props: CartProps) => ReactNode;
|
|
6
|
+
apiUrl: string;
|
|
6
7
|
}) => React.ReactNode;
|
|
7
8
|
export default Cart;
|
|
@@ -8,11 +8,11 @@ var slices_1 = require("../slices");
|
|
|
8
8
|
var CartItem_1 = tslib_1.__importDefault(require("./CartItem"));
|
|
9
9
|
var CartUpsells_1 = tslib_1.__importDefault(require("./CartUpsells"));
|
|
10
10
|
var Cart = function (_a) {
|
|
11
|
-
var navigate = _a.navigate,
|
|
11
|
+
var navigate = _a.navigate, children = _a.children, apiUrl = _a.apiUrl;
|
|
12
12
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
13
13
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).cart;
|
|
14
14
|
var cart = (0, hooks_1.useAppSelector)(slices_1.selectOrder).cart;
|
|
15
|
-
var
|
|
15
|
+
var _b = (0, hooks_1.useAppSelector)(slices_1.selectCartTotals), count = _b.count, total = _b.total;
|
|
16
16
|
var isOpen = (0, hooks_1.useAppSelector)(slices_1.selectCartSummary).isOpen;
|
|
17
17
|
var isEmpty = !cart.length;
|
|
18
18
|
var toggleCart = function () { return dispatch((0, slices_1.toggleCartSummary)()); };
|
|
@@ -23,8 +23,8 @@ var Cart = function (_a) {
|
|
|
23
23
|
return;
|
|
24
24
|
dispatch((0, slices_1.closeCartSummary)());
|
|
25
25
|
}, [dispatch, isOpen, isEmpty]);
|
|
26
|
-
var renderCartItem = function (item, isLast) { return (react_1.default.createElement(CartItem_1.default, { navigate: navigate, item: item, isLast: isLast, children: ui_1.CartItem })); };
|
|
27
|
-
var renderCartUpsells = function () { return (react_1.default.createElement(CartUpsells_1.default, { children: ui_1.CartUpsells })); };
|
|
26
|
+
var renderCartItem = function (item, isLast) { return (react_1.default.createElement(CartItem_1.default, { navigate: navigate, item: item, isLast: isLast, children: ui_1.CartItem, apiUrl: apiUrl })); };
|
|
27
|
+
var renderCartUpsells = function () { return (react_1.default.createElement(CartUpsells_1.default, { apiUrl: apiUrl, children: ui_1.CartUpsells })); };
|
|
28
28
|
if (!config)
|
|
29
29
|
return null;
|
|
30
30
|
return children({
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CartItem as CartItemType } from '@open-tender/types';
|
|
2
2
|
import { CartItemProps } from '@open-tender/ui';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
|
-
declare const CartItem: ({ item, isLast, isEditable, navigate, children }: {
|
|
4
|
+
declare const CartItem: ({ item, isLast, isEditable, navigate, children, apiUrl }: {
|
|
5
5
|
item: CartItemType;
|
|
6
6
|
isLast?: boolean;
|
|
7
7
|
isEditable?: boolean;
|
|
8
8
|
navigate: (route: string) => void;
|
|
9
|
-
children
|
|
9
|
+
children: (props: CartItemProps) => ReactNode;
|
|
10
|
+
apiUrl: string;
|
|
10
11
|
}) => React.ReactNode;
|
|
11
12
|
export default CartItem;
|
|
@@ -7,7 +7,7 @@ var hooks_1 = require("../app/hooks");
|
|
|
7
7
|
var slices_1 = require("../slices");
|
|
8
8
|
var Quantity_1 = tslib_1.__importDefault(require("./Quantity"));
|
|
9
9
|
var CartItem = function (_a) {
|
|
10
|
-
var item = _a.item, _b = _a.isLast, isLast = _b === void 0 ? false : _b, _c = _a.isEditable, isEditable = _c === void 0 ? true : _c, navigate = _a.navigate,
|
|
10
|
+
var item = _a.item, _b = _a.isLast, isLast = _b === void 0 ? false : _b, _c = _a.isEditable, isEditable = _c === void 0 ? true : _c, navigate = _a.navigate, children = _a.children, apiUrl = _a.apiUrl;
|
|
11
11
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
12
12
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).cartItem;
|
|
13
13
|
var increment = function () { return dispatch((0, slices_1.incrementItemInCart)(item)); };
|
|
@@ -25,7 +25,8 @@ var CartItem = function (_a) {
|
|
|
25
25
|
handlers: handlers,
|
|
26
26
|
isLast: isLast,
|
|
27
27
|
isEditable: isEditable,
|
|
28
|
-
renderQuantity: renderQuantity
|
|
28
|
+
renderQuantity: renderQuantity,
|
|
29
|
+
apiUrl: apiUrl
|
|
29
30
|
});
|
|
30
31
|
};
|
|
31
32
|
exports.default = CartItem;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { CartItem } from '@open-tender/types';
|
|
2
2
|
import { CartUpsellItemProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const CartUpsellItem: ({ item, callback, isLast, children }: {
|
|
4
|
+
declare const CartUpsellItem: ({ item, callback, isLast, children, apiUrl }: {
|
|
5
5
|
item: CartItem;
|
|
6
6
|
callback?: () => void;
|
|
7
7
|
isLast?: boolean;
|
|
8
|
-
children
|
|
8
|
+
children: (props: CartUpsellItemProps) => ReactNode;
|
|
9
|
+
apiUrl: string;
|
|
9
10
|
}) => ReactNode;
|
|
10
11
|
export default CartUpsellItem;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var utils_1 = require("@open-tender/utils");
|
|
5
4
|
var hooks_1 = require("../app/hooks");
|
|
6
5
|
var slices_1 = require("../slices");
|
|
7
6
|
var CartUpsellItem = function (_a) {
|
|
8
|
-
var item = _a.item, callback = _a.callback, isLast = _a.isLast,
|
|
7
|
+
var item = _a.item, callback = _a.callback, isLast = _a.isLast, children = _a.children, apiUrl = _a.apiUrl;
|
|
9
8
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
10
|
-
var
|
|
9
|
+
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _b.cartUpsellItem, cardConfig = _b.card;
|
|
11
10
|
var builtItem = (0, utils_1.useBuilder)(item).item;
|
|
12
11
|
var quantity = builtItem.quantity, groups = builtItem.groups;
|
|
13
12
|
var groupsBelowMin = (0, utils_1.hasGroupsBelowMin)(null, groups);
|
|
@@ -20,6 +19,6 @@ var CartUpsellItem = function (_a) {
|
|
|
20
19
|
}
|
|
21
20
|
};
|
|
22
21
|
var handlers = { add: add };
|
|
23
|
-
return children({ config: config, handlers: handlers, item: item, isLast: isLast, cardConfig: cardConfig });
|
|
22
|
+
return children({ config: config, handlers: handlers, item: item, isLast: isLast, cardConfig: cardConfig, apiUrl: apiUrl });
|
|
24
23
|
};
|
|
25
24
|
exports.default = CartUpsellItem;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CartUpsellsProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
-
declare const CartUpsells: ({ children }: {
|
|
4
|
-
children
|
|
3
|
+
declare const CartUpsells: ({ children, apiUrl }: {
|
|
4
|
+
children: (props: CartUpsellsProps) => ReactNode;
|
|
5
|
+
apiUrl: string;
|
|
5
6
|
}) => React.ReactNode;
|
|
6
7
|
export default CartUpsells;
|
|
@@ -8,12 +8,12 @@ var hooks_1 = require("../app/hooks");
|
|
|
8
8
|
var slices_1 = require("../slices");
|
|
9
9
|
var CartUpsellItem_1 = tslib_1.__importDefault(require("./CartUpsellItem"));
|
|
10
10
|
var CartUpsells = function (_a) {
|
|
11
|
-
var
|
|
11
|
+
var children = _a.children, apiUrl = _a.apiUrl;
|
|
12
12
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).cartUpsells;
|
|
13
13
|
var cartIds = (0, hooks_1.useAppSelector)(slices_1.selectCartIds);
|
|
14
|
-
var
|
|
14
|
+
var _b = (0, hooks_1.useAppSelector)(slices_1.selectMenu), categories = _b.categories, soldOut = _b.soldOut;
|
|
15
15
|
var upsellItems = (0, react_1.useMemo)(function () { return (0, utils_1.makeUpsellItemsForCart)(categories, cartIds, soldOut); }, [categories, cartIds, soldOut]);
|
|
16
|
-
var renderCartUpsellItem = function (item, isLast) { return (react_1.default.createElement(CartUpsellItem_1.default, { item: item, isLast: isLast, children: ui_1.CartUpsellItem })); };
|
|
16
|
+
var renderCartUpsellItem = function (item, isLast) { return (react_1.default.createElement(CartUpsellItem_1.default, { item: item, isLast: isLast, children: ui_1.CartUpsellItem, apiUrl: apiUrl })); };
|
|
17
17
|
if (!upsellItems.length)
|
|
18
18
|
return null;
|
|
19
19
|
return children({
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { MenuItem, MenuItemFavorite } from '@open-tender/types';
|
|
2
2
|
import { CategoryItemProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const CategoryItem: ({ item, favorite, allergenAlerts, navigate, children }: {
|
|
4
|
+
declare const CategoryItem: ({ item, favorite, allergenAlerts, navigate, children, apiUrl }: {
|
|
5
5
|
item: MenuItem;
|
|
6
6
|
favorite?: MenuItemFavorite;
|
|
7
7
|
allergenAlerts?: string[];
|
|
8
8
|
navigate: (route: string) => void;
|
|
9
|
-
children
|
|
9
|
+
children: (props: CategoryItemProps) => ReactNode;
|
|
10
|
+
apiUrl: string;
|
|
10
11
|
}) => ReactNode;
|
|
11
12
|
export default CategoryItem;
|
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var tslib_1 = require("tslib");
|
|
4
|
-
var ui_1 = require("@open-tender/ui");
|
|
5
4
|
var utils_1 = require("@open-tender/utils");
|
|
6
5
|
var hooks_1 = require("../app/hooks");
|
|
7
6
|
var slices_1 = require("../slices");
|
|
8
7
|
var CategoryItem = function (_a) {
|
|
9
|
-
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, navigate = _a.navigate,
|
|
8
|
+
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, navigate = _a.navigate, children = _a.children, apiUrl = _a.apiUrl;
|
|
10
9
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
11
10
|
var categoryItem = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).categoryItem;
|
|
12
11
|
var soldOut = (0, hooks_1.useAppSelector)(slices_1.selectMenu).soldOut;
|
|
13
12
|
var cartCounts = (0, hooks_1.useAppSelector)(slices_1.selectCartCounts);
|
|
14
13
|
var hasPoints = false;
|
|
15
14
|
var displaySettings = {};
|
|
16
|
-
var
|
|
15
|
+
var _b = displaySettings || {}, _c = _b.calories, showCals = _c === void 0 ? false : _c, _d = _b.tags, showTags = _d === void 0 ? false : _d, _e = _b.allergens, showAllergens = _e === void 0 ? false : _e;
|
|
17
16
|
var showDesc = 'SHOW';
|
|
18
17
|
var orderItem = favorite
|
|
19
18
|
? tslib_1.__assign(tslib_1.__assign({}, (0, utils_1.rehydrateOrderItem)(item, favorite.item)), { index: -1 }) : (0, utils_1.makeOrderItem)(item, undefined, soldOut, undefined, hasPoints);
|
|
@@ -23,6 +22,6 @@ var CategoryItem = function (_a) {
|
|
|
23
22
|
navigate('/menu/item');
|
|
24
23
|
};
|
|
25
24
|
var handlers = { browse: browse };
|
|
26
|
-
return children({ item: cartItem, config: categoryItem, handlers: handlers });
|
|
25
|
+
return children({ item: cartItem, config: categoryItem, handlers: handlers, apiUrl: apiUrl });
|
|
27
26
|
};
|
|
28
27
|
exports.default = CategoryItem;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { CategoryNavProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
-
declare const CategoryNav: ({ children, navigate }: {
|
|
4
|
-
children
|
|
3
|
+
declare const CategoryNav: ({ children, navigate, apiUrl }: {
|
|
4
|
+
children: (props: CategoryNavProps) => ReactNode;
|
|
5
5
|
navigate: (route: string) => void;
|
|
6
|
+
apiUrl: string;
|
|
6
7
|
}) => React.ReactNode;
|
|
7
8
|
export default CategoryNav;
|
|
@@ -8,11 +8,11 @@ var slices_1 = require("../slices");
|
|
|
8
8
|
var CategoryNavItem_1 = tslib_1.__importDefault(require("./CategoryNavItem"));
|
|
9
9
|
var CategoryNavOther_1 = tslib_1.__importDefault(require("./CategoryNavOther"));
|
|
10
10
|
var CategoryNav = function (_a) {
|
|
11
|
-
var
|
|
11
|
+
var children = _a.children, navigate = _a.navigate, apiUrl = _a.apiUrl;
|
|
12
12
|
var categoryNav = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).categoryNav;
|
|
13
|
-
var
|
|
14
|
-
var renderCategoryNavOther = function (title, path) { return (react_1.default.createElement(CategoryNavOther_1.default, { navigate: navigate, title: title, path: path, children: ui_1.CategoryNavOther })); };
|
|
15
|
-
var renderCategoryNavItem = function (item) { return (react_1.default.createElement(CategoryNavItem_1.default, { navigate: navigate, category: item, children: ui_1.CategoryNavItem })); };
|
|
13
|
+
var _b = (0, hooks_1.useAppSelector)(slices_1.selectMenu), categories = _b.categories, featured = _b.featured, favorites = _b.favorites, recents = _b.recents;
|
|
14
|
+
var renderCategoryNavOther = function (title, path) { return (react_1.default.createElement(CategoryNavOther_1.default, { apiUrl: apiUrl, navigate: navigate, title: title, path: path, children: ui_1.CategoryNavOther })); };
|
|
15
|
+
var renderCategoryNavItem = function (item) { return (react_1.default.createElement(CategoryNavItem_1.default, { apiUrl: apiUrl, navigate: navigate, category: item, children: ui_1.CategoryNavItem })); };
|
|
16
16
|
return children({
|
|
17
17
|
config: categoryNav,
|
|
18
18
|
categories: categories,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { MenuCategory } from '@open-tender/types';
|
|
2
2
|
import { CategoryNavItemProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const CategoryNavItem: ({ category, children, navigate }: {
|
|
4
|
+
declare const CategoryNavItem: ({ category, children, navigate, apiUrl }: {
|
|
5
5
|
category: MenuCategory;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
|
-
children
|
|
7
|
+
children: (props: CategoryNavItemProps) => ReactNode;
|
|
8
|
+
apiUrl: string;
|
|
8
9
|
}) => ReactNode;
|
|
9
10
|
export default CategoryNavItem;
|
|
@@ -4,11 +4,11 @@ var ui_1 = require("@open-tender/ui");
|
|
|
4
4
|
var hooks_1 = require("../app/hooks");
|
|
5
5
|
var slices_1 = require("../slices");
|
|
6
6
|
var CategoryNavItem = function (_a) {
|
|
7
|
-
var category = _a.category,
|
|
7
|
+
var category = _a.category, children = _a.children, navigate = _a.navigate, apiUrl = _a.apiUrl;
|
|
8
8
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
9
9
|
var current = (0, hooks_1.useAppSelector)(slices_1.selectCurrentCategory);
|
|
10
10
|
var isCurrent = (current === null || current === void 0 ? void 0 : current.id) === category.id;
|
|
11
|
-
var
|
|
11
|
+
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), categoryNavItem = _b.categoryNavItem, categoryNavItemSelected = _b.categoryNavItemSelected;
|
|
12
12
|
var config = isCurrent ? categoryNavItemSelected : categoryNavItem;
|
|
13
13
|
var name = category.name;
|
|
14
14
|
var imageUrl = (0, ui_1.makeImageUrl)(category);
|
|
@@ -21,7 +21,8 @@ var CategoryNavItem = function (_a) {
|
|
|
21
21
|
config: config,
|
|
22
22
|
handlers: handlers,
|
|
23
23
|
title: name,
|
|
24
|
-
imageUrl: imageUrl
|
|
24
|
+
imageUrl: imageUrl,
|
|
25
|
+
apiUrl: apiUrl
|
|
25
26
|
});
|
|
26
27
|
};
|
|
27
28
|
exports.default = CategoryNavItem;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CategoryNavOtherProps } from '@open-tender/ui';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
declare const CategoryNavOther: ({ title, path, navigate, children }: {
|
|
3
|
+
declare const CategoryNavOther: ({ title, path, navigate, children, apiUrl }: {
|
|
4
4
|
title: string;
|
|
5
5
|
path: string;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
|
-
children
|
|
7
|
+
children: (props: CategoryNavOtherProps) => ReactNode;
|
|
8
|
+
apiUrl: string;
|
|
8
9
|
}) => ReactNode;
|
|
9
10
|
export default CategoryNavOther;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var CategoryNavOther = function (_a) {
|
|
7
|
-
var title = _a.title, path = _a.path, navigate = _a.navigate,
|
|
6
|
+
var title = _a.title, path = _a.path, navigate = _a.navigate, children = _a.children, apiUrl = _a.apiUrl;
|
|
8
7
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
9
|
-
var
|
|
8
|
+
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), categoryNavItem = _b.categoryNavItem, categoryNavItemSelected = _b.categoryNavItemSelected;
|
|
10
9
|
var currentSection = (0, hooks_1.useAppSelector)(slices_1.selectCurrentSection);
|
|
11
10
|
var isCurrent = path === currentSection;
|
|
12
11
|
var config = isCurrent ? categoryNavItemSelected : categoryNavItem;
|
|
@@ -15,6 +14,6 @@ var CategoryNavOther = function (_a) {
|
|
|
15
14
|
navigate(path);
|
|
16
15
|
};
|
|
17
16
|
var handlers = { browse: browse };
|
|
18
|
-
return children({ config: config, handlers: handlers, title: title, imageUrl: null });
|
|
17
|
+
return children({ config: config, handlers: handlers, title: title, imageUrl: null, apiUrl: apiUrl });
|
|
19
18
|
};
|
|
20
19
|
exports.default = CategoryNavOther;
|
|
@@ -3,6 +3,6 @@ import { CheckTotalsProps } from '@open-tender/ui';
|
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
declare const CheckTotals: ({ check, children }: {
|
|
5
5
|
check: Order;
|
|
6
|
-
children
|
|
6
|
+
children: (props: CheckTotalsProps) => ReactNode;
|
|
7
7
|
}) => ReactNode;
|
|
8
8
|
export default CheckTotals;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var CheckTotals = function (_a) {
|
|
7
|
-
var check = _a.check,
|
|
6
|
+
var check = _a.check, children = _a.children;
|
|
8
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).checkTotals;
|
|
9
8
|
return children({ config: config, check: check });
|
|
10
9
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Discount as DiscountType } from '@open-tender/types';
|
|
2
2
|
import { DiscountProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const Discount: ({ discount, children }: {
|
|
4
|
+
declare const Discount: ({ discount, children, apiUrl }: {
|
|
5
5
|
discount: DiscountType;
|
|
6
|
-
children
|
|
6
|
+
children: (props: DiscountProps) => ReactNode;
|
|
7
|
+
apiUrl: string;
|
|
7
8
|
}) => ReactNode;
|
|
8
9
|
export default Discount;
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var Discount = function (_a) {
|
|
7
|
-
var discount = _a.discount,
|
|
8
|
-
var
|
|
6
|
+
var discount = _a.discount, children = _a.children, apiUrl = _a.apiUrl;
|
|
7
|
+
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _b.discount, cardConfig = _b.card;
|
|
9
8
|
if (!config)
|
|
10
9
|
return null;
|
|
11
|
-
return children({ config: config, discount: discount, cardConfig: cardConfig });
|
|
10
|
+
return children({ config: config, discount: discount, cardConfig: cardConfig, apiUrl: apiUrl });
|
|
12
11
|
};
|
|
13
12
|
exports.default = Discount;
|
|
@@ -4,6 +4,6 @@ declare const ErrorMessage: ({ content, icon, style, children }: {
|
|
|
4
4
|
content: string;
|
|
5
5
|
icon?: ReactNode;
|
|
6
6
|
style?: Styles;
|
|
7
|
-
children
|
|
7
|
+
children: (props: ErrorMessageProps) => ReactNode;
|
|
8
8
|
}) => ReactNode;
|
|
9
9
|
export default ErrorMessage;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var ErrorMessage = function (_a) {
|
|
7
|
-
var content = _a.content, icon = _a.icon, style = _a.style,
|
|
6
|
+
var content = _a.content, icon = _a.icon, style = _a.style, children = _a.children;
|
|
8
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).errorMessage;
|
|
9
8
|
return children({ config: config, icon: icon, style: style, children: content });
|
|
10
9
|
};
|
|
@@ -4,6 +4,6 @@ declare const Header: ({ to, pathname, navigate, children }: {
|
|
|
4
4
|
to?: string;
|
|
5
5
|
pathname: string;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
|
-
children
|
|
7
|
+
children: (props: HeaderProps) => ReactNode;
|
|
8
8
|
}) => React.ReactNode;
|
|
9
9
|
export default Header;
|
|
@@ -7,7 +7,7 @@ var hooks_1 = require("../app/hooks");
|
|
|
7
7
|
var slices_1 = require("../slices");
|
|
8
8
|
var SignInButton_1 = tslib_1.__importDefault(require("./SignInButton"));
|
|
9
9
|
var Header = function (_a) {
|
|
10
|
-
var to = _a.to, pathname = _a.pathname, navigate = _a.navigate,
|
|
10
|
+
var to = _a.to, pathname = _a.pathname, navigate = _a.navigate, children = _a.children;
|
|
11
11
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
12
12
|
var header = ((0, hooks_1.useAppSelector)(slices_1.selectKioskConfig) || {}).header;
|
|
13
13
|
var back = function () {
|
|
@@ -5,6 +5,6 @@ declare const Ingredients: ({ title, subtitle, ingredients, close, children }: {
|
|
|
5
5
|
subtitle?: string;
|
|
6
6
|
ingredients: string;
|
|
7
7
|
close: () => void;
|
|
8
|
-
children
|
|
8
|
+
children: (props: IngredientsProps) => ReactNode;
|
|
9
9
|
}) => ReactNode;
|
|
10
10
|
export default Ingredients;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var Ingredients = function (_a) {
|
|
7
|
-
var title = _a.title, subtitle = _a.subtitle, ingredients = _a.ingredients, close = _a.close,
|
|
6
|
+
var title = _a.title, subtitle = _a.subtitle, ingredients = _a.ingredients, close = _a.close, children = _a.children;
|
|
8
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).ingredients;
|
|
9
8
|
var handlers = { close: close };
|
|
10
9
|
return children({ config: config, handlers: handlers, title: title, subtitle: subtitle, ingredients: ingredients });
|
|
@@ -6,6 +6,6 @@ declare const Input: ({ label, value, setValue, isRequired, style, children }: {
|
|
|
6
6
|
setValue: (value: string) => void;
|
|
7
7
|
isRequired?: boolean;
|
|
8
8
|
style?: Styles;
|
|
9
|
-
children
|
|
9
|
+
children: (props: InputProps) => ReactNode;
|
|
10
10
|
}) => ReactNode;
|
|
11
11
|
export default Input;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var ui_1 = require("@open-tender/ui");
|
|
4
3
|
var hooks_1 = require("../app/hooks");
|
|
5
4
|
var slices_1 = require("../slices");
|
|
6
5
|
var Input = function (_a) {
|
|
7
|
-
var label = _a.label, value = _a.value, setValue = _a.setValue, isRequired = _a.isRequired, style = _a.style,
|
|
8
|
-
var
|
|
6
|
+
var label = _a.label, value = _a.value, setValue = _a.setValue, isRequired = _a.isRequired, style = _a.style, children = _a.children;
|
|
7
|
+
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _b.input, labelConfig = _b.label;
|
|
9
8
|
var update = function (evt) {
|
|
10
9
|
setValue(evt.target.value);
|
|
11
10
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CartItemGroup } from '@open-tender/types';
|
|
2
2
|
import { ItemGroupProps } from '@open-tender/ui';
|
|
3
|
-
import { ReactNode } from 'react';
|
|
3
|
+
import React, { ReactNode } from 'react';
|
|
4
4
|
declare const ItemGroup: ({ group, content, children }: {
|
|
5
5
|
group: CartItemGroup;
|
|
6
6
|
content: ReactNode;
|
|
7
|
-
children
|
|
8
|
-
}) => ReactNode;
|
|
7
|
+
children: (props: ItemGroupProps) => ReactNode;
|
|
8
|
+
}) => React.ReactNode;
|
|
9
9
|
export default ItemGroup;
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
3
4
|
var ui_1 = require("@open-tender/ui");
|
|
4
5
|
var utils_1 = require("@open-tender/utils");
|
|
6
|
+
var react_1 = tslib_1.__importDefault(require("react"));
|
|
5
7
|
var hooks_1 = require("../app/hooks");
|
|
6
8
|
var slices_1 = require("../slices");
|
|
9
|
+
var ErrorMessage_1 = tslib_1.__importDefault(require("./ErrorMessage"));
|
|
10
|
+
var SuccessMessage_1 = tslib_1.__importDefault(require("./SuccessMessage"));
|
|
7
11
|
var ItemGroup = function (_a) {
|
|
8
|
-
var group = _a.group, content = _a.content,
|
|
9
|
-
var
|
|
12
|
+
var group = _a.group, content = _a.content, children = _a.children;
|
|
13
|
+
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).itemGroup;
|
|
10
14
|
var modifierGroup = (0, utils_1.useModifierGroup)(group);
|
|
15
|
+
var renderErrorMessage = function (icon, children) { return (react_1.default.createElement(ErrorMessage_1.default, { icon: icon, content: children, children: ui_1.ErrorMessage })); };
|
|
16
|
+
var renderSuccessMessage = function (icon, children) { return (react_1.default.createElement(SuccessMessage_1.default, { icon: icon, content: children, children: ui_1.SuccessMessage })); };
|
|
11
17
|
return children({
|
|
12
18
|
config: config,
|
|
13
19
|
group: modifierGroup,
|
|
14
20
|
children: content,
|
|
15
|
-
|
|
16
|
-
|
|
21
|
+
renderErrorMessage: renderErrorMessage,
|
|
22
|
+
renderSuccessMessage: renderSuccessMessage
|
|
17
23
|
});
|
|
18
24
|
};
|
|
19
25
|
exports.default = ItemGroup;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CartItemGroups, CartLevels } from '@open-tender/types';
|
|
2
2
|
import { Handlers, ItemGroupsProps } from '@open-tender/ui';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
|
-
declare const ItemGroups: ({ handlers, groups, levels, excludeSize, children }: {
|
|
4
|
+
declare const ItemGroups: ({ handlers, groups, levels, excludeSize, children, apiUrl }: {
|
|
5
5
|
handlers: Handlers;
|
|
6
6
|
groups: CartItemGroups;
|
|
7
7
|
levels: CartLevels;
|
|
8
8
|
excludeSize?: boolean;
|
|
9
|
-
children
|
|
9
|
+
children: (props: ItemGroupsProps) => ReactNode;
|
|
10
|
+
apiUrl: string;
|
|
10
11
|
}) => React.ReactNode;
|
|
11
12
|
export default ItemGroups;
|
|
@@ -8,9 +8,9 @@ var slices_1 = require("../slices");
|
|
|
8
8
|
var ItemGroup_1 = tslib_1.__importDefault(require("./ItemGroup"));
|
|
9
9
|
var ItemOption_1 = tslib_1.__importDefault(require("./ItemOption"));
|
|
10
10
|
var ItemGroups = function (_a) {
|
|
11
|
-
var handlers = _a.handlers, groups = _a.groups, levels = _a.levels, _b = _a.excludeSize, excludeSize = _b === void 0 ? true : _b,
|
|
11
|
+
var handlers = _a.handlers, groups = _a.groups, levels = _a.levels, _b = _a.excludeSize, excludeSize = _b === void 0 ? true : _b, children = _a.children, apiUrl = _a.apiUrl;
|
|
12
12
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).itemGroups;
|
|
13
|
-
var renderItemOption = function (group, option) { return (react_1.default.createElement(ItemOption_1.default, { levels: levels, handlers: handlers, group: group, option: option, children: ui_1.ItemOption })); };
|
|
13
|
+
var renderItemOption = function (group, option) { return (react_1.default.createElement(ItemOption_1.default, { apiUrl: apiUrl, levels: levels, handlers: handlers, group: group, option: option, children: ui_1.ItemOption })); };
|
|
14
14
|
var renderItemGroup = function (group, content) { return (react_1.default.createElement(ItemGroup_1.default, { group: group, content: content, children: ui_1.ItemGroup })); };
|
|
15
15
|
if (!config)
|
|
16
16
|
return null;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { CartItemGroup, CartItemOption, CartLevels } from '@open-tender/types';
|
|
2
2
|
import { Handlers, ItemOptionProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const ItemOption: ({ handlers, group, option, levels, children }: {
|
|
4
|
+
declare const ItemOption: ({ handlers, group, option, levels, children, apiUrl }: {
|
|
5
5
|
handlers: Handlers;
|
|
6
6
|
group: CartItemGroup;
|
|
7
7
|
option: CartItemOption;
|
|
8
8
|
levels: CartLevels;
|
|
9
|
-
children
|
|
9
|
+
children: (props: ItemOptionProps) => ReactNode;
|
|
10
|
+
apiUrl: string;
|
|
10
11
|
}) => ReactNode;
|
|
11
12
|
export default ItemOption;
|