@magmamath/students-features 0.6.6-rc.8 → 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.
- package/dist/commonjs/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +5 -3
- package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +3 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/feedback/model/comments.js +5 -3
- package/dist/commonjs/features/feedback/model/comments.js.map +1 -1
- package/dist/commonjs/features/feedback/model/model.js +7 -9
- package/dist/commonjs/features/feedback/model/model.js.map +1 -1
- package/dist/commonjs/index.js +0 -12
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/lib/helpers/helpers.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/en.json +0 -5
- package/dist/commonjs/shared/translation/localization/gb.json +0 -5
- package/dist/commonjs/shared/translation/localization/sw.json +0 -5
- package/dist/module/features/chatbot/components/ChatMessage/ChatMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +5 -3
- package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +3 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/feedback/model/comments.js +5 -3
- package/dist/module/features/feedback/model/comments.js.map +1 -1
- package/dist/module/features/feedback/model/model.js +7 -9
- package/dist/module/features/feedback/model/model.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/translation/localization/en.json +0 -5
- package/dist/module/shared/translation/localization/gb.json +0 -5
- package/dist/module/shared/translation/localization/sw.json +0 -5
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +2 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -15
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -10
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +2 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/lib/helpers/helpers.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -15
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +0 -10
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +5 -3
- package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +2 -1
- package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +7 -4
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +4 -2
- package/src/features/feedback/model/comments.ts +7 -7
- package/src/features/feedback/model/model.ts +6 -6
- package/src/index.ts +0 -1
- package/src/lib/helpers/helpers.ts +1 -1
- package/src/shared/translation/localization/en.json +0 -5
- package/src/shared/translation/localization/gb.json +0 -5
- package/src/shared/translation/localization/sw.json +0 -5
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js +0 -65
- package/dist/commonjs/features/gifCelebrations/GifCelebrations.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/assets/confetti.webp +0 -0
- package/dist/commonjs/features/gifCelebrations/assets/gifFallback.gif +0 -0
- package/dist/commonjs/features/gifCelebrations/components/Backdrop.js +0 -44
- package/dist/commonjs/features/gifCelebrations/components/Backdrop.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js +0 -46
- package/dist/commonjs/features/gifCelebrations/components/ContentContainer.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/components/Gif.js +0 -94
- package/dist/commonjs/features/gifCelebrations/components/Gif.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/components/Progress.js +0 -96
- package/dist/commonjs/features/gifCelebrations/components/Progress.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/constants.js +0 -32
- package/dist/commonjs/features/gifCelebrations/constants.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/helpers.js +0 -111
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/index.js +0 -20
- package/dist/commonjs/features/gifCelebrations/index.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.cache.js +0 -35
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.cache.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js +0 -120
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js +0 -14
- package/dist/commonjs/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
- package/dist/commonjs/features/gifCelebrations/types/model.types.js +0 -6
- package/dist/commonjs/features/gifCelebrations/types/model.types.js.map +0 -1
- package/dist/commonjs/react-app-env.d.js +0 -2
- package/dist/commonjs/react-app-env.d.js.map +0 -1
- package/dist/commonjs/shared/constants.js +0 -9
- package/dist/commonjs/shared/constants.js.map +0 -1
- package/dist/module/features/gifCelebrations/GifCelebrations.js +0 -58
- package/dist/module/features/gifCelebrations/GifCelebrations.js.map +0 -1
- package/dist/module/features/gifCelebrations/assets/confetti.webp +0 -0
- package/dist/module/features/gifCelebrations/assets/gifFallback.gif +0 -0
- package/dist/module/features/gifCelebrations/components/Backdrop.js +0 -36
- package/dist/module/features/gifCelebrations/components/Backdrop.js.map +0 -1
- package/dist/module/features/gifCelebrations/components/ContentContainer.js +0 -38
- package/dist/module/features/gifCelebrations/components/ContentContainer.js.map +0 -1
- package/dist/module/features/gifCelebrations/components/Gif.js +0 -86
- package/dist/module/features/gifCelebrations/components/Gif.js.map +0 -1
- package/dist/module/features/gifCelebrations/components/Progress.js +0 -88
- package/dist/module/features/gifCelebrations/components/Progress.js.map +0 -1
- package/dist/module/features/gifCelebrations/constants.js +0 -28
- package/dist/module/features/gifCelebrations/constants.js.map +0 -1
- package/dist/module/features/gifCelebrations/helpers.js +0 -101
- package/dist/module/features/gifCelebrations/helpers.js.map +0 -1
- package/dist/module/features/gifCelebrations/index.js +0 -5
- package/dist/module/features/gifCelebrations/index.js.map +0 -1
- package/dist/module/features/gifCelebrations/model/GifCelebrations.cache.js +0 -30
- package/dist/module/features/gifCelebrations/model/GifCelebrations.cache.js.map +0 -1
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js +0 -115
- package/dist/module/features/gifCelebrations/model/GifCelebrations.model.js.map +0 -1
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js +0 -9
- package/dist/module/features/gifCelebrations/model/GifCelebrationsApi.js.map +0 -1
- package/dist/module/features/gifCelebrations/types/model.types.js +0 -4
- package/dist/module/features/gifCelebrations/types/model.types.js.map +0 -1
- package/dist/module/react-app-env.d.js +0 -2
- package/dist/module/react-app-env.d.js.map +0 -1
- package/dist/module/shared/constants.js +0 -5
- package/dist/module/shared/constants.js.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/Gif.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts +0 -10
- package/dist/typescript/commonjs/features/gifCelebrations/components/Progress.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts +0 -24
- package/dist/typescript/commonjs/features/gifCelebrations/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts +0 -28
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts +0 -3
- package/dist/typescript/commonjs/features/gifCelebrations/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.cache.d.ts +0 -16
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -24
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -6
- package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts +0 -37
- package/dist/typescript/commonjs/features/gifCelebrations/types/model.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/shared/constants.d.ts +0 -2
- package/dist/typescript/commonjs/shared/constants.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/GifCelebrations.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/Backdrop.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/Gif.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts +0 -10
- package/dist/typescript/module/features/gifCelebrations/components/Progress.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts +0 -24
- package/dist/typescript/module/features/gifCelebrations/constants.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts +0 -28
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/index.d.ts +0 -3
- package/dist/typescript/module/features/gifCelebrations/index.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.cache.d.ts +0 -16
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts +0 -24
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.model.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts +0 -6
- package/dist/typescript/module/features/gifCelebrations/model/GifCelebrationsApi.d.ts.map +0 -1
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts +0 -37
- package/dist/typescript/module/features/gifCelebrations/types/model.types.d.ts.map +0 -1
- package/dist/typescript/module/shared/constants.d.ts +0 -2
- package/dist/typescript/module/shared/constants.d.ts.map +0 -1
- package/src/features/gifCelebrations/GifCelebrations.tsx +0 -77
- package/src/features/gifCelebrations/assets/confetti.webp +0 -0
- package/src/features/gifCelebrations/assets/gifFallback.gif +0 -0
- package/src/features/gifCelebrations/components/Backdrop.tsx +0 -41
- package/src/features/gifCelebrations/components/ContentContainer.tsx +0 -44
- package/src/features/gifCelebrations/components/Gif.tsx +0 -95
- package/src/features/gifCelebrations/components/Progress.tsx +0 -106
- package/src/features/gifCelebrations/constants.ts +0 -28
- package/src/features/gifCelebrations/helpers.ts +0 -123
- package/src/features/gifCelebrations/index.ts +0 -2
- package/src/features/gifCelebrations/model/GifCelebrations.cache.ts +0 -41
- package/src/features/gifCelebrations/model/GifCelebrations.model.ts +0 -167
- package/src/features/gifCelebrations/model/GifCelebrationsApi.ts +0 -10
- package/src/features/gifCelebrations/types/model.types.ts +0 -45
- package/src/react-app-env.d.ts +0 -6
- package/src/shared/constants.ts +0 -3
|
@@ -1,115 +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
|
-
}) {
|
|
25
|
-
this.api = new GifCelebrationsApi(api);
|
|
26
|
-
this.cache = new GifCelebrationsCache({
|
|
27
|
-
customGetCachePathMethod
|
|
28
|
-
});
|
|
29
|
-
this.$totalProblems = totalProblems;
|
|
30
|
-
this.$resolvedProblems = resolvedProblems;
|
|
31
|
-
this.setupEventHandlers();
|
|
32
|
-
}
|
|
33
|
-
setupEventHandlers() {
|
|
34
|
-
sample({
|
|
35
|
-
clock: this.initialize,
|
|
36
|
-
source: this.cache.$gifs,
|
|
37
|
-
filter: gifs => !gifs,
|
|
38
|
-
target: this.api.getGifsFx
|
|
39
|
-
});
|
|
40
|
-
sample({
|
|
41
|
-
source: this.api.getGifsFx.doneData,
|
|
42
|
-
filter: response => response.ok,
|
|
43
|
-
fn: response => response.data,
|
|
44
|
-
target: this.cache.prefetchAllGifs
|
|
45
|
-
});
|
|
46
|
-
sample({
|
|
47
|
-
clock: [this.initialize, this.$totalProblems.updates],
|
|
48
|
-
source: this.$totalProblems,
|
|
49
|
-
fn: totalProblems => {
|
|
50
|
-
if (totalProblems && totalProblems >= MIN_PROBLEMS_TO_SHOW_GIF) {
|
|
51
|
-
console.log('calculatePercentageTable(totalProblems): ', calculatePercentageTable(totalProblems));
|
|
52
|
-
return calculatePercentageTable(totalProblems);
|
|
53
|
-
}
|
|
54
|
-
return null;
|
|
55
|
-
},
|
|
56
|
-
target: this.$problemsPercentageTable
|
|
57
|
-
});
|
|
58
|
-
sample({
|
|
59
|
-
clock: this.play,
|
|
60
|
-
source: {
|
|
61
|
-
isGifCelebrationMayBeTriggered: this.$isGifTriggerable,
|
|
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 = findGroupForPercentage(Number(percentageMilestone));
|
|
84
|
-
const gifsForGroup = gifsGroups[groupName];
|
|
85
|
-
const unusedGifIndex = gifsForGroup.findIndex(gif => !gif.isShown);
|
|
86
|
-
if (unusedGifIndex === -1) {
|
|
87
|
-
const updatedGifsGroups = {
|
|
88
|
-
...gifsGroups
|
|
89
|
-
};
|
|
90
|
-
updatedGifsGroups[groupName] = gifsGroups[groupName].map(gif => ({
|
|
91
|
-
...gif,
|
|
92
|
-
isShown: false
|
|
93
|
-
}));
|
|
94
|
-
const gifObject = {
|
|
95
|
-
...updatedGifsGroups[groupName][0],
|
|
96
|
-
isShown: true
|
|
97
|
-
};
|
|
98
|
-
updatedGifsGroups[groupName][0].isShown = true;
|
|
99
|
-
this.setActiveGif(gifObject);
|
|
100
|
-
this.cache.set(updatedGifsGroups);
|
|
101
|
-
}
|
|
102
|
-
const selectedGif = gifsForGroup[unusedGifIndex];
|
|
103
|
-
const gifObject = {
|
|
104
|
-
...selectedGif,
|
|
105
|
-
isShown: true
|
|
106
|
-
};
|
|
107
|
-
const updatedGifsGroups = {
|
|
108
|
-
...gifsGroups
|
|
109
|
-
};
|
|
110
|
-
updatedGifsGroups[groupName][unusedGifIndex].isShown = true;
|
|
111
|
-
this.cache.set(updatedGifsGroups);
|
|
112
|
-
this.setActiveGif(gifObject);
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
//# 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","cache","$totalProblems","$resolvedProblems","setupEventHandlers","clock","source","$gifs","filter","gifs","target","getGifsFx","doneData","response","ok","fn","data","prefetchAllGifs","updates","console","log","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":"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","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 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/types/model.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["react-app-env.d.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -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
|
package/dist/typescript/commonjs/features/gifCelebrations/components/ContentContainer.d.ts.map
DELETED
|
@@ -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,sBAoD7E,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<any>;
|
|
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;AAG5B;;;;;;;;;;;;;;;;;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,iBAYrF,CAAA;AAED,eAAO,MAAM,kBAAkB,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,WACrC,CAAA"}
|
|
@@ -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,16 +0,0 @@
|
|
|
1
|
-
import { GifsGroups, GifsStructure, CustomGetCachePathMethod } from '../types/model.types';
|
|
2
|
-
type GifCelebrationsCacheProps = {
|
|
3
|
-
customGetCachePathMethod?: CustomGetCachePathMethod;
|
|
4
|
-
};
|
|
5
|
-
export declare class GifCelebrationsCache {
|
|
6
|
-
readonly initialSet: import("effector").EventCallable<GifsGroups>;
|
|
7
|
-
readonly set: import("effector").EventCallable<GifsStructure>;
|
|
8
|
-
readonly reset: import("effector").EventCallable<void>;
|
|
9
|
-
readonly getCachePathMethod?: CustomGetCachePathMethod;
|
|
10
|
-
readonly prefetchAllGifs: import("effector").Effect<GifsGroups, void, Error>;
|
|
11
|
-
readonly prefetchGifs: import("effector").Effect<string[], void, Error>;
|
|
12
|
-
readonly $gifs: import("effector").StoreWritable<GifsStructure | null>;
|
|
13
|
-
constructor({ customGetCachePathMethod }: GifCelebrationsCacheProps);
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=GifCelebrations.cache.d.ts.map
|
package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GifCelebrations.cache.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/model/GifCelebrations.cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAI1F,KAAK,yBAAyB,GAAG;IAC/B,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;IAE7D,SAAgB,eAAe,qDAQ7B;IAEF,SAAgB,YAAY,mDAI1B;IAEF,SAAgB,KAAK,yDAGa;gBAEtB,EAAE,wBAAwB,EAAE,EAAE,yBAAyB;CAGpE"}
|
|
@@ -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, }: GifCelebrationsModelProps);
|
|
21
|
-
private setupEventHandlers;
|
|
22
|
-
private readonly handleGifSelection;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=GifCelebrations.model.d.ts.map
|
package/dist/typescript/commonjs/features/gifCelebrations/model/GifCelebrations.model.d.ts.map
DELETED
|
@@ -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,GACzB,EAAE,yBAAyB;IAU5B,OAAO,CAAC,kBAAkB;IAyD1B,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,37 +0,0 @@
|
|
|
1
|
-
import { Store } from 'effector';
|
|
2
|
-
export type CustomGetCachePathMethod = (uri: string) => Promise<string | null>;
|
|
3
|
-
export type GroupNumber = number;
|
|
4
|
-
export type GifCelebrationApiRequests = {
|
|
5
|
-
getGifs: () => Promise<GifResponse>;
|
|
6
|
-
};
|
|
7
|
-
export type GifCelebrationsModelProps = {
|
|
8
|
-
api: GifCelebrationApiRequests;
|
|
9
|
-
totalProblems: Store<number>;
|
|
10
|
-
resolvedProblems: Store<number>;
|
|
11
|
-
customGetCachePathMethod?: CustomGetCachePathMethod;
|
|
12
|
-
};
|
|
13
|
-
export type GifsGroup = string[];
|
|
14
|
-
export type GifsGroups = Record<`group${GroupNumber}`, GifsGroup>;
|
|
15
|
-
export type GifObject = {
|
|
16
|
-
url: string;
|
|
17
|
-
isShown: boolean;
|
|
18
|
-
group: `group${GroupNumber}`;
|
|
19
|
-
};
|
|
20
|
-
export type GifsStructure = Record<`group${GroupNumber}`, GifObject[]>;
|
|
21
|
-
/**
|
|
22
|
-
* Usually, the response contains 3 groups of gifs:
|
|
23
|
-
* - group1: early celebrations
|
|
24
|
-
* - group2: mid celebrations
|
|
25
|
-
* - group3: party
|
|
26
|
-
*/
|
|
27
|
-
export type GifResponse = {
|
|
28
|
-
data: GifsGroups;
|
|
29
|
-
ok: boolean;
|
|
30
|
-
};
|
|
31
|
-
export type GifsPayload = {
|
|
32
|
-
group: number;
|
|
33
|
-
};
|
|
34
|
-
export type ProblemsPercentageTable = Record<number, number>;
|
|
35
|
-
export type ProgressValue = 0 | 1 | 2;
|
|
36
|
-
export type TextComponentType = (text: string) => React.ReactNode;
|
|
37
|
-
//# 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,EAAE,MAAM,UAAU,CAAA;AAEhC,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;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,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"}
|
|
@@ -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
|
package/dist/typescript/module/features/gifCelebrations/components/ContentContainer.d.ts.map
DELETED
|
@@ -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,sBAoD7E,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<any>;
|
|
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;AAG5B;;;;;;;;;;;;;;;;;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,iBAYrF,CAAA;AAED,eAAO,MAAM,kBAAkB,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,WACrC,CAAA"}
|
|
@@ -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,16 +0,0 @@
|
|
|
1
|
-
import { GifsGroups, GifsStructure, CustomGetCachePathMethod } from '../types/model.types';
|
|
2
|
-
type GifCelebrationsCacheProps = {
|
|
3
|
-
customGetCachePathMethod?: CustomGetCachePathMethod;
|
|
4
|
-
};
|
|
5
|
-
export declare class GifCelebrationsCache {
|
|
6
|
-
readonly initialSet: import("effector").EventCallable<GifsGroups>;
|
|
7
|
-
readonly set: import("effector").EventCallable<GifsStructure>;
|
|
8
|
-
readonly reset: import("effector").EventCallable<void>;
|
|
9
|
-
readonly getCachePathMethod?: CustomGetCachePathMethod;
|
|
10
|
-
readonly prefetchAllGifs: import("effector").Effect<GifsGroups, void, Error>;
|
|
11
|
-
readonly prefetchGifs: import("effector").Effect<string[], void, Error>;
|
|
12
|
-
readonly $gifs: import("effector").StoreWritable<GifsStructure | null>;
|
|
13
|
-
constructor({ customGetCachePathMethod }: GifCelebrationsCacheProps);
|
|
14
|
-
}
|
|
15
|
-
export {};
|
|
16
|
-
//# sourceMappingURL=GifCelebrations.cache.d.ts.map
|
package/dist/typescript/module/features/gifCelebrations/model/GifCelebrations.cache.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GifCelebrations.cache.d.ts","sourceRoot":"","sources":["../../../../../../src/features/gifCelebrations/model/GifCelebrations.cache.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAA;AAI1F,KAAK,yBAAyB,GAAG;IAC/B,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;IAE7D,SAAgB,eAAe,qDAQ7B;IAEF,SAAgB,YAAY,mDAI1B;IAEF,SAAgB,KAAK,yDAGa;gBAEtB,EAAE,wBAAwB,EAAE,EAAE,yBAAyB;CAGpE"}
|