@open-tender/store 1.1.156 → 1.1.157
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.
|
@@ -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,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.157",
|
|
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",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"peerDependencies": {
|
|
63
63
|
"@emotion/react": "^11.11.1",
|
|
64
64
|
"@open-tender/types": "^0.4.67",
|
|
65
|
-
"@open-tender/ui": "^0.3.
|
|
65
|
+
"@open-tender/ui": "^0.3.105",
|
|
66
66
|
"@open-tender/utils": "^0.4.40",
|
|
67
67
|
"@reduxjs/toolkit": "^2.0.1",
|
|
68
68
|
"date-fns": "2.30.0",
|