@salesgenterp/ui-components 0.4.240 → 0.4.241
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 +47 -29
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +47 -29
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -44,8 +44,8 @@ var reactSelect = require('react-select');
|
|
|
44
44
|
var ReactAsyncSelect = _interopDefault(require('react-select/async'));
|
|
45
45
|
var ReCAPTCHA = _interopDefault(require('react-google-recaptcha'));
|
|
46
46
|
var cg = require('react-icons/cg');
|
|
47
|
-
var Cards = _interopDefault(require('react-credit-cards'));
|
|
48
47
|
var fi = require('react-icons/fi');
|
|
48
|
+
var Cards = _interopDefault(require('react-credit-cards'));
|
|
49
49
|
|
|
50
50
|
function _extends() {
|
|
51
51
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -1190,7 +1190,8 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
1190
1190
|
sectionRightImageSection = _ref.sectionRightImageSection,
|
|
1191
1191
|
discountImageSection = _ref.discountImageSection,
|
|
1192
1192
|
hideDiscountImage = _ref.hideDiscountImage,
|
|
1193
|
-
imgNotFoundUrl = _ref.imgNotFoundUrl
|
|
1193
|
+
imgNotFoundUrl = _ref.imgNotFoundUrl,
|
|
1194
|
+
hideInvoiceAction = _ref.hideInvoiceAction;
|
|
1194
1195
|
var _useState = React.useState({}),
|
|
1195
1196
|
customerData = _useState[0],
|
|
1196
1197
|
setCustomerData = _useState[1];
|
|
@@ -1297,7 +1298,7 @@ var Dashboard = function Dashboard(_ref) {
|
|
|
1297
1298
|
target: '_blank'
|
|
1298
1299
|
}, trackingNumber);
|
|
1299
1300
|
}
|
|
1300
|
-
}, {
|
|
1301
|
+
}, !hideInvoiceAction && {
|
|
1301
1302
|
id: 'orderId',
|
|
1302
1303
|
label: 'Action',
|
|
1303
1304
|
align: 'center',
|
|
@@ -3756,7 +3757,8 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
3756
3757
|
sectionRightImageSection = _ref.sectionRightImageSection,
|
|
3757
3758
|
discountImageSection = _ref.discountImageSection,
|
|
3758
3759
|
hideDiscountImage = _ref.hideDiscountImage,
|
|
3759
|
-
imgNotFoundUrl = _ref.imgNotFoundUrl
|
|
3760
|
+
imgNotFoundUrl = _ref.imgNotFoundUrl,
|
|
3761
|
+
hideInvoiceAction = _ref.hideInvoiceAction;
|
|
3760
3762
|
var serviceApiEndPoint = apiEndPoint.replace('/api', '/services/pdf');
|
|
3761
3763
|
var isMobile = useMediaQuery('(max-width:768px)');
|
|
3762
3764
|
var drawerWidth = isMobile ? 200 : 300;
|
|
@@ -3872,7 +3874,8 @@ var AccountDetails = function AccountDetails(_ref) {
|
|
|
3872
3874
|
sectionRightImageSection: sectionRightImageSection,
|
|
3873
3875
|
discountImageSection: discountImageSection,
|
|
3874
3876
|
hideDiscountImage: hideDiscountImage,
|
|
3875
|
-
imgNotFoundUrl: imgNotFoundUrl
|
|
3877
|
+
imgNotFoundUrl: imgNotFoundUrl,
|
|
3878
|
+
hideInvoiceAction: hideInvoiceAction
|
|
3876
3879
|
});
|
|
3877
3880
|
case 'My Profile':
|
|
3878
3881
|
return /*#__PURE__*/React__default.createElement(MyProfile, {
|
|
@@ -7538,7 +7541,10 @@ var StepsHeaderContainer = styled__default.div(_templateObject3$i || (_templateO
|
|
|
7538
7541
|
}, function (props) {
|
|
7539
7542
|
return props.username ? 'not-allowed' : 'pointer';
|
|
7540
7543
|
});
|
|
7541
|
-
var TextFeildContainer = styled__default.div(_templateObject4$e || (_templateObject4$e = _taggedTemplateLiteralLoose(["\n && {\n input {\n font-size: 0.875em !important;\n
|
|
7544
|
+
var TextFeildContainer = styled__default.div(_templateObject4$e || (_templateObject4$e = _taggedTemplateLiteralLoose(["\n label {\n color: rgba(107, 106, 106, 0.6) !important;\n }\n background: ", ";\n border-radius: 10px;\n && {\n input {\n font-size: 0.875em !important;\n color: black;\n &::placeholder {\n font-size: 0.975em !important;\n }\n }\n .icon {\n color: black;\n font-size: 1em;\n }\n }\n"])), function (props) {
|
|
7545
|
+
var _props$theme, _props$theme$input;
|
|
7546
|
+
return ((_props$theme = props.theme) === null || _props$theme === void 0 ? void 0 : (_props$theme$input = _props$theme.input) === null || _props$theme$input === void 0 ? void 0 : _props$theme$input.bg) || 'transparent';
|
|
7547
|
+
});
|
|
7542
7548
|
var CommonCheckoutBtn = styled__default.button(_templateObject5$c || (_templateObject5$c = _taggedTemplateLiteralLoose(["\n border: none;\n outline: none;\n width: ", ";\n height: ", ";\n background: ", ";\n display: grid;\n place-items: center;\n color: white;\n margin: 0 1em;\n font-weight: 500;\n letter-spacing: 1px;\n text-transform: ", ";\n transition: 0.4s;\n cursor: ", ";\n &:hover,\n &:focus {\n opacity: 0.7;\n }\n"])), function (props) {
|
|
7543
7549
|
return props.width || '8.05em';
|
|
7544
7550
|
}, function (props) {
|
|
@@ -7553,7 +7559,7 @@ var CommonCheckoutBtn = styled__default.button(_templateObject5$c || (_templateO
|
|
|
7553
7559
|
var Select = styled__default.div.attrs({
|
|
7554
7560
|
className: 'checkout-input'
|
|
7555
7561
|
})(_templateObject6$b || (_templateObject6$b = _taggedTemplateLiteralLoose(["\n width: 100%;\n height: 54px;\n border-radius: 10px;\n background: ", ";\n outline: none;\n border: none;\n padding: 0 1em;\n cursor: pointer;\n select {\n width: 100%;\n height: 100%;\n border: none;\n outline: none;\n padding: 0.5em 0;\n color: rgba(107, 106, 106, 0.6);\n background: ", ";\n }\n"])), function (props) {
|
|
7556
|
-
return props.bg || 'transparent';
|
|
7562
|
+
return props.theme.input.bg || 'transparent';
|
|
7557
7563
|
}, function (props) {
|
|
7558
7564
|
return 'transparent';
|
|
7559
7565
|
});
|
|
@@ -7584,7 +7590,7 @@ var CheckBoxRow = styled__default.div(_templateObject9$4 || (_templateObject9$4
|
|
|
7584
7590
|
}, function (prop) {
|
|
7585
7591
|
return prop.colorText || 'red';
|
|
7586
7592
|
});
|
|
7587
|
-
var CreditCardFextField = styled__default.div(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n .MuiOutlinedInput-root {\n background: ", ";\n }\n .save-btn {\n background: ", ";\n }\n"])), function (prop) {
|
|
7593
|
+
var CreditCardFextField = styled__default.div(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n label {\n color: rgba(107, 106, 106, 0.6) !important;\n }\n .MuiOutlinedInput-root {\n background: ", ";\n }\n .save-btn {\n background: ", ";\n }\n"])), function (prop) {
|
|
7588
7594
|
return prop.bgInput + '!important' || '';
|
|
7589
7595
|
}, function (prop) {
|
|
7590
7596
|
return prop.btnBg + '!important' || '';
|
|
@@ -7647,9 +7653,9 @@ var CheckoutInput = function CheckoutInput(_ref) {
|
|
|
7647
7653
|
render: function render(_ref2) {
|
|
7648
7654
|
var field = _ref2.field;
|
|
7649
7655
|
return /*#__PURE__*/React__default.createElement(material.TextField, _extends({
|
|
7650
|
-
placeholder: placeholder,
|
|
7651
7656
|
variant: "outlined",
|
|
7652
7657
|
required: required,
|
|
7658
|
+
label: placeholder,
|
|
7653
7659
|
InputProps: showIcon ? {
|
|
7654
7660
|
startAdornment: /*#__PURE__*/React__default.createElement(material.InputAdornment, {
|
|
7655
7661
|
position: "start"
|
|
@@ -7964,7 +7970,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
7964
7970
|
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
7965
7971
|
controlls: {
|
|
7966
7972
|
name: 'address1',
|
|
7967
|
-
placeholder: 'Address 1
|
|
7973
|
+
placeholder: 'Address 1',
|
|
7968
7974
|
control: control,
|
|
7969
7975
|
required: true
|
|
7970
7976
|
}
|
|
@@ -8013,7 +8019,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
8013
8019
|
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8014
8020
|
controlls: {
|
|
8015
8021
|
name: 'city',
|
|
8016
|
-
placeholder: 'City
|
|
8022
|
+
placeholder: 'City',
|
|
8017
8023
|
control: control,
|
|
8018
8024
|
required: true
|
|
8019
8025
|
}
|
|
@@ -8024,7 +8030,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
8024
8030
|
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8025
8031
|
controlls: {
|
|
8026
8032
|
name: 'zip',
|
|
8027
|
-
placeholder: 'Zip/Postal Code
|
|
8033
|
+
placeholder: 'Zip/Postal Code',
|
|
8028
8034
|
control: control,
|
|
8029
8035
|
type: 'number',
|
|
8030
8036
|
required: true
|
|
@@ -8036,7 +8042,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
8036
8042
|
}, /*#__PURE__*/React__default.createElement(CheckoutInput, {
|
|
8037
8043
|
controlls: {
|
|
8038
8044
|
name: 'phone',
|
|
8039
|
-
placeholder: 'Phone
|
|
8045
|
+
placeholder: 'Phone',
|
|
8040
8046
|
control: control,
|
|
8041
8047
|
type: 'number',
|
|
8042
8048
|
required: true
|
|
@@ -8551,6 +8557,7 @@ var Step2 = function Step2(_ref) {
|
|
|
8551
8557
|
var ImageContainer$1 = styled__default(material.CardMedia)(_templateObject$D || (_templateObject$D = _taggedTemplateLiteralLoose(["\n max-width: 100%;\n max-height: 3rem,\n border-radius: 14px;\n img {\n max-width: 100%;\n }\n"])));
|
|
8552
8558
|
|
|
8553
8559
|
var CreditCardForm = function CreditCardForm(_ref) {
|
|
8560
|
+
var _React$createElement, _React$createElement2;
|
|
8554
8561
|
var handleChange = _ref.handleChange,
|
|
8555
8562
|
handleFocus = _ref.handleFocus,
|
|
8556
8563
|
saved = _ref.saved,
|
|
@@ -8601,7 +8608,8 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8601
8608
|
name: "firstName",
|
|
8602
8609
|
type: "text",
|
|
8603
8610
|
value: firstName,
|
|
8604
|
-
placeholder: "Card Holder's First Name
|
|
8611
|
+
placeholder: "Card Holder's First Name",
|
|
8612
|
+
label: "First Name"
|
|
8605
8613
|
}), showError && (firstName === null || firstName === void 0 ? void 0 : firstName.length) < 3 ? /*#__PURE__*/React__default.createElement("p", {
|
|
8606
8614
|
style: {
|
|
8607
8615
|
color: 'red',
|
|
@@ -8621,7 +8629,8 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8621
8629
|
name: "lastName",
|
|
8622
8630
|
type: "text",
|
|
8623
8631
|
value: lastName,
|
|
8624
|
-
placeholder: "Card Holder's Last Name
|
|
8632
|
+
placeholder: "Card Holder's Last Name",
|
|
8633
|
+
label: "Last Name"
|
|
8625
8634
|
}), showError && (lastName === null || lastName === void 0 ? void 0 : lastName.length) < 3 ? /*#__PURE__*/React__default.createElement("p", {
|
|
8626
8635
|
style: {
|
|
8627
8636
|
color: 'red',
|
|
@@ -8641,7 +8650,8 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8641
8650
|
name: "cardNumber",
|
|
8642
8651
|
type: "number",
|
|
8643
8652
|
value: cardNumber,
|
|
8644
|
-
placeholder: "Card
|
|
8653
|
+
placeholder: "Card Number xxxx-xxxx-xxxx-xxxx",
|
|
8654
|
+
label: "Card Number"
|
|
8645
8655
|
}), 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", {
|
|
8646
8656
|
style: {
|
|
8647
8657
|
color: 'red',
|
|
@@ -8661,7 +8671,8 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8661
8671
|
name: "expirationMonth",
|
|
8662
8672
|
type: "number",
|
|
8663
8673
|
value: expirationMonth,
|
|
8664
|
-
placeholder: "Expiration Month MM "
|
|
8674
|
+
placeholder: "Expiration Month MM ",
|
|
8675
|
+
label: "Expiration Month"
|
|
8665
8676
|
}), showError && (expirationMonth === null || expirationMonth === void 0 ? void 0 : expirationMonth.length) !== 2 ? /*#__PURE__*/React__default.createElement("p", {
|
|
8666
8677
|
style: {
|
|
8667
8678
|
color: 'red',
|
|
@@ -8669,7 +8680,7 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8669
8680
|
paddingTop: '.4em',
|
|
8670
8681
|
fontSize: '.95em'
|
|
8671
8682
|
}
|
|
8672
|
-
}, "Please enter a valid Month.") : ''),
|
|
8683
|
+
}, "Please enter a valid Month.") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8673
8684
|
item: true,
|
|
8674
8685
|
xs: 12,
|
|
8675
8686
|
sm: 4
|
|
@@ -8681,7 +8692,8 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8681
8692
|
name: "expirationYear",
|
|
8682
8693
|
type: "number",
|
|
8683
8694
|
value: expirationYear,
|
|
8684
|
-
placeholder: "Expiration Year YY "
|
|
8695
|
+
placeholder: "Expiration Year YY ",
|
|
8696
|
+
label: "Expiration Year"
|
|
8685
8697
|
}), showError && (expirationYear === null || expirationYear === void 0 ? void 0 : expirationYear.length) !== 2 ? /*#__PURE__*/React__default.createElement("p", {
|
|
8686
8698
|
style: {
|
|
8687
8699
|
color: 'red',
|
|
@@ -8700,7 +8712,8 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8700
8712
|
onFocus: handleFocus,
|
|
8701
8713
|
name: "cvv",
|
|
8702
8714
|
type: "number",
|
|
8703
|
-
placeholder: "CVC/CVV
|
|
8715
|
+
placeholder: "CVC/CVV ",
|
|
8716
|
+
label: "CVC/CVV",
|
|
8704
8717
|
value: cvv
|
|
8705
8718
|
}), 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", {
|
|
8706
8719
|
style: {
|
|
@@ -8721,7 +8734,8 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8721
8734
|
name: "address",
|
|
8722
8735
|
type: "text",
|
|
8723
8736
|
value: address,
|
|
8724
|
-
placeholder: "Address"
|
|
8737
|
+
placeholder: "Address",
|
|
8738
|
+
label: "Address"
|
|
8725
8739
|
}), showError && (address === null || address === void 0 ? void 0 : address.length) < 1 ? /*#__PURE__*/React__default.createElement("p", {
|
|
8726
8740
|
style: {
|
|
8727
8741
|
color: 'red',
|
|
@@ -8733,7 +8747,7 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8733
8747
|
item: true,
|
|
8734
8748
|
xs: 12,
|
|
8735
8749
|
sm: 3
|
|
8736
|
-
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
8750
|
+
}, /*#__PURE__*/React__default.createElement(material.TextField, (_React$createElement = {
|
|
8737
8751
|
required: true,
|
|
8738
8752
|
fullWidth: true,
|
|
8739
8753
|
onChange: handleChange,
|
|
@@ -8743,7 +8757,7 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8743
8757
|
label: "Country",
|
|
8744
8758
|
value: countryId,
|
|
8745
8759
|
placeholder: "Country"
|
|
8746
|
-
}, countries === null || countries === void 0 ? void 0 : countries.map(function (item, i) {
|
|
8760
|
+
}, _React$createElement["label"] = "Country", _React$createElement), countries === null || countries === void 0 ? void 0 : countries.map(function (item, i) {
|
|
8747
8761
|
return /*#__PURE__*/React__default.createElement(material.MenuItem, {
|
|
8748
8762
|
key: i,
|
|
8749
8763
|
value: item === null || item === void 0 ? void 0 : item.id
|
|
@@ -8755,11 +8769,11 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8755
8769
|
paddingTop: '.4em',
|
|
8756
8770
|
fontSize: '.95em'
|
|
8757
8771
|
}
|
|
8758
|
-
}, "Please enter a country.") : ''),
|
|
8772
|
+
}, "Please enter a country.") : ''), /*#__PURE__*/React__default.createElement(material.Grid, {
|
|
8759
8773
|
item: true,
|
|
8760
8774
|
xs: 12,
|
|
8761
8775
|
sm: 3
|
|
8762
|
-
}, /*#__PURE__*/React__default.createElement(material.TextField, {
|
|
8776
|
+
}, /*#__PURE__*/React__default.createElement(material.TextField, (_React$createElement2 = {
|
|
8763
8777
|
required: true,
|
|
8764
8778
|
fullWidth: true,
|
|
8765
8779
|
onChange: handleChange,
|
|
@@ -8769,7 +8783,7 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8769
8783
|
label: "State",
|
|
8770
8784
|
value: stateId,
|
|
8771
8785
|
placeholder: "State"
|
|
8772
|
-
}, states === null || states === void 0 ? void 0 : states.map(function (item, i) {
|
|
8786
|
+
}, _React$createElement2["label"] = "State", _React$createElement2), states === null || states === void 0 ? void 0 : states.map(function (item, i) {
|
|
8773
8787
|
return /*#__PURE__*/React__default.createElement(material.MenuItem, {
|
|
8774
8788
|
key: i,
|
|
8775
8789
|
value: item === null || item === void 0 ? void 0 : item.id
|
|
@@ -8792,7 +8806,8 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8792
8806
|
onFocus: handleFocus,
|
|
8793
8807
|
name: "city",
|
|
8794
8808
|
type: "text",
|
|
8795
|
-
placeholder: "
|
|
8809
|
+
placeholder: "City",
|
|
8810
|
+
label: "City",
|
|
8796
8811
|
value: city
|
|
8797
8812
|
}), showError && (city === null || city === void 0 ? void 0 : city.length) < 1 ? /*#__PURE__*/React__default.createElement("p", {
|
|
8798
8813
|
style: {
|
|
@@ -8813,6 +8828,7 @@ var CreditCardForm = function CreditCardForm(_ref) {
|
|
|
8813
8828
|
name: "zipcode",
|
|
8814
8829
|
type: "number",
|
|
8815
8830
|
placeholder: "Zip code",
|
|
8831
|
+
label: "Zip code",
|
|
8816
8832
|
value: zipcode
|
|
8817
8833
|
}), showError && (zipcode === null || zipcode === void 0 ? void 0 : zipcode.length) < 1 ? /*#__PURE__*/React__default.createElement("p", {
|
|
8818
8834
|
style: {
|
|
@@ -9463,7 +9479,9 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
9463
9479
|
var _useState = React.useState(),
|
|
9464
9480
|
shippingAddressIdFromStep1 = _useState[0],
|
|
9465
9481
|
setShippingAddressIdFromStep1 = _useState[1];
|
|
9466
|
-
return /*#__PURE__*/React__default.createElement(
|
|
9482
|
+
return /*#__PURE__*/React__default.createElement(styled.ThemeProvider, {
|
|
9483
|
+
theme: styles
|
|
9484
|
+
}, /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(material.CssBaseline, null), /*#__PURE__*/React__default.createElement(CheckoutPageContainer, {
|
|
9467
9485
|
className: "checkout",
|
|
9468
9486
|
bg: styles === null || styles === void 0 ? void 0 : styles.bg
|
|
9469
9487
|
}, /*#__PURE__*/React__default.createElement(material.Stack, {
|
|
@@ -9645,7 +9663,7 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
9645
9663
|
bg: styles === null || styles === void 0 ? void 0 : (_styles$checkoutSumma = styles.checkoutSummary) === null || _styles$checkoutSumma === void 0 ? void 0 : _styles$checkoutSumma.bg,
|
|
9646
9664
|
color: styles === null || styles === void 0 ? void 0 : (_styles$checkoutSumma2 = styles.checkoutSummary) === null || _styles$checkoutSumma2 === void 0 ? void 0 : _styles$checkoutSumma2.color,
|
|
9647
9665
|
discountCoupons: discountCoupons
|
|
9648
|
-
}));
|
|
9666
|
+
}))));
|
|
9649
9667
|
};
|
|
9650
9668
|
|
|
9651
9669
|
var Breakpoint = function Breakpoint() {};
|