@cuemath/leap 3.4.4 → 3.4.5-akm-3

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 (100) hide show
  1. package/dist/assets/illustrations/illustrations.js +7 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +1 -0
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +31 -16
  6. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
  7. package/dist/features/auth/comps/tabs/tabs.js +22 -5
  8. package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
  9. package/dist/features/auth/pla-signup/pla-analytics-events.js +1 -1
  10. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
  11. package/dist/features/auth/pla-signup/signup-options/signup-options.js +46 -37
  12. package/dist/features/auth/pla-signup/signup-options/signup-options.js.map +1 -1
  13. package/dist/features/circle-games/game-launcher/api/get-content-for-today/constants.js +1 -1
  14. package/dist/features/circle-games/game-launcher/api/get-content-for-today/constants.js.map +1 -1
  15. package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js +4 -4
  16. package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js.map +1 -1
  17. package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js +84 -21
  18. package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js.map +1 -1
  19. package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +46 -73
  20. package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +1 -1
  21. package/dist/features/circle-games/game-launcher/comps/carousel-badge/carousel-badge-style.js +20 -0
  22. package/dist/features/circle-games/game-launcher/comps/carousel-badge/carousel-badge-style.js.map +1 -0
  23. package/dist/features/circle-games/game-launcher/comps/carousel-badge/carousel-badge.js +17 -0
  24. package/dist/features/circle-games/game-launcher/comps/carousel-badge/carousel-badge.js.map +1 -0
  25. package/dist/features/circle-games/game-launcher/comps/carousel-badge/carousel-single-badge.js +20 -0
  26. package/dist/features/circle-games/game-launcher/comps/carousel-badge/carousel-single-badge.js.map +1 -0
  27. package/dist/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card-styled.js +67 -0
  28. package/dist/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card-styled.js.map +1 -0
  29. package/dist/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card.js +87 -0
  30. package/dist/features/circle-games/game-launcher/comps/circular-game-card/circular-game-card.js.map +1 -0
  31. package/dist/features/circle-games/game-launcher/comps/circular-game-card/constants.js +7 -0
  32. package/dist/features/circle-games/game-launcher/comps/circular-game-card/constants.js.map +1 -0
  33. package/dist/features/circle-games/game-launcher/comps/game-card-content/constants.js +6 -0
  34. package/dist/features/circle-games/game-launcher/comps/game-card-content/constants.js.map +1 -0
  35. package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content-styled.js +62 -0
  36. package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content-styled.js.map +1 -0
  37. package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content.js +9 -0
  38. package/dist/features/circle-games/game-launcher/comps/game-card-content/game-card-content.js.map +1 -0
  39. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js +2 -7
  40. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/constants.js.map +1 -1
  41. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js +80 -59
  42. package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.js.map +1 -1
  43. package/dist/features/circle-games/game-launcher/game-launcher-v2.js +246 -0
  44. package/dist/features/circle-games/game-launcher/game-launcher-v2.js.map +1 -0
  45. package/dist/features/circle-games/game-launcher/helpers.js +8 -0
  46. package/dist/features/circle-games/game-launcher/helpers.js.map +1 -0
  47. package/dist/features/milestone/create/milestone-create-helpers.js +6 -2
  48. package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
  49. package/dist/features/post-game-stats/accuracy/accuracy-styled.js +1 -1
  50. package/dist/features/post-game-stats/accuracy/accuracy-styled.js.map +1 -1
  51. package/dist/features/post-game-stats/clock/clock-styled.js +1 -1
  52. package/dist/features/post-game-stats/clock/clock-styled.js.map +1 -1
  53. package/dist/features/post-game-stats/points/points.js +4 -3
  54. package/dist/features/post-game-stats/points/points.js.map +1 -1
  55. package/dist/features/post-game-stats/post-game-stats-styled.js +9 -8
  56. package/dist/features/post-game-stats/post-game-stats-styled.js.map +1 -1
  57. package/dist/features/post-game-stats/post-game-stats.js +107 -105
  58. package/dist/features/post-game-stats/post-game-stats.js.map +1 -1
  59. package/dist/features/post-game-stats/score/score-styled.js +1 -1
  60. package/dist/features/post-game-stats/score/score-styled.js.map +1 -1
  61. package/dist/features/post-game-stats/streak/streak-styled.js +1 -1
  62. package/dist/features/post-game-stats/streak/streak-styled.js.map +1 -1
  63. package/dist/index.d.ts +90 -7
  64. package/dist/index.js +271 -264
  65. package/dist/index.js.map +1 -1
  66. package/dist/static/accuracy-badge.2e161f00.svg +1 -0
  67. package/dist/static/clock-badge.0adb4ba6.svg +1 -0
  68. package/dist/static/down-arrow-badge.f462f615.svg +1 -0
  69. package/dist/static/green-tick.43b94c3a.svg +1 -0
  70. package/dist/static/pill-tick.c06f606d.json +1 -0
  71. package/dist/static/points-badge.96bdecc9.svg +1 -0
  72. package/dist/static/star-badge.5450c267.svg +1 -0
  73. package/dist/static/up-arrow-badge.71fe7ad1.svg +1 -0
  74. package/package.json +1 -1
  75. package/dist/assets/line-icons/icons/carat-left.js +0 -26
  76. package/dist/assets/line-icons/icons/carat-left.js.map +0 -1
  77. package/dist/assets/line-icons/icons/carat-right.js +0 -26
  78. package/dist/assets/line-icons/icons/carat-right.js.map +0 -1
  79. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js +0 -138
  80. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card-styled.js.map +0 -1
  81. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js +0 -105
  82. package/dist/features/circle-games/game-launcher/comps/segmented-game-card/segmented-game-card.js.map +0 -1
  83. package/dist/features/circle-games/game-launcher/game-launcher.js +0 -219
  84. package/dist/features/circle-games/game-launcher/game-launcher.js.map +0 -1
  85. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js +0 -8
  86. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/constants.js.map +0 -1
  87. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +0 -286
  88. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +0 -1
  89. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js +0 -10
  90. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/constants.js.map +0 -1
  91. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js +0 -13
  92. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey-styled.js.map +0 -1
  93. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +0 -137
  94. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +0 -1
  95. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js +0 -14
  96. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/constants.js.map +0 -1
  97. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js +0 -13
  98. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey-styled.js.map +0 -1
  99. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +0 -230
  100. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +0 -1
@@ -0,0 +1,62 @@
1
+ import t from "styled-components";
2
+ import { GAME_LAUNCHER_SIZE as r } from "../card-container/constants.js";
3
+ import { ASSET_CONTAINER_SIZE as e } from "./constants.js";
4
+ const s = t.div`
5
+ position: absolute;
6
+ width: ${r}px;
7
+ height: ${r}px;
8
+ border-radius: 50%;
9
+ background: transparent;
10
+ overflow: hidden;
11
+
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ flex: 1;
16
+
17
+ transform-origin: center;
18
+ transform: rotate(0deg); // change dynamically if needed
19
+ `, d = t.div`
20
+ position: absolute;
21
+ top: 50%;
22
+ left: 50%;
23
+ transform: translate(-50%, -50%);
24
+
25
+ width: ${e}px;
26
+ height: ${e}px;
27
+
28
+ display: flex;
29
+ align-items: center;
30
+ justify-content: center;
31
+
32
+ overflow: hidden;
33
+ background-color: transparent;
34
+ z-index: 1;
35
+ flex-shrink: 0;
36
+
37
+ &:hover {
38
+ background: ${({ theme: n }) => n.colors.WHITE_T_15};
39
+ cursor: pointer;
40
+ }
41
+ `;
42
+ t.div`
43
+ position: absolute;
44
+ height: ${e}px;
45
+ width: ${e}px;
46
+ z-index: 5;
47
+ backdrop-filter: blur(16px);
48
+ -webkit-backdrop-filter: blur(16px);
49
+ /* pointer-events: none; */
50
+ display: flex;
51
+ align-items: center;
52
+ justify-content: center;
53
+ `;
54
+ t.div`
55
+ position: absolute;
56
+ z-index: 6;
57
+ `;
58
+ export {
59
+ d as AssetContainer,
60
+ s as GameCardSegmentWrapper
61
+ };
62
+ //# sourceMappingURL=game-card-content-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"game-card-content-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/game-card-content/game-card-content-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { GAME_LAUNCHER_SIZE } from '../card-container/constants';\nimport { ASSET_CONTAINER_SIZE } from './constants';\n\nexport const GameCardSegmentWrapper = styled.div`\n position: absolute;\n width: ${GAME_LAUNCHER_SIZE}px;\n height: ${GAME_LAUNCHER_SIZE}px;\n border-radius: 50%;\n background: transparent;\n overflow: hidden;\n\n display: flex;\n align-items: center;\n justify-content: center;\n flex: 1;\n\n transform-origin: center;\n transform: rotate(0deg); // change dynamically if needed\n`;\n\nexport const AssetContainer = styled.div`\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n\n width: ${ASSET_CONTAINER_SIZE}px;\n height: ${ASSET_CONTAINER_SIZE}px;\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n overflow: hidden;\n background-color: transparent;\n z-index: 1;\n flex-shrink: 0;\n\n &:hover {\n background: ${({ theme }) => theme.colors.WHITE_T_15};\n cursor: pointer;\n }\n`;\n\nexport const CircularOverlay = styled.div`\n position: absolute;\n height: ${ASSET_CONTAINER_SIZE}px;\n width: ${ASSET_CONTAINER_SIZE}px;\n z-index: 5;\n backdrop-filter: blur(16px);\n -webkit-backdrop-filter: blur(16px);\n /* pointer-events: none; */\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const IconWrapper = styled.div`\n position: absolute;\n z-index: 6;\n`;\n"],"names":["GameCardSegmentWrapper","styled","GAME_LAUNCHER_SIZE","AssetContainer","ASSET_CONTAINER_SIZE","theme"],"mappings":";;;AAKO,MAAMA,IAAyBC,EAAO;AAAA;AAAA,WAElCC,CAAkB;AAAA,YACjBA,CAAkB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAcjBC,IAAiBF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAM1BG,CAAoB;AAAA,YACnBA,CAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAYd,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAKzBJ,EAAO;AAAA;AAAA,YAE1BG,CAAoB;AAAA,WACrBA,CAAoB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUJH,EAAO;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,9 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { memo as t } from "react";
3
+ import n from "../../../../ui/lottie-animation/lottie-animation.js";
4
+ import { GameCardSegmentWrapper as o, AssetContainer as m } from "./game-card-content-styled.js";
5
+ const i = { renderer: "canvas", loop: !0 }, d = t(({ card: e }) => /* @__PURE__ */ r(o, { children: /* @__PURE__ */ r(m, { children: /* @__PURE__ */ r(n, { src: e, settings: i, animateOnIntersect: !0 }) }) }));
6
+ export {
7
+ d as GameCardContent
8
+ };
9
+ //# sourceMappingURL=game-card-content.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"game-card-content.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/game-card-content/game-card-content.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport * as Styled from './game-card-content-styled';\nimport type { IGameCardContentProps } from './game-card-content-types';\n\nconst renderSettings = { renderer: 'canvas', loop: true };\n\nexport const GameCardContent = memo(({ card }: IGameCardContentProps) => {\n return (\n <Styled.GameCardSegmentWrapper>\n <Styled.AssetContainer>\n <LottieAnimation src={card} settings={renderSettings} animateOnIntersect />\n </Styled.AssetContainer>\n </Styled.GameCardSegmentWrapper>\n );\n});\n"],"names":["renderSettings","GameCardContent","memo","card","Styled.GameCardSegmentWrapper","jsx","Styled.AssetContainer","LottieAnimation"],"mappings":";;;;AAMA,MAAMA,IAAiB,EAAE,UAAU,UAAU,MAAM,GAAK,GAE3CC,IAAkBC,EAAK,CAAC,EAAE,MAAAC,0BAElCC,GAAA,EACC,UAAA,gBAAAC,EAACC,GAAA,EACC,UAAC,gBAAAD,EAAAE,GAAA,EAAgB,KAAKJ,GAAM,UAAUH,GAAgB,oBAAkB,GAAC,CAAA,GAC3E,EACF,CAAA,CAEH;"}
@@ -1,12 +1,7 @@
1
1
  import { GAME_LAUNCHER_SIZE as E } from "../card-container/constants.js";
2
- const A = E * 17.5 / 100, _ = 5, o = Math.ceil(E * 87.5 / 100), R = E / 2 * (37.5 / 100), T = E / 2 * (12.5 / 100), S = Math.PI / 180, c = 2, n = Math.sin(30 * S) * (E / 2 - _);
2
+ const A = E * 17.5 / 100, R = 5;
3
3
  export {
4
- o as ASSET_CONTAINER_SIZE,
5
- R as ASSET_OFFSET_X,
6
- T as ASSET_OFFSET_Y,
7
- c as BORDER_WIDTH,
8
4
  A as GAME_LAUNCHER_ASSET_PADDING,
9
- _ as GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH,
10
- n as delta
5
+ R as GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH
11
6
  };
12
7
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/constants.ts"],"sourcesContent":["import { GAME_LAUNCHER_SIZE } from '../card-container/constants';\n\nexport const GAME_LAUNCHER_ASSET_PADDING = (GAME_LAUNCHER_SIZE * 17.5) / 100;\n\n// to show the stroke of the card below points, this width needs to be reduced\nexport const GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH = 5;\n\n// asset container needs to be 350/400 % of GAME LAUNCHER SIZE\nexport const ASSET_CONTAINER_SIZE = Math.ceil((GAME_LAUNCHER_SIZE * 87.5) / 100);\n\n// ASSET x-axis OFFSET needs to be 37.5 % of 1/2 of GAME LAUNCHER SIZE\nexport const ASSET_OFFSET_X = (GAME_LAUNCHER_SIZE / 2) * (37.5 / 100);\n\n// ASSET y-axis OFFSET needs to be 37.5 % of 1/2 of GAME LAUNCHER SIZE\nexport const ASSET_OFFSET_Y = (GAME_LAUNCHER_SIZE / 2) * (12.5 / 100);\n\nconst RADIAN = Math.PI / 180;\n\nexport const BORDER_WIDTH = 2;\n\n// delta created by a segment from x axis is 30deg\n// sin30 = delta/(CARD_SIZE/2)\nexport const delta =\n Math.sin(30 * RADIAN) * (GAME_LAUNCHER_SIZE / 2 - GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH);\n"],"names":["GAME_LAUNCHER_ASSET_PADDING","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH","ASSET_CONTAINER_SIZE","ASSET_OFFSET_X","ASSET_OFFSET_Y","RADIAN","BORDER_WIDTH","delta"],"mappings":";AAEa,MAAAA,IAA+BC,IAAqB,OAAQ,KAG5DC,IAA2C,GAG3CC,IAAuB,KAAK,KAAMF,IAAqB,OAAQ,GAAG,GAGlEG,IAAkBH,IAAqB,KAAM,OAAO,MAGpDI,IAAkBJ,IAAqB,KAAM,OAAO,MAE3DK,IAAS,KAAK,KAAK,KAEZC,IAAe,GAIfC,IACX,KAAK,IAAI,KAAKF,CAAM,KAAKL,IAAqB,IAAIC;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/segmented-game-card/constants.ts"],"sourcesContent":["import { GAME_LAUNCHER_SIZE } from '../card-container/constants';\n\nexport const GAME_LAUNCHER_ASSET_PADDING = (GAME_LAUNCHER_SIZE * 17.5) / 100;\n\n// to show the stroke of the card below points, this width needs to be reduced\nexport const GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH = 5;\n\n// asset container needs to be 350/400 % of GAME LAUNCHER SIZE\nexport const ASSET_CONTAINER_SIZE = Math.ceil((GAME_LAUNCHER_SIZE * 87.5) / 100);\n\n// ASSET x-axis OFFSET needs to be 37.5 % of 1/2 of GAME LAUNCHER SIZE\nexport const ASSET_OFFSET_X = (GAME_LAUNCHER_SIZE / 2) * (37.5 / 100);\n\n// ASSET y-axis OFFSET needs to be 37.5 % of 1/2 of GAME LAUNCHER SIZE\nexport const ASSET_OFFSET_Y = (GAME_LAUNCHER_SIZE / 2) * (12.5 / 100);\n\nconst RADIAN = Math.PI / 180;\n\nexport const BORDER_WIDTH = 2;\n\n// delta created by a segment from x axis is 30deg\n// sin30 = delta/(CARD_SIZE/2)\nexport const delta =\n Math.sin(30 * RADIAN) * (GAME_LAUNCHER_SIZE / 2 - GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH);\n"],"names":["GAME_LAUNCHER_ASSET_PADDING","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_PROGRESS_RING_STROKE_WIDTH"],"mappings":";AAEa,MAAAA,IAA+BC,IAAqB,OAAQ,KAG5DC,IAA2C;"}
@@ -1,73 +1,94 @@
1
- import { ProjectType as i } from "../../../games/web-view/enums/project-type-enum.js";
2
- const a = (t) => {
3
- let s = null;
4
- return t && (s = {
5
- points: t.points,
6
- streakDays: t.streak_days,
7
- streakReduction: t.streak_reduction,
8
- streakDaysBeforeReduction: t.streak_days_before_reduction,
9
- streakStatus: t.streak_status,
10
- tournamentRank: t.tournament_rank,
1
+ import { ProjectType as r } from "../../../games/web-view/enums/project-type-enum.js";
2
+ const m = (e) => {
3
+ if (!e) return null;
4
+ const s = {
5
+ points: e.points,
6
+ streakDays: e.streak_days,
7
+ streakReduction: e.streak_reduction,
8
+ streakDaysBeforeReduction: e.streak_days_before_reduction,
9
+ streakStatus: e.streak_status,
10
+ tournamentRank: e.tournament_rank,
11
11
  projects: {},
12
12
  timestamps: {
13
- startTimestamp: t.timestamps.start_timestamp,
14
- endTimestamp: t.timestamps.end_timestamp,
15
- current: t.timestamps.current
13
+ startTimestamp: e.timestamps.start_timestamp,
14
+ endTimestamp: e.timestamps.end_timestamp,
15
+ current: e.timestamps.current
16
16
  }
17
- }, t.projects.games && (s.projects.games = {
18
- label: t.projects.games.label,
19
- type: i.GAME,
17
+ };
18
+ return e.projects.games && (s.projects.games = {
19
+ label: e.projects.games.label,
20
+ type: r.GAME,
20
21
  initialProgressValue: 0,
21
- data: t.projects.games.data.map((e) => ({
22
- id: e.id,
23
- name: e.name,
24
- cardLottie: e.card,
25
- tutorial: e.tutorial,
26
- variant: e.variant,
27
- isPlayed: e.played
22
+ data: e.projects.games.data.map((t) => ({
23
+ id: t.id,
24
+ name: t.name,
25
+ cardLottie: t.card,
26
+ tutorial: t.tutorial,
27
+ variant: t.variant,
28
+ isPlayed: t.played,
29
+ wonToday: t.won_today,
30
+ lostToday: t.lost_today,
31
+ displayNameImage: t.display_name_image || ""
28
32
  }))
29
- }), t.projects.puzzles && (s.projects.puzzles = {
30
- label: t.projects.puzzles.label,
31
- type: i.PUZZLE,
33
+ }), e.projects.puzzles && (s.projects.puzzles = {
34
+ label: e.projects.puzzles.label,
35
+ type: r.PUZZLE,
32
36
  initialProgressValue: 0,
33
- data: t.projects.puzzles.data.map((e) => ({
34
- id: e.id,
35
- name: e.name,
36
- cardLottie: e.card,
37
- tutorial: e.tutorial,
38
- variant: e.variant,
39
- question: e.question,
40
- isHintSeen: e.is_hint_seen,
41
- solved: e.solved
42
- }))
43
- }), t.projects.lessons && (s.projects.lessons = {
44
- label: t.projects.lessons.label,
45
- type: i.LESSON,
37
+ data: e.projects.puzzles.data.map((t) => {
38
+ var i, a;
39
+ return {
40
+ id: t.id,
41
+ name: t.name,
42
+ cardLottie: t.card,
43
+ tutorial: t.tutorial,
44
+ variant: t.variant,
45
+ question: t.question,
46
+ isHintSeen: t.is_hint_seen,
47
+ solved: t.solved,
48
+ firstAttempt: {
49
+ solvedWithHint: ((i = t.first_attempt) == null ? void 0 : i.solved_with_hint) ?? !1,
50
+ pointsScored: ((a = t.first_attempt) == null ? void 0 : a.points_scored) ?? 0
51
+ },
52
+ displayNameImage: t.display_name_image || ""
53
+ };
54
+ })
55
+ }), e.projects.lessons && (s.projects.lessons = {
56
+ label: e.projects.lessons.label,
57
+ type: r.LESSON,
46
58
  initialProgressValue: 0,
47
- data: t.projects.lessons.data.map((e) => ({
48
- id: e.id,
49
- name: e.name,
50
- cardLottie: e.card,
51
- tutorial: e.tutorial,
52
- variant: e.variant,
53
- sessionId: e.session_id,
54
- miniGameIdentifier: e.mini_game_identifier,
55
- targetQuestions: e.target_questions,
56
- status: e.status
57
- }))
58
- }), t.projects.tables && (s.projects.tables = {
59
- label: t.projects.tables.label,
60
- type: i.TABLE,
59
+ data: e.projects.lessons.data.map((t) => {
60
+ var i, a, o;
61
+ return {
62
+ id: t.id,
63
+ name: t.name,
64
+ cardLottie: t.card,
65
+ tutorial: t.tutorial,
66
+ variant: t.variant,
67
+ sessionId: t.session_id,
68
+ miniGameIdentifier: t.mini_game_identifier,
69
+ targetQuestions: t.target_questions,
70
+ status: t.status,
71
+ firstAttempt: {
72
+ pointsScored: ((i = t.first_attempt) == null ? void 0 : i.points_scored) ?? 0,
73
+ accuracy: ((a = t.first_attempt) == null ? void 0 : a.accuracy) ?? 0,
74
+ grossTimeTaken: ((o = t.first_attempt) == null ? void 0 : o.gross_time_taken) ?? 0
75
+ },
76
+ displayNameImage: t.display_name_image || ""
77
+ };
78
+ })
79
+ }), e.projects.tables && (s.projects.tables = {
80
+ label: e.projects.tables.label,
81
+ type: r.TABLE,
61
82
  data: {
62
- infiniteModeHighScore: t.projects.tables.data.infinite_mode_high_score,
63
- tableList: t.projects.tables.data.table_wise_details.map((e) => ({
64
- tableNumber: e.table_number,
65
- stars: e.stars
83
+ infiniteModeHighScore: e.projects.tables.data.infinite_mode_high_score,
84
+ tableList: e.projects.tables.data.table_wise_details.map((t) => ({
85
+ tableNumber: t.table_number,
86
+ stars: t.stars
66
87
  }))
67
88
  }
68
- })), s;
89
+ }), s;
69
90
  };
70
91
  export {
71
- a as transformCircleHomeData
92
+ m as transformCircleHomeData
72
93
  };
73
94
  //# sourceMappingURL=helper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.ts"],"sourcesContent":["import { ProjectType } from '../../../games/web-view/enums';\nimport type { IGetCircleHomeResponseModel } from '../../api/get-content-for-today/get-circle-home-api-types';\nimport type {\n ICircleHomeDetails,\n TStreakStatus,\n TTableMode,\n} from './use-get-circle-home-dal-types';\n\nexport const transformCircleHomeData = (data: IGetCircleHomeResponseModel | null) => {\n let circleHomeDetails: ICircleHomeDetails | null = null;\n\n if (data) {\n circleHomeDetails = {\n points: data.points,\n streakDays: data.streak_days,\n streakReduction: data.streak_reduction,\n streakDaysBeforeReduction: data.streak_days_before_reduction,\n streakStatus: data.streak_status as TStreakStatus,\n tournamentRank: data.tournament_rank,\n projects: {},\n timestamps: {\n startTimestamp: data.timestamps.start_timestamp,\n endTimestamp: data.timestamps.end_timestamp,\n current: data.timestamps.current,\n },\n };\n\n if (data.projects.games) {\n circleHomeDetails.projects.games = {\n label: data.projects.games.label,\n type: ProjectType.GAME,\n initialProgressValue: 0,\n data: data.projects.games.data.map(game => ({\n id: game.id,\n name: game.name,\n cardLottie: game.card,\n tutorial: game.tutorial,\n variant: game.variant,\n isPlayed: game.played,\n })),\n };\n }\n\n if (data.projects.puzzles) {\n circleHomeDetails.projects.puzzles = {\n label: data.projects.puzzles.label,\n type: ProjectType.PUZZLE,\n initialProgressValue: 0,\n data: data.projects.puzzles.data.map(puzzle => ({\n id: puzzle.id,\n name: puzzle.name,\n cardLottie: puzzle.card,\n tutorial: puzzle.tutorial,\n variant: puzzle.variant,\n question: puzzle.question,\n isHintSeen: puzzle.is_hint_seen,\n solved: puzzle.solved,\n })),\n };\n }\n\n if (data.projects.lessons) {\n circleHomeDetails.projects.lessons = {\n label: data.projects.lessons.label,\n type: ProjectType.LESSON,\n initialProgressValue: 0,\n data: data.projects.lessons.data.map(lesson => ({\n id: lesson.id,\n name: lesson.name,\n cardLottie: lesson.card,\n tutorial: lesson.tutorial,\n variant: lesson.variant,\n sessionId: lesson.session_id,\n miniGameIdentifier: lesson.mini_game_identifier,\n targetQuestions: lesson.target_questions,\n status: lesson.status,\n })),\n };\n }\n\n if (data.projects.tables) {\n circleHomeDetails.projects.tables = {\n label: data.projects.tables.label,\n type: ProjectType.TABLE,\n data: {\n infiniteModeHighScore: data.projects.tables.data.infinite_mode_high_score,\n tableList: data.projects.tables.data.table_wise_details.map(table => ({\n tableNumber: table.table_number,\n stars: table.stars as TTableMode[],\n })),\n },\n };\n }\n }\n\n return circleHomeDetails;\n};\n"],"names":["transformCircleHomeData","data","circleHomeDetails","ProjectType","game","puzzle","lesson","table"],"mappings":";AAQa,MAAAA,IAA0B,CAACC,MAA6C;AACnF,MAAIC,IAA+C;AAEnD,SAAID,MACkBC,IAAA;AAAA,IAClB,QAAQD,EAAK;AAAA,IACb,YAAYA,EAAK;AAAA,IACjB,iBAAiBA,EAAK;AAAA,IACtB,2BAA2BA,EAAK;AAAA,IAChC,cAAcA,EAAK;AAAA,IACnB,gBAAgBA,EAAK;AAAA,IACrB,UAAU,CAAC;AAAA,IACX,YAAY;AAAA,MACV,gBAAgBA,EAAK,WAAW;AAAA,MAChC,cAAcA,EAAK,WAAW;AAAA,MAC9B,SAASA,EAAK,WAAW;AAAA,IAC3B;AAAA,EAAA,GAGEA,EAAK,SAAS,UAChBC,EAAkB,SAAS,QAAQ;AAAA,IACjC,OAAOD,EAAK,SAAS,MAAM;AAAA,IAC3B,MAAME,EAAY;AAAA,IAClB,sBAAsB;AAAA,IACtB,MAAMF,EAAK,SAAS,MAAM,KAAK,IAAI,CAASG,OAAA;AAAA,MAC1C,IAAIA,EAAK;AAAA,MACT,MAAMA,EAAK;AAAA,MACX,YAAYA,EAAK;AAAA,MACjB,UAAUA,EAAK;AAAA,MACf,SAASA,EAAK;AAAA,MACd,UAAUA,EAAK;AAAA,IAAA,EACf;AAAA,EAAA,IAIFH,EAAK,SAAS,YAChBC,EAAkB,SAAS,UAAU;AAAA,IACnC,OAAOD,EAAK,SAAS,QAAQ;AAAA,IAC7B,MAAME,EAAY;AAAA,IAClB,sBAAsB;AAAA,IACtB,MAAMF,EAAK,SAAS,QAAQ,KAAK,IAAI,CAAWI,OAAA;AAAA,MAC9C,IAAIA,EAAO;AAAA,MACX,MAAMA,EAAO;AAAA,MACb,YAAYA,EAAO;AAAA,MACnB,UAAUA,EAAO;AAAA,MACjB,SAASA,EAAO;AAAA,MAChB,UAAUA,EAAO;AAAA,MACjB,YAAYA,EAAO;AAAA,MACnB,QAAQA,EAAO;AAAA,IAAA,EACf;AAAA,EAAA,IAIFJ,EAAK,SAAS,YAChBC,EAAkB,SAAS,UAAU;AAAA,IACnC,OAAOD,EAAK,SAAS,QAAQ;AAAA,IAC7B,MAAME,EAAY;AAAA,IAClB,sBAAsB;AAAA,IACtB,MAAMF,EAAK,SAAS,QAAQ,KAAK,IAAI,CAAWK,OAAA;AAAA,MAC9C,IAAIA,EAAO;AAAA,MACX,MAAMA,EAAO;AAAA,MACb,YAAYA,EAAO;AAAA,MACnB,UAAUA,EAAO;AAAA,MACjB,SAASA,EAAO;AAAA,MAChB,WAAWA,EAAO;AAAA,MAClB,oBAAoBA,EAAO;AAAA,MAC3B,iBAAiBA,EAAO;AAAA,MACxB,QAAQA,EAAO;AAAA,IAAA,EACf;AAAA,EAAA,IAIFL,EAAK,SAAS,WAChBC,EAAkB,SAAS,SAAS;AAAA,IAClC,OAAOD,EAAK,SAAS,OAAO;AAAA,IAC5B,MAAME,EAAY;AAAA,IAClB,MAAM;AAAA,MACJ,uBAAuBF,EAAK,SAAS,OAAO,KAAK;AAAA,MACjD,WAAWA,EAAK,SAAS,OAAO,KAAK,mBAAmB,IAAI,CAAUM,OAAA;AAAA,QACpE,aAAaA,EAAM;AAAA,QACnB,OAAOA,EAAM;AAAA,MAAA,EACb;AAAA,IACJ;AAAA,EAAA,KAKCL;AACT;"}
1
+ {"version":3,"file":"helper.js","sources":["../../../../../../src/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/helper.ts"],"sourcesContent":["import { ProjectType } from '../../../games/web-view/enums';\nimport type { IGetCircleHomeResponseModel } from '../../api/get-content-for-today/get-circle-home-api-types';\nimport type {\n ICircleHomeDetails,\n TSkillStatus,\n TStreakStatus,\n TTableMode,\n} from './use-get-circle-home-dal-types';\n\nexport const transformCircleHomeData = (\n data: IGetCircleHomeResponseModel | null,\n): ICircleHomeDetails | null => {\n if (!data) return null;\n\n const circleHomeDetails: ICircleHomeDetails = {\n points: data.points,\n streakDays: data.streak_days,\n streakReduction: data.streak_reduction,\n streakDaysBeforeReduction: data.streak_days_before_reduction,\n streakStatus: data.streak_status as TStreakStatus,\n tournamentRank: data.tournament_rank,\n projects: {},\n timestamps: {\n startTimestamp: data.timestamps.start_timestamp,\n endTimestamp: data.timestamps.end_timestamp,\n current: data.timestamps.current,\n },\n };\n\n if (data.projects.games) {\n circleHomeDetails.projects.games = {\n label: data.projects.games.label,\n type: ProjectType.GAME,\n initialProgressValue: 0,\n data: data.projects.games.data.map(game => ({\n id: game.id,\n name: game.name,\n cardLottie: game.card,\n tutorial: game.tutorial,\n variant: game.variant,\n isPlayed: game.played,\n wonToday: game.won_today,\n lostToday: game.lost_today,\n displayNameImage: game.display_name_image || '',\n })),\n };\n }\n\n if (data.projects.puzzles) {\n circleHomeDetails.projects.puzzles = {\n label: data.projects.puzzles.label,\n type: ProjectType.PUZZLE,\n initialProgressValue: 0,\n data: data.projects.puzzles.data.map(puzzle => ({\n id: puzzle.id,\n name: puzzle.name,\n cardLottie: puzzle.card,\n tutorial: puzzle.tutorial,\n variant: puzzle.variant,\n question: puzzle.question,\n isHintSeen: puzzle.is_hint_seen,\n solved: puzzle.solved,\n firstAttempt: {\n solvedWithHint: puzzle.first_attempt?.solved_with_hint ?? false,\n pointsScored: puzzle.first_attempt?.points_scored ?? 0,\n },\n displayNameImage: puzzle.display_name_image || '',\n })),\n };\n }\n\n if (data.projects.lessons) {\n circleHomeDetails.projects.lessons = {\n label: data.projects.lessons.label,\n type: ProjectType.LESSON,\n initialProgressValue: 0,\n data: data.projects.lessons.data.map(lesson => ({\n id: lesson.id,\n name: lesson.name,\n cardLottie: lesson.card,\n tutorial: lesson.tutorial,\n variant: lesson.variant,\n sessionId: lesson.session_id,\n miniGameIdentifier: lesson.mini_game_identifier,\n targetQuestions: lesson.target_questions,\n status: lesson.status as TSkillStatus,\n firstAttempt: {\n pointsScored: lesson.first_attempt?.points_scored ?? 0,\n accuracy: lesson.first_attempt?.accuracy ?? 0,\n grossTimeTaken: lesson.first_attempt?.gross_time_taken ?? 0,\n },\n displayNameImage: lesson.display_name_image || '',\n })),\n };\n }\n\n if (data.projects.tables) {\n circleHomeDetails.projects.tables = {\n label: data.projects.tables.label,\n type: ProjectType.TABLE,\n data: {\n infiniteModeHighScore: data.projects.tables.data.infinite_mode_high_score,\n tableList: data.projects.tables.data.table_wise_details.map(table => ({\n tableNumber: table.table_number,\n stars: table.stars as TTableMode[],\n })),\n },\n };\n }\n\n return circleHomeDetails;\n};\n"],"names":["transformCircleHomeData","data","circleHomeDetails","ProjectType","game","puzzle","_a","_b","lesson","_c","table"],"mappings":";AASa,MAAAA,IAA0B,CACrCC,MAC8B;AAC1B,MAAA,CAACA,EAAa,QAAA;AAElB,QAAMC,IAAwC;AAAA,IAC5C,QAAQD,EAAK;AAAA,IACb,YAAYA,EAAK;AAAA,IACjB,iBAAiBA,EAAK;AAAA,IACtB,2BAA2BA,EAAK;AAAA,IAChC,cAAcA,EAAK;AAAA,IACnB,gBAAgBA,EAAK;AAAA,IACrB,UAAU,CAAC;AAAA,IACX,YAAY;AAAA,MACV,gBAAgBA,EAAK,WAAW;AAAA,MAChC,cAAcA,EAAK,WAAW;AAAA,MAC9B,SAASA,EAAK,WAAW;AAAA,IAC3B;AAAA,EAAA;AAGE,SAAAA,EAAK,SAAS,UAChBC,EAAkB,SAAS,QAAQ;AAAA,IACjC,OAAOD,EAAK,SAAS,MAAM;AAAA,IAC3B,MAAME,EAAY;AAAA,IAClB,sBAAsB;AAAA,IACtB,MAAMF,EAAK,SAAS,MAAM,KAAK,IAAI,CAASG,OAAA;AAAA,MAC1C,IAAIA,EAAK;AAAA,MACT,MAAMA,EAAK;AAAA,MACX,YAAYA,EAAK;AAAA,MACjB,UAAUA,EAAK;AAAA,MACf,SAASA,EAAK;AAAA,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AAcF,IAAAE,EAAO,kBAAP,gBAAAF,EAAsB,kBAAiB;AAAA,UACrD,YAAUC,IAAAC,EAAO,kBAAP,gBAAAD,EAAsB,aAAY;AAAA,UAC5C,kBAAgBE,IAAAD,EAAO,kBAAP,gBAAAC,EAAsB,qBAAoB;AAAA,QAC5D;AAAA,QACA,kBAAkBD,EAAO,sBAAsB;AAAA,MAAA;AAAA,KAC/C;AAAA,EAAA,IAIFP,EAAK,SAAS,WAChBC,EAAkB,SAAS,SAAS;AAAA,IAClC,OAAOD,EAAK,SAAS,OAAO;AAAA,IAC5B,MAAME,EAAY;AAAA,IAClB,MAAM;AAAA,MACJ,uBAAuBF,EAAK,SAAS,OAAO,KAAK;AAAA,MACjD,WAAWA,EAAK,SAAS,OAAO,KAAK,mBAAmB,IAAI,CAAUS,OAAA;AAAA,QACpE,aAAaA,EAAM;AAAA,QACnB,OAAOA,EAAM;AAAA,MAAA,EACb;AAAA,IACJ;AAAA,EAAA,IAIGR;AACT;"}
@@ -0,0 +1,246 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { memo as S, useRef as h, useCallback as c, useMemo as b } from "react";
3
+ import { ILLUSTRATIONS as i } from "../../../assets/illustrations/illustrations.js";
4
+ import { LOTTIE as v } from "../../../assets/lottie/lottie.js";
5
+ import { CircularLoader as D } from "../../ui/loader/circular-loader/circular-loader.js";
6
+ import B from "../../ui/lottie-animation/lottie-animation.js";
7
+ import { useCircleSounds as M } from "../hooks/use-circle-sounds/use-circle-sounds.js";
8
+ import { CircleSoundKey as u } from "../hooks/use-circle-sounds/use-circle-sounds-enums.js";
9
+ import { GAME_LAUNCHER_SIZE as W } from "./comps/card-container/constants.js";
10
+ import { BadgesGroup as d } from "./comps/carousel-badge/carousel-badge.js";
11
+ import { Carousel as y } from "./comps/carousel/carousel.js";
12
+ import { CircularGameCard as A } from "./comps/circular-game-card/circular-game-card.js";
13
+ import { GAME_LAUNCHER_ASSET_PADDING as Y } from "./comps/circular-game-card/constants.js";
14
+ import { TablesCard as g } from "./comps/tables-card/tables-card.js";
15
+ import { GAME_LAUNCHER_ANALYTICS_EVENTS as I } from "./game-launcher-analytics-events.js";
16
+ import { formatDuration as x } from "./helpers.js";
17
+ import { ProjectType as p } from "../games/web-view/enums/project-type-enum.js";
18
+ const T = W + Y, le = S(
19
+ ({ onSegmentClick: s, data: a, isLoading: N, defaultIndex: G = 0 }) => {
20
+ const O = h(null), { playSwipeSound: f, play: r } = M(), E = c(
21
+ (l) => {
22
+ l.status !== "completed" && (r(u.GAME_CARD_CLICK), s(l, p.LESSON));
23
+ },
24
+ [s, r]
25
+ ), L = c(
26
+ (l) => {
27
+ r(u.GAME_CARD_CLICK), s(l, p.TABLE);
28
+ },
29
+ [s, r]
30
+ ), _ = c(
31
+ (l) => {
32
+ r(u.GAME_CARD_CLICK), s(l, p.GAME);
33
+ },
34
+ [s, r]
35
+ ), C = c(
36
+ (l) => {
37
+ r(u.GAME_CARD_CLICK), s(l, p.PUZZLE);
38
+ },
39
+ [s, r]
40
+ ), P = b(() => {
41
+ const l = [];
42
+ if (!a) return l;
43
+ if (a.games) {
44
+ const m = a.games.label;
45
+ a.games.data.forEach((e, n) => {
46
+ l.push({
47
+ ...e.isPlayed && {
48
+ isCompleted: !0,
49
+ carouselBadge: /* @__PURE__ */ o(
50
+ d,
51
+ {
52
+ badges: [
53
+ {
54
+ label: "Won",
55
+ color: "YELLOW_4",
56
+ illustration: i.UP_ARROW_BADGE,
57
+ value: e.wonToday
58
+ },
59
+ {
60
+ label: "Loss",
61
+ color: "ORANGE_4",
62
+ illustration: i.DOWN_ARROW_BADGE,
63
+ value: e.lostToday
64
+ }
65
+ ]
66
+ }
67
+ )
68
+ },
69
+ element: /* @__PURE__ */ o(
70
+ A,
71
+ {
72
+ data: {
73
+ card: e.cardLottie,
74
+ name: e.name,
75
+ isCompleted: !1,
76
+ displayNameImage: e.displayNameImage,
77
+ onPress: () => _(e)
78
+ },
79
+ label: m,
80
+ value: e.isPlayed ? 1 : 0,
81
+ maxValue: 1
82
+ },
83
+ `game-${n}`
84
+ )
85
+ });
86
+ });
87
+ }
88
+ if (a.lessons) {
89
+ const m = a.lessons.label;
90
+ a.lessons.data.forEach((e, n) => {
91
+ const t = e.status === "completed";
92
+ l.push({
93
+ ...t && {
94
+ isCompleted: t,
95
+ carouselBadge: /* @__PURE__ */ o(
96
+ d,
97
+ {
98
+ badges: [
99
+ {
100
+ label: "%",
101
+ color: "YELLOW_4",
102
+ illustration: i.ACCURACY_BADGE,
103
+ value: e.firstAttempt.accuracy
104
+ },
105
+ {
106
+ label: "",
107
+ color: "YELLOW_4",
108
+ illustration: i.CLOCK_BADGE,
109
+ value: x(e.firstAttempt.grossTimeTaken)
110
+ },
111
+ {
112
+ label: "",
113
+ color: "YELLOW_4",
114
+ illustration: i.POINTS_BADGE,
115
+ value: e.firstAttempt.pointsScored
116
+ }
117
+ ]
118
+ }
119
+ )
120
+ },
121
+ element: /* @__PURE__ */ o(
122
+ A,
123
+ {
124
+ data: {
125
+ card: e.cardLottie,
126
+ name: e.name,
127
+ isCompleted: t,
128
+ displayNameImage: e.displayNameImage,
129
+ onPress: () => E(e)
130
+ },
131
+ label: m,
132
+ value: t ? 1 : 0,
133
+ maxValue: 1
134
+ },
135
+ `lesson-${n}`
136
+ )
137
+ });
138
+ });
139
+ }
140
+ if (a.puzzles) {
141
+ const m = a.puzzles.label;
142
+ a.puzzles.data.forEach((e, n) => {
143
+ const t = e.solved;
144
+ l.push({
145
+ ...t && {
146
+ isCompleted: t,
147
+ carouselBadge: /* @__PURE__ */ o(
148
+ d,
149
+ {
150
+ badges: [
151
+ {
152
+ label: "",
153
+ color: "YELLOW_4",
154
+ illustration: i.STAR_BADGE,
155
+ value: e.firstAttempt.solvedWithHint ? "Solved with hint" : "Solved"
156
+ },
157
+ {
158
+ label: "",
159
+ color: "YELLOW_4",
160
+ illustration: i.POINTS_BADGE,
161
+ value: e.firstAttempt.pointsScored
162
+ }
163
+ ]
164
+ }
165
+ )
166
+ },
167
+ element: /* @__PURE__ */ o(
168
+ A,
169
+ {
170
+ data: {
171
+ card: e.cardLottie,
172
+ name: e.name,
173
+ isCompleted: t,
174
+ displayNameImage: e.displayNameImage,
175
+ onPress: () => C(e)
176
+ },
177
+ label: m,
178
+ value: t ? 1 : 0,
179
+ maxValue: 1
180
+ },
181
+ `puzzle-${n}`
182
+ )
183
+ });
184
+ });
185
+ }
186
+ return a.tables && l.push({
187
+ isCompleted: !1,
188
+ element: /* @__PURE__ */ o(
189
+ g,
190
+ {
191
+ label: a.tables.label,
192
+ data: a.tables.data,
193
+ onPress: L,
194
+ openModesOfTable: a.tables.openModesOfTable
195
+ },
196
+ "tables-card"
197
+ )
198
+ }), l;
199
+ }, [
200
+ a,
201
+ _,
202
+ E,
203
+ C,
204
+ L
205
+ ]), R = b(
206
+ () => [
207
+ /* @__PURE__ */ o(
208
+ B,
209
+ {
210
+ src: v.SLEEPY_BOI,
211
+ width: T,
212
+ height: T
213
+ }
214
+ )
215
+ ],
216
+ []
217
+ );
218
+ return N ? /* @__PURE__ */ o(D, {}) : a ? /* @__PURE__ */ o(
219
+ y,
220
+ {
221
+ ref: O,
222
+ items: P,
223
+ defaultIndex: G,
224
+ onNext: f,
225
+ onPrev: f,
226
+ analyticsNext: {
227
+ analyticsLabel: I.NEXT_ACTIVITY
228
+ },
229
+ analyticsPrev: {
230
+ analyticsLabel: I.PREV_ACTIVITY
231
+ }
232
+ }
233
+ ) : /* @__PURE__ */ o(
234
+ y,
235
+ {
236
+ items: [{ element: R }],
237
+ analyticsNext: { analyticsLabel: "" },
238
+ analyticsPrev: { analyticsLabel: "" }
239
+ }
240
+ );
241
+ }
242
+ );
243
+ export {
244
+ le as GameLauncherV2
245
+ };
246
+ //# sourceMappingURL=game-launcher-v2.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"game-launcher-v2.js","sources":["../../../../src/features/circle-games/game-launcher/game-launcher-v2.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { memo, useCallback, useMemo, useRef } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport { LOTTIE } from '../../../assets/lottie/lottie';\nimport { CircularLoader } from '../../ui/loader/circular-loader/circular-loader';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport { ProjectType } from '../games/web-view/enums';\nimport { useCircleSounds } from '../hooks/use-circle-sounds/use-circle-sounds';\nimport { CircleSoundKey } from '../hooks/use-circle-sounds/use-circle-sounds-enums';\nimport { GAME_LAUNCHER_SIZE } from './comps/card-container/constants';\nimport { BadgesGroup } from './comps/carousel-badge/carousel-badge';\nimport { Carousel } from './comps/carousel/carousel';\nimport type { ICarouselItemWithMeta, ICarouselRefs } from './comps/carousel/carousel-types';\nimport { CircularGameCard } from './comps/circular-game-card/circular-game-card';\nimport { GAME_LAUNCHER_ASSET_PADDING } from './comps/circular-game-card/constants';\nimport { TablesCard } from './comps/tables-card/tables-card';\nimport type { ITableDetails } from './comps/tables-card/tables-card-types';\nimport type {\n Game,\n Lesson,\n Puzzle,\n} from './dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport { GAME_LAUNCHER_ANALYTICS_EVENTS } from './game-launcher-analytics-events';\nimport type { IGameLauncherProps } from './game-launcher-types';\nimport { formatDuration } from './helpers';\n\nconst sleepyBoiDimension = GAME_LAUNCHER_SIZE + GAME_LAUNCHER_ASSET_PADDING;\n\nexport const GameLauncherV2: FC<IGameLauncherProps> = memo(\n ({ onSegmentClick, data, isLoading, defaultIndex = 0 }) => {\n const carouselRefs = useRef<ICarouselRefs>(null) as React.RefObject<ICarouselRefs>;\n\n const { playSwipeSound, play } = useCircleSounds();\n\n const handleLessonSegmentClick = useCallback(\n (lesson: Lesson) => {\n if (lesson.status !== 'completed') {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(lesson, ProjectType.LESSON);\n }\n },\n [onSegmentClick, play],\n );\n\n const onTableSegmentClick = useCallback(\n (table: ITableDetails) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(table, ProjectType.TABLE);\n },\n [onSegmentClick, play],\n );\n\n const handleGameSegmentClick = useCallback(\n (game: Game) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(game, ProjectType.GAME);\n },\n [onSegmentClick, play],\n );\n\n const handlePuzzleSegmentClick = useCallback(\n (puzzle: Puzzle) => {\n play(CircleSoundKey.GAME_CARD_CLICK);\n onSegmentClick(puzzle, ProjectType.PUZZLE);\n },\n [onSegmentClick, play],\n );\n\n const items = useMemo<ICarouselItemWithMeta[]>(() => {\n const mergedItems: ICarouselItemWithMeta[] = [];\n\n if (!data) return mergedItems;\n\n // Games\n if (data.games) {\n const label = data.games.label;\n\n data.games.data.forEach((game, index) => {\n mergedItems.push({\n ...(game.isPlayed && {\n isCompleted: true,\n carouselBadge: (\n <BadgesGroup\n badges={[\n {\n label: 'Won',\n color: 'YELLOW_4',\n illustration: ILLUSTRATIONS.UP_ARROW_BADGE,\n value: game.wonToday,\n },\n {\n label: 'Loss',\n color: 'ORANGE_4',\n illustration: ILLUSTRATIONS.DOWN_ARROW_BADGE,\n value: game.lostToday,\n },\n ]}\n />\n ),\n }),\n element: (\n <CircularGameCard\n key={`game-${index}`}\n data={{\n card: game.cardLottie,\n name: game.name,\n isCompleted: false,\n displayNameImage: game.displayNameImage,\n onPress: () => handleGameSegmentClick(game),\n }}\n label={label}\n value={game.isPlayed ? 1 : 0}\n maxValue={1}\n />\n ),\n });\n });\n }\n\n // Lessons\n if (data.lessons) {\n const label = data.lessons.label;\n\n data.lessons.data.forEach((lesson, index) => {\n const isCompleted = lesson.status === 'completed';\n\n mergedItems.push({\n ...(isCompleted && {\n isCompleted,\n carouselBadge: (\n <BadgesGroup\n badges={[\n {\n label: '%',\n color: 'YELLOW_4',\n illustration: ILLUSTRATIONS.ACCURACY_BADGE,\n value: lesson.firstAttempt.accuracy,\n },\n {\n label: '',\n color: 'YELLOW_4',\n illustration: ILLUSTRATIONS.CLOCK_BADGE,\n value: formatDuration(lesson.firstAttempt.grossTimeTaken),\n },\n {\n label: '',\n color: 'YELLOW_4',\n illustration: ILLUSTRATIONS.POINTS_BADGE,\n value: lesson.firstAttempt.pointsScored,\n },\n ]}\n />\n ),\n }),\n element: (\n <CircularGameCard\n key={`lesson-${index}`}\n data={{\n card: lesson.cardLottie,\n name: lesson.name,\n isCompleted,\n displayNameImage: lesson.displayNameImage,\n onPress: () => handleLessonSegmentClick(lesson),\n }}\n label={label}\n value={isCompleted ? 1 : 0}\n maxValue={1}\n />\n ),\n });\n });\n }\n\n // Puzzles\n if (data.puzzles) {\n const label = data.puzzles.label;\n\n data.puzzles.data.forEach((puzzle, index) => {\n const isCompleted = puzzle.solved;\n\n mergedItems.push({\n ...(isCompleted && {\n isCompleted,\n carouselBadge: (\n <BadgesGroup\n badges={[\n {\n label: '',\n color: 'YELLOW_4',\n illustration: ILLUSTRATIONS.STAR_BADGE,\n value: puzzle.firstAttempt.solvedWithHint ? 'Solved with hint' : 'Solved',\n },\n {\n label: '',\n color: 'YELLOW_4',\n illustration: ILLUSTRATIONS.POINTS_BADGE,\n value: puzzle.firstAttempt.pointsScored,\n },\n ]}\n />\n ),\n }),\n element: (\n <CircularGameCard\n key={`puzzle-${index}`}\n data={{\n card: puzzle.cardLottie,\n name: puzzle.name,\n isCompleted,\n displayNameImage: puzzle.displayNameImage,\n onPress: () => handlePuzzleSegmentClick(puzzle),\n }}\n label={label}\n value={isCompleted ? 1 : 0}\n maxValue={1}\n />\n ),\n });\n });\n }\n\n // Tables\n if (data.tables) {\n mergedItems.push({\n isCompleted: false,\n element: (\n <TablesCard\n key=\"tables-card\"\n label={data.tables.label}\n data={data.tables.data}\n onPress={onTableSegmentClick}\n openModesOfTable={data.tables.openModesOfTable}\n />\n ),\n });\n }\n\n return mergedItems;\n }, [\n data,\n handleGameSegmentClick,\n handleLessonSegmentClick,\n handlePuzzleSegmentClick,\n onTableSegmentClick,\n ]);\n\n const sleepyBoiItem = useMemo(\n () => [\n <LottieAnimation\n src={LOTTIE.SLEEPY_BOI}\n width={sleepyBoiDimension}\n height={sleepyBoiDimension}\n />,\n ],\n [],\n );\n\n if (isLoading) return <CircularLoader />;\n\n if (!data) {\n return (\n <Carousel\n items={[{ element: sleepyBoiItem }]}\n analyticsNext={{ analyticsLabel: '' }}\n analyticsPrev={{ analyticsLabel: '' }}\n />\n );\n }\n\n return (\n <Carousel\n ref={carouselRefs}\n items={items}\n defaultIndex={defaultIndex}\n onNext={playSwipeSound}\n onPrev={playSwipeSound}\n analyticsNext={{\n analyticsLabel: GAME_LAUNCHER_ANALYTICS_EVENTS.NEXT_ACTIVITY,\n }}\n analyticsPrev={{\n analyticsLabel: GAME_LAUNCHER_ANALYTICS_EVENTS.PREV_ACTIVITY,\n }}\n />\n );\n },\n);\n"],"names":["sleepyBoiDimension","GAME_LAUNCHER_SIZE","GAME_LAUNCHER_ASSET_PADDING","GameLauncherV2","memo","onSegmentClick","data","isLoading","defaultIndex","carouselRefs","useRef","playSwipeSound","play","useCircleSounds","handleLessonSegmentClick","useCallback","lesson","CircleSoundKey","ProjectType","onTableSegmentClick","table","handleGameSegmentClick","game","handlePuzzleSegmentClick","puzzle","items","useMemo","mergedItems","label","index","jsx","BadgesGroup","ILLUSTRATIONS","CircularGameCard","isCompleted","formatDuration","TablesCard","sleepyBoiItem","LottieAnimation","LOTTIE","CircularLoader","Carousel","GAME_LAUNCHER_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;;;;;;;;AA2BA,MAAMA,IAAqBC,IAAqBC,GAEnCC,KAAyCC;AAAA,EACpD,CAAC,EAAE,gBAAAC,GAAgB,MAAAC,GAAM,WAAAC,GAAW,cAAAC,IAAe,QAAQ;AACnD,UAAAC,IAAeC,EAAsB,IAAI,GAEzC,EAAE,gBAAAC,GAAgB,MAAAC,EAAK,IAAIC,EAAgB,GAE3CC,IAA2BC;AAAA,MAC/B,CAACC,MAAmB;AACd,QAAAA,EAAO,WAAW,gBACpBJ,EAA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.floor(t / 60), s = t % 60, r = o > 0 ? `${o}m ` : "", c = `${s}s`;
3
+ return `${r}${c}`.trim();
4
+ }
5
+ export {
6
+ a as formatDuration
7
+ };
8
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sources":["../../../../src/features/circle-games/game-launcher/helpers.ts"],"sourcesContent":["export function formatDuration(ms: number): string {\n const totalSeconds = Math.floor(ms / 1000);\n const minutes = Math.floor(totalSeconds / 60);\n const seconds = totalSeconds % 60;\n\n const minPart = minutes > 0 ? `${minutes}m ` : '';\n const secPart = `${seconds}s`;\n\n return `${minPart}${secPart}`.trim();\n}\n"],"names":["formatDuration","ms","totalSeconds","minutes","seconds","minPart","secPart"],"mappings":"AAAO,SAASA,EAAeC,GAAoB;AACjD,QAAMC,IAAe,KAAK,MAAMD,IAAK,GAAI,GACnCE,IAAU,KAAK,MAAMD,IAAe,EAAE,GACtCE,IAAUF,IAAe,IAEzBG,IAAUF,IAAU,IAAI,GAAGA,CAAO,OAAO,IACzCG,IAAU,GAAGF,CAAO;AAE1B,SAAO,GAAGC,CAAO,GAAGC,CAAO,GAAG,KAAK;AACrC;"}
@@ -136,12 +136,16 @@ const F = (t, r) => {
136
136
  preference_code: n,
137
137
  preference_name: s,
138
138
  preference_description: i,
139
- lottie_key: u
139
+ preference_description_2: u,
140
+ lottie_key: c,
141
+ preference_category: d
140
142
  }) => ({
141
143
  id: n,
142
144
  label: s,
143
145
  description: i,
144
- lottie: u
146
+ lottie: c,
147
+ extendedDescription: u,
148
+ category: d
145
149
  })
146
150
  );
147
151
  }, W = (t, r, e, l, n) => {