@open-tender/store 1.1.80 → 1.1.82
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/Cart.d.ts +1 -2
- package/dist/cjs/components/Cart.js +3 -3
- package/dist/cjs/components/CartItem.d.ts +1 -2
- package/dist/cjs/components/CartItem.js +2 -1
- package/dist/cjs/components/CartUpsells.d.ts +1 -2
- package/dist/cjs/components/CartUpsells.js +2 -1
- package/dist/cjs/components/CheckoutCart.d.ts +4 -3
- package/dist/cjs/components/CheckoutCart.js +2 -3
- package/dist/cjs/components/CheckoutTotals.d.ts +3 -2
- package/dist/cjs/components/CheckoutTotals.js +3 -4
- package/dist/esm/components/Cart.d.ts +1 -2
- package/dist/esm/components/Cart.js +3 -3
- package/dist/esm/components/CartItem.d.ts +1 -2
- package/dist/esm/components/CartItem.js +3 -2
- package/dist/esm/components/CartUpsells.d.ts +1 -2
- package/dist/esm/components/CartUpsells.js +3 -2
- package/dist/esm/components/CheckoutCart.d.ts +4 -3
- package/dist/esm/components/CheckoutCart.js +2 -3
- package/dist/esm/components/CheckoutTotals.d.ts +3 -2
- package/dist/esm/components/CheckoutTotals.js +3 -4
- package/package.json +1 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CartProps, CartUpsellsProps, CartItemProps, QuantityProps, CartUpsellItemProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
-
declare const Cart: ({ navigate, children,
|
|
3
|
+
declare const Cart: ({ navigate, children, CartUpsellsView, CartItemView, QuantityView, CartUpsellItemView }: {
|
|
4
4
|
navigate: (route: string) => void;
|
|
5
5
|
children: (props: CartProps) => ReactNode;
|
|
6
|
-
apiUrl: string;
|
|
7
6
|
CartUpsellsView: (props: CartUpsellsProps) => ReactNode;
|
|
8
7
|
CartItemView: (props: CartItemProps) => ReactNode;
|
|
9
8
|
QuantityView: (props: QuantityProps) => ReactNode;
|
|
@@ -7,7 +7,7 @@ var slices_1 = require("../slices");
|
|
|
7
7
|
var CartItem_1 = tslib_1.__importDefault(require("./CartItem"));
|
|
8
8
|
var CartUpsells_1 = tslib_1.__importDefault(require("./CartUpsells"));
|
|
9
9
|
var Cart = function (_a) {
|
|
10
|
-
var navigate = _a.navigate, children = _a.children,
|
|
10
|
+
var navigate = _a.navigate, children = _a.children, CartUpsellsView = _a.CartUpsellsView, CartItemView = _a.CartItemView, QuantityView = _a.QuantityView, CartUpsellItemView = _a.CartUpsellItemView;
|
|
11
11
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
12
12
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).cart;
|
|
13
13
|
var cart = (0, hooks_1.useAppSelector)(slices_1.selectOrder).cart;
|
|
@@ -22,8 +22,8 @@ var Cart = function (_a) {
|
|
|
22
22
|
return;
|
|
23
23
|
dispatch((0, slices_1.closeCartSummary)());
|
|
24
24
|
}, [dispatch, isOpen, isEmpty]);
|
|
25
|
-
var renderCartItem = (0, react_1.useCallback)(function (item, isLast) { return (react_1.default.createElement(CartItem_1.default, { key: item.id, navigate: navigate, item: item, isLast: isLast,
|
|
26
|
-
var renderCartUpsells = (0, react_1.useCallback)(function () { return (react_1.default.createElement(CartUpsells_1.default, { CartUpsellItemView: CartUpsellItemView,
|
|
25
|
+
var renderCartItem = (0, react_1.useCallback)(function (item, isLast) { return (react_1.default.createElement(CartItem_1.default, { key: item.id, navigate: navigate, item: item, isLast: isLast, children: CartItemView, QuantityView: QuantityView })); }, [navigate, CartItemView, QuantityView]);
|
|
26
|
+
var renderCartUpsells = (0, react_1.useCallback)(function () { return (react_1.default.createElement(CartUpsells_1.default, { CartUpsellItemView: CartUpsellItemView, children: CartUpsellsView })); }, [CartUpsellsView, CartUpsellItemView]);
|
|
27
27
|
if (!config)
|
|
28
28
|
return null;
|
|
29
29
|
return children({
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CartItem as CartItemType } from '@open-tender/types';
|
|
2
2
|
import { CartItemProps, QuantityProps } 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, QuantityView }: {
|
|
5
5
|
item: CartItemType;
|
|
6
6
|
isLast?: boolean;
|
|
7
7
|
isEditable?: boolean;
|
|
8
8
|
navigate: (route: string) => void;
|
|
9
9
|
children: (props: CartItemProps) => ReactNode;
|
|
10
|
-
apiUrl: string;
|
|
11
10
|
QuantityView: (props: QuantityProps) => ReactNode;
|
|
12
11
|
}) => React.ReactNode;
|
|
13
12
|
export default CartItem;
|
|
@@ -6,8 +6,9 @@ var hooks_1 = require("../app/hooks");
|
|
|
6
6
|
var slices_1 = require("../slices");
|
|
7
7
|
var Quantity_1 = tslib_1.__importDefault(require("./Quantity"));
|
|
8
8
|
var CartItem = function (_a) {
|
|
9
|
-
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,
|
|
9
|
+
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, QuantityView = _a.QuantityView;
|
|
10
10
|
var dispatch = (0, hooks_1.useAppDispatch)();
|
|
11
|
+
var apiUrl = (0, hooks_1.useAppSelector)(slices_1.selectKioskApi);
|
|
11
12
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).cartItem;
|
|
12
13
|
var increment = (0, react_1.useCallback)(function () { return dispatch((0, slices_1.incrementItemInCart)(item)); }, [item, dispatch]);
|
|
13
14
|
var decrement = (0, react_1.useCallback)(function () { return dispatch((0, slices_1.decrementItemInCart)(item)); }, [dispatch, item]);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { CartUpsellItemProps, CartUpsellsProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
-
declare const CartUpsells: ({ children,
|
|
3
|
+
declare const CartUpsells: ({ children, CartUpsellItemView }: {
|
|
4
4
|
children: (props: CartUpsellsProps) => ReactNode;
|
|
5
|
-
apiUrl: string;
|
|
6
5
|
CartUpsellItemView: (props: CartUpsellItemProps) => ReactNode;
|
|
7
6
|
}) => React.ReactNode;
|
|
8
7
|
export default CartUpsells;
|
|
@@ -7,7 +7,8 @@ var hooks_1 = require("../app/hooks");
|
|
|
7
7
|
var slices_1 = require("../slices");
|
|
8
8
|
var CartUpsellItem_1 = tslib_1.__importDefault(require("./CartUpsellItem"));
|
|
9
9
|
var CartUpsells = function (_a) {
|
|
10
|
-
var children = _a.children,
|
|
10
|
+
var children = _a.children, CartUpsellItemView = _a.CartUpsellItemView;
|
|
11
|
+
var apiUrl = (0, hooks_1.useAppSelector)(slices_1.selectKioskApi);
|
|
11
12
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).cartUpsells;
|
|
12
13
|
var cartIds = (0, hooks_1.useAppSelector)(slices_1.selectCartIds);
|
|
13
14
|
var _b = (0, hooks_1.useAppSelector)(slices_1.selectMenu), categories = _b.categories, soldOut = _b.soldOut;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Cart } from '@open-tender/types';
|
|
2
|
-
import { CheckoutCartProps } from '@open-tender/ui';
|
|
2
|
+
import { CartItemProps, CheckoutCartProps, QuantityProps } from '@open-tender/ui';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
|
-
declare const CheckoutCart: ({ cart,
|
|
4
|
+
declare const CheckoutCart: ({ cart, navigate, children, QuantityView, CartItemView }: {
|
|
5
5
|
cart: Cart;
|
|
6
|
-
apiUrl: string;
|
|
7
6
|
navigate: (route: string) => void;
|
|
8
7
|
children: (props: CheckoutCartProps) => ReactNode;
|
|
8
|
+
QuantityView: (props: QuantityProps) => React.ReactNode;
|
|
9
|
+
CartItemView: (props: CartItemProps) => React.ReactNode;
|
|
9
10
|
}) => React.ReactNode;
|
|
10
11
|
export default CheckoutCart;
|
|
@@ -1,15 +1,14 @@
|
|
|
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 react_1 = tslib_1.__importStar(require("react"));
|
|
6
5
|
var hooks_1 = require("../app/hooks");
|
|
7
6
|
var slices_1 = require("../slices");
|
|
8
7
|
var CartItem_1 = tslib_1.__importDefault(require("./CartItem"));
|
|
9
8
|
var CheckoutCart = function (_a) {
|
|
10
|
-
var cart = _a.cart,
|
|
9
|
+
var cart = _a.cart, navigate = _a.navigate, children = _a.children, QuantityView = _a.QuantityView, CartItemView = _a.CartItemView;
|
|
11
10
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).checkoutCart;
|
|
12
|
-
var renderCartItem = (0, react_1.useCallback)(function (item, index) { return (react_1.default.createElement(CartItem_1.default, { QuantityView:
|
|
11
|
+
var renderCartItem = (0, react_1.useCallback)(function (item, index) { return (react_1.default.createElement(CartItem_1.default, { QuantityView: QuantityView, navigate: navigate, children: CartItemView, key: "".concat(item.id, "-").concat(index), item: item, isLast: index + 1 === cart.length, isEditable: false })); }, [QuantityView, navigate, CartItemView, cart.length]);
|
|
13
12
|
return children({ config: config, cart: cart, renderCartItem: renderCartItem });
|
|
14
13
|
};
|
|
15
14
|
exports.default = CheckoutCart;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Order } from '@open-tender/types';
|
|
2
|
-
import { CheckoutTotalsProps } from '@open-tender/ui';
|
|
2
|
+
import { CheckTotalsProps, CheckoutTotalsProps } from '@open-tender/ui';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
|
-
declare const CheckoutTotalsContainer: ({ check, children }: {
|
|
4
|
+
declare const CheckoutTotalsContainer: ({ check, children, CheckTotalsView }: {
|
|
5
5
|
check: Order;
|
|
6
6
|
children: (props: CheckoutTotalsProps) => ReactNode;
|
|
7
|
+
CheckTotalsView: (props: CheckTotalsProps) => React.ReactNode;
|
|
7
8
|
}) => React.ReactNode;
|
|
8
9
|
export default CheckoutTotalsContainer;
|
|
@@ -1,17 +1,16 @@
|
|
|
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 react_1 = tslib_1.__importStar(require("react"));
|
|
6
5
|
var hooks_1 = require("../app/hooks");
|
|
7
6
|
var slices_1 = require("../slices");
|
|
8
7
|
var CheckTotals_1 = tslib_1.__importDefault(require("./CheckTotals"));
|
|
9
8
|
var CheckoutTotalsContainer = function (_a) {
|
|
10
|
-
var check = _a.check, children = _a.children;
|
|
9
|
+
var check = _a.check, children = _a.children, CheckTotalsView = _a.CheckTotalsView;
|
|
11
10
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).checkoutTotals;
|
|
12
11
|
var renderCheckTotals = (0, react_1.useCallback)(function () {
|
|
13
|
-
return react_1.default.createElement(CheckTotals_1.default, { children:
|
|
14
|
-
}, [check]);
|
|
12
|
+
return react_1.default.createElement(CheckTotals_1.default, { children: CheckTotalsView, check: check });
|
|
13
|
+
}, [check, CheckTotalsView]);
|
|
15
14
|
return children({ config: config, renderCheckTotals: renderCheckTotals });
|
|
16
15
|
};
|
|
17
16
|
exports.default = CheckoutTotalsContainer;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { CartProps, CartUpsellsProps, CartItemProps, QuantityProps, CartUpsellItemProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
-
declare const Cart: ({ navigate, children,
|
|
3
|
+
declare const Cart: ({ navigate, children, CartUpsellsView, CartItemView, QuantityView, CartUpsellItemView }: {
|
|
4
4
|
navigate: (route: string) => void;
|
|
5
5
|
children: (props: CartProps) => ReactNode;
|
|
6
|
-
apiUrl: string;
|
|
7
6
|
CartUpsellsView: (props: CartUpsellsProps) => ReactNode;
|
|
8
7
|
CartItemView: (props: CartItemProps) => ReactNode;
|
|
9
8
|
QuantityView: (props: QuantityProps) => ReactNode;
|
|
@@ -4,7 +4,7 @@ import { closeCartSummary, selectCartSummary, selectCartTotals, selectKioskConfi
|
|
|
4
4
|
import { default as CartItemContainer } from './CartItem';
|
|
5
5
|
import { default as CartUpsellsContainer } from './CartUpsells';
|
|
6
6
|
var Cart = function (_a) {
|
|
7
|
-
var navigate = _a.navigate, children = _a.children,
|
|
7
|
+
var navigate = _a.navigate, children = _a.children, CartUpsellsView = _a.CartUpsellsView, CartItemView = _a.CartItemView, QuantityView = _a.QuantityView, CartUpsellItemView = _a.CartUpsellItemView;
|
|
8
8
|
var dispatch = useAppDispatch();
|
|
9
9
|
var config = useAppSelector(selectKioskConfig).cart;
|
|
10
10
|
var cart = useAppSelector(selectOrder).cart;
|
|
@@ -19,8 +19,8 @@ var Cart = function (_a) {
|
|
|
19
19
|
return;
|
|
20
20
|
dispatch(closeCartSummary());
|
|
21
21
|
}, [dispatch, isOpen, isEmpty]);
|
|
22
|
-
var renderCartItem = useCallback(function (item, isLast) { return (React.createElement(CartItemContainer, { key: item.id, navigate: navigate, item: item, isLast: isLast,
|
|
23
|
-
var renderCartUpsells = useCallback(function () { return (React.createElement(CartUpsellsContainer, { CartUpsellItemView: CartUpsellItemView,
|
|
22
|
+
var renderCartItem = useCallback(function (item, isLast) { return (React.createElement(CartItemContainer, { key: item.id, navigate: navigate, item: item, isLast: isLast, children: CartItemView, QuantityView: QuantityView })); }, [navigate, CartItemView, QuantityView]);
|
|
23
|
+
var renderCartUpsells = useCallback(function () { return (React.createElement(CartUpsellsContainer, { CartUpsellItemView: CartUpsellItemView, children: CartUpsellsView })); }, [CartUpsellsView, CartUpsellItemView]);
|
|
24
24
|
if (!config)
|
|
25
25
|
return null;
|
|
26
26
|
return children({
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { CartItem as CartItemType } from '@open-tender/types';
|
|
2
2
|
import { CartItemProps, QuantityProps } 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, QuantityView }: {
|
|
5
5
|
item: CartItemType;
|
|
6
6
|
isLast?: boolean;
|
|
7
7
|
isEditable?: boolean;
|
|
8
8
|
navigate: (route: string) => void;
|
|
9
9
|
children: (props: CartItemProps) => ReactNode;
|
|
10
|
-
apiUrl: string;
|
|
11
10
|
QuantityView: (props: QuantityProps) => ReactNode;
|
|
12
11
|
}) => React.ReactNode;
|
|
13
12
|
export default CartItem;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { useCallback } from 'react';
|
|
2
2
|
import { useAppDispatch, useAppSelector } from '../app/hooks';
|
|
3
|
-
import { decrementItemInCart, incrementItemInCart, removeItemFromCart, selectKioskConfig, setCurrentItem } from '../slices';
|
|
3
|
+
import { decrementItemInCart, incrementItemInCart, removeItemFromCart, selectKioskApi, selectKioskConfig, setCurrentItem } from '../slices';
|
|
4
4
|
import { default as QuantityContainer } from './Quantity';
|
|
5
5
|
var CartItem = function (_a) {
|
|
6
|
-
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,
|
|
6
|
+
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, QuantityView = _a.QuantityView;
|
|
7
7
|
var dispatch = useAppDispatch();
|
|
8
|
+
var apiUrl = useAppSelector(selectKioskApi);
|
|
8
9
|
var config = useAppSelector(selectKioskConfig).cartItem;
|
|
9
10
|
var increment = useCallback(function () { return dispatch(incrementItemInCart(item)); }, [item, dispatch]);
|
|
10
11
|
var decrement = useCallback(function () { return dispatch(decrementItemInCart(item)); }, [dispatch, item]);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { CartUpsellItemProps, CartUpsellsProps } from '@open-tender/ui';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
|
-
declare const CartUpsells: ({ children,
|
|
3
|
+
declare const CartUpsells: ({ children, CartUpsellItemView }: {
|
|
4
4
|
children: (props: CartUpsellsProps) => ReactNode;
|
|
5
|
-
apiUrl: string;
|
|
6
5
|
CartUpsellItemView: (props: CartUpsellItemProps) => ReactNode;
|
|
7
6
|
}) => React.ReactNode;
|
|
8
7
|
export default CartUpsells;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { makeUpsellItemsForCart } from '@open-tender/utils';
|
|
2
2
|
import React, { useCallback, useMemo } from 'react';
|
|
3
3
|
import { useAppSelector } from '../app/hooks';
|
|
4
|
-
import { selectCartIds, selectKioskConfig, selectMenu } from '../slices';
|
|
4
|
+
import { selectCartIds, selectKioskApi, selectKioskConfig, selectMenu } from '../slices';
|
|
5
5
|
import { default as CartUpsellItemContainer } from './CartUpsellItem';
|
|
6
6
|
var CartUpsells = function (_a) {
|
|
7
|
-
var children = _a.children,
|
|
7
|
+
var children = _a.children, CartUpsellItemView = _a.CartUpsellItemView;
|
|
8
|
+
var apiUrl = useAppSelector(selectKioskApi);
|
|
8
9
|
var config = useAppSelector(selectKioskConfig).cartUpsells;
|
|
9
10
|
var cartIds = useAppSelector(selectCartIds);
|
|
10
11
|
var _b = useAppSelector(selectMenu), categories = _b.categories, soldOut = _b.soldOut;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Cart } from '@open-tender/types';
|
|
2
|
-
import { CheckoutCartProps } from '@open-tender/ui';
|
|
2
|
+
import { CartItemProps, CheckoutCartProps, QuantityProps } from '@open-tender/ui';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
|
-
declare const CheckoutCart: ({ cart,
|
|
4
|
+
declare const CheckoutCart: ({ cart, navigate, children, QuantityView, CartItemView }: {
|
|
5
5
|
cart: Cart;
|
|
6
|
-
apiUrl: string;
|
|
7
6
|
navigate: (route: string) => void;
|
|
8
7
|
children: (props: CheckoutCartProps) => ReactNode;
|
|
8
|
+
QuantityView: (props: QuantityProps) => React.ReactNode;
|
|
9
|
+
CartItemView: (props: CartItemProps) => React.ReactNode;
|
|
9
10
|
}) => React.ReactNode;
|
|
10
11
|
export default CheckoutCart;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { CartItem, Quantity } from '@open-tender/ui';
|
|
2
1
|
import React, { useCallback } from 'react';
|
|
3
2
|
import { useAppSelector } from '../app/hooks';
|
|
4
3
|
import { selectKioskConfig } from '../slices';
|
|
5
4
|
import { default as CartItemContainer } from './CartItem';
|
|
6
5
|
var CheckoutCart = function (_a) {
|
|
7
|
-
var cart = _a.cart,
|
|
6
|
+
var cart = _a.cart, navigate = _a.navigate, children = _a.children, QuantityView = _a.QuantityView, CartItemView = _a.CartItemView;
|
|
8
7
|
var config = useAppSelector(selectKioskConfig).checkoutCart;
|
|
9
|
-
var renderCartItem = useCallback(function (item, index) { return (React.createElement(CartItemContainer, { QuantityView:
|
|
8
|
+
var renderCartItem = useCallback(function (item, index) { return (React.createElement(CartItemContainer, { QuantityView: QuantityView, navigate: navigate, children: CartItemView, key: "".concat(item.id, "-").concat(index), item: item, isLast: index + 1 === cart.length, isEditable: false })); }, [QuantityView, navigate, CartItemView, cart.length]);
|
|
10
9
|
return children({ config: config, cart: cart, renderCartItem: renderCartItem });
|
|
11
10
|
};
|
|
12
11
|
export default CheckoutCart;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Order } from '@open-tender/types';
|
|
2
|
-
import { CheckoutTotalsProps } from '@open-tender/ui';
|
|
2
|
+
import { CheckTotalsProps, CheckoutTotalsProps } from '@open-tender/ui';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
|
-
declare const CheckoutTotalsContainer: ({ check, children }: {
|
|
4
|
+
declare const CheckoutTotalsContainer: ({ check, children, CheckTotalsView }: {
|
|
5
5
|
check: Order;
|
|
6
6
|
children: (props: CheckoutTotalsProps) => ReactNode;
|
|
7
|
+
CheckTotalsView: (props: CheckTotalsProps) => React.ReactNode;
|
|
7
8
|
}) => React.ReactNode;
|
|
8
9
|
export default CheckoutTotalsContainer;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { CheckTotals } from '@open-tender/ui';
|
|
2
1
|
import React, { useCallback } from 'react';
|
|
3
2
|
import { useAppSelector } from '../app/hooks';
|
|
4
3
|
import { selectKioskConfig } from '../slices';
|
|
5
4
|
import { default as CheckTotalsContainer } from './CheckTotals';
|
|
6
5
|
var CheckoutTotalsContainer = function (_a) {
|
|
7
|
-
var check = _a.check, children = _a.children;
|
|
6
|
+
var check = _a.check, children = _a.children, CheckTotalsView = _a.CheckTotalsView;
|
|
8
7
|
var config = useAppSelector(selectKioskConfig).checkoutTotals;
|
|
9
8
|
var renderCheckTotals = useCallback(function () {
|
|
10
|
-
return React.createElement(CheckTotalsContainer, { children:
|
|
11
|
-
}, [check]);
|
|
9
|
+
return React.createElement(CheckTotalsContainer, { children: CheckTotalsView, check: check });
|
|
10
|
+
}, [check, CheckTotalsView]);
|
|
12
11
|
return children({ config: config, renderCheckTotals: renderCheckTotals });
|
|
13
12
|
};
|
|
14
13
|
export default CheckoutTotalsContainer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.82",
|
|
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",
|