@weareconceptstudio/account 0.0.0 → 0.0.2
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/AccountConfig.d.ts +5 -0
- package/dist/AccountConfig.js +21 -0
- package/dist/components/AccountButton/index.d.ts +3 -0
- package/dist/components/AccountButton/index.js +22 -0
- package/dist/components/AccountButton/style.d.ts +2 -0
- package/dist/components/AccountButton/style.js +249 -0
- package/dist/components/AddressForm/index.d.ts +3 -0
- package/dist/components/AddressForm/index.js +100 -0
- package/dist/components/AddressForm/style.d.ts +2 -0
- package/dist/components/AddressForm/style.js +180 -0
- package/dist/components/AddressItem/index.d.ts +3 -0
- package/dist/components/AddressItem/index.js +41 -0
- package/dist/components/AddressItem/style.d.ts +2 -0
- package/dist/components/AddressItem/style.js +191 -0
- package/dist/components/CustomCheckbox/index.d.ts +7 -0
- package/dist/components/CustomCheckbox/index.js +15 -0
- package/dist/components/CustomCheckbox/style.d.ts +2 -0
- package/dist/components/CustomCheckbox/style.js +85 -0
- package/dist/components/EmptyCart/index.d.ts +5 -0
- package/dist/components/EmptyCart/index.js +14 -0
- package/dist/components/EmptyCart/style.d.ts +2 -0
- package/dist/components/EmptyCart/style.js +62 -0
- package/dist/components/EmptyOrders/index.d.ts +3 -0
- package/dist/components/EmptyOrders/index.js +12 -0
- package/dist/components/EmptyOrders/style.d.ts +2 -0
- package/dist/components/EmptyOrders/style.js +46 -0
- package/dist/components/FormInputCode/index.d.ts +24 -0
- package/dist/components/FormInputCode/index.js +145 -0
- package/dist/components/FormInputCode/style.d.ts +2 -0
- package/dist/components/FormInputCode/style.js +109 -0
- package/dist/components/OrderDetails/index.d.ts +3 -0
- package/dist/components/OrderDetails/index.js +48 -0
- package/dist/components/OrderDetails/style.d.ts +2 -0
- package/dist/components/OrderDetails/style.js +90 -0
- package/dist/components/OrderedItems/ReviewPopup/index.d.ts +0 -0
- package/dist/components/OrderedItems/ReviewPopup/index.js +202 -0
- package/dist/components/OrderedItems/ReviewPopup/style.d.ts +2 -0
- package/dist/components/OrderedItems/ReviewPopup/style.js +329 -0
- package/dist/components/OrderedItems/index.d.ts +7 -0
- package/dist/components/OrderedItems/index.js +108 -0
- package/dist/components/OrderedItems/style.d.ts +2 -0
- package/dist/components/OrderedItems/style.js +783 -0
- package/dist/components/OrdersList/OrderItem/index.d.ts +3 -0
- package/dist/components/OrdersList/OrderItem/index.js +21 -0
- package/dist/components/OrdersList/index.d.ts +10 -0
- package/dist/components/OrdersList/index.js +68 -0
- package/dist/components/OrdersList/style.d.ts +2 -0
- package/dist/components/OrdersList/style.js +373 -0
- package/dist/components/Pagination/index.d.ts +3 -0
- package/dist/components/Pagination/index.js +18 -0
- package/dist/components/Pagination/style.d.ts +2 -0
- package/dist/components/Pagination/style.js +72 -0
- package/dist/components/SelectShippingBilling/index.d.ts +3 -0
- package/dist/components/SelectShippingBilling/index.js +31 -0
- package/dist/components/SelectShippingBilling/style.d.ts +2 -0
- package/dist/components/SelectShippingBilling/style.js +112 -0
- package/dist/components/Sequence/index.d.ts +5 -0
- package/dist/components/Sequence/index.js +65 -0
- package/dist/components/Sequence/style.d.ts +2 -0
- package/dist/components/Sequence/style.js +317 -0
- package/dist/components/ShippingBillingForm/index.d.ts +3 -0
- package/dist/components/ShippingBillingForm/index.js +96 -0
- package/dist/components/ShippingBillingForm/style.d.ts +2 -0
- package/dist/components/ShippingBillingForm/style.js +77 -0
- package/dist/components/ShippingBillingInfo/index.d.ts +3 -0
- package/dist/components/ShippingBillingInfo/index.js +22 -0
- package/dist/components/ShippingBillingInfo/style.d.ts +2 -0
- package/dist/components/ShippingBillingInfo/style.js +98 -0
- package/dist/components/TotalCheckout/index.d.ts +3 -0
- package/dist/components/TotalCheckout/index.js +49 -0
- package/dist/components/TotalCheckout/style.d.ts +2 -0
- package/dist/components/TotalCheckout/style.js +211 -0
- package/dist/components/WarningMessage/index.d.ts +3 -0
- package/dist/components/WarningMessage/index.js +10 -0
- package/dist/components/WarningMessage/style.d.ts +2 -0
- package/dist/components/WarningMessage/style.js +34 -0
- package/dist/components/WarningMessageForPopup/index.d.ts +3 -0
- package/dist/components/WarningMessageForPopup/index.js +31 -0
- package/dist/components/WarningMessageForPopup/style.d.ts +2 -0
- package/dist/components/WarningMessageForPopup/style.js +82 -0
- package/dist/components/index.d.ts +18 -0
- package/dist/components/index.js +18 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -0
- package/dist/styles/helperClass.d.ts +2 -0
- package/dist/styles/helperClass.js +278 -0
- package/dist/styles/theme.d.ts +2 -0
- package/dist/styles/theme.js +63 -0
- package/dist/styles/typography.d.ts +2 -0
- package/dist/styles/typography.js +129 -0
- package/dist/styles/variables.d.ts +2 -0
- package/dist/styles/variables.js +401 -0
- package/dist/templates/AccountSettingsTemplate/AccountInfo/index.d.ts +38 -0
- package/dist/templates/AccountSettingsTemplate/AccountInfo/index.js +37 -0
- package/dist/templates/AccountSettingsTemplate/AccountInfo/style.d.ts +2 -0
- package/dist/templates/AccountSettingsTemplate/AccountInfo/style.js +165 -0
- package/dist/templates/AccountSettingsTemplate/AccountInfo/utils.d.ts +32 -0
- package/dist/templates/AccountSettingsTemplate/AccountInfo/utils.js +45 -0
- package/dist/templates/AccountSettingsTemplate/AccountPassword/index.d.ts +15 -0
- package/dist/templates/AccountSettingsTemplate/AccountPassword/index.js +36 -0
- package/dist/templates/AccountSettingsTemplate/AccountPassword/style.d.ts +2 -0
- package/dist/templates/AccountSettingsTemplate/AccountPassword/style.js +141 -0
- package/dist/templates/AccountSettingsTemplate/AccountPassword/utils.d.ts +10 -0
- package/dist/templates/AccountSettingsTemplate/AccountPassword/utils.js +22 -0
- package/dist/templates/AccountSettingsTemplate/index.d.ts +11 -0
- package/dist/templates/AccountSettingsTemplate/index.js +10 -0
- package/dist/templates/AccountSettingsTemplate/style.d.ts +2 -0
- package/dist/templates/AccountSettingsTemplate/style.js +37 -0
- package/dist/templates/AccountTemplate/index.d.ts +8 -0
- package/dist/templates/AccountTemplate/index.js +32 -0
- package/dist/templates/AccountTemplate/style.d.ts +2 -0
- package/dist/templates/AccountTemplate/style.js +293 -0
- package/dist/templates/AddressesTemplate/index.d.ts +3 -0
- package/dist/templates/AddressesTemplate/index.js +21 -0
- package/dist/templates/AddressesTemplate/style.d.ts +2 -0
- package/dist/templates/AddressesTemplate/style.js +89 -0
- package/dist/templates/CartTemplate/index.d.ts +3 -0
- package/dist/templates/CartTemplate/index.js +23 -0
- package/dist/templates/CartTemplate/style.d.ts +2 -0
- package/dist/templates/CartTemplate/style.js +37 -0
- package/dist/templates/CheckoutTemplate/index.d.ts +9 -0
- package/dist/templates/CheckoutTemplate/index.js +155 -0
- package/dist/templates/CheckoutTemplate/style.d.ts +2 -0
- package/dist/templates/CheckoutTemplate/style.js +173 -0
- package/dist/templates/ForgotPasswordTemplate/index.d.ts +5 -2
- package/dist/templates/ForgotPasswordTemplate/index.js +86 -3
- package/dist/templates/ForgotPasswordTemplate/style.d.ts +2 -0
- package/dist/templates/ForgotPasswordTemplate/style.js +186 -0
- package/dist/templates/OrderHistoryTemplate/index.d.ts +7 -0
- package/dist/templates/OrderHistoryTemplate/index.js +9 -0
- package/dist/templates/OrderHistoryTemplate/style.d.ts +2 -0
- package/dist/templates/OrderHistoryTemplate/style.js +3 -0
- package/dist/templates/OrderIndividualTemplate/index.d.ts +5 -0
- package/dist/templates/OrderIndividualTemplate/index.js +21 -0
- package/dist/templates/OrderIndividualTemplate/style.d.ts +2 -0
- package/dist/templates/OrderIndividualTemplate/style.js +3 -0
- package/dist/templates/ResetPasswordTemplate/index.d.ts +7 -2
- package/dist/templates/ResetPasswordTemplate/index.js +35 -2
- package/dist/templates/ResetPasswordTemplate/style.d.ts +2 -0
- package/dist/templates/ResetPasswordTemplate/style.js +163 -0
- package/dist/templates/SignInTemplate/index.d.ts +5 -2
- package/dist/templates/SignInTemplate/index.js +27 -2
- package/dist/templates/SignInTemplate/style.d.ts +2 -0
- package/dist/templates/SignInTemplate/style.js +168 -0
- package/dist/templates/SignUpTemplate/defaultFormFields.d.ts +11 -0
- package/dist/templates/SignUpTemplate/defaultFormFields.js +42 -0
- package/dist/templates/SignUpTemplate/index.d.ts +6 -2
- package/dist/templates/SignUpTemplate/index.js +33 -3
- package/dist/templates/SignUpTemplate/style.d.ts +2 -0
- package/dist/templates/SignUpTemplate/style.js +175 -0
- package/dist/templates/VerifyEmailAddressTemplate/index.d.ts +3 -0
- package/dist/templates/VerifyEmailAddressTemplate/index.js +105 -0
- package/dist/templates/VerifyEmailAddressTemplate/style.d.ts +2 -0
- package/dist/templates/VerifyEmailAddressTemplate/style.js +165 -0
- package/dist/templates/index.d.ts +8 -0
- package/dist/templates/index.js +11 -0
- package/dist/translations/en.d.ts +257 -0
- package/dist/translations/en.js +256 -0
- package/dist/translations/index.d.ts +259 -0
- package/dist/translations/index.js +2 -0
- package/dist/utils/_functions.d.ts +5 -0
- package/dist/utils/_functions.js +28 -0
- package/dist/utils/icons.d.ts +3 -0
- package/dist/utils/icons.js +27 -0
- package/package.json +5 -6
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const FormInputCodeStyle = styled.section `
|
|
3
|
+
--account_inputWrapMTop: var(--sp7x);
|
|
4
|
+
--account_verifyNumberWrapSize: var(--sp11x);
|
|
5
|
+
--account_itemDistance: var(--sp3x);
|
|
6
|
+
--account_borderRadiusSize: var(--sp1-5x);
|
|
7
|
+
|
|
8
|
+
width: 100%;
|
|
9
|
+
margin-top: var(--account_inputWrapMTop);
|
|
10
|
+
|
|
11
|
+
input[type='tel' i] {
|
|
12
|
+
padding: 0 0 !important;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.react-code-input-container {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-wrap: wrap;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
|
|
20
|
+
.input-item {
|
|
21
|
+
width: var(--account_verifyNumberWrapSize);
|
|
22
|
+
height: var(--account_verifyNumberWrapSize);
|
|
23
|
+
font-family: var(--account_Font);
|
|
24
|
+
font-weight: 700;
|
|
25
|
+
font-size: var(--account_p1) !important;
|
|
26
|
+
line-height: var(--account_lineHeight);
|
|
27
|
+
color: var(--account_primaryColor4);
|
|
28
|
+
text-align: center;
|
|
29
|
+
border: 2px solid var(--account_primaryColor4);
|
|
30
|
+
border-radius: var(--account_borderRadiusSize);
|
|
31
|
+
margin: 0 calc(var(--account_itemDistance) / 2);
|
|
32
|
+
background-color: var(--account_backgroundColor);
|
|
33
|
+
|
|
34
|
+
&:focus {
|
|
35
|
+
color: var(--account_primaryColor1);
|
|
36
|
+
caret-color: var(--account_primaryColor1);
|
|
37
|
+
border: 2px solid var(--account_primaryColor1);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:first-child {
|
|
41
|
+
margin-left: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:last-child {
|
|
45
|
+
margin-right: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.completed {
|
|
49
|
+
color: var(--account_primaryColor1);
|
|
50
|
+
caret-color: var(--account_primaryColor1);
|
|
51
|
+
border: 2px solid var(--account_primaryColor1);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
57
|
+
--account_inputWrapMTop: var(--sp5x);
|
|
58
|
+
--account_verifyNumberWrapSize: var(--sp8x);
|
|
59
|
+
--account_itemDistance: var(--sp2x);
|
|
60
|
+
--account_borderRadiusSize: var(--sp1x);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
64
|
+
--account_inputWrapMTop: var(--sp4x);
|
|
65
|
+
--account_verifyNumberWrapSize: var(--sp7x);
|
|
66
|
+
--account_itemDistance: var(--sp2x);
|
|
67
|
+
--account_borderRadiusSize: var(--sp1x);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
71
|
+
--account_inputWrapMTop: var(--sp4x);
|
|
72
|
+
--account_verifyNumberWrapSize: var(--sp6x);
|
|
73
|
+
--account_itemDistance: var(--sp2x);
|
|
74
|
+
--account_borderRadiusSize: var(--sp0-5x);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
78
|
+
--account_verifyNumberWrapSize: var(--sp6x);
|
|
79
|
+
--account_itemDistance: var(--sp2x);
|
|
80
|
+
--account_borderRadiusSize: var(--sp0-5x);
|
|
81
|
+
--account_inputWrapMTop: var(--sp4x);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
85
|
+
--account_verifyNumberWrapSize: var(--sp6x);
|
|
86
|
+
--account_itemDistance: var(--sp2x);
|
|
87
|
+
--account_inputWrapMTop: var(--sp3x);
|
|
88
|
+
--account_borderRadiusSize: var(--sp0-5x);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
92
|
+
--account_verifyNumberWrapSize: var(--sp6x);
|
|
93
|
+
--account_inputWrapMTop: var(--sp3x);
|
|
94
|
+
--account_itemDistance: var(--sp2x);
|
|
95
|
+
--account_borderRadiusSize: var(--sp0-5x);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
99
|
+
--account_verifyNumberWrapSize: var(--sp6x);
|
|
100
|
+
--account_itemDistance: var(--sp1-5x);
|
|
101
|
+
--account_inputWrapMTop: var(--sp3x);
|
|
102
|
+
--account_borderRadiusSize: var(--sp0-5x);
|
|
103
|
+
|
|
104
|
+
@media only screen and (max-width: 398px) {
|
|
105
|
+
--account_verifyNumberWrapSize: var(--sp5x);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
`;
|
|
109
|
+
export default FormInputCodeStyle;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React, { memo } from 'react';
|
|
2
|
+
import { Text, useTranslation } from '@weareconceptstudio/core';
|
|
3
|
+
//* Utils
|
|
4
|
+
import { handlePriceCheckFunc, numToLocalString } from '../../utils/_functions';
|
|
5
|
+
//* Style
|
|
6
|
+
import OrderDetailsStyle from './style';
|
|
7
|
+
const OrderDetails = memo(({ className, status, order_date, delivery_date, order_number, total_items, total_price, currency, shippingCost }) => {
|
|
8
|
+
const { translate } = useTranslation();
|
|
9
|
+
return (React.createElement(OrderDetailsStyle, { className: `${className || ''}` },
|
|
10
|
+
React.createElement(Text, { className: `account-p account-p1 account-font-bold account-primary-color1`, text: 'orderDetails' }),
|
|
11
|
+
React.createElement("div", { className: `info-space-line` }),
|
|
12
|
+
React.createElement("div", { className: `order-detail-item-wrap` },
|
|
13
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
14
|
+
translate('orderStatus'),
|
|
15
|
+
":"),
|
|
16
|
+
status === 'delivered' ? (React.createElement(Text, { className: `account-p account-p4 account-font-bold account-primary-color1 account-primary-color5-bg status-item value`, text: 'delivered' })) : status === 'canceled' ? (React.createElement(Text, { className: `account-p account-p4 account-font-bold account-error-color account-secondary-color7-bg status-item value`, text: 'canceled' })) : (React.createElement(Text, { className: `account-p account-p4 account-font-bold account-secondary-color1 account-secondary-color8-bg status-item value`, text: 'inProgress' }))),
|
|
17
|
+
React.createElement("div", { className: `order-detail-item-wrap` },
|
|
18
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
19
|
+
translate('orderDate'),
|
|
20
|
+
":"),
|
|
21
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: order_date })),
|
|
22
|
+
React.createElement("div", { className: `order-detail-item-wrap` },
|
|
23
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
24
|
+
translate('deliverDate'),
|
|
25
|
+
":"),
|
|
26
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: delivery_date })),
|
|
27
|
+
React.createElement("div", { className: `order-detail-item-wrap` },
|
|
28
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
29
|
+
translate('orderNumber'),
|
|
30
|
+
":"),
|
|
31
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: order_number })),
|
|
32
|
+
React.createElement("div", { className: `order-detail-item-wrap` },
|
|
33
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
34
|
+
translate('totalItems'),
|
|
35
|
+
":"),
|
|
36
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: total_items })),
|
|
37
|
+
React.createElement("div", { className: `order-detail-item-wrap` },
|
|
38
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
39
|
+
translate('shippingCost'),
|
|
40
|
+
":"),
|
|
41
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value`, text: `${String(shippingCost).toLowerCase() === 'free' || shippingCost === '-' ? shippingCost : `${numToLocalString(shippingCost)} ${currency}`}` })),
|
|
42
|
+
React.createElement("div", { className: `order-detail-item-wrap` },
|
|
43
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1` },
|
|
44
|
+
translate('totalPrice'),
|
|
45
|
+
":"),
|
|
46
|
+
React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1 value` }, handlePriceCheckFunc(total_price, currency)))));
|
|
47
|
+
});
|
|
48
|
+
export default OrderDetails;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default OrderDetailsStyle;
|
|
2
|
+
declare const OrderDetailsStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
const OrderDetailsStyle = styled.section `
|
|
3
|
+
--account_spaceLineMTop: var(--sp3x);
|
|
4
|
+
--account_spaceLineMBot: var(--sp5x);
|
|
5
|
+
--account_statusItemPadTB: var(--sp1x);
|
|
6
|
+
--account_statusItemPadLR: var(--sp2-5x);
|
|
7
|
+
--account_orderDetailItemWrapMTop: var(--sp2x);
|
|
8
|
+
|
|
9
|
+
.info-space-line {
|
|
10
|
+
width: 100%;
|
|
11
|
+
border-bottom: 2px solid var(--account_primaryColor1);
|
|
12
|
+
margin-top: var(--account_spaceLineMTop);
|
|
13
|
+
margin-bottom: var(--account_spaceLineMBot);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.order-detail-item-wrap {
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
|
|
20
|
+
.status-item {
|
|
21
|
+
padding: var(--account_statusItemPadTB) var(--account_statusItemPadLR);
|
|
22
|
+
border-radius: var(--sp5x);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.value {
|
|
26
|
+
margin-left: var(--sp1x);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:not(:first-child) {
|
|
30
|
+
margin-top: var(--account_orderDetailItemWrapMTop);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
|
|
35
|
+
--account_spaceLineMTop: var(--sp2x);
|
|
36
|
+
--account_spaceLineMBot: var(--sp4x);
|
|
37
|
+
--account_statusItemPadTB: var(--sp1x);
|
|
38
|
+
--account_statusItemPadLR: var(--sp2x);
|
|
39
|
+
--account_orderDetailItemWrapMTop: var(--sp1x);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
|
|
43
|
+
--account_spaceLineMTop: var(--sp2x);
|
|
44
|
+
--account_spaceLineMBot: var(--sp4x);
|
|
45
|
+
--account_statusItemPadTB: var(--sp1x);
|
|
46
|
+
--account_statusItemPadLR: var(--sp2x);
|
|
47
|
+
--account_orderDetailItemWrapMTop: var(--sp1x);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
|
|
51
|
+
--account_spaceLineMTop: var(--sp2x);
|
|
52
|
+
--account_spaceLineMBot: var(--sp3x);
|
|
53
|
+
--account_statusItemPadTB: var(--sp1x);
|
|
54
|
+
--account_statusItemPadLR: var(--sp2x);
|
|
55
|
+
--account_orderDetailItemWrapMTop: var(--sp1x);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
|
|
59
|
+
--account_spaceLineMTop: var(--sp2x);
|
|
60
|
+
--account_spaceLineMBot: var(--sp3x);
|
|
61
|
+
--account_statusItemPadTB: var(--sp0-5x);
|
|
62
|
+
--account_statusItemPadLR: var(--sp1x);
|
|
63
|
+
--account_orderDetailItemWrapMTop: var(--sp1x);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
|
|
67
|
+
--account_spaceLineMTop: var(--sp2x);
|
|
68
|
+
--account_spaceLineMBot: var(--sp3x);
|
|
69
|
+
--account_statusItemPadTB: var(--sp0-5x);
|
|
70
|
+
--account_statusItemPadLR: var(--sp1x);
|
|
71
|
+
--account_orderDetailItemWrapMTop: var(--sp1x);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
|
|
75
|
+
--account_spaceLineMTop: var(--sp2x);
|
|
76
|
+
--account_spaceLineMBot: var(--sp2x);
|
|
77
|
+
--account_statusItemPadTB: var(--sp0-5x);
|
|
78
|
+
--account_statusItemPadLR: var(--sp1x);
|
|
79
|
+
--account_orderDetailItemWrapMTop: var(--sp1x);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
|
|
83
|
+
--account_spaceLineMTop: var(--sp2x);
|
|
84
|
+
--account_spaceLineMBot: var(--sp2x);
|
|
85
|
+
--account_statusItemPadTB: var(--sp0-5x);
|
|
86
|
+
--account_statusItemPadLR: var(--sp1x);
|
|
87
|
+
--account_orderDetailItemWrapMTop: var(--sp1x);
|
|
88
|
+
}
|
|
89
|
+
`;
|
|
90
|
+
export default OrderDetailsStyle;
|
|
File without changes
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
// import { memo, useCallback, useMemo, useRef } from 'react';
|
|
2
|
+
// import { Form, Input, Radio } from '@weareconceptstudio/form';
|
|
3
|
+
// //* Contexts
|
|
4
|
+
// import withUIContext from '@/account-authentication/contexts/consumers/UIConsumer';
|
|
5
|
+
// import withLanguageContext from '@/account-authentication/contexts/consumers/LanguageConsumer';
|
|
6
|
+
// //* Helpers
|
|
7
|
+
// import _config from '@/account-authentication/helpers/_config';
|
|
8
|
+
// import { fileToUploadObj } from '@/account-authentication/helpers/_functions';
|
|
9
|
+
// //* Components
|
|
10
|
+
// import Text from '../../Text';
|
|
11
|
+
// import Rate from '../../Rate';
|
|
12
|
+
// import Icon from '../../Icon';
|
|
13
|
+
// import Image from '../../Image';
|
|
14
|
+
// import FormUpload from '../../FormUpload';
|
|
15
|
+
// import CustomLink from '../../CustomLink';
|
|
16
|
+
// import AccountButton from '../../AccountButton';
|
|
17
|
+
// import WarningMessageForPopup from '../../WarningMessageForPopup';
|
|
18
|
+
// //* Style
|
|
19
|
+
// import ReviewPopupStyle from './style';
|
|
20
|
+
// //TODO: Form (ref -> logic), Upload, Radio
|
|
21
|
+
// const ReviewPopup = memo(({ className, orderItemId, product, review, createReview, updateReview, addOrUpdateReview, translate, closePopup, winWidth, openPopup }) => {
|
|
22
|
+
// //! Ref
|
|
23
|
+
// const form = useRef();
|
|
24
|
+
// //! Handle Finish Function
|
|
25
|
+
// const onFinish = useCallback(
|
|
26
|
+
// (values) => {
|
|
27
|
+
// let newValues = {
|
|
28
|
+
// ...values,
|
|
29
|
+
// order_item_id: orderItemId,
|
|
30
|
+
// product_id: product.id,
|
|
31
|
+
// };
|
|
32
|
+
// return (review ? updateReview(review.id, newValues) : createReview(newValues)).then(({ data }) => {
|
|
33
|
+
// addOrUpdateReview(orderItemId, data);
|
|
34
|
+
// closePopup();
|
|
35
|
+
// !review &&
|
|
36
|
+
// openPopup(
|
|
37
|
+
// <WarningMessageForPopup
|
|
38
|
+
// isThankYou
|
|
39
|
+
// title={'thankYouPopupTitle'}
|
|
40
|
+
// description={'thankYouPopupDesc'}
|
|
41
|
+
// />,
|
|
42
|
+
// { className: 'messagePopup' }
|
|
43
|
+
// );
|
|
44
|
+
// });
|
|
45
|
+
// },
|
|
46
|
+
// [orderItemId, product, review]
|
|
47
|
+
// );
|
|
48
|
+
// const initialValues = useMemo(() => {
|
|
49
|
+
// return review
|
|
50
|
+
// ? {
|
|
51
|
+
// ...review,
|
|
52
|
+
// is_recommended: review.is_recommended || '0',
|
|
53
|
+
// images: review.images.map((item) => fileToUploadObj(item)),
|
|
54
|
+
// }
|
|
55
|
+
// : {
|
|
56
|
+
// is_recommended: 1,
|
|
57
|
+
// };
|
|
58
|
+
// }, [review]);
|
|
59
|
+
// return (
|
|
60
|
+
// <ReviewPopupStyle className={`review-popup-wrapper ${className || ''}`}>
|
|
61
|
+
// <Text
|
|
62
|
+
// tag={`h6`}
|
|
63
|
+
// className={`account-h6 account-font-bold account-primary-color1`}
|
|
64
|
+
// text={`writeYourReview`}
|
|
65
|
+
// />
|
|
66
|
+
// <div className={`info-wrap`}>
|
|
67
|
+
// {!(winWidth <= 768) ? (
|
|
68
|
+
// <>
|
|
69
|
+
// <Text className={`account-p account-p3 account-font-regular account-primary-color1`}>
|
|
70
|
+
// {translate('writeYourReviewDesc1')}
|
|
71
|
+
// <CustomLink
|
|
72
|
+
// className={`info-link`}
|
|
73
|
+
// onClick={() => closePopup()}
|
|
74
|
+
// url={_config.routes.productReviewGuidelines.path}
|
|
75
|
+
// content={translate('reviewGuidelinesWithSymbol')}
|
|
76
|
+
// />
|
|
77
|
+
// </Text>
|
|
78
|
+
// <Text className={`account-p account-p3 account-font-regular account-primary-color1`}>
|
|
79
|
+
// {translate('writeYourReviewDesc2')}
|
|
80
|
+
// <CustomLink
|
|
81
|
+
// className={`info-link`}
|
|
82
|
+
// onClick={() => closePopup()}
|
|
83
|
+
// url={_config.routes.contactUs.path}
|
|
84
|
+
// content={translate('contactUsWithSymbol')}
|
|
85
|
+
// />
|
|
86
|
+
// </Text>
|
|
87
|
+
// </>
|
|
88
|
+
// ) : (
|
|
89
|
+
// <Text className={`account-p account-p3 account-font-regular account-primary-color1`}>
|
|
90
|
+
// {translate('writeYourReviewDesc1')}
|
|
91
|
+
// <CustomLink
|
|
92
|
+
// className={`info-link`}
|
|
93
|
+
// onClick={() => closePopup()}
|
|
94
|
+
// url={_config.routes.productReviewGuidelines.path}
|
|
95
|
+
// content={translate('reviewGuidelinesWithSymbol')}
|
|
96
|
+
// />
|
|
97
|
+
// {translate('writeYourReviewDesc2')}
|
|
98
|
+
// <CustomLink
|
|
99
|
+
// className={`info-link`}
|
|
100
|
+
// onClick={() => closePopup()}
|
|
101
|
+
// url={_config.routes.contactUs.path}
|
|
102
|
+
// content={translate('contactUsWithSymbol')}
|
|
103
|
+
// />
|
|
104
|
+
// </Text>
|
|
105
|
+
// )}
|
|
106
|
+
// </div>
|
|
107
|
+
// <Image
|
|
108
|
+
// src={product.images?.[0]?.src}
|
|
109
|
+
// alt={product.images?.[0]?.alt}
|
|
110
|
+
// className={`banner-image`}
|
|
111
|
+
// />
|
|
112
|
+
// <div className={`name-text`}>
|
|
113
|
+
// <AccountButton
|
|
114
|
+
// url={product.url}
|
|
115
|
+
// target={`_blank`}
|
|
116
|
+
// text={product.name}
|
|
117
|
+
// btnType={`green-small-text`}
|
|
118
|
+
// customLinkProps={{
|
|
119
|
+
// rel: 'noopener noreferrer',
|
|
120
|
+
// }}
|
|
121
|
+
// />
|
|
122
|
+
// </div>
|
|
123
|
+
// <div className='review-popup-form-container'>
|
|
124
|
+
// <Form
|
|
125
|
+
// ref={form}
|
|
126
|
+
// onSubmit={onFinish}
|
|
127
|
+
// initialValues={initialValues}>
|
|
128
|
+
// <Form.Item
|
|
129
|
+
// name={'rating'}
|
|
130
|
+
// className={`rate-field-wrap`}
|
|
131
|
+
// label={'yourOverallRating'}
|
|
132
|
+
// >
|
|
133
|
+
// <Rate />
|
|
134
|
+
// </Form.Item>
|
|
135
|
+
// <Form.Item
|
|
136
|
+
// name={'is_recommended'}
|
|
137
|
+
// className={`radio-field-wrap`}
|
|
138
|
+
// label={'wouldYouRecommend'}
|
|
139
|
+
// >
|
|
140
|
+
// <Radio.Group>
|
|
141
|
+
// <Radio value={1}>
|
|
142
|
+
// <div className={`icon-circle-wrapper distance`}>
|
|
143
|
+
// <Icon name={`checkbox`} />
|
|
144
|
+
// </div>
|
|
145
|
+
// <Text
|
|
146
|
+
// className={`account-p account-p3 account-font-medium account-primary-color1`}
|
|
147
|
+
// text={`yes`}
|
|
148
|
+
// />
|
|
149
|
+
// </Radio>
|
|
150
|
+
// <Radio value={`${0}`}>
|
|
151
|
+
// <div className={`icon-circle-wrapper distance`}>
|
|
152
|
+
// <Icon name={`checkbox`} />
|
|
153
|
+
// </div>
|
|
154
|
+
// <Text
|
|
155
|
+
// className={`account-p account-p3 account-font-medium account-primary-color1`}
|
|
156
|
+
// text={`no`}
|
|
157
|
+
// />
|
|
158
|
+
// </Radio>
|
|
159
|
+
// </Radio.Group>
|
|
160
|
+
// </Form.Item>
|
|
161
|
+
// <Form.Item
|
|
162
|
+
// name={'title'}
|
|
163
|
+
// className={`text-field-wrap`}
|
|
164
|
+
// label={'reviewTitle'}
|
|
165
|
+
// >
|
|
166
|
+
// <Input placeholder={'type'} />
|
|
167
|
+
// </Form.Item>
|
|
168
|
+
// <Form.Item
|
|
169
|
+
// name={'content'}
|
|
170
|
+
// className={`text-field-wrap`}
|
|
171
|
+
// label={'yourReview'}
|
|
172
|
+
// >
|
|
173
|
+
// <Input.TextArea placeholder={'type'} />
|
|
174
|
+
// </Form.Item>
|
|
175
|
+
// <div className={`uploader-wrapper`}>
|
|
176
|
+
// <FormUpload
|
|
177
|
+
// multiple
|
|
178
|
+
// form={form}
|
|
179
|
+
// maxCount={6}
|
|
180
|
+
// name={'images'}
|
|
181
|
+
// translate={translate}
|
|
182
|
+
// defaultFiles={review ? review.images : []}
|
|
183
|
+
// />
|
|
184
|
+
// </div>
|
|
185
|
+
// <div className={`popup-buttons-wrapper`}>
|
|
186
|
+
// <AccountButton
|
|
187
|
+
// text={`cancel`}
|
|
188
|
+
// btnType={`green-large-text`}
|
|
189
|
+
// onClick={() => closePopup()}
|
|
190
|
+
// />
|
|
191
|
+
// <AccountButton
|
|
192
|
+
// type={'submit'}
|
|
193
|
+
// text={`submitReview`}
|
|
194
|
+
// btnType={`full-width`}
|
|
195
|
+
// />
|
|
196
|
+
// </div>
|
|
197
|
+
// </Form>
|
|
198
|
+
// </div>
|
|
199
|
+
// </ReviewPopupStyle>
|
|
200
|
+
// );
|
|
201
|
+
// });
|
|
202
|
+
// export default withLanguageContext(withUIContext(ReviewPopup, ['closePopup', 'winWidth', 'openPopup']), ['translate']);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export default ReviewPopupStyle;
|
|
2
|
+
declare const ReviewPopupStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
|