@salesgenterp/ui-components 0.4.41 → 0.4.43
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 +36 -4
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +38 -6
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Stack, Tooltip, TableCell, TableContainer, TableRow, Checkbox, Grid, TextField, InputAdornment, MenuItem, CircularProgress, Table as Table$1, TableBody as TableBody$1, Stepper, Step, StepLabel, StepContent } from '@mui/material';
|
|
2
2
|
import React__default, { useState, useEffect, createElement } from 'react';
|
|
3
|
-
import { GrClose } from 'react-icons/gr';
|
|
3
|
+
import { GrClose, GrRadialSelected } from 'react-icons/gr';
|
|
4
4
|
import 'react-icons/gi';
|
|
5
5
|
import { BsCartX, BsCreditCard } from 'react-icons/bs';
|
|
6
6
|
import styled from 'styled-components';
|
|
@@ -15,7 +15,7 @@ import TableRow$1 from '@mui/material/TableRow';
|
|
|
15
15
|
import TableSortLabel from '@mui/material/TableSortLabel';
|
|
16
16
|
import { BiLockAlt, BiNotepad, BiWallet } from 'react-icons/bi';
|
|
17
17
|
import { CgProfile } from 'react-icons/cg';
|
|
18
|
-
import { MdArrowBack, MdOutlineDateRange, MdOutlineStickyNote2 } from 'react-icons/md';
|
|
18
|
+
import { MdArrowBack, MdOutlineCircle, MdOutlineDateRange, MdOutlineStickyNote2 } from 'react-icons/md';
|
|
19
19
|
import { Controller, useForm } from 'react-hook-form';
|
|
20
20
|
import { HiOutlineChevronDown } from 'react-icons/hi';
|
|
21
21
|
import { IoPersonOutline } from 'react-icons/io5';
|
|
@@ -2184,7 +2184,8 @@ var StepsHeaderComponent = function StepsHeaderComponent(_ref) {
|
|
|
2184
2184
|
var Step0 = function Step0(_ref) {
|
|
2185
2185
|
var loading = _ref.loading,
|
|
2186
2186
|
userName = _ref.userName,
|
|
2187
|
-
handleLogin = _ref.handleLogin
|
|
2187
|
+
handleLogin = _ref.handleLogin,
|
|
2188
|
+
clickRedirect = _ref.clickRedirect;
|
|
2188
2189
|
|
|
2189
2190
|
var _useForm = useForm(),
|
|
2190
2191
|
control = _useForm.control,
|
|
@@ -2200,7 +2201,11 @@ var Step0 = function Step0(_ref) {
|
|
|
2200
2201
|
icon: 1
|
|
2201
2202
|
}), /*#__PURE__*/React__default.createElement(StepsContent, null, /*#__PURE__*/React__default.createElement("p", null, "Please choose how you want to proceed"), /*#__PURE__*/React__default.createElement("p", {
|
|
2202
2203
|
className: "bold"
|
|
2203
|
-
}, /*#__PURE__*/React__default.createElement("span",
|
|
2204
|
+
}, /*#__PURE__*/React__default.createElement("span", {
|
|
2205
|
+
onClick: function onClick() {
|
|
2206
|
+
return clickRedirect('account/register');
|
|
2207
|
+
}
|
|
2208
|
+
}, "register"), ' ', "| ", /*#__PURE__*/React__default.createElement("span", {
|
|
2204
2209
|
className: "red"
|
|
2205
2210
|
}, "login")), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2206
2211
|
container: true,
|
|
@@ -2446,6 +2451,7 @@ var AddressForm = function AddressForm(_ref) {
|
|
|
2446
2451
|
var Step1 = function Step1(_ref) {
|
|
2447
2452
|
var handleBack = _ref.handleBack,
|
|
2448
2453
|
handleNext = _ref.handleNext,
|
|
2454
|
+
setShipping = _ref.setShipping,
|
|
2449
2455
|
setBilling = _ref.setBilling,
|
|
2450
2456
|
addStore = _ref.addStore,
|
|
2451
2457
|
addStoreAddress = _ref.addStoreAddress,
|
|
@@ -2459,6 +2465,10 @@ var Step1 = function Step1(_ref) {
|
|
|
2459
2465
|
resetField = _useForm.resetField,
|
|
2460
2466
|
handleSubmit = _useForm.handleSubmit;
|
|
2461
2467
|
|
|
2468
|
+
var _useState = useState(true),
|
|
2469
|
+
address = _useState[0],
|
|
2470
|
+
setAddress = _useState[1];
|
|
2471
|
+
|
|
2462
2472
|
var _useForm2 = useForm(),
|
|
2463
2473
|
addressControl = _useForm2.control,
|
|
2464
2474
|
watchAddress = _useForm2.watch,
|
|
@@ -2494,6 +2504,7 @@ var Step1 = function Step1(_ref) {
|
|
|
2494
2504
|
}, {
|
|
2495
2505
|
billingAddress: selectedAddress
|
|
2496
2506
|
});
|
|
2507
|
+
setShipping(address);
|
|
2497
2508
|
handleNext();
|
|
2498
2509
|
};
|
|
2499
2510
|
|
|
@@ -2542,7 +2553,27 @@ var Step1 = function Step1(_ref) {
|
|
|
2542
2553
|
handleSubmit: handleSubmitAddress,
|
|
2543
2554
|
onSubmit: addAddress,
|
|
2544
2555
|
countries: countries
|
|
2545
|
-
}), /*#__PURE__*/React__default.createElement(
|
|
2556
|
+
}), /*#__PURE__*/React__default.createElement(Grid, {
|
|
2557
|
+
item: true,
|
|
2558
|
+
xs: 12
|
|
2559
|
+
}, /*#__PURE__*/React__default.createElement(CheckBoxRow, {
|
|
2560
|
+
onClick: function onClick() {
|
|
2561
|
+
setAddress(false);
|
|
2562
|
+
}
|
|
2563
|
+
}, /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
2564
|
+
checked: !address,
|
|
2565
|
+
icon: /*#__PURE__*/React__default.createElement(MdOutlineCircle, null),
|
|
2566
|
+
checkedIcon: /*#__PURE__*/React__default.createElement(GrRadialSelected, null)
|
|
2567
|
+
}), /*#__PURE__*/React__default.createElement("p", null, "Ship to this address"))), /*#__PURE__*/React__default.createElement(CheckBoxRow, {
|
|
2568
|
+
padding: '0 0 1em 0',
|
|
2569
|
+
onClick: function onClick() {
|
|
2570
|
+
setAddress(true);
|
|
2571
|
+
}
|
|
2572
|
+
}, /*#__PURE__*/React__default.createElement(Checkbox, {
|
|
2573
|
+
checked: address,
|
|
2574
|
+
icon: /*#__PURE__*/React__default.createElement(MdOutlineCircle, null),
|
|
2575
|
+
checkedIcon: /*#__PURE__*/React__default.createElement(GrRadialSelected, null)
|
|
2576
|
+
}), /*#__PURE__*/React__default.createElement("p", null, "Ship to a different address ")), /*#__PURE__*/React__default.createElement(ButtonRow, {
|
|
2546
2577
|
handleBack: handleBack,
|
|
2547
2578
|
handleNext: function handleNext() {
|
|
2548
2579
|
next();
|
|
@@ -3138,7 +3169,8 @@ var CheckoutPageComponent = function CheckoutPageComponent(_ref) {
|
|
|
3138
3169
|
userName: userName,
|
|
3139
3170
|
handleBack: handleBack,
|
|
3140
3171
|
handleNext: handleNext,
|
|
3141
|
-
handleLogin: handleLogin
|
|
3172
|
+
handleLogin: handleLogin,
|
|
3173
|
+
clickRedirect: clickRedirect
|
|
3142
3174
|
})), index === 1 && /*#__PURE__*/React__default.createElement(StepContent, {
|
|
3143
3175
|
sx: {
|
|
3144
3176
|
padding: 0
|