@open-tender/store 1.1.24 → 1.1.26

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.
@@ -37,6 +37,7 @@ var itemGroup_1 = tslib_1.__importDefault(require("./itemGroup"));
37
37
  var itemGroups_1 = tslib_1.__importDefault(require("./itemGroups"));
38
38
  var itemOption_1 = tslib_1.__importDefault(require("./itemOption"));
39
39
  var itemSelections_1 = tslib_1.__importDefault(require("./itemSelections"));
40
+ var keypad_1 = tslib_1.__importDefault(require("./keypad"));
40
41
  var label_1 = tslib_1.__importDefault(require("./label"));
41
42
  var loader_1 = tslib_1.__importDefault(require("./loader"));
42
43
  var madeForNotes_1 = tslib_1.__importDefault(require("./madeForNotes"));
@@ -105,6 +106,7 @@ var config = {
105
106
  itemGroups: itemGroups_1.default,
106
107
  itemOption: itemOption_1.default,
107
108
  itemSelections: itemSelections_1.default,
109
+ keypad: keypad_1.default,
108
110
  label: label_1.default,
109
111
  loader: loader_1.default,
110
112
  madeForNotes: madeForNotes_1.default,
@@ -0,0 +1,3 @@
1
+ import { ScreenConfig } from '@open-tender/ui';
2
+ declare const keypad: ScreenConfig;
3
+ export default keypad;
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ var styles_1 = tslib_1.__importDefault(require("../styles"));
5
+ var utils_1 = require("../utils");
6
+ var keypad = {
7
+ keypad__container: {
8
+ classes: '',
9
+ props: {},
10
+ style: {
11
+ width: '100%'
12
+ }
13
+ },
14
+ keypad__input: {
15
+ classes: '',
16
+ props: {},
17
+ style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textBody), { backgroundColor: 'transparent', borderColor: utils_1.theme.colors.border.primary, borderRadius: utils_1.theme.spacing.borderRadius.small, borderStyle: 'solid', borderWidth: utils_1.theme.spacing.borderWidth.medium, color: utils_1.theme.colors.text.primary, fontSize: utils_1.theme.fontSizes.large, paddingBottom: utils_1.theme.spacing.padding.small, paddingLeft: utils_1.theme.spacing.padding.medium, paddingRight: utils_1.theme.spacing.padding.medium, paddingTop: utils_1.theme.spacing.padding.small, marginBottom: utils_1.theme.spacing.margin.small, width: '100%' })
18
+ },
19
+ keypad__buttonsContainer: {
20
+ classes: '',
21
+ props: {},
22
+ style: {
23
+ flexDirection: 'column',
24
+ flexWrap: 'wrap',
25
+ width: '100%',
26
+ gap: 5
27
+ }
28
+ },
29
+ keypad__buttonsLine: {
30
+ classes: '',
31
+ props: {},
32
+ style: {
33
+ flexDirection: 'row',
34
+ flexWrap: 'nowrap',
35
+ width: '100%',
36
+ gap: 5
37
+ }
38
+ },
39
+ keypad__defaultButton: {
40
+ classes: '',
41
+ props: {},
42
+ style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textBody), { flexBasis: '100%', color: utils_1.theme.colors.text.primary, fontSize: utils_1.theme.fontSizes.large, height: 80, backgroundColor: utils_1.theme.colors.background.primary, borderWidth: utils_1.theme.spacing.borderWidth.medium, borderStyle: 'solid', borderColor: utils_1.theme.colors.border.primary, alignItems: 'center', justifyContent: 'center' })
43
+ },
44
+ keypad__numericButton: {
45
+ classes: '',
46
+ props: {},
47
+ style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textBody), { flexBasis: '100%', color: utils_1.theme.colors.text.primary, fontSize: utils_1.theme.fontSizes.large, backgroundColor: utils_1.theme.colors.background.primary, borderWidth: utils_1.theme.spacing.borderWidth.medium, borderStyle: 'solid', borderColor: utils_1.theme.colors.border.primary, alignItems: 'center', justifyContent: 'center', aspectRatio: 1.5 })
48
+ },
49
+ keypad__fixedWidthButton: {
50
+ classes: '',
51
+ props: {},
52
+ style: tslib_1.__assign(tslib_1.__assign({}, styles_1.default.textBody), { width: 80, color: utils_1.theme.colors.text.primary, fontSize: utils_1.theme.fontSizes.large, height: 80, backgroundColor: utils_1.theme.colors.background.primary, borderWidth: utils_1.theme.spacing.borderWidth.medium, borderStyle: 'solid', borderColor: utils_1.theme.colors.border.primary, alignItems: 'center', justifyContent: 'center' })
53
+ }
54
+ };
55
+ exports.default = keypad;
@@ -27,6 +27,7 @@ var signInPhone = {
27
27
  classes: '',
28
28
  props: {},
29
29
  style: {
30
+ width: '100%',
30
31
  alignItems: 'center',
31
32
  paddingBottom: utils_1.theme.spacing.padding.small
32
33
  }
@@ -2,12 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getKeyboardValue = void 0;
4
4
  var getKeyboardValue = function (key, value, maxLength) {
5
- if (key === 'del')
5
+ if (key === 'Del')
6
6
  return value.slice(0, -1);
7
- else if (key === 'clr')
7
+ else if (key === 'Clr')
8
8
  return '';
9
9
  else if (maxLength && value.length >= maxLength)
10
10
  return value;
11
+ else if (key === 'Space')
12
+ return value + ' ';
11
13
  else
12
14
  return value + key;
13
15
  };
@@ -34,6 +34,7 @@ import itemGroup from './itemGroup';
34
34
  import itemGroups from './itemGroups';
35
35
  import itemOption from './itemOption';
36
36
  import itemSelections from './itemSelections';
37
+ import keypad from './keypad';
37
38
  import label from './label';
38
39
  import loader from './loader';
39
40
  import madeForNotes from './madeForNotes';
@@ -102,6 +103,7 @@ var config = {
102
103
  itemGroups: itemGroups,
103
104
  itemOption: itemOption,
104
105
  itemSelections: itemSelections,
106
+ keypad: keypad,
105
107
  label: label,
106
108
  loader: loader,
107
109
  madeForNotes: madeForNotes,
@@ -0,0 +1,3 @@
1
+ import { ScreenConfig } from '@open-tender/ui';
2
+ declare const keypad: ScreenConfig;
3
+ export default keypad;
@@ -0,0 +1,53 @@
1
+ import { __assign } from "tslib";
2
+ import styles from '../styles';
3
+ import { theme } from '../utils';
4
+ var keypad = {
5
+ keypad__container: {
6
+ classes: '',
7
+ props: {},
8
+ style: {
9
+ width: '100%'
10
+ }
11
+ },
12
+ keypad__input: {
13
+ classes: '',
14
+ props: {},
15
+ style: __assign(__assign({}, styles.textBody), { backgroundColor: 'transparent', borderColor: theme.colors.border.primary, borderRadius: theme.spacing.borderRadius.small, borderStyle: 'solid', borderWidth: theme.spacing.borderWidth.medium, color: theme.colors.text.primary, fontSize: theme.fontSizes.large, paddingBottom: theme.spacing.padding.small, paddingLeft: theme.spacing.padding.medium, paddingRight: theme.spacing.padding.medium, paddingTop: theme.spacing.padding.small, marginBottom: theme.spacing.margin.small, width: '100%' })
16
+ },
17
+ keypad__buttonsContainer: {
18
+ classes: '',
19
+ props: {},
20
+ style: {
21
+ flexDirection: 'column',
22
+ flexWrap: 'wrap',
23
+ width: '100%',
24
+ gap: 5
25
+ }
26
+ },
27
+ keypad__buttonsLine: {
28
+ classes: '',
29
+ props: {},
30
+ style: {
31
+ flexDirection: 'row',
32
+ flexWrap: 'nowrap',
33
+ width: '100%',
34
+ gap: 5
35
+ }
36
+ },
37
+ keypad__defaultButton: {
38
+ classes: '',
39
+ props: {},
40
+ style: __assign(__assign({}, styles.textBody), { flexBasis: '100%', color: theme.colors.text.primary, fontSize: theme.fontSizes.large, height: 80, backgroundColor: theme.colors.background.primary, borderWidth: theme.spacing.borderWidth.medium, borderStyle: 'solid', borderColor: theme.colors.border.primary, alignItems: 'center', justifyContent: 'center' })
41
+ },
42
+ keypad__numericButton: {
43
+ classes: '',
44
+ props: {},
45
+ style: __assign(__assign({}, styles.textBody), { flexBasis: '100%', color: theme.colors.text.primary, fontSize: theme.fontSizes.large, backgroundColor: theme.colors.background.primary, borderWidth: theme.spacing.borderWidth.medium, borderStyle: 'solid', borderColor: theme.colors.border.primary, alignItems: 'center', justifyContent: 'center', aspectRatio: 1.5 })
46
+ },
47
+ keypad__fixedWidthButton: {
48
+ classes: '',
49
+ props: {},
50
+ style: __assign(__assign({}, styles.textBody), { width: 80, color: theme.colors.text.primary, fontSize: theme.fontSizes.large, height: 80, backgroundColor: theme.colors.background.primary, borderWidth: theme.spacing.borderWidth.medium, borderStyle: 'solid', borderColor: theme.colors.border.primary, alignItems: 'center', justifyContent: 'center' })
51
+ }
52
+ };
53
+ export default keypad;
@@ -25,6 +25,7 @@ var signInPhone = {
25
25
  classes: '',
26
26
  props: {},
27
27
  style: {
28
+ width: '100%',
28
29
  alignItems: 'center',
29
30
  paddingBottom: theme.spacing.padding.small
30
31
  }
@@ -1,10 +1,12 @@
1
1
  export var getKeyboardValue = function (key, value, maxLength) {
2
- if (key === 'del')
2
+ if (key === 'Del')
3
3
  return value.slice(0, -1);
4
- else if (key === 'clr')
4
+ else if (key === 'Clr')
5
5
  return '';
6
6
  else if (maxLength && value.length >= maxLength)
7
7
  return value;
8
+ else if (key === 'Space')
9
+ return value + ' ';
8
10
  else
9
11
  return value + key;
10
12
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-tender/store",
3
- "version": "1.1.24",
3
+ "version": "1.1.26",
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",
@@ -36,7 +36,7 @@
36
36
  "@babel/core": "^7.23.6",
37
37
  "@emotion/react": "^11.11.1",
38
38
  "@open-tender/types": "^0.4.44",
39
- "@open-tender/ui": "^0.3.18",
39
+ "@open-tender/ui": "^0.3.19",
40
40
  "@open-tender/utils": "^0.4.23",
41
41
  "@reduxjs/toolkit": "^2.0.1",
42
42
  "@types/react": "^18.2.45",
@@ -65,7 +65,7 @@
65
65
  "peerDependencies": {
66
66
  "@emotion/react": "^11.11.1",
67
67
  "@open-tender/types": "^0.4.43",
68
- "@open-tender/ui": "^0.3.18",
68
+ "@open-tender/ui": "^0.3.19",
69
69
  "@open-tender/utils": "^0.4.23",
70
70
  "@reduxjs/toolkit": "^2.0.1",
71
71
  "date-fns": "2.30.0",