merchi_cart 0.0.2-a → 0.0.2-d
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/lib/MerchiSDK/request.js
CHANGED
|
@@ -32,7 +32,7 @@ var BACKEND_URI = window && window.merchiBackendUri
|
|
|
32
32
|
? window.merchiBackendUri
|
|
33
33
|
: process && process.env.BACKEND_URL
|
|
34
34
|
? process.env.BACKEND_URL
|
|
35
|
-
: 'https://api.merchi.co/';
|
|
35
|
+
: 'https://api.staging.merchi.co/';
|
|
36
36
|
var ApiError = /** @class */ (function (_super) {
|
|
37
37
|
__extends(ApiError, _super);
|
|
38
38
|
function ApiError(err) {
|
|
@@ -9,14 +9,14 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
13
|
import { useDispatch, useSelector } from 'react-redux';
|
|
14
14
|
import { useForm } from 'react-hook-form';
|
|
15
15
|
import InputsAddress from './InputsAddress';
|
|
16
16
|
import { CheckoutContainer, InnerContainer, } from '../components/containers';
|
|
17
17
|
import { Title } from '../components';
|
|
18
|
-
import { updateCartShipmentAddress,
|
|
19
|
-
import {
|
|
18
|
+
import { updateCartShipmentAddress, } from '../store';
|
|
19
|
+
import { sliceCartShipment } from '../slices/sliceCartShipment';
|
|
20
20
|
import { faMapMarkerAlt } from '@fortawesome/free-solid-svg-icons';
|
|
21
21
|
import { useCartContext } from '../CartProvider';
|
|
22
22
|
var AddressGeoSuggestInput = function (props) { return (_jsx(InputsAddress, __assign({}, props, { name: 'receiverAddress' }))); };
|
|
@@ -41,7 +41,7 @@ function FormShipmentAddressAndNotes(_a) {
|
|
|
41
41
|
updateCartShipmentAddress(newAddress);
|
|
42
42
|
}
|
|
43
43
|
return (_jsxs("form", { id: formId, onSubmit: handleSubmit(onSubmit), children: [showHeadings &&
|
|
44
|
-
_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '1rem', children: _jsx(Title, { icon: showIcon ? faMapMarkerAlt : null, Title: 'Delivery / billing address' }) }) }), _jsx(AddressGeoSuggestInput, { defaultAddress: address, hookForm: hookForm, labelGeoSuggest: "Enter your ".concat(deliveryNomenclature ? 'delivery' : 'shipping', " address"), name: 'receiverAddress', updateAddress: updateAddress }), _jsxs("div", { className: classNameCartFormGroup, children: [_jsxs("label", { children: [deliveryNomenclature ? 'Delivery' : 'Shipment', " notes"] }), _jsx("textarea", { className: 'form-control input', defaultValue: notes,
|
|
44
|
+
_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '1rem', children: _jsx(Title, { icon: showIcon ? faMapMarkerAlt : null, Title: 'Delivery / billing address' }) }) }), _jsx(AddressGeoSuggestInput, { defaultAddress: address, hookForm: hookForm, labelGeoSuggest: "Enter your ".concat(deliveryNomenclature ? 'delivery' : 'shipping', " address"), name: 'receiverAddress', updateAddress: updateAddress }), _jsxs("div", { className: classNameCartFormGroup, children: [_jsxs("label", { children: [deliveryNomenclature ? 'Delivery' : 'Shipment', " notes"] }), _jsx("textarea", __assign({ className: 'form-control input', defaultValue: notes, placeholder: 'Example - Leave at top of stairs', rows: 4 }, register('receiverNotes')))] })] }));
|
|
45
45
|
}
|
|
46
46
|
export function ActiveFormShipmentAddressAndNotes() {
|
|
47
47
|
var dispatch = useDispatch();
|
|
@@ -54,6 +54,6 @@ export function ActiveFormShipmentAddressAndNotes() {
|
|
|
54
54
|
updateShipmentAddress(address));
|
|
55
55
|
updateCartShipmentAddress();
|
|
56
56
|
}
|
|
57
|
-
return (_jsx(
|
|
57
|
+
return (_jsx(_Fragment, {}));
|
|
58
58
|
}
|
|
59
59
|
export default FormShipmentAddressAndNotes;
|
|
@@ -6,8 +6,6 @@ import { CheckoutContainer, InnerContainer, } from '../components/containers';
|
|
|
6
6
|
import CartClient from '../components/CartClient';
|
|
7
7
|
import CartShipment from '../components/CartShipment';
|
|
8
8
|
import { CartBody, CartTabPanel, Title, } from '../components';
|
|
9
|
-
import FormNewCustomer from '../forms/FormNewCustomer';
|
|
10
|
-
import FormReturningCustomer from '../forms/FormReturningCustomer';
|
|
11
9
|
import FormSquarePayment from '../forms/FormSquarePayment';
|
|
12
10
|
import FormStripePayment from '../forms/FormStripePayment';
|
|
13
11
|
import { faUserPlus, faUserTag } from '@fortawesome/free-solid-svg-icons';
|
|
@@ -20,6 +18,6 @@ function PanelClientCheckout() {
|
|
|
20
18
|
_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(CartShipment, { cart: cart }) }) }), Boolean(company) && company.acceptSquare &&
|
|
21
19
|
_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(FormSquarePayment, {}) }) }), _jsx(CheckoutContainer, { children: _jsx(InnerContainer, { children: _jsx(FormStripePayment, {}) }) })] })
|
|
22
20
|
:
|
|
23
|
-
_jsxs(_Fragment, { children: [_jsx(CheckoutContainer, { children:
|
|
21
|
+
_jsxs(_Fragment, { children: [_jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(Title, { icon: faUserPlus, Title: 'Checkout as new customer' }) }) }), _jsx(CheckoutContainer, { children: _jsx(InnerContainer, { paddingBottom: '3rem', children: _jsx(Title, { icon: faUserTag, Title: 'Checkout as returning customer' }) }) })] }) })] }));
|
|
24
22
|
}
|
|
25
23
|
export default PanelClientCheckout;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "merchi_cart",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2d",
|
|
4
4
|
"description": "Merchi's cart",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.tsx",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"react-country-region-selector": "^3.6.1",
|
|
88
88
|
"react-dom": "18.2.0",
|
|
89
89
|
"react-geosuggest": "^2.14.1",
|
|
90
|
-
"react-hook-form": "
|
|
90
|
+
"react-hook-form": "7.45.4",
|
|
91
91
|
"react-icons": "^4.10.1",
|
|
92
92
|
"react-redux": "^9.1.0",
|
|
93
93
|
"react-square-web-payments-sdk": "^3.2.1",
|