@magmamath/students-features 0.6.5 → 0.6.6-rc.1

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 (157) hide show
  1. package/dist/commonjs/features/feedback/model/comments.js +3 -5
  2. package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
  3. package/dist/commonjs/features/feedback/model/model.js +9 -7
  4. package/dist/commonjs/features/feedback/model/model.js.map +1 -1
  5. package/dist/commonjs/features/gifCelebrations/GifCelebrations.js +65 -0
  6. package/dist/commonjs/features/gifCelebrations/GifCelebrations.js.map +1 -0
  7. package/dist/commonjs/features/gifCelebrations/assets/confetti.webp +0 -0
  8. package/dist/commonjs/features/gifCelebrations/components/Backdrop.js +44 -0
  9. package/dist/commonjs/features/gifCelebrations/components/Backdrop.js.map +1 -0
  10. package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js +46 -0
  11. package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js.map +1 -0
  12. package/dist/commonjs/features/gifCelebrations/components/Gif.js +80 -0
  13. package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +1 -0
  14. package/dist/commonjs/features/gifCelebrations/components/Progress.js +106 -0
  15. package/dist/commonjs/features/gifCelebrations/components/Progress.js.map +1 -0
  16. package/dist/commonjs/features/gifCelebrations/constants.js +30 -0
  17. package/dist/commonjs/features/gifCelebrations/constants.js.map +1 -0
  18. package/dist/commonjs/features/gifCelebrations/helpers.js +71 -0
  19. package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -0
  20. package/dist/commonjs/features/gifCelebrations/index.js +20 -0
  21. package/dist/commonjs/features/gifCelebrations/index.js.map +1 -0
  22. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.cache.js +32 -0
  23. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.cache.js.map +1 -0
  24. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js +125 -0
  25. package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js.map +1 -0
  26. package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js +14 -0
  27. package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js.map +1 -0
  28. package/dist/commonjs/features/gifCelebrations/types/model.types.js +6 -0
  29. package/dist/commonjs/features/gifCelebrations/types/model.types.js.map +1 -0
  30. package/dist/commonjs/index.js +12 -0
  31. package/dist/commonjs/index.js.map +1 -1
  32. package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
  33. package/dist/commonjs/react-app-env.d.js +2 -0
  34. package/dist/commonjs/react-app-env.d.js.map +1 -0
  35. package/dist/commonjs/shared/translation/localization/en.json +5 -0
  36. package/dist/commonjs/shared/translation/localization/gb.json +5 -0
  37. package/dist/commonjs/shared/translation/localization/sw.json +5 -0
  38. package/dist/module/features/feedback/model/comments.js +3 -5
  39. package/dist/module/features/feedback/model/comments.js.map +1 -1
  40. package/dist/module/features/feedback/model/model.js +9 -7
  41. package/dist/module/features/feedback/model/model.js.map +1 -1
  42. package/dist/module/features/gifCelebrations/GifCelebrations.js +58 -0
  43. package/dist/module/features/gifCelebrations/GifCelebrations.js.map +1 -0
  44. package/dist/module/features/gifCelebrations/assets/confetti.webp +0 -0
  45. package/dist/module/features/gifCelebrations/components/Backdrop.js +36 -0
  46. package/dist/module/features/gifCelebrations/components/Backdrop.js.map +1 -0
  47. package/dist/module/features/gifCelebrations/components/ContentContainer.js +38 -0
  48. package/dist/module/features/gifCelebrations/components/ContentContainer.js.map +1 -0
  49. package/dist/module/features/gifCelebrations/components/Gif.js +73 -0
  50. package/dist/module/features/gifCelebrations/components/Gif.js.map +1 -0
  51. package/dist/module/features/gifCelebrations/components/Progress.js +98 -0
  52. package/dist/module/features/gifCelebrations/components/Progress.js.map +1 -0
  53. package/dist/module/features/gifCelebrations/constants.js +26 -0
  54. package/dist/module/features/gifCelebrations/constants.js.map +1 -0
  55. package/dist/module/features/gifCelebrations/helpers.js +64 -0
  56. package/dist/module/features/gifCelebrations/helpers.js.map +1 -0
  57. package/dist/module/features/gifCelebrations/index.js +5 -0
  58. package/dist/module/features/gifCelebrations/index.js.map +1 -0
  59. package/dist/module/features/gifCelebrations/model/GifCelebrations.cache.js +27 -0
  60. package/dist/module/features/gifCelebrations/model/GifCelebrations.cache.js.map +1 -0
  61. package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js +120 -0
  62. package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js.map +1 -0
  63. package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js +9 -0
  64. package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js.map +1 -0
  65. package/dist/module/features/gifCelebrations/types/model.types.js +4 -0
  66. package/dist/module/features/gifCelebrations/types/model.types.js.map +1 -0
  67. package/dist/module/index.js +1 -0
  68. package/dist/module/index.js.map +1 -1
  69. package/dist/module/react-app-env.d.js +2 -0
  70. package/dist/module/react-app-env.d.js.map +1 -0
  71. package/dist/module/shared/translation/localization/en.json +5 -0
  72. package/dist/module/shared/translation/localization/gb.json +5 -0
  73. package/dist/module/shared/translation/localization/sw.json +5 -0
  74. package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts +10 -0
  75. package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts.map +1 -0
  76. package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts +10 -0
  77. package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts.map +1 -0
  78. package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts +10 -0
  79. package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts.map +1 -0
  80. package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts +10 -0
  81. package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts.map +1 -0
  82. package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts +10 -0
  83. package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts.map +1 -0
  84. package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts +22 -0
  85. package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts.map +1 -0
  86. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +85 -0
  87. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -0
  88. package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts +3 -0
  89. package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts.map +1 -0
  90. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.cache.d.ts +18 -0
  91. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map +1 -0
  92. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts +26 -0
  93. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +1 -0
  94. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts +6 -0
  95. package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +1 -0
  96. package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts +42 -0
  97. package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts.map +1 -0
  98. package/dist/typescript/commonjs/index.d.ts +1 -0
  99. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  100. package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
  101. package/dist/typescript/commonjs/shared/translation/constants.d.ts +15 -0
  102. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  103. package/dist/typescript/commonjs/shared/translation/model.d.ts +10 -0
  104. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  105. package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts +10 -0
  106. package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts.map +1 -0
  107. package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts +10 -0
  108. package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts.map +1 -0
  109. package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts +10 -0
  110. package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts.map +1 -0
  111. package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts +10 -0
  112. package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts.map +1 -0
  113. package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts +10 -0
  114. package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts.map +1 -0
  115. package/dist/typescript/module/features/gifCelebrations/constants.d.ts +22 -0
  116. package/dist/typescript/module/features/gifCelebrations/constants.d.ts.map +1 -0
  117. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +85 -0
  118. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -0
  119. package/dist/typescript/module/features/gifCelebrations/index.d.ts +3 -0
  120. package/dist/typescript/module/features/gifCelebrations/index.d.ts.map +1 -0
  121. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.cache.d.ts +18 -0
  122. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map +1 -0
  123. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts +26 -0
  124. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +1 -0
  125. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts +6 -0
  126. package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +1 -0
  127. package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts +42 -0
  128. package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts.map +1 -0
  129. package/dist/typescript/module/index.d.ts +1 -0
  130. package/dist/typescript/module/index.d.ts.map +1 -1
  131. package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
  132. package/dist/typescript/module/shared/translation/constants.d.ts +15 -0
  133. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  134. package/dist/typescript/module/shared/translation/model.d.ts +10 -0
  135. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  136. package/package.json +1 -1
  137. package/src/features/feedback/model/comments.ts +7 -7
  138. package/src/features/feedback/model/model.ts +6 -6
  139. package/src/features/gifCelebrations/GifCelebrations.tsx +77 -0
  140. package/src/features/gifCelebrations/assets/confetti.webp +0 -0
  141. package/src/features/gifCelebrations/components/Backdrop.tsx +41 -0
  142. package/src/features/gifCelebrations/components/ContentContainer.tsx +44 -0
  143. package/src/features/gifCelebrations/components/Gif.tsx +86 -0
  144. package/src/features/gifCelebrations/components/Progress.tsx +116 -0
  145. package/src/features/gifCelebrations/constants.ts +25 -0
  146. package/src/features/gifCelebrations/helpers.ts +75 -0
  147. package/src/features/gifCelebrations/index.ts +2 -0
  148. package/src/features/gifCelebrations/model/GifCelebrations.cache.ts +43 -0
  149. package/src/features/gifCelebrations/model/GifCelebrations.model.ts +174 -0
  150. package/src/features/gifCelebrations/model/GifCelebrationsApi.ts +10 -0
  151. package/src/features/gifCelebrations/types/model.types.ts +50 -0
  152. package/src/index.ts +1 -0
  153. package/src/lib/helpers/helpers.ts +1 -1
  154. package/src/react-app-env.d.ts +5 -0
  155. package/src/shared/translation/localization/en.json +5 -0
  156. package/src/shared/translation/localization/gb.json +5 -0
  157. package/src/shared/translation/localization/sw.json +5 -0
@@ -0,0 +1,22 @@
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
+ SAFE_AREA: number;
9
+ };
10
+ export declare const ANIMATION_DURATION = 1750;
11
+ export declare const MIN_PROBLEMS_TO_SHOW_GIF = 6;
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
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,85 @@
1
+ import { TranslationKeys } from 'src/shared/translation/types';
2
+ import { GifsGroups, GifsStructure, GroupNumber } 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
+ */
17
+ export declare const calculatePercentageTable: (totalProblems: number) => {
18
+ 50: number;
19
+ 33?: undefined;
20
+ 66?: undefined;
21
+ 25?: undefined;
22
+ 75?: undefined;
23
+ 20?: undefined;
24
+ 40?: undefined;
25
+ 60?: undefined;
26
+ 80?: undefined;
27
+ 15?: undefined;
28
+ 30?: undefined;
29
+ 45?: undefined;
30
+ } | {
31
+ 33: number;
32
+ 66: number;
33
+ 50?: undefined;
34
+ 25?: undefined;
35
+ 75?: undefined;
36
+ 20?: undefined;
37
+ 40?: undefined;
38
+ 60?: undefined;
39
+ 80?: undefined;
40
+ 15?: undefined;
41
+ 30?: undefined;
42
+ 45?: undefined;
43
+ } | {
44
+ 25: number;
45
+ 50: number;
46
+ 75: number;
47
+ 33?: undefined;
48
+ 66?: undefined;
49
+ 20?: undefined;
50
+ 40?: undefined;
51
+ 60?: undefined;
52
+ 80?: undefined;
53
+ 15?: undefined;
54
+ 30?: undefined;
55
+ 45?: undefined;
56
+ } | {
57
+ 20: number;
58
+ 40: number;
59
+ 60: number;
60
+ 80: number;
61
+ 50?: undefined;
62
+ 33?: undefined;
63
+ 66?: undefined;
64
+ 25?: undefined;
65
+ 75?: undefined;
66
+ 15?: undefined;
67
+ 30?: undefined;
68
+ 45?: undefined;
69
+ } | {
70
+ 15: number;
71
+ 30: number;
72
+ 45: number;
73
+ 60: number;
74
+ 75: number;
75
+ 50?: undefined;
76
+ 33?: undefined;
77
+ 66?: undefined;
78
+ 25?: undefined;
79
+ 20?: undefined;
80
+ 40?: undefined;
81
+ 80?: undefined;
82
+ };
83
+ export declare const generateGifsStructure: (gifs: GifsGroups) => GifsStructure;
84
+ export declare const getGifLabel: (relatedGroup: GroupNumber) => TranslationKeys;
85
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
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,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAE5E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,kBAAmB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC7D,CAAA;AAED,eAAO,MAAM,qBAAqB,SAAU,UAAU,KAAG,aAUtD,CAAA;AAEH,eAAO,MAAM,WAAW,iBAAkB,WAAW,KAAG,eASvD,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { GifCelebrations } from './GifCelebrations';
2
+ export { GifCelebrationsModel } from './model/GifCelebrations.model';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,18 @@
1
+ import { GifsGroups, GifsStructure, CustomPrefetchMethod, CustomGetCachePathMethod } 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 prefetchMethod: CustomPrefetchMethod | typeof Image.prefetch;
12
+ readonly getCachePathMethod?: CustomGetCachePathMethod;
13
+ readonly prefetchGifs: import("effector").Effect<GifsGroups, void, Error>;
14
+ readonly $gifs: import("effector").StoreWritable<GifsStructure | null>;
15
+ constructor({ customPrefetchMethod, customGetCachePathMethod }: GifCelebrationsCacheProps);
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=GifCelebrations.cache.d.ts.map
@@ -0,0 +1 @@
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,oBAAoB,EACpB,wBAAwB,EACzB,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,cAAc,EAAE,oBAAoB,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAA;IAC5E,SAAgB,kBAAkB,CAAC,EAAE,wBAAwB,CAAA;IAE7D,SAAgB,YAAY,qDAQ1B;IAEF,SAAgB,KAAK,yDAGa;gBAEtB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,EAAE,yBAAyB;CAI1F"}
@@ -0,0 +1,26 @@
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 triggerPlay: import("effector").EventCallable<void>;
11
+ readonly stop: import("effector").EventCallable<void>;
12
+ readonly resetIsGifCelebrationMayBeTriggered: import("effector").EventCallable<void>;
13
+ readonly setIsGifCelebrationMayBeTriggered: import("effector").EventCallable<boolean>;
14
+ readonly $isGifCelebrationMayBeTriggered: 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
+ readonly resetGroupGifs: import("effector").EventCallable<string>;
21
+ constructor({ api, totalProblems, resolvedProblems, customPrefetchMethod, customGetCachePathMethod, }: GifCelebrationsModelProps);
22
+ private setupEventHandlers;
23
+ private readonly handleGifSelection;
24
+ private findGroupForPercentage;
25
+ }
26
+ //# sourceMappingURL=GifCelebrations.model.d.ts.map
@@ -0,0 +1 @@
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,EAGT,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,WAAW,yCAAgB;IAC3C,SAAgB,IAAI,yCAAgB;IAEpC,SAAgB,mCAAmC,yCAAgB;IACnE,SAAgB,iCAAiC,4CAAyB;IAC1E,SAAgB,+BAA+B,4CAM5C;IAEH,SAAgB,oBAAoB,yCAAgB;IACpD,SAAgB,wBAAwB,mEAEN;IAElC,SAAgB,YAAY,8CAA2B;IACvD,SAAgB,UAAU,qDAGe;IAEzC,SAAgB,UAAU,yCAAgB;IAC1C,SAAgB,cAAc,2CAAwB;gBAE1C,EACV,GAAG,EACH,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,GACzB,EAAE,yBAAyB;IAU5B,OAAO,CAAC,kBAAkB;IAkD1B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CA+ClC;IAED,OAAO,CAAC,sBAAsB;CAK/B"}
@@ -0,0 +1,6 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,42 @@
1
+ import { Store } from 'effector';
2
+ export type CustomPrefetchMethod = (gifs: string[] | string) => Promise<unknown>;
3
+ export type CustomGetCachePathMethod = (uri: string) => Promise<string | null>;
4
+ export type GroupNumber = number;
5
+ export type GifCelebrationApiRequests = {
6
+ getGifs: () => Promise<GifResponse>;
7
+ };
8
+ export type GifCelebrationCache = {
9
+ prefetchMethod?: CustomPrefetchMethod;
10
+ };
11
+ export type GifCelebrationsModelProps = {
12
+ api: GifCelebrationApiRequests;
13
+ totalProblems: Store<number>;
14
+ resolvedProblems: Store<number>;
15
+ customPrefetchMethod?: CustomPrefetchMethod;
16
+ customGetCachePathMethod?: CustomGetCachePathMethod;
17
+ };
18
+ export type GifsGroup = string[];
19
+ export type GifsGroups = Record<`group${GroupNumber}`, GifsGroup>;
20
+ export type GifObject = {
21
+ url: string;
22
+ isShown: boolean;
23
+ group: `group${GroupNumber}`;
24
+ };
25
+ export type GifsStructure = Record<`group${GroupNumber}`, GifObject[]>;
26
+ /**
27
+ * Usually, the response contains 3 groups of gifs:
28
+ * - group1: early celebrations
29
+ * - group2: mid celebrations
30
+ * - group3: party
31
+ */
32
+ export type GifResponse = {
33
+ data: GifsGroups;
34
+ ok: boolean;
35
+ };
36
+ export type GifsPayload = {
37
+ group: number;
38
+ };
39
+ export type ProblemsPercentageTable = Record<number, number>;
40
+ export type ProgressValue = 0 | 1 | 2;
41
+ export type TextComponentType = (text: string) => React.ReactNode;
42
+ //# sourceMappingURL=model.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"model.types.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/types/model.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,MAAM,MAAM,oBAAoB,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;AAChF,MAAM,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAA;AAE9E,MAAM,MAAM,WAAW,GAAG,MAAM,CAAA;AAEhC,MAAM,MAAM,yBAAyB,GAAG;IACtC,OAAO,EAAE,MAAM,OAAO,CAAC,WAAW,CAAC,CAAA;CACpC,CAAA;AACD,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,CAAC,EAAE,oBAAoB,CAAA;CACtC,CAAA;AAED,MAAM,MAAM,yBAAyB,GAAG;IACtC,GAAG,EAAE,yBAAyB,CAAA;IAC9B,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC5B,gBAAgB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC/B,oBAAoB,CAAC,EAAE,oBAAoB,CAAA;IAC3C,wBAAwB,CAAC,EAAE,wBAAwB,CAAA;CACpD,CAAA;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,EAAE,CAAA;AAChC,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,QAAQ,WAAW,EAAE,EAAE,SAAS,CAAC,CAAA;AAEjE,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAA;IACX,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,QAAQ,WAAW,EAAE,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,QAAQ,WAAW,EAAE,EAAE,SAAS,EAAE,CAAC,CAAA;AACtE;;;;;GAKG;AACH,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,UAAU,CAAA;IAChB,EAAE,EAAE,OAAO,CAAA;CACZ,CAAA;AACD,MAAM,MAAM,WAAW,GAAG;IACxB,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,MAAM,uBAAuB,GAAG,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"}
@@ -6,4 +6,5 @@ export * from './features/celebrations';
6
6
  export * from './features/endOfAssignment';
7
7
  export * from './features/formulaSheet';
8
8
  export * from './features/problemSelector';
9
+ export * from './features/gifCelebrations';
9
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,uBAAuB,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AACxD,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA;AACnC,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,yBAAyB,CAAA;AACvC,cAAc,4BAA4B,CAAA;AAC1C,cAAc,4BAA4B,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/lib/helpers/helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,YAAW,CAAC;AAE7B,eAAO,MAAM,gBAAgB,cACsC,CAAA;AASnE,eAAO,MAAM,mBAAmB,SAAU,IAAI,WAuB7C,CAAA"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/lib/helpers/helpers.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,YAAW,CAAA;AAE5B,eAAO,MAAM,gBAAgB,cACsC,CAAA;AASnE,eAAO,MAAM,mBAAmB,SAAU,IAAI,WAuB7C,CAAA"}
@@ -20,6 +20,11 @@ export declare const LOCALIZATION_CONFIGS: {
20
20
  howCanIHelp: string;
21
21
  showError: string;
22
22
  };
23
+ gifCelebrations: {
24
+ greatStart: string;
25
+ onTheWay: string;
26
+ almostThere: string;
27
+ };
23
28
  };
24
29
  "en-GB": {
25
30
  "teacherFeedback.noComments": string;
@@ -42,6 +47,11 @@ export declare const LOCALIZATION_CONFIGS: {
42
47
  howCanIHelp: string;
43
48
  showError: string;
44
49
  };
50
+ gifCelebrations: {
51
+ greatStart: string;
52
+ onTheWay: string;
53
+ almostThere: string;
54
+ };
45
55
  };
46
56
  "sv-SE": {
47
57
  "teacherFeedback.noComments": string;
@@ -64,6 +74,11 @@ export declare const LOCALIZATION_CONFIGS: {
64
74
  howCanIHelp: string;
65
75
  showError: string;
66
76
  };
77
+ gifCelebrations: {
78
+ greatStart: string;
79
+ onTheWay: string;
80
+ almostThere: string;
81
+ };
67
82
  };
68
83
  };
69
84
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhC,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIhC,CAAA"}
@@ -21,6 +21,11 @@ export declare const setLocalization: import("effector").EventCallable<{
21
21
  howCanIHelp: string;
22
22
  showError: string;
23
23
  };
24
+ gifCelebrations: {
25
+ greatStart: string;
26
+ onTheWay: string;
27
+ almostThere: string;
28
+ };
24
29
  } | ((config: typeof LOCALIZATION_CONFIGS) => Translations)>;
25
30
  export declare const $localization: import("effector").StoreWritable<{
26
31
  "teacherFeedback.noComments": string;
@@ -43,5 +48,10 @@ export declare const $localization: import("effector").StoreWritable<{
43
48
  howCanIHelp: string;
44
49
  showError: string;
45
50
  };
51
+ gifCelebrations: {
52
+ greatStart: string;
53
+ onTheWay: string;
54
+ almostThere: string;
55
+ };
46
56
  }>;
47
57
  //# sourceMappingURL=model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;cACD,OAAO,oBAAoB,KAAK,YAAY,EACpE,CAAA;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;EAMzB,CAAA"}
1
+ {"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;cACD,OAAO,oBAAoB,KAAK,YAAY,EACpE,CAAA;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;EAMzB,CAAA"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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;AAK7F,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,sBA6C7E,CAAA"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Progress.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/components/Progress.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAiB,EAAoB,WAAW,EAAe,MAAM,yBAAyB,CAAA;AAE9F,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAMpD,KAAK,aAAa,GAAG;IACnB,QAAQ,EAAE,WAAW,CAAC,aAAa,CAAC,CAAA;IACpC,gBAAgB,EAAE,MAAM,CAAA;CACzB,CAAA;AAED,eAAO,MAAM,QAAQ,mCAAoC,aAAa,sBA6CrE,CAAA"}
@@ -0,0 +1,22 @@
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
+ SAFE_AREA: number;
9
+ };
10
+ export declare const ANIMATION_DURATION = 1750;
11
+ export declare const MIN_PROBLEMS_TO_SHOW_GIF = 6;
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
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,85 @@
1
+ import { TranslationKeys } from 'src/shared/translation/types';
2
+ import { GifsGroups, GifsStructure, GroupNumber } 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
+ */
17
+ export declare const calculatePercentageTable: (totalProblems: number) => {
18
+ 50: number;
19
+ 33?: undefined;
20
+ 66?: undefined;
21
+ 25?: undefined;
22
+ 75?: undefined;
23
+ 20?: undefined;
24
+ 40?: undefined;
25
+ 60?: undefined;
26
+ 80?: undefined;
27
+ 15?: undefined;
28
+ 30?: undefined;
29
+ 45?: undefined;
30
+ } | {
31
+ 33: number;
32
+ 66: number;
33
+ 50?: undefined;
34
+ 25?: undefined;
35
+ 75?: undefined;
36
+ 20?: undefined;
37
+ 40?: undefined;
38
+ 60?: undefined;
39
+ 80?: undefined;
40
+ 15?: undefined;
41
+ 30?: undefined;
42
+ 45?: undefined;
43
+ } | {
44
+ 25: number;
45
+ 50: number;
46
+ 75: number;
47
+ 33?: undefined;
48
+ 66?: undefined;
49
+ 20?: undefined;
50
+ 40?: undefined;
51
+ 60?: undefined;
52
+ 80?: undefined;
53
+ 15?: undefined;
54
+ 30?: undefined;
55
+ 45?: undefined;
56
+ } | {
57
+ 20: number;
58
+ 40: number;
59
+ 60: number;
60
+ 80: number;
61
+ 50?: undefined;
62
+ 33?: undefined;
63
+ 66?: undefined;
64
+ 25?: undefined;
65
+ 75?: undefined;
66
+ 15?: undefined;
67
+ 30?: undefined;
68
+ 45?: undefined;
69
+ } | {
70
+ 15: number;
71
+ 30: number;
72
+ 45: number;
73
+ 60: number;
74
+ 75: number;
75
+ 50?: undefined;
76
+ 33?: undefined;
77
+ 66?: undefined;
78
+ 25?: undefined;
79
+ 20?: undefined;
80
+ 40?: undefined;
81
+ 80?: undefined;
82
+ };
83
+ export declare const generateGifsStructure: (gifs: GifsGroups) => GifsStructure;
84
+ export declare const getGifLabel: (relatedGroup: GroupNumber) => TranslationKeys;
85
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
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,EAAE,UAAU,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAE5E;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,wBAAwB,kBAAmB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkC7D,CAAA;AAED,eAAO,MAAM,qBAAqB,SAAU,UAAU,KAAG,aAUtD,CAAA;AAEH,eAAO,MAAM,WAAW,iBAAkB,WAAW,KAAG,eASvD,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { GifCelebrations } from './GifCelebrations';
2
+ export { GifCelebrationsModel } from './model/GifCelebrations.model';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,18 @@
1
+ import { GifsGroups, GifsStructure, CustomPrefetchMethod, CustomGetCachePathMethod } 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 prefetchMethod: CustomPrefetchMethod | typeof Image.prefetch;
12
+ readonly getCachePathMethod?: CustomGetCachePathMethod;
13
+ readonly prefetchGifs: import("effector").Effect<GifsGroups, void, Error>;
14
+ readonly $gifs: import("effector").StoreWritable<GifsStructure | null>;
15
+ constructor({ customPrefetchMethod, customGetCachePathMethod }: GifCelebrationsCacheProps);
16
+ }
17
+ export {};
18
+ //# sourceMappingURL=GifCelebrations.cache.d.ts.map
@@ -0,0 +1 @@
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,oBAAoB,EACpB,wBAAwB,EACzB,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,cAAc,EAAE,oBAAoB,GAAG,OAAO,KAAK,CAAC,QAAQ,CAAA;IAC5E,SAAgB,kBAAkB,CAAC,EAAE,wBAAwB,CAAA;IAE7D,SAAgB,YAAY,qDAQ1B;IAEF,SAAgB,KAAK,yDAGa;gBAEtB,EAAE,oBAAoB,EAAE,wBAAwB,EAAE,EAAE,yBAAyB;CAI1F"}
@@ -0,0 +1,26 @@
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 triggerPlay: import("effector").EventCallable<void>;
11
+ readonly stop: import("effector").EventCallable<void>;
12
+ readonly resetIsGifCelebrationMayBeTriggered: import("effector").EventCallable<void>;
13
+ readonly setIsGifCelebrationMayBeTriggered: import("effector").EventCallable<boolean>;
14
+ readonly $isGifCelebrationMayBeTriggered: 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
+ readonly resetGroupGifs: import("effector").EventCallable<string>;
21
+ constructor({ api, totalProblems, resolvedProblems, customPrefetchMethod, customGetCachePathMethod, }: GifCelebrationsModelProps);
22
+ private setupEventHandlers;
23
+ private readonly handleGifSelection;
24
+ private findGroupForPercentage;
25
+ }
26
+ //# sourceMappingURL=GifCelebrations.model.d.ts.map
@@ -0,0 +1 @@
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,EAGT,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,WAAW,yCAAgB;IAC3C,SAAgB,IAAI,yCAAgB;IAEpC,SAAgB,mCAAmC,yCAAgB;IACnE,SAAgB,iCAAiC,4CAAyB;IAC1E,SAAgB,+BAA+B,4CAM5C;IAEH,SAAgB,oBAAoB,yCAAgB;IACpD,SAAgB,wBAAwB,mEAEN;IAElC,SAAgB,YAAY,8CAA2B;IACvD,SAAgB,UAAU,qDAGe;IAEzC,SAAgB,UAAU,yCAAgB;IAC1C,SAAgB,cAAc,2CAAwB;gBAE1C,EACV,GAAG,EACH,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,GACzB,EAAE,yBAAyB;IAU5B,OAAO,CAAC,kBAAkB;IAkD1B,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CA+ClC;IAED,OAAO,CAAC,sBAAsB;CAK/B"}
@@ -0,0 +1,6 @@
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
@@ -0,0 +1 @@
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"}