@weareconceptstudio/account 0.7.9 → 0.8.0

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 (89) hide show
  1. package/dist/components/AccountCounter/index.d.ts.map +1 -1
  2. package/dist/components/AccountCounter/index.js +12 -6
  3. package/dist/components/AccountCounter/index.js.map +1 -1
  4. package/dist/components/AccountCounter/style.d.ts.map +1 -1
  5. package/dist/components/AccountCounter/style.js +39 -0
  6. package/dist/components/AccountCounter/style.js.map +1 -1
  7. package/dist/modules/cart/components/CartItems/style.d.ts.map +1 -1
  8. package/dist/modules/cart/components/CartItems/style.js +37 -73
  9. package/dist/modules/cart/components/CartItems/style.js.map +1 -1
  10. package/dist/modules/order/OrderIndividualTemplate/index.d.ts.map +1 -1
  11. package/dist/modules/order/OrderIndividualTemplate/index.js +5 -2
  12. package/dist/modules/order/OrderIndividualTemplate/index.js.map +1 -1
  13. package/dist/modules/order/OrderRatePopup/index.d.ts +7 -0
  14. package/dist/modules/order/OrderRatePopup/index.d.ts.map +1 -0
  15. package/dist/modules/order/OrderRatePopup/index.js +26 -0
  16. package/dist/modules/order/OrderRatePopup/index.js.map +1 -0
  17. package/dist/modules/order/OrderRatePopup/style.d.ts +3 -0
  18. package/dist/modules/order/OrderRatePopup/style.d.ts.map +1 -0
  19. package/dist/modules/order/OrderRatePopup/style.js +89 -0
  20. package/dist/modules/order/OrderRatePopup/style.js.map +1 -0
  21. package/dist/modules/order/OrderRateReview/index.d.ts +4 -0
  22. package/dist/modules/order/OrderRateReview/index.d.ts.map +1 -0
  23. package/dist/modules/order/OrderRateReview/index.js +25 -0
  24. package/dist/modules/order/OrderRateReview/index.js.map +1 -0
  25. package/dist/modules/order/OrderRateReview/style.d.ts +3 -0
  26. package/dist/modules/order/OrderRateReview/style.d.ts.map +1 -0
  27. package/dist/modules/order/OrderRateReview/style.js +180 -0
  28. package/dist/modules/order/OrderRateReview/style.js.map +1 -0
  29. package/dist/modules/order/OrderRateReview/utils.d.ts +3 -0
  30. package/dist/modules/order/OrderRateReview/utils.d.ts.map +1 -0
  31. package/dist/modules/order/OrderRateReview/utils.js +5 -0
  32. package/dist/modules/order/OrderRateReview/utils.js.map +1 -0
  33. package/dist/modules/order/OrderReview/index.d.ts +6 -0
  34. package/dist/modules/order/OrderReview/index.d.ts.map +1 -0
  35. package/dist/modules/order/OrderReview/index.js +50 -0
  36. package/dist/modules/order/OrderReview/index.js.map +1 -0
  37. package/dist/modules/order/OrderReview/style.d.ts +3 -0
  38. package/dist/modules/order/OrderReview/style.d.ts.map +1 -0
  39. package/dist/modules/order/OrderReview/style.js +174 -0
  40. package/dist/modules/order/OrderReview/style.js.map +1 -0
  41. package/dist/modules/order/OrderReviewPopup/index.d.ts +4 -0
  42. package/dist/modules/order/OrderReviewPopup/index.d.ts.map +1 -0
  43. package/dist/modules/order/OrderReviewPopup/index.js +101 -0
  44. package/dist/modules/order/OrderReviewPopup/index.js.map +1 -0
  45. package/dist/modules/order/OrderReviewPopup/style.d.ts +3 -0
  46. package/dist/modules/order/OrderReviewPopup/style.d.ts.map +1 -0
  47. package/dist/modules/order/OrderReviewPopup/style.js +259 -0
  48. package/dist/modules/order/OrderReviewPopup/style.js.map +1 -0
  49. package/dist/modules/order/OrderReviewPopup/utils.d.ts +3 -0
  50. package/dist/modules/order/OrderReviewPopup/utils.d.ts.map +1 -0
  51. package/dist/modules/order/OrderReviewPopup/utils.js +7 -0
  52. package/dist/modules/order/OrderReviewPopup/utils.js.map +1 -0
  53. package/dist/modules/order/OrdersList/Item/index.d.ts.map +1 -1
  54. package/dist/modules/order/OrdersList/Item/index.js +9 -3
  55. package/dist/modules/order/OrdersList/Item/index.js.map +1 -1
  56. package/dist/modules/order/OrdersList/ItemMobile/index.d.ts.map +1 -1
  57. package/dist/modules/order/OrdersList/ItemMobile/index.js +16 -8
  58. package/dist/modules/order/OrdersList/ItemMobile/index.js.map +1 -1
  59. package/dist/modules/order/OrdersList/index.d.ts.map +1 -1
  60. package/dist/modules/order/OrdersList/index.js +3 -1
  61. package/dist/modules/order/OrdersList/index.js.map +1 -1
  62. package/dist/modules/order/OrdersList/style.d.ts.map +1 -1
  63. package/dist/modules/order/OrdersList/style.js +163 -96
  64. package/dist/modules/order/OrdersList/style.js.map +1 -1
  65. package/dist/modules/order/index.d.ts +1 -0
  66. package/dist/modules/order/index.d.ts.map +1 -1
  67. package/dist/modules/order/index.js +1 -0
  68. package/dist/modules/order/index.js.map +1 -1
  69. package/dist/styles/helperClass.d.ts.map +1 -1
  70. package/dist/styles/helperClass.js +23 -0
  71. package/dist/styles/helperClass.js.map +1 -1
  72. package/dist/styles/variables.d.ts.map +1 -1
  73. package/dist/styles/variables.js +105 -0
  74. package/dist/styles/variables.js.map +1 -1
  75. package/dist/translations/en.d.ts +17 -0
  76. package/dist/translations/en.d.ts.map +1 -1
  77. package/dist/translations/en.js +19 -2
  78. package/dist/translations/en.js.map +1 -1
  79. package/dist/translations/hy.d.ts +17 -0
  80. package/dist/translations/hy.d.ts.map +1 -1
  81. package/dist/translations/hy.js +20 -3
  82. package/dist/translations/hy.js.map +1 -1
  83. package/dist/translations/index.d.ts +51 -0
  84. package/dist/translations/index.d.ts.map +1 -1
  85. package/dist/translations/ru.d.ts +17 -0
  86. package/dist/translations/ru.d.ts.map +1 -1
  87. package/dist/translations/ru.js +19 -2
  88. package/dist/translations/ru.js.map +1 -1
  89. package/package.json +5 -5
@@ -0,0 +1,180 @@
1
+ import styled from 'styled-components';
2
+ const OrderRateReviewStyle = styled.section `
3
+ --account_orderRateReviewSectionMarTop: var(--sp15x);
4
+ --account_orderRateReviewSectionMarBottom: var(--sp16x);
5
+ --account_orderRateReviewSectionPadTB: var(--sp5x);
6
+ --account_orderRateReviewSectionPadLR: var(--sp5x);
7
+ --account_orderRateReviewSectionBorderRadius: var(--sp2x);
8
+ --account_reviewSVGSize: var(--sp5x);
9
+ --account_topWrapperItemGap: var(--sp2x);
10
+ --account_bottomWrapperTop: var(--sp2x);
11
+ --account_orderRateBtnPadTB: var(--sp2x);
12
+ --account_orderRateBtnPadLR: var(--sp3x);
13
+ --account_orderReviewDescWidth: 65%;
14
+
15
+ padding: var(--account_orderRateReviewSectionPadTB) var(--account_orderRateReviewSectionPadLR);
16
+ border-radius: var(--account_orderRateReviewSectionBorderRadius);
17
+ margin-top: var(--account_orderRateReviewSectionMarTop);
18
+ margin-bottom: var(--account_orderRateReviewSectionMarBottom);
19
+ background-color: var(--account_primaryColor14);
20
+
21
+ svg {
22
+ width: var(--account_reviewSVGSize);
23
+ height: var(--account_reviewSVGSize);
24
+ }
25
+
26
+ .order-rate-review-top-wrapper {
27
+ display: flex;
28
+ align-items: center;
29
+ gap: var(--account_topWrapperItemGap);
30
+ }
31
+
32
+ .order-rate-review-bottom-wrapper {
33
+ display: flex;
34
+ align-items: flex-end;
35
+ justify-content: space-between;
36
+ gap: var(--sp2x);
37
+ margin-top: var(--account_bottomWrapperTop);
38
+ }
39
+
40
+ .order-review-desc {
41
+ width: var(--account_orderReviewDescWidth);
42
+ }
43
+
44
+ .order-rate-btn {
45
+ a,
46
+ button {
47
+ font-size: var(--account_p3);
48
+ font-weight: 500;
49
+ background-color: var(--account_secondaryColor9);
50
+ border: 2px solid var(--account_secondaryColor9);
51
+ padding: var(--account_orderRateBtnPadTB) var(--account_orderRateBtnPadLR);
52
+
53
+ @media (pointer: fine) {
54
+ @media (hover: hover) {
55
+ &:hover {
56
+ background-color: var(--account_primaryColor14);
57
+ border: 2px solid var(--account_backgroundColor);
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+
64
+ /* //! 2559 - 1920 */
65
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
66
+ --account_orderRateReviewSectionMarTop: var(--sp10x);
67
+ --account_orderRateReviewSectionMarBottom: var(--sp13x);
68
+ --account_orderRateReviewSectionPadTB: var(--sp4x);
69
+ --account_orderRateReviewSectionPadLR: var(--sp4x);
70
+ --account_orderRateReviewSectionBorderRadius: var(--sp2x);
71
+ --account_reviewSVGSize: var(--sp4x);
72
+ --account_topWrapperItemGap: var(--sp2x);
73
+ --account_bottomWrapperTop: var(--sp2x);
74
+ --account_orderRateBtnPadTB: var(--sp2x);
75
+ --account_orderRateBtnPadLR: var(--sp3x);
76
+ --account_orderReviewDescWidth: 63%;
77
+ }
78
+
79
+ /* //! 1919 - 1510 */
80
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
81
+ --account_orderRateReviewSectionMarTop: var(--sp8x);
82
+ --account_orderRateReviewSectionMarBottom: var(--sp12x);
83
+ --account_orderRateReviewSectionPadTB: var(--sp4x);
84
+ --account_orderRateReviewSectionPadLR: var(--sp4x);
85
+ --account_orderRateReviewSectionBorderRadius: var(--sp2x);
86
+ --account_reviewSVGSize: var(--sp4x);
87
+ --account_topWrapperItemGap: var(--sp2x);
88
+ --account_bottomWrapperTop: var(--sp2x);
89
+ --account_orderRateBtnPadTB: var(--sp2x);
90
+ --account_orderRateBtnPadLR: var(--sp3x);
91
+ --account_orderReviewDescWidth: 58%;
92
+ }
93
+
94
+ /* //! 1509 - 1440 */
95
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
96
+ --account_orderRateReviewSectionMarTop: var(--sp7x);
97
+ --account_orderRateReviewSectionMarBottom: var(--sp8x);
98
+ --account_orderRateReviewSectionPadTB: var(--sp3x);
99
+ --account_orderRateReviewSectionPadLR: var(--sp3x);
100
+ --account_orderRateReviewSectionBorderRadius: var(--sp2x);
101
+ --account_reviewSVGSize: var(--sp3x);
102
+ --account_topWrapperItemGap: var(--sp1x);
103
+ --account_bottomWrapperTop: var(--sp2x);
104
+ --account_orderRateBtnPadTB: var(--sp2x);
105
+ --account_orderRateBtnPadLR: var(--sp3x);
106
+ --account_orderReviewDescWidth: 59%;
107
+ }
108
+
109
+ /* //! 1439 - 1280 */
110
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
111
+ --account_orderRateReviewSectionMarTop: var(--sp7x);
112
+ --account_orderRateReviewSectionMarBottom: var(--sp8x);
113
+ --account_orderRateReviewSectionPadTB: var(--sp3x);
114
+ --account_orderRateReviewSectionPadLR: var(--sp3x);
115
+ --account_orderRateReviewSectionBorderRadius: var(--sp2x);
116
+ --account_reviewSVGSize: var(--sp3x);
117
+ --account_topWrapperItemGap: var(--sp1x);
118
+ --account_bottomWrapperTop: var(--sp2x);
119
+ --account_orderRateBtnPadTB: var(--sp2x);
120
+ --account_orderRateBtnPadLR: var(--sp3x);
121
+ --account_orderReviewDescWidth: 59%;
122
+ }
123
+
124
+ /* //! 1279 - 1024 */
125
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
126
+ --account_orderRateReviewSectionMarTop: var(--sp5x);
127
+ --account_orderRateReviewSectionMarBottom: var(--sp5x);
128
+ --account_orderRateReviewSectionPadTB: var(--sp2-5x);
129
+ --account_orderRateReviewSectionPadLR: var(--sp2-5x);
130
+ --account_orderRateReviewSectionBorderRadius: var(--sp1-5x);
131
+ --account_reviewSVGSize: var(--sp3x);
132
+ --account_topWrapperItemGap: var(--sp1x);
133
+ --account_bottomWrapperTop: var(--sp2x);
134
+ --account_orderRateBtnPadTB: var(--sp2x);
135
+ --account_orderRateBtnPadLR: var(--sp3x);
136
+ --account_orderReviewDescWidth: 65%;
137
+ }
138
+
139
+ /* //! 1023 - 768 */
140
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
141
+ --account_orderRateReviewSectionMarTop: var(--sp5x);
142
+ --account_orderRateReviewSectionMarBottom: var(--sp5x);
143
+ --account_orderRateReviewSectionPadTB: var(--sp2-5x);
144
+ --account_orderRateReviewSectionPadLR: var(--sp2-5x);
145
+ --account_orderRateReviewSectionBorderRadius: var(--sp1-5x);
146
+ --account_reviewSVGSize: var(--sp3x);
147
+ --account_topWrapperItemGap: var(--sp1x);
148
+ --account_bottomWrapperTop: var(--sp2x);
149
+ --account_orderRateBtnPadTB: var(--sp2x);
150
+ --account_orderRateBtnPadLR: var(--sp3x);
151
+ --account_orderReviewDescWidth: 66%;
152
+ }
153
+
154
+ /* //! Mobile */
155
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
156
+ --account_orderRateReviewSectionMarTop: var(--sp4x);
157
+ --account_orderRateReviewSectionMarBottom: var(--sp4x);
158
+ --account_orderRateReviewSectionPadTB: var(--sp2x);
159
+ --account_orderRateReviewSectionPadLR: var(--sp1-5x);
160
+ --account_orderRateReviewSectionBorderRadius: var(--sp1-5x);
161
+ --account_reviewSVGSize: var(--sp3x);
162
+ --account_topWrapperItemGap: var(--sp1x);
163
+ --account_bottomWrapperTop: var(--sp1-5x);
164
+ --account_orderRateBtnPadTB: var(--sp2x);
165
+ --account_orderRateBtnPadLR: var(--sp3x);
166
+ --account_orderReviewDescWidth: 100%;
167
+
168
+ .order-rate-review-top-wrapper {
169
+ flex-direction: column;
170
+ align-items: unset;
171
+ }
172
+
173
+ .order-rate-review-bottom-wrapper {
174
+ flex-direction: column;
175
+ align-items: unset;
176
+ }
177
+ }
178
+ `;
179
+ export default OrderRateReviewStyle;
180
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/modules/order/OrderRateReview/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,oBAAoB,GA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qBAAqB,CAAC,KAAK,EAAE,EAAE,CACnF,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,mBAAmB;;;;;;;;;;;;;;;sCAef,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;CAuBrG,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export const reviewSVG: React.JSX.Element;
2
+ import React from 'react';
3
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/modules/order/OrderRateReview/utils.js"],"names":[],"mappings":"AAEA,0CAUE;kBAZgB,OAAO"}
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ const reviewSVG = (React.createElement("svg", { fill: 'none', viewBox: '0 0 40 39', xmlns: 'http://www.w3.org/2000/svg' },
3
+ React.createElement("path", { d: 'M18.3203 11.6485C17.5457 12.3652 17.121 12.7615 16.7139 13.2452C16.2334 13.8219 15.8153 14.4512 15.4648 15.1153C15.1652 15.6805 14.9608 16.2283 14.582 17.2247L12.7051 22.1788C12.2134 23.4781 12.4678 24.9287 13.3779 25.9659C14.1243 26.8167 15.2328 27.2651 16.3467 27.1543C16.5502 27.1369 16.7594 27.0964 16.9629 27.0381L21.9551 25.6104C22.9445 25.3249 23.4878 25.1676 24.0645 24.9229C24.7429 24.6316 25.3929 24.2642 25.9922 23.8272C26.5067 23.4601 26.9314 23.0643 27.7002 22.3477L31.9521 18.3907V29.0547L28.4131 32.7022H5.76172L0 38.25V12.5108L3.54004 8.87407H21.2998L18.3203 11.6485ZM29.1523 4.71391C29.5934 5.98423 30.3455 7.49938 31.6289 8.96196C32.9124 10.4245 34.2978 11.3451 35.4795 11.9278L26.167 20.5987C25.4434 21.2745 25.0756 21.6188 24.6855 21.9043C24.2162 22.2423 23.7124 22.5277 23.1865 22.7549C22.7399 22.9414 22.2703 23.0816 21.3262 23.3497L16.3506 24.7774C15.887 24.9113 15.3896 24.7597 15.0674 24.3926C14.7395 24.0197 14.6491 23.4955 14.8242 23.0352L16.7012 18.0762C17.0574 17.138 17.233 16.6656 17.4648 16.2286C17.7362 15.71 18.0643 15.2202 18.4375 14.7774C18.7541 14.3987 19.1156 14.0605 19.8447 13.3848L29.1523 4.71391ZM32.1162 2.00395C34.05 0.203594 37.0352 0.360732 38.7822 2.35356C40.5294 4.34651 40.3761 7.42303 38.4424 9.22368C38.4352 9.2304 37.3318 10.2589 37.3232 10.2559C37.2837 10.2384 37.2386 10.2206 37.1934 10.2032C36.0908 9.74283 34.6545 8.90965 33.3428 7.41216C32.031 5.91453 31.3697 4.35783 31.0361 3.18071C31.0192 3.1342 31.0074 3.08758 30.9961 3.04106L32.1162 2.00395Z', fill: '#EF1794' })));
4
+ export { reviewSVG };
5
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/modules/order/OrderRateReview/utils.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,SAAS,GAAG,CACjB,6BACC,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B;IAClC,8BACC,CAAC,EAAC,k+CAAk+C,EACp+C,IAAI,EAAC,SAAS,GACb,CACG,CACN,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export default OrderReview;
2
+ declare function OrderReview({ review }: {
3
+ review: any;
4
+ }): React.JSX.Element;
5
+ import React from 'react';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/order/OrderReview/index.js"],"names":[],"mappings":";AAkBA;;sBAyFC;kBA3GiB,OAAO"}
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { Rate, Text, useTranslation } from '@weareconceptstudio/core';
3
+ //* Styles
4
+ import OrderReviewStyle from './style';
5
+ //TODO: Fake Data
6
+ const message = 'Packaging was great but the inside was so mess-up, how ever 🍣🍱 tested great as always. Also thank you for extra chopsticks 🙏🙏🙏 .';
7
+ const value = 3;
8
+ const restaurant = [
9
+ 'հաշվի չի առնվել մեկնաբանությունը',
10
+ 'վատ էր փաթեթավորած',
11
+ 'պատվերը թերի էր',
12
+ 'ուշացումով է առաքվել',
13
+ ];
14
+ const delivery = ['⁠թափթվաղ արտաքին տեսք', 'խոսելաձև', 'փաթեթը վնասված էր', 'դժվար կողմնորոշվող էր'];
15
+ const OrderReview = ({ review }) => {
16
+ const { translate } = useTranslation();
17
+ return (React.createElement(OrderReviewStyle, null,
18
+ React.createElement(Text, { className: `account-p account-p1 account-font-bold account-primary-color1`, text: 'account.review.order_review' }),
19
+ React.createElement("div", { className: `info-space-line` }),
20
+ React.createElement("div", { className: 'order-grid-block' },
21
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 order-review-option-title` },
22
+ translate('account.review.rating'),
23
+ ":"),
24
+ React.createElement(Rate, { disabled: true, defaultValue: review.rating, defaultColor: '#CDD0D3', selectedColor: '#F20094' }),
25
+ review.restaurant_ratings?.length ? (React.createElement(React.Fragment, null,
26
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 order-review-option-title` },
27
+ translate('account.review.restaurant'),
28
+ ":"),
29
+ React.createElement("div", { className: 'options-block' }, review.restaurant_ratings.map((i, k) => {
30
+ return (React.createElement("div", { key: k, className: `option-block` },
31
+ React.createElement("div", { className: `option-inner-block` },
32
+ React.createElement(Text, { className: 'account-p account-p4 account-font-medium account-primary-color1 order-rating-option-item' }, i))));
33
+ })))) : null,
34
+ review.delivery_ratings?.length ? (React.createElement(React.Fragment, null,
35
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 order-review-option-title` },
36
+ translate('account.review.delivery'),
37
+ ":"),
38
+ React.createElement("div", { className: 'options-block' }, review.delivery_ratings.map((i, k) => {
39
+ return (React.createElement("div", { key: k, className: `option-block` },
40
+ React.createElement("div", { className: `option-inner-block` },
41
+ React.createElement(Text, { className: 'account-p account-p4 account-font-medium account-primary-color1 order-rating-option-item' }, i))));
42
+ })))) : null,
43
+ review.additional_message ? (React.createElement(React.Fragment, null,
44
+ React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 order-review-option-title` },
45
+ translate('account.review.message'),
46
+ ":"),
47
+ React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color1` }, review.additional_message))) : null)));
48
+ };
49
+ export default OrderReview;
50
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/order/OrderReview/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAEtE,UAAU;AACV,OAAO,gBAAgB,MAAM,SAAS,CAAC;AAEvC,iBAAiB;AACjB,MAAM,OAAO,GACZ,wIAAwI,CAAC;AAC1I,MAAM,KAAK,GAAG,CAAC,CAAC;AAChB,MAAM,UAAU,GAAG;IAClB,kCAAkC;IAClC,oBAAoB;IACpB,iBAAiB;IACjB,sBAAsB;CACtB,CAAC;AACF,MAAM,QAAQ,GAAG,CAAC,uBAAuB,EAAE,UAAU,EAAE,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;AAErG,MAAM,WAAW,GAAG,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE;IAClC,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IAEvC,OAAO,CACN,oBAAC,gBAAgB;QAChB,oBAAC,IAAI,IACJ,SAAS,EAAE,+DAA+D,EAC1E,IAAI,EAAE,6BAA6B,GAClC;QAEF,6BAAK,S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C,CAAC,CACG,CACJ,CACH,CAAC,CAAC,CAAC,IAAI;YAEP,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAC5B;gBACC,oBAAC,IAAI,IACJ,SAAS,EAAE,yFAAyF;oBACnG,SAAS,CAAC,wBAAwB,CAAC;wBAC9B;gBACP,oBAAC,IAAI,IAAC,SAAS,EAAE,kEAAkE,IACjF,MAAM,CAAC,kBAAkB,CACpB,CACL,CACH,CAAC,CAAC,CAAC,IAAI,CACH,CACY,CACnB,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -0,0 +1,3 @@
1
+ export default OrderReviewStyle;
2
+ declare const OrderReviewStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
3
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/modules/order/OrderReview/style.js"],"names":[],"mappings":";AAEA,sPAsLE"}
@@ -0,0 +1,174 @@
1
+ import styled from 'styled-components';
2
+ const OrderReviewStyle = styled.section `
3
+ --account_orderItemsMarginTop: var(--sp16x);
4
+ --account_spaceLineMTop: var(--sp3x);
5
+ --account_spaceLineMBot: var(--sp5x);
6
+ --account_orderGridBlockRowGap: var(--sp4x);
7
+ --account_orderGridBlockColumnGap: var(--sp3x);
8
+ --account_orderReviewRateSize: var(--sp5x);
9
+ --account_orderReviewRateGap: var(--sp1-5x);
10
+
11
+ --account_orderRatingOptionsItemGap: var(--sp2x);
12
+ --account_orderRatingOptionsItemPadTB: var(--sp2x);
13
+ --account_orderRatingOptionsItemPadLR: var(--sp4x);
14
+ --account_orderRatingOptionsItemBorderRadius: var(--sp4x);
15
+
16
+ margin-top: var(--account_orderItemsMarginTop);
17
+
18
+ .info-space-line {
19
+ width: 100%;
20
+ border-bottom: 2px solid var(--account_primaryColor1);
21
+ margin-top: var(--account_spaceLineMTop);
22
+ margin-bottom: var(--account_spaceLineMBot);
23
+ }
24
+
25
+ .order-grid-block {
26
+ display: grid;
27
+ grid-template-columns: max-content 1fr;
28
+ row-gap: var(--account_orderGridBlockRowGap);
29
+ column-gap: var(--account_orderGridBlockColumnGap);
30
+ }
31
+
32
+ .custom-rate-wrapper {
33
+ gap: var(--account_orderReviewRateGap);
34
+
35
+ svg {
36
+ width: var(--account_orderReviewRateSize);
37
+ height: var(--account_orderReviewRateSize);
38
+ }
39
+ }
40
+
41
+ .options-block {
42
+ display: flex;
43
+ flex-wrap: wrap;
44
+ gap: var(--account_orderRatingOptionsItemGap);
45
+ }
46
+
47
+ .option-inner-block {
48
+ border: 1px solid var(--account_primaryColor1);
49
+ background-color: var(--account_primaryColor1);
50
+ padding: var(--account_orderRatingOptionsItemPadTB) var(--account_orderRatingOptionsItemPadLR);
51
+ border-radius: var(--account_orderRatingOptionsItemBorderRadius);
52
+
53
+ .order-rating-option-item {
54
+ color: var(--account_backgroundColor);
55
+ }
56
+ }
57
+
58
+ /* //! 2559 - 1920 */
59
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
60
+ --account_orderItemsMarginTop: var(--sp11x);
61
+ --account_spaceLineMTop: var(--sp2x);
62
+ --account_spaceLineMBot: var(--sp4x);
63
+ --account_orderGridBlockRowGap: var(--sp3x);
64
+ --account_orderGridBlockColumnGap: var(--sp2x);
65
+ --account_orderReviewRateSize: var(--sp4x);
66
+ --account_orderReviewRateGap: var(--sp1x);
67
+ --account_orderRatingOptionsItemGap: var(--sp2x);
68
+ --account_orderRatingOptionsItemPadTB: var(--sp1-5x);
69
+ --account_orderRatingOptionsItemPadLR: var(--sp3x);
70
+ --account_orderRatingOptionsItemBorderRadius: var(--sp4x);
71
+ }
72
+
73
+ /* //! 1919 - 1510 */
74
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
75
+ --account_orderItemsMarginTop: var(--sp8x);
76
+ --account_spaceLineMTop: var(--sp2x);
77
+ --account_spaceLineMBot: var(--sp4x);
78
+ --account_orderGridBlockRowGap: var(--sp3x);
79
+ --account_orderGridBlockColumnGap: var(--sp2x);
80
+ --account_orderReviewRateSize: var(--sp3x);
81
+ --account_orderReviewRateGap: var(--sp1x);
82
+
83
+ --account_orderRatingOptionsItemGap: var(--sp1x);
84
+ --account_orderRatingOptionsItemPadTB: var(--sp1-5x);
85
+ --account_orderRatingOptionsItemPadLR: var(--sp3x);
86
+ --account_orderRatingOptionsItemBorderRadius: var(--sp4x);
87
+ }
88
+
89
+ /* //! 1509 - 1440 */
90
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
91
+ --account_orderItemsMarginTop: var(--sp8x);
92
+ --account_spaceLineMTop: var(--sp2x);
93
+ --account_spaceLineMBot: var(--sp3x);
94
+ --account_orderGridBlockRowGap: var(--sp3x);
95
+ --account_orderGridBlockColumnGap: var(--sp2x);
96
+ --account_orderReviewRateSize: var(--sp3x);
97
+ --account_orderReviewRateGap: var(--sp1x);
98
+
99
+ --account_orderRatingOptionsItemGap: var(--sp1x);
100
+ --account_orderRatingOptionsItemPadTB: var(--sp1-5x);
101
+ --account_orderRatingOptionsItemPadLR: var(--sp3x);
102
+ --account_orderRatingOptionsItemBorderRadius: var(--sp4x);
103
+ }
104
+
105
+ /* //! 1439 - 1280 */
106
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
107
+ --account_orderItemsMarginTop: var(--sp8x);
108
+ --account_spaceLineMTop: var(--sp2x);
109
+ --account_spaceLineMBot: var(--sp3x);
110
+ --account_orderGridBlockRowGap: var(--sp3x);
111
+ --account_orderGridBlockColumnGap: var(--sp2x);
112
+ --account_orderReviewRateSize: var(--sp3x);
113
+ --account_orderReviewRateGap: var(--sp1x);
114
+
115
+ --account_orderRatingOptionsItemGap: var(--sp1x);
116
+ --account_orderRatingOptionsItemPadTB: var(--sp1-5x);
117
+ --account_orderRatingOptionsItemPadLR: var(--sp3x);
118
+ --account_orderRatingOptionsItemBorderRadius: var(--sp4x);
119
+ }
120
+
121
+ /* //! 1279 - 1024 */
122
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
123
+ --account_orderItemsMarginTop: var(--sp8x);
124
+ --account_spaceLineMTop: var(--sp2x);
125
+ --account_spaceLineMBot: var(--sp3x);
126
+ --account_orderGridBlockRowGap: var(--sp2x);
127
+ --account_orderGridBlockColumnGap: var(--sp2x);
128
+ --account_orderReviewRateSize: var(--sp3x);
129
+ --account_orderReviewRateGap: var(--sp1x);
130
+
131
+ --account_orderRatingOptionsItemGap: var(--sp1x);
132
+ --account_orderRatingOptionsItemPadTB: var(--sp1-5x);
133
+ --account_orderRatingOptionsItemPadLR: var(--sp2x);
134
+ --account_orderRatingOptionsItemBorderRadius: var(--sp4x);
135
+ }
136
+
137
+ /* //! 1023 - 768 */
138
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
139
+ --account_orderItemsMarginTop: var(--sp8x);
140
+ --account_spaceLineMTop: var(--sp2x);
141
+ --account_spaceLineMBot: var(--sp2x);
142
+ --account_orderGridBlockRowGap: var(--sp2x);
143
+ --account_orderGridBlockColumnGap: var(--sp2x);
144
+ --account_orderReviewRateSize: var(--sp3x);
145
+ --account_orderReviewRateGap: var(--sp0-5x);
146
+
147
+ --account_orderRatingOptionsItemGap: var(--sp1x);
148
+ --account_orderRatingOptionsItemPadTB: var(--sp1-5x);
149
+ --account_orderRatingOptionsItemPadLR: var(--sp2x);
150
+ --account_orderRatingOptionsItemBorderRadius: var(--sp4x);
151
+ }
152
+
153
+ /* //! Mobile */
154
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
155
+ --account_orderItemsMarginTop: var(--sp8x);
156
+ --account_spaceLineMTop: var(--sp2x);
157
+ --account_spaceLineMBot: var(--sp2x);
158
+ --account_orderGridBlockRowGap: var(--sp2x);
159
+ --account_orderGridBlockColumnGap: var(--sp2x);
160
+ --account_orderReviewRateSize: var(--sp3x);
161
+ --account_orderReviewRateGap: var(--sp1x);
162
+
163
+ --account_orderRatingOptionsItemGap: var(--sp1x);
164
+ --account_orderRatingOptionsItemPadTB: var(--sp1x);
165
+ --account_orderRatingOptionsItemPadLR: var(--sp1-5x);
166
+ --account_orderRatingOptionsItemBorderRadius: var(--sp4x);
167
+
168
+ .order-grid-block {
169
+ grid-template-columns: 1fr;
170
+ }
171
+ }
172
+ `;
173
+ export default OrderReviewStyle;
174
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../src/modules/order/OrderReview/style.js"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAEvC,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAyDD,CAAC,KAAK,EAAE,EAAE,CAC7C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,wBAAwB,qBAAqB,CAAC,KAAK,EAAE,EAAE,CACtF,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,oBAAoB;;;;;;;;;;;;;;;sCAehB,CAAC,KAAK,EAAE,EAAE,CAC7C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC,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
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/modules/order/OrderReviewPopup/index.js"],"names":[],"mappings":";AAYA,0FA6KG;kBAzLyE,OAAO"}
@@ -0,0 +1,101 @@
1
+ import React, { forwardRef, useEffect, useImperativeHandle, useState } from 'react';
2
+ import { api, Rate, Text, useTranslation, useUi } from '@weareconceptstudio/core';
3
+ //* Styles
4
+ import OrderReviewPopupStyle from './style';
5
+ //* Utils
6
+ import { successSVG } from './utils';
7
+ //* Components
8
+ import { AccountButton } from '../../../components';
9
+ const OrderReviewPopup = forwardRef(({ orderId, orderNumber, rate, onReady }, ref) => {
10
+ const { translate } = useTranslation();
11
+ const { closePopup } = useUi();
12
+ useImperativeHandle(ref, () => ({
13
+ handleClose: handleClose,
14
+ }));
15
+ //! States
16
+ const [data, setData] = useState(null);
17
+ const [success, setSuccess] = useState(false);
18
+ const [message, setMessage] = useState('');
19
+ const [selectedOptions, setSelectedOptions] = useState({});
20
+ //! Data
21
+ useEffect(() => {
22
+ const fetchOptionsData = async () => {
23
+ await api.get({ url: `rating-options/${rate}` }).then((res) => {
24
+ setData(res);
25
+ onReady?.();
26
+ });
27
+ };
28
+ fetchOptionsData();
29
+ }, []);
30
+ //! Toggle Options
31
+ const toggleOption = (formName, optionValue) => {
32
+ setSelectedOptions((prev) => {
33
+ const prevSelected = prev[formName] || [];
34
+ const isSelected = prevSelected.includes(optionValue);
35
+ return {
36
+ ...prev,
37
+ [formName]: isSelected
38
+ ? prevSelected.filter((val) => val !== optionValue)
39
+ : [...prevSelected, optionValue],
40
+ };
41
+ });
42
+ };
43
+ //! Handle Close
44
+ const handleClose = async () => {
45
+ return await api
46
+ .post('order-review', {
47
+ order_id: orderId,
48
+ rating: rate,
49
+ })
50
+ .then(() => {
51
+ setSuccess(true);
52
+ });
53
+ };
54
+ //! Handle Submit
55
+ const handleSubmit = async () => {
56
+ return await api
57
+ .post('order-review', {
58
+ order_id: orderId,
59
+ rating: rate,
60
+ additional_message: message,
61
+ ...selectedOptions,
62
+ })
63
+ .then(() => {
64
+ setSuccess(true);
65
+ });
66
+ };
67
+ return data ? (React.createElement(OrderReviewPopupStyle, null,
68
+ React.createElement("div", { className: 'order-review-inner-popup' }, success ? (React.createElement("div", { className: 'order-review-success-wrapper' },
69
+ successSVG,
70
+ React.createElement(Text, { className: 'account-h6 account-font-medium account-primary-color1 align-center order-popup-success-title', text: 'account.review.rateSuccessText' }),
71
+ React.createElement(Text, { className: 'account-p account-p2 account-font-regular account-primary-color1 align-center order-popup-success-desc', text: 'account.review.rateSuccessDesc' }))) : (React.createElement(React.Fragment, null,
72
+ React.createElement("div", { className: 'order-review-top-block' },
73
+ React.createElement("div", { className: 'order-review-top-left-block' },
74
+ React.createElement(Text, { className: 'account-h6 account-font-medium account-primary-color1 order-popup-review-title', text: 'account.review.rateYourOrder' }),
75
+ React.createElement(Text, { className: `account-p account-p4 account-font-regular account-primary-color2 order-popup-review-order-number` },
76
+ translate('account.order_management.orderNumber'),
77
+ " ",
78
+ orderNumber)),
79
+ React.createElement("div", { className: 'order-review-top-right-block' },
80
+ React.createElement(Rate, { disabled: true, defaultValue: rate, defaultColor: '#CDD0D3', selectedColor: '#F20094' }))),
81
+ React.createElement("div", { className: 'order-review-bottom-block' },
82
+ React.createElement("div", { className: 'order-review-bottom-inner-block' },
83
+ Object.values(data.rating_options).map((item, index) => {
84
+ const selected = selectedOptions[item.form_name] || [];
85
+ return (React.createElement("div", { key: index, className: 'order-rating-option-block' },
86
+ React.createElement(Text, { className: 'account-p account-p2 account-font-medium account-primary-color1 order-rating-option-title' }, item.title),
87
+ item.options?.length > 0 ? (React.createElement("div", { className: 'options-block' }, item.options.map((i, k) => {
88
+ const isSelected = selected.includes(i);
89
+ return (React.createElement("div", { key: k + index, className: `option-block` },
90
+ React.createElement("div", { onClick: () => toggleOption(item.form_name, i), className: `option-inner-block ${isSelected ? 'selected' : ''}` },
91
+ React.createElement(Text, { className: 'account-p account-p4 account-font-medium account-primary-color1 order-rating-option-item' }, i))));
92
+ }))) : null));
93
+ }),
94
+ React.createElement("div", { className: 'order-rating-option-block' },
95
+ React.createElement(Text, { className: 'account-p account-p2 account-font-medium account-primary-color1 order-rating-option-title', text: 'account.review.rateTextareaLabel' }),
96
+ React.createElement("textarea", { id: 'additional-message', name: 'additional-message', value: message, onChange: (e) => setMessage(e.target.value), placeholder: translate('account.review.rateTextareaPlaceholder') })),
97
+ React.createElement("div", { className: 'order-rate-btn-flex-block' },
98
+ React.createElement(AccountButton, { onClick: handleSubmit, text: 'account.general_actions.submit' }))))))))) : null;
99
+ });
100
+ export default OrderReviewPopup;
101
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/order/OrderReviewPopup/index.js"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpF,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAElF,UAAU;AACV,OAAO,qBAAqB,MAAM,SAAS,CAAC;AAE5C,SAAS;AACT,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,cAAc;AACd,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,MAAM,gBAAgB,GAAG,UAAU,CAAC,CAAC,EAAE,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,GAAG,EAAE,EAAE;IACpF,MAAM,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAAC;IACvC,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,EAAE,CAAC;IAE/B,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC;QAC/B,WAAW,EAAE,WA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,CACH,CACN,CAAC;oBACH,CAAC,CAAC;oBAEF,6BAAK,SAAS,EAAC,2BAA2B;wBACzC,oBAAC,IAAI,IACJ,SAAS,EAAC,2FAA2F,EACrG,IAAI,EAAE,kCAAkC,GACvC;wBAEF,kCACC,EAAE,EAAE,oBAAoB,EACxB,IAAI,EAAC,oBAAoB,EACzB,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3C,WAAW,EAAE,SAAS,CAAC,wCAAwC,CAAC,GAAa,CACzE;oBAEN,6BAAK,SAAS,EAAC,2BAA2B;wBACzC,oBAAC,aAAa,IACb,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,gCAAgC,GACrC,CACG,CACD,CACD,CACJ,CACH,CACI,CACiB,CACxB,CAAC,CAAC,CAAC,IAAI,CAAC;AACV,CAAC,CAAC,CAAC;AAEH,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export default OrderReviewPopupStyle;
2
+ declare const OrderReviewPopupStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
3
+ //# sourceMappingURL=style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../src/modules/order/OrderReviewPopup/style.js"],"names":[],"mappings":";AAEA,2PA2QE"}