@salesgenterp/ui-components 0.4.41 → 0.4.42

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.
@@ -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';
@@ -2446,6 +2446,7 @@ var AddressForm = function AddressForm(_ref) {
2446
2446
  var Step1 = function Step1(_ref) {
2447
2447
  var handleBack = _ref.handleBack,
2448
2448
  handleNext = _ref.handleNext,
2449
+ setShipping = _ref.setShipping,
2449
2450
  setBilling = _ref.setBilling,
2450
2451
  addStore = _ref.addStore,
2451
2452
  addStoreAddress = _ref.addStoreAddress,
@@ -2459,6 +2460,10 @@ var Step1 = function Step1(_ref) {
2459
2460
  resetField = _useForm.resetField,
2460
2461
  handleSubmit = _useForm.handleSubmit;
2461
2462
 
2463
+ var _useState = useState(true),
2464
+ address = _useState[0],
2465
+ setAddress = _useState[1];
2466
+
2462
2467
  var _useForm2 = useForm(),
2463
2468
  addressControl = _useForm2.control,
2464
2469
  watchAddress = _useForm2.watch,
@@ -2494,6 +2499,7 @@ var Step1 = function Step1(_ref) {
2494
2499
  }, {
2495
2500
  billingAddress: selectedAddress
2496
2501
  });
2502
+ setShipping(address);
2497
2503
  handleNext();
2498
2504
  };
2499
2505
 
@@ -2542,7 +2548,27 @@ var Step1 = function Step1(_ref) {
2542
2548
  handleSubmit: handleSubmitAddress,
2543
2549
  onSubmit: addAddress,
2544
2550
  countries: countries
2545
- }), /*#__PURE__*/React__default.createElement(ButtonRow, {
2551
+ }), /*#__PURE__*/React__default.createElement(Grid, {
2552
+ item: true,
2553
+ xs: 12
2554
+ }, /*#__PURE__*/React__default.createElement(CheckBoxRow, {
2555
+ onClick: function onClick() {
2556
+ setAddress(false);
2557
+ }
2558
+ }, /*#__PURE__*/React__default.createElement(Checkbox, {
2559
+ checked: !address,
2560
+ icon: /*#__PURE__*/React__default.createElement(MdOutlineCircle, null),
2561
+ checkedIcon: /*#__PURE__*/React__default.createElement(GrRadialSelected, null)
2562
+ }), /*#__PURE__*/React__default.createElement("p", null, "Ship to this address"))), /*#__PURE__*/React__default.createElement(CheckBoxRow, {
2563
+ padding: '0 0 1em 0',
2564
+ onClick: function onClick() {
2565
+ setAddress(true);
2566
+ }
2567
+ }, /*#__PURE__*/React__default.createElement(Checkbox, {
2568
+ checked: address,
2569
+ icon: /*#__PURE__*/React__default.createElement(MdOutlineCircle, null),
2570
+ checkedIcon: /*#__PURE__*/React__default.createElement(GrRadialSelected, null)
2571
+ }), /*#__PURE__*/React__default.createElement("p", null, "Ship to a different address ")), /*#__PURE__*/React__default.createElement(ButtonRow, {
2546
2572
  handleBack: handleBack,
2547
2573
  handleNext: function handleNext() {
2548
2574
  next();