@salesgenterp/ui-components 0.4.186 → 0.4.188
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.css +1 -0
- package/dist/index.js +196 -86
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +196 -86
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
package/dist/index.js
CHANGED
|
@@ -268,7 +268,6 @@ var CartHeading = styled__default.div(_templateObject4$1 || (_templateObject4$1
|
|
|
268
268
|
return props.h1 || 'inherit';
|
|
269
269
|
});
|
|
270
270
|
var Loader = styled__default.div(_templateObject5$1 || (_templateObject5$1 = _taggedTemplateLiteralLoose(["\n position: absolute;\n top: 40%;\n left: 47%;\n display: grid;\n place-items: center;\n z-index: 3;\n"])));
|
|
271
|
-
|
|
272
271
|
var CartTableCell = styled__default(material.TableCell)(_templateObject6$1 || (_templateObject6$1 = _taggedTemplateLiteralLoose(["\n && {\n padding-bottom: 1em !important;\n border: none !important;\n /* font-size: 0.75em; */\n font-size: 1em;\n color: rgba(98, 95, 95, 1);\n background: ", ";\n color: ", ";\n font-family: 'karla-fonts';\n }\n &.bg-transparent {\n background-color: transparent !important;\n text-transform: uppercase;\n z-index: 3 !important;\n span {\n font-size: 0.75em;\n font-weight: 600;\n }\n svg {\n color: ", ";\n }\n .MuiTableSortLabel-root {\n color: ", "!important;\n }\n }\n"])), function (props) {
|
|
273
272
|
return "" + props.bg;
|
|
274
273
|
}, function (props) {
|
|
@@ -1459,8 +1458,7 @@ var CardRow = function CardRow(_ref) {
|
|
|
1459
1458
|
id: row === null || row === void 0 ? void 0 : row.labelId,
|
|
1460
1459
|
scope: "row",
|
|
1461
1460
|
padding: "none"
|
|
1462
|
-
}, /*#__PURE__*/React__default.createElement(ProductName
|
|
1463
|
-
, null, row.productName), row.quantity > row.availableQuantity && /*#__PURE__*/React__default.createElement("p", {
|
|
1461
|
+
}, /*#__PURE__*/React__default.createElement(ProductName, null, row.productName), row.quantity > row.availableQuantity && /*#__PURE__*/React__default.createElement("p", {
|
|
1464
1462
|
className: "outOfStock"
|
|
1465
1463
|
}, "out of stock")), /*#__PURE__*/React__default.createElement(CartTableCell$1, {
|
|
1466
1464
|
align: "center",
|
|
@@ -1552,7 +1550,6 @@ var headCells = [{
|
|
|
1552
1550
|
filter: false,
|
|
1553
1551
|
noBelowSm: true
|
|
1554
1552
|
}];
|
|
1555
|
-
|
|
1556
1553
|
function EnhancedTableHead(props) {
|
|
1557
1554
|
var _styles$cartSummary, _styles$cartSummary2;
|
|
1558
1555
|
var onSelectAllClick = props.onSelectAllClick,
|
|
@@ -1599,8 +1596,7 @@ function EnhancedTableHead(props) {
|
|
|
1599
1596
|
className: "bg-transparent " + ((headCell === null || headCell === void 0 ? void 0 : headCell.noBelowSm) && 'CartnoBelowSm'),
|
|
1600
1597
|
bg: styles === null || styles === void 0 ? void 0 : styles.bg,
|
|
1601
1598
|
color: styles === null || styles === void 0 ? void 0 : (_styles$cartSummary3 = styles.cartSummary) === null || _styles$cartSummary3 === void 0 ? void 0 : _styles$cartSummary3.color
|
|
1602
|
-
}, headCell.filter ? /*#__PURE__*/React.createElement(TableSortLabel
|
|
1603
|
-
, {
|
|
1599
|
+
}, headCell.filter ? /*#__PURE__*/React.createElement(TableSortLabel, {
|
|
1604
1600
|
active: true,
|
|
1605
1601
|
direction: orderBy === headCell.id ? order : 'asc',
|
|
1606
1602
|
IconComponent: function IconComponent() {
|
|
@@ -1619,7 +1615,6 @@ EnhancedTableHead.propTypes = {
|
|
|
1619
1615
|
orderBy: propTypes.string.isRequired,
|
|
1620
1616
|
rowCount: propTypes.number.isRequired
|
|
1621
1617
|
};
|
|
1622
|
-
|
|
1623
1618
|
function EnhancedTable(_ref) {
|
|
1624
1619
|
var _styles$scroll, _styles$scroll2, _styles$cartSummary4, _styles$Btn;
|
|
1625
1620
|
var cartData = _ref.cartData,
|
|
@@ -1646,7 +1641,6 @@ function EnhancedTable(_ref) {
|
|
|
1646
1641
|
var _React$useState4 = React.useState(cartList),
|
|
1647
1642
|
cartArray = _React$useState4[0],
|
|
1648
1643
|
setCartArray = _React$useState4[1];
|
|
1649
|
-
|
|
1650
1644
|
var Sort = function Sort() {
|
|
1651
1645
|
var newArray = cartArray || [];
|
|
1652
1646
|
var li = orderBy;
|
|
@@ -1664,13 +1658,11 @@ function EnhancedTable(_ref) {
|
|
|
1664
1658
|
React.useEffect(function () {
|
|
1665
1659
|
Sort();
|
|
1666
1660
|
}, [order, orderBy]);
|
|
1667
|
-
|
|
1668
1661
|
var handleRequestSort = function handleRequestSort(event, property) {
|
|
1669
1662
|
var isAsc = orderBy === property && order === 'asc';
|
|
1670
1663
|
setOrder(isAsc ? 'desc' : 'asc');
|
|
1671
1664
|
setOrderBy(property);
|
|
1672
1665
|
};
|
|
1673
|
-
|
|
1674
1666
|
var handleSelectAllClick = function handleSelectAllClick(event) {
|
|
1675
1667
|
if (selected.length < (cartArray === null || cartArray === void 0 ? void 0 : cartArray.length)) {
|
|
1676
1668
|
var newSelected = [];
|
|
@@ -1752,7 +1744,6 @@ function EnhancedTable(_ref) {
|
|
|
1752
1744
|
}
|
|
1753
1745
|
|
|
1754
1746
|
var _templateObject$4, _templateObject2$4, _templateObject3$4, _templateObject4$3, _templateObject5$3, _templateObject6$3, _templateObject7$2;
|
|
1755
|
-
|
|
1756
1747
|
var CartPageCard = styled__default.div(_templateObject$4 || (_templateObject$4 = _taggedTemplateLiteralLoose(["\n width: min(97%, 485px);\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n padding: 1em;\n background: #ffffff;\n box-shadow: 0px 20px 35px rgba(0, 0, 0, 0.05);\n border-radius: 20px;\n position: relative;\n"])));
|
|
1757
1748
|
var CartPageImg = styled__default.img(_templateObject2$4 || (_templateObject2$4 = _taggedTemplateLiteralLoose(["\n /* width: 95px; */\n width: ", ";\n height: ", ";\n position: relative;\n margin-right: 1em;\n"])), function (props) {
|
|
1758
1749
|
return props.width || 'auto';
|
|
@@ -2188,10 +2179,8 @@ var DeliveryOption = styled__default.div(_templateObject11 || (_templateObject11
|
|
|
2188
2179
|
}, function (props) {
|
|
2189
2180
|
return props.hovered ? '800' : '700';
|
|
2190
2181
|
});
|
|
2191
|
-
|
|
2192
2182
|
var CreditCard = styled__default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n width: 70px;\n min-height: 48px;\n max-height: 50px;\n background-color: white;\n border: 3px solid rgba(217, 217, 217, 0.1);\n display: grid;\n place-items: center;\n margin: auto;\n cursor: pointer;\n overflow: hidden;\n border-radius: 5px;\n transition: 0.1s;\n border: 1px solid transparent;\n text-align: center;\n p {\n font-size: 10px;\n }\n"])));
|
|
2193
2183
|
var PaymentLi = styled__default.div(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: center;\n margin-bottom: 1.5em;\n cursor: pointer;\n .circle {\n /* background: #323232; */\n width: 16px;\n height: 16px;\n display: grid;\n place-items: center;\n border-radius: 50%;\n border: 1px solid #323232;\n margin-right: 1em;\n }\n .innerCircle {\n background: #323232;\n border-radius: 50%;\n width: 6px;\n height: 6px;\n }\n p {\n font-size: 1em;\n color: black;\n text-transform: capitalize;\n font-weight: 500;\n }\n"])));
|
|
2194
|
-
|
|
2195
2184
|
var StyledTableRow = styled__default(material.TableRow)(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n && {\n box-shadow: none;\n border: none;\n background-color: ", ";\n p {\n font-size: 0.9em;\n font-family: 'karla-fonts';\n }\n .max {\n min-width: max-content;\n }\n .red {\n color: ", "\n font-weight: inherit;\n }\n .light {\n font-weight: 300;\n }\n .price {\n font-weight: 600;\n }\n .sm {\n font-weight: 500;\n }\n .bolder {\n font-weight: 700;\n font-size: 1em;\n }\n @media only screen and (max-width: 640px) {\n p {\n font-size: 12px;\n }\n .sm {\n font-size: 10px;\n }\n .price,\n .red {\n font-size: 10px;\n }\n .total {\n font-size: 14px;\n }\n .bolder {\n font-size: 12px;\n }\n }\n }\n"])), function (props) {
|
|
2196
2185
|
return props.colored ? props.bg || "'rgba(255, 240, 236, 1)'" : 'white';
|
|
2197
2186
|
}, function (props) {
|
|
@@ -2228,8 +2217,7 @@ var CheckoutInput = function CheckoutInput(_ref) {
|
|
|
2228
2217
|
return /*#__PURE__*/React__default.createElement(material.TextField, _extends({
|
|
2229
2218
|
placeholder: placeholder,
|
|
2230
2219
|
variant: "outlined",
|
|
2231
|
-
required: true
|
|
2232
|
-
,
|
|
2220
|
+
required: true,
|
|
2233
2221
|
InputProps: showIcon ? {
|
|
2234
2222
|
startAdornment: /*#__PURE__*/React__default.createElement(material.InputAdornment, {
|
|
2235
2223
|
position: "start"
|
|
@@ -2661,13 +2649,11 @@ var Step1 = function Step1(_ref) {
|
|
|
2661
2649
|
addStore(data);
|
|
2662
2650
|
setSelectedStore((_stores$ = stores[0]) === null || _stores$ === void 0 ? void 0 : _stores$.id);
|
|
2663
2651
|
};
|
|
2664
|
-
|
|
2665
2652
|
var addAddress = function addAddress(data) {
|
|
2666
2653
|
var _addressList$2;
|
|
2667
2654
|
addStoreAddress(data);
|
|
2668
2655
|
setAddress((_addressList$2 = addressList[0]) === null || _addressList$2 === void 0 ? void 0 : _addressList$2.id);
|
|
2669
2656
|
};
|
|
2670
|
-
|
|
2671
2657
|
var next = function next() {
|
|
2672
2658
|
setBilling(address);
|
|
2673
2659
|
setShipping(showShipping);
|
|
@@ -2761,8 +2747,7 @@ var Step1 = function Step1(_ref) {
|
|
|
2761
2747
|
checked: showShipping,
|
|
2762
2748
|
icon: /*#__PURE__*/React__default.createElement(md.MdOutlineCircle, null),
|
|
2763
2749
|
checkedIcon: /*#__PURE__*/React__default.createElement(gr.GrRadialSelected, null)
|
|
2764
|
-
}), /*#__PURE__*/React__default.createElement("p", null, "Ship to a different address ")), /*#__PURE__*/React__default.createElement(ButtonRow
|
|
2765
|
-
, {
|
|
2750
|
+
}), /*#__PURE__*/React__default.createElement("p", null, "Ship to a different address ")), /*#__PURE__*/React__default.createElement(ButtonRow, {
|
|
2766
2751
|
color: styles === null || styles === void 0 ? void 0 : (_styles$button3 = styles.button) === null || _styles$button3 === void 0 ? void 0 : _styles$button3.bg,
|
|
2767
2752
|
backDisabled: true,
|
|
2768
2753
|
handleNext: function handleNext() {
|
|
@@ -2813,7 +2798,6 @@ var Step2 = function Step2(_ref) {
|
|
|
2813
2798
|
var _useState = React.useState((_addressList$ = addressList[0]) === null || _addressList$ === void 0 ? void 0 : _addressList$.id),
|
|
2814
2799
|
address = _useState[0],
|
|
2815
2800
|
setAddress = _useState[1];
|
|
2816
|
-
|
|
2817
2801
|
var onSubmit = function onSubmit(data) {
|
|
2818
2802
|
addShipping(data);
|
|
2819
2803
|
resetField('shippingAddress');
|
|
@@ -2901,10 +2885,17 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
2901
2885
|
handleSave = _ref.handleSave,
|
|
2902
2886
|
showError = _ref.showError,
|
|
2903
2887
|
data = _ref.data;
|
|
2904
|
-
var
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2888
|
+
var firstName = data.firstName,
|
|
2889
|
+
lastName = data.lastName,
|
|
2890
|
+
cardNumber = data.cardNumber,
|
|
2891
|
+
cvv = data.cvv,
|
|
2892
|
+
expirationMonth = data.expirationMonth,
|
|
2893
|
+
expirationYear = data.expirationYear,
|
|
2894
|
+
address = data.address,
|
|
2895
|
+
countryId = data.countryId,
|
|
2896
|
+
stateId = data.stateId,
|
|
2897
|
+
city = data.city,
|
|
2898
|
+
zipcode = data.zipcode;
|
|
2908
2899
|
return /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2909
2900
|
container: true,
|
|
2910
2901
|
rowSpacing: 2,
|
|
@@ -2921,37 +2912,57 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
2921
2912
|
}, /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2922
2913
|
item: true,
|
|
2923
2914
|
xs: 12,
|
|
2924
|
-
md:
|
|
2915
|
+
md: 6
|
|
2925
2916
|
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
2926
2917
|
required: true,
|
|
2927
2918
|
fullWidth: true,
|
|
2928
2919
|
onChange: handleChange,
|
|
2929
2920
|
onFocus: handleFocus,
|
|
2930
|
-
name: "
|
|
2921
|
+
name: "firstName",
|
|
2931
2922
|
type: "text",
|
|
2932
|
-
value:
|
|
2933
|
-
placeholder: "Card Holder's Name*"
|
|
2934
|
-
}), showError &&
|
|
2923
|
+
value: firstName,
|
|
2924
|
+
placeholder: "Card Holder's First Name*"
|
|
2925
|
+
}), showError && (firstName === null || firstName === void 0 ? void 0 : firstName.length) < 3 ? /*#__PURE__*/React__default.createElement("p", {
|
|
2935
2926
|
style: {
|
|
2936
2927
|
color: 'red',
|
|
2937
2928
|
marginLeft: '.5em',
|
|
2938
2929
|
paddingTop: '.4em',
|
|
2939
2930
|
fontSize: '.95em'
|
|
2940
2931
|
}
|
|
2941
|
-
}, "Please enter a valid Card Holder's Name") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2932
|
+
}, "Please enter a valid Card Holder's First Name") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2942
2933
|
item: true,
|
|
2943
2934
|
xs: 12,
|
|
2944
|
-
md:
|
|
2935
|
+
md: 6
|
|
2945
2936
|
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
2946
2937
|
required: true,
|
|
2947
2938
|
fullWidth: true,
|
|
2948
2939
|
onChange: handleChange,
|
|
2949
2940
|
onFocus: handleFocus,
|
|
2950
|
-
name: "
|
|
2941
|
+
name: "lastName",
|
|
2942
|
+
type: "text",
|
|
2943
|
+
value: lastName,
|
|
2944
|
+
placeholder: "Card Holder's Last Name*"
|
|
2945
|
+
}), showError && (lastName === null || lastName === void 0 ? void 0 : lastName.length) < 3 ? /*#__PURE__*/React__default.createElement("p", {
|
|
2946
|
+
style: {
|
|
2947
|
+
color: 'red',
|
|
2948
|
+
marginLeft: '.5em',
|
|
2949
|
+
paddingTop: '.4em',
|
|
2950
|
+
fontSize: '.95em'
|
|
2951
|
+
}
|
|
2952
|
+
}, "Please enter a valid Card Holder's Last Name") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2953
|
+
item: true,
|
|
2954
|
+
xs: 12,
|
|
2955
|
+
md: 12
|
|
2956
|
+
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
2957
|
+
required: true,
|
|
2958
|
+
fullWidth: true,
|
|
2959
|
+
onChange: handleChange,
|
|
2960
|
+
onFocus: handleFocus,
|
|
2961
|
+
name: "cardNumber",
|
|
2951
2962
|
type: "number",
|
|
2952
|
-
value:
|
|
2963
|
+
value: cardNumber,
|
|
2953
2964
|
placeholder: "Card Nubmers xxxx-xxxx-xxxx-xxxx"
|
|
2954
|
-
}), showError &&
|
|
2965
|
+
}), showError && (cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.length) < 14 || showError && (cardNumber === null || cardNumber === void 0 ? void 0 : cardNumber.length) > 16 ? /*#__PURE__*/React__default.createElement("p", {
|
|
2955
2966
|
style: {
|
|
2956
2967
|
color: 'red',
|
|
2957
2968
|
marginLeft: '.5em',
|
|
@@ -2961,37 +2972,57 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
2961
2972
|
}, "Please enter a valid card Number") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2962
2973
|
item: true,
|
|
2963
2974
|
xs: 12,
|
|
2964
|
-
sm:
|
|
2975
|
+
sm: 4
|
|
2965
2976
|
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
2966
2977
|
required: true,
|
|
2967
2978
|
fullWidth: true,
|
|
2968
2979
|
onChange: handleChange,
|
|
2969
2980
|
onFocus: handleFocus,
|
|
2970
|
-
name: "
|
|
2981
|
+
name: "expirationMonth",
|
|
2971
2982
|
type: "number",
|
|
2972
|
-
value:
|
|
2973
|
-
placeholder: "Expiration
|
|
2974
|
-
}), showError &&
|
|
2983
|
+
value: expirationMonth,
|
|
2984
|
+
placeholder: "Expiration Month MM "
|
|
2985
|
+
}), showError && (expirationMonth === null || expirationMonth === void 0 ? void 0 : expirationMonth.length) !== 2 ? /*#__PURE__*/React__default.createElement("p", {
|
|
2975
2986
|
style: {
|
|
2976
2987
|
color: 'red',
|
|
2977
2988
|
marginLeft: '.5em',
|
|
2978
2989
|
paddingTop: '.4em',
|
|
2979
2990
|
fontSize: '.95em'
|
|
2980
2991
|
}
|
|
2981
|
-
}, "Please enter a valid
|
|
2992
|
+
}, "Please enter a valid Month.") : ''), ' ', /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
2982
2993
|
item: true,
|
|
2983
2994
|
xs: 12,
|
|
2984
|
-
sm:
|
|
2995
|
+
sm: 4
|
|
2985
2996
|
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
2986
2997
|
required: true,
|
|
2987
2998
|
fullWidth: true,
|
|
2988
2999
|
onChange: handleChange,
|
|
2989
3000
|
onFocus: handleFocus,
|
|
2990
|
-
name: "
|
|
3001
|
+
name: "expirationYear",
|
|
3002
|
+
type: "number",
|
|
3003
|
+
value: expirationYear,
|
|
3004
|
+
placeholder: "Expiration Year YY "
|
|
3005
|
+
}), showError && (expirationYear === null || expirationYear === void 0 ? void 0 : expirationYear.length) !== 2 ? /*#__PURE__*/React__default.createElement("p", {
|
|
3006
|
+
style: {
|
|
3007
|
+
color: 'red',
|
|
3008
|
+
marginLeft: '.5em',
|
|
3009
|
+
paddingTop: '.4em',
|
|
3010
|
+
fontSize: '.95em'
|
|
3011
|
+
}
|
|
3012
|
+
}, "Please enter a valid year.") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3013
|
+
item: true,
|
|
3014
|
+
xs: 12,
|
|
3015
|
+
sm: 4
|
|
3016
|
+
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
3017
|
+
required: true,
|
|
3018
|
+
fullWidth: true,
|
|
3019
|
+
onChange: handleChange,
|
|
3020
|
+
onFocus: handleFocus,
|
|
3021
|
+
name: "cvv",
|
|
2991
3022
|
type: "number",
|
|
2992
3023
|
placeholder: "CVC/CVV ***",
|
|
2993
|
-
value:
|
|
2994
|
-
}), showError &&
|
|
3024
|
+
value: cvv
|
|
3025
|
+
}), showError && (cvv === null || cvv === void 0 ? void 0 : cvv.length) < 3 || showError && (cvv === null || cvv === void 0 ? void 0 : cvv.length) > 4 ? /*#__PURE__*/React__default.createElement("p", {
|
|
2995
3026
|
style: {
|
|
2996
3027
|
color: 'red',
|
|
2997
3028
|
marginLeft: '.5em',
|
|
@@ -2999,6 +3030,106 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
2999
3030
|
fontSize: '.95em'
|
|
3000
3031
|
}
|
|
3001
3032
|
}, "Please enter a valid cvv.") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3033
|
+
item: true,
|
|
3034
|
+
xs: 12,
|
|
3035
|
+
md: 12
|
|
3036
|
+
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
3037
|
+
required: true,
|
|
3038
|
+
fullWidth: true,
|
|
3039
|
+
onChange: handleChange,
|
|
3040
|
+
onFocus: handleFocus,
|
|
3041
|
+
name: "address",
|
|
3042
|
+
type: "text",
|
|
3043
|
+
value: address,
|
|
3044
|
+
placeholder: "Address"
|
|
3045
|
+
}), showError && (address === null || address === void 0 ? void 0 : address.length) < 1 ? /*#__PURE__*/React__default.createElement("p", {
|
|
3046
|
+
style: {
|
|
3047
|
+
color: 'red',
|
|
3048
|
+
marginLeft: '.5em',
|
|
3049
|
+
paddingTop: '.4em',
|
|
3050
|
+
fontSize: '.95em'
|
|
3051
|
+
}
|
|
3052
|
+
}, "Please enter a valid Address") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3053
|
+
item: true,
|
|
3054
|
+
xs: 12,
|
|
3055
|
+
sm: 3
|
|
3056
|
+
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
3057
|
+
required: true,
|
|
3058
|
+
fullWidth: true,
|
|
3059
|
+
onChange: handleChange,
|
|
3060
|
+
onFocus: handleFocus,
|
|
3061
|
+
name: "countryId",
|
|
3062
|
+
type: "number",
|
|
3063
|
+
value: countryId,
|
|
3064
|
+
placeholder: "Country"
|
|
3065
|
+
}), showError && !countryId ? /*#__PURE__*/React__default.createElement("p", {
|
|
3066
|
+
style: {
|
|
3067
|
+
color: 'red',
|
|
3068
|
+
marginLeft: '.5em',
|
|
3069
|
+
paddingTop: '.4em',
|
|
3070
|
+
fontSize: '.95em'
|
|
3071
|
+
}
|
|
3072
|
+
}, "Please enter a country.") : ''), ' ', /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3073
|
+
item: true,
|
|
3074
|
+
xs: 12,
|
|
3075
|
+
sm: 3
|
|
3076
|
+
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
3077
|
+
required: true,
|
|
3078
|
+
fullWidth: true,
|
|
3079
|
+
onChange: handleChange,
|
|
3080
|
+
onFocus: handleFocus,
|
|
3081
|
+
name: "stateId",
|
|
3082
|
+
type: "number",
|
|
3083
|
+
value: stateId,
|
|
3084
|
+
placeholder: "State"
|
|
3085
|
+
}), showError && !stateId ? /*#__PURE__*/React__default.createElement("p", {
|
|
3086
|
+
style: {
|
|
3087
|
+
color: 'red',
|
|
3088
|
+
marginLeft: '.5em',
|
|
3089
|
+
paddingTop: '.4em',
|
|
3090
|
+
fontSize: '.95em'
|
|
3091
|
+
}
|
|
3092
|
+
}, "Please enter a State.") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3093
|
+
item: true,
|
|
3094
|
+
xs: 12,
|
|
3095
|
+
sm: 3
|
|
3096
|
+
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
3097
|
+
required: true,
|
|
3098
|
+
fullWidth: true,
|
|
3099
|
+
onChange: handleChange,
|
|
3100
|
+
onFocus: handleFocus,
|
|
3101
|
+
name: "city",
|
|
3102
|
+
type: "text",
|
|
3103
|
+
placeholder: "CIty",
|
|
3104
|
+
value: city
|
|
3105
|
+
}), showError && (city === null || city === void 0 ? void 0 : city.length) < 1 ? /*#__PURE__*/React__default.createElement("p", {
|
|
3106
|
+
style: {
|
|
3107
|
+
color: 'red',
|
|
3108
|
+
marginLeft: '.5em',
|
|
3109
|
+
paddingTop: '.4em',
|
|
3110
|
+
fontSize: '.95em'
|
|
3111
|
+
}
|
|
3112
|
+
}, "Please enter a valid cvv.") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3113
|
+
item: true,
|
|
3114
|
+
xs: 12,
|
|
3115
|
+
sm: 3
|
|
3116
|
+
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
3117
|
+
required: true,
|
|
3118
|
+
fullWidth: true,
|
|
3119
|
+
onChange: handleChange,
|
|
3120
|
+
onFocus: handleFocus,
|
|
3121
|
+
name: "zipcode",
|
|
3122
|
+
type: "number",
|
|
3123
|
+
placeholder: "Zip code",
|
|
3124
|
+
value: zipcode
|
|
3125
|
+
}), showError && (zipcode === null || zipcode === void 0 ? void 0 : zipcode.length) < 1 ? /*#__PURE__*/React__default.createElement("p", {
|
|
3126
|
+
style: {
|
|
3127
|
+
color: 'red',
|
|
3128
|
+
marginLeft: '.5em',
|
|
3129
|
+
paddingTop: '.4em',
|
|
3130
|
+
fontSize: '.95em'
|
|
3131
|
+
}
|
|
3132
|
+
}, "Please enter a Zip code.") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
3002
3133
|
item: true,
|
|
3003
3134
|
xs: 12
|
|
3004
3135
|
}, /*#__PURE__*/React__default.createElement(SaveButton, {
|
|
@@ -3025,11 +3156,17 @@ var PaymentForm = /*#__PURE__*/function (_React$Component) {
|
|
|
3025
3156
|
}
|
|
3026
3157
|
_this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;
|
|
3027
3158
|
_this.state = {
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3159
|
+
firstName: '',
|
|
3160
|
+
lastName: '',
|
|
3161
|
+
cardNumber: '',
|
|
3162
|
+
cvv: '',
|
|
3163
|
+
expirationMonth: '',
|
|
3164
|
+
expirationYear: '',
|
|
3165
|
+
address: '',
|
|
3166
|
+
countryId: '',
|
|
3167
|
+
stateId: '',
|
|
3168
|
+
city: '',
|
|
3169
|
+
zipcode: '',
|
|
3033
3170
|
showError: false
|
|
3034
3171
|
};
|
|
3035
3172
|
_this.handleInputFocus = function (e) {
|
|
@@ -3042,27 +3179,9 @@ var PaymentForm = /*#__PURE__*/function (_React$Component) {
|
|
|
3042
3179
|
var _e$target = e.target,
|
|
3043
3180
|
name = _e$target.name,
|
|
3044
3181
|
value = _e$target.value;
|
|
3045
|
-
console.log(name);
|
|
3046
3182
|
_this.setState((_this$setState = {}, _this$setState[name] = value, _this$setState));
|
|
3047
3183
|
};
|
|
3048
3184
|
_this.handleSave = function (e) {
|
|
3049
|
-
var _this$state = _this.state,
|
|
3050
|
-
name = _this$state.name,
|
|
3051
|
-
number = _this$state.number,
|
|
3052
|
-
cvc = _this$state.cvc,
|
|
3053
|
-
expiry = _this$state.expiry;
|
|
3054
|
-
if (name.length < 3) return _this.setState({
|
|
3055
|
-
showError: true
|
|
3056
|
-
});
|
|
3057
|
-
if (number.length < 14 || number.length > 16) return _this.setState({
|
|
3058
|
-
showError: true
|
|
3059
|
-
});
|
|
3060
|
-
if (cvc.length < 3 || cvc.length > 4) return _this.setState({
|
|
3061
|
-
showError: true
|
|
3062
|
-
});
|
|
3063
|
-
if (expiry.length < 4 || expiry.length > 6) return _this.setState({
|
|
3064
|
-
showError: true
|
|
3065
|
-
});
|
|
3066
3185
|
_this.props.handleSave(_this.state);
|
|
3067
3186
|
};
|
|
3068
3187
|
return _this;
|
|
@@ -3074,10 +3193,10 @@ var PaymentForm = /*#__PURE__*/function (_React$Component) {
|
|
|
3074
3193
|
id: "PaymentForm"
|
|
3075
3194
|
}, /*#__PURE__*/React__default.createElement(Cards, {
|
|
3076
3195
|
cvc: this.state.cvc,
|
|
3077
|
-
expiry: this.state.
|
|
3196
|
+
expiry: "" + this.state.expirationMonth + this.state.expirationYear,
|
|
3078
3197
|
focused: this.state.focus,
|
|
3079
|
-
name: this.state.
|
|
3080
|
-
number: this.state.
|
|
3198
|
+
name: this.state.firstName + " " + this.state.lastName,
|
|
3199
|
+
number: this.state.cardNumber
|
|
3081
3200
|
}), /*#__PURE__*/React__default.createElement(CreditCardForm, {
|
|
3082
3201
|
handleChange: this.handleInputChange,
|
|
3083
3202
|
handleFocus: this.handleInputFocus,
|
|
@@ -3351,8 +3470,7 @@ var Step4 = function Step4(_ref) {
|
|
|
3351
3470
|
xs: 11,
|
|
3352
3471
|
sm: 11,
|
|
3353
3472
|
md: 11.5
|
|
3354
|
-
}, /*#__PURE__*/React__default.createElement(material.Box
|
|
3355
|
-
, null, /*#__PURE__*/React__default.createElement("textarea", {
|
|
3473
|
+
}, /*#__PURE__*/React__default.createElement(material.Box, null, /*#__PURE__*/React__default.createElement("textarea", {
|
|
3356
3474
|
rows: "3",
|
|
3357
3475
|
cols: "4",
|
|
3358
3476
|
placeholder: "Comments for the order....",
|
|
@@ -3589,8 +3707,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
3589
3707
|
handleNext: handleNext,
|
|
3590
3708
|
setShipping: setShowShipping,
|
|
3591
3709
|
setBilling: setBilling,
|
|
3592
|
-
stores: userStores
|
|
3593
|
-
,
|
|
3710
|
+
stores: userStores,
|
|
3594
3711
|
addStore: addStore,
|
|
3595
3712
|
selectedStore: selectedStore,
|
|
3596
3713
|
setSelectedStore: setSelectedStore,
|
|
@@ -3612,8 +3729,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
3612
3729
|
setShipping: setShipping,
|
|
3613
3730
|
showShipping: showShipping,
|
|
3614
3731
|
selectedStore: selectedStore,
|
|
3615
|
-
stores: userStores
|
|
3616
|
-
,
|
|
3732
|
+
stores: userStores,
|
|
3617
3733
|
addShipping: addStoreAddress,
|
|
3618
3734
|
setSelectedCountry: setSelectedCountry,
|
|
3619
3735
|
styles: styles
|
|
@@ -3809,7 +3925,6 @@ var SideMenuItemComponent = function SideMenuItemComponent(props) {
|
|
|
3809
3925
|
primaryColor = props.primaryColor,
|
|
3810
3926
|
list = props.list,
|
|
3811
3927
|
onTabChange = props.onTabChange;
|
|
3812
|
-
|
|
3813
3928
|
if (!link || typeof link !== 'string') {
|
|
3814
3929
|
return /*#__PURE__*/React__default.createElement(material.ListItem, {
|
|
3815
3930
|
button: true,
|
|
@@ -3819,7 +3934,6 @@ var SideMenuItemComponent = function SideMenuItemComponent(props) {
|
|
|
3819
3934
|
primaryColor: primaryColor
|
|
3820
3935
|
});
|
|
3821
3936
|
}
|
|
3822
|
-
|
|
3823
3937
|
return /*#__PURE__*/React__default.createElement(material.ListItem, {
|
|
3824
3938
|
button: true,
|
|
3825
3939
|
className: className,
|
|
@@ -3909,9 +4023,7 @@ var SideMenuItemComponentContainer = styles.styled(SideMenuItemComponent)(functi
|
|
|
3909
4023
|
'& .MuiTypography-root': {
|
|
3910
4024
|
fontWeight: '600 '
|
|
3911
4025
|
},
|
|
3912
|
-
'&:hover': {
|
|
3913
|
-
},
|
|
3914
|
-
|
|
4026
|
+
'&:hover': {},
|
|
3915
4027
|
'& svg': {
|
|
3916
4028
|
fontSize: 22,
|
|
3917
4029
|
color: list ? active ? "#fff" : '#fff' : primaryColor
|
|
@@ -4432,7 +4544,6 @@ var APITable = React.forwardRef(function (_ref, ref) {
|
|
|
4432
4544
|
}));
|
|
4433
4545
|
handleTableChange(pagination);
|
|
4434
4546
|
};
|
|
4435
|
-
|
|
4436
4547
|
var setTableDataOnRef = function setTableDataOnRef() {
|
|
4437
4548
|
if (ref) {
|
|
4438
4549
|
ref.current = {
|
|
@@ -7241,7 +7352,7 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
7241
7352
|
var _ref$apiEndPoint = _ref.apiEndPoint,
|
|
7242
7353
|
apiEndPoint = _ref$apiEndPoint === void 0 ? 'https://dev.salesgent.xyz/api' : _ref$apiEndPoint,
|
|
7243
7354
|
_ref$token = _ref.token,
|
|
7244
|
-
token = _ref$token === void 0 ? 'eyJhbGciOiJIUzI1NiJ9.
|
|
7355
|
+
token = _ref$token === void 0 ? 'eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJzYWxlc2dlbnRlcnBAZ21haWwuY29tIiwidGllciI6MiwidXNlclR5cGUiOiJDdXN0b21lciIsInRva2VuVHlwZSI6ImFjY2VzcyIsInN0b3JlSWQiOjIsImV4cCI6MTY3MDI2ODk4OSwidXNlcklkIjoyNDU1LCJpYXQiOjE2NzAyMzI5ODksInJlc2V0UGFzc3dvcmRSZXF1aXJlZCI6ZmFsc2V9.-SdkA9CatCY-g4ln5ZU9hKsYvBfoTPspZV_hSQHo8wI' : _ref$token,
|
|
7245
7356
|
_ref$primaryColor = _ref.primaryColor,
|
|
7246
7357
|
primaryColor = _ref$primaryColor === void 0 ? '#D2122E' : _ref$primaryColor,
|
|
7247
7358
|
secondaryColor = _ref.secondaryColor,
|
|
@@ -7442,7 +7553,7 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
7442
7553
|
image: storeData === null || storeData === void 0 ? void 0 : (_storeData$ = storeData[0]) === null || _storeData$ === void 0 ? void 0 : _storeData$.logoUrl,
|
|
7443
7554
|
alt: "image",
|
|
7444
7555
|
style: {
|
|
7445
|
-
|
|
7556
|
+
padding: '0 3rem 1rem'
|
|
7446
7557
|
}
|
|
7447
7558
|
}), /*#__PURE__*/React__default.createElement(SideMenu, {
|
|
7448
7559
|
primaryColor: colors.primaryColor,
|
|
@@ -7486,8 +7597,7 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
7486
7597
|
textTransform: 'capitalize',
|
|
7487
7598
|
fontSize: '1.4rem'
|
|
7488
7599
|
}
|
|
7489
|
-
},
|
|
7490
|
-
tabValue)), /*#__PURE__*/React__default.createElement(material.IconButton, {
|
|
7600
|
+
}, tabValue)), /*#__PURE__*/React__default.createElement(material.IconButton, {
|
|
7491
7601
|
color: "inherit",
|
|
7492
7602
|
"aria-label": "open drawer",
|
|
7493
7603
|
onClick: function onClick() {
|