@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,73 @@
1
+ "use strict";
2
+
3
+ import { StyleSheet, View, Image } from 'react-native';
4
+ import React, { useLayoutEffect, useState } from 'react';
5
+ import { BORDER_RADIUS, COLORS, SPACING } from '@magmamath/react-native-ui';
6
+ import { MAX_GIF_SIZE, MIN_GIF_SIZE } from "../constants.js";
7
+ import { useText } from "../../../shared/translation/index.js";
8
+ import { getGifLabel } from "../helpers.js";
9
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
+ export const Gif = ({
11
+ gifObject,
12
+ getCachePathMethod,
13
+ TextComponent
14
+ }) => {
15
+ const [size, setSize] = useState(null);
16
+ const [pathOrUri, setPathOrUri] = useState('');
17
+ const t = useText();
18
+ useLayoutEffect(() => {
19
+ const loadImageSize = async () => {
20
+ const path = getCachePathMethod ? (await getCachePathMethod(gifObject.url)) || gifObject.url : gifObject.url;
21
+ Image.getSize(path, (width, height) => {
22
+ setSize({
23
+ width: Math.max(MIN_GIF_SIZE, Math.min(MAX_GIF_SIZE.WIDTH, width)),
24
+ height: Math.max(MIN_GIF_SIZE, Math.min(MAX_GIF_SIZE.HEIGHT, height))
25
+ });
26
+ setPathOrUri(path);
27
+ });
28
+ };
29
+ loadImageSize();
30
+ }, [gifObject.url]);
31
+ return /*#__PURE__*/_jsx(View, {
32
+ style: styles.backgroundContainer,
33
+ children: /*#__PURE__*/_jsxs(View, {
34
+ style: styles.container,
35
+ children: [size && pathOrUri && /*#__PURE__*/_jsx(Image, {
36
+ alt: "Funny celebration animated image",
37
+ source: {
38
+ uri: pathOrUri
39
+ },
40
+ width: size.width,
41
+ height: size.height,
42
+ style: [styles.image, {
43
+ width: size.width,
44
+ height: size.height
45
+ }] //this sizes duplication is needed for compatibility with web and rn
46
+ }), /*#__PURE__*/_jsx(View, {
47
+ style: styles.textContainer,
48
+ children: TextComponent(t(getGifLabel(Number(gifObject.group.replace('group', '')))))
49
+ })]
50
+ })
51
+ });
52
+ };
53
+ const styles = StyleSheet.create({
54
+ backgroundContainer: {
55
+ backgroundColor: 'rgba(255, 255, 255, 0.6)',
56
+ borderRadius: 23,
57
+ padding: SPACING[200]
58
+ },
59
+ container: {
60
+ padding: SPACING[1600],
61
+ borderRadius: BORDER_RADIUS[400],
62
+ backgroundColor: COLORS.NEUTRAL_1
63
+ },
64
+ image: {
65
+ borderRadius: BORDER_RADIUS[100]
66
+ },
67
+ textContainer: {
68
+ position: 'absolute',
69
+ bottom: 74,
70
+ alignSelf: 'center'
71
+ }
72
+ });
73
+ //# sourceMappingURL=Gif.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","View","Image","React","useLayoutEffect","useState","BORDER_RADIUS","COLORS","SPACING","MAX_GIF_SIZE","MIN_GIF_SIZE","useText","getGifLabel","jsx","_jsx","jsxs","_jsxs","Gif","gifObject","getCachePathMethod","TextComponent","size","setSize","pathOrUri","setPathOrUri","t","loadImageSize","path","url","getSize","width","height","Math","max","min","WIDTH","HEIGHT","style","styles","backgroundContainer","children","container","alt","source","uri","image","textContainer","Number","group","replace","create","backgroundColor","borderRadius","padding","NEUTRAL_1","position","bottom","alignSelf"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/Gif.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,KAAK,QAAQ,cAAc;AACtD,OAAOC,KAAK,IAAIC,eAAe,EAAEC,QAAQ,QAAQ,OAAO;AACxD,SAASC,aAAa,EAAEC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AAE3E,SAASC,YAAY,EAAEC,YAAY,QAAQ,iBAAc;AACzD,SAASC,OAAO,QAAQ,sCAA6B;AACrD,SAASC,WAAW,QAAQ,eAAY;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAaxC,OAAO,MAAMC,GAAG,GAAGA,CAAC;EAAEC,SAAS;EAAEC,kBAAkB;EAAEC;AAAwB,CAAC,KAAK;EACjF,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGjB,QAAQ,CAAc,IAAI,CAAC;EACnD,MAAM,CAACkB,SAAS,EAAEC,YAAY,CAAC,GAAGnB,QAAQ,CAAS,EAAE,CAAC;EAEtD,MAAMoB,CAAC,GAAGd,OAAO,CAAC,CAAC;EAEnBP,eAAe,CAAC,MAAM;IACpB,MAAMsB,aAAa,GAAG,MAAAA,CAAA,KAAY;MAChC,MAAMC,IAAI,GAAGR,kBAAkB,GAC3B,CAAC,MAAMA,kBAAkB,CAACD,SAAS,CAACU,GAAG,CAAC,KAAKV,SAAS,CAACU,GAAG,GAC1DV,SAAS,CAACU,GAA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,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;MAAC,CACxE,CAAC;IAAA,CACH;EAAC,CACH,CAAC;AAEX,CAAC;AAED,MAAMX,MAAM,GAAGtC,UAAU,CAACkD,MAAM,CAAC;EAC/BX,mBAAmB,EAAE;IACnBY,eAAe,EAAE,0BAA0B;IAC3CC,YAAY,EAAE,EAAE;IAChBC,OAAO,EAAE7C,OAAO,CAAC,GAAG;EACtB,CAAC;EACDiC,SAAS,EAAE;IACTY,OAAO,EAAE7C,OAAO,CAAC,IAAI,CAAC;IACtB4C,YAAY,EAAE9C,aAAa,CAAC,GAAG,CAAC;IAChC6C,eAAe,EAAE5C,MAAM,CAAC+C;EAC1B,CAAC;EACDT,KAAK,EAAE;IACLO,YAAY,EAAE9C,aAAa,CAAC,GAAG;EACjC,CAAC;EACDwC,aAAa,EAAE;IACbS,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,EAAE;IACVC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+
3
+ import { StyleSheet, View, Image, Platform } from 'react-native';
4
+ import React from 'react';
5
+ import { BORDER_RADIUS, COLORS, HeadingVariants, SPACING, Typography } from '@magmamath/react-native-ui';
6
+ import Animated, { useAnimatedStyle, interpolate } from 'react-native-reanimated';
7
+ import confettiImage from '../assets/confetti.webp';
8
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
9
+ const MIN_WIDTH_FOR_ONE_DIGIT = 12;
10
+ const MIN_WIDTH_FOR_TWO_DIGITS = 15;
11
+ const IS_WEB = Platform.OS === 'web';
12
+ export const Progress = ({
13
+ progress,
14
+ completedPercent
15
+ }) => {
16
+ const progressLineWidth = (() => {
17
+ if (completedPercent <= 9) {
18
+ return MIN_WIDTH_FOR_ONE_DIGIT;
19
+ }
20
+ if (completedPercent <= 15) {
21
+ return MIN_WIDTH_FOR_TWO_DIGITS;
22
+ }
23
+ return completedPercent;
24
+ })();
25
+ const animatedStyles = useAnimatedStyle(() => ({
26
+ width: `${interpolate(progress.value, [0, 1, 2], [0, progressLineWidth, progressLineWidth])}%`
27
+ }), [progress, progressLineWidth]);
28
+ return /*#__PURE__*/_jsx(View, {
29
+ style: styles.backgroundContainer,
30
+ children: /*#__PURE__*/_jsxs(View, {
31
+ style: styles.container,
32
+ children: [/*#__PURE__*/_jsx(View, {
33
+ style: styles.progressContainer,
34
+ children: /*#__PURE__*/_jsx(Animated.View, {
35
+ style: [styles.progress, animatedStyles],
36
+ children: /*#__PURE__*/_jsx(Typography, {
37
+ variant: HeadingVariants.H1,
38
+ style: styles.percent,
39
+ children: `${completedPercent}%`
40
+ })
41
+ })
42
+ }), /*#__PURE__*/_jsx(Image, {
43
+ source: IS_WEB ? {
44
+ uri: confettiImage
45
+ } : require('../assets/confetti.webp'),
46
+ style: styles.confetti
47
+ })]
48
+ })
49
+ });
50
+ };
51
+ const styles = StyleSheet.create({
52
+ backgroundContainer: {
53
+ backgroundColor: 'rgba(255, 255, 255, 0.6)',
54
+ borderRadius: 23,
55
+ padding: SPACING[200],
56
+ width: '100%'
57
+ },
58
+ container: {
59
+ width: '100%',
60
+ height: 116,
61
+ flexDirection: 'row',
62
+ alignItems: 'center',
63
+ borderRadius: BORDER_RADIUS[400],
64
+ backgroundColor: COLORS.NEUTRAL_1,
65
+ paddingLeft: SPACING[400],
66
+ paddingRight: SPACING[200],
67
+ gap: SPACING[100]
68
+ },
69
+ progressContainer: {
70
+ height: 50,
71
+ flexGrow: 1,
72
+ backgroundColor: COLORS.NEUTRAL_5,
73
+ borderRadius: 90,
74
+ overflow: 'hidden'
75
+ },
76
+ progress: {
77
+ position: 'absolute',
78
+ height: '100%',
79
+ backgroundColor: COLORS.PRIMARY_BLUE,
80
+ borderRadius: BORDER_RADIUS[200],
81
+ justifyContent: 'center',
82
+ alignItems: 'flex-end',
83
+ paddingRight: 10.6,
84
+ overflow: 'hidden'
85
+ },
86
+ confetti: {
87
+ width: 75,
88
+ height: 70,
89
+ marginHorizontal: SPACING[200]
90
+ },
91
+ percent: {
92
+ position: 'absolute',
93
+ paddingRight: 10,
94
+ color: COLORS.NEUTRAL_1,
95
+ fontWeight: '700'
96
+ }
97
+ });
98
+ //# sourceMappingURL=Progress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["StyleSheet","View","Image","Platform","React","BORDER_RADIUS","COLORS","HeadingVariants","SPACING","Typography","Animated","useAnimatedStyle","interpolate","confettiImage","jsx","_jsx","jsxs","_jsxs","MIN_WIDTH_FOR_ONE_DIGIT","MIN_WIDTH_FOR_TWO_DIGITS","IS_WEB","OS","Progress","progress","completedPercent","progressLineWidth","animatedStyles","width","value","style","styles","backgroundContainer","children","container","progressContainer","variant","H1","percent","source","uri","require","confetti","create","backgroundColor","borderRadius","padding","height","flexDirection","alignItems","NEUTRAL_1","paddingLeft","paddingRight","gap","flexGrow","NEUTRAL_5","overflow","position","PRIMARY_BLUE","justifyContent","marginHorizontal","color","fontWeight"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/Progress.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,EAAEC,KAAK,EAAEC,QAAQ,QAAQ,cAAc;AAChE,OAAOC,KAAK,MAAM,OAAO;AACzB,SACEC,aAAa,EACbC,MAAM,EACNC,eAAe,EACfC,OAAO,EACPC,UAAU,QACL,4BAA4B;AACnC,OAAOC,QAAQ,IAAIC,gBAAgB,EAAeC,WAAW,QAAQ,yBAAyB;AAC9F,OAAOC,aAAa,MAAM,yBAAyB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGnD,MAAMC,uBAAuB,GAAG,EAAE;AAClC,MAAMC,wBAAwB,GAAG,EAAE;AACnC,MAAMC,MAAM,GAAGjB,QAAQ,CAACkB,EAAE,KAAK,KAAK;AAOpC,OAAO,MAAMC,QAAQ,GAAGA,CAAC;EAAEC,QAAQ;EAAEC;AAAgC,CAAC,KAAK;EACzE,M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M,CAAC2C,SAAS;IACvBY,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ export const BACKDROP_COLOR = {
4
+ INITIAL: 'rgba(51, 51, 51, 0)',
5
+ FINAL: 'rgba(51, 51, 51, 0.66)'
6
+ };
7
+ export const CONTENT_CONTAINER = {
8
+ ANGLE: 5,
9
+ CONTAINER_WIDTH: 769,
10
+ SAFE_AREA: 44 // to be sure that the content is not cut off on the edges because of rotate transform
11
+ };
12
+ export const ANIMATION_DURATION = 1750;
13
+ export const MIN_PROBLEMS_TO_SHOW_GIF = 6;
14
+ export const MAX_GIF_SIZE = {
15
+ WIDTH: 480,
16
+ HEIGHT: 300
17
+ };
18
+ export const MIN_GIF_SIZE = 300;
19
+ export const GROUPS_PERCENTAGES = {
20
+ group1: [15, 20, 25, 30],
21
+ // Early celebrations
22
+ group2: [33, 40, 45, 50],
23
+ // Mid celebrations
24
+ group3: [60, 66, 75, 80] // Party
25
+ };
26
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["BACKDROP_COLOR","INITIAL","FINAL","CONTENT_CONTAINER","ANGLE","CONTAINER_WIDTH","SAFE_AREA","ANIMATION_DURATION","MIN_PROBLEMS_TO_SHOW_GIF","MAX_GIF_SIZE","WIDTH","HEIGHT","MIN_GIF_SIZE","GROUPS_PERCENTAGES","group1","group2","group3"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/constants.ts"],"mappings":";;AAAA,OAAO,MAAMA,cAAc,GAAG;EAC5BC,OAAO,EAAE,qBAAqB;EAC9BC,KAAK,EAAE;AACT,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAG;EAC/BC,KAAK,EAAE,CAAC;EACRC,eAAe,EAAE,GAAG;EACpBC,SAAS,EAAE,EAAE,CAAE;AACjB,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAG,IAAI;AACtC,OAAO,MAAMC,wBAAwB,GAAG,CAAC;AAEzC,OAAO,MAAMC,YAAY,GAAG;EAC1BC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE;AACV,CAAC;AACD,OAAO,MAAMC,YAAY,GAAG,GAAG;AAE/B,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;EAAE;EAC1BC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;EAAE;EAC1BC,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAE;AAC5B,CAAC","ignoreList":[]}
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+
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 const calculatePercentageTable = totalProblems => {
18
+ if (totalProblems <= 12) return {
19
+ 50: Math.ceil(totalProblems * 0.5)
20
+ };
21
+ if (totalProblems <= 18) {
22
+ return {
23
+ 33: Math.ceil(totalProblems * 0.33),
24
+ 66: Math.ceil(totalProblems * 0.66)
25
+ };
26
+ }
27
+ if (totalProblems <= 24) {
28
+ return {
29
+ 25: Math.ceil(totalProblems * 0.25),
30
+ 50: Math.ceil(totalProblems * 0.5),
31
+ 75: Math.ceil(totalProblems * 0.75)
32
+ };
33
+ }
34
+ if (totalProblems <= 30) {
35
+ return {
36
+ 20: Math.ceil(totalProblems * 0.2),
37
+ 40: Math.ceil(totalProblems * 0.4),
38
+ 60: Math.ceil(totalProblems * 0.6),
39
+ 80: Math.ceil(totalProblems * 0.8)
40
+ };
41
+ }
42
+ return {
43
+ 15: Math.ceil(totalProblems * 0.15),
44
+ 30: Math.ceil(totalProblems * 0.3),
45
+ 45: Math.ceil(totalProblems * 0.45),
46
+ 60: Math.ceil(totalProblems * 0.6),
47
+ 75: Math.ceil(totalProblems * 0.75)
48
+ };
49
+ };
50
+ export const generateGifsStructure = gifs => Object.fromEntries(Object.entries(gifs).map(([key, value]) => [key, value.map(url => ({
51
+ url,
52
+ isShown: false,
53
+ group: key
54
+ }))]));
55
+ export const getGifLabel = relatedGroup => {
56
+ if (relatedGroup === 2) {
57
+ return 'gifCelebrations.onTheWay';
58
+ }
59
+ if (relatedGroup === 3) {
60
+ return 'gifCelebrations.almostThere';
61
+ }
62
+ return 'gifCelebrations.greatStart';
63
+ };
64
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["calculatePercentageTable","totalProblems","Math","ceil","generateGifsStructure","gifs","Object","fromEntries","entries","map","key","value","url","isShown","group","getGifLabel","relatedGroup"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/helpers.ts"],"mappings":";;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,wBAAwB,GAAIC,aAAqB,IAAK;EACjE,IAAIA,aAAa,IAAI,EAAE,EAAE,OAAO;IAAE,EAAE,EAAEC,IAAI,CAACC,IAAI,CAACF,aAAa,GAAG,GAAG;EAAE,CAAC;EAEtE,IAAIA,aAAa,IAAI,EAAE,EAAE;IACvB,OAAO;MACL,EAAE,EAAEC,IAAI,CAACC,IAAI,CAACF,aAAa,GAAG,IAAI,CAAC;MACnC,EAAE,EAAEC,IAAI,CAACC,IAAI,CAACF,aAAa,GAAG,IAAI;IACpC,CAAC;EACH;EAEA,IAAIA,aAAa,IAAI,EAAE,EAAE;IACvB,OAAO;M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H,OAAO,MAAMK,WAAW,GAAIC,YAAyB,IAAsB;EACzE,IAAIA,YAAY,KAAK,CAAC,EAAE;IACtB,OAAO,0BAA0B;EACnC;EACA,IAAIA,YAAY,KAAK,CAAC,EAAE;IACtB,OAAO,6BAA6B;EACtC;EAEA,OAAO,4BAA4B;AACrC,CAAC","ignoreList":[]}
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+
3
+ export { GifCelebrations } from "./GifCelebrations.js";
4
+ export { GifCelebrationsModel } from "./model/GifCelebrations.model.js";
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["GifCelebrations","GifCelebrationsModel"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/index.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,sBAAmB;AACnD,SAASC,oBAAoB,QAAQ,kCAA+B","ignoreList":[]}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ import { createEffect, createEvent, createStore } from 'effector';
4
+ import { generateGifsStructure } from "../helpers.js";
5
+ import { Image } from 'react-native';
6
+ export class GifCelebrationsCache {
7
+ initialSet = createEvent();
8
+ set = createEvent();
9
+ reset = createEvent();
10
+ prefetchGifs = createEffect(data => {
11
+ Object.values(data).forEach(group => {
12
+ group.forEach(gifUrl => {
13
+ Image.prefetch(gifUrl);
14
+ });
15
+ });
16
+ this.initialSet(data);
17
+ });
18
+ $gifs = createStore(null).reset(this.reset).on(this.initialSet, (_, gifs) => generateGifsStructure(gifs)).on(this.set, (_, gifs) => gifs);
19
+ constructor({
20
+ customPrefetchMethod,
21
+ customGetCachePathMethod
22
+ }) {
23
+ this.prefetchMethod = customPrefetchMethod || Image.prefetch;
24
+ this.getCachePathMethod = customGetCachePathMethod;
25
+ }
26
+ }
27
+ //# sourceMappingURL=GifCelebrations.cache.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEffect","createEvent","createStore","generateGifsStructure","Image","GifCelebrationsCache","initialSet","set","reset","prefetchGifs","data","Object","values","forEach","group","gifUrl","prefetch","$gifs","on","_","gifs","constructor","customPrefetchMethod","customGetCachePathMethod","prefetchMethod","getCachePathMethod"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/model/GifCelebrations.cache.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,WAAW,QAAQ,UAAU;AAOjE,SAASC,qBAAqB,QAAQ,eAAY;AAClD,SAASC,KAAK,QAAQ,cAAc;AAOpC,OAAO,MAAMC,oBAAoB,CAAC;EAChBC,UAAU,GAAGL,WAAW,CAAa,CAAC;EACtCM,GAAG,GAAGN,WAAW,CAAgB,CAAC;EAClCO,KAAK,GAAGP,WAAW,CAAC,CAAC;EAKrBQ,YAAY,GAAGT,YAAY,CAAoBU,IAAI,IAAK;IACtEC,MAAM,CAACC,MAAM,CAACF,IAAI,CAAC,CAACG,OAAO,CAAEC,KAAK,IAAK;MACrCA,KAAK,CAACD,OAAO,CAAEE,MAAM,IAAK;QACxBX,KAAK,CAACY,QAAQ,CAACD,MAAM,CAAC;MACxB,CAAC,CAAC;IACJ,CAAC,CAAC;IAEF,IAAI,CAACT,UAAU,CAACI,IAAI,CAAC;EACvB,CAAC,CAAC;EAEcO,KAAK,GAAGf,WAAW,CAAuB,IAAI,CAAC,CAC5DM,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC,CACjBU,EAAE,CAAC,IAAI,CAACZ,UAAU,EAAE,CAACa,CAAC,EAAEC,IAAI,KAAKjB,qBAAqB,CAACiB,IAAI,CAAC,CAAC,CAC7DF,EAAE,CAAC,IAAI,CAACX,GAAG,EAAE,CAACY,CAAC,EAAEC,IAAI,KAAKA,IAAI,CAAC;EAElCC,WAAWA,CAAC;IAAEC,oBAAoB;IAAEC;EAAoD,CAAC,EAAE;IACzF,IAAI,CAACC,cAAc,GAAGF,oBAAoB,IAAIlB,KAAK,CAACY,QAAQ;IAC5D,IAAI,CAACS,kBAAkB,GAAGF,wBAAwB;EACpD;AACF","ignoreList":[]}
@@ -0,0 +1,120 @@
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 } from "../helpers.js";
7
+ import { GROUPS_PERCENTAGES, MIN_PROBLEMS_TO_SHOW_GIF } from "../constants.js";
8
+ export class GifCelebrationsModel {
9
+ triggerPlay = createEvent();
10
+ stop = createEvent();
11
+ resetIsGifCelebrationMayBeTriggered = createEvent();
12
+ setIsGifCelebrationMayBeTriggered = createEvent();
13
+ $isGifCelebrationMayBeTriggered = createStore(false).reset(this.resetIsGifCelebrationMayBeTriggered).reset(this.stop).on(this.setIsGifCelebrationMayBeTriggered, (_, isGifCelebrationMayBeTriggered) => isGifCelebrationMayBeTriggered);
14
+ resetPercentageTable = createEvent();
15
+ $problemsPercentageTable = createStore(null).reset(this.resetPercentageTable);
16
+ setActiveGif = createEvent();
17
+ $activeGif = createStore(null).reset(this.stop).reset(this.resetIsGifCelebrationMayBeTriggered).on(this.setActiveGif, (_, gif) => gif);
18
+ initialize = createEvent();
19
+ resetGroupGifs = createEvent();
20
+ constructor({
21
+ api,
22
+ totalProblems,
23
+ resolvedProblems,
24
+ customPrefetchMethod,
25
+ customGetCachePathMethod
26
+ }) {
27
+ this.api = new GifCelebrationsApi(api);
28
+ this.cache = new GifCelebrationsCache({
29
+ customPrefetchMethod,
30
+ customGetCachePathMethod
31
+ });
32
+ this.$totalProblems = totalProblems;
33
+ this.$resolvedProblems = resolvedProblems;
34
+ this.setupEventHandlers();
35
+ }
36
+ setupEventHandlers() {
37
+ sample({
38
+ source: this.api.getGifsFx.doneData,
39
+ filter: response => response.ok,
40
+ fn: response => response.data,
41
+ target: this.cache.prefetchGifs
42
+ });
43
+ sample({
44
+ clock: this.initialize,
45
+ source: this.cache.$gifs,
46
+ filter: gifs => !gifs,
47
+ target: this.api.getGifsFx
48
+ });
49
+ sample({
50
+ //todo: fix types
51
+ //@ts-ignore
52
+ clock: [this.initialize, this.$totalProblems.updates],
53
+ source: this.$totalProblems,
54
+ filter: totalProblems => totalProblems && totalProblems >= MIN_PROBLEMS_TO_SHOW_GIF,
55
+ fn: totalProblems => calculatePercentageTable(totalProblems),
56
+ target: this.$problemsPercentageTable
57
+ });
58
+ sample({
59
+ clock: this.triggerPlay,
60
+ source: {
61
+ isGifCelebrationMayBeTriggered: this.$isGifCelebrationMayBeTriggered,
62
+ gifsGroups: this.cache.$gifs,
63
+ resolvedProblem: this.$resolvedProblems,
64
+ problemsPercentageTable: this.$problemsPercentageTable
65
+ },
66
+ filter: ({
67
+ isGifCelebrationMayBeTriggered,
68
+ gifsGroups,
69
+ resolvedProblem,
70
+ problemsPercentageTable
71
+ }) => !!(isGifCelebrationMayBeTriggered && gifsGroups && resolvedProblem !== undefined && problemsPercentageTable),
72
+ fn: sources => sources,
73
+ target: this.handleGifSelection
74
+ });
75
+ }
76
+ handleGifSelection = createEffect(({
77
+ gifsGroups,
78
+ resolvedProblem,
79
+ problemsPercentageTable
80
+ }) => {
81
+ const percentageMilestone = Object.keys(problemsPercentageTable).find(key => problemsPercentageTable[Number(key)] === resolvedProblem);
82
+ if (!percentageMilestone) return null;
83
+ const groupName = this.findGroupForPercentage(Number(percentageMilestone));
84
+ if (!groupName) return null;
85
+ const gifsForGroup = gifsGroups[groupName];
86
+ if (!gifsForGroup || gifsForGroup.length === 0) return null;
87
+ const unusedGifIndex = gifsForGroup.findIndex(gif => !gif.isShown);
88
+ if (unusedGifIndex === -1) {
89
+ const updatedGifsGroups = {
90
+ ...gifsGroups
91
+ };
92
+ updatedGifsGroups[groupName] = gifsGroups[groupName].map(gif => ({
93
+ ...gif,
94
+ isShown: false
95
+ }));
96
+ const gifObject = {
97
+ ...updatedGifsGroups[groupName][0],
98
+ isShown: true
99
+ };
100
+ updatedGifsGroups[groupName][0].isShown = true;
101
+ this.setActiveGif(gifObject);
102
+ this.cache.set(updatedGifsGroups);
103
+ }
104
+ const selectedGif = gifsForGroup[unusedGifIndex];
105
+ const gifObject = {
106
+ ...selectedGif,
107
+ isShown: true
108
+ };
109
+ const updatedGifsGroups = {
110
+ ...gifsGroups
111
+ };
112
+ updatedGifsGroups[groupName][unusedGifIndex].isShown = true;
113
+ this.cache.set(updatedGifsGroups);
114
+ this.setActiveGif(gifObject);
115
+ });
116
+ findGroupForPercentage(percentage) {
117
+ return Object.keys(GROUPS_PERCENTAGES).find(key => GROUPS_PERCENTAGES[key].includes(percentage));
118
+ }
119
+ }
120
+ //# sourceMappingURL=GifCelebrations.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEffect","createEvent","createStore","sample","GifCelebrationsApi","GifCelebrationsCache","calculatePercentageTable","GROUPS_PERCENTAGES","MIN_PROBLEMS_TO_SHOW_GIF","GifCelebrationsModel","triggerPlay","stop","resetIsGifCelebrationMayBeTriggered","setIsGifCelebrationMayBeTriggered","$isGifCelebrationMayBeTriggered","reset","on","_","isGifCelebrationMayBeTriggered","resetPercentageTable","$problemsPercentageTable","setActiveGif","$activeGif","gif","initialize","resetGroupGifs","constructor","api","totalProblems","resolvedProblems","customPrefetchMethod","customGetCachePathMethod","cache","$totalProblems","$resolvedProblems","setupEventHandlers","source","getGifsFx","doneData","filter","response","ok","fn","data","target","prefetchGifs","clock","$gifs","gifs","updates","gifsGroups","resolvedProblem","problemsPercentageTable","undefined","sources","handleGifSelection","percentageMilestone","Object","keys","find","key","Number","groupName","findGroupForPercentage","gifsForGroup","length","unusedGifIndex","findIndex","isShown","updatedGifsGroups","map","gifObject","set","selectedGif","percentage","includes"],"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;AAQzD,SAASC,oBAAoB,QAAQ,4BAAyB;AAC9D,SAASC,wBAAwB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SAAoB,GAAG;QAC3B,GAAGF,iBAAiB,CAACP,SAAS,CAAC,CAAC,CAAC,CAAC;QAClCM,OAAO,EAAE;MACX,CAAC;MACDC,iBAAiB,CAACP,SAAS,CAAC,CAAC,CAAC,CAAC,CAACM,OAAO,GAAG,IAAI;MAE9C,IAAI,CAAC/C,YAAY,CAACkD,SAAS,CAAC;MAC5B,IAAI,CAACvC,KAAK,CAACwC,GAAG,CAACH,iBAAiB,CAAC;IACnC;IAEA,MAAMI,WAAW,GAAGT,YAAY,CAACE,cAAc,CAAC;IAEhD,MAAMK,SAAoB,GAAG;MAC3B,GAAGE,WAAW;MACdL,OAAO,EAAE;IACX,CAAC;IAED,MAAMC,iBAAiB,GAAG;MAAE,GAAGnB;IAAW,CAAC;IAC3CmB,iBAAiB,CAACP,SAAS,CAAC,CAACI,cAAc,CAAC,CAACE,OAAO,GAAG,IAAI;IAC3D,IAAI,CAACpC,KAAK,CAACwC,GAAG,CAACH,iBAAiB,CAAC;IAEjC,IAAI,CAAChD,YAAY,CAACkD,SAAS,CAAC;EAC9B,CACF,CAAC;EAEOR,sBAAsBA,CAACW,UAAkB,EAAsB;IACrE,OAAOjB,MAAM,CAACC,IAAI,CAACnD,kBAAkB,CAAC,CAACoD,IAAI,CAAEC,GAAG,IAC9CrD,kBAAkB,CAACqD,GAAG,CAAoC,CAACe,QAAQ,CAACD,UAAU,CAChF,CAAC;EACH;AACF","ignoreList":[]}
@@ -0,0 +1,9 @@
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
@@ -0,0 +1 @@
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":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=model.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/types/model.types.ts"],"mappings":"","ignoreList":[]}
@@ -8,4 +8,5 @@ export * from "./features/celebrations/index.js";
8
8
  export * from "./features/endOfAssignment/index.js";
9
9
  export * from "./features/formulaSheet/index.js";
10
10
  export * from "./features/problemSelector/index.js";
11
+ export * from "./features/gifCelebrations/index.js";
11
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;AAC/F,SAASC,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B","ignoreList":[]}
1
+ {"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;AAC/F,SAASC,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=react-app-env.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../src","sources":["react-app-env.d.ts"],"mappings":"","ignoreList":[]}
@@ -18,5 +18,10 @@
18
18
  "errorMessage": "Something went wrong! Try again",
19
19
  "howCanIHelp": "Hi! Do you want help?",
20
20
  "showError": "Show error"
21
+ },
22
+ "gifCelebrations": {
23
+ "greatStart": "Great start!",
24
+ "onTheWay": "On the way!",
25
+ "almostThere": "Almost there"
21
26
  }
22
27
  }
@@ -18,5 +18,10 @@
18
18
  "errorMessage": "Something went wrong! Try again",
19
19
  "howCanIHelp": "Hi! Do you want help?",
20
20
  "showError": "Show error"
21
+ },
22
+ "gifCelebrations": {
23
+ "greatStart": "Great start!",
24
+ "onTheWay": "On the way!",
25
+ "almostThere": "Almost there"
21
26
  }
22
27
  }
@@ -18,5 +18,10 @@
18
18
  "errorMessage": "Något gick snett! Försök igen",
19
19
  "howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
20
20
  "showError": "Visa fel"
21
+ },
22
+ "gifCelebrations": {
23
+ "greatStart": "Bra start!",
24
+ "onTheWay": "På god väg!",
25
+ "almostThere": "Nästan där"
21
26
  }
22
27
  }
@@ -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"}