@everymatrix/player-elevate-points-history 1.75.0 → 1.76.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 (16) hide show
  1. package/dist/cjs/bonus-pagination-limits_6.cjs.entry.js +5014 -61
  2. package/dist/collection/components/player-elevate-points-history/player-elevate-points-history.js +7 -7
  3. package/dist/collection/utils/translation.js +57 -54
  4. package/dist/esm/bonus-pagination-limits_6.entry.js +5014 -61
  5. package/dist/player-elevate-points-history/bonus-pagination-limits_6.entry.js +9 -1
  6. package/dist/types/utils/translation.d.ts +5 -2
  7. package/package.json +1 -1
  8. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
  9. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.d.ts +0 -0
  10. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/stencil.config.dev.d.ts +0 -0
  11. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/storybook/main.d.ts +0 -0
  12. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/packages/stencil/player-elevate-points-history/storybook/preview.d.ts +0 -0
  13. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/index.d.ts +0 -0
  14. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
  15. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
  16. /package/dist/types/Users/{maria.bumbar/Desktop/Widgets & Template → adrian.pripon/Documents/Work}/widgets-monorepo/packages/stencil/player-elevate-points-history/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
@@ -4,6 +4,7 @@ import { translation } from "../../utils/translation";
4
4
  import { getWallets } from "../../utils/business";
5
5
  import { renderWallets } from "../../renders/renderWallets";
6
6
  import { renderTopBar } from "../../renders/renderTopBar";
7
+ import Decimal from "decimal.js";
7
8
  import "../../../../../general-styling-wrapper/dist/types/index";
8
9
  import "../../../../../player-elevate-card/dist/types/index";
9
10
  import "../../../../../bonus-pagination-limits/dist/types/index";
@@ -65,11 +66,11 @@ export class PlayerElevatePointsHistory {
65
66
  render() {
66
67
  var _a, _b;
67
68
  const pageSetting = this.getPageSettingByType(this.type);
68
- return (h("main", { key: '8e7d5a109467811e371dcfa56214f079b82970bb' }, h("general-styling-wrapper", { key: '46dd3a6435b423b765796c4fa1c115e6cc19a8e2', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl,
69
+ return (h("main", { key: '88ee16781c8b84ba0cf4c008409c8b0460a65c5d' }, h("general-styling-wrapper", { key: 'a4a86b442087c1a9e8ff27a21adde4a63c2b1773', clientStyling: this.clientStyling, clientStylingUrl: this.clientStylingUrl,
69
70
  // @ts-ignore
70
- targetTranslations: translation, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-pointcard", { key: 'c2deb9610f60c7692b01c0c5cf0d68464665c8c6', playerAvatarUrl: this.playerAvatarUrl, endpoint: this.endpoint, session: this.session, language: this.language, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), h("div", { key: '5314e0d934516a37605e6509820f70091237fff7', class: "PlayerElevatePointsDetaisContainer" }, [
71
+ targetTranslations: translation, translationUrl: this.translationUrl, mbSource: this.mbSource }), h("player-elevate-pointcard", { key: 'bed65d6923747be4beb1d1520e4eca4c124eb3e9', playerAvatarUrl: this.playerAvatarUrl, endpoint: this.endpoint, session: this.session, language: this.language, clientStylingUrl: this.clientStylingUrl, clientStyling: this.clientStyling, translationUrl: this.translationUrl }), h("div", { key: 'f5d93a35b480712866fd4af9d0923f65d07b7bb8', class: "PlayerElevatePointsDetaisContainer" }, [
71
72
  renderTopBar(this.locale, this.type, pageSetting),
72
- h("div", { key: '0d148b0ca94e1dda4ad946aa349be891857c0211', class: "Tabs Row" }, (this.validWallets || []).map(key => (h("div", { class: "tab" }, h("div", { class: `TabText ${key === this.type ? 'active' : ''}`, onClick: this.switchTab.bind(this, key) }, this.locale.tabTitle[key]), h("div", { class: `TabBorderBottom ${key === this.type ? 'active' : ''}` }))))),
73
+ h("div", { key: '47a458ce70b8d97bef8476521aa4dffbd724f70f', class: "Tabs Row" }, (this.validWallets || []).map(key => (h("div", { class: "tab" }, h("div", { class: `TabText ${key === this.type ? 'active' : ''}`, onClick: this.switchTab.bind(this, key) }, this.locale.tabTitle[key]), h("div", { class: `TabBorderBottom ${key === this.type ? 'active' : ''}` }))))),
73
74
  ((_a = this.pointsWallets[this.type]) === null || _a === void 0 ? void 0 : _a.isLoadFailed)
74
75
  ? h("div", { class: "ReloadMsg" }, this.locale['reloadMsgWhenError'], h("a", { class: "Reload", onClick: this.updateWallets }, this.locale['reload']))
75
76
  : this.loadWallets(renderWallets.bind(this, this.locale, ((_b = this.pointsWallets[this.type]) === null || _b === void 0 ? void 0 : _b.wallets) || [], pageSetting))
@@ -113,11 +114,10 @@ export class PlayerElevatePointsHistory {
113
114
  }
114
115
  }
115
116
  formatRakebackWalletPoints(wallets) {
116
- const currencyPrecisionX = Math.pow(10, this.currencyPrecision);
117
117
  wallets.forEach(wallet => {
118
- const points = Math.floor((wallet.points || 0) * currencyPrecisionX) / currencyPrecisionX;
119
- wallet.pointAsString = new Intl.NumberFormat('en', { minimumFractionDigits: this.currencyPrecision,
120
- maximumFractionDigits: this.currencyPrecision }).format(points);
118
+ const newValue = new Decimal(wallet.points || 0);
119
+ wallet.pointAsString = newValue.toFixed(this.currencyPrecision, newValue.greaterThan(0)
120
+ ? Decimal.ROUND_DOWN : Decimal.ROUND_CEIL);
121
121
  });
122
122
  }
123
123
  reloadPageByTypeHandler(event) {
@@ -1,59 +1,62 @@
1
1
  export const translation = {
2
- en: {
3
- tabTitle: {
4
- "spendable": 'Coins',
5
- "loyalty": 'XP',
6
- "history": 'Shop Purchases',
7
- "rakeback": 'Rakeback',
2
+ "en": {
3
+ "tabTitle": {
4
+ "spendable": "Coins",
5
+ "loyalty": "XP",
6
+ "history": "Shop Purchases",
7
+ "rakeback": "Rakeback"
8
8
  },
9
- barTitle: {
10
- "spendable": 'Coins History',
11
- "loyalty": 'Experience Points History',
12
- "history": 'Shop Purchases',
13
- "rakeback": 'Rakebake History',
9
+ "barTitle": {
10
+ "spendable": "Coins History",
11
+ "loyalty": "Experience Points History",
12
+ "history": "Shop Purchases",
13
+ "rakeback": "Rakebake History"
14
14
  },
15
- bonus: 'Bonus',
16
- coins: 'Coins',
17
- noContent: 'No Content',
18
- loading: 'Loading',
19
- redeem: 'Redeem',
20
- reload: 'Reload',
21
- reloadMsgWhenError: 'Network Problem, please ',
22
- rakebackPointType: {
23
- wageringByRealMoney: 'Rakeback Casino Real Wager',
24
- bonus: 'Rakeback Claim',
25
- vendor2User: 'Rakeback Claim',
26
- cancelledWageringByRealMoney: 'Cancelled Rakeback Casino Real Wager',
15
+ "bonus": "Bonus",
16
+ "coins": "Coins",
17
+ "noContent": "No Content",
18
+ "loading": "Loading",
19
+ "redeem": "Redeem",
20
+ "reload": "Reload",
21
+ "reloadMsgWhenError": "Network Problem, please ",
22
+ "rakebackPointType": {
23
+ "wageringByRealMoney": "Rakeback Casino Real Wager",
24
+ "bonus": "Rakeback Claim",
25
+ "vendor2User": "Rakeback Claim",
26
+ "cancelledWageringByRealMoney": "Cancelled Rakeback Casino Real Wager"
27
27
  },
28
- pointType: {
29
- registration: 'Registration',
30
- cancelledRegistration: 'Cancelled Registration',
31
- expiredRegistration: 'Expired Registration',
32
- manual: 'Manual',
33
- cancelledManual: 'Cancelled Manual',
34
- expiredManual: 'Expired Manual',
35
- wageringByRealMoney: 'Real Money Wager',
36
- wageringByBonusMoney: 'Bonus Money Wager',
37
- cancelledWageringByRealMoney: 'Cancelled Real Money Wager',
38
- cancelledWageringByBonusMoney: 'Cancelled Bonus Money Wager',
39
- expiredWageringByRealMoney: 'Expired Real Money Wager',
40
- expiredWageringByBonusMoney: 'Expired Bonus Money Wager',
41
- levelExpired: 'Level Expiration',
42
- bonus: 'Bonus Redeem',
43
- manualByTournament: 'Reward from Tournaments',
44
- manualByPrizeEngine: 'Reward from PrizeEngine',
45
- manualByMission: 'Reward from Mission',
46
- cancelledManualByTournament: 'Cancelled Reward from Tournaments',
47
- cancelledManualByMission: 'Cancelled Reward from Mission',
48
- expiredManualByTournament: 'Expired Reward from Tournaments',
49
- expiredManualByMission: 'Expired Reward from Mission',
50
- cancelledManualByPrizeEngine: 'Cancelled Reward from PrizeEngine',
51
- expiredManualByPrizeEngine: 'Expired Reward from PrizeEngine',
52
- prizeEngine: 'PrizeEngine Redeem',
53
- tournamentTicket: 'Tournament Ticket Redeem',
54
- physicalItem: 'Custom Reward Redeem',
55
- role: 'Role Assignment Redeem',
56
- }
57
- },
58
- tr: {}
28
+ "pointType": {
29
+ "registration": "Registration",
30
+ "cancelledRegistration": "Cancelled Registration",
31
+ "expiredRegistration": "Expired Registration",
32
+ "manual": "Manual",
33
+ "cancelledManual": "Cancelled Manual",
34
+ "expiredManual": "Expired Manual",
35
+ "wageringByRealMoney": "Real Money Wager",
36
+ "wageringByBonusMoney": "Bonus Money Wager",
37
+ "cancelledWageringByRealMoney": "Cancelled Real Money Wager",
38
+ "cancelledWageringByBonusMoney": "Cancelled Bonus Money Wager",
39
+ "expiredWageringByRealMoney": "Expired Real Money Wager",
40
+ "expiredWageringByBonusMoney": "Expired Bonus Money Wager",
41
+ "levelExpired": "Level Expiration",
42
+ "bonus": "Bonus Redeem",
43
+ "manualByTournament": "Reward from Tournaments",
44
+ "manualByPrizeEngine": "Reward from PrizeEngine",
45
+ "manualByMission": "Reward from Mission",
46
+ "manualByChallenge": "Reward from Challenge",
47
+ "cancelledManualByTournament": "Cancelled Reward from Tournaments",
48
+ "cancelledManualByMission": "Cancelled Reward from Mission",
49
+ "cancelledManualByChallenge": "Cancelled Reward from Challenge",
50
+ "expiredManualByTournament": "Expired Reward from Tournaments",
51
+ "expiredManualByMission": "Expired Reward from Mission",
52
+ "expiredManualByChallenge": "Expired Reward from Challenge",
53
+ "cancelledManualByPrizeEngine": "Cancelled Reward from PrizeEngine",
54
+ "expiredManualByPrizeEngine": "Expired Reward from PrizeEngine",
55
+ "prizeEngine": "PrizeEngine Redeem",
56
+ "tournamentTicket": "Tournament Ticket Redeem",
57
+ "physicalItem": "Custom Reward Redeem",
58
+ "role": "Role Assignment Redeem"
59
+ },
60
+ "tr": {}
61
+ }
59
62
  };