@weareconceptstudio/account 0.5.7 → 0.5.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.
@@ -35,14 +35,22 @@ const Item = memo(({ data, remove, select, isLast, actions }) => {
35
35
  React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` }, data.product.sale_price && !data.is_gift ? (React.createElement("div", null,
36
36
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right cart-sale-price`, text: handlePriceCheckFunc(data.product.sale_price, currency) }),
37
37
  React.createElement("div", { className: 'wrapper-discount' },
38
- data.discount ? React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` }, translate('account.order_balance.discountWithSymbol', { discount: data.discount })) : null,
38
+ data.product.discount ? (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` },
39
+ data.product.discount,
40
+ data.product.discount_type === 'percentage' ? '%' : ` ${currency}`,
41
+ "\u00A0",
42
+ React.createElement("span", { className: 'lowercase' }, translate('account.order_balance.discount')))) : null,
39
43
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right cart-price1`, text: handlePriceCheckFunc(data.product.price, currency) })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right cart-price2`, text: handlePriceCheckFunc(data.is_gift ? 0 : data.product.price, currency) }))),
40
44
  React.createElement("div", { className: `col-item tl-col-4 col-item-4 nowrap` },
41
45
  React.createElement("div", { className: `col-item-inner-wrap` },
42
46
  React.createElement("div", { className: `flex-end-wrap` }, data.sale_total && !data.is_gift ? (React.createElement("div", null,
43
47
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right cart-sale-total`, text: handlePriceCheckFunc(data.sale_total, currency) }),
44
48
  React.createElement("div", { className: 'wrapper-discount' },
45
- data.discount ? React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` }, translate('account.order_balance.discountWithSymbol', { discount: data.discount })) : null,
49
+ data.product.discount ? (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` },
50
+ data.product.discount,
51
+ data.product.discount_type === 'percentage' ? '%' : ` ${currency}`,
52
+ "\u00A0",
53
+ React.createElement("span", { className: 'lowercase' }, translate('account.order_balance.discount')))) : null,
46
54
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right cart-total1`, text: handlePriceCheckFunc(data.total, currency) })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right cart-total2`, text: handlePriceCheckFunc(data.is_gift ? 0 : data.total, currency) }))),
47
55
  React.createElement("div", { className: `favorite-and-remove-wrap` }, remove && !data.is_gift && (React.createElement("div", { className: `remove-btn-wrap` },
48
56
  React.createElement(AccountButton, { btnType: `green-small-text`, className: 'cart-remove-btn', text: 'account.general_actions.remove', onClick: () => actions.delete({ productId: data.product.id }) }))))))),
@@ -30,7 +30,11 @@ const ItemMobile = memo(({ data, select }) => {
30
30
  data.sale_total && !data.is_gift ? (React.createElement("div", { className: 'mobile-total-price-flex-block' },
31
31
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-secondary-color2 mobile-total-discounted-price`, text: handlePriceCheckFunc(data.sale_total, currency) }),
32
32
  React.createElement("div", { className: 'wrapper-discount' },
33
- data.discount ? React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` }, translate('account.order_balance.discountWithSymbol', { discount: data.discount })) : null,
33
+ data.product.discount ? (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` },
34
+ data.product.discount,
35
+ data.product.discount_type === 'percentage' ? '%' : ` ${currency}`,
36
+ "\u00A0",
37
+ React.createElement("span", { className: 'lowercase' }, translate('account.order_balance.discount')))) : null,
34
38
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through mobile-total-price price-discount`, text: handlePriceCheckFunc(data.total, currency) })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 mobile-total-price2`, text: handlePriceCheckFunc(data.is_gift ? 0 : data.total, currency) })),
35
39
  select ? (React.createElement("div", { className: `inner-container` }, !data.product.out_of_stock && !data.is_gift ? (React.createElement(AccountCounter, { productId: data.product.id })) : data.is_gift ? (React.createElement("div", { className: 'wrapper-gift-button' }, checkoutData.checkGift[data.product.id * -1] !== 0 ? (React.createElement(AccountCounter, { maxQty: data.qty, productId: data.product.id * -1, isGift: data.is_gift, qty: checkoutData.checkGift[data.product.id * -1] || data.qty })) : (React.createElement(AccountButton, { className: `capitalize button-gift`, text: 'account.general_actions.restore', onClick: () => {
36
40
  setCheckGift({ productId: data.product.id * -1, qty: data.qty });
@@ -29,14 +29,22 @@ const Item = memo(({ data }) => {
29
29
  React.createElement("div", { className: `col-item tl-col-3 col-item-3 nowrap` }, data.sale_price && !data.is_gift ? (React.createElement("div", null,
30
30
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right order-sale-price`, text: handlePriceCheckFunc(data.sale_price, currency) }),
31
31
  React.createElement("div", { className: 'wrapper-discount' },
32
- data.discount ? React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` }, translate('account.order_balance.discountWithSymbol', { discount: data.discount })) : null,
32
+ data?.product?.discount ? (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` },
33
+ data.product.discount,
34
+ data?.product?.discount_type === 'percentage' ? '%' : ` ${currency}`,
35
+ "\u00A0",
36
+ React.createElement("span", { className: 'lowercase' }, translate('account.order_balance.discount')))) : null,
33
37
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right order-price1`, text: handlePriceCheckFunc(data.price, currency) })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right order-sale-price`, text: handlePriceCheckFunc(data.is_gift ? 0 : data.price, currency) }))),
34
38
  React.createElement("div", { className: `col-item tl-col-4 col-item-4 nowrap price-block` },
35
39
  React.createElement("div", { className: `col-item-inner-wrap` },
36
40
  React.createElement("div", { className: `flex-end-wrap` }, data.sale_total && !data.is_gift ? (React.createElement("div", null,
37
41
  React.createElement(Text, { className: `account-p account-p3 account-font-bold account-secondary-color2 align-right order-sale-price`, text: handlePriceCheckFunc(data.sale_total, currency) }),
38
42
  React.createElement("div", { className: 'wrapper-discount' },
39
- data.discount ? React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` }, translate('account.order_balance.discountWithSymbol', { discount: data.discount })) : null,
43
+ data?.product?.discount ? (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text` },
44
+ data.product.discount,
45
+ data?.product?.discount_type === 'percentage' ? '%' : ` ${currency}`,
46
+ "\u00A0",
47
+ React.createElement("span", { className: 'lowercase' }, translate('account.order_balance.discount')))) : null,
40
48
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through value align-right order-price1`, text: handlePriceCheckFunc(data.total, currency) })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-bold account-primary-color1 align-right order-sale-price`, text: `${handlePriceCheckFunc(data.is_gift ? 0 : data.total, currency)}` }))))))));
41
49
  });
42
50
  export default Item;
@@ -34,14 +34,22 @@ const ItemMobile = memo(({ data }) => {
34
34
  data.sale_price && !data.is_gift ? (React.createElement(React.Fragment, null,
35
35
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-secondary-color2 sale-price`, text: handlePriceCheckFunc(data.sale_price, currency) }),
36
36
  React.createElement("div", { className: 'wrapper-discount' },
37
- data.discount ? React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text-mobile` }, translate('account.order_balance.discountWithSymbol', { discount: data.discount })) : null,
37
+ data?.product?.discount ? (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text-mobile` },
38
+ data.product.discount,
39
+ data?.product?.discount_type === 'percentage' ? '%' : ` ${currency}`,
40
+ "\u00A0",
41
+ React.createElement("span", { className: 'lowercase' }, translate('account.order_balance.discount')))) : null,
38
42
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through price1`, text: handlePriceCheckFunc(data.price, currency) })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 price2`, text: handlePriceCheckFunc(data.is_gift ? 0 : data.price, currency) }))),
39
43
  React.createElement("div", { className: `mobile-total-price-wrap nowrap` },
40
44
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1`, text: `account.order_balance.total` }),
41
45
  data.sale_total && !data.is_gift ? (React.createElement(React.Fragment, null,
42
46
  React.createElement(Text, { className: `account-p account-p3 account-font-medium account-secondary-color2 sale-total`, text: handlePriceCheckFunc(data.sale_total, currency) }),
43
47
  React.createElement("div", { className: 'wrapper-discount' },
44
- data.discount ? React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text-mobile` }, translate('account.order_balance.discountWithSymbol', { discount: data.discount })) : null,
48
+ data?.product?.discount ? (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color2 discount-text-mobile` },
49
+ data.product.discount,
50
+ data?.product?.discount_type === 'percentage' ? '%' : ` ${currency}`,
51
+ "\u00A0",
52
+ React.createElement("span", { className: 'lowercase' }, translate('account.order_balance.discount')))) : null,
45
53
  React.createElement(Text, { className: `account-p account-p3 account-font-regular account-primary-color2 line-through total1`, text: handlePriceCheckFunc(data.total, currency) })))) : (React.createElement(Text, { className: `account-p account-p3 account-font-medium account-primary-color1 total2`, text: handlePriceCheckFunc(data.is_gift ? 0 : data.total, currency) })))))));
46
54
  });
47
55
  export default ItemMobile;
@@ -213,7 +213,6 @@ declare const _default: {
213
213
  reorder: string;
214
214
  comment: string;
215
215
  discount: string;
216
- discountWithSymbol: string;
217
216
  note: string;
218
217
  };
219
218
  balance_promotions: {
@@ -213,7 +213,6 @@ export default {
213
213
  reorder: 'Reorder',
214
214
  comment: 'Comment',
215
215
  discount: 'Discount',
216
- discountWithSymbol: '{discount}% off',
217
216
  note: 'Note',
218
217
  },
219
218
  balance_promotions: {
@@ -213,7 +213,6 @@ declare const _default: {
213
213
  reorder: string;
214
214
  comment: string;
215
215
  discount: string;
216
- discountWithSymbol: string;
217
216
  note: string;
218
217
  };
219
218
  balance_promotions: {
@@ -213,7 +213,6 @@ export default {
213
213
  reorder: 'Կրկին պատվիրել',
214
214
  comment: 'Մեկնաբանություն',
215
215
  discount: 'Զեղչ',
216
- discountWithSymbol: '{discount}% զեղչ',
217
216
  note: 'Նշում',
218
217
  },
219
218
  balance_promotions: {
@@ -214,7 +214,6 @@ declare const _default: {
214
214
  reorder: string;
215
215
  comment: string;
216
216
  discount: string;
217
- discountWithSymbol: string;
218
217
  note: string;
219
218
  };
220
219
  balance_promotions: {
@@ -454,7 +453,6 @@ declare const _default: {
454
453
  reorder: string;
455
454
  comment: string;
456
455
  discount: string;
457
- discountWithSymbol: string;
458
456
  note: string;
459
457
  };
460
458
  balance_promotions: {
@@ -695,7 +693,6 @@ declare const _default: {
695
693
  reorder: string;
696
694
  comment: string;
697
695
  discount: string;
698
- discountWithSymbol: string;
699
696
  note: string;
700
697
  };
701
698
  balance_promotions: {
@@ -214,7 +214,6 @@ declare const _default: {
214
214
  reorder: string;
215
215
  comment: string;
216
216
  discount: string;
217
- discountWithSymbol: string;
218
217
  note: string;
219
218
  };
220
219
  balance_promotions: {
@@ -214,7 +214,6 @@ export default {
214
214
  reorder: 'Повторить заказ',
215
215
  comment: 'Комментарий',
216
216
  discount: 'Скидка',
217
- discountWithSymbol: '{discount}% скидка',
218
217
  note: 'Примечание',
219
218
  },
220
219
  balance_promotions: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weareconceptstudio/account",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "Concept Studio Account",
5
5
  "author": "Concept Studio",
6
6
  "license": "ISC",