@open-tender/store 1.1.5 → 1.1.6
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 +2 -1
- package/dist/cjs/components/Applied.d.ts +1 -1
- package/dist/cjs/components/Applied.js +2 -1
- package/dist/cjs/components/ButtonLink.d.ts +1 -1
- package/dist/cjs/components/ButtonLink.js +2 -1
- package/dist/cjs/components/Card.d.ts +1 -1
- package/dist/cjs/components/Card.js +2 -1
- package/dist/cjs/components/Cart.d.ts +1 -1
- package/dist/cjs/components/Cart.js +2 -2
- package/dist/cjs/components/CartItem.d.ts +1 -1
- package/dist/cjs/components/CartItem.js +1 -1
- package/dist/cjs/components/CartUpsellItem.d.ts +1 -1
- package/dist/cjs/components/CartUpsellItem.js +3 -2
- package/dist/cjs/components/CartUpsells.d.ts +1 -1
- package/dist/cjs/components/CartUpsells.js +2 -2
- package/dist/cjs/components/CategoryItem.d.ts +1 -1
- package/dist/cjs/components/CategoryItem.js +3 -2
- package/dist/cjs/components/CategoryNav.d.ts +1 -1
- package/dist/cjs/components/CategoryNav.js +2 -2
- package/dist/cjs/components/CategoryNavItem.d.ts +1 -1
- package/dist/cjs/components/CategoryNavItem.js +2 -2
- package/dist/cjs/components/CategoryNavOther.d.ts +1 -1
- package/dist/cjs/components/CategoryNavOther.js +3 -2
- package/dist/cjs/components/CheckTotals.d.ts +1 -1
- package/dist/cjs/components/CheckTotals.js +2 -1
- package/dist/cjs/components/Discount.d.ts +1 -1
- package/dist/cjs/components/Discount.js +3 -2
- package/dist/cjs/components/ErrorMessage.d.ts +1 -1
- package/dist/cjs/components/ErrorMessage.js +2 -1
- 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 +2 -1
- package/dist/cjs/components/Input.d.ts +1 -1
- package/dist/cjs/components/Input.js +3 -2
- package/dist/cjs/components/ItemGroup.d.ts +1 -1
- package/dist/cjs/components/ItemGroup.js +3 -2
- package/dist/cjs/components/ItemGroups.d.ts +1 -1
- package/dist/cjs/components/ItemGroups.js +1 -1
- package/dist/cjs/components/ItemOption.d.ts +1 -1
- package/dist/cjs/components/ItemOption.js +3 -2
- package/dist/cjs/components/ItemSelections.d.ts +1 -1
- package/dist/cjs/components/ItemSelections.js +1 -1
- package/dist/cjs/components/Label.d.ts +1 -1
- package/dist/cjs/components/Label.js +2 -1
- package/dist/cjs/components/Loader.d.ts +1 -1
- package/dist/cjs/components/Loader.js +2 -1
- 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 +2 -1
- package/dist/cjs/components/MenuOther.d.ts +1 -1
- package/dist/cjs/components/MenuOther.js +2 -1
- package/dist/cjs/components/Modal.d.ts +1 -1
- package/dist/cjs/components/Modal.js +2 -1
- package/dist/cjs/components/ModalContent.d.ts +1 -1
- package/dist/cjs/components/ModalContent.js +2 -1
- package/dist/cjs/components/ModalHeader.d.ts +1 -1
- package/dist/cjs/components/ModalHeader.js +2 -1
- package/dist/cjs/components/NutritionalInfo.d.ts +1 -1
- package/dist/cjs/components/NutritionalInfo.js +3 -2
- package/dist/cjs/components/Option.d.ts +1 -1
- package/dist/cjs/components/Option.js +2 -2
- package/dist/cjs/components/OrderCard.d.ts +1 -1
- package/dist/cjs/components/OrderCard.js +6 -6
- package/dist/cjs/components/PointsReward.d.ts +1 -1
- package/dist/cjs/components/PointsReward.js +4 -4
- package/dist/cjs/components/PointsRewards.d.ts +1 -1
- package/dist/cjs/components/PointsRewards.js +2 -2
- package/dist/cjs/components/index.d.ts +2 -1
- package/dist/cjs/components/index.js +3 -1
- package/dist/esm/components/Allergen.d.ts +1 -1
- package/dist/esm/components/Allergen.js +2 -1
- package/dist/esm/components/Applied.d.ts +1 -1
- package/dist/esm/components/Applied.js +2 -1
- package/dist/esm/components/ButtonLink.d.ts +1 -1
- package/dist/esm/components/ButtonLink.js +2 -1
- package/dist/esm/components/Card.d.ts +1 -1
- package/dist/esm/components/Card.js +2 -1
- package/dist/esm/components/Cart.d.ts +1 -1
- package/dist/esm/components/Cart.js +3 -3
- package/dist/esm/components/CartItem.d.ts +1 -1
- package/dist/esm/components/CartItem.js +2 -2
- package/dist/esm/components/CartUpsellItem.d.ts +1 -1
- package/dist/esm/components/CartUpsellItem.js +3 -2
- package/dist/esm/components/CartUpsells.d.ts +1 -1
- package/dist/esm/components/CartUpsells.js +3 -3
- package/dist/esm/components/CategoryItem.d.ts +1 -1
- package/dist/esm/components/CategoryItem.js +3 -2
- package/dist/esm/components/CategoryNav.d.ts +1 -1
- package/dist/esm/components/CategoryNav.js +3 -3
- package/dist/esm/components/CategoryNavItem.d.ts +1 -1
- package/dist/esm/components/CategoryNavItem.js +3 -3
- package/dist/esm/components/CategoryNavOther.d.ts +1 -1
- package/dist/esm/components/CategoryNavOther.js +3 -2
- package/dist/esm/components/CheckTotals.d.ts +1 -1
- package/dist/esm/components/CheckTotals.js +2 -1
- package/dist/esm/components/Discount.d.ts +1 -1
- package/dist/esm/components/Discount.js +3 -2
- package/dist/esm/components/ErrorMessage.d.ts +1 -1
- package/dist/esm/components/ErrorMessage.js +2 -1
- 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 +2 -1
- package/dist/esm/components/Input.d.ts +1 -1
- package/dist/esm/components/Input.js +3 -2
- package/dist/esm/components/ItemGroup.d.ts +1 -1
- package/dist/esm/components/ItemGroup.js +3 -2
- package/dist/esm/components/ItemGroups.d.ts +1 -1
- package/dist/esm/components/ItemGroups.js +2 -2
- package/dist/esm/components/ItemOption.d.ts +1 -1
- package/dist/esm/components/ItemOption.js +3 -2
- package/dist/esm/components/ItemSelections.d.ts +1 -1
- package/dist/esm/components/ItemSelections.js +2 -2
- package/dist/esm/components/Label.d.ts +1 -1
- package/dist/esm/components/Label.js +2 -1
- package/dist/esm/components/Loader.d.ts +1 -1
- package/dist/esm/components/Loader.js +2 -1
- 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 +2 -1
- package/dist/esm/components/MenuOther.d.ts +1 -1
- package/dist/esm/components/MenuOther.js +2 -1
- package/dist/esm/components/Modal.d.ts +1 -1
- package/dist/esm/components/Modal.js +2 -1
- package/dist/esm/components/ModalContent.d.ts +1 -1
- package/dist/esm/components/ModalContent.js +2 -1
- package/dist/esm/components/ModalHeader.d.ts +1 -1
- package/dist/esm/components/ModalHeader.js +2 -1
- package/dist/esm/components/NutritionalInfo.d.ts +1 -1
- package/dist/esm/components/NutritionalInfo.js +3 -2
- package/dist/esm/components/Option.d.ts +1 -1
- package/dist/esm/components/Option.js +3 -3
- package/dist/esm/components/OrderCard.d.ts +1 -1
- package/dist/esm/components/OrderCard.js +7 -7
- package/dist/esm/components/PointsReward.d.ts +1 -1
- package/dist/esm/components/PointsReward.js +5 -5
- package/dist/esm/components/PointsRewards.d.ts +1 -1
- package/dist/esm/components/PointsRewards.js +3 -3
- package/dist/esm/components/index.d.ts +2 -1
- package/dist/esm/components/index.js +2 -1
- package/package.json +3 -3
|
@@ -7,6 +7,6 @@ declare const MenuOther: ({ title, subtitle, path, item, children, navigate }: {
|
|
|
7
7
|
path: string;
|
|
8
8
|
item: MenuItem;
|
|
9
9
|
navigate: (route: string) => void;
|
|
10
|
-
children
|
|
10
|
+
children?: (props: MenuOtherProps) => ReactNode;
|
|
11
11
|
}) => ReactNode;
|
|
12
12
|
export default MenuOther;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ui_1 = require("@open-tender/ui");
|
|
3
4
|
var hooks_1 = require("../app/hooks");
|
|
4
5
|
var slices_1 = require("../slices");
|
|
5
6
|
var MenuOther = function (_a) {
|
|
6
|
-
var title = _a.title, subtitle = _a.subtitle, path = _a.path, item = _a.item,
|
|
7
|
+
var title = _a.title, subtitle = _a.subtitle, path = _a.path, item = _a.item, _b = _a.children, children = _b === void 0 ? ui_1.MenuOther : _b, navigate = _a.navigate;
|
|
7
8
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
8
9
|
var menuCategory = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).menuCategory;
|
|
9
10
|
var browse = function () {
|
|
@@ -4,6 +4,6 @@ declare const Modal: ({ show, close, content, children }: {
|
|
|
4
4
|
show: boolean;
|
|
5
5
|
close: () => void;
|
|
6
6
|
content: ReactNode;
|
|
7
|
-
children
|
|
7
|
+
children?: (props: ModalProps) => ReactNode;
|
|
8
8
|
}) => React.JSX.Element | null;
|
|
9
9
|
export default Modal;
|
|
@@ -1,12 +1,13 @@
|
|
|
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");
|
|
4
5
|
var react_1 = tslib_1.__importDefault(require("react"));
|
|
5
6
|
var react_transition_group_1 = require("react-transition-group");
|
|
6
7
|
var hooks_1 = require("../app/hooks");
|
|
7
8
|
var slices_1 = require("../slices");
|
|
8
9
|
var Modal = function (_a) {
|
|
9
|
-
var show = _a.show, close = _a.close, content = _a.content,
|
|
10
|
+
var show = _a.show, close = _a.close, content = _a.content, _b = _a.children, children = _b === void 0 ? ui_1.Modal : _b;
|
|
10
11
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).modal;
|
|
11
12
|
var handlers = { close: close };
|
|
12
13
|
if (!config)
|
|
@@ -9,6 +9,6 @@ declare const ModalContent: ({ title, subtitle, content, submit, submitText, can
|
|
|
9
9
|
cancel: () => void;
|
|
10
10
|
cancelText?: string;
|
|
11
11
|
style?: Styles;
|
|
12
|
-
children
|
|
12
|
+
children?: (props: ModalContentProps) => ReactNode;
|
|
13
13
|
}) => ReactNode;
|
|
14
14
|
export default ModalContent;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ui_1 = require("@open-tender/ui");
|
|
3
4
|
var hooks_1 = require("../app/hooks");
|
|
4
5
|
var slices_1 = require("../slices");
|
|
5
6
|
var ModalContent = function (_a) {
|
|
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,
|
|
7
|
+
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, _b = _a.children, children = _b === void 0 ? ui_1.ModalContent : _b;
|
|
7
8
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).modalContent;
|
|
8
9
|
return children({
|
|
9
10
|
config: config,
|
|
@@ -3,6 +3,6 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
declare const ModalHeader: ({ title, subtitle, children }: {
|
|
4
4
|
title: string;
|
|
5
5
|
subtitle?: string;
|
|
6
|
-
children
|
|
6
|
+
children?: (props: ModalHeaderProps) => ReactNode;
|
|
7
7
|
}) => ReactNode;
|
|
8
8
|
export default ModalHeader;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ui_1 = require("@open-tender/ui");
|
|
3
4
|
var hooks_1 = require("../app/hooks");
|
|
4
5
|
var slices_1 = require("../slices");
|
|
5
6
|
var ModalHeader = function (_a) {
|
|
6
|
-
var title = _a.title, subtitle = _a.subtitle,
|
|
7
|
+
var title = _a.title, subtitle = _a.subtitle, _b = _a.children, children = _b === void 0 ? ui_1.ModalHeader : _b;
|
|
7
8
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).modalHeader;
|
|
8
9
|
return children({ config: config, title: title, subtitle: subtitle });
|
|
9
10
|
};
|
|
@@ -6,6 +6,6 @@ declare const NutritionalInfo: ({ title, subtitle, nutritionalInfo, close, child
|
|
|
6
6
|
subtitle?: string;
|
|
7
7
|
nutritionalInfo: NutritionalInfoType;
|
|
8
8
|
close: () => void;
|
|
9
|
-
children
|
|
9
|
+
children?: (props: NutritionalInfoProps) => ReactNode;
|
|
10
10
|
}) => ReactNode;
|
|
11
11
|
export default NutritionalInfo;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var ui_1 = require("@open-tender/ui");
|
|
3
4
|
var hooks_1 = require("../app/hooks");
|
|
4
5
|
var slices_1 = require("../slices");
|
|
5
6
|
var NutritionalInfo = function (_a) {
|
|
6
|
-
var title = _a.title, subtitle = _a.subtitle, nutritionalInfo = _a.nutritionalInfo, close = _a.close,
|
|
7
|
-
var
|
|
7
|
+
var title = _a.title, subtitle = _a.subtitle, nutritionalInfo = _a.nutritionalInfo, close = _a.close, _b = _a.children, children = _b === void 0 ? ui_1.NutritionalInfo : _b;
|
|
8
|
+
var _c = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _c.nutritionalInfo, modalContentConfig = _c.modalContent;
|
|
8
9
|
var handlers = { close: close };
|
|
9
10
|
return children({
|
|
10
11
|
config: config,
|
|
@@ -6,6 +6,6 @@ declare const Option: ({ option, levels, handlers, close, children }: {
|
|
|
6
6
|
levels: CartLevels | null;
|
|
7
7
|
handlers: Handlers;
|
|
8
8
|
close: () => void;
|
|
9
|
-
children
|
|
9
|
+
children?: (props: OptionProps) => ReactNode;
|
|
10
10
|
}) => React.ReactNode;
|
|
11
11
|
export default Option;
|
|
@@ -7,8 +7,8 @@ var hooks_1 = require("../app/hooks");
|
|
|
7
7
|
var slices_1 = require("../slices");
|
|
8
8
|
var ItemGroups_1 = tslib_1.__importDefault(require("./ItemGroups"));
|
|
9
9
|
var Option = function (_a) {
|
|
10
|
-
var option = _a.option, levels = _a.levels, handlers = _a.handlers, close = _a.close,
|
|
11
|
-
var
|
|
10
|
+
var option = _a.option, levels = _a.levels, handlers = _a.handlers, close = _a.close, _b = _a.children, children = _b === void 0 ? ui_1.Option : _b;
|
|
11
|
+
var _c = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _c.option, modalContentConfig = _c.modalContent;
|
|
12
12
|
var handlersOption = tslib_1.__assign(tslib_1.__assign({}, handlers), { close: close });
|
|
13
13
|
if (!config || !option || !levels)
|
|
14
14
|
return null;
|
|
@@ -4,6 +4,6 @@ import React, { ReactNode } from 'react';
|
|
|
4
4
|
declare const OrderCard: ({ order, navigate, children }: {
|
|
5
5
|
order: Order;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
|
-
children
|
|
7
|
+
children?: (props: OrderCardProps) => ReactNode;
|
|
8
8
|
}) => React.ReactNode;
|
|
9
9
|
export default OrderCard;
|
|
@@ -8,14 +8,14 @@ var hooks_2 = require("../hooks");
|
|
|
8
8
|
var slices_1 = require("../slices");
|
|
9
9
|
var ErrorMessage_1 = tslib_1.__importDefault(require("./ErrorMessage"));
|
|
10
10
|
var OrderCard = function (_a) {
|
|
11
|
-
var order = _a.order, navigate = _a.navigate,
|
|
11
|
+
var order = _a.order, navigate = _a.navigate, _b = _a.children, children = _b === void 0 ? ui_1.OrderCard : _b;
|
|
12
12
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
13
|
+
var _c = (0, react_1.useState)(null), errMsg = _c[0], setErrMsg = _c[1];
|
|
14
|
+
var _d = (0, react_1.useState)(false), isReordering = _d[0], setIsReordering = _d[1];
|
|
15
|
+
var _e = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _e.orderCard, cardConfig = _e.card;
|
|
16
|
+
var _f = (0, hooks_1.useAppSelector)(slices_1.selectOrder), loading = _f.loading, error = _f.error;
|
|
17
17
|
var isLoading = loading === 'pending';
|
|
18
|
-
var
|
|
18
|
+
var _g = (0, hooks_2.useOrder)(order), itemImages = _g.itemImages, itemNames = _g.itemNames, orderNo = _g.orderNo, title = _g.title, subtitle = _g.subtitle;
|
|
19
19
|
var view = function () {
|
|
20
20
|
return;
|
|
21
21
|
};
|
|
@@ -5,6 +5,6 @@ declare const PointsReward: ({ item, callback, children }: {
|
|
|
5
5
|
item: OrderItem;
|
|
6
6
|
callback?: () => void;
|
|
7
7
|
isLast?: boolean;
|
|
8
|
-
children
|
|
8
|
+
children?: (props: PointsRewardProps) => ReactNode;
|
|
9
9
|
}) => React.ReactNode;
|
|
10
10
|
export default PointsReward;
|
|
@@ -9,14 +9,14 @@ var slices_1 = require("../slices");
|
|
|
9
9
|
var Quantity_1 = tslib_1.__importDefault(require("./Quantity"));
|
|
10
10
|
var PointsReward = function (_a) {
|
|
11
11
|
var _b;
|
|
12
|
-
var item = _a.item, callback = _a.callback,
|
|
12
|
+
var item = _a.item, callback = _a.callback, _c = _a.children, children = _c === void 0 ? ui_1.PointsReward : _c;
|
|
13
13
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
14
|
-
var
|
|
14
|
+
var _d = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), config = _d.pointsReward, successMessageConfig = _d.successMessage, cardConfig = _d.card;
|
|
15
15
|
var checkPoints = (0, hooks_1.useAppSelector)(slices_1.selectPosCheckout).points;
|
|
16
|
-
var
|
|
16
|
+
var _e = (0, hooks_2.useCustomerRewards)(), points = _e.points, pointsRemaining = _e.pointsRemaining;
|
|
17
17
|
if (!item.points || item.points.index === undefined || !points)
|
|
18
18
|
return null;
|
|
19
|
-
var
|
|
19
|
+
var _f = item.points, index = _f.index, per = _f.per;
|
|
20
20
|
// const appliedIndices = checkPoints.map(i => i.index)
|
|
21
21
|
// const isApplied = appliedIndices.includes(index)
|
|
22
22
|
var itemPointsApplied = ((_b = checkPoints.find(function (i) { return i.index === index; })) === null || _b === void 0 ? void 0 : _b.points) || 0;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PointsRewardsProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
declare const PointsRewards: ({ children }: {
|
|
4
|
-
children
|
|
4
|
+
children?: (props: PointsRewardsProps) => ReactNode;
|
|
5
5
|
}) => React.ReactNode;
|
|
6
6
|
export default PointsRewards;
|
|
@@ -8,9 +8,9 @@ var hooks_2 = require("../hooks");
|
|
|
8
8
|
var slices_1 = require("../slices");
|
|
9
9
|
var PointsReward_1 = tslib_1.__importDefault(require("./PointsReward"));
|
|
10
10
|
var PointsRewards = function (_a) {
|
|
11
|
-
var
|
|
11
|
+
var _b = _a.children, children = _b === void 0 ? ui_1.PointsRewards : _b;
|
|
12
12
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).pointsRewards;
|
|
13
|
-
var
|
|
13
|
+
var _c = (0, hooks_2.useCustomerRewards)(), items = _c.items, points = _c.points, pointsApplied = _c.pointsApplied, pointsRemaining = _c.pointsRemaining;
|
|
14
14
|
var renderPointReward = function (item) { return (react_1.default.createElement(PointsReward_1.default, { item: item, children: ui_1.PointsReward })); };
|
|
15
15
|
return children({
|
|
16
16
|
config: config,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Allergen from './Allergen';
|
|
2
2
|
import Applied from './Applied';
|
|
3
3
|
import ButtonLink from './ButtonLink';
|
|
4
|
+
import Card from './Card';
|
|
4
5
|
import Cart from './Cart';
|
|
5
6
|
import CartItem from './CartItem';
|
|
6
7
|
import CartUpsellItem from './CartUpsellItem';
|
|
@@ -45,4 +46,4 @@ import Tag from './Tag';
|
|
|
45
46
|
import TextArea from './TextArea';
|
|
46
47
|
import UpsellItem from './UpsellItem';
|
|
47
48
|
import Upsells from './Upsells';
|
|
48
|
-
export { Allergen, Applied, ButtonLink, Cart, CartItem, CartUpsellItem, CategoryItem, CategoryNav, CategoryNavItem, CategoryNavOther, CheckTotals, Discount, ErrorMessage, Header, Ingredients, Input, ItemGroup, ItemGroups, ItemOption, ItemSelections, Loader, MadeForNotes, MenuCategory, MenuOther, Modal, ModalContent, ModalHeader, NutritionalInfo, Option, OrderCard, PointsReward, PointsRewards, PromoCode, Quantity, Reward, Rewards, SignIn, SignInButton, SignInCheckout, SignInOptions, SignInPhone, SignInQr, SuccessMessage, Tag, TextArea, UpsellItem, Upsells };
|
|
49
|
+
export { Allergen, Applied, ButtonLink, Card, Cart, CartItem, CartUpsellItem, CategoryItem, CategoryNav, CategoryNavItem, CategoryNavOther, CheckTotals, Discount, ErrorMessage, Header, Ingredients, Input, ItemGroup, ItemGroups, ItemOption, ItemSelections, Loader, MadeForNotes, MenuCategory, MenuOther, Modal, ModalContent, ModalHeader, NutritionalInfo, Option, OrderCard, PointsReward, PointsRewards, PromoCode, Quantity, Reward, Rewards, SignIn, SignInButton, SignInCheckout, SignInOptions, SignInPhone, SignInQr, SuccessMessage, Tag, TextArea, UpsellItem, Upsells };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Upsells = exports.UpsellItem = exports.TextArea = exports.Tag = exports.SuccessMessage = exports.SignInQr = exports.SignInPhone = exports.SignInOptions = exports.SignInCheckout = exports.SignInButton = exports.SignIn = exports.Rewards = exports.Reward = exports.Quantity = exports.PromoCode = exports.PointsRewards = exports.PointsReward = exports.OrderCard = exports.Option = exports.NutritionalInfo = exports.ModalHeader = exports.ModalContent = exports.Modal = exports.MenuOther = exports.MenuCategory = exports.MadeForNotes = exports.Loader = exports.ItemSelections = exports.ItemOption = exports.ItemGroups = exports.ItemGroup = exports.Input = exports.Ingredients = exports.Header = exports.ErrorMessage = exports.Discount = exports.CheckTotals = exports.CategoryNavOther = exports.CategoryNavItem = exports.CategoryNav = exports.CategoryItem = exports.CartUpsellItem = exports.CartItem = exports.Cart = exports.ButtonLink = exports.Applied = exports.Allergen = void 0;
|
|
3
|
+
exports.Upsells = exports.UpsellItem = exports.TextArea = exports.Tag = exports.SuccessMessage = exports.SignInQr = exports.SignInPhone = exports.SignInOptions = exports.SignInCheckout = exports.SignInButton = exports.SignIn = exports.Rewards = exports.Reward = exports.Quantity = exports.PromoCode = exports.PointsRewards = exports.PointsReward = exports.OrderCard = exports.Option = exports.NutritionalInfo = exports.ModalHeader = exports.ModalContent = exports.Modal = exports.MenuOther = exports.MenuCategory = exports.MadeForNotes = exports.Loader = exports.ItemSelections = exports.ItemOption = exports.ItemGroups = exports.ItemGroup = exports.Input = exports.Ingredients = exports.Header = exports.ErrorMessage = exports.Discount = exports.CheckTotals = exports.CategoryNavOther = exports.CategoryNavItem = exports.CategoryNav = exports.CategoryItem = exports.CartUpsellItem = exports.CartItem = exports.Cart = exports.Card = exports.ButtonLink = exports.Applied = exports.Allergen = void 0;
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var Allergen_1 = tslib_1.__importDefault(require("./Allergen"));
|
|
6
6
|
exports.Allergen = Allergen_1.default;
|
|
@@ -8,6 +8,8 @@ var Applied_1 = tslib_1.__importDefault(require("./Applied"));
|
|
|
8
8
|
exports.Applied = Applied_1.default;
|
|
9
9
|
var ButtonLink_1 = tslib_1.__importDefault(require("./ButtonLink"));
|
|
10
10
|
exports.ButtonLink = ButtonLink_1.default;
|
|
11
|
+
var Card_1 = tslib_1.__importDefault(require("./Card"));
|
|
12
|
+
exports.Card = Card_1.default;
|
|
11
13
|
var Cart_1 = tslib_1.__importDefault(require("./Cart"));
|
|
12
14
|
exports.Cart = Cart_1.default;
|
|
13
15
|
var CartItem_1 = tslib_1.__importDefault(require("./CartItem"));
|
|
@@ -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,7 +1,8 @@
|
|
|
1
|
+
import { Allergen as AllergenView } from '@open-tender/ui';
|
|
1
2
|
import { useAppSelector } from '../app/hooks';
|
|
2
3
|
import { selectKioskConfig } from '../slices';
|
|
3
4
|
var Allergen = function (_a) {
|
|
4
|
-
var allergen = _a.allergen,
|
|
5
|
+
var allergen = _a.allergen, _b = _a.children, children = _b === void 0 ? AllergenView : _b;
|
|
5
6
|
var config = useAppSelector(selectKioskConfig).allergen;
|
|
6
7
|
return children({ config: config, allergen: allergen });
|
|
7
8
|
};
|
|
@@ -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,7 +1,8 @@
|
|
|
1
|
+
import { Applied as AppliedView } from '@open-tender/ui';
|
|
1
2
|
import { useAppSelector } from '../app/hooks';
|
|
2
3
|
import { selectKioskConfig } from '../slices';
|
|
3
4
|
var Applied = function (_a) {
|
|
4
|
-
var
|
|
5
|
+
var _b = _a.children, children = _b === void 0 ? AppliedView : _b;
|
|
5
6
|
var config = useAppSelector(selectKioskConfig).applied;
|
|
6
7
|
return children({ config: config });
|
|
7
8
|
};
|
|
@@ -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,7 +1,8 @@
|
|
|
1
|
+
import { ButtonLink as ButtonLinkView } from '@open-tender/ui';
|
|
1
2
|
import { useAppSelector } from '../app/hooks';
|
|
2
3
|
import { selectKioskConfig } from '../slices';
|
|
3
4
|
var ButtonLink = function (_a) {
|
|
4
|
-
var onClick = _a.onClick, label = _a.label,
|
|
5
|
+
var onClick = _a.onClick, label = _a.label, _b = _a.children, children = _b === void 0 ? ButtonLinkView : _b, style = _a.style;
|
|
5
6
|
var config = useAppSelector(selectKioskConfig).buttonLink;
|
|
6
7
|
return children({ config: config, style: style, children: label, onClick: onClick });
|
|
7
8
|
};
|
|
@@ -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,7 +1,8 @@
|
|
|
1
|
+
import { Card as CardView } from '@open-tender/ui';
|
|
1
2
|
import { useAppSelector } from '../app/hooks';
|
|
2
3
|
import { selectKioskConfig } from '../slices';
|
|
3
4
|
var Card = function (_a) {
|
|
4
|
-
var
|
|
5
|
+
var _b = _a.children, children = _b === void 0 ? CardView : _b, content = _a.content;
|
|
5
6
|
var config = useAppSelector(selectKioskConfig).card;
|
|
6
7
|
return children({ config: config, children: content });
|
|
7
8
|
};
|
|
@@ -2,6 +2,6 @@ import { CartProps } from '@open-tender/ui';
|
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
declare const Cart: ({ navigate, children }: {
|
|
4
4
|
navigate: (route: string) => void;
|
|
5
|
-
children
|
|
5
|
+
children?: (props: CartProps) => ReactNode;
|
|
6
6
|
}) => React.ReactNode;
|
|
7
7
|
export default Cart;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { CartItem, CartUpsells } from '@open-tender/ui';
|
|
1
|
+
import { CartItem, CartUpsells, Cart as CartView } from '@open-tender/ui';
|
|
2
2
|
import React, { useEffect } from 'react';
|
|
3
3
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
4
4
|
import { closeCartSummary, selectCartSummary, selectCartTotals, selectKioskConfig, selectOrder, toggleCartSummary } from '../slices';
|
|
5
5
|
import { default as CartItemContainer } from './CartItem';
|
|
6
6
|
import { default as CartUpsellsContainer } from './CartUpsells';
|
|
7
7
|
var Cart = function (_a) {
|
|
8
|
-
var navigate = _a.navigate,
|
|
8
|
+
var navigate = _a.navigate, _b = _a.children, children = _b === void 0 ? CartView : _b;
|
|
9
9
|
var dispatch = useAppDispatch();
|
|
10
10
|
var config = useAppSelector(selectKioskConfig).cart;
|
|
11
11
|
var cart = useAppSelector(selectOrder).cart;
|
|
12
|
-
var
|
|
12
|
+
var _c = useAppSelector(selectCartTotals), count = _c.count, total = _c.total;
|
|
13
13
|
var isOpen = useAppSelector(selectCartSummary).isOpen;
|
|
14
14
|
var isEmpty = !cart.length;
|
|
15
15
|
var toggleCart = function () { return dispatch(toggleCartSummary()); };
|
|
@@ -6,6 +6,6 @@ declare const CartItem: ({ item, isLast, isEditable, navigate, children }: {
|
|
|
6
6
|
isLast?: boolean;
|
|
7
7
|
isEditable?: boolean;
|
|
8
8
|
navigate: (route: string) => void;
|
|
9
|
-
children
|
|
9
|
+
children?: (props: CartItemProps) => ReactNode;
|
|
10
10
|
}) => React.ReactNode;
|
|
11
11
|
export default CartItem;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Quantity } from '@open-tender/ui';
|
|
1
|
+
import { Quantity, CartItem as CartItemView } from '@open-tender/ui';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
4
4
|
import { decrementItemInCart, incrementItemInCart, removeItemFromCart, selectKioskConfig, setCurrentItem } from '../slices';
|
|
5
5
|
import { default as QuantityContainer } from './Quantity';
|
|
6
6
|
var CartItem = function (_a) {
|
|
7
|
-
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,
|
|
7
|
+
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, _d = _a.children, children = _d === void 0 ? CartItemView : _d;
|
|
8
8
|
var dispatch = useAppDispatch();
|
|
9
9
|
var config = useAppSelector(selectKioskConfig).cartItem;
|
|
10
10
|
var increment = function () { return dispatch(incrementItemInCart(item)); };
|
|
@@ -5,6 +5,6 @@ declare const CartUpsellItem: ({ item, callback, isLast, children }: {
|
|
|
5
5
|
item: CartItem;
|
|
6
6
|
callback?: () => void;
|
|
7
7
|
isLast?: boolean;
|
|
8
|
-
children
|
|
8
|
+
children?: (props: CartUpsellItemProps) => ReactNode;
|
|
9
9
|
}) => ReactNode;
|
|
10
10
|
export default CartUpsellItem;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { CartUpsellItem as CartUpsellItemView } from '@open-tender/ui';
|
|
1
2
|
import { hasGroupsBelowMin, useBuilder } from '@open-tender/utils';
|
|
2
3
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
3
4
|
import { addItemToCart, selectKioskConfig } from '../slices';
|
|
4
5
|
var CartUpsellItem = function (_a) {
|
|
5
|
-
var item = _a.item, callback = _a.callback, isLast = _a.isLast,
|
|
6
|
+
var item = _a.item, callback = _a.callback, isLast = _a.isLast, _b = _a.children, children = _b === void 0 ? CartUpsellItemView : _b;
|
|
6
7
|
var dispatch = useAppDispatch();
|
|
7
|
-
var
|
|
8
|
+
var _c = useAppSelector(selectKioskConfig), config = _c.cartUpsellItem, cardConfig = _c.card;
|
|
8
9
|
var builtItem = useBuilder(item).item;
|
|
9
10
|
var quantity = builtItem.quantity, groups = builtItem.groups;
|
|
10
11
|
var groupsBelowMin = hasGroupsBelowMin(null, groups);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CartUpsellsProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
declare const CartUpsells: ({ children }: {
|
|
4
|
-
children
|
|
4
|
+
children?: (props: CartUpsellsProps) => ReactNode;
|
|
5
5
|
}) => React.ReactNode;
|
|
6
6
|
export default CartUpsells;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { CartUpsellItem } from '@open-tender/ui';
|
|
1
|
+
import { CartUpsellItem, CartUpsells as CartUpsellsView } from '@open-tender/ui';
|
|
2
2
|
import { makeUpsellItemsForCart } from '@open-tender/utils';
|
|
3
3
|
import React, { useMemo } from 'react';
|
|
4
4
|
import { useAppSelector } from '../app/hooks';
|
|
5
5
|
import { selectCartIds, selectKioskConfig, selectMenu } from '../slices';
|
|
6
6
|
import { default as CartUpsellItemContainer } from './CartUpsellItem';
|
|
7
7
|
var CartUpsells = function (_a) {
|
|
8
|
-
var
|
|
8
|
+
var _b = _a.children, children = _b === void 0 ? CartUpsellsView : _b;
|
|
9
9
|
var config = useAppSelector(selectKioskConfig).cartUpsells;
|
|
10
10
|
var cartIds = useAppSelector(selectCartIds);
|
|
11
|
-
var
|
|
11
|
+
var _c = useAppSelector(selectMenu), categories = _c.categories, soldOut = _c.soldOut;
|
|
12
12
|
var upsellItems = useMemo(function () { return makeUpsellItemsForCart(categories, cartIds, soldOut); }, [categories, cartIds, soldOut]);
|
|
13
13
|
var renderCartUpsellItem = function (item, isLast) { return (React.createElement(CartUpsellItemContainer, { item: item, isLast: isLast, children: CartUpsellItem })); };
|
|
14
14
|
if (!upsellItems.length)
|
|
@@ -6,6 +6,6 @@ declare const CategoryItem: ({ item, favorite, allergenAlerts, navigate, childre
|
|
|
6
6
|
favorite?: MenuItemFavorite;
|
|
7
7
|
allergenAlerts?: string[];
|
|
8
8
|
navigate: (route: string) => void;
|
|
9
|
-
children
|
|
9
|
+
children?: (props: CategoryItemProps) => ReactNode;
|
|
10
10
|
}) => ReactNode;
|
|
11
11
|
export default CategoryItem;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
+
import { CategoryItem as CategoryItemView } from '@open-tender/ui';
|
|
2
3
|
import { makeOrderItem, rehydrateOrderItem, useOrderItem } from '@open-tender/utils';
|
|
3
4
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
4
5
|
import { selectCartCounts, selectKioskConfig, selectMenu, setCurrentItem } from '../slices';
|
|
5
6
|
var CategoryItem = function (_a) {
|
|
6
|
-
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, navigate = _a.navigate,
|
|
7
|
+
var item = _a.item, favorite = _a.favorite, allergenAlerts = _a.allergenAlerts, navigate = _a.navigate, _b = _a.children, children = _b === void 0 ? CategoryItemView : _b;
|
|
7
8
|
var dispatch = useAppDispatch();
|
|
8
9
|
var categoryItem = useAppSelector(selectKioskConfig).categoryItem;
|
|
9
10
|
var soldOut = useAppSelector(selectMenu).soldOut;
|
|
10
11
|
var cartCounts = useAppSelector(selectCartCounts);
|
|
11
12
|
var hasPoints = false;
|
|
12
13
|
var displaySettings = {};
|
|
13
|
-
var
|
|
14
|
+
var _c = displaySettings || {}, _d = _c.calories, showCals = _d === void 0 ? false : _d, _e = _c.tags, showTags = _e === void 0 ? false : _e, _f = _c.allergens, showAllergens = _f === void 0 ? false : _f;
|
|
14
15
|
var showDesc = 'SHOW';
|
|
15
16
|
var orderItem = favorite
|
|
16
17
|
? __assign(__assign({}, rehydrateOrderItem(item, favorite.item)), { index: -1 }) : makeOrderItem(item, undefined, soldOut, undefined, hasPoints);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CategoryNavProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
declare const CategoryNav: ({ children, navigate }: {
|
|
4
|
-
children
|
|
4
|
+
children?: (props: CategoryNavProps) => ReactNode;
|
|
5
5
|
navigate: (route: string) => void;
|
|
6
6
|
}) => React.ReactNode;
|
|
7
7
|
export default CategoryNav;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { CategoryNavItem, CategoryNavOther } from '@open-tender/ui';
|
|
1
|
+
import { CategoryNavItem, CategoryNavOther, CategoryNav as CategoryNavView } from '@open-tender/ui';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { useAppSelector } from '../app/hooks';
|
|
4
4
|
import { selectKioskConfig, selectMenu } from '../slices';
|
|
5
5
|
import { default as CategoryNavItemContainer } from './CategoryNavItem';
|
|
6
6
|
import { default as CategoryNavOtherContainer } from './CategoryNavOther';
|
|
7
7
|
var CategoryNav = function (_a) {
|
|
8
|
-
var
|
|
8
|
+
var _b = _a.children, children = _b === void 0 ? CategoryNavView : _b, navigate = _a.navigate;
|
|
9
9
|
var categoryNav = useAppSelector(selectKioskConfig).categoryNav;
|
|
10
|
-
var
|
|
10
|
+
var _c = useAppSelector(selectMenu), categories = _c.categories, featured = _c.featured, favorites = _c.favorites, recents = _c.recents;
|
|
11
11
|
var renderCategoryNavOther = function (title, path) { return (React.createElement(CategoryNavOtherContainer, { navigate: navigate, title: title, path: path, children: CategoryNavOther })); };
|
|
12
12
|
var renderCategoryNavItem = function (item) { return (React.createElement(CategoryNavItemContainer, { navigate: navigate, category: item, children: CategoryNavItem })); };
|
|
13
13
|
return children({
|
|
@@ -4,6 +4,6 @@ import { ReactNode } from 'react';
|
|
|
4
4
|
declare const CategoryNavItem: ({ category, children, navigate }: {
|
|
5
5
|
category: MenuCategory;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
|
-
children
|
|
7
|
+
children?: (props: CategoryNavItemProps) => ReactNode;
|
|
8
8
|
}) => ReactNode;
|
|
9
9
|
export default CategoryNavItem;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { makeImageUrl } from '@open-tender/ui';
|
|
1
|
+
import { makeImageUrl, CategoryNavItem as CategoryNavItemView } from '@open-tender/ui';
|
|
2
2
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
3
3
|
import { selectCurrentCategory, selectKioskConfig, setCurrentCategory } from '../slices';
|
|
4
4
|
var CategoryNavItem = function (_a) {
|
|
5
|
-
var category = _a.category,
|
|
5
|
+
var category = _a.category, _b = _a.children, children = _b === void 0 ? CategoryNavItemView : _b, navigate = _a.navigate;
|
|
6
6
|
var dispatch = useAppDispatch();
|
|
7
7
|
var current = useAppSelector(selectCurrentCategory);
|
|
8
8
|
var isCurrent = (current === null || current === void 0 ? void 0 : current.id) === category.id;
|
|
9
|
-
var
|
|
9
|
+
var _c = useAppSelector(selectKioskConfig), categoryNavItem = _c.categoryNavItem, categoryNavItemSelected = _c.categoryNavItemSelected;
|
|
10
10
|
var config = isCurrent ? categoryNavItemSelected : categoryNavItem;
|
|
11
11
|
var name = category.name;
|
|
12
12
|
var imageUrl = makeImageUrl(category);
|
|
@@ -4,6 +4,6 @@ declare const CategoryNavOther: ({ title, path, navigate, children }: {
|
|
|
4
4
|
title: string;
|
|
5
5
|
path: string;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
|
-
children
|
|
7
|
+
children?: (props: CategoryNavOtherProps) => ReactNode;
|
|
8
8
|
}) => ReactNode;
|
|
9
9
|
export default CategoryNavOther;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { CategoryNavOther as CategoryNavOtherView } from '@open-tender/ui';
|
|
1
2
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
2
3
|
import { selectCurrentSection, selectKioskConfig, setCurrentCategory } from '../slices';
|
|
3
4
|
var CategoryNavOther = function (_a) {
|
|
4
|
-
var title = _a.title, path = _a.path, navigate = _a.navigate,
|
|
5
|
+
var title = _a.title, path = _a.path, navigate = _a.navigate, _b = _a.children, children = _b === void 0 ? CategoryNavOtherView : _b;
|
|
5
6
|
var dispatch = useAppDispatch();
|
|
6
|
-
var
|
|
7
|
+
var _c = useAppSelector(selectKioskConfig), categoryNavItem = _c.categoryNavItem, categoryNavItemSelected = _c.categoryNavItemSelected;
|
|
7
8
|
var currentSection = useAppSelector(selectCurrentSection);
|
|
8
9
|
var isCurrent = path === currentSection;
|
|
9
10
|
var config = isCurrent ? categoryNavItemSelected : categoryNavItem;
|
|
@@ -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,7 +1,8 @@
|
|
|
1
|
+
import { CheckTotals as CheckTotalsView } from '@open-tender/ui';
|
|
1
2
|
import { useAppSelector } from '../app/hooks';
|
|
2
3
|
import { selectKioskConfig } from '../slices';
|
|
3
4
|
var CheckTotals = function (_a) {
|
|
4
|
-
var check = _a.check,
|
|
5
|
+
var check = _a.check, _b = _a.children, children = _b === void 0 ? CheckTotalsView : _b;
|
|
5
6
|
var config = useAppSelector(selectKioskConfig).checkTotals;
|
|
6
7
|
return children({ config: config, check: check });
|
|
7
8
|
};
|
|
@@ -3,6 +3,6 @@ import { DiscountProps } from '@open-tender/ui';
|
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
declare const Discount: ({ discount, children }: {
|
|
5
5
|
discount: DiscountType;
|
|
6
|
-
children
|
|
6
|
+
children?: (props: DiscountProps) => ReactNode;
|
|
7
7
|
}) => ReactNode;
|
|
8
8
|
export default Discount;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { Discount as DiscountView } from '@open-tender/ui';
|
|
1
2
|
import { useAppSelector } from '../app/hooks';
|
|
2
3
|
import { selectKioskConfig } from '../slices';
|
|
3
4
|
var Discount = function (_a) {
|
|
4
|
-
var discount = _a.discount,
|
|
5
|
-
var
|
|
5
|
+
var discount = _a.discount, _b = _a.children, children = _b === void 0 ? DiscountView : _b;
|
|
6
|
+
var _c = useAppSelector(selectKioskConfig), config = _c.discount, cardConfig = _c.card;
|
|
6
7
|
if (!config)
|
|
7
8
|
return null;
|
|
8
9
|
return children({ config: config, discount: discount, cardConfig: cardConfig });
|
|
@@ -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;
|