@magmamath/students-features 0.6.6-rc.9 → 0.6.6

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 (192) hide show
  1. package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  2. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +5 -3
  3. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  4. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +3 -1
  5. package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  6. package/dist/commonjs/features/feedback/model/comments.js +5 -3
  7. package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
  8. package/dist/commonjs/features/feedback/model/model.js +7 -9
  9. package/dist/commonjs/features/feedback/model/model.js.map +1 -1
  10. package/dist/commonjs/index.js +0 -12
  11. package/dist/commonjs/index.js.map +1 -1
  12. package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
  13. package/dist/commonjs/shared/translation/localization/en.json +0 -5
  14. package/dist/commonjs/shared/translation/localization/gb.json +0 -5
  15. package/dist/commonjs/shared/translation/localization/sw.json +0 -5
  16. package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
  17. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +5 -3
  18. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  19. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +3 -1
  20. package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
  21. package/dist/module/features/feedback/model/comments.js +5 -3
  22. package/dist/module/features/feedback/model/comments.js.map +1 -1
  23. package/dist/module/features/feedback/model/model.js +7 -9
  24. package/dist/module/features/feedback/model/model.js.map +1 -1
  25. package/dist/module/index.js +0 -1
  26. package/dist/module/index.js.map +1 -1
  27. package/dist/module/shared/translation/localization/en.json +0 -5
  28. package/dist/module/shared/translation/localization/gb.json +0 -5
  29. package/dist/module/shared/translation/localization/sw.json +0 -5
  30. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +2 -1
  31. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  32. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  33. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  34. package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  35. package/dist/typescript/commonjs/index.d.ts +0 -1
  36. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  37. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
  38. package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -15
  39. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  40. package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -10
  41. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  42. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +2 -1
  43. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  44. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
  45. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  46. package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
  47. package/dist/typescript/module/index.d.ts +0 -1
  48. package/dist/typescript/module/index.d.ts.map +1 -1
  49. package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
  50. package/dist/typescript/module/shared/translation/constants.d.ts +0 -15
  51. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  52. package/dist/typescript/module/shared/translation/model.d.ts +0 -10
  53. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  54. package/package.json +5 -3
  55. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +2 -1
  56. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +7 -4
  57. package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +4 -2
  58. package/src/features/feedback/model/comments.ts +7 -7
  59. package/src/features/feedback/model/model.ts +6 -6
  60. package/src/index.ts +0 -1
  61. package/src/lib/helpers/helpers.ts +1 -1
  62. package/src/shared/translation/localization/en.json +0 -5
  63. package/src/shared/translation/localization/gb.json +0 -5
  64. package/src/shared/translation/localization/sw.json +0 -5
  65. package/dist/commonjs/features/gifCelebrations/GifCelebrations.js +0 -65
  66. package/dist/commonjs/features/gifCelebrations/GifCelebrations.js.map +0 -1
  67. package/dist/commonjs/features/gifCelebrations/assets/confetti.webp +0 -0
  68. package/dist/commonjs/features/gifCelebrations/assets/gifFallback.gif +0 -0
  69. package/dist/commonjs/features/gifCelebrations/components/Backdrop.js +0 -44
  70. package/dist/commonjs/features/gifCelebrations/components/Backdrop.js.map +0 -1
  71. package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js +0 -46
  72. package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js.map +0 -1
  73. package/dist/commonjs/features/gifCelebrations/components/Gif.js +0 -91
  74. package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +0 -1
  75. package/dist/commonjs/features/gifCelebrations/components/Progress.js +0 -96
  76. package/dist/commonjs/features/gifCelebrations/components/Progress.js.map +0 -1
  77. package/dist/commonjs/features/gifCelebrations/constants.js +0 -32
  78. package/dist/commonjs/features/gifCelebrations/constants.js.map +0 -1
  79. package/dist/commonjs/features/gifCelebrations/helpers.js +0 -111
  80. package/dist/commonjs/features/gifCelebrations/helpers.js.map +0 -1
  81. package/dist/commonjs/features/gifCelebrations/index.js +0 -20
  82. package/dist/commonjs/features/gifCelebrations/index.js.map +0 -1
  83. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.cache.js +0 -37
  84. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.cache.js.map +0 -1
  85. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js +0 -121
  86. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
  87. package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js +0 -14
  88. package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
  89. package/dist/commonjs/features/gifCelebrations/types/model.types.js +0 -6
  90. package/dist/commonjs/features/gifCelebrations/types/model.types.js.map +0 -1
  91. package/dist/commonjs/react-app-env.d.js +0 -2
  92. package/dist/commonjs/react-app-env.d.js.map +0 -1
  93. package/dist/commonjs/shared/constants.js +0 -9
  94. package/dist/commonjs/shared/constants.js.map +0 -1
  95. package/dist/module/features/gifCelebrations/GifCelebrations.js +0 -58
  96. package/dist/module/features/gifCelebrations/GifCelebrations.js.map +0 -1
  97. package/dist/module/features/gifCelebrations/assets/confetti.webp +0 -0
  98. package/dist/module/features/gifCelebrations/assets/gifFallback.gif +0 -0
  99. package/dist/module/features/gifCelebrations/components/Backdrop.js +0 -36
  100. package/dist/module/features/gifCelebrations/components/Backdrop.js.map +0 -1
  101. package/dist/module/features/gifCelebrations/components/ContentContainer.js +0 -38
  102. package/dist/module/features/gifCelebrations/components/ContentContainer.js.map +0 -1
  103. package/dist/module/features/gifCelebrations/components/Gif.js +0 -83
  104. package/dist/module/features/gifCelebrations/components/Gif.js.map +0 -1
  105. package/dist/module/features/gifCelebrations/components/Progress.js +0 -88
  106. package/dist/module/features/gifCelebrations/components/Progress.js.map +0 -1
  107. package/dist/module/features/gifCelebrations/constants.js +0 -28
  108. package/dist/module/features/gifCelebrations/constants.js.map +0 -1
  109. package/dist/module/features/gifCelebrations/helpers.js +0 -101
  110. package/dist/module/features/gifCelebrations/helpers.js.map +0 -1
  111. package/dist/module/features/gifCelebrations/index.js +0 -5
  112. package/dist/module/features/gifCelebrations/index.js.map +0 -1
  113. package/dist/module/features/gifCelebrations/model/GifCelebrations.cache.js +0 -32
  114. package/dist/module/features/gifCelebrations/model/GifCelebrations.cache.js.map +0 -1
  115. package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js +0 -116
  116. package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
  117. package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js +0 -9
  118. package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
  119. package/dist/module/features/gifCelebrations/types/model.types.js +0 -4
  120. package/dist/module/features/gifCelebrations/types/model.types.js.map +0 -1
  121. package/dist/module/react-app-env.d.js +0 -2
  122. package/dist/module/react-app-env.d.js.map +0 -1
  123. package/dist/module/shared/constants.js +0 -5
  124. package/dist/module/shared/constants.js.map +0 -1
  125. package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts +0 -10
  126. package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
  127. package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts +0 -10
  128. package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
  129. package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
  130. package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
  131. package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts +0 -10
  132. package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts.map +0 -1
  133. package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts +0 -10
  134. package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts.map +0 -1
  135. package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts +0 -24
  136. package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts.map +0 -1
  137. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +0 -28
  138. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +0 -1
  139. package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts +0 -3
  140. package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts.map +0 -1
  141. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.cache.d.ts +0 -19
  142. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map +0 -1
  143. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -24
  144. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
  145. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -6
  146. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
  147. package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts +0 -39
  148. package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts.map +0 -1
  149. package/dist/typescript/commonjs/shared/constants.d.ts +0 -2
  150. package/dist/typescript/commonjs/shared/constants.d.ts.map +0 -1
  151. package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts +0 -10
  152. package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
  153. package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts +0 -10
  154. package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
  155. package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
  156. package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
  157. package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts +0 -10
  158. package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts.map +0 -1
  159. package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts +0 -10
  160. package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts.map +0 -1
  161. package/dist/typescript/module/features/gifCelebrations/constants.d.ts +0 -24
  162. package/dist/typescript/module/features/gifCelebrations/constants.d.ts.map +0 -1
  163. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +0 -28
  164. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +0 -1
  165. package/dist/typescript/module/features/gifCelebrations/index.d.ts +0 -3
  166. package/dist/typescript/module/features/gifCelebrations/index.d.ts.map +0 -1
  167. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.cache.d.ts +0 -19
  168. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map +0 -1
  169. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -24
  170. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
  171. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -6
  172. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
  173. package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts +0 -39
  174. package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts.map +0 -1
  175. package/dist/typescript/module/shared/constants.d.ts +0 -2
  176. package/dist/typescript/module/shared/constants.d.ts.map +0 -1
  177. package/src/features/gifCelebrations/GifCelebrations.tsx +0 -77
  178. package/src/features/gifCelebrations/assets/confetti.webp +0 -0
  179. package/src/features/gifCelebrations/assets/gifFallback.gif +0 -0
  180. package/src/features/gifCelebrations/components/Backdrop.tsx +0 -41
  181. package/src/features/gifCelebrations/components/ContentContainer.tsx +0 -44
  182. package/src/features/gifCelebrations/components/Gif.tsx +0 -93
  183. package/src/features/gifCelebrations/components/Progress.tsx +0 -106
  184. package/src/features/gifCelebrations/constants.ts +0 -28
  185. package/src/features/gifCelebrations/helpers.ts +0 -123
  186. package/src/features/gifCelebrations/index.ts +0 -2
  187. package/src/features/gifCelebrations/model/GifCelebrations.cache.ts +0 -49
  188. package/src/features/gifCelebrations/model/GifCelebrations.model.ts +0 -163
  189. package/src/features/gifCelebrations/model/GifCelebrationsApi.ts +0 -10
  190. package/src/features/gifCelebrations/types/model.types.ts +0 -47
  191. package/src/react-app-env.d.ts +0 -6
  192. package/src/shared/constants.ts +0 -3
@@ -1,116 +0,0 @@
1
- "use strict";
2
-
3
- import { createEffect, createEvent, createStore, sample } from 'effector';
4
- import { GifCelebrationsApi } from "./GifCelebrationsApi.js";
5
- import { GifCelebrationsCache } from "./GifCelebrations.cache.js";
6
- import { calculatePercentageTable, findGroupForPercentage } from "../helpers.js";
7
- import { MIN_PROBLEMS_TO_SHOW_GIF } from "../constants.js";
8
- export class GifCelebrationsModel {
9
- play = createEvent();
10
- stop = createEvent();
11
- resetGifTriggerable = createEvent();
12
- setGifTriggerable = createEvent();
13
- $isGifTriggerable = createStore(false).reset(this.resetGifTriggerable).reset(this.stop).on(this.setGifTriggerable, (_, isGifCelebrationMayBeTriggered) => isGifCelebrationMayBeTriggered);
14
- resetPercentageTable = createEvent();
15
- $problemsPercentageTable = createStore(null).reset(this.resetPercentageTable);
16
- setActiveGif = createEvent();
17
- $activeGif = createStore(null).reset(this.stop).reset(this.resetGifTriggerable).on(this.setActiveGif, (_, gif) => gif);
18
- initialize = createEvent();
19
- constructor({
20
- api,
21
- totalProblems,
22
- resolvedProblems,
23
- customGetCachePathMethod,
24
- customPrefetchMethod
25
- }) {
26
- this.api = new GifCelebrationsApi(api);
27
- this.cache = new GifCelebrationsCache({
28
- customGetCachePathMethod,
29
- customPrefetchMethod
30
- });
31
- this.$totalProblems = totalProblems;
32
- this.$resolvedProblems = resolvedProblems;
33
- this.setupEventHandlers();
34
- }
35
- setupEventHandlers() {
36
- sample({
37
- clock: this.initialize,
38
- source: this.cache.$gifs,
39
- filter: gifs => !gifs,
40
- target: this.api.getGifsFx
41
- });
42
- sample({
43
- source: this.api.getGifsFx.doneData,
44
- filter: response => response.ok,
45
- fn: response => response.data,
46
- target: this.cache.prefetchAllGifs
47
- });
48
- sample({
49
- clock: [this.initialize, this.$totalProblems.updates],
50
- source: this.$totalProblems,
51
- fn: totalProblems => {
52
- if (totalProblems && totalProblems >= MIN_PROBLEMS_TO_SHOW_GIF) {
53
- return calculatePercentageTable(totalProblems);
54
- }
55
- return null;
56
- },
57
- target: this.$problemsPercentageTable
58
- });
59
- sample({
60
- clock: this.play,
61
- source: {
62
- isGifCelebrationMayBeTriggered: this.$isGifTriggerable,
63
- gifsGroups: this.cache.$gifs,
64
- resolvedProblem: this.$resolvedProblems,
65
- problemsPercentageTable: this.$problemsPercentageTable
66
- },
67
- filter: ({
68
- isGifCelebrationMayBeTriggered,
69
- gifsGroups,
70
- resolvedProblem,
71
- problemsPercentageTable
72
- }) => !!(isGifCelebrationMayBeTriggered && gifsGroups && resolvedProblem !== undefined && problemsPercentageTable),
73
- fn: sources => sources,
74
- target: this.handleGifSelection
75
- });
76
- }
77
- handleGifSelection = createEffect(({
78
- gifsGroups,
79
- resolvedProblem,
80
- problemsPercentageTable
81
- }) => {
82
- const percentageMilestone = Object.keys(problemsPercentageTable).find(key => problemsPercentageTable[Number(key)] === resolvedProblem);
83
- if (!percentageMilestone) return null;
84
- const groupName = findGroupForPercentage(Number(percentageMilestone));
85
- const gifsForGroup = gifsGroups[groupName];
86
- const unusedGifIndex = gifsForGroup.findIndex(gif => !gif.isShown);
87
- if (unusedGifIndex === -1) {
88
- const updatedGifsGroups = {
89
- ...gifsGroups
90
- };
91
- updatedGifsGroups[groupName] = gifsGroups[groupName].map(gif => ({
92
- ...gif,
93
- isShown: false
94
- }));
95
- const gifObject = {
96
- ...updatedGifsGroups[groupName][0],
97
- isShown: true
98
- };
99
- updatedGifsGroups[groupName][0].isShown = true;
100
- this.setActiveGif(gifObject);
101
- this.cache.set(updatedGifsGroups);
102
- }
103
- const selectedGif = gifsForGroup[unusedGifIndex];
104
- const gifObject = {
105
- ...selectedGif,
106
- isShown: true
107
- };
108
- const updatedGifsGroups = {
109
- ...gifsGroups
110
- };
111
- updatedGifsGroups[groupName][unusedGifIndex].isShown = true;
112
- this.cache.set(updatedGifsGroups);
113
- this.setActiveGif(gifObject);
114
- });
115
- }
116
- //# sourceMappingURL=GifCelebrations.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEffect","createEvent","createStore","sample","GifCelebrationsApi","GifCelebrationsCache","calculatePercentageTable","findGroupForPercentage","MIN_PROBLEMS_TO_SHOW_GIF","GifCelebrationsModel","play","stop","resetGifTriggerable","setGifTriggerable","$isGifTriggerable","reset","on","_","isGifCelebrationMayBeTriggered","resetPercentageTable","$problemsPercentageTable","setActiveGif","$activeGif","gif","initialize","constructor","api","totalProblems","resolvedProblems","customGetCachePathMethod","customPrefetchMethod","cache","$totalProblems","$resolvedProblems","setupEventHandlers","clock","source","$gifs","filter","gifs","target","getGifsFx","doneData","response","ok","fn","data","prefetchAllGifs","updates","gifsGroups","resolvedProblem","problemsPercentageTable","undefined","sources","handleGifSelection","percentageMilestone","Object","keys","find","key","Number","groupName","gifsForGroup","unusedGifIndex","findIndex","isShown","updatedGifsGroups","map","gifObject","set","selectedGif"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/model/GifCelebrations.model.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,WAAW,EAAEC,MAAM,QAAe,UAAU;AAChF,SAASC,kBAAkB,QAAQ,yBAAsB;AAOzD,SAASC,oBAAoB,QAAQ,4BAAyB;AAC9D,SAASC,wBAAwB,EAAEC,sBAAsB,QAAQ,eAAY;AAC7E,SAASC,wBAAwB,QAAQ,iBAAc;AAQvD,OAAO,MAAMC,oBAAoB,CAAC;EAOhBC,IAAI,GAAGT,WAAW,CAAC,CAAC;EACpBU,IAAI,GAAGV,WAAW,CAAC,CAAC;EAEpBW,mBAAmB,GAAGX,WAAW,CAAC,CAAC;EACnCY,iBAAiB,GAAGZ,WAAW,CAAU,CAAC;EAC1Ca,iBAAiB,GAAGZ,WAAW,CAAU,KAAK,CAAC,CAC5Da,KAAK,CAAC,IAAI,CAACH,mBAAmB,CAAC,CAC/BG,KAAK,CAA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O,GAAG,IAAI;IAC3D,IAAI,CAAClC,KAAK,CAACsC,GAAG,CAACH,iBAAiB,CAAC;IAEjC,IAAI,CAAC7C,YAAY,CAAC+C,SAAS,CAAC;EAC9B,CACF,CAAC;AACH","ignoreList":[]}
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- import { createControllerEffect } from "./../../../lib/effector/createControllerEffect.js";
4
- export class GifCelebrationsApi {
5
- constructor(api) {
6
- this.getGifsFx = createControllerEffect(api.getGifs);
7
- }
8
- }
9
- //# sourceMappingURL=GifCelebrationsApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createControllerEffect","GifCelebrationsApi","constructor","api","getGifsFx","getGifs"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/model/GifCelebrationsApi.ts"],"mappings":";;AAAA,SAASA,sBAAsB,QAAQ,mDAAgD;AAGvF,OAAO,MAAMC,kBAAkB,CAAC;EAG9BC,WAAWA,CAACC,GAA8B,EAAE;IAC1C,IAAI,CAACC,SAAS,GAAGJ,sBAAsB,CAACG,GAAG,CAACE,OAAO,CAAC;EACtD;AACF","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- "use strict";
2
-
3
- export {};
4
- //# sourceMappingURL=model.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/types/model.types.ts"],"mappings":"","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=react-app-env.d.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sourceRoot":"../../src","sources":["react-app-env.d.ts"],"mappings":"","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- "use strict";
2
-
3
- import { Platform } from 'react-native';
4
- export const IS_WEB = Platform.OS === 'web';
5
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Platform","IS_WEB","OS"],"sourceRoot":"../../../src","sources":["shared/constants.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,OAAO,MAAMC,MAAM,GAAGD,QAAQ,CAACE,EAAE,KAAK,KAAK","ignoreList":[]}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { GifCelebrationsModel } from './model/GifCelebrations.model';
3
- import { TextComponentType } from './types/model.types';
4
- type GifCelebrationsProps = {
5
- model: GifCelebrationsModel;
6
- TextComponent: TextComponentType;
7
- };
8
- export declare const GifCelebrations: ({ model, TextComponent }: GifCelebrationsProps) => React.JSX.Element | null;
9
- export {};
10
- //# sourceMappingURL=GifCelebrations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GifCelebrations.d.ts","sourceRoot":"","sources":["../../../../../src/features/gifCelebrations/GifCelebrations.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAQxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,EAAiB,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEtE,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,oBAAoB,CAAA;IAC3B,aAAa,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,eAAe,6BAA8B,oBAAoB,6BA4D7E,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { SharedValue } from 'react-native-reanimated';
3
- import { ProgressValue } from '../types/model.types';
4
- type BackdropProps = {
5
- children: React.ReactNode;
6
- progress: SharedValue<ProgressValue>;
7
- };
8
- export declare const Backdrop: ({ children, progress }: BackdropProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=Backdrop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Backdrop.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/components/Backdrop.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAiB,EAAsC,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEnG,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,QAAQ,2BAA4B,aAAa,sBAmB7D,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { SharedValue } from 'react-native-reanimated';
3
- import { ProgressValue } from '../types/model.types';
4
- type ContentContainerProps = {
5
- children: React.ReactNode;
6
- progress: SharedValue<ProgressValue>;
7
- };
8
- export declare const ContentContainer: ({ children, progress }: ContentContainerProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=ContentContainer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/components/ContentContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAiB,EAAiC,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE9F,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,gBAAgB,2BAA4B,qBAAqB,sBAsB7E,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { CustomGetCachePathMethod, GifObject, TextComponentType } from '../types/model.types';
3
- type GifProps = {
4
- gifObject: GifObject;
5
- getCachePathMethod?: CustomGetCachePathMethod;
6
- TextComponent: TextComponentType;
7
- };
8
- export declare const Gif: ({ gifObject, getCachePathMethod, TextComponent }: GifProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=Gif.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Gif.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/components/Gif.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAExD,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAO7F,KAAK,QAAQ,GAAG;IACd,SAAS,EAAE,SAAS,CAAA;IACpB,kBAAkB,CAAC,EAAE,wBAAwB,CAAA;IAC7C,aAAa,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAOD,eAAO,MAAM,GAAG,qDAAsD,QAAQ,sBAkD7E,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { SharedValue } from 'react-native-reanimated';
3
- import { ProgressValue } from '../types/model.types';
4
- type ProgressProps = {
5
- progress: SharedValue<ProgressValue>;
6
- completedPercent: number;
7
- };
8
- export declare const Progress: ({ progress, completedPercent }: ProgressProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=Progress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/components/Progress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAiB,EAAoB,WAAW,EAAe,MAAM,yBAAyB,CAAA;AAE9F,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAGpD,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IACpC,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,QAAQ,mCAAoC,aAAa,sBAqCrE,CAAA"}
@@ -1,24 +0,0 @@
1
- export declare const BACKDROP_COLOR: {
2
- INITIAL: string;
3
- FINAL: string;
4
- };
5
- export declare const CONTENT_CONTAINER: {
6
- ANGLE: number;
7
- CONTAINER_WIDTH: number;
8
- ROTATION_PADDING: number;
9
- };
10
- export declare const ANIMATION_DURATION = 1750;
11
- export declare const MIN_PROBLEMS_TO_SHOW_GIF = 7;
12
- export declare const MAX_GIF_SIZE: {
13
- WIDTH: number;
14
- HEIGHT: number;
15
- };
16
- export declare const MIN_GIF_SIZE = 300;
17
- export declare const GROUPS_PERCENTAGES: {
18
- group1: number[];
19
- group2: number[];
20
- group3: number[];
21
- };
22
- export declare const MIN_WIDTH_FOR_ONE_DIGIT = 12;
23
- export declare const MIN_WIDTH_FOR_TWO_DIGITS = 15;
24
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/gifCelebrations/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;CAG1B,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAA;AAED,eAAO,MAAM,kBAAkB,OAAO,CAAA;AACtC,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC,eAAO,MAAM,YAAY;;;CAGxB,CAAA;AACD,eAAO,MAAM,YAAY,MAAM,CAAA;AAE/B,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAA;AAED,eAAO,MAAM,uBAAuB,KAAK,CAAA;AACzC,eAAO,MAAM,wBAAwB,KAAK,CAAA"}
@@ -1,28 +0,0 @@
1
- import { TranslationKeys } from 'src/shared/translation/types';
2
- import { CustomGetCachePathMethod, GifsGroups, GifsStructure, GroupNumber, ProblemsPercentageTable } from './types/model.types';
3
- /**
4
- * Number of problems When we show gif
5
- * <6 Never
6
- * 7-12 50% completion
7
- * 13-18 33%, 66% completion
8
- * 19-24 25%, 50%, 75 completion
9
- * 25-30 20%, 40%, 60%, 80% completion
10
- * .>30 15%, 30%, 45%, 60%, 75% completion
11
- *
12
- * We are also going to have different buckets with different gifs. The logic is as follows:
13
- * Group 1: 15%, 20%, 25%, 30% - Early celebrations
14
- * Group 2: 33%, 40%, 45%, 50% - Mid celebrations
15
- * Group 3: 60%, 66%, 75%, 80% - Party
16
- * or
17
- * Group 1: <=30% - Early celebrations
18
- * Group 2: >30% <60% - Mid celebrations
19
- * Group 3: >=60% - Party
20
- */
21
- export declare const calculatePercentageTable: (totalProblems: number) => ProblemsPercentageTable;
22
- export declare const generateGifsStructure: (gifs: GifsGroups) => GifsStructure;
23
- export declare const getGifLabel: (relatedGroup: GroupNumber) => TranslationKeys;
24
- export declare const getProgressLineWidth: (completedPercent: number) => number;
25
- export declare const findGroupForPercentage: (percentage: number) => "group1" | "group2" | "group3";
26
- export declare const getImagePath: (url: string, cacheMethod?: CustomGetCachePathMethod) => Promise<string>;
27
- export declare const constrainDimension: (value: number, min: number, max: number) => number;
28
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/gifCelebrations/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EACL,wBAAwB,EACxB,UAAU,EACV,aAAa,EACb,WAAW,EACX,uBAAuB,EACxB,MAAM,qBAAqB,CAAA;AAI5B;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,kBAAmB,MAAM,KAAG,uBAkChE,CAAA;AAED,eAAO,MAAM,qBAAqB,SAAU,UAAU,KAAG,aAUtD,CAAA;AAEH,eAAO,MAAM,WAAW,iBAAkB,WAAW,KAAG,eASvD,CAAA;AAED,eAAO,MAAM,oBAAoB,qBAAsB,MAAM,WAQ5D,CAAA;AAED,eAAO,MAAM,sBAAsB,eAAgB,MAAM,mCAQxD,CAAA;AAED,eAAO,MAAM,YAAY,QAAe,MAAM,gBAAgB,wBAAwB,oBAWrF,CAAA;AAED,eAAO,MAAM,kBAAkB,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,WACrC,CAAA"}
@@ -1,3 +0,0 @@
1
- export { GifCelebrations } from './GifCelebrations';
2
- export { GifCelebrationsModel } from './model/GifCelebrations.model';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/gifCelebrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA"}
@@ -1,19 +0,0 @@
1
- import { GifsGroups, GifsStructure, CustomGetCachePathMethod, CustomPrefetchMethod } from '../types/model.types';
2
- import { Image } from 'react-native';
3
- type GifCelebrationsCacheProps = {
4
- customPrefetchMethod?: CustomPrefetchMethod;
5
- customGetCachePathMethod?: CustomGetCachePathMethod;
6
- };
7
- export declare class GifCelebrationsCache {
8
- readonly initialSet: import("effector").EventCallable<GifsGroups>;
9
- readonly set: import("effector").EventCallable<GifsStructure>;
10
- readonly reset: import("effector").EventCallable<void>;
11
- readonly getCachePathMethod?: CustomGetCachePathMethod;
12
- readonly prefetchMethod: CustomPrefetchMethod | typeof Image.prefetch;
13
- readonly prefetchAllGifs: import("effector").Effect<GifsGroups, void, Error>;
14
- readonly prefetchGifs: import("effector").Effect<string[], void, Error>;
15
- readonly $gifs: import("effector").StoreWritable<GifsStructure | null>;
16
- constructor({ customGetCachePathMethod, customPrefetchMethod }: GifCelebrationsCacheProps);
17
- }
18
- export {};
19
- //# sourceMappingURL=GifCelebrations.cache.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GifCelebrations.cache.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/model/GifCelebrations.cache.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,aAAa,EACb,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,sBAAsB,CAAA;AAE7B,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAA;AAEpC,KAAK,yBAAyB,GAAG;IAC/B,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;CACpD,CAAA;AAED,qBAAa,oBAAoB;IAC/B,SAAgB,UAAU,+CAA4B;IACtD,SAAgB,GAAG,kDAA+B;IAClD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,kBAAkB,CAAC,EAAE,wBAAwB,CAAA;IAC7D,SAAgB,cAAc,EAAE,oBAAoB,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAA;IAE5E,SAAgB,eAAe,qDAQ7B;IAEF,SAAgB,YAAY,mDAI1B;IAEF,SAAgB,KAAK,yDAGa;gBAEtB,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,EAAE,yBAAyB;CAI1F"}
@@ -1,24 +0,0 @@
1
- import { Store } from 'effector';
2
- import { GifCelebrationsApi } from './GifCelebrationsApi';
3
- import { GifCelebrationsModelProps, GifObject, ProblemsPercentageTable } from '../types/model.types';
4
- import { GifCelebrationsCache } from './GifCelebrations.cache';
5
- export declare class GifCelebrationsModel {
6
- readonly api: GifCelebrationsApi;
7
- readonly cache: GifCelebrationsCache;
8
- readonly $totalProblems: Store<number>;
9
- readonly $resolvedProblems: Store<number>;
10
- readonly play: import("effector").EventCallable<void>;
11
- readonly stop: import("effector").EventCallable<void>;
12
- readonly resetGifTriggerable: import("effector").EventCallable<void>;
13
- readonly setGifTriggerable: import("effector").EventCallable<boolean>;
14
- readonly $isGifTriggerable: import("effector").StoreWritable<boolean>;
15
- readonly resetPercentageTable: import("effector").EventCallable<void>;
16
- readonly $problemsPercentageTable: import("effector").StoreWritable<ProblemsPercentageTable | null>;
17
- readonly setActiveGif: import("effector").EventCallable<GifObject>;
18
- readonly $activeGif: import("effector").StoreWritable<GifObject | null>;
19
- readonly initialize: import("effector").EventCallable<void>;
20
- constructor({ api, totalProblems, resolvedProblems, customGetCachePathMethod, customPrefetchMethod, }: GifCelebrationsModelProps);
21
- private setupEventHandlers;
22
- private readonly handleGifSelection;
23
- }
24
- //# sourceMappingURL=GifCelebrations.model.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GifCelebrations.model.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/model/GifCelebrations.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkD,KAAK,EAAE,MAAM,UAAU,CAAA;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AACzD,OAAO,EACL,yBAAyB,EACzB,SAAS,EAET,uBAAuB,EACxB,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAU9D,qBAAa,oBAAoB;IAC/B,SAAgB,GAAG,EAAE,kBAAkB,CAAA;IACvC,SAAgB,KAAK,EAAE,oBAAoB,CAAA;IAE3C,SAAgB,cAAc,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC7C,SAAgB,iBAAiB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAEhD,SAAgB,IAAI,yCAAgB;IACpC,SAAgB,IAAI,yCAAgB;IAEpC,SAAgB,mBAAmB,yCAAgB;IACnD,SAAgB,iBAAiB,4CAAyB;IAC1D,SAAgB,iBAAiB,4CAM9B;IAEH,SAAgB,oBAAoB,yCAAgB;IACpD,SAAgB,wBAAwB,mEAEN;IAElC,SAAgB,YAAY,8CAA2B;IACvD,SAAgB,UAAU,qDAGe;IAEzC,SAAgB,UAAU,yCAAgB;gBAE9B,EACV,GAAG,EACH,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,GACrB,EAAE,yBAAyB;IAU5B,OAAO,CAAC,kBAAkB;IAoD1B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CA0ClC;CACF"}
@@ -1,6 +0,0 @@
1
- import { GifCelebrationApiRequests } from '../types/model.types';
2
- export declare class GifCelebrationsApi {
3
- readonly getGifsFx: import("./../../../lib/effector/createControllerEffect").ControlledEffect<unknown, import("../types/model.types").GifResponse>;
4
- constructor(api: GifCelebrationApiRequests);
5
- }
6
- //# sourceMappingURL=GifCelebrationsApi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GifCelebrationsApi.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/model/GifCelebrationsApi.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAA;AAEhE,qBAAa,kBAAkB;IAC7B,SAAgB,SAAS,iIAAA;gBAEb,GAAG,EAAE,yBAAyB;CAG3C"}
@@ -1,39 +0,0 @@
1
- import { Store } from 'effector';
2
- export type CustomGetCachePathMethod = (uri: string) => Promise<string | null>;
3
- export type CustomPrefetchMethod = (gifs: string[] | string) => Promise<unknown>;
4
- export type GroupNumber = number;
5
- export type GifCelebrationApiRequests = {
6
- getGifs: () => Promise<GifResponse>;
7
- };
8
- export type GifCelebrationsModelProps = {
9
- api: GifCelebrationApiRequests;
10
- totalProblems: Store<number>;
11
- resolvedProblems: Store<number>;
12
- customPrefetchMethod?: CustomPrefetchMethod;
13
- customGetCachePathMethod?: CustomGetCachePathMethod;
14
- };
15
- export type GifsGroup = string[];
16
- export type GifsGroups = Record<`group${GroupNumber}`, GifsGroup>;
17
- export type GifObject = {
18
- url: string;
19
- isShown: boolean;
20
- group: `group${GroupNumber}`;
21
- };
22
- export type GifsStructure = Record<`group${GroupNumber}`, GifObject[]>;
23
- /**
24
- * Usually, the response contains 3 groups of gifs:
25
- * - group1: early celebrations
26
- * - group2: mid celebrations
27
- * - group3: party
28
- */
29
- export type GifResponse = {
30
- data: GifsGroups;
31
- ok: boolean;
32
- };
33
- export type GifsPayload = {
34
- group: number;
35
- };
36
- export type ProblemsPercentageTable = Record<number, number>;
37
- export type ProgressValue = 0 | 1 | 2;
38
- export type TextComponentType = (text: string) => React.ReactNode;
39
- //# sourceMappingURL=model.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"model.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/types/model.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EA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MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;AAC5D,MAAM,MAAM,aAAa,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;AAErC,MAAM,MAAM,iBAAiB,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAA"}
@@ -1,2 +0,0 @@
1
- export declare const IS_WEB: boolean;
2
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/shared/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,SAAwB,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { GifCelebrationsModel } from './model/GifCelebrations.model';
3
- import { TextComponentType } from './types/model.types';
4
- type GifCelebrationsProps = {
5
- model: GifCelebrationsModel;
6
- TextComponent: TextComponentType;
7
- };
8
- export declare const GifCelebrations: ({ model, TextComponent }: GifCelebrationsProps) => React.JSX.Element | null;
9
- export {};
10
- //# sourceMappingURL=GifCelebrations.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GifCelebrations.d.ts","sourceRoot":"","sources":["../../../../../src/features/gifCelebrations/GifCelebrations.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAA;AAQxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA;AACpE,OAAO,EAAiB,iBAAiB,EAAE,MAAM,qBAAqB,CAAA;AAEtE,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,oBAAoB,CAAA;IAC3B,aAAa,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAED,eAAO,MAAM,eAAe,6BAA8B,oBAAoB,6BA4D7E,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { SharedValue } from 'react-native-reanimated';
3
- import { ProgressValue } from '../types/model.types';
4
- type BackdropProps = {
5
- children: React.ReactNode;
6
- progress: SharedValue<ProgressValue>;
7
- };
8
- export declare const Backdrop: ({ children, progress }: BackdropProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=Backdrop.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Backdrop.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/components/Backdrop.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAiB,EAAsC,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAEnG,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,QAAQ,2BAA4B,aAAa,sBAmB7D,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { SharedValue } from 'react-native-reanimated';
3
- import { ProgressValue } from '../types/model.types';
4
- type ContentContainerProps = {
5
- children: React.ReactNode;
6
- progress: SharedValue<ProgressValue>;
7
- };
8
- export declare const ContentContainer: ({ children, progress }: ContentContainerProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=ContentContainer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentContainer.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/components/ContentContainer.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAiB,EAAiC,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAE9F,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEpD,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;CACrC,CAAA;AAED,eAAO,MAAM,gBAAgB,2BAA4B,qBAAqB,sBAsB7E,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { CustomGetCachePathMethod, GifObject, TextComponentType } from '../types/model.types';
3
- type GifProps = {
4
- gifObject: GifObject;
5
- getCachePathMethod?: CustomGetCachePathMethod;
6
- TextComponent: TextComponentType;
7
- };
8
- export declare const Gif: ({ gifObject, getCachePathMethod, TextComponent }: GifProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=Gif.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Gif.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/components/Gif.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAExD,OAAO,EAAE,wBAAwB,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAO7F,KAAK,QAAQ,GAAG;IACd,SAAS,EAAE,SAAS,CAAA;IACpB,kBAAkB,CAAC,EAAE,wBAAwB,CAAA;IAC7C,aAAa,EAAE,iBAAiB,CAAA;CACjC,CAAA;AAOD,eAAO,MAAM,GAAG,qDAAsD,QAAQ,sBAkD7E,CAAA"}
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { SharedValue } from 'react-native-reanimated';
3
- import { ProgressValue } from '../types/model.types';
4
- type ProgressProps = {
5
- progress: SharedValue<ProgressValue>;
6
- completedPercent: number;
7
- };
8
- export declare const Progress: ({ progress, completedPercent }: ProgressProps) => React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=Progress.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/components/Progress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAiB,EAAoB,WAAW,EAAe,MAAM,yBAAyB,CAAA;AAE9F,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAGpD,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IACpC,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,QAAQ,mCAAoC,aAAa,sBAqCrE,CAAA"}
@@ -1,24 +0,0 @@
1
- export declare const BACKDROP_COLOR: {
2
- INITIAL: string;
3
- FINAL: string;
4
- };
5
- export declare const CONTENT_CONTAINER: {
6
- ANGLE: number;
7
- CONTAINER_WIDTH: number;
8
- ROTATION_PADDING: number;
9
- };
10
- export declare const ANIMATION_DURATION = 1750;
11
- export declare const MIN_PROBLEMS_TO_SHOW_GIF = 7;
12
- export declare const MAX_GIF_SIZE: {
13
- WIDTH: number;
14
- HEIGHT: number;
15
- };
16
- export declare const MIN_GIF_SIZE = 300;
17
- export declare const GROUPS_PERCENTAGES: {
18
- group1: number[];
19
- group2: number[];
20
- group3: number[];
21
- };
22
- export declare const MIN_WIDTH_FOR_ONE_DIGIT = 12;
23
- export declare const MIN_WIDTH_FOR_TWO_DIGITS = 15;
24
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/gifCelebrations/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;CAG1B,CAAA;AAED,eAAO,MAAM,iBAAiB;;;;CAI7B,CAAA;AAED,eAAO,MAAM,kBAAkB,OAAO,CAAA;AACtC,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC,eAAO,MAAM,YAAY;;;CAGxB,CAAA;AACD,eAAO,MAAM,YAAY,MAAM,CAAA;AAE/B,eAAO,MAAM,kBAAkB;;;;CAI9B,CAAA;AAED,eAAO,MAAM,uBAAuB,KAAK,CAAA;AACzC,eAAO,MAAM,wBAAwB,KAAK,CAAA"}
@@ -1,28 +0,0 @@
1
- import { TranslationKeys } from 'src/shared/translation/types';
2
- import { CustomGetCachePathMethod, GifsGroups, GifsStructure, GroupNumber, ProblemsPercentageTable } from './types/model.types';
3
- /**
4
- * Number of problems When we show gif
5
- * <6 Never
6
- * 7-12 50% completion
7
- * 13-18 33%, 66% completion
8
- * 19-24 25%, 50%, 75 completion
9
- * 25-30 20%, 40%, 60%, 80% completion
10
- * .>30 15%, 30%, 45%, 60%, 75% completion
11
- *
12
- * We are also going to have different buckets with different gifs. The logic is as follows:
13
- * Group 1: 15%, 20%, 25%, 30% - Early celebrations
14
- * Group 2: 33%, 40%, 45%, 50% - Mid celebrations
15
- * Group 3: 60%, 66%, 75%, 80% - Party
16
- * or
17
- * Group 1: <=30% - Early celebrations
18
- * Group 2: >30% <60% - Mid celebrations
19
- * Group 3: >=60% - Party
20
- */
21
- export declare const calculatePercentageTable: (totalProblems: number) => ProblemsPercentageTable;
22
- export declare const generateGifsStructure: (gifs: GifsGroups) => GifsStructure;
23
- export declare const getGifLabel: (relatedGroup: GroupNumber) => TranslationKeys;
24
- export declare const getProgressLineWidth: (completedPercent: number) => number;
25
- export declare const findGroupForPercentage: (percentage: number) => "group1" | "group2" | "group3";
26
- export declare const getImagePath: (url: string, cacheMethod?: CustomGetCachePathMethod) => Promise<string>;
27
- export declare const constrainDimension: (value: number, min: number, max: number) => number;
28
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/gifCelebrations/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,EACL,wBAAwB,EACxB,UAAU,EACV,aAAa,EACb,WAAW,EACX,uBAAuB,EACxB,MAAM,qBAAqB,CAAA;AAI5B;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,wBAAwB,kBAAmB,MAAM,KAAG,uBAkChE,CAAA;AAED,eAAO,MAAM,qBAAqB,SAAU,UAAU,KAAG,aAUtD,CAAA;AAEH,eAAO,MAAM,WAAW,iBAAkB,WAAW,KAAG,eASvD,CAAA;AAED,eAAO,MAAM,oBAAoB,qBAAsB,MAAM,WAQ5D,CAAA;AAED,eAAO,MAAM,sBAAsB,eAAgB,MAAM,mCAQxD,CAAA;AAED,eAAO,MAAM,YAAY,QAAe,MAAM,gBAAgB,wBAAwB,oBAWrF,CAAA;AAED,eAAO,MAAM,kBAAkB,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,WACrC,CAAA"}
@@ -1,3 +0,0 @@
1
- export { GifCelebrations } from './GifCelebrations';
2
- export { GifCelebrationsModel } from './model/GifCelebrations.model';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/gifCelebrations/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACnD,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAA"}
@@ -1,19 +0,0 @@
1
- import { GifsGroups, GifsStructure, CustomGetCachePathMethod, CustomPrefetchMethod } from '../types/model.types';
2
- import { Image } from 'react-native';
3
- type GifCelebrationsCacheProps = {
4
- customPrefetchMethod?: CustomPrefetchMethod;
5
- customGetCachePathMethod?: CustomGetCachePathMethod;
6
- };
7
- export declare class GifCelebrationsCache {
8
- readonly initialSet: import("effector").EventCallable<GifsGroups>;
9
- readonly set: import("effector").EventCallable<GifsStructure>;
10
- readonly reset: import("effector").EventCallable<void>;
11
- readonly getCachePathMethod?: CustomGetCachePathMethod;
12
- readonly prefetchMethod: CustomPrefetchMethod | typeof Image.prefetch;
13
- readonly prefetchAllGifs: import("effector").Effect<GifsGroups, void, Error>;
14
- readonly prefetchGifs: import("effector").Effect<string[], void, Error>;
15
- readonly $gifs: import("effector").StoreWritable<GifsStructure | null>;
16
- constructor({ customGetCachePathMethod, customPrefetchMethod }: GifCelebrationsCacheProps);
17
- }
18
- export {};
19
- //# sourceMappingURL=GifCelebrations.cache.d.ts.map