@weareconceptstudio/account 0.1.4 → 0.1.5

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.
Files changed (166) hide show
  1. package/dist/components/{ui/CustomCheckbox → CustomCheckbox}/index.js +1 -1
  2. package/dist/components/TotalCheckout/index.js +1 -1
  3. package/dist/components/index.d.ts +6 -6
  4. package/dist/components/index.js +6 -6
  5. package/dist/index.d.ts +1 -2
  6. package/dist/index.js +1 -2
  7. package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountInfo/index.js +1 -1
  8. package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountPassword/index.js +1 -1
  9. package/dist/modules/account/index.d.ts +2 -0
  10. package/dist/modules/account/index.js +2 -0
  11. package/dist/modules/address/AddressForm/index.js +1 -1
  12. package/dist/modules/address/AddressItem/index.js +4 -4
  13. package/dist/modules/address/AddressProvider.d.ts +2 -1
  14. package/dist/modules/address/AddressProvider.js +12 -3
  15. package/dist/modules/address/AddressWrap/index.js +1 -1
  16. package/dist/modules/address/SelectAddress/index.js +1 -1
  17. package/dist/modules/address/SelectShippingBillingPopup/index.js +1 -1
  18. package/dist/modules/address/index.d.ts +1 -0
  19. package/dist/modules/address/index.js +1 -0
  20. package/dist/{templates → modules/auth}/ForgotPasswordTemplate/index.js +1 -1
  21. package/dist/{templates → modules/auth}/ResetPasswordTemplate/index.js +1 -1
  22. package/dist/{templates → modules/auth}/SignInTemplate/index.js +1 -1
  23. package/dist/{templates → modules/auth}/SignUpTemplate/index.js +1 -1
  24. package/dist/{templates → modules/auth}/VerifyEmailAddressTemplate/index.js +1 -1
  25. package/dist/modules/auth/index.d.ts +5 -0
  26. package/dist/modules/auth/index.js +5 -0
  27. package/dist/{templates → modules/cart}/CartTemplate/index.js +3 -2
  28. package/dist/{components → modules}/cart/EmptyCart/index.js +1 -1
  29. package/dist/{components/cart/Items/Simple → modules/cart/SimpleItems}/Item/index.js +4 -4
  30. package/dist/{components/cart/Items/Simple → modules/cart/SimpleItems}/ItemMobile/index.js +4 -4
  31. package/dist/{components/cart/Items/Simple → modules/cart/SimpleItems}/index.js +3 -3
  32. package/dist/modules/cart/index.d.ts +3 -0
  33. package/dist/modules/cart/index.js +3 -0
  34. package/dist/{templates → modules/checkout}/CheckoutTemplate/StepReview/index.js +2 -3
  35. package/dist/{templates → modules/checkout}/CheckoutTemplate/StepShipping/index.js +2 -2
  36. package/dist/{templates → modules/checkout}/CheckoutTemplate/index.js +11 -5
  37. package/dist/{templates → modules/checkout}/ThankYouTemplate/index.js +2 -3
  38. package/dist/modules/checkout/index.d.ts +2 -0
  39. package/dist/modules/checkout/index.js +2 -0
  40. package/dist/modules/index.d.ts +5 -0
  41. package/dist/modules/index.js +5 -0
  42. package/dist/{components → modules/order}/EmptyOrders/index.js +2 -2
  43. package/dist/{components → modules/order}/OrderDetails/index.js +3 -10
  44. package/dist/{templates → modules/order}/OrderHistoryTemplate/index.js +1 -1
  45. package/dist/{templates → modules/order}/OrderIndividualTemplate/index.js +12 -5
  46. package/dist/{components → modules/order}/OrderedItems/index.js +3 -6
  47. package/dist/{components → modules/order}/OrdersList/OrderItem/index.js +3 -5
  48. package/dist/{components → modules/order}/OrdersList/index.js +2 -3
  49. package/dist/modules/order/index.d.ts +6 -0
  50. package/dist/modules/order/index.js +6 -0
  51. package/dist/translations/en.d.ts +1 -0
  52. package/dist/translations/en.js +1 -0
  53. package/dist/translations/hy.d.ts +1 -0
  54. package/dist/translations/hy.js +1 -0
  55. package/dist/translations/index.d.ts +3 -0
  56. package/dist/translations/ru.d.ts +1 -0
  57. package/dist/translations/ru.js +1 -0
  58. package/package.json +1 -1
  59. package/dist/components/cart/index.d.ts +0 -2
  60. package/dist/components/cart/index.js +0 -2
  61. package/dist/components/ui/index.d.ts +0 -6
  62. package/dist/components/ui/index.js +0 -6
  63. package/dist/templates/index.d.ts +0 -12
  64. package/dist/templates/index.js +0 -17
  65. /package/dist/components/{ui/AccountButton → AccountButton}/index.d.ts +0 -0
  66. /package/dist/components/{ui/AccountButton → AccountButton}/index.js +0 -0
  67. /package/dist/components/{ui/AccountButton → AccountButton}/style.d.ts +0 -0
  68. /package/dist/components/{ui/AccountButton → AccountButton}/style.js +0 -0
  69. /package/dist/components/{ui/CustomCheckbox → CustomCheckbox}/index.d.ts +0 -0
  70. /package/dist/components/{ui/CustomCheckbox → CustomCheckbox}/style.d.ts +0 -0
  71. /package/dist/components/{ui/CustomCheckbox → CustomCheckbox}/style.js +0 -0
  72. /package/dist/components/{ui/Pagination → Pagination}/index.d.ts +0 -0
  73. /package/dist/components/{ui/Pagination → Pagination}/index.js +0 -0
  74. /package/dist/components/{ui/Pagination → Pagination}/style.d.ts +0 -0
  75. /package/dist/components/{ui/Pagination → Pagination}/style.js +0 -0
  76. /package/dist/components/{ui/Sequence → Sequence}/index.d.ts +0 -0
  77. /package/dist/components/{ui/Sequence → Sequence}/index.js +0 -0
  78. /package/dist/components/{ui/Sequence → Sequence}/style.d.ts +0 -0
  79. /package/dist/components/{ui/Sequence → Sequence}/style.js +0 -0
  80. /package/dist/components/{ui/WarningMessage → WarningMessage}/index.d.ts +0 -0
  81. /package/dist/components/{ui/WarningMessage → WarningMessage}/index.js +0 -0
  82. /package/dist/components/{ui/WarningMessage → WarningMessage}/style.d.ts +0 -0
  83. /package/dist/components/{ui/WarningMessage → WarningMessage}/style.js +0 -0
  84. /package/dist/components/{ui/WarningMessageForPopup → WarningMessageForPopup}/index.d.ts +0 -0
  85. /package/dist/components/{ui/WarningMessageForPopup → WarningMessageForPopup}/index.js +0 -0
  86. /package/dist/components/{ui/WarningMessageForPopup → WarningMessageForPopup}/style.d.ts +0 -0
  87. /package/dist/components/{ui/WarningMessageForPopup → WarningMessageForPopup}/style.js +0 -0
  88. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountInfo/index.d.ts +0 -0
  89. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountInfo/style.d.ts +0 -0
  90. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountInfo/style.js +0 -0
  91. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountInfo/utils.d.ts +0 -0
  92. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountInfo/utils.js +0 -0
  93. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountPassword/index.d.ts +0 -0
  94. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountPassword/style.d.ts +0 -0
  95. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountPassword/style.js +0 -0
  96. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountPassword/utils.d.ts +0 -0
  97. /package/dist/{templates → modules/account}/AccountSettingsTemplate/AccountPassword/utils.js +0 -0
  98. /package/dist/{templates → modules/account}/AccountSettingsTemplate/index.d.ts +0 -0
  99. /package/dist/{templates → modules/account}/AccountSettingsTemplate/index.js +0 -0
  100. /package/dist/{templates → modules/account}/AccountSettingsTemplate/style.d.ts +0 -0
  101. /package/dist/{templates → modules/account}/AccountSettingsTemplate/style.js +0 -0
  102. /package/dist/{templates → modules/account}/AccountTemplate/index.d.ts +0 -0
  103. /package/dist/{templates → modules/account}/AccountTemplate/index.js +0 -0
  104. /package/dist/{templates → modules/account}/AccountTemplate/style.d.ts +0 -0
  105. /package/dist/{templates → modules/account}/AccountTemplate/style.js +0 -0
  106. /package/dist/{templates → modules/auth}/ForgotPasswordTemplate/index.d.ts +0 -0
  107. /package/dist/{templates → modules/auth}/ForgotPasswordTemplate/style.d.ts +0 -0
  108. /package/dist/{templates → modules/auth}/ForgotPasswordTemplate/style.js +0 -0
  109. /package/dist/{templates → modules/auth}/ResetPasswordTemplate/index.d.ts +0 -0
  110. /package/dist/{templates → modules/auth}/ResetPasswordTemplate/style.d.ts +0 -0
  111. /package/dist/{templates → modules/auth}/ResetPasswordTemplate/style.js +0 -0
  112. /package/dist/{templates → modules/auth}/ResetPasswordTemplate/utils.d.ts +0 -0
  113. /package/dist/{templates → modules/auth}/ResetPasswordTemplate/utils.js +0 -0
  114. /package/dist/{templates → modules/auth}/SignInTemplate/index.d.ts +0 -0
  115. /package/dist/{templates → modules/auth}/SignInTemplate/style.d.ts +0 -0
  116. /package/dist/{templates → modules/auth}/SignInTemplate/style.js +0 -0
  117. /package/dist/{templates → modules/auth}/SignInTemplate/utils.d.ts +0 -0
  118. /package/dist/{templates → modules/auth}/SignInTemplate/utils.js +0 -0
  119. /package/dist/{templates → modules/auth}/SignUpTemplate/index.d.ts +0 -0
  120. /package/dist/{templates → modules/auth}/SignUpTemplate/style.d.ts +0 -0
  121. /package/dist/{templates → modules/auth}/SignUpTemplate/style.js +0 -0
  122. /package/dist/{templates → modules/auth}/SignUpTemplate/utils.d.ts +0 -0
  123. /package/dist/{templates → modules/auth}/SignUpTemplate/utils.js +0 -0
  124. /package/dist/{templates → modules/auth}/VerifyEmailAddressTemplate/index.d.ts +0 -0
  125. /package/dist/{templates → modules/auth}/VerifyEmailAddressTemplate/style.d.ts +0 -0
  126. /package/dist/{templates → modules/auth}/VerifyEmailAddressTemplate/style.js +0 -0
  127. /package/dist/{templates → modules/cart}/CartTemplate/index.d.ts +0 -0
  128. /package/dist/{templates → modules/cart}/CartTemplate/style.d.ts +0 -0
  129. /package/dist/{templates → modules/cart}/CartTemplate/style.js +0 -0
  130. /package/dist/{components → modules}/cart/EmptyCart/index.d.ts +0 -0
  131. /package/dist/{components → modules}/cart/EmptyCart/style.d.ts +0 -0
  132. /package/dist/{components → modules}/cart/EmptyCart/style.js +0 -0
  133. /package/dist/{components/cart/Items/Simple → modules/cart/SimpleItems}/Item/index.d.ts +0 -0
  134. /package/dist/{components/cart/Items/Simple → modules/cart/SimpleItems}/ItemMobile/index.d.ts +0 -0
  135. /package/dist/{components/cart/Items/Simple → modules/cart/SimpleItems}/index.d.ts +0 -0
  136. /package/dist/{components/cart/Items/Simple → modules/cart/SimpleItems}/style.d.ts +0 -0
  137. /package/dist/{components/cart/Items/Simple → modules/cart/SimpleItems}/style.js +0 -0
  138. /package/dist/{templates → modules/checkout}/CheckoutTemplate/StepReview/index.d.ts +0 -0
  139. /package/dist/{templates → modules/checkout}/CheckoutTemplate/StepShipping/index.d.ts +0 -0
  140. /package/dist/{templates → modules/checkout}/CheckoutTemplate/index.d.ts +0 -0
  141. /package/dist/{templates → modules/checkout}/CheckoutTemplate/style.d.ts +0 -0
  142. /package/dist/{templates → modules/checkout}/CheckoutTemplate/style.js +0 -0
  143. /package/dist/{templates → modules/checkout}/ThankYouTemplate/icons.d.ts +0 -0
  144. /package/dist/{templates → modules/checkout}/ThankYouTemplate/icons.js +0 -0
  145. /package/dist/{templates → modules/checkout}/ThankYouTemplate/index.d.ts +0 -0
  146. /package/dist/{templates → modules/checkout}/ThankYouTemplate/style.d.ts +0 -0
  147. /package/dist/{templates → modules/checkout}/ThankYouTemplate/style.js +0 -0
  148. /package/dist/{components → modules/order}/EmptyOrders/index.d.ts +0 -0
  149. /package/dist/{components → modules/order}/EmptyOrders/style.d.ts +0 -0
  150. /package/dist/{components → modules/order}/EmptyOrders/style.js +0 -0
  151. /package/dist/{components → modules/order}/OrderDetails/index.d.ts +0 -0
  152. /package/dist/{components → modules/order}/OrderDetails/style.d.ts +0 -0
  153. /package/dist/{components → modules/order}/OrderDetails/style.js +0 -0
  154. /package/dist/{templates → modules/order}/OrderHistoryTemplate/index.d.ts +0 -0
  155. /package/dist/{templates → modules/order}/OrderHistoryTemplate/style.d.ts +0 -0
  156. /package/dist/{templates → modules/order}/OrderHistoryTemplate/style.js +0 -0
  157. /package/dist/{templates → modules/order}/OrderIndividualTemplate/index.d.ts +0 -0
  158. /package/dist/{templates → modules/order}/OrderIndividualTemplate/style.d.ts +0 -0
  159. /package/dist/{templates → modules/order}/OrderIndividualTemplate/style.js +0 -0
  160. /package/dist/{components → modules/order}/OrderedItems/index.d.ts +0 -0
  161. /package/dist/{components → modules/order}/OrderedItems/style.d.ts +0 -0
  162. /package/dist/{components → modules/order}/OrderedItems/style.js +0 -0
  163. /package/dist/{components → modules/order}/OrdersList/OrderItem/index.d.ts +0 -0
  164. /package/dist/{components → modules/order}/OrdersList/index.d.ts +0 -0
  165. /package/dist/{components → modules/order}/OrdersList/style.d.ts +0 -0
  166. /package/dist/{components → modules/order}/OrdersList/style.js +0 -0
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Text } from '@weareconceptstudio/core';
3
3
  //* Icons
4
- import { CheckboxCheckedIcon, CheckboxIcon } from '../../../utils/icons';
4
+ import { CheckboxCheckedIcon, CheckboxIcon } from '../../utils/icons';
5
5
  //* Style
6
6
  import CustomCheckboxStyle from './style';
7
7
  const CustomCheckbox = ({ hide, setHide, isText = true }) => {
@@ -1,7 +1,7 @@
1
1
  import React, { memo, useMemo } from 'react';
2
2
  import { Text } from '@weareconceptstudio/core';
3
3
  import { useAccountContext } from '../../AccountProvider';
4
- import AccountButton from '../ui/AccountButton';
4
+ import AccountButton from '../AccountButton';
5
5
  import { Input, Radio } from '@weareconceptstudio/form';
6
6
  //* Utils
7
7
  import { handlePriceCheckFunc, numToLocalString } from '../../utils/_functions';
@@ -1,8 +1,8 @@
1
- export * from './ui';
2
- export * from './cart';
1
+ export { default as AccountButton } from './AccountButton';
2
+ export { default as CustomCheckbox } from './CustomCheckbox';
3
3
  export { default as FormInputCode } from './FormInputCode';
4
+ export { default as Pagination } from './Pagination';
5
+ export { default as Sequence } from './Sequence';
4
6
  export { default as TotalCheckout } from './TotalCheckout';
5
- export { default as EmptyOrders } from './EmptyOrders';
6
- export { default as OrderDetails } from './OrderDetails';
7
- export { default as OrderedItems } from './OrderedItems';
8
- export { default as OrdersList } from './OrdersList';
7
+ export { default as WarningMessage } from './WarningMessage';
8
+ export { default as WarningMessageForPopup } from './WarningMessageForPopup';
@@ -1,8 +1,8 @@
1
- export * from './ui';
2
- export * from './cart';
1
+ export { default as AccountButton } from './AccountButton';
2
+ export { default as CustomCheckbox } from './CustomCheckbox';
3
3
  export { default as FormInputCode } from './FormInputCode';
4
+ export { default as Pagination } from './Pagination';
5
+ export { default as Sequence } from './Sequence';
4
6
  export { default as TotalCheckout } from './TotalCheckout';
5
- export { default as EmptyOrders } from './EmptyOrders';
6
- export { default as OrderDetails } from './OrderDetails';
7
- export { default as OrderedItems } from './OrderedItems';
8
- export { default as OrdersList } from './OrdersList';
7
+ export { default as WarningMessage } from './WarningMessage';
8
+ export { default as WarningMessageForPopup } from './WarningMessageForPopup';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './AccountProvider';
2
- export * from './modules';
3
- export * from './templates';
4
2
  export * from './components';
3
+ export * from './modules';
package/dist/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  'use client';
2
2
  export * from './AccountProvider';
3
- export * from './modules';
4
- export * from './templates';
5
3
  export * from './components';
4
+ export * from './modules';
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useCallback } from 'react';
2
2
  import { Text, useUi } from '@weareconceptstudio/core';
3
3
  import { FormBuilder } from '@weareconceptstudio/form';
4
- import { AccountButton, WarningMessageForPopup } from '../../../components';
4
+ import { AccountButton, WarningMessageForPopup } from '../../../../components';
5
5
  import AccountInfoStyle from './style';
6
6
  import { defaultDisplayFields, defaultFormFields } from './utils';
7
7
  const AccountInfo = ({ user, onAccountUpdate, displayFields = defaultDisplayFields, formFields = defaultFormFields }) => {
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useCallback } from 'react';
2
2
  import { useUi, Text } from '@weareconceptstudio/core';
3
3
  import { FormBuilder } from '@weareconceptstudio/form';
4
- import { AccountButton, WarningMessageForPopup } from '../../../components';
4
+ import { AccountButton, WarningMessageForPopup } from '../../../../components';
5
5
  import AccountPasswordStyle from './style';
6
6
  import { defaultFormFields } from './utils';
7
7
  const AccountPassword = ({ formFields = defaultFormFields, onPasswordUpdate }) => {
@@ -0,0 +1,2 @@
1
+ export { default as AccountTemplate } from './AccountTemplate';
2
+ export { default as AccountSettingsTemplate } from './AccountSettingsTemplate';
@@ -0,0 +1,2 @@
1
+ export { default as AccountTemplate } from './AccountTemplate';
2
+ export { default as AccountSettingsTemplate } from './AccountSettingsTemplate';
@@ -2,7 +2,7 @@ import React, { memo as Memo, useState, useCallback } from 'react';
2
2
  import { useUi, Text } from '@weareconceptstudio/core';
3
3
  import { FormBuilder } from '@weareconceptstudio/form';
4
4
  import { useAddressContext } from '../AddressProvider';
5
- import AccountButton from '../../../components/ui/AccountButton';
5
+ import AccountButton from '../../../components/AccountButton';
6
6
  //* Icons
7
7
  import { CheckboxIcon, CheckboxCheckedIcon } from '../../../utils/icons';
8
8
  //* Style
@@ -3,13 +3,13 @@ import { Text, useUi } from '@weareconceptstudio/core';
3
3
  import { useAddressContext } from '../AddressProvider';
4
4
  //* Components
5
5
  import AddressForm from '../AddressForm';
6
- import AccountButton from '../../../components/ui/AccountButton';
7
- import WarningMessageForPopup from '../../../components/ui/WarningMessageForPopup';
6
+ import AccountButton from '../../../components/AccountButton';
7
+ import WarningMessageForPopup from '../../../components/WarningMessageForPopup';
8
8
  //* Style
9
9
  import AddressItemStyle from './style';
10
10
  const AddressItem = ({ type, title, data, checkout_review, select_address, onClick }) => {
11
11
  const { openPopup } = useUi();
12
- const { deleteAddress, selectedAddresses, setSelectedAddresses } = useAddressContext();
12
+ const { deleteAddress, selectedAddresses, selectAddress } = useAddressContext();
13
13
  //! Handle Popups
14
14
  const handleDeletePopup = useCallback(() => {
15
15
  openPopup(React.createElement(WarningMessageForPopup, { isDelete: true, title: 'deleteAddressMessage', description: 'confirmDeleteAddress', onRemove: () => deleteAddress(data.id, data.type) }), { className: 'messagePopup' });
@@ -29,7 +29,7 @@ const AddressItem = ({ type, title, data, checkout_review, select_address, onCli
29
29
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: `${data.city}` }),
30
30
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 phone col-wrap`, text: `${data.phone}` })),
31
31
  data.is_default ? (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 margin-style is-default`, text: `${type === 'shipping' ? 'defaultShippingAddress' : type == 'billing' ? 'defaultBillingAddress' : 'defaultAddress'}` })) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 margin-style opacity-zero`, text: `empty` })),
32
- select_address && (React.createElement("div", { className: `circle-selected-wrap cursor-pointer ${selectedAddresses?.id === data.id ? 'active' : ''}`, onClick: () => setSelectedAddresses(data) },
32
+ select_address && (React.createElement("div", { className: `circle-selected-wrap cursor-pointer ${selectedAddresses?.id === data.id ? 'active' : ''}`, onClick: () => selectAddress(data) },
33
33
  React.createElement("svg", { version: '1.1', viewBox: '0 0 32 32', xmlns: 'http://www.w3.org/2000/svg', className: `checkbox-icon ${selectedAddresses?.id === data.id ? 'selected' : 'note-selected'}` },
34
34
  React.createElement("path", { d: 'M13.345 30.462c-1.062 0-1.859-0.531-2.39-1.328l-9.56-16.996c-0.797-1.328-0.266-2.921 1.062-3.718 1.328-0.531 2.921 0 3.718 1.328l7.436 13.012 12.481-20.183c0.797-1.328 2.39-1.593 3.718-0.797s1.593 2.39 0.797 3.718l-14.871 23.635c-0.531 0.797-1.328 1.328-2.39 1.328z' }))))),
35
35
  !checkout_review && (React.createElement("div", { className: `edit-remove-wrapper` },
@@ -1,8 +1,9 @@
1
1
  export function useAddressContext(): any;
2
- export function AddressProvider({ addressType, addressFormFields, useUser, children }: {
2
+ export function AddressProvider({ addressType, addressFormFields, useUser, useCart, children }: {
3
3
  addressType: any;
4
4
  addressFormFields?: any[];
5
5
  useUser: any;
6
+ useCart: any;
6
7
  children: any;
7
8
  }): React.JSX.Element;
8
9
  import React from 'react';
@@ -5,19 +5,21 @@ export const useAddressContext = () => {
5
5
  const context = useContext(AddressContext);
6
6
  return context;
7
7
  };
8
- export const AddressProvider = ({ addressType, addressFormFields = [], useUser, children }) => {
8
+ export const AddressProvider = ({ addressType, addressFormFields = [], useUser, useCart, children }) => {
9
9
  const userContext = useUser();
10
+ const cartContext = useCart();
10
11
  const [addressLoading, setAddressLoading] = useState(true);
11
12
  const [addresses, setAddresses] = useState(addressType ? { billing: [], shipping: [] } : []);
12
13
  const [selectedAddresses, setSelectedAddresses] = useState(addressType ? { billing: {}, shipping: {} } : {});
14
+ const [checkoutAddressId, setCheckoutAddressId] = useState(null);
13
15
  const hasAddressType = useMemo(() => {
14
16
  return !!addressType;
15
17
  }, [addressType]);
16
18
  const hasCheckoutAddress = useMemo(() => {
17
19
  if (hasAddressType) {
18
- return !(addresses.shipping.length > 0 && addresses.billing.length > 0);
20
+ return addresses.shipping.length > 0 && addresses.billing.length > 0;
19
21
  }
20
- return !(addresses.length > 0);
22
+ return addresses.length > 0;
21
23
  }, [hasAddressType, addresses]);
22
24
  useEffect(() => {
23
25
  if (userContext.isLoggedIn) {
@@ -54,6 +56,11 @@ export const AddressProvider = ({ addressType, addressFormFields = [], useUser,
54
56
  setAddresses(res.data);
55
57
  });
56
58
  };
59
+ const selectAddress = (data) => {
60
+ setSelectedAddresses(data);
61
+ setCheckoutAddressId(data.id);
62
+ cartContext.getCart({ addressId: data.id });
63
+ };
57
64
  return (React.createElement(AddressContext.Provider, { value: {
58
65
  addressLoading,
59
66
  hasAddressType,
@@ -65,5 +72,7 @@ export const AddressProvider = ({ addressType, addressFormFields = [], useUser,
65
72
  selectedAddresses,
66
73
  setSelectedAddresses,
67
74
  hasCheckoutAddress,
75
+ selectAddress,
76
+ checkoutAddressId,
68
77
  } }, children));
69
78
  };
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import classNames from 'classnames';
3
3
  import { useAddressContext } from '../AddressProvider';
4
4
  import { Text, useUi } from '@weareconceptstudio/core';
5
- import AccountButton from '../../../components/ui/AccountButton';
5
+ import AccountButton from '../../../components/AccountButton';
6
6
  import EmptyAddress from '../EmptyAddress';
7
7
  import AddressItem from '../AddressItem';
8
8
  import AddressForm from '../AddressForm';
@@ -3,7 +3,7 @@ import { useAddressContext } from '../AddressProvider';
3
3
  import { Text, useUi } from '@weareconceptstudio/core';
4
4
  import AddressForm from '../AddressForm';
5
5
  import AddressItem from '../AddressItem';
6
- import AccountButton from '../../../components/ui/AccountButton';
6
+ import AccountButton from '../../../components/AccountButton';
7
7
  import SelectAddressStyle from './style';
8
8
  const SelectAddress = ({ type, title }) => {
9
9
  const { openPopup } = useUi();
@@ -2,7 +2,7 @@ import React, { memo as Memo } from 'react';
2
2
  import { useUi } from '@weareconceptstudio/core';
3
3
  //* Components
4
4
  import SelectAddress from '../SelectAddress';
5
- import AccountButton from '../../../components/ui/AccountButton';
5
+ import AccountButton from '../../../components/AccountButton';
6
6
  //* Style
7
7
  import SelectShippingBillingStyle from './style';
8
8
  const SelectShippingBillingPopup = Memo(({ title, type }) => {
@@ -3,6 +3,7 @@ export { default as AddressesTemplate } from "./AddressesTemplate";
3
3
  export { default as AddressWrap } from "./AddressWrap";
4
4
  export { default as AddressForm } from "./AddressForm";
5
5
  export { default as AddressItem } from "./AddressItem";
6
+ export { default as SelectAddress } from "./SelectAddress";
6
7
  export { default as ShippingBillingInfo } from "./ShippingBillingInfo";
7
8
  export { default as ShippingBillingForm } from "./ShippingBillingForm";
8
9
  export { default as SelectShippingBilling } from "./SelectShippingBilling";
@@ -3,6 +3,7 @@ export { default as AddressesTemplate } from './AddressesTemplate';
3
3
  export { default as AddressWrap } from './AddressWrap';
4
4
  export { default as AddressForm } from './AddressForm';
5
5
  export { default as AddressItem } from './AddressItem';
6
+ export { default as SelectAddress } from './SelectAddress';
6
7
  export { default as ShippingBillingInfo } from './ShippingBillingInfo';
7
8
  export { default as ShippingBillingForm } from './ShippingBillingForm';
8
9
  export { default as SelectShippingBilling } from './SelectShippingBilling';
@@ -1,7 +1,7 @@
1
1
  import React, { useRef, useState } from 'react';
2
2
  import { Text, Link, Page } from '@weareconceptstudio/core';
3
3
  import { Form, Input } from '@weareconceptstudio/form';
4
- import { AccountButton, WarningMessage } from '../../components';
4
+ import { AccountButton, WarningMessage } from '../../../components';
5
5
  import ForgotPasswordTemplateStyle from './style';
6
6
  const ForgotPasswordTemplate = ({ onFormSubmit }) => {
7
7
  //! Ref
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import { Text, Link, Page } from '@weareconceptstudio/core';
3
3
  import { FormBuilder } from '@weareconceptstudio/form';
4
- import { AccountButton } from '../../components';
4
+ import { AccountButton } from '../../../components';
5
5
  import ResetPasswordTemplateStyle from './style';
6
6
  import { defaultFormFields } from './utils';
7
7
  // @ts-ignore
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Text, Link, Page } from '@weareconceptstudio/core';
3
3
  import { FormBuilder } from '@weareconceptstudio/form';
4
- import { AccountButton } from '../../components';
4
+ import { AccountButton } from '../../../components';
5
5
  import SignInTemplateStyle from './style';
6
6
  import { defaultFormFields } from './utils';
7
7
  // @ts-ignore
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from 'react';
2
2
  import { Text, useTranslation, Link, Page } from '@weareconceptstudio/core';
3
3
  import { FormBuilder } from '@weareconceptstudio/form';
4
- import { AccountButton, CustomCheckbox } from '../../components';
4
+ import { AccountButton, CustomCheckbox } from '../../../components';
5
5
  import SignUpTemplateStyle from './style';
6
6
  import { defaultFormFields } from './utils';
7
7
  // @ts-ignore
@@ -1,7 +1,7 @@
1
1
  import React, { useState, useCallback, useRef } from 'react';
2
2
  import { Page, Text, useTranslation, useUi } from '@weareconceptstudio/core';
3
3
  //* Components
4
- import { AccountButton, FormInputCode, WarningMessage, WarningMessageForPopup } from '../../components';
4
+ import { AccountButton, FormInputCode, WarningMessage, WarningMessageForPopup } from '../../../components';
5
5
  //* Style
6
6
  import VerifyEmailAddressTemplateStyle from './style';
7
7
  //TODO: router.push, searchparams, user, verifyAccount, resendVerifyCode, removeAccount, prevRoute
@@ -0,0 +1,5 @@
1
+ export { default as SignInTemplate } from './SignInTemplate';
2
+ export { default as SignUpTemplate } from './SignUpTemplate';
3
+ export { default as ForgotPasswordTemplate } from './ForgotPasswordTemplate';
4
+ export { default as ResetPasswordTemplate } from './ResetPasswordTemplate';
5
+ export { default as VerifyEmailAddressTemplate } from './VerifyEmailAddressTemplate';
@@ -0,0 +1,5 @@
1
+ export { default as SignInTemplate } from './SignInTemplate';
2
+ export { default as SignUpTemplate } from './SignUpTemplate';
3
+ export { default as ForgotPasswordTemplate } from './ForgotPasswordTemplate';
4
+ export { default as ResetPasswordTemplate } from './ResetPasswordTemplate';
5
+ export { default as VerifyEmailAddressTemplate } from './VerifyEmailAddressTemplate';
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { Container, Page } from '@weareconceptstudio/core';
3
- import { EmptyCart, TotalCheckout, AccountButton, SimpleCartItems } from '../../components';
4
- import { useAccountContext } from '../../AccountProvider';
3
+ import { SimpleCartItems, EmptyCart } from '..';
4
+ import { TotalCheckout, AccountButton } from '../../../components';
5
+ import { useAccountContext } from '../../../AccountProvider';
5
6
  //* Styles
6
7
  import CartTemplateStyle from './style';
7
8
  const CartTemplate = ({ items, itemsCount, shippingCost, loading, children, subtotal, total, actions, btnDisabled, checkoutUrl = '/checkout/' }) => {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { Text } from '@weareconceptstudio/core';
3
- import AccountButton from '../../ui/AccountButton';
3
+ import { AccountButton } from '../../../components';
4
4
  //* Style
5
5
  import EmptyCartStyle from './style';
6
6
  const EmptyCart = ({ shoppingUrl }) => {
@@ -1,8 +1,8 @@
1
1
  import React, { memo, useMemo } from 'react';
2
2
  import { Image, Text } from '@weareconceptstudio/core';
3
3
  import { Select } from '@weareconceptstudio/form';
4
- import { handlePriceCheckFunc } from '../../../../../utils/_functions';
5
- import Button from '../../../../ui/AccountButton';
4
+ import { handlePriceCheckFunc } from '../../../../utils/_functions';
5
+ import { AccountButton } from '../../../../components';
6
6
  //TODO: Fake
7
7
  const pathname = '/cart/';
8
8
  const Item = memo(({ data, remove, select, isLast, actions, maxQty, currency }) => {
@@ -22,7 +22,7 @@ const Item = memo(({ data, remove, select, isLast, actions, maxQty, currency })
22
22
  React.createElement("div", { className: `image-wrapper` },
23
23
  React.createElement(Image, { src: data.product.image.src, alt: data.product.image.alt })),
24
24
  React.createElement("div", { className: `col-1-right-wrap` },
25
- React.createElement(Button, { text: data.product.name, btnType: `green-large-text`, url: `/menu/${data.product.slug}`, className: `capitalize title-btn`, target: pathname === '/cart/' || pathname === '/checkout' ? '_blank' : '_self' }),
25
+ React.createElement(AccountButton, { text: data.product.name, btnType: `green-large-text`, url: `/menu/${data.product.slug}`, className: `capitalize title-btn`, target: pathname === '/cart/' || pathname === '/checkout' ? '_blank' : '_self' }),
26
26
  React.createElement("div", { className: `right-first-item-wrap` },
27
27
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1`, text: data.product.short_info_1 })),
28
28
  React.createElement("div", { className: `right-second-item-wrap` },
@@ -40,7 +40,7 @@ const Item = memo(({ data, remove, select, isLast, actions, maxQty, currency })
40
40
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right cart-sale-total`, text: `${data.sale_total} ${currency}` }),
41
41
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right cart-total1`, text: handlePriceCheckFunc(data.product.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right cart-total2`, text: `${data.total} ${currency}` }))),
42
42
  React.createElement("div", { className: `favorite-and-remove-wrap` }, remove && (React.createElement("div", { className: `remove-btn-wrap` },
43
- React.createElement(Button, { text: 'remove', btnType: `green-small-text`, className: 'cart-remove-btn', onClick: () => actions.delete({ productId: data.product?.id }) }))))))),
43
+ React.createElement(AccountButton, { text: 'remove', btnType: `green-small-text`, className: 'cart-remove-btn', onClick: () => actions.delete({ productId: data.product?.id }) }))))))),
44
44
  isLast ? React.createElement("div", { className: 'line' }) : null));
45
45
  });
46
46
  export default Item;
@@ -1,8 +1,8 @@
1
1
  import React, { memo, useMemo } from 'react';
2
2
  import { Image, Text } from '@weareconceptstudio/core';
3
3
  import { Select } from '@weareconceptstudio/form';
4
- import Button from '../../../../ui/AccountButton';
5
- import { handlePriceCheckFunc } from '../../../../../utils/_functions';
4
+ import { AccountButton } from '../../../../components';
5
+ import { handlePriceCheckFunc } from '../../../../utils/_functions';
6
6
  //TODO: Fake
7
7
  const pathname = '/cart/';
8
8
  const ItemMobile = memo(({ data, remove, select, actions, maxQty, currency }) => {
@@ -21,7 +21,7 @@ const ItemMobile = memo(({ data, remove, select, actions, maxQty, currency }) =>
21
21
  React.createElement("div", { className: `mobile-image-wrap` },
22
22
  React.createElement(Image, { src: data.product.image.src, alt: data.product.image.alt })),
23
23
  React.createElement("div", { className: `mobile-info-wrap` },
24
- React.createElement(Button, { text: data.product.name, btnType: `green-large-text`, url: `/menu/${data.product.slug}`, className: `capitalize mobile-info-wrap-title`, target: pathname === '/cart/' || pathname === '/checkout/' ? '_blank' : '_self' }),
24
+ React.createElement(AccountButton, { text: data.product.name, btnType: `green-large-text`, url: `/menu/${data.product.slug}`, className: `capitalize mobile-info-wrap-title`, target: pathname === '/cart/' || pathname === '/checkout/' ? '_blank' : '_self' }),
25
25
  React.createElement("div", { className: 'mobile-info-item' },
26
26
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 mobile-short-info1`, text: data.product.short_info_1 })),
27
27
  React.createElement("div", { className: 'mobile-info-item' },
@@ -48,7 +48,7 @@ const ItemMobile = memo(({ data, remove, select, actions, maxQty, currency }) =>
48
48
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through mobile-total-price`, text: handlePriceCheckFunc(data.product.price * data.qty, currency) }))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 mobile-total-price2`, text: `${data.total} ${currency}` }))))),
49
49
  pathname === '/cart/' && (React.createElement("div", { className: `edit-remove-favorite-mobile-wrap` },
50
50
  React.createElement("div", { className: 'empty' }),
51
- React.createElement("div", { className: `favorite-remove-mobile-wrap` }, remove && (React.createElement(Button, { text: 'remove', btnType: `green-small-text`, onClick: () => actions.delete({ productId: data.product.id }) })))))),
51
+ React.createElement("div", { className: `favorite-remove-mobile-wrap` }, remove && (React.createElement(AccountButton, { text: 'remove', btnType: `green-small-text`, onClick: () => actions.delete({ productId: data.product.id }) })))))),
52
52
  React.createElement("div", { className: 'line' })));
53
53
  });
54
54
  export default ItemMobile;
@@ -3,8 +3,8 @@ import { Text, useUi } from '@weareconceptstudio/core';
3
3
  //* Components
4
4
  import Item from './Item';
5
5
  import ItemMobile from './ItemMobile';
6
- import Button from '../../../ui/AccountButton';
7
- import { useAccountContext } from '../../../../AccountProvider';
6
+ import { AccountButton } from '../../../components';
7
+ import { useAccountContext } from '../../../AccountProvider';
8
8
  //* Style
9
9
  import CartItemsStyle from './style';
10
10
  const CartItems = memo(({ data, className, title, smallFontSize, additionalParameters, actions }) => {
@@ -35,7 +35,7 @@ const CartItems = memo(({ data, className, title, smallFontSize, additionalParam
35
35
  return (React.createElement(CartItemsStyle, { className: className || '' },
36
36
  additionalParameters.edit.list ? (React.createElement("div", { className: `title-edit-wrapper` },
37
37
  React.createElement(Text, { className: `account-p ${smallFontSize ? 'account-p2' : 'account-p1'} account-font-bold account-primary-color1 cart-items-title2-version`, text: title }),
38
- React.createElement(Button, { url: '/cart/', text: `editCart`, btnType: `green-small-text`, className: 'cart-items-edit-btn' }))) : (React.createElement(Text, { className: `account-p ${smallFontSize ? 'account-p2' : 'account-p1'} account-font-bold account-primary-color1 cart-items-title1-version`, text: title })),
38
+ React.createElement(AccountButton, { url: '/cart/', text: `editCart`, btnType: `green-small-text`, className: 'cart-items-edit-btn' }))) : (React.createElement(Text, { className: `account-p ${smallFontSize ? 'account-p2' : 'account-p1'} account-font-bold account-primary-color1 cart-items-title1-version`, text: title })),
39
39
  additionalParameters.horizontalLine ? React.createElement("div", { className: `order-items-line` }) : null,
40
40
  orderStore));
41
41
  });
@@ -0,0 +1,3 @@
1
+ export { default as EmptyCart } from './EmptyCart';
2
+ export { default as SimpleCartItems } from './SimpleItems';
3
+ export { default as CartTemplate } from './CartTemplate';
@@ -0,0 +1,3 @@
1
+ export { default as EmptyCart } from './EmptyCart';
2
+ export { default as SimpleCartItems } from './SimpleItems';
3
+ export { default as CartTemplate } from './CartTemplate';
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
- import { SelectShippingBilling, useAddressContext } from '../../../modules';
3
- import SelectAddress from '../../../modules/address/SelectAddress';
4
- import { SimpleCartItems } from '../../../components';
2
+ import { SelectShippingBilling, useAddressContext, SelectAddress } from '../../../address';
3
+ import { SimpleCartItems } from '../../../cart';
5
4
  const StepReview = ({ items }) => {
6
5
  const { hasAddressType } = useAddressContext();
7
6
  return (React.createElement("div", { className: 'step-review' },
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from 'react';
2
- import { AddressItem, ShippingBillingForm, useAddressContext } from '../../../modules';
3
- import { CustomCheckbox } from '../../../components';
2
+ import { AddressItem, ShippingBillingForm, useAddressContext } from '../../../address';
3
+ import { CustomCheckbox } from '../../../../components';
4
4
  const StepShipping = ({ firstStepFormRef }) => {
5
5
  const [hide, setHide] = useState();
6
6
  const { hasAddressType } = useAddressContext();
@@ -1,12 +1,13 @@
1
1
  import React, { useCallback, useRef, useState } from 'react';
2
2
  import { api, Container, Page } from '@weareconceptstudio/core';
3
- import { Sequence, TotalCheckout } from '../../components';
4
- import { useAddressContext } from '../../modules';
3
+ import { Sequence, TotalCheckout } from '../../../components';
4
+ import { useAddressContext } from '../../address';
5
5
  import StepReview from './StepReview';
6
6
  import StepShipping from './StepShipping';
7
7
  //* Styles
8
8
  import CheckoutTemplateStyle from './style';
9
9
  const CheckoutTemplate = ({ itemsCount, items, total, subtotal, shippingCost }) => {
10
+ const { checkoutAddressId } = useAddressContext();
10
11
  const [checkoutData, setCheckoutData] = useState({
11
12
  note: '',
12
13
  paymentType: 'cash_on_delivery',
@@ -20,14 +21,19 @@ const CheckoutTemplate = ({ itemsCount, items, total, subtotal, shippingCost })
20
21
  const { hasCheckoutAddress, addressLoading } = useAddressContext();
21
22
  const firstStepFormRef = useRef();
22
23
  const checkStep = {
23
- isShipping: hasCheckoutAddress,
24
- isReview: !hasCheckoutAddress,
24
+ isShipping: !hasCheckoutAddress,
25
+ isReview: hasCheckoutAddress,
25
26
  };
26
27
  const handleCheckoutFirstStep = () => {
27
28
  firstStepFormRef.current.submit();
28
29
  };
29
30
  const handleCheckoutSecondStep = async () => {
30
- return await api.post('checkout', checkoutData).then((res) => {
31
+ return await api
32
+ .post('checkout', {
33
+ ...checkoutData,
34
+ addressId: checkoutAddressId,
35
+ })
36
+ .then((res) => {
31
37
  if (res.redirect_url) {
32
38
  window.location.href = res.redirect_url;
33
39
  }
@@ -1,10 +1,9 @@
1
1
  'use client';
2
2
  import React, { useEffect } from 'react';
3
3
  import { Page, Text, Container, useTranslation } from '@weareconceptstudio/core';
4
- import { Sequence } from '../../components';
5
- import Button from '../../components/ui/AccountButton';
4
+ import { Sequence, Button } from '../../../components';
6
5
  import ThankYouMessageStyle from './style';
7
- import { useAccountContext } from '../../AccountProvider';
6
+ import { useAccountContext } from '../../../AccountProvider';
8
7
  import { confirmImage } from './icons';
9
8
  const ThankYouTemplate = ({ orderNumber }) => {
10
9
  const { shopUrl, useCart } = useAccountContext();
@@ -0,0 +1,2 @@
1
+ export { default as CheckoutTemplate } from './CheckoutTemplate';
2
+ export { default as ThankYouTemplate } from './ThankYouTemplate';
@@ -0,0 +1,2 @@
1
+ export { default as CheckoutTemplate } from './CheckoutTemplate';
2
+ export { default as ThankYouTemplate } from './ThankYouTemplate';
@@ -1 +1,6 @@
1
+ export * from "./account";
1
2
  export * from "./address";
3
+ export * from "./auth";
4
+ export * from "./cart";
5
+ export * from "./checkout";
6
+ export * from "./order";
@@ -1 +1,6 @@
1
+ export * from './account';
1
2
  export * from './address';
3
+ export * from './auth';
4
+ export * from './cart';
5
+ export * from './checkout';
6
+ export * from './order';
@@ -1,7 +1,7 @@
1
1
  import React, { memo as Memo } from 'react';
2
- import { useAccountContext } from '../../AccountProvider';
2
+ import { useAccountContext } from '../../../AccountProvider';
3
3
  import { Text } from '@weareconceptstudio/core';
4
- import AccountButton from '../ui/AccountButton';
4
+ import { AccountButton } from '../../../components';
5
5
  import EmptyOrdersStyle from './style';
6
6
  const EmptyOrders = Memo(() => {
7
7
  const { shopUrl } = useAccountContext();
@@ -1,11 +1,9 @@
1
1
  import React, { memo } from 'react';
2
2
  import { Text, useTranslation } from '@weareconceptstudio/core';
3
- //* Utils
4
- import { handlePriceCheckFunc, numToLocalString } from '../../utils/_functions';
5
- //* Style
3
+ import { useAccountContext } from '../../../AccountProvider';
4
+ import { handlePriceCheckFunc, numToLocalString } from '../../../utils/_functions';
6
5
  import OrderDetailsStyle from './style';
7
- import { useAccountContext } from '../../AccountProvider';
8
- const OrderDetails = memo(({ className, status, date, delivery_date, orderNumber, itemsCount, total, shippingCost }) => {
6
+ const OrderDetails = memo(({ className, status, date, orderNumber, itemsCount, total, shippingCost }) => {
9
7
  const { translate } = useTranslation();
10
8
  const { currency } = useAccountContext();
11
9
  return (React.createElement(OrderDetailsStyle, { className: `${className || ''}` },
@@ -21,11 +19,6 @@ const OrderDetails = memo(({ className, status, date, delivery_date, orderNumber
21
19
  translate('orderDate'),
22
20
  ":"),
23
21
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: date })),
24
- React.createElement("div", { className: `order-detail-item-wrap` },
25
- React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
26
- translate('deliverDate'),
27
- ":"),
28
- React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: delivery_date })),
29
22
  React.createElement("div", { className: `order-detail-item-wrap` },
30
23
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
31
24
  translate('orderNumber'),
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { OrdersList } from '../../components';
2
+ import OrdersList from '../OrdersList';
3
3
  import OrderHistoryTemplateStyle from './style';
4
4
  const OrderHistoryTemplate = () => {
5
5
  return (React.createElement(OrderHistoryTemplateStyle, null,