@everymatrix/lottery-tipping-entrance 1.83.5 → 1.83.7

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 (27) hide show
  1. package/dist/cjs/draw-selection_17.cjs.entry.js +133 -73
  2. package/dist/cjs/index.cjs.js +1 -1
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/cjs/{lottery-tipping-entrance-e50e77ae.js → lottery-tipping-entrance-2f5e8ecd.js} +61 -9
  5. package/dist/cjs/lottery-tipping-entrance.cjs.js +1 -1
  6. package/dist/collection/components/draw-selection/draw-selection.css +3 -0
  7. package/dist/collection/components/draw-selection/draw-selection.js +23 -3
  8. package/dist/collection/components/lottery-tipping-entrance/lottery-tipping-entrance.js +85 -16
  9. package/dist/collection/utils/api.js +9 -0
  10. package/dist/collection/utils/locale.utils.js +1 -0
  11. package/dist/collection/utils/utils.js +12 -0
  12. package/dist/esm/draw-selection_17.entry.js +134 -74
  13. package/dist/esm/index.js +1 -1
  14. package/dist/esm/loader.js +1 -1
  15. package/dist/esm/{lottery-tipping-entrance-ded99035.js → lottery-tipping-entrance-76aac39c.js} +61 -9
  16. package/dist/esm/lottery-tipping-entrance.js +1 -1
  17. package/dist/lottery-tipping-entrance/draw-selection_17.entry.js +1 -1
  18. package/dist/lottery-tipping-entrance/index.esm.js +1 -1
  19. package/dist/lottery-tipping-entrance/{lottery-tipping-entrance-ded99035.js → lottery-tipping-entrance-76aac39c.js} +34 -34
  20. package/dist/lottery-tipping-entrance/lottery-tipping-entrance.esm.js +1 -1
  21. package/dist/types/components/draw-selection/draw-selection.d.ts +1 -0
  22. package/dist/types/components/lottery-tipping-entrance/lottery-tipping-entrance.d.ts +8 -2
  23. package/dist/types/components.d.ts +5 -0
  24. package/dist/types/models/index.d.ts +16 -0
  25. package/dist/types/utils/api.d.ts +6 -1
  26. package/dist/types/utils/utils.d.ts +1 -0
  27. package/package.json +1 -1
@@ -9,3 +9,12 @@ export async function fetchGameInfo(endpoint, gameId) {
9
9
  throw new Error('The game is currently not available. Please try again later.');
10
10
  }
11
11
  }
12
+ export async function fetchSaleStatistics({ endpoint, gameId, drawId }) {
13
+ try {
14
+ const res = await fetchRequest(`${endpoint}/api/v1/lottery/core/widget/games/${gameId}/draws/${drawId}/saleStatistics`);
15
+ return res;
16
+ }
17
+ catch (error) {
18
+ return Promise.reject(error);
19
+ }
20
+ }
@@ -8,6 +8,7 @@ const TRANSLATIONS = {
8
8
  instruction: 'INSTRUCTION',
9
9
  howToWin: 'HOW TO WIN',
10
10
  selectDraws: 'Select Draws from the following bars:',
11
+ turnover: 'Turnover: ',
11
12
  gameNotAvailable: 'Sorry. The Game is not available now.',
12
13
  instructionContent: 'Instruction content goes here.'
13
14
  },
@@ -90,3 +90,15 @@ export function getDayWithSuffixLocal(isoString) {
90
90
  const month = _format(date, 'LLLL');
91
91
  return `${day}${suffix} ${month}`;
92
92
  }
93
+ export function thousandSeparator(value) {
94
+ if (value === 0) {
95
+ return '0';
96
+ }
97
+ if (!value) {
98
+ return '';
99
+ }
100
+ value = value.toString();
101
+ const parts = value.split('.');
102
+ parts[0] = parts[0].replace(/\B(?=(\d{3})+(?!\d))/g, ',');
103
+ return parts.join('.');
104
+ }