@open-tender/store 0.3.70 → 0.3.72
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/types/api/cart.d.ts +1 -1
- package/dist/cjs/types/theme.d.ts +4 -1
- package/dist/cjs/utils/order.js +2 -1
- package/dist/cjs/utils/pos.js +1 -1
- package/dist/esm/types/api/cart.d.ts +1 -1
- package/dist/esm/types/theme.d.ts +4 -1
- package/dist/esm/utils/order.js +2 -1
- package/dist/esm/utils/pos.js +1 -1
- package/package.json +1 -1
|
@@ -4,11 +4,14 @@ export declare type Layout = {
|
|
|
4
4
|
margin: string;
|
|
5
5
|
headerHeight: string;
|
|
6
6
|
footerHeight: string;
|
|
7
|
-
asideWidth: string;
|
|
8
7
|
sidebarWidth: string;
|
|
9
8
|
gutter: string;
|
|
10
9
|
paddingLessGutter: string;
|
|
11
10
|
marginLessGutter: string;
|
|
11
|
+
aside: {
|
|
12
|
+
width: string;
|
|
13
|
+
buttonHeight: string;
|
|
14
|
+
};
|
|
12
15
|
bigButton: {
|
|
13
16
|
width: string;
|
|
14
17
|
height: string;
|
package/dist/cjs/utils/order.js
CHANGED
|
@@ -117,7 +117,8 @@ var makeCartItemGroups = function (optionGroups, isEdit, soldOut) {
|
|
|
117
117
|
max: g.max_options,
|
|
118
118
|
min: g.min_options,
|
|
119
119
|
isSize: !!g.is_size,
|
|
120
|
-
options: options
|
|
120
|
+
options: options,
|
|
121
|
+
quantity: options.reduce(function (t, o) { return (t += o.quantity); }, 0)
|
|
121
122
|
};
|
|
122
123
|
return group;
|
|
123
124
|
});
|
package/dist/cjs/utils/pos.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.makeAsideWidth = void 0;
|
|
|
4
4
|
var helpers_1 = require("./helpers");
|
|
5
5
|
var makeAsideWidth = function (deviceWidth, layout) {
|
|
6
6
|
var padding = (0, helpers_1.pixelsToInt)(layout.padding);
|
|
7
|
-
var asideWidth = (0, helpers_1.pixelsToInt)(layout.
|
|
7
|
+
var asideWidth = (0, helpers_1.pixelsToInt)(layout.aside.width);
|
|
8
8
|
var buttonWidth = (0, helpers_1.pixelsToInt)(layout.bigButton.width);
|
|
9
9
|
var remaining = deviceWidth - padding * 2 - asideWidth;
|
|
10
10
|
var count = Math.floor(remaining / buttonWidth);
|
|
@@ -4,11 +4,14 @@ export declare type Layout = {
|
|
|
4
4
|
margin: string;
|
|
5
5
|
headerHeight: string;
|
|
6
6
|
footerHeight: string;
|
|
7
|
-
asideWidth: string;
|
|
8
7
|
sidebarWidth: string;
|
|
9
8
|
gutter: string;
|
|
10
9
|
paddingLessGutter: string;
|
|
11
10
|
marginLessGutter: string;
|
|
11
|
+
aside: {
|
|
12
|
+
width: string;
|
|
13
|
+
buttonHeight: string;
|
|
14
|
+
};
|
|
12
15
|
bigButton: {
|
|
13
16
|
width: string;
|
|
14
17
|
height: string;
|
package/dist/esm/utils/order.js
CHANGED
|
@@ -109,7 +109,8 @@ var makeCartItemGroups = function (optionGroups, isEdit, soldOut) {
|
|
|
109
109
|
max: g.max_options,
|
|
110
110
|
min: g.min_options,
|
|
111
111
|
isSize: !!g.is_size,
|
|
112
|
-
options: options
|
|
112
|
+
options: options,
|
|
113
|
+
quantity: options.reduce(function (t, o) { return (t += o.quantity); }, 0)
|
|
113
114
|
};
|
|
114
115
|
return group;
|
|
115
116
|
});
|
package/dist/esm/utils/pos.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { pixelsToInt } from './helpers';
|
|
2
2
|
export var makeAsideWidth = function (deviceWidth, layout) {
|
|
3
3
|
var padding = pixelsToInt(layout.padding);
|
|
4
|
-
var asideWidth = pixelsToInt(layout.
|
|
4
|
+
var asideWidth = pixelsToInt(layout.aside.width);
|
|
5
5
|
var buttonWidth = pixelsToInt(layout.bigButton.width);
|
|
6
6
|
var remaining = deviceWidth - padding * 2 - asideWidth;
|
|
7
7
|
var count = Math.floor(remaining / buttonWidth);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-tender/store",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.72",
|
|
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",
|