@salesgenterp/ui-components 0.4.22 → 0.4.24
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/index.js +285 -285
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +9 -9
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
2
2
|
|
|
3
3
|
var material = require('@mui/material');
|
|
4
|
-
var React
|
|
5
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
|
+
var React__default = _interopDefault(React);
|
|
6
6
|
var gr = require('react-icons/gr');
|
|
7
7
|
require('react-icons/gi');
|
|
8
8
|
var bs = require('react-icons/bs');
|
|
@@ -19,10 +19,10 @@ var TableSortLabel = _interopDefault(require('@mui/material/TableSortLabel'));
|
|
|
19
19
|
var bi = require('react-icons/bi');
|
|
20
20
|
var cg = require('react-icons/cg');
|
|
21
21
|
var md = require('react-icons/md');
|
|
22
|
-
var io5 = require('react-icons/io5');
|
|
23
22
|
var reactHookForm = require('react-hook-form');
|
|
24
23
|
var hi = require('react-icons/hi');
|
|
25
24
|
var fi = require('react-icons/fi');
|
|
25
|
+
var io5 = require('react-icons/io5');
|
|
26
26
|
|
|
27
27
|
function _extends() {
|
|
28
28
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -92,49 +92,49 @@ var CartDrawerProductCard = function CartDrawerProductCard(_ref) {
|
|
|
92
92
|
loading = _ref.loading;
|
|
93
93
|
var imgnotfoundUrlcommon = '/images/imgnotfound.jpeg';
|
|
94
94
|
if (imgnotfoundUrl && imgnotfoundUrl !== 'null') imgnotfoundUrlcommon = imgnotfoundUrl;
|
|
95
|
-
return /*#__PURE__*/
|
|
95
|
+
return /*#__PURE__*/React__default.createElement(CartDrawerProduct, {
|
|
96
96
|
color: color
|
|
97
|
-
}, /*#__PURE__*/
|
|
97
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
98
98
|
src: product.imageUrl && product.imageUrl !== 'null' ? product.imageUrl : imgnotfoundUrlcommon,
|
|
99
99
|
alt: 'no product image available'
|
|
100
|
-
}), /*#__PURE__*/
|
|
100
|
+
}), /*#__PURE__*/React__default.createElement(material.Stack, {
|
|
101
101
|
flexDirection: "column",
|
|
102
102
|
justifyContent: "space-between",
|
|
103
103
|
alignItems: "flex-start",
|
|
104
104
|
className: "middleSection"
|
|
105
|
-
}, /*#__PURE__*/
|
|
105
|
+
}, /*#__PURE__*/React__default.createElement(material.Tooltip, {
|
|
106
106
|
title: product === null || product === void 0 ? void 0 : product.productName,
|
|
107
107
|
placement: "top",
|
|
108
108
|
arrow: true
|
|
109
|
-
}, /*#__PURE__*/
|
|
109
|
+
}, /*#__PURE__*/React__default.createElement("h6", {
|
|
110
110
|
className: "name",
|
|
111
111
|
onClick: function onClick() {
|
|
112
112
|
return handleRedirect(product);
|
|
113
113
|
}
|
|
114
|
-
}, product === null || product === void 0 ? void 0 : product.productName)), /*#__PURE__*/
|
|
114
|
+
}, product === null || product === void 0 ? void 0 : product.productName)), /*#__PURE__*/React__default.createElement("h6", null, (product === null || product === void 0 ? void 0 : product.standardPrice) === (product === null || product === void 0 ? void 0 : product.cartStandardPrice) ? "$" + (product === null || product === void 0 ? void 0 : product.standardPrice) : /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("span", null, "$", product === null || product === void 0 ? void 0 : (_product$cartStandard = product.cartStandardPrice) === null || _product$cartStandard === void 0 ? void 0 : _product$cartStandard.toFixed(2)), "$", product === null || product === void 0 ? void 0 : (_product$standardPric = product.standardPrice) === null || _product$standardPric === void 0 ? void 0 : _product$standardPric.toFixed(2)))), /*#__PURE__*/React__default.createElement(material.Stack, {
|
|
115
115
|
flexDirection: "column",
|
|
116
116
|
justifyContent: "space-between",
|
|
117
117
|
alignItems: "flex-end",
|
|
118
118
|
className: "endSection"
|
|
119
|
-
}, /*#__PURE__*/
|
|
119
|
+
}, /*#__PURE__*/React__default.createElement(ri.RiDeleteBin5Line, {
|
|
120
120
|
className: "icon",
|
|
121
121
|
onClick: function onClick() {
|
|
122
122
|
if (loading) return;
|
|
123
123
|
handleRemoveProduct(product);
|
|
124
124
|
}
|
|
125
|
-
}), /*#__PURE__*/
|
|
125
|
+
}), /*#__PURE__*/React__default.createElement(CartDrawerQtBox, null, /*#__PURE__*/React__default.createElement("span", {
|
|
126
126
|
onClick: function onClick() {
|
|
127
127
|
if (loading) return;
|
|
128
128
|
handleIncrementDecrement('decrement', product);
|
|
129
129
|
}
|
|
130
|
-
}, ' ', /*#__PURE__*/
|
|
130
|
+
}, ' ', /*#__PURE__*/React__default.createElement(ai.AiOutlineMinus, null)), ' ', /*#__PURE__*/React__default.createElement("span", {
|
|
131
131
|
className: 'qt'
|
|
132
|
-
}, product === null || product === void 0 ? void 0 : product.quantity), /*#__PURE__*/
|
|
132
|
+
}, product === null || product === void 0 ? void 0 : product.quantity), /*#__PURE__*/React__default.createElement("span", {
|
|
133
133
|
onClick: function onClick() {
|
|
134
134
|
if (loading) return;
|
|
135
135
|
handleIncrementDecrement('increment', product);
|
|
136
136
|
}
|
|
137
|
-
}, /*#__PURE__*/
|
|
137
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePlus, null)))));
|
|
138
138
|
};
|
|
139
139
|
|
|
140
140
|
var CartDrawer = function CartDrawer(_ref) {
|
|
@@ -149,19 +149,19 @@ var CartDrawer = function CartDrawer(_ref) {
|
|
|
149
149
|
handleClose = _ref.handleClose,
|
|
150
150
|
loading = _ref.loading,
|
|
151
151
|
imgnotfoundUrl = _ref.imgnotfoundUrl;
|
|
152
|
-
return /*#__PURE__*/
|
|
152
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(CartDrawerContainer, {
|
|
153
153
|
maxWidth: maxWidth
|
|
154
|
-
}, /*#__PURE__*/
|
|
154
|
+
}, /*#__PURE__*/React__default.createElement(CartDrawerBar, null, /*#__PURE__*/React__default.createElement("h2", null, "Your Cart"), /*#__PURE__*/React__default.createElement(gr.GrClose, {
|
|
155
155
|
className: "icon",
|
|
156
156
|
onClick: function onClick() {
|
|
157
157
|
handleClose();
|
|
158
158
|
}
|
|
159
|
-
})), cartData && (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity) > 0 ? /*#__PURE__*/
|
|
159
|
+
})), cartData && (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity) > 0 ? /*#__PURE__*/React__default.createElement(CartDrawerProductContainer, {
|
|
160
160
|
opacity: loading ? '.4' : '1'
|
|
161
161
|
}, cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.map(function (product, i) {
|
|
162
|
-
return /*#__PURE__*/
|
|
162
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, loading && /*#__PURE__*/React__default.createElement(CartDrawerLoader, null, /*#__PURE__*/React__default.createElement(reactSpinners.PuffLoader, {
|
|
163
163
|
color: "black"
|
|
164
|
-
})), /*#__PURE__*/
|
|
164
|
+
})), /*#__PURE__*/React__default.createElement(CartDrawerProductCard, {
|
|
165
165
|
product: product,
|
|
166
166
|
handleRedirect: handleRedirect,
|
|
167
167
|
handleIncrementDecrement: handleIncrementDecrement,
|
|
@@ -171,21 +171,21 @@ var CartDrawer = function CartDrawer(_ref) {
|
|
|
171
171
|
imgnotfoundUrl: imgnotfoundUrl,
|
|
172
172
|
loading: loading
|
|
173
173
|
}));
|
|
174
|
-
})) : /*#__PURE__*/
|
|
174
|
+
})) : /*#__PURE__*/React__default.createElement(CartDrawerEmptyCart, {
|
|
175
175
|
color: color
|
|
176
|
-
}, /*#__PURE__*/
|
|
176
|
+
}, /*#__PURE__*/React__default.createElement(bs.BsCartX, {
|
|
177
177
|
className: "icon"
|
|
178
|
-
}), /*#__PURE__*/
|
|
178
|
+
}), /*#__PURE__*/React__default.createElement("h6", null, "OOps!"), /*#__PURE__*/React__default.createElement("p", null, "your cart is empty")), cartData && (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity) > 0 && /*#__PURE__*/React__default.createElement(CartDrawerBottomSection, null, /*#__PURE__*/React__default.createElement(material.Stack, {
|
|
179
179
|
flexDirection: "row",
|
|
180
180
|
justifyContent: "space-between",
|
|
181
181
|
alignItems: "center",
|
|
182
182
|
className: "row"
|
|
183
|
-
}, /*#__PURE__*/
|
|
183
|
+
}, /*#__PURE__*/React__default.createElement("h5", null, "Subtotal", /*#__PURE__*/React__default.createElement("span", null, "(", cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity, " items)")), /*#__PURE__*/React__default.createElement("h5", null, "$", cartData === null || cartData === void 0 ? void 0 : (_cartData$totalCartPr = cartData.totalCartPrice) === null || _cartData$totalCartPr === void 0 ? void 0 : _cartData$totalCartPr.toFixed(2))), /*#__PURE__*/React__default.createElement(CartDrawerOutlinedButton, {
|
|
184
184
|
color: color,
|
|
185
185
|
onClick: function onClick() {
|
|
186
186
|
return handleRedirect('cart');
|
|
187
187
|
}
|
|
188
|
-
}, "view cart"), /*#__PURE__*/
|
|
188
|
+
}, "view cart"), /*#__PURE__*/React__default.createElement(CartDrawerFilledButton, {
|
|
189
189
|
color: color,
|
|
190
190
|
onClick: function onClick() {
|
|
191
191
|
return handleRedirect('checkout');
|
|
@@ -1364,7 +1364,7 @@ var CardRow = function CardRow(_ref) {
|
|
|
1364
1364
|
styles = _ref.styles;
|
|
1365
1365
|
var imgnotfoundUrlcommon = '/images/imgnotfound.jpeg';
|
|
1366
1366
|
if (imgnotfoundUrl && imgnotfoundUrl !== 'null') imgnotfoundUrlcommon = imgnotfoundUrl;
|
|
1367
|
-
return /*#__PURE__*/
|
|
1367
|
+
return /*#__PURE__*/React__default.createElement(CartTableRow, {
|
|
1368
1368
|
onClick: function onClick(event) {
|
|
1369
1369
|
return handleClick(event, row);
|
|
1370
1370
|
},
|
|
@@ -1373,74 +1373,74 @@ var CardRow = function CardRow(_ref) {
|
|
|
1373
1373
|
tabIndex: -1,
|
|
1374
1374
|
key: row.ProductId,
|
|
1375
1375
|
size: styles === null || styles === void 0 ? void 0 : (_styles$price = styles.price) === null || _styles$price === void 0 ? void 0 : _styles$price.size
|
|
1376
|
-
}, /*#__PURE__*/
|
|
1376
|
+
}, /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1377
1377
|
padding: "checkbox"
|
|
1378
|
-
}, /*#__PURE__*/
|
|
1378
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
1379
1379
|
className: "borderLeft",
|
|
1380
1380
|
style: {
|
|
1381
1381
|
background: styles === null || styles === void 0 ? void 0 : (_styles$Btn = styles.Btn) === null || _styles$Btn === void 0 ? void 0 : _styles$Btn.background
|
|
1382
1382
|
}
|
|
1383
|
-
}), /*#__PURE__*/
|
|
1383
|
+
}), /*#__PURE__*/React__default.createElement(material.Checkbox, {
|
|
1384
1384
|
color: "primary",
|
|
1385
1385
|
checked: isItemSelected,
|
|
1386
1386
|
inputProps: {
|
|
1387
1387
|
'aria-labelledby': 'product'
|
|
1388
1388
|
},
|
|
1389
1389
|
className: "cartCheckBox"
|
|
1390
|
-
})), /*#__PURE__*/
|
|
1390
|
+
})), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1391
1391
|
className: "CartnoPaddingSm"
|
|
1392
|
-
}, /*#__PURE__*/
|
|
1392
|
+
}, /*#__PURE__*/React__default.createElement(ProductImage, {
|
|
1393
1393
|
src: row.imageUrl && row.imageUrl !== 'null' ? row.imageUrl : imgnotfoundUrlcommon,
|
|
1394
1394
|
alt: 'no product image available',
|
|
1395
1395
|
width: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.width) || 50,
|
|
1396
1396
|
height: (imgSize === null || imgSize === void 0 ? void 0 : imgSize.height) || 58
|
|
1397
|
-
})), /*#__PURE__*/
|
|
1397
|
+
})), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1398
1398
|
component: "th",
|
|
1399
1399
|
id: row === null || row === void 0 ? void 0 : row.labelId,
|
|
1400
1400
|
scope: "row",
|
|
1401
1401
|
padding: "none"
|
|
1402
|
-
}, /*#__PURE__*/
|
|
1402
|
+
}, /*#__PURE__*/React__default.createElement(ProductName, {
|
|
1403
1403
|
maxHeight: styles.name && (styles === null || styles === void 0 ? void 0 : (_styles$name = styles.name) === null || _styles$name === void 0 ? void 0 : _styles$name.lines) * 1.7,
|
|
1404
1404
|
size: styles === null || styles === void 0 ? void 0 : (_styles$name2 = styles.name) === null || _styles$name2 === void 0 ? void 0 : _styles$name2.size
|
|
1405
|
-
}, row.productName), row.quantity > row.availableQuantity && /*#__PURE__*/
|
|
1405
|
+
}, row.productName), row.quantity > row.availableQuantity && /*#__PURE__*/React__default.createElement("p", {
|
|
1406
1406
|
className: "outOfStock"
|
|
1407
|
-
}, "out of stock")), /*#__PURE__*/
|
|
1407
|
+
}, "out of stock")), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1408
1408
|
align: "center",
|
|
1409
1409
|
className: "CartnoBelowSm"
|
|
1410
|
-
}, /*#__PURE__*/
|
|
1410
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
1411
1411
|
className: "price"
|
|
1412
|
-
}, "$", row === null || row === void 0 ? void 0 : (_row$standardPrice = row.standardPrice) === null || _row$standardPrice === void 0 ? void 0 : _row$standardPrice.toFixed(2))), /*#__PURE__*/
|
|
1412
|
+
}, "$", row === null || row === void 0 ? void 0 : (_row$standardPrice = row.standardPrice) === null || _row$standardPrice === void 0 ? void 0 : _row$standardPrice.toFixed(2))), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1413
1413
|
align: "center"
|
|
1414
|
-
}, /*#__PURE__*/
|
|
1414
|
+
}, /*#__PURE__*/React__default.createElement(QuantityBox, null, /*#__PURE__*/React__default.createElement("div", {
|
|
1415
1415
|
onClick: function onClick(e) {
|
|
1416
1416
|
e.stopPropagation();
|
|
1417
1417
|
if (loading) return;
|
|
1418
1418
|
handleIncrementDecrement('decrement', row);
|
|
1419
1419
|
}
|
|
1420
|
-
}, /*#__PURE__*/
|
|
1420
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineMinus, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
1421
1421
|
className: "price"
|
|
1422
|
-
}, /*#__PURE__*/
|
|
1422
|
+
}, /*#__PURE__*/React__default.createElement("p", null, row === null || row === void 0 ? void 0 : row.quantity)), /*#__PURE__*/React__default.createElement("div", {
|
|
1423
1423
|
className: "add",
|
|
1424
1424
|
onClick: function onClick(e) {
|
|
1425
1425
|
e.stopPropagation();
|
|
1426
1426
|
if (loading) return;
|
|
1427
1427
|
handleIncrementDecrement('increment', row);
|
|
1428
1428
|
}
|
|
1429
|
-
}, /*#__PURE__*/
|
|
1429
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePlus, null)))), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1430
1430
|
alig: "center",
|
|
1431
1431
|
className: "CartnoPaddingSm"
|
|
1432
|
-
}, /*#__PURE__*/
|
|
1432
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
1433
1433
|
className: "price"
|
|
1434
|
-
}, "$", (_row$subtotal = row.subtotal) === null || _row$subtotal === void 0 ? void 0 : _row$subtotal.toFixed(2))), /*#__PURE__*/
|
|
1434
|
+
}, "$", (_row$subtotal = row.subtotal) === null || _row$subtotal === void 0 ? void 0 : _row$subtotal.toFixed(2))), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1435
1435
|
alig: "center",
|
|
1436
1436
|
className: "CartnoBelowSm"
|
|
1437
|
-
}, /*#__PURE__*/
|
|
1437
|
+
}, /*#__PURE__*/React__default.createElement(DeleteBtn, {
|
|
1438
1438
|
onClick: function onClick(e) {
|
|
1439
1439
|
e.stopPropagation();
|
|
1440
1440
|
if (loading) return;
|
|
1441
1441
|
handleRemoveProduct(row);
|
|
1442
1442
|
}
|
|
1443
|
-
}, /*#__PURE__*/
|
|
1443
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineClose, null))));
|
|
1444
1444
|
};
|
|
1445
1445
|
|
|
1446
1446
|
var headCells = [{
|
|
@@ -1498,15 +1498,15 @@ function EnhancedTableHead(props) {
|
|
|
1498
1498
|
};
|
|
1499
1499
|
};
|
|
1500
1500
|
|
|
1501
|
-
return /*#__PURE__*/React
|
|
1501
|
+
return /*#__PURE__*/React.createElement(TableHead, {
|
|
1502
1502
|
className: "CartnoBelowSm"
|
|
1503
|
-
}, /*#__PURE__*/React
|
|
1503
|
+
}, /*#__PURE__*/React.createElement(TableRow, null, /*#__PURE__*/React.createElement(CartTableCell, {
|
|
1504
1504
|
sx: {
|
|
1505
1505
|
zIndex: '3 !important'
|
|
1506
1506
|
},
|
|
1507
1507
|
padding: "checkbox",
|
|
1508
1508
|
bg: styles.bg
|
|
1509
|
-
}, /*#__PURE__*/React
|
|
1509
|
+
}, /*#__PURE__*/React.createElement(material.Checkbox, {
|
|
1510
1510
|
color: "primary",
|
|
1511
1511
|
indeterminate: numSelected > 0 && numSelected < rowCount,
|
|
1512
1512
|
checked: rowCount > 0 && numSelected === rowCount,
|
|
@@ -1515,7 +1515,7 @@ function EnhancedTableHead(props) {
|
|
|
1515
1515
|
'aria-label': 'select all products'
|
|
1516
1516
|
}
|
|
1517
1517
|
})), headCells.map(function (headCell) {
|
|
1518
|
-
return /*#__PURE__*/React
|
|
1518
|
+
return /*#__PURE__*/React.createElement(CartTableCell, {
|
|
1519
1519
|
key: headCell.id,
|
|
1520
1520
|
align: headCell.numeric ? 'center' : 'left',
|
|
1521
1521
|
padding: headCell.disablePadding ? 'none' : 'normal',
|
|
@@ -1526,7 +1526,7 @@ function EnhancedTableHead(props) {
|
|
|
1526
1526
|
},
|
|
1527
1527
|
className: (headCell === null || headCell === void 0 ? void 0 : headCell.noBelowSm) && 'CartnoBelowSm',
|
|
1528
1528
|
bg: styles.bg
|
|
1529
|
-
}, headCell.filter ? /*#__PURE__*/React
|
|
1529
|
+
}, headCell.filter ? /*#__PURE__*/React.createElement(TableSortLabel, {
|
|
1530
1530
|
active: orderBy === headCell.id,
|
|
1531
1531
|
direction: orderBy === headCell.id ? order : 'asc',
|
|
1532
1532
|
onClick: createSortHandler(headCell.id)
|
|
@@ -1558,19 +1558,19 @@ function EnhancedTable(_ref) {
|
|
|
1558
1558
|
});
|
|
1559
1559
|
});
|
|
1560
1560
|
|
|
1561
|
-
var _React$useState = React
|
|
1561
|
+
var _React$useState = React.useState('asc'),
|
|
1562
1562
|
order = _React$useState[0],
|
|
1563
1563
|
setOrder = _React$useState[1];
|
|
1564
1564
|
|
|
1565
|
-
var _React$useState2 = React
|
|
1565
|
+
var _React$useState2 = React.useState('calories'),
|
|
1566
1566
|
orderBy = _React$useState2[0],
|
|
1567
1567
|
setOrderBy = _React$useState2[1];
|
|
1568
1568
|
|
|
1569
|
-
var _React$useState3 = React
|
|
1569
|
+
var _React$useState3 = React.useState([]),
|
|
1570
1570
|
selected = _React$useState3[0],
|
|
1571
1571
|
setSelected = _React$useState3[1];
|
|
1572
1572
|
|
|
1573
|
-
var _React$useState4 = React
|
|
1573
|
+
var _React$useState4 = React.useState(cartList),
|
|
1574
1574
|
cartArray = _React$useState4[0],
|
|
1575
1575
|
setCartArray = _React$useState4[1];
|
|
1576
1576
|
|
|
@@ -1591,7 +1591,7 @@ function EnhancedTable(_ref) {
|
|
|
1591
1591
|
return setCartArray(newArray);
|
|
1592
1592
|
};
|
|
1593
1593
|
|
|
1594
|
-
React
|
|
1594
|
+
React.useEffect(function () {
|
|
1595
1595
|
Sort();
|
|
1596
1596
|
}, [order, orderBy]);
|
|
1597
1597
|
|
|
@@ -1634,27 +1634,27 @@ function EnhancedTable(_ref) {
|
|
|
1634
1634
|
return selected.includes(name);
|
|
1635
1635
|
};
|
|
1636
1636
|
|
|
1637
|
-
React
|
|
1637
|
+
React.useEffect(function () {
|
|
1638
1638
|
setCartArray(cartList);
|
|
1639
1639
|
}, [cartData]);
|
|
1640
1640
|
console.log(selected);
|
|
1641
|
-
return /*#__PURE__*/React
|
|
1641
|
+
return /*#__PURE__*/React.createElement(CartPageBox, null, loading && /*#__PURE__*/React.createElement(Loader, null, /*#__PURE__*/React.createElement(reactSpinners.BounceLoader, {
|
|
1642
1642
|
size: 40,
|
|
1643
1643
|
color: styles.Btn.background,
|
|
1644
1644
|
loading: true
|
|
1645
|
-
})), /*#__PURE__*/React
|
|
1645
|
+
})), /*#__PURE__*/React.createElement(Box, {
|
|
1646
1646
|
sx: {
|
|
1647
1647
|
width: '100%',
|
|
1648
1648
|
mb: 2
|
|
1649
1649
|
}
|
|
1650
|
-
}, /*#__PURE__*/React
|
|
1650
|
+
}, /*#__PURE__*/React.createElement(CartTableContainer, {
|
|
1651
1651
|
bg: styles === null || styles === void 0 ? void 0 : (_styles$scroll = styles.scroll) === null || _styles$scroll === void 0 ? void 0 : _styles$scroll.bg,
|
|
1652
1652
|
color: styles === null || styles === void 0 ? void 0 : (_styles$scroll2 = styles.scroll) === null || _styles$scroll2 === void 0 ? void 0 : _styles$scroll2.background
|
|
1653
|
-
}, /*#__PURE__*/React
|
|
1653
|
+
}, /*#__PURE__*/React.createElement(Table, {
|
|
1654
1654
|
"aria-labelledby": "tableTitle",
|
|
1655
1655
|
size: 'small',
|
|
1656
1656
|
stickyHeader: true
|
|
1657
|
-
}, /*#__PURE__*/React
|
|
1657
|
+
}, /*#__PURE__*/React.createElement(EnhancedTableHead, {
|
|
1658
1658
|
numSelected: selected.length,
|
|
1659
1659
|
order: order,
|
|
1660
1660
|
orderBy: orderBy,
|
|
@@ -1662,9 +1662,9 @@ function EnhancedTable(_ref) {
|
|
|
1662
1662
|
onRequestSort: handleRequestSort,
|
|
1663
1663
|
rowCount: cartArray === null || cartArray === void 0 ? void 0 : cartArray.length,
|
|
1664
1664
|
styles: styles
|
|
1665
|
-
}), /*#__PURE__*/React
|
|
1665
|
+
}), /*#__PURE__*/React.createElement(TableBody, null, cartArray === null || cartArray === void 0 ? void 0 : cartArray.map(function (row, index) {
|
|
1666
1666
|
var isItemSelected = isSelected(row);
|
|
1667
|
-
return /*#__PURE__*/React
|
|
1667
|
+
return /*#__PURE__*/React.createElement(CardRow, {
|
|
1668
1668
|
row: row,
|
|
1669
1669
|
isItemSelected: isItemSelected,
|
|
1670
1670
|
handleClick: handleClick,
|
|
@@ -1675,7 +1675,7 @@ function EnhancedTable(_ref) {
|
|
|
1675
1675
|
handleIncrementDecrement: handleIncrementDecrement,
|
|
1676
1676
|
handleRemoveProduct: handleRemoveProduct
|
|
1677
1677
|
});
|
|
1678
|
-
}))))), /*#__PURE__*/React
|
|
1678
|
+
}))))), /*#__PURE__*/React.createElement(CartButtonsRow, null, /*#__PURE__*/React.createElement("button", {
|
|
1679
1679
|
onClick: function onClick() {
|
|
1680
1680
|
new Promise(function (resolve, reject) {
|
|
1681
1681
|
if (loading) return;
|
|
@@ -1684,7 +1684,7 @@ function EnhancedTable(_ref) {
|
|
|
1684
1684
|
});
|
|
1685
1685
|
setSelected([]);
|
|
1686
1686
|
}
|
|
1687
|
-
}, "remove selected"), /*#__PURE__*/React
|
|
1687
|
+
}, "remove selected"), /*#__PURE__*/React.createElement("button", null, "updated cart")));
|
|
1688
1688
|
}
|
|
1689
1689
|
|
|
1690
1690
|
var _templateObject$4, _templateObject2$4, _templateObject3$4, _templateObject4$3, _templateObject5$3, _templateObject6$3, _templateObject7$2;
|
|
@@ -1711,37 +1711,37 @@ var CartPageProductCard = function CartPageProductCard(_ref) {
|
|
|
1711
1711
|
imgSize = _ref.imgSize;
|
|
1712
1712
|
var imgnotfoundUrlcommon = '/images/imgnotfound.jpeg';
|
|
1713
1713
|
if (imgnotfoundUrl && imgnotfoundUrl !== 'null') imgnotfoundUrlcommon = imgnotfoundUrl;
|
|
1714
|
-
return /*#__PURE__*/
|
|
1714
|
+
return /*#__PURE__*/React__default.createElement(CartPageCard, null, /*#__PURE__*/React__default.createElement(CartPageImg, {
|
|
1715
1715
|
src: item.imageUrl && item.imageUrl !== 'null' ? item.imageUrl : imgnotfoundUrlcommon,
|
|
1716
1716
|
alt: 'no product image available',
|
|
1717
1717
|
width: imgSize === null || imgSize === void 0 ? void 0 : imgSize.width,
|
|
1718
1718
|
height: imgSize === null || imgSize === void 0 ? void 0 : imgSize.height
|
|
1719
|
-
}), /*#__PURE__*/
|
|
1719
|
+
}), /*#__PURE__*/React__default.createElement(NameAndQtBox, null, /*#__PURE__*/React__default.createElement(CartPageCardName, null, /*#__PURE__*/React__default.createElement(material.Tooltip, {
|
|
1720
1720
|
title: item.productName,
|
|
1721
1721
|
placement: "top",
|
|
1722
1722
|
arrow: true
|
|
1723
|
-
}, /*#__PURE__*/
|
|
1723
|
+
}, /*#__PURE__*/React__default.createElement("h6", null, item.productName)), /*#__PURE__*/React__default.createElement("p", null, "$", (_item$standardPrice = item.standardPrice) === null || _item$standardPrice === void 0 ? void 0 : _item$standardPrice.toFixed(2))), /*#__PURE__*/React__default.createElement(QtAndPriceBox, null, /*#__PURE__*/React__default.createElement(CartPageQtBox, null, /*#__PURE__*/React__default.createElement("span", {
|
|
1724
1724
|
className: "icon",
|
|
1725
1725
|
onClick: function onClick() {
|
|
1726
1726
|
if (loading) return;
|
|
1727
1727
|
handleIncrementDecrement('decrement', item);
|
|
1728
1728
|
}
|
|
1729
|
-
}, /*#__PURE__*/
|
|
1729
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineMinus, null)), /*#__PURE__*/React__default.createElement("span", {
|
|
1730
1730
|
className: "qt"
|
|
1731
|
-
}, item.quantity), /*#__PURE__*/
|
|
1731
|
+
}, item.quantity), /*#__PURE__*/React__default.createElement("span", {
|
|
1732
1732
|
className: "icon",
|
|
1733
1733
|
onClick: function onClick() {
|
|
1734
1734
|
if (loading) return;
|
|
1735
1735
|
handleIncrementDecrement('increment', item);
|
|
1736
1736
|
}
|
|
1737
|
-
}, /*#__PURE__*/
|
|
1737
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlinePlus, null))), /*#__PURE__*/React__default.createElement("p", {
|
|
1738
1738
|
className: "subtotal"
|
|
1739
|
-
}, "subtotal: $", (item.standardPrice * item.quantity).toFixed(2)))), /*#__PURE__*/
|
|
1739
|
+
}, "subtotal: $", (item.standardPrice * item.quantity).toFixed(2)))), /*#__PURE__*/React__default.createElement(CloseBtn, {
|
|
1740
1740
|
onClick: function onClick() {
|
|
1741
1741
|
if (loading) return;
|
|
1742
1742
|
handleRemoveProduct(item);
|
|
1743
1743
|
}
|
|
1744
|
-
}, /*#__PURE__*/
|
|
1744
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineClose, null)));
|
|
1745
1745
|
};
|
|
1746
1746
|
|
|
1747
1747
|
var CartPageMainRetail = function CartPageMainRetail(_ref) {
|
|
@@ -1754,16 +1754,16 @@ var CartPageMainRetail = function CartPageMainRetail(_ref) {
|
|
|
1754
1754
|
handleIncrementDecrement = _ref.handleIncrementDecrement,
|
|
1755
1755
|
handleRemoveProduct = _ref.handleRemoveProduct,
|
|
1756
1756
|
styles = _ref.styles;
|
|
1757
|
-
return /*#__PURE__*/
|
|
1757
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
1758
1758
|
className: "scrollDiv"
|
|
1759
|
-
}, /*#__PURE__*/
|
|
1759
|
+
}, /*#__PURE__*/React__default.createElement(CardsBox, {
|
|
1760
1760
|
retail: retail
|
|
1761
|
-
}, loading && /*#__PURE__*/
|
|
1761
|
+
}, loading && /*#__PURE__*/React__default.createElement(Loader, null, /*#__PURE__*/React__default.createElement(reactSpinners.BounceLoader, {
|
|
1762
1762
|
size: 40,
|
|
1763
1763
|
color: styles.Btn.background,
|
|
1764
1764
|
loading: true
|
|
1765
1765
|
})), cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.map(function (item) {
|
|
1766
|
-
return /*#__PURE__*/
|
|
1766
|
+
return /*#__PURE__*/React__default.createElement(CartPageProductCard, {
|
|
1767
1767
|
item: item,
|
|
1768
1768
|
loading: loading,
|
|
1769
1769
|
imgnotfoundUrl: imgnotfoundUrl,
|
|
@@ -1838,58 +1838,58 @@ var CartSummary = function CartSummary(_ref) {
|
|
|
1838
1838
|
totalCartPrice = _ref.totalCartPrice;
|
|
1839
1839
|
var cartSummary = styles.cartSummary,
|
|
1840
1840
|
Btn = styles.Btn;
|
|
1841
|
-
return /*#__PURE__*/
|
|
1841
|
+
return /*#__PURE__*/React__default.createElement(CartSummaryContainer, {
|
|
1842
1842
|
background: cartSummary.bg,
|
|
1843
1843
|
color: cartSummary.color
|
|
1844
|
-
}, /*#__PURE__*/
|
|
1844
|
+
}, /*#__PURE__*/React__default.createElement("p", null, "Cart summary"), /*#__PURE__*/React__default.createElement(CartSummaryHr, {
|
|
1845
1845
|
color: cartSummary.hr
|
|
1846
|
-
}), /*#__PURE__*/
|
|
1846
|
+
}), /*#__PURE__*/React__default.createElement(CartSummaryRow, null, /*#__PURE__*/React__default.createElement("h6", null, "subtotal"), /*#__PURE__*/React__default.createElement("h5", null, "$", subtotal === null || subtotal === void 0 ? void 0 : subtotal.toFixed(2))), /*#__PURE__*/React__default.createElement(CartSummaryHr, {
|
|
1847
1847
|
color: cartSummary.hr
|
|
1848
|
-
}), /*#__PURE__*/
|
|
1848
|
+
}), /*#__PURE__*/React__default.createElement(CartSummaryRow, null, /*#__PURE__*/React__default.createElement("h6", null, "Discount"), /*#__PURE__*/React__default.createElement("h5", null, "$0.00")), /*#__PURE__*/React__default.createElement(CartSummaryHr, {
|
|
1849
1849
|
color: cartSummary.hr
|
|
1850
|
-
}), retail && /*#__PURE__*/
|
|
1850
|
+
}), retail && /*#__PURE__*/React__default.createElement(material.Stack, {
|
|
1851
1851
|
flexDirection: "column",
|
|
1852
1852
|
justifyContent: "flexStart",
|
|
1853
1853
|
sx: {
|
|
1854
1854
|
width: '100%'
|
|
1855
1855
|
}
|
|
1856
|
-
}, /*#__PURE__*/
|
|
1856
|
+
}, /*#__PURE__*/React__default.createElement(CartSummaryRow, {
|
|
1857
1857
|
justify: "flex-start"
|
|
1858
|
-
}, /*#__PURE__*/
|
|
1858
|
+
}, /*#__PURE__*/React__default.createElement("h6", null, "shipping")), shippingData && shippingData.map(function (li, i) {
|
|
1859
1859
|
var _li$amount;
|
|
1860
1860
|
|
|
1861
|
-
return /*#__PURE__*/
|
|
1861
|
+
return /*#__PURE__*/React__default.createElement(CartSummaryCheckBoxRow, {
|
|
1862
1862
|
key: i,
|
|
1863
1863
|
selected: li.id === selectedShipping.id,
|
|
1864
1864
|
onClick: function onClick() {
|
|
1865
1865
|
setShipping(li);
|
|
1866
1866
|
},
|
|
1867
1867
|
background: cartSummary.color
|
|
1868
|
-
}, /*#__PURE__*/
|
|
1868
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
1869
1869
|
className: "checkBox"
|
|
1870
|
-
}), /*#__PURE__*/
|
|
1871
|
-
}), /*#__PURE__*/
|
|
1870
|
+
}), /*#__PURE__*/React__default.createElement("p", null, li.name, ' ', li.amount && li.amount > 0 && /*#__PURE__*/React__default.createElement("span", null, ": $", (_li$amount = li.amount) === null || _li$amount === void 0 ? void 0 : _li$amount.toFixed(2))));
|
|
1871
|
+
}), /*#__PURE__*/React__default.createElement(CartSummaryCheckBoxRow, null, /*#__PURE__*/React__default.createElement("p", null, "Shipping options will be updated during checkout.", /*#__PURE__*/React__default.createElement("br", null), /*#__PURE__*/React__default.createElement("span", {
|
|
1872
1872
|
className: "underline"
|
|
1873
|
-
}, "Calculate shipping"))), /*#__PURE__*/
|
|
1873
|
+
}, "Calculate shipping"))), /*#__PURE__*/React__default.createElement(CartSummaryHr, {
|
|
1874
1874
|
color: cartSummary.hr
|
|
1875
|
-
})), /*#__PURE__*/
|
|
1875
|
+
})), /*#__PURE__*/React__default.createElement(CartSummaryInputBox, {
|
|
1876
1876
|
paddingBottom: !retail,
|
|
1877
1877
|
background: (_cartSummary$input = cartSummary.input) === null || _cartSummary$input === void 0 ? void 0 : _cartSummary$input.bg,
|
|
1878
1878
|
color: (_cartSummary$input2 = cartSummary.input) === null || _cartSummary$input2 === void 0 ? void 0 : _cartSummary$input2.color,
|
|
1879
1879
|
btn: Btn === null || Btn === void 0 ? void 0 : Btn.background,
|
|
1880
1880
|
Btncolor: Btn === null || Btn === void 0 ? void 0 : Btn.color,
|
|
1881
1881
|
retail: retail
|
|
1882
|
-
}, /*#__PURE__*/
|
|
1882
|
+
}, /*#__PURE__*/React__default.createElement("input", {
|
|
1883
1883
|
placeholder: "Coupon code",
|
|
1884
1884
|
type: "email",
|
|
1885
1885
|
required: true
|
|
1886
|
-
}), /*#__PURE__*/
|
|
1886
|
+
}), /*#__PURE__*/React__default.createElement("button", null, "apply coupon")), /*#__PURE__*/React__default.createElement(CartSummaryHr, {
|
|
1887
1887
|
color: cartSummary.hr
|
|
1888
|
-
}), /*#__PURE__*/
|
|
1888
|
+
}), /*#__PURE__*/React__default.createElement(CartSummaryRow, {
|
|
1889
1889
|
h5: "1.64em"
|
|
1890
|
-
}, /*#__PURE__*/
|
|
1890
|
+
}, /*#__PURE__*/React__default.createElement("h6", null, "total"), retail ? /*#__PURE__*/React__default.createElement("h5", null, "$", (_ref2 = totalCartPrice + (selectedShipping === null || selectedShipping === void 0 ? void 0 : selectedShipping.amount)) === null || _ref2 === void 0 ? void 0 : _ref2.toFixed(2)) : /*#__PURE__*/React__default.createElement("h5", null, "$", totalCartPrice === null || totalCartPrice === void 0 ? void 0 : totalCartPrice.toFixed(2))), /*#__PURE__*/React__default.createElement(CartSummaryRow, {
|
|
1891
1891
|
justify: "center"
|
|
1892
|
-
}, /*#__PURE__*/
|
|
1892
|
+
}, /*#__PURE__*/React__default.createElement(CartSummaryCheckoutBtn, {
|
|
1893
1893
|
retail: retail,
|
|
1894
1894
|
onClick: function onClick() {
|
|
1895
1895
|
if (loading) return;
|
|
@@ -1897,9 +1897,9 @@ var CartSummary = function CartSummary(_ref) {
|
|
|
1897
1897
|
},
|
|
1898
1898
|
background: Btn.background,
|
|
1899
1899
|
color: Btn.color
|
|
1900
|
-
}, "proceed to checkokut")), /*#__PURE__*/
|
|
1900
|
+
}, "proceed to checkokut")), /*#__PURE__*/React__default.createElement(CartSummaryRow, {
|
|
1901
1901
|
justify: "center"
|
|
1902
|
-
}, /*#__PURE__*/
|
|
1902
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
1903
1903
|
className: "continueShopping",
|
|
1904
1904
|
onClick: function onClick() {
|
|
1905
1905
|
if (loading) return;
|
|
@@ -1921,13 +1921,13 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
1921
1921
|
loading = _ref.loading,
|
|
1922
1922
|
imgnotfoundUrl = _ref.imgnotfoundUrl,
|
|
1923
1923
|
styles = _ref.styles;
|
|
1924
|
-
return /*#__PURE__*/
|
|
1924
|
+
return /*#__PURE__*/React__default.createElement(CartPageSection, {
|
|
1925
1925
|
bg: styles.bg,
|
|
1926
1926
|
retail: retail
|
|
1927
|
-
}, /*#__PURE__*/
|
|
1927
|
+
}, /*#__PURE__*/React__default.createElement(CartPageContainer, {
|
|
1928
1928
|
retail: retail,
|
|
1929
1929
|
loading: loading
|
|
1930
|
-
}, retail ? /*#__PURE__*/
|
|
1930
|
+
}, retail ? /*#__PURE__*/React__default.createElement(CartPageMainRetail, {
|
|
1931
1931
|
retail: retail,
|
|
1932
1932
|
cartData: cartData,
|
|
1933
1933
|
loading: loading,
|
|
@@ -1935,7 +1935,7 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
1935
1935
|
styles: styles,
|
|
1936
1936
|
handleIncrementDecrement: handleIncrementDecrement,
|
|
1937
1937
|
handleRemoveProduct: handleRemoveProduct
|
|
1938
|
-
}) : /*#__PURE__*/
|
|
1938
|
+
}) : /*#__PURE__*/React__default.createElement(EnhancedTable, {
|
|
1939
1939
|
retail: retail,
|
|
1940
1940
|
cartData: cartData,
|
|
1941
1941
|
loading: loading,
|
|
@@ -1944,7 +1944,7 @@ var CartPageComponent = function CartPageComponent(_ref) {
|
|
|
1944
1944
|
handleIncrementDecrement: handleIncrementDecrement,
|
|
1945
1945
|
handleRemoveProduct: handleRemoveProduct,
|
|
1946
1946
|
handleRemoveAll: handleRemoveAll
|
|
1947
|
-
}), /*#__PURE__*/
|
|
1947
|
+
}), /*#__PURE__*/React__default.createElement(CartSummary, {
|
|
1948
1948
|
retail: retail,
|
|
1949
1949
|
shippingData: shippingData,
|
|
1950
1950
|
selectedShipping: selectedShipping,
|
|
@@ -1972,7 +1972,7 @@ var CheckoutSummaryContainer = styled.div(_templateObject$7 || (_templateObject$
|
|
|
1972
1972
|
return props.bg || 'rgba(255, 240, 236, 1)';
|
|
1973
1973
|
});
|
|
1974
1974
|
var TextRow = styled.div(_templateObject2$7 || (_templateObject2$7 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n max-width: 90%;\n margin-bottom: 1em;\n padding-bottom: 1em;\n width: 90%;\n border-bottom: 1px solid rgba(250, 232, 229, 1);\n .text {\n font-size: 0.875em;\n font-weight: 300;\n text-transform: capitalize;\n }\n .total {\n font-size: 1.65em;\n font-weight: 800;\n }\n"])));
|
|
1975
|
-
var FilledInfo = styled.div(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteralLoose(["\n margin-bottom: 2em;\n .heading {\n font-size: 1.25em;\n font-weight: 800;\n margin-bottom: 0.8em;\n }\n\n p {\n font-size: 0.875em;\n font-weight: 300;\n text-transform: capitalize;\n max-width: 50%;\n }\n .bold {\n font-weight: 700;\n }\n .payment {\n width: 70px;\n height: 48px;\n background: #ffffff;\n border-radius: 15.875px;\n display: grid;\n place-items: center;\n overflow: hidden;\n
|
|
1975
|
+
var FilledInfo = styled.div(_templateObject3$7 || (_templateObject3$7 = _taggedTemplateLiteralLoose(["\n margin-bottom: 2em;\n .heading {\n font-size: 1.25em;\n font-weight: 800;\n margin-bottom: 0.8em;\n }\n\n p {\n font-size: 0.875em;\n font-weight: 300;\n text-transform: capitalize;\n max-width: 50%;\n }\n .bold {\n font-weight: 700;\n }\n .payment {\n width: 70px;\n height: 48px;\n background: #ffffff;\n border-radius: 15.875px;\n display: grid;\n place-items: center;\n overflow: hidden;\n }\n .blank {\n padding-bottom: 2em;\n }\n"])));
|
|
1976
1976
|
|
|
1977
1977
|
var CheckoutSummary = function CheckoutSummary(_ref) {
|
|
1978
1978
|
var _paymentMethod$name;
|
|
@@ -1981,27 +1981,27 @@ var CheckoutSummary = function CheckoutSummary(_ref) {
|
|
|
1981
1981
|
billingInformation = _ref.billingInformation,
|
|
1982
1982
|
shippingInformation = _ref.shippingInformation,
|
|
1983
1983
|
paymentMethod = _ref.paymentMethod;
|
|
1984
|
-
return /*#__PURE__*/
|
|
1984
|
+
return /*#__PURE__*/React__default.createElement(CheckoutSummaryContainer, null, /*#__PURE__*/React__default.createElement(TextRow, null, /*#__PURE__*/React__default.createElement("p", {
|
|
1985
1985
|
className: "text"
|
|
1986
|
-
}, "order total:"), /*#__PURE__*/
|
|
1986
|
+
}, "order total:"), /*#__PURE__*/React__default.createElement("h6", {
|
|
1987
1987
|
className: "total"
|
|
1988
|
-
}, total && "$" + (total === null || total === void 0 ? void 0 : total.toFixed(2)))), /*#__PURE__*/
|
|
1988
|
+
}, total && "$" + (total === null || total === void 0 ? void 0 : total.toFixed(2)))), /*#__PURE__*/React__default.createElement(FilledInfo, null, /*#__PURE__*/React__default.createElement("h6", {
|
|
1989
1989
|
className: "heading"
|
|
1990
|
-
}, "Billing information"), billingInformation ? /*#__PURE__*/
|
|
1990
|
+
}, "Billing information"), billingInformation ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
1991
1991
|
className: "bold"
|
|
1992
|
-
}, billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.title), /*#__PURE__*/
|
|
1992
|
+
}, billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.title), /*#__PURE__*/React__default.createElement("p", null, billingInformation === null || billingInformation === void 0 ? void 0 : billingInformation.data)) : /*#__PURE__*/React__default.createElement("p", {
|
|
1993
1993
|
className: "blank bold"
|
|
1994
|
-
}, "- - - - -", /*#__PURE__*/
|
|
1994
|
+
}, "- - - - -", /*#__PURE__*/React__default.createElement("br", null), "- - -")), /*#__PURE__*/React__default.createElement(FilledInfo, null, /*#__PURE__*/React__default.createElement("h6", {
|
|
1995
1995
|
className: "heading"
|
|
1996
|
-
}, "Shipping information"), shippingInformation ? /*#__PURE__*/
|
|
1996
|
+
}, "Shipping information"), shippingInformation ? /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("p", {
|
|
1997
1997
|
className: "bold"
|
|
1998
|
-
}, shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.title), /*#__PURE__*/
|
|
1998
|
+
}, shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.title), /*#__PURE__*/React__default.createElement("p", null, shippingInformation === null || shippingInformation === void 0 ? void 0 : shippingInformation.data)) : /*#__PURE__*/React__default.createElement("p", {
|
|
1999
1999
|
className: "blank bold"
|
|
2000
|
-
}, "- - - - -", /*#__PURE__*/
|
|
2000
|
+
}, "- - - - -", /*#__PURE__*/React__default.createElement("br", null), "- - -")), /*#__PURE__*/React__default.createElement(FilledInfo, null, /*#__PURE__*/React__default.createElement("h6", {
|
|
2001
2001
|
className: "heading"
|
|
2002
|
-
}, "Payment Method"), /*#__PURE__*/
|
|
2002
|
+
}, "Payment Method"), /*#__PURE__*/React__default.createElement("div", {
|
|
2003
2003
|
className: "payment"
|
|
2004
|
-
}, paymentMethod && /*#__PURE__*/
|
|
2004
|
+
}, paymentMethod && /*#__PURE__*/React__default.createElement("img", {
|
|
2005
2005
|
src: "/images/" + (paymentMethod === null || paymentMethod === void 0 ? void 0 : (_paymentMethod$name = paymentMethod.name) === null || _paymentMethod$name === void 0 ? void 0 : _paymentMethod$name.toLowerCase()) + ".png",
|
|
2006
2006
|
alt: "payment"
|
|
2007
2007
|
}))));
|
|
@@ -2050,17 +2050,17 @@ var CheckoutInput = function CheckoutInput(_ref) {
|
|
|
2050
2050
|
autoFocus = _controlls$autoFocus === void 0 ? false : _controlls$autoFocus,
|
|
2051
2051
|
showIcon = controlls.showIcon,
|
|
2052
2052
|
type = controlls.type;
|
|
2053
|
-
return /*#__PURE__*/
|
|
2053
|
+
return /*#__PURE__*/React__default.createElement(TextFeildContainer, null, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, _extends({}, controlls, {
|
|
2054
2054
|
defaultValue: "",
|
|
2055
2055
|
render: function render(_ref2) {
|
|
2056
2056
|
var field = _ref2.field;
|
|
2057
|
-
return /*#__PURE__*/
|
|
2057
|
+
return /*#__PURE__*/React__default.createElement(material.TextField, _extends({
|
|
2058
2058
|
placeholder: placeholder,
|
|
2059
2059
|
variant: "outlined",
|
|
2060
2060
|
required: true,
|
|
2061
2061
|
size: "small",
|
|
2062
2062
|
InputProps: showIcon ? {
|
|
2063
|
-
startAdornment: /*#__PURE__*/
|
|
2063
|
+
startAdornment: /*#__PURE__*/React__default.createElement(material.InputAdornment, {
|
|
2064
2064
|
position: "start"
|
|
2065
2065
|
}, showIcon())
|
|
2066
2066
|
} : {},
|
|
@@ -2083,15 +2083,15 @@ var CheckoutSelect = function CheckoutSelect(_ref3) {
|
|
|
2083
2083
|
val = _controlls$val === void 0 ? 'id' : _controlls$val,
|
|
2084
2084
|
_controlls$autoFocus2 = controlls.autoFocus,
|
|
2085
2085
|
autoFocus = _controlls$autoFocus2 === void 0 ? false : _controlls$autoFocus2;
|
|
2086
|
-
return /*#__PURE__*/
|
|
2086
|
+
return /*#__PURE__*/React__default.createElement(TextFeildContainer, {
|
|
2087
2087
|
select: true
|
|
2088
|
-
}, /*#__PURE__*/
|
|
2088
|
+
}, /*#__PURE__*/React__default.createElement(reactHookForm.Controller, {
|
|
2089
2089
|
control: control,
|
|
2090
2090
|
name: name,
|
|
2091
2091
|
defaultValue: "",
|
|
2092
2092
|
render: function render(_ref4) {
|
|
2093
2093
|
var field = _ref4.field;
|
|
2094
|
-
return /*#__PURE__*/
|
|
2094
|
+
return /*#__PURE__*/React__default.createElement(material.TextField, _extends({
|
|
2095
2095
|
fullWidth: true,
|
|
2096
2096
|
label: placeholder,
|
|
2097
2097
|
select: true,
|
|
@@ -2099,7 +2099,7 @@ var CheckoutSelect = function CheckoutSelect(_ref3) {
|
|
|
2099
2099
|
size: "small",
|
|
2100
2100
|
autoFocus: autoFocus
|
|
2101
2101
|
}, field), key && (List === null || List === void 0 ? void 0 : List.map(function (item, i) {
|
|
2102
|
-
return /*#__PURE__*/
|
|
2102
|
+
return /*#__PURE__*/React__default.createElement(material.MenuItem, {
|
|
2103
2103
|
key: i,
|
|
2104
2104
|
value: item[val]
|
|
2105
2105
|
}, item[key]);
|
|
@@ -2113,18 +2113,18 @@ var ButtonRow = function ButtonRow(_ref) {
|
|
|
2113
2113
|
handleNext = _ref.handleNext,
|
|
2114
2114
|
backDisabled = _ref.backDisabled,
|
|
2115
2115
|
nextDisabled = _ref.nextDisabled;
|
|
2116
|
-
return /*#__PURE__*/
|
|
2116
|
+
return /*#__PURE__*/React__default.createElement(ButtonRowContainer, {
|
|
2117
2117
|
disabled: backDisabled
|
|
2118
|
-
}, /*#__PURE__*/
|
|
2118
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2119
2119
|
className: "back",
|
|
2120
2120
|
tabIndex: "1",
|
|
2121
2121
|
onClick: function onClick() {
|
|
2122
2122
|
if (backDisabled) return;
|
|
2123
2123
|
handleBack();
|
|
2124
2124
|
}
|
|
2125
|
-
}, /*#__PURE__*/
|
|
2125
|
+
}, /*#__PURE__*/React__default.createElement(bi.BiArrowBack, {
|
|
2126
2126
|
className: "icon"
|
|
2127
|
-
}), "Back"), /*#__PURE__*/
|
|
2127
|
+
}), "Back"), /*#__PURE__*/React__default.createElement(CommonCheckoutBtn, {
|
|
2128
2128
|
disabled: nextDisabled,
|
|
2129
2129
|
tabIndex: "1",
|
|
2130
2130
|
onClick: function onClick() {
|
|
@@ -2141,17 +2141,17 @@ var StepsHeaderComponent = function StepsHeaderComponent(_ref) {
|
|
|
2141
2141
|
single = _ref.single,
|
|
2142
2142
|
closed = _ref.closed,
|
|
2143
2143
|
handleClick = _ref.handleClick;
|
|
2144
|
-
return /*#__PURE__*/
|
|
2144
|
+
return /*#__PURE__*/React__default.createElement(StepsHeaderContainer, {
|
|
2145
2145
|
single: single
|
|
2146
|
-
}, /*#__PURE__*/
|
|
2146
|
+
}, /*#__PURE__*/React__default.createElement(material.Stack, {
|
|
2147
2147
|
justifyContent: 'space-between',
|
|
2148
2148
|
flexDirection: "row",
|
|
2149
2149
|
sx: {
|
|
2150
2150
|
width: '100%'
|
|
2151
2151
|
}
|
|
2152
|
-
}, /*#__PURE__*/
|
|
2152
|
+
}, /*#__PURE__*/React__default.createElement(material.Stack, {
|
|
2153
2153
|
flexDirection: "row"
|
|
2154
|
-
}, Icon(), /*#__PURE__*/
|
|
2154
|
+
}, Icon(), /*#__PURE__*/React__default.createElement("h5", null, text, " ", username && "" + username)), /*#__PURE__*/React__default.createElement(hi.HiOutlineChevronDown, {
|
|
2155
2155
|
className: "dropIcon",
|
|
2156
2156
|
style: closed ? {
|
|
2157
2157
|
transform: 'rotate(-90deg)'
|
|
@@ -2181,21 +2181,21 @@ var Step0 = function Step0(_ref) {
|
|
|
2181
2181
|
};
|
|
2182
2182
|
|
|
2183
2183
|
function Icon() {
|
|
2184
|
-
return /*#__PURE__*/
|
|
2184
|
+
return /*#__PURE__*/React__default.createElement(cg.CgProfile, {
|
|
2185
2185
|
className: "icon"
|
|
2186
2186
|
});
|
|
2187
2187
|
}
|
|
2188
2188
|
|
|
2189
|
-
return /*#__PURE__*/
|
|
2189
|
+
return /*#__PURE__*/React__default.createElement(StepContainer, null, /*#__PURE__*/React__default.createElement(StepsHeaderComponent, {
|
|
2190
2190
|
text: 'welcome',
|
|
2191
2191
|
username: userName,
|
|
2192
2192
|
Icon: Icon,
|
|
2193
2193
|
step: 0
|
|
2194
|
-
}), /*#__PURE__*/
|
|
2194
|
+
}), /*#__PURE__*/React__default.createElement(StepsContent, null, /*#__PURE__*/React__default.createElement("p", null, "Please choose how you want to proceed"), /*#__PURE__*/React__default.createElement("p", {
|
|
2195
2195
|
className: "bold"
|
|
2196
|
-
}, /*#__PURE__*/
|
|
2196
|
+
}, /*#__PURE__*/React__default.createElement("span", null, "register"), " | ", /*#__PURE__*/React__default.createElement("span", {
|
|
2197
2197
|
className: "red"
|
|
2198
|
-
}, "login")), /*#__PURE__*/
|
|
2198
|
+
}, "login")), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2199
2199
|
container: true,
|
|
2200
2200
|
component: 'form',
|
|
2201
2201
|
onSubmit: handleSubmit(onSubmit),
|
|
@@ -2203,11 +2203,11 @@ var Step0 = function Step0(_ref) {
|
|
|
2203
2203
|
sx: {
|
|
2204
2204
|
marginTop: '1em'
|
|
2205
2205
|
}
|
|
2206
|
-
}, /*#__PURE__*/
|
|
2206
|
+
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2207
2207
|
item: true,
|
|
2208
2208
|
sm: 8,
|
|
2209
2209
|
xs: 12
|
|
2210
|
-
}, /*#__PURE__*/
|
|
2210
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
2211
2211
|
controlls: {
|
|
2212
2212
|
name: 'email',
|
|
2213
2213
|
placeholder: 'E-Mail Address',
|
|
@@ -2215,35 +2215,35 @@ var Step0 = function Step0(_ref) {
|
|
|
2215
2215
|
autoFocus: true,
|
|
2216
2216
|
type: 'email'
|
|
2217
2217
|
}
|
|
2218
|
-
})), /*#__PURE__*/
|
|
2218
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2219
2219
|
item: true,
|
|
2220
2220
|
sm: 8,
|
|
2221
2221
|
xs: 12
|
|
2222
|
-
}, /*#__PURE__*/
|
|
2222
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
2223
2223
|
controlls: {
|
|
2224
2224
|
name: 'password',
|
|
2225
2225
|
placeholder: 'Password',
|
|
2226
2226
|
control: control,
|
|
2227
2227
|
type: 'password'
|
|
2228
2228
|
}
|
|
2229
|
-
})), /*#__PURE__*/
|
|
2229
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2230
2230
|
item: true,
|
|
2231
2231
|
sm: 4
|
|
2232
|
-
}), /*#__PURE__*/
|
|
2232
|
+
}), /*#__PURE__*/React__default.createElement(CheckBoxRow, {
|
|
2233
2233
|
padding: ".8em 0 0 0"
|
|
2234
|
-
}, /*#__PURE__*/
|
|
2234
|
+
}, /*#__PURE__*/React__default.createElement(material.Checkbox, {
|
|
2235
2235
|
size: "small"
|
|
2236
|
-
}), /*#__PURE__*/
|
|
2236
|
+
}), /*#__PURE__*/React__default.createElement("p", null, "Remember me")), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2237
2237
|
item: true,
|
|
2238
2238
|
xs: 12
|
|
2239
|
-
}, /*#__PURE__*/
|
|
2239
|
+
}, /*#__PURE__*/React__default.createElement(CommonCheckoutBtn, {
|
|
2240
2240
|
padding: ".8em 3em",
|
|
2241
2241
|
uppercase: true,
|
|
2242
2242
|
type: "submit"
|
|
2243
|
-
}, loading ? /*#__PURE__*/
|
|
2243
|
+
}, loading ? /*#__PURE__*/React__default.createElement(material.CircularProgress, {
|
|
2244
2244
|
color: "inherit",
|
|
2245
2245
|
size: 15
|
|
2246
|
-
}) : 'Login'))), /*#__PURE__*/
|
|
2246
|
+
}) : 'Login'))), /*#__PURE__*/React__default.createElement(ButtonRow, {
|
|
2247
2247
|
handleBack: handleBack,
|
|
2248
2248
|
handleNext: handleNext,
|
|
2249
2249
|
backDisabled: true,
|
|
@@ -2266,30 +2266,30 @@ var Step1 = function Step1(_ref) {
|
|
|
2266
2266
|
dirtyFields = _useForm.formState.dirtyFields,
|
|
2267
2267
|
getValues = _useForm.getValues;
|
|
2268
2268
|
|
|
2269
|
-
var _React$useState =
|
|
2269
|
+
var _React$useState = React__default.useState(false),
|
|
2270
2270
|
setAddress = _React$useState[0],
|
|
2271
2271
|
setSetAddress = _React$useState[1];
|
|
2272
2272
|
|
|
2273
2273
|
function Icon() {
|
|
2274
|
-
return /*#__PURE__*/
|
|
2274
|
+
return /*#__PURE__*/React__default.createElement(bi.BiNotepad, {
|
|
2275
2275
|
className: "icon"
|
|
2276
2276
|
});
|
|
2277
2277
|
}
|
|
2278
2278
|
|
|
2279
|
-
return /*#__PURE__*/
|
|
2279
|
+
return /*#__PURE__*/React__default.createElement(StepContainer, null, /*#__PURE__*/React__default.createElement(StepsHeaderComponent, {
|
|
2280
2280
|
text: 'billing information',
|
|
2281
2281
|
Icon: Icon
|
|
2282
|
-
}), /*#__PURE__*/
|
|
2282
|
+
}), /*#__PURE__*/React__default.createElement(StepsContent, null, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2283
2283
|
container: true,
|
|
2284
2284
|
rowSpacing: 2,
|
|
2285
2285
|
sx: {
|
|
2286
2286
|
paddingTop: '1em'
|
|
2287
2287
|
}
|
|
2288
|
-
}, /*#__PURE__*/
|
|
2288
|
+
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2289
2289
|
item: true,
|
|
2290
2290
|
xs: 12,
|
|
2291
2291
|
md: 10
|
|
2292
|
-
}, /*#__PURE__*/
|
|
2292
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutSelect, {
|
|
2293
2293
|
controlls: {
|
|
2294
2294
|
name: 'store',
|
|
2295
2295
|
placeholder: 'Please Select your store',
|
|
@@ -2297,11 +2297,11 @@ var Step1 = function Step1(_ref) {
|
|
|
2297
2297
|
List: stores,
|
|
2298
2298
|
key: 'name'
|
|
2299
2299
|
}
|
|
2300
|
-
})), /*#__PURE__*/
|
|
2300
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2301
2301
|
item: true,
|
|
2302
2302
|
xs: 12,
|
|
2303
2303
|
md: 10
|
|
2304
|
-
}, /*#__PURE__*/
|
|
2304
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutSelect, {
|
|
2305
2305
|
controlls: {
|
|
2306
2306
|
name: 'billingAddress',
|
|
2307
2307
|
placeholder: 'Select a billing address from your address book ',
|
|
@@ -2309,27 +2309,27 @@ var Step1 = function Step1(_ref) {
|
|
|
2309
2309
|
List: addresses,
|
|
2310
2310
|
key: 'name'
|
|
2311
2311
|
}
|
|
2312
|
-
})), /*#__PURE__*/
|
|
2312
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2313
2313
|
item: true,
|
|
2314
2314
|
xs: 12
|
|
2315
|
-
}, /*#__PURE__*/
|
|
2315
|
+
}, /*#__PURE__*/React__default.createElement(CheckBoxRow, {
|
|
2316
2316
|
onClick: function onClick() {
|
|
2317
2317
|
setSetAddress(false);
|
|
2318
2318
|
}
|
|
2319
|
-
}, /*#__PURE__*/
|
|
2319
|
+
}, /*#__PURE__*/React__default.createElement(material.Checkbox, {
|
|
2320
2320
|
checked: !setAddress,
|
|
2321
|
-
icon: /*#__PURE__*/
|
|
2322
|
-
checkedIcon: /*#__PURE__*/
|
|
2323
|
-
}), /*#__PURE__*/
|
|
2321
|
+
icon: /*#__PURE__*/React__default.createElement(md.MdOutlineCircle, null),
|
|
2322
|
+
checkedIcon: /*#__PURE__*/React__default.createElement(gr.GrRadialSelected, null)
|
|
2323
|
+
}), /*#__PURE__*/React__default.createElement("p", null, "Ship to this address"))), /*#__PURE__*/React__default.createElement(CheckBoxRow, {
|
|
2324
2324
|
padding: '0 0 1em 0',
|
|
2325
2325
|
onClick: function onClick() {
|
|
2326
2326
|
setSetAddress(true);
|
|
2327
2327
|
}
|
|
2328
|
-
}, /*#__PURE__*/
|
|
2328
|
+
}, /*#__PURE__*/React__default.createElement(material.Checkbox, {
|
|
2329
2329
|
checked: setAddress,
|
|
2330
|
-
icon: /*#__PURE__*/
|
|
2331
|
-
checkedIcon: /*#__PURE__*/
|
|
2332
|
-
}), /*#__PURE__*/
|
|
2330
|
+
icon: /*#__PURE__*/React__default.createElement(md.MdOutlineCircle, null),
|
|
2331
|
+
checkedIcon: /*#__PURE__*/React__default.createElement(gr.GrRadialSelected, null)
|
|
2332
|
+
}), /*#__PURE__*/React__default.createElement("p", null, "Ship to a different address "))), /*#__PURE__*/React__default.createElement(ButtonRow, {
|
|
2333
2333
|
handleBack: handleBack,
|
|
2334
2334
|
handleNext: function handleNext() {
|
|
2335
2335
|
var _Object$keys;
|
|
@@ -2362,62 +2362,62 @@ var Step2 = function Step2(_ref) {
|
|
|
2362
2362
|
dirtyFields = _useForm.formState.dirtyFields,
|
|
2363
2363
|
getValues = _useForm.getValues;
|
|
2364
2364
|
|
|
2365
|
-
var _React$useState =
|
|
2365
|
+
var _React$useState = React__default.useState(options[0]),
|
|
2366
2366
|
method = _React$useState[0],
|
|
2367
2367
|
setmethod = _React$useState[1];
|
|
2368
2368
|
|
|
2369
2369
|
function Icon() {
|
|
2370
|
-
return /*#__PURE__*/
|
|
2370
|
+
return /*#__PURE__*/React__default.createElement(fi.FiTruck, {
|
|
2371
2371
|
className: "icon"
|
|
2372
2372
|
});
|
|
2373
2373
|
}
|
|
2374
2374
|
|
|
2375
|
-
return /*#__PURE__*/
|
|
2375
|
+
return /*#__PURE__*/React__default.createElement(StepContainer, null, /*#__PURE__*/React__default.createElement(StepsHeaderComponent, {
|
|
2376
2376
|
text: 'shipping information',
|
|
2377
2377
|
Icon: Icon
|
|
2378
|
-
}), /*#__PURE__*/
|
|
2378
|
+
}), /*#__PURE__*/React__default.createElement(StepsContent, null, showShipping && /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2379
2379
|
container: true,
|
|
2380
2380
|
rowSpacing: 2,
|
|
2381
2381
|
columnSpacing: 2,
|
|
2382
2382
|
sx: {
|
|
2383
2383
|
paddingBottom: '1em'
|
|
2384
2384
|
}
|
|
2385
|
-
}, /*#__PURE__*/
|
|
2385
|
+
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2386
2386
|
item: true,
|
|
2387
2387
|
xs: 12,
|
|
2388
2388
|
md: 10
|
|
2389
|
-
}, /*#__PURE__*/
|
|
2389
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
2390
2390
|
controlls: {
|
|
2391
2391
|
name: 'fullAddress',
|
|
2392
2392
|
placeholder: 'Full Address*',
|
|
2393
2393
|
control: control
|
|
2394
2394
|
}
|
|
2395
|
-
})), /*#__PURE__*/
|
|
2395
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2396
2396
|
item: true,
|
|
2397
2397
|
xs: 6,
|
|
2398
2398
|
md: 3.33
|
|
2399
|
-
}, /*#__PURE__*/
|
|
2399
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
2400
2400
|
controlls: {
|
|
2401
2401
|
name: 'zipCode',
|
|
2402
2402
|
placeholder: 'Zip/Postal Code*',
|
|
2403
2403
|
control: control,
|
|
2404
2404
|
type: 'number'
|
|
2405
2405
|
}
|
|
2406
|
-
})), /*#__PURE__*/
|
|
2406
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2407
2407
|
item: true,
|
|
2408
2408
|
xs: 6,
|
|
2409
2409
|
md: 3.33
|
|
2410
|
-
}, /*#__PURE__*/
|
|
2410
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
2411
2411
|
controlls: {
|
|
2412
2412
|
name: 'city',
|
|
2413
2413
|
placeholder: 'City*',
|
|
2414
2414
|
control: control
|
|
2415
2415
|
}
|
|
2416
|
-
})), /*#__PURE__*/
|
|
2416
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2417
2417
|
item: true,
|
|
2418
2418
|
xs: 12,
|
|
2419
2419
|
md: 3.34
|
|
2420
|
-
}, /*#__PURE__*/
|
|
2420
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutSelect, {
|
|
2421
2421
|
controlls: {
|
|
2422
2422
|
name: 'country',
|
|
2423
2423
|
placeholder: 'Country',
|
|
@@ -2425,7 +2425,7 @@ var Step2 = function Step2(_ref) {
|
|
|
2425
2425
|
List: countries,
|
|
2426
2426
|
key: 'name'
|
|
2427
2427
|
}
|
|
2428
|
-
}))), /*#__PURE__*/
|
|
2428
|
+
}))), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2429
2429
|
container: true,
|
|
2430
2430
|
columnSpacing: 0.5,
|
|
2431
2431
|
rowSpacing: 2,
|
|
@@ -2444,24 +2444,24 @@ var Step2 = function Step2(_ref) {
|
|
|
2444
2444
|
replaced = (_option$name2 = option.name) === null || _option$name2 === void 0 ? void 0 : _option$name2.replace(/fedex/i, ' ');
|
|
2445
2445
|
}
|
|
2446
2446
|
|
|
2447
|
-
return /*#__PURE__*/
|
|
2447
|
+
return /*#__PURE__*/React__default.createElement(material.Stack, {
|
|
2448
2448
|
flexDirection: "row",
|
|
2449
2449
|
justifyContent: "space-around",
|
|
2450
2450
|
aligItems: "center",
|
|
2451
2451
|
flexWrap: 'wrap'
|
|
2452
|
-
}, /*#__PURE__*/
|
|
2452
|
+
}, /*#__PURE__*/React__default.createElement(DeliveryCard, {
|
|
2453
2453
|
onClick: function onClick() {
|
|
2454
2454
|
return setmethod(option);
|
|
2455
2455
|
}
|
|
2456
|
-
}, fedex && /*#__PURE__*/
|
|
2456
|
+
}, fedex && /*#__PURE__*/React__default.createElement("img", {
|
|
2457
2457
|
src: "/images/fedex.png",
|
|
2458
2458
|
alt: "fedex"
|
|
2459
|
-
}), fedex ? /*#__PURE__*/
|
|
2459
|
+
}), fedex ? /*#__PURE__*/React__default.createElement("p", null, replaced) : /*#__PURE__*/React__default.createElement("p", null, /*#__PURE__*/React__default.createElement("p", null, option.name)), /*#__PURE__*/React__default.createElement("span", {
|
|
2460
2460
|
className: "circle"
|
|
2461
|
-
}, (option === null || option === void 0 ? void 0 : option.id) === (method === null || method === void 0 ? void 0 : method.id) && /*#__PURE__*/
|
|
2461
|
+
}, (option === null || option === void 0 ? void 0 : option.id) === (method === null || method === void 0 ? void 0 : method.id) && /*#__PURE__*/React__default.createElement("span", {
|
|
2462
2462
|
className: "smallCircle"
|
|
2463
2463
|
}))));
|
|
2464
|
-
})), /*#__PURE__*/
|
|
2464
|
+
})), /*#__PURE__*/React__default.createElement(ButtonRow, {
|
|
2465
2465
|
handleBack: handleBack,
|
|
2466
2466
|
handleNext: function handleNext() {
|
|
2467
2467
|
var _Object$keys;
|
|
@@ -2496,33 +2496,33 @@ var Step3 = function Step3(_ref) {
|
|
|
2496
2496
|
};
|
|
2497
2497
|
|
|
2498
2498
|
function Icon() {
|
|
2499
|
-
return /*#__PURE__*/
|
|
2499
|
+
return /*#__PURE__*/React__default.createElement(bi.BiWallet, {
|
|
2500
2500
|
className: "icon"
|
|
2501
2501
|
});
|
|
2502
2502
|
}
|
|
2503
2503
|
|
|
2504
|
-
return /*#__PURE__*/
|
|
2504
|
+
return /*#__PURE__*/React__default.createElement(StepContainer, null, /*#__PURE__*/React__default.createElement(StepsHeaderComponent, {
|
|
2505
2505
|
text: 'Payments Method',
|
|
2506
2506
|
Icon: Icon
|
|
2507
|
-
}), /*#__PURE__*/
|
|
2507
|
+
}), /*#__PURE__*/React__default.createElement(StepsContent, null, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2508
2508
|
container: true,
|
|
2509
2509
|
rowSpacing: 2,
|
|
2510
2510
|
sx: {
|
|
2511
2511
|
margin: '1.5em 0'
|
|
2512
2512
|
}
|
|
2513
2513
|
}, payments === null || payments === void 0 ? void 0 : payments.map(function (payment, i) {
|
|
2514
|
-
return /*#__PURE__*/
|
|
2514
|
+
return /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2515
2515
|
item: true,
|
|
2516
2516
|
key: i,
|
|
2517
2517
|
xs: 2.8,
|
|
2518
2518
|
sm: 1.5
|
|
2519
|
-
}, /*#__PURE__*/
|
|
2519
|
+
}, /*#__PURE__*/React__default.createElement(CreditCard, {
|
|
2520
2520
|
tabIndex: 1
|
|
2521
|
-
}, /*#__PURE__*/
|
|
2521
|
+
}, /*#__PURE__*/React__default.createElement("img", {
|
|
2522
2522
|
src: "/images/" + (payment === null || payment === void 0 ? void 0 : payment.name) + ".png",
|
|
2523
2523
|
alt: payment.name
|
|
2524
2524
|
})));
|
|
2525
|
-
})), /*#__PURE__*/
|
|
2525
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2526
2526
|
container: true,
|
|
2527
2527
|
component: 'form',
|
|
2528
2528
|
onSubmit: handleSubmit(onSubmit),
|
|
@@ -2531,75 +2531,75 @@ var Step3 = function Step3(_ref) {
|
|
|
2531
2531
|
sx: {
|
|
2532
2532
|
paddingBottom: '1em'
|
|
2533
2533
|
}
|
|
2534
|
-
}, /*#__PURE__*/
|
|
2534
|
+
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2535
2535
|
item: true,
|
|
2536
2536
|
xs: 10
|
|
2537
|
-
}, /*#__PURE__*/
|
|
2537
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
2538
2538
|
controlls: {
|
|
2539
2539
|
name: 'cardName',
|
|
2540
2540
|
placeholder: "Card Holder's Name*",
|
|
2541
2541
|
control: control,
|
|
2542
2542
|
showIcon: function showIcon() {
|
|
2543
|
-
return /*#__PURE__*/
|
|
2543
|
+
return /*#__PURE__*/React__default.createElement(io5.IoPersonOutline, {
|
|
2544
2544
|
className: "icon"
|
|
2545
2545
|
});
|
|
2546
2546
|
}
|
|
2547
2547
|
}
|
|
2548
|
-
})), /*#__PURE__*/
|
|
2548
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2549
2549
|
item: true,
|
|
2550
2550
|
xs: 10
|
|
2551
|
-
}, /*#__PURE__*/
|
|
2551
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
2552
2552
|
controlls: {
|
|
2553
2553
|
name: 'cardNumber',
|
|
2554
2554
|
placeholder: 'Card Nubmers xxxx-xxxx-xxxx-xxxx',
|
|
2555
2555
|
control: control,
|
|
2556
2556
|
showIcon: function showIcon() {
|
|
2557
|
-
return /*#__PURE__*/
|
|
2557
|
+
return /*#__PURE__*/React__default.createElement(bs.BsCreditCard, {
|
|
2558
2558
|
className: "icon"
|
|
2559
2559
|
});
|
|
2560
2560
|
},
|
|
2561
2561
|
type: 'number'
|
|
2562
2562
|
}
|
|
2563
|
-
})), /*#__PURE__*/
|
|
2563
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2564
2564
|
item: true,
|
|
2565
2565
|
xs: 12,
|
|
2566
2566
|
sm: 5
|
|
2567
|
-
}, /*#__PURE__*/
|
|
2567
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
2568
2568
|
controlls: {
|
|
2569
2569
|
name: 'expiryDate ',
|
|
2570
2570
|
placeholder: 'Expiration Date MM/YYYY',
|
|
2571
2571
|
control: control,
|
|
2572
2572
|
showIcon: function showIcon() {
|
|
2573
|
-
return /*#__PURE__*/
|
|
2573
|
+
return /*#__PURE__*/React__default.createElement(md.MdOutlineDateRange, {
|
|
2574
2574
|
className: "icon"
|
|
2575
2575
|
});
|
|
2576
2576
|
},
|
|
2577
2577
|
type: 'number'
|
|
2578
2578
|
}
|
|
2579
|
-
})), /*#__PURE__*/
|
|
2579
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2580
2580
|
item: true,
|
|
2581
2581
|
xs: 12,
|
|
2582
2582
|
sm: 3.5
|
|
2583
|
-
}, /*#__PURE__*/
|
|
2583
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
2584
2584
|
controlls: {
|
|
2585
2585
|
name: 'cvv',
|
|
2586
2586
|
placeholder: 'CVC/CVVV ***',
|
|
2587
2587
|
control: control,
|
|
2588
2588
|
showIcon: function showIcon() {
|
|
2589
|
-
return /*#__PURE__*/
|
|
2589
|
+
return /*#__PURE__*/React__default.createElement(bi.BiLockAlt, {
|
|
2590
2590
|
className: "icon"
|
|
2591
2591
|
});
|
|
2592
2592
|
},
|
|
2593
2593
|
type: 'password'
|
|
2594
2594
|
}
|
|
2595
|
-
})), /*#__PURE__*/
|
|
2595
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2596
2596
|
item: true,
|
|
2597
2597
|
xs: 12
|
|
2598
|
-
}, /*#__PURE__*/
|
|
2598
|
+
}, /*#__PURE__*/React__default.createElement(CheckBoxRow, {
|
|
2599
2599
|
padding: ".8em 0 0 0"
|
|
2600
|
-
}, /*#__PURE__*/
|
|
2600
|
+
}, /*#__PURE__*/React__default.createElement(material.Checkbox, {
|
|
2601
2601
|
size: "small"
|
|
2602
|
-
}), /*#__PURE__*/
|
|
2602
|
+
}), /*#__PURE__*/React__default.createElement("p", null, "Remember me")))), /*#__PURE__*/React__default.createElement(ButtonRow, {
|
|
2603
2603
|
handleBack: handleBack,
|
|
2604
2604
|
handleNext: function handleNext() {
|
|
2605
2605
|
var _Object$keys;
|
|
@@ -2624,116 +2624,116 @@ var Step4 = function Step4(_ref) {
|
|
|
2624
2624
|
vatPercentage = _ref.vat,
|
|
2625
2625
|
clickRedirect = _ref.clickRedirect;
|
|
2626
2626
|
|
|
2627
|
-
var _React$useState =
|
|
2627
|
+
var _React$useState = React__default.useState(false),
|
|
2628
2628
|
checked = _React$useState[0],
|
|
2629
2629
|
setChecked = _React$useState[1];
|
|
2630
2630
|
|
|
2631
|
-
var _React$useState2 =
|
|
2631
|
+
var _React$useState2 = React__default.useState(''),
|
|
2632
2632
|
comments = _React$useState2[0],
|
|
2633
2633
|
setComments = _React$useState2[1];
|
|
2634
2634
|
|
|
2635
2635
|
function Icon() {
|
|
2636
|
-
return /*#__PURE__*/
|
|
2636
|
+
return /*#__PURE__*/React__default.createElement(md.MdOutlineStickyNote2, {
|
|
2637
2637
|
className: "icon"
|
|
2638
2638
|
});
|
|
2639
2639
|
}
|
|
2640
2640
|
|
|
2641
2641
|
var vat = vatPercentage / 100 * (cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice);
|
|
2642
2642
|
console.log(vat);
|
|
2643
|
-
return /*#__PURE__*/
|
|
2643
|
+
return /*#__PURE__*/React__default.createElement(StepContainer, null, /*#__PURE__*/React__default.createElement(StepsHeaderComponent, {
|
|
2644
2644
|
text: 'Order Review',
|
|
2645
2645
|
Icon: Icon
|
|
2646
|
-
}), /*#__PURE__*/
|
|
2646
|
+
}), /*#__PURE__*/React__default.createElement(StepsContent, null, /*#__PURE__*/React__default.createElement(material.TableContainer, null, /*#__PURE__*/React__default.createElement(material.Table, {
|
|
2647
2647
|
"aria-label": "customized table",
|
|
2648
2648
|
sx: {
|
|
2649
2649
|
maxHeight: '600px'
|
|
2650
2650
|
},
|
|
2651
2651
|
size: "small"
|
|
2652
|
-
}, /*#__PURE__*/
|
|
2652
|
+
}, /*#__PURE__*/React__default.createElement(material.TableBody, null, cartData === null || cartData === void 0 ? void 0 : (_cartData$cartLineIte = cartData.cartLineItemDtoList) === null || _cartData$cartLineIte === void 0 ? void 0 : _cartData$cartLineIte.map(function (row, i) {
|
|
2653
2653
|
var _row$standardPrice, _ref2;
|
|
2654
2654
|
|
|
2655
|
-
return /*#__PURE__*/
|
|
2655
|
+
return /*#__PURE__*/React__default.createElement(StyledTableRow, {
|
|
2656
2656
|
key: row.name,
|
|
2657
2657
|
colored: i % 2 === 0
|
|
2658
|
-
}, /*#__PURE__*/
|
|
2658
|
+
}, /*#__PURE__*/React__default.createElement(StyledTableCell, null, /*#__PURE__*/React__default.createElement("p", {
|
|
2659
2659
|
className: "price max"
|
|
2660
|
-
}, "ID: #", row === null || row === void 0 ? void 0 : row.productId)), /*#__PURE__*/
|
|
2660
|
+
}, "ID: #", row === null || row === void 0 ? void 0 : row.productId)), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2661
2661
|
align: "left"
|
|
2662
|
-
}, /*#__PURE__*/
|
|
2662
|
+
}, /*#__PURE__*/React__default.createElement("p", null, row.productName)), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2663
2663
|
align: "left"
|
|
2664
|
-
}, /*#__PURE__*/
|
|
2664
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2665
2665
|
className: "price"
|
|
2666
|
-
}, (_row$standardPrice = row.standardPrice) === null || _row$standardPrice === void 0 ? void 0 : _row$standardPrice.toFixed(2), /*#__PURE__*/
|
|
2666
|
+
}, (_row$standardPrice = row.standardPrice) === null || _row$standardPrice === void 0 ? void 0 : _row$standardPrice.toFixed(2), /*#__PURE__*/React__default.createElement("span", {
|
|
2667
2667
|
className: "red"
|
|
2668
|
-
}, " x ", row.quantity))), /*#__PURE__*/
|
|
2668
|
+
}, " x ", row.quantity))), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2669
2669
|
align: "center"
|
|
2670
|
-
}, /*#__PURE__*/
|
|
2670
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2671
2671
|
className: "price max"
|
|
2672
2672
|
}, (_ref2 = row.quantity * (row === null || row === void 0 ? void 0 : row.standardPrice)) === null || _ref2 === void 0 ? void 0 : _ref2.toFixed(2))));
|
|
2673
|
-
}), /*#__PURE__*/
|
|
2673
|
+
}), /*#__PURE__*/React__default.createElement(StyledTableRow, null, /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2674
2674
|
colSpan: 2
|
|
2675
|
-
}), /*#__PURE__*/
|
|
2675
|
+
}), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2676
2676
|
colSpan: 1
|
|
2677
|
-
}, /*#__PURE__*/
|
|
2677
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2678
2678
|
className: "max"
|
|
2679
|
-
}, "Total(", cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity, " items)")), /*#__PURE__*/
|
|
2679
|
+
}, "Total(", cartData === null || cartData === void 0 ? void 0 : cartData.totalCartQuantity, " items)")), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2680
2680
|
align: "right"
|
|
2681
|
-
}, /*#__PURE__*/
|
|
2681
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2682
2682
|
className: "max price"
|
|
2683
|
-
}, "$", cartData === null || cartData === void 0 ? void 0 : (_cartData$totalCartPr = cartData.totalCartPrice) === null || _cartData$totalCartPr === void 0 ? void 0 : _cartData$totalCartPr.toFixed(2)))), /*#__PURE__*/
|
|
2683
|
+
}, "$", cartData === null || cartData === void 0 ? void 0 : (_cartData$totalCartPr = cartData.totalCartPrice) === null || _cartData$totalCartPr === void 0 ? void 0 : _cartData$totalCartPr.toFixed(2)))), /*#__PURE__*/React__default.createElement(StyledTableRow, null, /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2684
2684
|
colSpan: 2
|
|
2685
|
-
}), /*#__PURE__*/
|
|
2685
|
+
}), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2686
2686
|
colSpan: 1
|
|
2687
|
-
}, /*#__PURE__*/
|
|
2687
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2688
2688
|
className: "max"
|
|
2689
|
-
}, "Value added tax (VAT)")), /*#__PURE__*/
|
|
2689
|
+
}, "Value added tax (VAT)")), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2690
2690
|
align: "right"
|
|
2691
|
-
}, /*#__PURE__*/
|
|
2691
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2692
2692
|
className: "max price"
|
|
2693
|
-
}, "$", vat === null || vat === void 0 ? void 0 : vat.toFixed(2)))), /*#__PURE__*/
|
|
2693
|
+
}, "$", vat === null || vat === void 0 ? void 0 : vat.toFixed(2)))), /*#__PURE__*/React__default.createElement(StyledTableRow, null, /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2694
2694
|
colSpan: 2
|
|
2695
|
-
}), /*#__PURE__*/
|
|
2695
|
+
}), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2696
2696
|
colSpan: 1
|
|
2697
|
-
}, /*#__PURE__*/
|
|
2697
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2698
2698
|
className: "max"
|
|
2699
|
-
}, "Delivery Charge")), /*#__PURE__*/
|
|
2699
|
+
}, "Delivery Charge")), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2700
2700
|
align: "right"
|
|
2701
|
-
}, /*#__PURE__*/
|
|
2701
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2702
2702
|
className: "max price red"
|
|
2703
|
-
}, "Free"))), /*#__PURE__*/
|
|
2703
|
+
}, "Free"))), /*#__PURE__*/React__default.createElement(StyledTableRow, null, /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2704
2704
|
colSpan: 2
|
|
2705
|
-
}), /*#__PURE__*/
|
|
2705
|
+
}), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2706
2706
|
sx: {
|
|
2707
2707
|
paddingTop: '1em'
|
|
2708
2708
|
},
|
|
2709
2709
|
colSpan: 1
|
|
2710
|
-
}, /*#__PURE__*/
|
|
2710
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2711
2711
|
className: "max price red"
|
|
2712
|
-
}, "Subtotal")), /*#__PURE__*/
|
|
2712
|
+
}, "Subtotal")), /*#__PURE__*/React__default.createElement(StyledTableCell, {
|
|
2713
2713
|
sx: {
|
|
2714
2714
|
paddingTop: '1em'
|
|
2715
2715
|
},
|
|
2716
2716
|
align: "right"
|
|
2717
|
-
}, /*#__PURE__*/
|
|
2717
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2718
2718
|
className: "max price red"
|
|
2719
|
-
}, "$", ((cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + vat).toFixed(2)))))), /*#__PURE__*/
|
|
2719
|
+
}, "$", ((cartData === null || cartData === void 0 ? void 0 : cartData.totalCartPrice) + vat).toFixed(2)))))), /*#__PURE__*/React__default.createElement(BottomGrid, {
|
|
2720
2720
|
container: true,
|
|
2721
2721
|
columnSpacing: 0,
|
|
2722
2722
|
rowSpacing: 0
|
|
2723
|
-
}, /*#__PURE__*/
|
|
2723
|
+
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2724
2724
|
item: true,
|
|
2725
2725
|
xs: 12
|
|
2726
|
-
}, /*#__PURE__*/
|
|
2726
|
+
}, /*#__PURE__*/React__default.createElement("p", {
|
|
2727
2727
|
className: "bold"
|
|
2728
|
-
}, "Your Comment")), /*#__PURE__*/
|
|
2728
|
+
}, "Your Comment")), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2729
2729
|
item: true,
|
|
2730
2730
|
xs: 0.5
|
|
2731
|
-
}, /*#__PURE__*/
|
|
2731
|
+
}, /*#__PURE__*/React__default.createElement(cg.CgProfile, {
|
|
2732
2732
|
className: "icon"
|
|
2733
|
-
})), /*#__PURE__*/
|
|
2733
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2734
2734
|
item: true,
|
|
2735
2735
|
xs: 11.5
|
|
2736
|
-
}, /*#__PURE__*/
|
|
2736
|
+
}, /*#__PURE__*/React__default.createElement("textarea", {
|
|
2737
2737
|
rows: "3",
|
|
2738
2738
|
cols: "4",
|
|
2739
2739
|
placeholder: "Comments for the order....",
|
|
@@ -2741,10 +2741,10 @@ var Step4 = function Step4(_ref) {
|
|
|
2741
2741
|
onChange: function onChange(e) {
|
|
2742
2742
|
setComments(e.target.value);
|
|
2743
2743
|
}
|
|
2744
|
-
})), /*#__PURE__*/
|
|
2744
|
+
})), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2745
2745
|
item: true,
|
|
2746
2746
|
xs: 12
|
|
2747
|
-
}, /*#__PURE__*/
|
|
2747
|
+
}, /*#__PURE__*/React__default.createElement(CheckBoxRow, null, /*#__PURE__*/React__default.createElement(material.Checkbox, {
|
|
2748
2748
|
size: "small",
|
|
2749
2749
|
value: checked,
|
|
2750
2750
|
onChange: function onChange() {
|
|
@@ -2752,25 +2752,25 @@ var Step4 = function Step4(_ref) {
|
|
|
2752
2752
|
return !checked;
|
|
2753
2753
|
});
|
|
2754
2754
|
}
|
|
2755
|
-
}), /*#__PURE__*/
|
|
2755
|
+
}), /*#__PURE__*/React__default.createElement("p", null, "I Accept the ", /*#__PURE__*/React__default.createElement("span", {
|
|
2756
2756
|
className: "ul"
|
|
2757
|
-
}, "Tearms and Conditions"), ' ', "& ", /*#__PURE__*/
|
|
2757
|
+
}, "Tearms and Conditions"), ' ', "& ", /*#__PURE__*/React__default.createElement("span", {
|
|
2758
2758
|
className: "ul"
|
|
2759
|
-
}, "Privacy Policy?"), ' '))), /*#__PURE__*/
|
|
2759
|
+
}, "Privacy Policy?"), ' '))), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2760
2760
|
item: true,
|
|
2761
2761
|
xs: 12
|
|
2762
|
-
}, /*#__PURE__*/
|
|
2762
|
+
}, /*#__PURE__*/React__default.createElement(CheckBoxRow, null, /*#__PURE__*/React__default.createElement("p", {
|
|
2763
2763
|
className: "bottom"
|
|
2764
|
-
}, "Forgot an Item? \xA0", ' ', /*#__PURE__*/
|
|
2764
|
+
}, "Forgot an Item? \xA0", ' ', /*#__PURE__*/React__default.createElement("span", {
|
|
2765
2765
|
onClick: function onClick() {
|
|
2766
2766
|
return clickRedirect('cart');
|
|
2767
2767
|
}
|
|
2768
|
-
}, "Edit your cart"))), /*#__PURE__*/
|
|
2768
|
+
}, "Edit your cart"))), /*#__PURE__*/React__default.createElement(CheckBoxRow, null, /*#__PURE__*/React__default.createElement("button", {
|
|
2769
2769
|
className: "back",
|
|
2770
2770
|
onClick: function onClick() {
|
|
2771
2771
|
return handleBack();
|
|
2772
2772
|
}
|
|
2773
|
-
}, "back"), /*#__PURE__*/
|
|
2773
|
+
}, "back"), /*#__PURE__*/React__default.createElement("button", {
|
|
2774
2774
|
onClick: function onClick() {
|
|
2775
2775
|
if (checked) {
|
|
2776
2776
|
handleNext();
|
|
@@ -2782,35 +2782,35 @@ var Step4 = function Step4(_ref) {
|
|
|
2782
2782
|
var steps = [{
|
|
2783
2783
|
text: 'welcome',
|
|
2784
2784
|
Icon: function Icon() {
|
|
2785
|
-
return /*#__PURE__*/
|
|
2785
|
+
return /*#__PURE__*/React__default.createElement(cg.CgProfile, {
|
|
2786
2786
|
className: "icon"
|
|
2787
2787
|
});
|
|
2788
2788
|
}
|
|
2789
2789
|
}, {
|
|
2790
2790
|
text: 'billing information',
|
|
2791
2791
|
Icon: function Icon() {
|
|
2792
|
-
return /*#__PURE__*/
|
|
2792
|
+
return /*#__PURE__*/React__default.createElement(bi.BiNotepad, {
|
|
2793
2793
|
className: "icon"
|
|
2794
2794
|
});
|
|
2795
2795
|
}
|
|
2796
2796
|
}, {
|
|
2797
2797
|
text: 'shipping information',
|
|
2798
2798
|
Icon: function Icon() {
|
|
2799
|
-
return /*#__PURE__*/
|
|
2799
|
+
return /*#__PURE__*/React__default.createElement(fi.FiTruck, {
|
|
2800
2800
|
className: "icon"
|
|
2801
2801
|
});
|
|
2802
2802
|
}
|
|
2803
2803
|
}, {
|
|
2804
2804
|
text: 'payment method',
|
|
2805
2805
|
Icon: function Icon() {
|
|
2806
|
-
return /*#__PURE__*/
|
|
2806
|
+
return /*#__PURE__*/React__default.createElement(bi.BiWallet, {
|
|
2807
2807
|
className: "icon"
|
|
2808
2808
|
});
|
|
2809
2809
|
}
|
|
2810
2810
|
}, {
|
|
2811
2811
|
text: 'order review',
|
|
2812
2812
|
Icon: function Icon() {
|
|
2813
|
-
return /*#__PURE__*/
|
|
2813
|
+
return /*#__PURE__*/React__default.createElement(md.MdOutlineStickyNote2, {
|
|
2814
2814
|
className: "icon"
|
|
2815
2815
|
});
|
|
2816
2816
|
}
|
|
@@ -2840,29 +2840,29 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
2840
2840
|
userAddresses = _ref.userAddresses,
|
|
2841
2841
|
showShipping = _ref.showShipping,
|
|
2842
2842
|
clickRedirect = _ref.clickRedirect;
|
|
2843
|
-
return /*#__PURE__*/
|
|
2843
|
+
return /*#__PURE__*/React__default.createElement(CheckoutPageContainer, {
|
|
2844
2844
|
className: "checkout"
|
|
2845
|
-
}, /*#__PURE__*/
|
|
2845
|
+
}, /*#__PURE__*/React__default.createElement(CheckoutMain, null, /*#__PURE__*/React__default.createElement(CheckoutHeader, null, steps.map(function (item, i) {
|
|
2846
2846
|
var words = item.text.split(' ');
|
|
2847
|
-
return /*#__PURE__*/
|
|
2847
|
+
return /*#__PURE__*/React__default.createElement("div", {
|
|
2848
2848
|
className: "row"
|
|
2849
|
-
}, /*#__PURE__*/
|
|
2849
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
2850
2850
|
className: "icon",
|
|
2851
2851
|
style: currStep > i ? {
|
|
2852
2852
|
color: 'rgba(36, 153, 55, 1)'
|
|
2853
2853
|
} : {}
|
|
2854
|
-
}, /*#__PURE__*/
|
|
2855
|
-
})), /*#__PURE__*/
|
|
2854
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineCheckCircle, null)), ' ', /*#__PURE__*/React__default.createElement("p", null, words[0], " ", /*#__PURE__*/React__default.createElement("span", null, words[1])));
|
|
2855
|
+
})), /*#__PURE__*/React__default.createElement(material.Stepper, {
|
|
2856
2856
|
activeStep: currStep,
|
|
2857
2857
|
orientation: "vertical"
|
|
2858
2858
|
}, steps.map(function (item, index) {
|
|
2859
|
-
return /*#__PURE__*/
|
|
2859
|
+
return /*#__PURE__*/React__default.createElement(material.Step, {
|
|
2860
2860
|
key: index
|
|
2861
|
-
}, /*#__PURE__*/
|
|
2861
|
+
}, /*#__PURE__*/React__default.createElement(material.StepLabel, {
|
|
2862
2862
|
sx: {
|
|
2863
2863
|
padding: 0
|
|
2864
2864
|
},
|
|
2865
|
-
icon: /*#__PURE__*/
|
|
2865
|
+
icon: /*#__PURE__*/React__default.createElement(CheckoutStepIcon, {
|
|
2866
2866
|
style: currStep >= index ? {
|
|
2867
2867
|
background: 'rgba(253, 0, 21, 1)',
|
|
2868
2868
|
color: 'white',
|
|
@@ -2872,10 +2872,10 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
2872
2872
|
color: 'inherit',
|
|
2873
2873
|
padding: 0
|
|
2874
2874
|
}
|
|
2875
|
-
}, /*#__PURE__*/
|
|
2875
|
+
}, /*#__PURE__*/React__default.createElement(ai.AiOutlineCheck, {
|
|
2876
2876
|
className: "ic"
|
|
2877
2877
|
}))
|
|
2878
|
-
}, currStep !== index && /*#__PURE__*/
|
|
2878
|
+
}, currStep !== index && /*#__PURE__*/React__default.createElement(StepsHeaderComponent, {
|
|
2879
2879
|
text: item.text,
|
|
2880
2880
|
Icon: item.Icon,
|
|
2881
2881
|
single: true,
|
|
@@ -2886,22 +2886,22 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
2886
2886
|
handleBack(index);
|
|
2887
2887
|
}
|
|
2888
2888
|
}
|
|
2889
|
-
})), index === 0 && /*#__PURE__*/
|
|
2889
|
+
})), index === 0 && /*#__PURE__*/React__default.createElement(material.StepContent, {
|
|
2890
2890
|
sx: {
|
|
2891
2891
|
padding: 0
|
|
2892
2892
|
}
|
|
2893
|
-
}, /*#__PURE__*/
|
|
2893
|
+
}, /*#__PURE__*/React__default.createElement(Step0, {
|
|
2894
2894
|
currStep: currStep,
|
|
2895
2895
|
loading: loading,
|
|
2896
2896
|
userName: userName,
|
|
2897
2897
|
handleBack: handleBack,
|
|
2898
2898
|
handleNext: handleNext,
|
|
2899
2899
|
handleLogin: handleLogin
|
|
2900
|
-
})), index === 1 && /*#__PURE__*/
|
|
2900
|
+
})), index === 1 && /*#__PURE__*/React__default.createElement(material.StepContent, {
|
|
2901
2901
|
sx: {
|
|
2902
2902
|
padding: 0
|
|
2903
2903
|
}
|
|
2904
|
-
}, /*#__PURE__*/
|
|
2904
|
+
}, /*#__PURE__*/React__default.createElement(Step1, {
|
|
2905
2905
|
currstep: currStep,
|
|
2906
2906
|
handleBack: handleBack,
|
|
2907
2907
|
handleNext: handleNext,
|
|
@@ -2909,11 +2909,11 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
2909
2909
|
setBillingAddress: setBillingAddress,
|
|
2910
2910
|
stores: userStores,
|
|
2911
2911
|
addresses: userAddresses
|
|
2912
|
-
})), index === 2 && /*#__PURE__*/
|
|
2912
|
+
})), index === 2 && /*#__PURE__*/React__default.createElement(material.StepContent, {
|
|
2913
2913
|
sx: {
|
|
2914
2914
|
padding: 0
|
|
2915
2915
|
}
|
|
2916
|
-
}, /*#__PURE__*/
|
|
2916
|
+
}, /*#__PURE__*/React__default.createElement(Step2, {
|
|
2917
2917
|
currstep: currStep,
|
|
2918
2918
|
handleBack: handleBack,
|
|
2919
2919
|
handleNext: handleNext,
|
|
@@ -2922,21 +2922,21 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
2922
2922
|
setShipping: setShippingAddress,
|
|
2923
2923
|
setShippingMethod: setShippingMethod,
|
|
2924
2924
|
showShipping: showShipping
|
|
2925
|
-
})), index === 3 && /*#__PURE__*/
|
|
2925
|
+
})), index === 3 && /*#__PURE__*/React__default.createElement(material.StepContent, {
|
|
2926
2926
|
sx: {
|
|
2927
2927
|
padding: 0
|
|
2928
2928
|
}
|
|
2929
|
-
}, /*#__PURE__*/
|
|
2929
|
+
}, /*#__PURE__*/React__default.createElement(Step3, {
|
|
2930
2930
|
currstep: currStep,
|
|
2931
2931
|
handleBack: handleBack,
|
|
2932
2932
|
handleNext: handleNext,
|
|
2933
2933
|
setPaymentDetails: setPaymentDetails,
|
|
2934
2934
|
payments: paymentMethods
|
|
2935
|
-
})), index === 4 && /*#__PURE__*/
|
|
2935
|
+
})), index === 4 && /*#__PURE__*/React__default.createElement(material.StepContent, {
|
|
2936
2936
|
sx: {
|
|
2937
2937
|
padding: 0
|
|
2938
2938
|
}
|
|
2939
|
-
}, /*#__PURE__*/
|
|
2939
|
+
}, /*#__PURE__*/React__default.createElement(Step4, {
|
|
2940
2940
|
currstep: currStep,
|
|
2941
2941
|
handleBack: handleBack,
|
|
2942
2942
|
handleNext: handleNext,
|
|
@@ -2944,7 +2944,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
2944
2944
|
vat: vat,
|
|
2945
2945
|
clickRedirect: clickRedirect
|
|
2946
2946
|
})));
|
|
2947
|
-
}))), /*#__PURE__*/
|
|
2947
|
+
}))), /*#__PURE__*/React__default.createElement(CheckoutSummary, {
|
|
2948
2948
|
billingInformation: billingAddress,
|
|
2949
2949
|
shippingInformation: shippingAddress,
|
|
2950
2950
|
paymentMethod: selectedPaymentMethod,
|
|
@@ -2988,14 +2988,14 @@ function debounce(func, wait, immediate) {
|
|
|
2988
2988
|
function useWindowSize() {
|
|
2989
2989
|
var isWindow = typeof window !== 'undefined';
|
|
2990
2990
|
|
|
2991
|
-
var _useState = React
|
|
2991
|
+
var _useState = React.useState({
|
|
2992
2992
|
width: isWindow ? window.innerWidth : 1200,
|
|
2993
2993
|
height: isWindow ? window.innerHeight : 800
|
|
2994
2994
|
}),
|
|
2995
2995
|
windowSize = _useState[0],
|
|
2996
2996
|
setWindowSize = _useState[1];
|
|
2997
2997
|
|
|
2998
|
-
React
|
|
2998
|
+
React.useEffect(function () {
|
|
2999
2999
|
var onWindowResize = function onWindowResize() {
|
|
3000
3000
|
setWindowSize({
|
|
3001
3001
|
width: window.innerWidth,
|
|
@@ -3047,11 +3047,11 @@ var getBreakpoint = function getBreakpoint(_ref) {
|
|
|
3047
3047
|
function useGridSize() {
|
|
3048
3048
|
var windowSize = useWindowSize();
|
|
3049
3049
|
|
|
3050
|
-
var _useState = React
|
|
3050
|
+
var _useState = React.useState(Breakpoint.md),
|
|
3051
3051
|
layout = _useState[0],
|
|
3052
3052
|
setLayout = _useState[1];
|
|
3053
3053
|
|
|
3054
|
-
React
|
|
3054
|
+
React.useEffect(function () {
|
|
3055
3055
|
setLayout(getBreakpoint(windowSize));
|
|
3056
3056
|
}, [windowSize]);
|
|
3057
3057
|
return layout;
|