@weareconceptstudio/account 0.2.7 → 0.2.8

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 (45) hide show
  1. package/dist/components/TotalCheckout/FreeShippingComp/index.d.ts +1 -1
  2. package/dist/components/TotalCheckout/FreeShippingComp/index.js +5 -4
  3. package/dist/components/TotalCheckout/index.js +3 -3
  4. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/index.d.ts +12 -0
  5. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/index.js +45 -0
  6. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/style.d.ts +2 -0
  7. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/ProgressComponent/style.js +54 -0
  8. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/index.d.ts +9 -0
  9. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/index.js +27 -0
  10. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/style.d.ts +2 -0
  11. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/ProgressBalance/style.js +83 -0
  12. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/index.d.ts +13 -0
  13. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/index.js +35 -0
  14. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/style.d.ts +2 -0
  15. package/dist/modules/account/AccountBalanceTemplate/HeroBalance/style.js +118 -0
  16. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/index.d.ts +8 -0
  17. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/index.js +42 -0
  18. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/style.d.ts +2 -0
  19. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/ItemHistory/style.js +144 -0
  20. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/index.d.ts +3 -0
  21. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/index.js +42 -0
  22. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/style.d.ts +2 -0
  23. package/dist/modules/account/AccountBalanceTemplate/HistoryBalance/style.js +90 -0
  24. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/ItemStatus/index.d.ts +8 -0
  25. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/ItemStatus/index.js +23 -0
  26. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/index.d.ts +6 -0
  27. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/index.js +77 -0
  28. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/style.d.ts +2 -0
  29. package/dist/modules/account/AccountBalanceTemplate/StatusBalance/style.js +234 -0
  30. package/dist/modules/account/AccountBalanceTemplate/index.d.ts +7 -0
  31. package/dist/modules/account/AccountBalanceTemplate/index.js +31 -0
  32. package/dist/modules/account/AccountBalanceTemplate/style.d.ts +2 -0
  33. package/dist/modules/account/AccountBalanceTemplate/style.js +31 -0
  34. package/dist/modules/account/index.d.ts +1 -0
  35. package/dist/modules/account/index.js +1 -0
  36. package/dist/styles/theme.js +3 -0
  37. package/dist/styles/variables.js +3 -0
  38. package/dist/translations/en.d.ts +15 -0
  39. package/dist/translations/en.js +17 -0
  40. package/dist/translations/hy.d.ts +15 -0
  41. package/dist/translations/hy.js +17 -0
  42. package/dist/translations/index.d.ts +45 -0
  43. package/dist/translations/ru.d.ts +15 -0
  44. package/dist/translations/ru.js +17 -0
  45. package/package.json +1 -1
@@ -0,0 +1,31 @@
1
+ import React, { useEffect, useState } from 'react';
2
+ import { api, useTranslation } from '@weareconceptstudio/core';
3
+ //* Style
4
+ import AccountBalanceTemplateStyle from './style';
5
+ //* Component
6
+ import HeroBalance from './HeroBalance';
7
+ import HistoryBalance from './HistoryBalance';
8
+ import StatusBalance from './StatusBalance';
9
+ const AccountBalanceTemplate = ({ iconValue, dataItem, className }) => {
10
+ const { selectedLang } = useTranslation();
11
+ //! State
12
+ const [dataBalance, setDataBalance] = useState(false);
13
+ useEffect(() => {
14
+ api.get({ url: `balance`, lang: selectedLang }).then((data) => {
15
+ setDataBalance(data);
16
+ });
17
+ }, []);
18
+ return dataBalance ? (React.createElement(AccountBalanceTemplateStyle, { className: className || '' },
19
+ React.createElement(HeroBalance, { cashback: dataBalance.cashback, balance: dataBalance.balance, title: dataBalance.info.status, totalSpent: dataBalance.info.spent.current, nextStatusValue: dataBalance.info.spent.next, progress: dataBalance.info.timeline, nextStatusTitle: 'Resident', iconValue: iconValue, description: (() => {
20
+ if (dataItem) {
21
+ const { description1, description2 } = dataItem.find((item) => item.name?.toLowerCase() === dataBalance.info.status?.toLowerCase()) || {};
22
+ return { description1, description2 };
23
+ }
24
+ else {
25
+ return false;
26
+ }
27
+ })() }),
28
+ React.createElement(StatusBalance, { activeStatus: dataBalance.info.status, allItem: dataItem }),
29
+ React.createElement(HistoryBalance, null))) : null;
30
+ };
31
+ export default AccountBalanceTemplate;
@@ -0,0 +1,2 @@
1
+ export default AccountBalanceTemplateStyle;
2
+ declare const AccountBalanceTemplateStyle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, never>> & string;
@@ -0,0 +1,31 @@
1
+ import styled from 'styled-components';
2
+ const AccountBalanceTemplateStyle = styled.section `
3
+ /* //! 1920 */
4
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeL}) {
5
+ }
6
+
7
+ /* //! 1510 */
8
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeLMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeM}) {
9
+ }
10
+
11
+ /* //! 1440 */
12
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeMMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeS}) {
13
+ }
14
+
15
+ /* //! 1280 */
16
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXS}) {
17
+ }
18
+
19
+ /* //! 1024 */
20
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_DesktopSizeXSMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSize}) {
21
+ }
22
+
23
+ /* //! 768 */
24
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeMin}) and (min-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeS}) {
25
+ }
26
+
27
+ /* //! mobile */
28
+ @media only screen and (max-width: ${(props) => props.theme.account.mediaQuery.account_TabletSizeSMin}) {
29
+ }
30
+ `;
31
+ export default AccountBalanceTemplateStyle;
@@ -1,2 +1,3 @@
1
1
  export { default as AccountTemplate } from './AccountTemplate';
2
2
  export { default as AccountSettingsTemplate } from './AccountSettingsTemplate';
3
+ export { default as AccountBalanceTemplate } from './AccountBalanceTemplate';
@@ -1,2 +1,3 @@
1
1
  export { default as AccountTemplate } from './AccountTemplate';
2
2
  export { default as AccountSettingsTemplate } from './AccountSettingsTemplate';
3
+ export { default as AccountBalanceTemplate } from './AccountBalanceTemplate';
@@ -35,6 +35,9 @@ export default (props) => ({
35
35
  account_secondaryColor7: '#FFDAD8',
36
36
  account_secondaryColor8: '#D7DBF5',
37
37
  account_secondaryColor9: '#B067CC',
38
+ account_secondaryColor10: '#E9ECEE',
39
+ account_secondaryColor11: '#F4F5F7',
40
+ account_secondaryColor12: '#0EC600',
38
41
  account_surfaceColor: '#F7F7F7',
39
42
  //! Error Color
40
43
  account_errorColor: '#DE554E',
@@ -43,6 +43,9 @@ const AccountVariables = createGlobalStyle `${css `
43
43
  --account_secondaryColor7: ${(props) => props.theme.account.colors.account_secondaryColor7};
44
44
  --account_secondaryColor8: ${(props) => props.theme.account.colors.account_secondaryColor8};
45
45
  --account_secondaryColor9: ${(props) => props.theme.account.colors.account_secondaryColor9};
46
+ --account_secondaryColor10: ${(props) => props.theme.account.colors.account_secondaryColor10};
47
+ --account_secondaryColor11: ${(props) => props.theme.account.colors.account_secondaryColor11};
48
+ --account_secondaryColor12: ${(props) => props.theme.account.colors.account_secondaryColor12};
46
49
 
47
50
  //! Background Color
48
51
  --account_backgroundColor: ${(props) => props.theme.account.colors.account_backgroundColor};
@@ -171,6 +171,21 @@ declare const _default: {
171
171
  backToShop: string;
172
172
  forgotErrorDescription: string;
173
173
  gotPromotionCode: string;
174
+ balanceStatus: string;
175
+ priceValue: string;
176
+ balanceCashback: string;
177
+ balanceTotalSpent: string;
178
+ balance: string;
179
+ specialNameBalance: string;
180
+ progressBalanceTitle: string;
181
+ balanceNextStatusDescription1: string;
182
+ balanceNextStatusDescription2: string;
183
+ balanceFirstOrderStatus: string;
184
+ balanceStarting: string;
185
+ balanceRecentActivity: string;
186
+ balanceCategoryDate: string;
187
+ balanceCategoryActivity: string;
188
+ balanceCategoryAmount: string;
174
189
  promoCodePlaceholder: string;
175
190
  };
176
191
  export default _default;
@@ -183,5 +183,22 @@ export default {
183
183
  backToShop: 'Back to shop',
184
184
  forgotErrorDescription: 'You will receive an email with a recovery link code within 1 minute․',
185
185
  gotPromotionCode: '+ Got a promotion code?',
186
+ //! Account balance
187
+ balanceStatus: 'status',
188
+ priceValue: 'AMD',
189
+ balanceCashback: 'cashback',
190
+ balanceTotalSpent: 'total Spent',
191
+ balance: 'Balance',
192
+ specialNameBalance: 'balance',
193
+ progressBalanceTitle: 'balance',
194
+ balanceNextStatusDescription1: 'Keep it up! Your are',
195
+ balanceNextStatusDescription2: 'short to become',
196
+ balanceFirstOrderStatus: 'Starting from first order',
197
+ balanceStarting: 'starting',
198
+ balanceRecentActivity: 'Recent activity',
199
+ balanceCategoryDate: 'date',
200
+ balanceCategoryActivity: 'activity',
201
+ balanceCategoryAmount: 'amount',
202
+ //! Promocode
186
203
  promoCodePlaceholder: 'Type your code',
187
204
  };
@@ -171,6 +171,21 @@ declare const _default: {
171
171
  backToShop: string;
172
172
  forgotErrorDescription: string;
173
173
  gotPromotionCode: string;
174
+ balanceStatus: string;
175
+ priceValue: string;
176
+ balanceCashback: string;
177
+ balanceTotalSpent: string;
178
+ balance: string;
179
+ specialNameBalance: string;
180
+ progressBalanceTitle: string;
181
+ balanceNextStatusDescription1: string;
182
+ balanceNextStatusDescription2: string;
183
+ balanceFirstOrderStatus: string;
184
+ balanceStarting: string;
185
+ balanceRecentActivity: string;
186
+ balanceCategoryDate: string;
187
+ balanceCategoryActivity: string;
188
+ balanceCategoryAmount: string;
174
189
  promoCodePlaceholder: string;
175
190
  };
176
191
  export default _default;
@@ -183,5 +183,22 @@ export default {
183
183
  backToShop: 'Back to shop',
184
184
  forgotErrorDescription: 'You will receive an email with a recovery link code within 1 minute․',
185
185
  gotPromotionCode: '+ Got a promotion code?',
186
+ //! Account balance
187
+ balanceStatus: 'status',
188
+ priceValue: 'AMD',
189
+ balanceCashback: 'cashback',
190
+ balanceTotalSpent: 'total Spent',
191
+ balance: 'Balance',
192
+ specialNameBalance: 'balance',
193
+ progressBalanceTitle: 'balance',
194
+ balanceNextStatusDescription1: 'Keep it up! Your are',
195
+ balanceNextStatusDescription2: 'short to become',
196
+ balanceFirstOrderStatus: 'Starting from first order',
197
+ balanceStarting: 'starting',
198
+ balanceRecentActivity: 'Recent activity',
199
+ balanceCategoryDate: 'date',
200
+ balanceCategoryActivity: 'activity',
201
+ balanceCategoryAmount: 'amount',
202
+ //! Promocode
186
203
  promoCodePlaceholder: 'Type your code',
187
204
  };
@@ -172,6 +172,21 @@ declare const _default: {
172
172
  backToShop: string;
173
173
  forgotErrorDescription: string;
174
174
  gotPromotionCode: string;
175
+ balanceStatus: string;
176
+ priceValue: string;
177
+ balanceCashback: string;
178
+ balanceTotalSpent: string;
179
+ balance: string;
180
+ specialNameBalance: string;
181
+ progressBalanceTitle: string;
182
+ balanceNextStatusDescription1: string;
183
+ balanceNextStatusDescription2: string;
184
+ balanceFirstOrderStatus: string;
185
+ balanceStarting: string;
186
+ balanceRecentActivity: string;
187
+ balanceCategoryDate: string;
188
+ balanceCategoryActivity: string;
189
+ balanceCategoryAmount: string;
175
190
  promoCodePlaceholder: string;
176
191
  };
177
192
  hy: {
@@ -347,6 +362,21 @@ declare const _default: {
347
362
  backToShop: string;
348
363
  forgotErrorDescription: string;
349
364
  gotPromotionCode: string;
365
+ balanceStatus: string;
366
+ priceValue: string;
367
+ balanceCashback: string;
368
+ balanceTotalSpent: string;
369
+ balance: string;
370
+ specialNameBalance: string;
371
+ progressBalanceTitle: string;
372
+ balanceNextStatusDescription1: string;
373
+ balanceNextStatusDescription2: string;
374
+ balanceFirstOrderStatus: string;
375
+ balanceStarting: string;
376
+ balanceRecentActivity: string;
377
+ balanceCategoryDate: string;
378
+ balanceCategoryActivity: string;
379
+ balanceCategoryAmount: string;
350
380
  promoCodePlaceholder: string;
351
381
  };
352
382
  ru: {
@@ -522,6 +552,21 @@ declare const _default: {
522
552
  backToShop: string;
523
553
  forgotErrorDescription: string;
524
554
  gotPromotionCode: string;
555
+ balanceStatus: string;
556
+ priceValue: string;
557
+ balanceCashback: string;
558
+ balanceTotalSpent: string;
559
+ balance: string;
560
+ specialNameBalance: string;
561
+ progressBalanceTitle: string;
562
+ balanceNextStatusDescription1: string;
563
+ balanceNextStatusDescription2: string;
564
+ balanceFirstOrderStatus: string;
565
+ balanceStarting: string;
566
+ balanceRecentActivity: string;
567
+ balanceCategoryDate: string;
568
+ balanceCategoryActivity: string;
569
+ balanceCategoryAmount: string;
525
570
  promoCodePlaceholder: string;
526
571
  };
527
572
  };
@@ -171,6 +171,21 @@ declare const _default: {
171
171
  backToShop: string;
172
172
  forgotErrorDescription: string;
173
173
  gotPromotionCode: string;
174
+ balanceStatus: string;
175
+ priceValue: string;
176
+ balanceCashback: string;
177
+ balanceTotalSpent: string;
178
+ balance: string;
179
+ specialNameBalance: string;
180
+ progressBalanceTitle: string;
181
+ balanceNextStatusDescription1: string;
182
+ balanceNextStatusDescription2: string;
183
+ balanceFirstOrderStatus: string;
184
+ balanceStarting: string;
185
+ balanceRecentActivity: string;
186
+ balanceCategoryDate: string;
187
+ balanceCategoryActivity: string;
188
+ balanceCategoryAmount: string;
174
189
  promoCodePlaceholder: string;
175
190
  };
176
191
  export default _default;
@@ -183,5 +183,22 @@ export default {
183
183
  backToShop: 'Back to shop',
184
184
  forgotErrorDescription: 'You will receive an email with a recovery link code within 1 minute․',
185
185
  gotPromotionCode: '+ Got a promotion code?',
186
+ //! Account balance
187
+ balanceStatus: 'status',
188
+ priceValue: 'AMD',
189
+ balanceCashback: 'cashback',
190
+ balanceTotalSpent: 'total Spent',
191
+ balance: 'Balance',
192
+ specialNameBalance: 'balance',
193
+ progressBalanceTitle: 'balance',
194
+ balanceNextStatusDescription1: 'Keep it up! Your are',
195
+ balanceNextStatusDescription2: 'short to become',
196
+ balanceFirstOrderStatus: 'Starting from first order',
197
+ balanceStarting: 'starting',
198
+ balanceRecentActivity: 'Recent activity',
199
+ balanceCategoryDate: 'date',
200
+ balanceCategoryActivity: 'activity',
201
+ balanceCategoryAmount: 'amount',
202
+ //! Promocode
186
203
  promoCodePlaceholder: 'Type your code',
187
204
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weareconceptstudio/account",
3
- "version": "0.2.7",
3
+ "version": "0.2.8",
4
4
  "description": "Concept Studio Account",
5
5
  "author": "Concept Studio",
6
6
  "license": "ISC",