@open-tender/store 1.1.156 → 1.1.158
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/AccountLoyalty.d.ts +2 -1
- package/dist/cjs/components/AccountLoyalty.js +2 -2
- package/dist/cjs/components/Keypad.d.ts +2 -1
- package/dist/cjs/components/Keypad.js +2 -2
- package/dist/esm/components/AccountLoyalty.d.ts +2 -1
- package/dist/esm/components/AccountLoyalty.js +2 -2
- package/dist/esm/components/Keypad.d.ts +2 -1
- package/dist/esm/components/Keypad.js +2 -2
- package/package.json +4 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { LoyaltyProgramSummary } from '@open-tender/types';
|
|
2
2
|
import { AccountLoyaltyProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const AccountLoyalty: ({ loyaltySummary, navigate, children }: {
|
|
4
|
+
declare const AccountLoyalty: ({ loyaltySummary, navigate, children, navigateTo }: {
|
|
5
5
|
loyaltySummary: LoyaltyProgramSummary;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
7
|
children: (props: AccountLoyaltyProps) => ReactNode;
|
|
8
|
+
navigateTo: string;
|
|
8
9
|
}) => ReactNode;
|
|
9
10
|
export default AccountLoyalty;
|
|
@@ -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 AccountLoyalty = function (_a) {
|
|
6
|
-
var loyaltySummary = _a.loyaltySummary, navigate = _a.navigate, children = _a.children;
|
|
6
|
+
var loyaltySummary = _a.loyaltySummary, navigate = _a.navigate, children = _a.children, navigateTo = _a.navigateTo;
|
|
7
7
|
var config = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig).accountLoyalty;
|
|
8
8
|
var account = (0, hooks_1.useAppSelector)(slices_1.selectCustomer).account;
|
|
9
|
-
var startOrder = function () { return navigate(
|
|
9
|
+
var startOrder = function () { return navigate(navigateTo); };
|
|
10
10
|
var handlers = { startOrder: startOrder };
|
|
11
11
|
if (!config || !account || !loyaltySummary)
|
|
12
12
|
return null;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Handlers, KeypadProps, KeypadType } from '@open-tender/ui';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
declare const Keypad: ({ children, maxLength, type, value, handlers }: {
|
|
3
|
+
declare const Keypad: ({ children, maxLength, type, value, handlers, isEmail }: {
|
|
4
4
|
children: (props: KeypadProps) => ReactNode;
|
|
5
5
|
maxLength?: number;
|
|
6
6
|
type?: KeypadType;
|
|
7
7
|
value: string;
|
|
8
8
|
handlers: Handlers;
|
|
9
|
+
isEmail?: boolean;
|
|
9
10
|
}) => ReactNode;
|
|
10
11
|
export default Keypad;
|
|
@@ -5,7 +5,7 @@ var hooks_1 = require("../app/hooks");
|
|
|
5
5
|
var slices_1 = require("../slices");
|
|
6
6
|
var utils_1 = require("../utils");
|
|
7
7
|
var Keypad = function (_a) {
|
|
8
|
-
var children = _a.children, maxLength = _a.maxLength, type = _a.type, value = _a.value, handlers = _a.handlers;
|
|
8
|
+
var children = _a.children, maxLength = _a.maxLength, type = _a.type, value = _a.value, handlers = _a.handlers, isEmail = _a.isEmail;
|
|
9
9
|
var _b = (0, hooks_1.useAppSelector)(slices_1.selectKioskConfig), keypad = _b.keypad, numpad = _b.numpad;
|
|
10
10
|
var isDollar = type === 'dollar';
|
|
11
11
|
var config = type === 'numeric' || isDollar ? numpad : keypad;
|
|
@@ -13,6 +13,6 @@ var Keypad = function (_a) {
|
|
|
13
13
|
var viewHandlers = (0, react_1.useMemo)(function () { return ({ keyPress: handleOnKeyPress }); }, [handleOnKeyPress]);
|
|
14
14
|
if (!config)
|
|
15
15
|
return null;
|
|
16
|
-
return children({ config: config, handlers: viewHandlers, value: value, type: type });
|
|
16
|
+
return children({ config: config, handlers: viewHandlers, value: value, type: type, isEmail: isEmail });
|
|
17
17
|
};
|
|
18
18
|
exports.default = Keypad;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { LoyaltyProgramSummary } from '@open-tender/types';
|
|
2
2
|
import { AccountLoyaltyProps } from '@open-tender/ui';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
declare const AccountLoyalty: ({ loyaltySummary, navigate, children }: {
|
|
4
|
+
declare const AccountLoyalty: ({ loyaltySummary, navigate, children, navigateTo }: {
|
|
5
5
|
loyaltySummary: LoyaltyProgramSummary;
|
|
6
6
|
navigate: (route: string) => void;
|
|
7
7
|
children: (props: AccountLoyaltyProps) => ReactNode;
|
|
8
|
+
navigateTo: string;
|
|
8
9
|
}) => ReactNode;
|
|
9
10
|
export default AccountLoyalty;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useAppSelector } from '../app/hooks';
|
|
2
2
|
import { selectCustomer, selectKioskConfig } from '../slices';
|
|
3
3
|
var AccountLoyalty = function (_a) {
|
|
4
|
-
var loyaltySummary = _a.loyaltySummary, navigate = _a.navigate, children = _a.children;
|
|
4
|
+
var loyaltySummary = _a.loyaltySummary, navigate = _a.navigate, children = _a.children, navigateTo = _a.navigateTo;
|
|
5
5
|
var config = useAppSelector(selectKioskConfig).accountLoyalty;
|
|
6
6
|
var account = useAppSelector(selectCustomer).account;
|
|
7
|
-
var startOrder = function () { return navigate(
|
|
7
|
+
var startOrder = function () { return navigate(navigateTo); };
|
|
8
8
|
var handlers = { startOrder: startOrder };
|
|
9
9
|
if (!config || !account || !loyaltySummary)
|
|
10
10
|
return null;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Handlers, KeypadProps, KeypadType } from '@open-tender/ui';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
declare const Keypad: ({ children, maxLength, type, value, handlers }: {
|
|
3
|
+
declare const Keypad: ({ children, maxLength, type, value, handlers, isEmail }: {
|
|
4
4
|
children: (props: KeypadProps) => ReactNode;
|
|
5
5
|
maxLength?: number;
|
|
6
6
|
type?: KeypadType;
|
|
7
7
|
value: string;
|
|
8
8
|
handlers: Handlers;
|
|
9
|
+
isEmail?: boolean;
|
|
9
10
|
}) => ReactNode;
|
|
10
11
|
export default Keypad;
|
|
@@ -3,7 +3,7 @@ import { useAppSelector } from '../app/hooks';
|
|
|
3
3
|
import { selectKioskConfig } from '../slices';
|
|
4
4
|
import { getKeyboardValue } from '../utils';
|
|
5
5
|
var Keypad = function (_a) {
|
|
6
|
-
var children = _a.children, maxLength = _a.maxLength, type = _a.type, value = _a.value, handlers = _a.handlers;
|
|
6
|
+
var children = _a.children, maxLength = _a.maxLength, type = _a.type, value = _a.value, handlers = _a.handlers, isEmail = _a.isEmail;
|
|
7
7
|
var _b = useAppSelector(selectKioskConfig), keypad = _b.keypad, numpad = _b.numpad;
|
|
8
8
|
var isDollar = type === 'dollar';
|
|
9
9
|
var config = type === 'numeric' || isDollar ? numpad : keypad;
|
|
@@ -11,6 +11,6 @@ var Keypad = function (_a) {
|
|
|
11
11
|
var viewHandlers = useMemo(function () { return ({ keyPress: handleOnKeyPress }); }, [handleOnKeyPress]);
|
|
12
12
|
if (!config)
|
|
13
13
|
return null;
|
|
14
|
-
return children({ config: config, handlers: viewHandlers, value: value, type: type });
|
|
14
|
+
return children({ config: config, handlers: viewHandlers, value: value, type: type, isEmail: isEmail });
|
|
15
15
|
};
|
|
16
16
|
export default Keypad;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.158",
|
|
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.3.
|
|
66
|
-
"@open-tender/utils": "^0.4.
|
|
64
|
+
"@open-tender/types": "^0.4.70",
|
|
65
|
+
"@open-tender/ui": "^0.3.105",
|
|
66
|
+
"@open-tender/utils": "^0.4.45",
|
|
67
67
|
"@reduxjs/toolkit": "^2.0.1",
|
|
68
68
|
"date-fns": "2.30.0",
|
|
69
69
|
"date-fns-tz": "^2.0.0",
|