@open-tender/store 1.1.257 → 1.1.258
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/CheckTotals.d.ts +2 -1
- package/dist/cjs/components/CheckTotals.js +2 -2
- package/dist/cjs/components/CheckoutTotals.d.ts +2 -1
- package/dist/cjs/components/CheckoutTotals.js +2 -2
- package/dist/esm/components/CheckTotals.d.ts +2 -1
- package/dist/esm/components/CheckTotals.js +2 -2
- package/dist/esm/components/CheckoutTotals.d.ts +2 -1
- package/dist/esm/components/CheckoutTotals.js +2 -2
- package/package.json +4 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Order } from '@open-tender/types';
|
|
2
2
|
import { CheckTotalsProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const CheckTotals: ({ check, isSummary, children }: {
|
|
4
|
+
declare const CheckTotals: ({ check, isSummary, displayGratuity, children }: {
|
|
5
5
|
check: Order;
|
|
6
6
|
isSummary?: boolean;
|
|
7
|
+
displayGratuity?: boolean;
|
|
7
8
|
children: (props: CheckTotalsProps) => ReactNode;
|
|
8
9
|
}) => ReactNode;
|
|
9
10
|
export default CheckTotals;
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
var hooks_1 = require("../app/hooks");
|
|
4
4
|
var slices_1 = require("../slices");
|
|
5
5
|
var CheckTotals = function (_a) {
|
|
6
|
-
var check = _a.check, isSummary = _a.isSummary, children = _a.children;
|
|
6
|
+
var check = _a.check, isSummary = _a.isSummary, displayGratuity = _a.displayGratuity, children = _a.children;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).checkTotals;
|
|
8
8
|
if (!config)
|
|
9
9
|
return null;
|
|
10
|
-
return children({ config: config, check: check, isSummary: isSummary });
|
|
10
|
+
return children({ config: config, check: check, isSummary: isSummary, displayGratuity: displayGratuity });
|
|
11
11
|
};
|
|
12
12
|
exports.default = CheckTotals;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Order } from '@open-tender/types';
|
|
2
2
|
import { CheckTotalsProps, CheckoutTotalsProps } from '@open-tender/ui';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
|
-
declare const CheckoutTotalsContainer: ({ check, children, CheckTotalsView }: {
|
|
4
|
+
declare const CheckoutTotalsContainer: ({ check, displayGratuity, children, CheckTotalsView }: {
|
|
5
5
|
check: Order;
|
|
6
|
+
displayGratuity?: boolean;
|
|
6
7
|
children: (props: CheckoutTotalsProps) => ReactNode;
|
|
7
8
|
CheckTotalsView: (props: CheckTotalsProps) => React.ReactNode;
|
|
8
9
|
}) => React.ReactNode;
|
|
@@ -6,10 +6,10 @@ var hooks_1 = require("../app/hooks");
|
|
|
6
6
|
var slices_1 = require("../slices");
|
|
7
7
|
var CheckTotals_1 = tslib_1.__importDefault(require("./CheckTotals"));
|
|
8
8
|
var CheckoutTotalsContainer = function (_a) {
|
|
9
|
-
var check = _a.check, children = _a.children, CheckTotalsView = _a.CheckTotalsView;
|
|
9
|
+
var check = _a.check, displayGratuity = _a.displayGratuity, children = _a.children, CheckTotalsView = _a.CheckTotalsView;
|
|
10
10
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).checkoutTotals;
|
|
11
11
|
var renderCheckTotals = (0, react_1.useCallback)(function () {
|
|
12
|
-
return react_1.default.createElement(CheckTotals_1.default, { children: CheckTotalsView, check: check });
|
|
12
|
+
return (react_1.default.createElement(CheckTotals_1.default, { children: CheckTotalsView, check: check, displayGratuity: displayGratuity }));
|
|
13
13
|
}, [check, CheckTotalsView]);
|
|
14
14
|
if (!config)
|
|
15
15
|
return null;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Order } from '@open-tender/types';
|
|
2
2
|
import { CheckTotalsProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const CheckTotals: ({ check, isSummary, children }: {
|
|
4
|
+
declare const CheckTotals: ({ check, isSummary, displayGratuity, children }: {
|
|
5
5
|
check: Order;
|
|
6
6
|
isSummary?: boolean;
|
|
7
|
+
displayGratuity?: boolean;
|
|
7
8
|
children: (props: CheckTotalsProps) => ReactNode;
|
|
8
9
|
}) => ReactNode;
|
|
9
10
|
export default CheckTotals;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useAppSelector } from '../app/hooks';
|
|
2
2
|
import { selectKioskConfig } from '../slices';
|
|
3
3
|
var CheckTotals = function (_a) {
|
|
4
|
-
var check = _a.check, isSummary = _a.isSummary, children = _a.children;
|
|
4
|
+
var check = _a.check, isSummary = _a.isSummary, displayGratuity = _a.displayGratuity, children = _a.children;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).checkTotals;
|
|
6
6
|
if (!config)
|
|
7
7
|
return null;
|
|
8
|
-
return children({ config: config, check: check, isSummary: isSummary });
|
|
8
|
+
return children({ config: config, check: check, isSummary: isSummary, displayGratuity: displayGratuity });
|
|
9
9
|
};
|
|
10
10
|
export default CheckTotals;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Order } from '@open-tender/types';
|
|
2
2
|
import { CheckTotalsProps, CheckoutTotalsProps } from '@open-tender/ui';
|
|
3
3
|
import React, { ReactNode } from 'react';
|
|
4
|
-
declare const CheckoutTotalsContainer: ({ check, children, CheckTotalsView }: {
|
|
4
|
+
declare const CheckoutTotalsContainer: ({ check, displayGratuity, children, CheckTotalsView }: {
|
|
5
5
|
check: Order;
|
|
6
|
+
displayGratuity?: boolean;
|
|
6
7
|
children: (props: CheckoutTotalsProps) => ReactNode;
|
|
7
8
|
CheckTotalsView: (props: CheckTotalsProps) => React.ReactNode;
|
|
8
9
|
}) => React.ReactNode;
|
|
@@ -3,10 +3,10 @@ import { useAppSelector } from '../app/hooks';
|
|
|
3
3
|
import { selectKioskConfig } from '../slices';
|
|
4
4
|
import { default as CheckTotalsContainer } from './CheckTotals';
|
|
5
5
|
var CheckoutTotalsContainer = function (_a) {
|
|
6
|
-
var check = _a.check, children = _a.children, CheckTotalsView = _a.CheckTotalsView;
|
|
6
|
+
var check = _a.check, displayGratuity = _a.displayGratuity, children = _a.children, CheckTotalsView = _a.CheckTotalsView;
|
|
7
7
|
var config = useAppSelector(selectKioskConfig).checkoutTotals;
|
|
8
8
|
var renderCheckTotals = useCallback(function () {
|
|
9
|
-
return React.createElement(CheckTotalsContainer, { children: CheckTotalsView, check: check });
|
|
9
|
+
return (React.createElement(CheckTotalsContainer, { children: CheckTotalsView, check: check, displayGratuity: displayGratuity }));
|
|
10
10
|
}, [check, CheckTotalsView]);
|
|
11
11
|
if (!config)
|
|
12
12
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.258",
|
|
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",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@emotion/react": "^11.11.1",
|
|
64
|
-
"@open-tender/types": "^0.4.
|
|
65
|
-
"@open-tender/ui": "^0.4.
|
|
66
|
-
"@open-tender/utils": "^0.4.
|
|
64
|
+
"@open-tender/types": "^0.4.121",
|
|
65
|
+
"@open-tender/ui": "^0.4.43",
|
|
66
|
+
"@open-tender/utils": "^0.4.85",
|
|
67
67
|
"@reduxjs/toolkit": "^2.0.1",
|
|
68
68
|
"date-fns": "2.30.0",
|
|
69
69
|
"date-fns-tz": "^2.0.0",
|