@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,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ContentContainer = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
-
var _constants = require("../constants.js");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
const ContentContainer = ({
|
|
17
|
-
children,
|
|
18
|
-
progress
|
|
19
|
-
}) => {
|
|
20
|
-
const {
|
|
21
|
-
width
|
|
22
|
-
} = (0, _reactNative.useWindowDimensions)();
|
|
23
|
-
const RIGHT_POSITION = width / 2 + _constants.CONTENT_CONTAINER.CONTAINER_WIDTH / 2 + _constants.CONTENT_CONTAINER.ROTATION_PADDING;
|
|
24
|
-
const LEFT_POSITION = -RIGHT_POSITION - _constants.CONTENT_CONTAINER.ROTATION_PADDING;
|
|
25
|
-
const animatedStyles = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
26
|
-
transform: [{
|
|
27
|
-
translateX: (0, _reactNativeReanimated.interpolate)(progress.value, [0, 1, 2], [LEFT_POSITION, 0, RIGHT_POSITION])
|
|
28
|
-
}, {
|
|
29
|
-
rotate: `${(0, _reactNativeReanimated.interpolate)(progress.value, [0, 1, 2], [-_constants.CONTENT_CONTAINER.ANGLE, 0, _constants.CONTENT_CONTAINER.ANGLE])}deg`
|
|
30
|
-
}]
|
|
31
|
-
}), [progress, RIGHT_POSITION, LEFT_POSITION]);
|
|
32
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
33
|
-
style: [styles.container, animatedStyles],
|
|
34
|
-
children: children
|
|
35
|
-
});
|
|
36
|
-
};
|
|
37
|
-
exports.ContentContainer = ContentContainer;
|
|
38
|
-
const styles = _reactNative.StyleSheet.create({
|
|
39
|
-
container: {
|
|
40
|
-
width: _constants.CONTENT_CONTAINER.CONTAINER_WIDTH,
|
|
41
|
-
alignItems: 'center',
|
|
42
|
-
gap: _reactNativeUi.SPACING[800],
|
|
43
|
-
position: 'absolute'
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=ContentContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeUi","_reactNativeReanimated","_interopRequireWildcard","_constants","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ContentContainer","children","progress","width","useWindowDimensions","RIGHT_POSITION","CONTENT_CONTAINER","CONTAINER_WIDTH","ROTATION_PADDING","LEFT_POSITION","animatedStyles","useAnimatedStyle","transform","translateX","interpolate","value","rotate","ANGLE","jsx","View","style","styles","container","exports","StyleSheet","create","alignItems","gap","SPACING","position"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/ContentContainer.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AAAgD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,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 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Gif = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _constants = require("../constants.js");
|
|
11
|
-
var _index = require("../../../shared/translation/index.js");
|
|
12
|
-
var _helpers = require("../helpers.js");
|
|
13
|
-
var _gifFallback = _interopRequireDefault(require("../assets/gifFallback.gif"));
|
|
14
|
-
var _constants2 = require("../../../shared/constants.js");
|
|
15
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
18
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
-
const Gif = ({
|
|
20
|
-
gifObject,
|
|
21
|
-
getCachePathMethod,
|
|
22
|
-
TextComponent
|
|
23
|
-
}) => {
|
|
24
|
-
const [size, setSize] = (0, _react.useState)(null);
|
|
25
|
-
const [pathOrUri, setPathOrUri] = (0, _react.useState)('');
|
|
26
|
-
const t = (0, _index.useText)();
|
|
27
|
-
const gifGroupNumber = Number(gifObject.group.replace('group', ''));
|
|
28
|
-
const gifLabel = (0, _helpers.getGifLabel)(gifGroupNumber);
|
|
29
|
-
(0, _react.useLayoutEffect)(() => {
|
|
30
|
-
const loadImageSize = async () => {
|
|
31
|
-
let localPath;
|
|
32
|
-
try {
|
|
33
|
-
// Get image path based on platform (React Native or Web)
|
|
34
|
-
localPath = await (0, _helpers.getImagePath)(gifObject.url, getCachePathMethod);
|
|
35
|
-
} catch (error) {
|
|
36
|
-
// Use fallback if image not found in cache
|
|
37
|
-
localPath = _constants2.IS_WEB ? _gifFallback.default : _reactNative.Image.resolveAssetSource(_gifFallback.default).uri;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// Get and set image dimensions
|
|
41
|
-
_reactNative.Image.getSize(localPath, (width, height) => {
|
|
42
|
-
setSize({
|
|
43
|
-
width: (0, _helpers.constrainDimension)(width, _constants.MIN_GIF_SIZE, _constants.MAX_GIF_SIZE.WIDTH),
|
|
44
|
-
height: (0, _helpers.constrainDimension)(height, _constants.MIN_GIF_SIZE, _constants.MAX_GIF_SIZE.HEIGHT)
|
|
45
|
-
});
|
|
46
|
-
setPathOrUri(localPath);
|
|
47
|
-
});
|
|
48
|
-
};
|
|
49
|
-
loadImageSize();
|
|
50
|
-
}, [gifObject.url]);
|
|
51
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
52
|
-
style: styles.backgroundContainer,
|
|
53
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
54
|
-
style: styles.container,
|
|
55
|
-
children: [size && pathOrUri && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
56
|
-
alt: "Funny celebration animated image",
|
|
57
|
-
source: {
|
|
58
|
-
uri: pathOrUri
|
|
59
|
-
},
|
|
60
|
-
width: size.width,
|
|
61
|
-
height: size.height,
|
|
62
|
-
style: [styles.image, {
|
|
63
|
-
width: size.width,
|
|
64
|
-
height: size.height
|
|
65
|
-
}] //this sizes duplication is needed for compatibility with web and rn
|
|
66
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
67
|
-
style: styles.textContainer,
|
|
68
|
-
children: TextComponent(t(gifLabel))
|
|
69
|
-
})]
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
exports.Gif = Gif;
|
|
74
|
-
const styles = _reactNative.StyleSheet.create({
|
|
75
|
-
backgroundContainer: {
|
|
76
|
-
backgroundColor: 'rgba(255, 255, 255, 0.6)',
|
|
77
|
-
borderRadius: 23,
|
|
78
|
-
padding: _reactNativeUi.SPACING[200]
|
|
79
|
-
},
|
|
80
|
-
container: {
|
|
81
|
-
padding: _reactNativeUi.SPACING[1600],
|
|
82
|
-
borderRadius: _reactNativeUi.BORDER_RADIUS[400],
|
|
83
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1
|
|
84
|
-
},
|
|
85
|
-
image: {
|
|
86
|
-
borderRadius: _reactNativeUi.BORDER_RADIUS[100]
|
|
87
|
-
},
|
|
88
|
-
textContainer: {
|
|
89
|
-
position: 'absolute',
|
|
90
|
-
bottom: 74,
|
|
91
|
-
alignSelf: 'center'
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
//# sourceMappingURL=Gif.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativeUi","_constants","_index","_helpers","_gifFallback","_interopRequireDefault","_constants2","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Gif","gifObject","getCachePathMethod","TextComponent","size","setSize","useState","pathOrUri","setPathOrUri","useText","gifGroupNumber","Number","group","replace","gifLabel","getGifLabel","useLayoutEffect","loadImageSize","localPath","getImagePath","url","error","IS_WEB","gifFallback","Image","resolveAssetSource","uri","getSize","width","height","constrainDimension","MIN_GIF_SIZE","MAX_GIF_SIZE","WIDTH","HEIGHT","jsx","View","style","styles","backgroundContainer","children","jsxs","container","alt","source","image","textContainer","exports","StyleSheet","create","backgroundColor","borderRadius","padding","SPACING","BORDER_RADIUS","COLORS","NEUTRAL_1","position","bottom","alignSelf"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/components/Gif.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAEA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAC,sBAAA,CAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AAAkD,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAQ,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAA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A,EAACnE,YAAA,CAAAoE,IAAI;QAACC,KAAK,EAAEC,MAAM,CAACQ,aAAc;QAAAN,QAAA,EAAErC,aAAa,CAACjB,CAAC,CAAC4B,QAAQ,CAAC;MAAC,CAAO,CAAC;IAAA,CAClE;EAAC,CACH,CAAC;AAEX,CAAC;AAAAiC,OAAA,CAAA/C,GAAA,GAAAA,GAAA;AAED,MAAMsC,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,mBAAmB,EAAE;IACnBW,eAAe,EAAE,0BAA0B;IAC3CC,YAAY,EAAE,EAAE;IAChBC,OAAO,EAAEC,sBAAO,CAAC,GAAG;EACtB,CAAC;EACDX,SAAS,EAAE;IACTU,OAAO,EAAEC,sBAAO,CAAC,IAAI,CAAC;IACtBF,YAAY,EAAEG,4BAAa,CAAC,GAAG,CAAC;IAChCJ,eAAe,EAAEK,qBAAM,CAACC;EAC1B,CAAC;EACDX,KAAK,EAAE;IACLM,YAAY,EAAEG,4BAAa,CAAC,GAAG;EACjC,CAAC;EACDR,aAAa,EAAE;IACbW,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,EAAE;IACVC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.Progress = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
-
var _confetti = _interopRequireDefault(require("../assets/confetti.webp"));
|
|
12
|
-
var _helpers = require("../helpers.js");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
17
|
-
const Progress = ({
|
|
18
|
-
progress,
|
|
19
|
-
completedPercent
|
|
20
|
-
}) => {
|
|
21
|
-
const progressLineWidth = (0, _helpers.getProgressLineWidth)(completedPercent);
|
|
22
|
-
const animatedStyles = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
23
|
-
width: `${(0, _reactNativeReanimated.interpolate)(progress.value, [0, 1, 2], [0, progressLineWidth, progressLineWidth])}%`
|
|
24
|
-
}), [progress, progressLineWidth]);
|
|
25
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
26
|
-
style: styles.backgroundContainer,
|
|
27
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
28
|
-
style: styles.container,
|
|
29
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
30
|
-
style: styles.progressContainer,
|
|
31
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
32
|
-
style: [styles.progress, animatedStyles],
|
|
33
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
34
|
-
variant: _reactNativeUi.HeadingVariants.H1,
|
|
35
|
-
style: styles.percent,
|
|
36
|
-
children: `${completedPercent}%`
|
|
37
|
-
})
|
|
38
|
-
})
|
|
39
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
40
|
-
source: _reactNativeUi.IS_WEB ? {
|
|
41
|
-
uri: _confetti.default
|
|
42
|
-
} : require('../assets/confetti.webp'),
|
|
43
|
-
style: styles.confetti
|
|
44
|
-
})]
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
exports.Progress = Progress;
|
|
49
|
-
const styles = _reactNative.StyleSheet.create({
|
|
50
|
-
backgroundContainer: {
|
|
51
|
-
backgroundColor: 'rgba(255, 255, 255, 0.6)',
|
|
52
|
-
borderRadius: 23,
|
|
53
|
-
padding: _reactNativeUi.SPACING[200],
|
|
54
|
-
width: '100%'
|
|
55
|
-
},
|
|
56
|
-
container: {
|
|
57
|
-
width: '100%',
|
|
58
|
-
height: 116,
|
|
59
|
-
flexDirection: 'row',
|
|
60
|
-
alignItems: 'center',
|
|
61
|
-
borderRadius: _reactNativeUi.BORDER_RADIUS[400],
|
|
62
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
63
|
-
paddingLeft: _reactNativeUi.SPACING[400],
|
|
64
|
-
paddingRight: _reactNativeUi.SPACING[200],
|
|
65
|
-
gap: _reactNativeUi.SPACING[100]
|
|
66
|
-
},
|
|
67
|
-
progressContainer: {
|
|
68
|
-
height: 50,
|
|
69
|
-
flexGrow: 1,
|
|
70
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_5,
|
|
71
|
-
borderRadius: 90,
|
|
72
|
-
overflow: 'hidden'
|
|
73
|
-
},
|
|
74
|
-
progress: {
|
|
75
|
-
position: 'absolute',
|
|
76
|
-
height: '100%',
|
|
77
|
-
backgroundColor: _reactNativeUi.COLORS.PRIMARY_BLUE,
|
|
78
|
-
borderRadius: _reactNativeUi.BORDER_RADIUS[200],
|
|
79
|
-
justifyContent: 'center',
|
|
80
|
-
alignItems: 'flex-end',
|
|
81
|
-
paddingRight: 10.6,
|
|
82
|
-
overflow: 'hidden'
|
|
83
|
-
},
|
|
84
|
-
confetti: {
|
|
85
|
-
width: 75,
|
|
86
|
-
height: 70,
|
|
87
|
-
marginHorizontal: _reactNativeUi.SPACING[200]
|
|
88
|
-
},
|
|
89
|
-
percent: {
|
|
90
|
-
position: 'absolute',
|
|
91
|
-
paddingRight: 10,
|
|
92
|
-
color: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
93
|
-
fontWeight: '700'
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
//# sourceMappingURL=Progress.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeUi","_reactNativeReanimated","_interopRequireWildcard","_confetti","_helpers","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","Progress","progress","completedPercent","progressLineWidth","getProgressLineWidth","animatedStyles","useAnimatedStyle","width","interpolate","value","jsx","View","style","styles","backgroundContainer","children","jsxs","container","progressContainer","Typography","variant","HeadingVariants","H1","percent","Image","source","IS_WEB","uri","confettiImage","confetti","exports","StyleSheet","create","backgroundColor","borderRadius","padding","SPACING","height","flexDirection","alignItems","BORDER_RADIUS","COLORS","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,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAQA,IAAAI,sBAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,SAAA,GAAA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AE;EACZ,CAAC;EACDnB,QAAQ,EAAE;IACRtB,KAAK,EAAE,EAAE;IACT8B,MAAM,EAAE,EAAE;IACVe,gBAAgB,EAAEhB,sBAAO,CAAC,GAAG;EAC/B,CAAC;EACDb,OAAO,EAAE;IACP0B,QAAQ,EAAE,UAAU;IACpBL,YAAY,EAAE,EAAE;IAChBS,KAAK,EAAEZ,qBAAM,CAACC,SAAS;IACvBY,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.MIN_WIDTH_FOR_TWO_DIGITS = exports.MIN_WIDTH_FOR_ONE_DIGIT = exports.MIN_PROBLEMS_TO_SHOW_GIF = exports.MIN_GIF_SIZE = exports.MAX_GIF_SIZE = exports.GROUPS_PERCENTAGES = exports.CONTENT_CONTAINER = exports.BACKDROP_COLOR = exports.ANIMATION_DURATION = void 0;
|
|
7
|
-
const BACKDROP_COLOR = exports.BACKDROP_COLOR = {
|
|
8
|
-
INITIAL: 'rgba(51, 51, 51, 0)',
|
|
9
|
-
FINAL: 'rgba(51, 51, 51, 0.66)'
|
|
10
|
-
};
|
|
11
|
-
const CONTENT_CONTAINER = exports.CONTENT_CONTAINER = {
|
|
12
|
-
ANGLE: 5,
|
|
13
|
-
CONTAINER_WIDTH: 769,
|
|
14
|
-
ROTATION_PADDING: 44 // to be sure that the content is not cut off on the edges because of rotate transform
|
|
15
|
-
};
|
|
16
|
-
const ANIMATION_DURATION = exports.ANIMATION_DURATION = 1750;
|
|
17
|
-
const MIN_PROBLEMS_TO_SHOW_GIF = exports.MIN_PROBLEMS_TO_SHOW_GIF = 7;
|
|
18
|
-
const MAX_GIF_SIZE = exports.MAX_GIF_SIZE = {
|
|
19
|
-
WIDTH: 480,
|
|
20
|
-
HEIGHT: 300
|
|
21
|
-
};
|
|
22
|
-
const MIN_GIF_SIZE = exports.MIN_GIF_SIZE = 300;
|
|
23
|
-
const GROUPS_PERCENTAGES = exports.GROUPS_PERCENTAGES = {
|
|
24
|
-
group1: [15, 20, 25, 30],
|
|
25
|
-
// Early celebrations
|
|
26
|
-
group2: [33, 40, 45, 50],
|
|
27
|
-
// Mid celebrations
|
|
28
|
-
group3: [60, 66, 75, 80] // Party
|
|
29
|
-
};
|
|
30
|
-
const MIN_WIDTH_FOR_ONE_DIGIT = exports.MIN_WIDTH_FOR_ONE_DIGIT = 12;
|
|
31
|
-
const MIN_WIDTH_FOR_TWO_DIGITS = exports.MIN_WIDTH_FOR_TWO_DIGITS = 15;
|
|
32
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["BACKDROP_COLOR","exports","INITIAL","FINAL","CONTENT_CONTAINER","ANGLE","CONTAINER_WIDTH","ROTATION_PADDING","ANIMATION_DURATION","MIN_PROBLEMS_TO_SHOW_GIF","MAX_GIF_SIZE","WIDTH","HEIGHT","MIN_GIF_SIZE","GROUPS_PERCENTAGES","group1","group2","group3","MIN_WIDTH_FOR_ONE_DIGIT","MIN_WIDTH_FOR_TWO_DIGITS"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/constants.ts"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAC5BE,OAAO,EAAE,qBAAqB;EAC9BC,KAAK,EAAE;AACT,CAAC;AAEM,MAAMC,iBAAiB,GAAAH,OAAA,CAAAG,iBAAA,GAAG;EAC/BC,KAAK,EAAE,CAAC;EACRC,eAAe,EAAE,GAAG;EACpBC,gBAAgB,EAAE,EAAE,CAAE;AACxB,CAAC;AAEM,MAAMC,kBAAkB,GAAAP,OAAA,CAAAO,kBAAA,GAAG,IAAI;AAC/B,MAAMC,wBAAwB,GAAAR,OAAA,CAAAQ,wBAAA,GAAG,CAAC;AAElC,MAAMC,YAAY,GAAAT,OAAA,CAAAS,YAAA,GAAG;EAC1BC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE;AACV,CAAC;AACM,MAAMC,YAAY,GAAAZ,OAAA,CAAAY,YAAA,GAAG,GAAG;AAExB,MAAMC,kBAAkB,GAAAb,OAAA,CAAAa,kBAAA,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;AAEM,MAAMC,uBAAuB,GAAAjB,OAAA,CAAAiB,uBAAA,GAAG,EAAE;AAClC,MAAMC,wBAAwB,GAAAlB,OAAA,CAAAkB,wBAAA,GAAG,EAAE","ignoreList":[]}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getProgressLineWidth = exports.getImagePath = exports.getGifLabel = exports.generateGifsStructure = exports.findGroupForPercentage = exports.constrainDimension = exports.calculatePercentageTable = void 0;
|
|
7
|
-
var _constants = require("./constants.js");
|
|
8
|
-
/**
|
|
9
|
-
* Number of problems When we show gif
|
|
10
|
-
* <6 Never
|
|
11
|
-
* 7-12 50% completion
|
|
12
|
-
* 13-18 33%, 66% completion
|
|
13
|
-
* 19-24 25%, 50%, 75 completion
|
|
14
|
-
* 25-30 20%, 40%, 60%, 80% completion
|
|
15
|
-
* .>30 15%, 30%, 45%, 60%, 75% completion
|
|
16
|
-
*
|
|
17
|
-
* We are also going to have different buckets with different gifs. The logic is as follows:
|
|
18
|
-
* Group 1: 15%, 20%, 25%, 30% - Early celebrations
|
|
19
|
-
* Group 2: 33%, 40%, 45%, 50% - Mid celebrations
|
|
20
|
-
* Group 3: 60%, 66%, 75%, 80% - Party
|
|
21
|
-
* or
|
|
22
|
-
* Group 1: <=30% - Early celebrations
|
|
23
|
-
* Group 2: >30% <60% - Mid celebrations
|
|
24
|
-
* Group 3: >=60% - Party
|
|
25
|
-
*/
|
|
26
|
-
const calculatePercentageTable = totalProblems => {
|
|
27
|
-
if (totalProblems <= 12) return {
|
|
28
|
-
50: Math.ceil(totalProblems * 0.5)
|
|
29
|
-
};
|
|
30
|
-
if (totalProblems <= 18) {
|
|
31
|
-
return {
|
|
32
|
-
33: Math.ceil(totalProblems * 0.33),
|
|
33
|
-
66: Math.ceil(totalProblems * 0.66)
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
if (totalProblems <= 24) {
|
|
37
|
-
return {
|
|
38
|
-
25: Math.ceil(totalProblems * 0.25),
|
|
39
|
-
50: Math.ceil(totalProblems * 0.5),
|
|
40
|
-
75: Math.ceil(totalProblems * 0.75)
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
if (totalProblems <= 30) {
|
|
44
|
-
return {
|
|
45
|
-
20: Math.ceil(totalProblems * 0.2),
|
|
46
|
-
40: Math.ceil(totalProblems * 0.4),
|
|
47
|
-
60: Math.ceil(totalProblems * 0.6),
|
|
48
|
-
80: Math.ceil(totalProblems * 0.8)
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
15: Math.ceil(totalProblems * 0.15),
|
|
53
|
-
30: Math.ceil(totalProblems * 0.3),
|
|
54
|
-
45: Math.ceil(totalProblems * 0.45),
|
|
55
|
-
60: Math.ceil(totalProblems * 0.6),
|
|
56
|
-
75: Math.ceil(totalProblems * 0.75)
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
exports.calculatePercentageTable = calculatePercentageTable;
|
|
60
|
-
const generateGifsStructure = gifs => Object.fromEntries(Object.entries(gifs).map(([key, value]) => [key, value.map(url => ({
|
|
61
|
-
url,
|
|
62
|
-
isShown: false,
|
|
63
|
-
group: key
|
|
64
|
-
}))]));
|
|
65
|
-
exports.generateGifsStructure = generateGifsStructure;
|
|
66
|
-
const getGifLabel = relatedGroup => {
|
|
67
|
-
if (relatedGroup === 2) {
|
|
68
|
-
return 'gifCelebrations.onTheWay';
|
|
69
|
-
}
|
|
70
|
-
if (relatedGroup === 3) {
|
|
71
|
-
return 'gifCelebrations.almostThere';
|
|
72
|
-
}
|
|
73
|
-
return 'gifCelebrations.greatStart';
|
|
74
|
-
};
|
|
75
|
-
exports.getGifLabel = getGifLabel;
|
|
76
|
-
const getProgressLineWidth = completedPercent => {
|
|
77
|
-
if (completedPercent <= 9) {
|
|
78
|
-
return _constants.MIN_WIDTH_FOR_ONE_DIGIT;
|
|
79
|
-
}
|
|
80
|
-
if (completedPercent <= 15) {
|
|
81
|
-
return _constants.MIN_WIDTH_FOR_TWO_DIGITS;
|
|
82
|
-
}
|
|
83
|
-
return completedPercent;
|
|
84
|
-
};
|
|
85
|
-
exports.getProgressLineWidth = getProgressLineWidth;
|
|
86
|
-
const findGroupForPercentage = percentage => {
|
|
87
|
-
if (percentage <= 30) {
|
|
88
|
-
return 'group1';
|
|
89
|
-
}
|
|
90
|
-
if (percentage < 60) {
|
|
91
|
-
return 'group2';
|
|
92
|
-
}
|
|
93
|
-
return 'group3';
|
|
94
|
-
};
|
|
95
|
-
exports.findGroupForPercentage = findGroupForPercentage;
|
|
96
|
-
const getImagePath = async (url, cacheMethod) => {
|
|
97
|
-
if (cacheMethod) {
|
|
98
|
-
const path = await cacheMethod(url);
|
|
99
|
-
if (path) return path;
|
|
100
|
-
} else {
|
|
101
|
-
// @ts-ignore - Image.queryCache works only in web
|
|
102
|
-
const cachedImage = await Image.queryCache([url]);
|
|
103
|
-
const path = cachedImage[url];
|
|
104
|
-
if (path) return path;
|
|
105
|
-
}
|
|
106
|
-
throw new Error('Image not found in cache');
|
|
107
|
-
};
|
|
108
|
-
exports.getImagePath = getImagePath;
|
|
109
|
-
const constrainDimension = (value, min, max) => Math.max(min, Math.min(max, value));
|
|
110
|
-
exports.constrainDimension = constrainDimension;
|
|
111
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","calculatePercentageTable","totalProblems","Math","ceil","exports","generateGifsStructure","gifs","Object","fromEntries","entries","map","key","value","url","isShown","group","getGifLabel","relatedGroup","getProgressLineWidth","completedPercent","MIN_WIDTH_FOR_ONE_DIGIT","MIN_WIDTH_FOR_TWO_DIGITS","findGroupForPercentage","percentage","getImagePath","cacheMethod","path","cachedImage","Image","queryCache","Error","constrainDimension","min","max"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/helpers.ts"],"mappings":";;;;;;AAQA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,wBAAwB,GAAIC,aAAqB,IAA8B;EAC1F,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;MACL,EAAE,EAAEC,IAAI,CAACC,IAAI,CAACF,aAAa,GAAG,IAAI,CAAC;MACnC,EAAE,EAAEC,IAAI,CAACC,IAAI,CAACF,aAAa,GAAG,GAAG,CAAC;MAClC,EAAE,EAAEC,IAAI,CAACC,IAAI,CAACF,aAAa,GAAG,IAAI;IACpC,CAAC;EACH;EAEA,IAAIA,aAAa,IAAI,EA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AAAAR,OAAA,CAAA2B,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "GifCelebrations", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _GifCelebrations.GifCelebrations;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "GifCelebrationsModel", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _GifCelebrationsModel.GifCelebrationsModel;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _GifCelebrations = require("./GifCelebrations.js");
|
|
19
|
-
var _GifCelebrationsModel = require("./model/GifCelebrations.model.js");
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_GifCelebrations","require","_GifCelebrationsModel"],"sourceRoot":"../../../../src","sources":["features/gifCelebrations/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,gBAAA,GAAAC,OAAA;AACA,IAAAC,qBAAA,GAAAD,OAAA","ignoreList":[]}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.GifCelebrationsCache = void 0;
|
|
7
|
-
var _effector = require("effector");
|
|
8
|
-
var _helpers = require("../helpers.js");
|
|
9
|
-
var _reactNative = require("react-native");
|
|
10
|
-
class GifCelebrationsCache {
|
|
11
|
-
initialSet = (0, _effector.createEvent)();
|
|
12
|
-
set = (0, _effector.createEvent)();
|
|
13
|
-
reset = (0, _effector.createEvent)();
|
|
14
|
-
prefetchAllGifs = (0, _effector.createEffect)(data => {
|
|
15
|
-
Object.values(data).forEach(group => {
|
|
16
|
-
group.forEach(gifUrl => {
|
|
17
|
-
_reactNative.Image.prefetch(gifUrl);
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
this.initialSet(data);
|
|
21
|
-
});
|
|
22
|
-
prefetchGifs = (0, _effector.createEffect)(gifs => {
|
|
23
|
-
gifs.forEach(gifUrl => {
|
|
24
|
-
_reactNative.Image.prefetch(gifUrl);
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
$gifs = (0, _effector.createStore)(null).reset(this.reset).on(this.initialSet, (_, gifs) => (0, _helpers.generateGifsStructure)(gifs)).on(this.set, (_, gifs) => gifs);
|
|
28
|
-
constructor({
|
|
29
|
-
customGetCachePathMethod
|
|
30
|
-
}) {
|
|
31
|
-
this.getCachePathMethod = customGetCachePathMethod;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
exports.GifCelebrationsCache = GifCelebrationsCache;
|
|
35
|
-
//# sourceMappingURL=GifCelebrations.cache.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","_helpers","_reactNative","GifCelebrationsCache","initialSet","createEvent","set","reset","prefetchAllGifs","createEffect","data","Object","values","forEach","group","gifUrl","Image","prefetch","prefetchGifs","gifs","$gifs","createStore","on","_","generateGifsStructure","constructor","customGetCachePathMethod","getCachePathMethod","exports"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/model/GifCelebrations.cache.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAMO,MAAMG,oBAAoB,CAAC;EAChBC,UAAU,GAAG,IAAAC,qBAAW,EAAa,CAAC;EACtCC,GAAG,GAAG,IAAAD,qBAAW,EAAgB,CAAC;EAClCE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAIrBG,eAAe,GAAG,IAAAC,sBAAY,EAAoBC,IAAI,IAAK;IACzEC,MAAM,CAACC,MAAM,CAACF,IAAI,CAAC,CAACG,OAAO,CAAEC,KAAK,IAAK;MACrCA,KAAK,CAACD,OAAO,CAAEE,MAAM,IAAK;QACxBC,kBAAK,CAACC,QAAQ,CAACF,MAAM,CAAC;MACxB,CAAC,CAAC;IACJ,CAAC,CAAC;IAEF,IAAI,CAACX,UAAU,CAACM,IAAI,CAAC;EACvB,CAAC,CAAC;EAEcQ,YAAY,GAAG,IAAAT,sBAAY,EAAkBU,IAAI,IAAK;IACpEA,IAAI,CAACN,OAAO,CAAEE,MAAM,IAAK;MACvBC,kBAAK,CAACC,QAAQ,CAACF,MAAM,CAAC;IACxB,CAAC,CAAC;EACJ,CAAC,CAAC;EAEcK,KAAK,GAAG,IAAAC,qBAAW,EAAuB,IAAI,CAAC,CAC5Dd,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC,CACjBe,EAAE,CAAC,IAAI,CAAClB,UAAU,EAAE,CAACmB,CAAC,EAAEJ,IAAI,KAAK,IAAAK,8BAAqB,EAACL,IAAI,CAAC,CAAC,CAC7DG,EAAE,CAAC,IAAI,CAAChB,GAAG,EAAE,CAACiB,CAAC,EAAEJ,IAAI,KAAKA,IAAI,CAAC;EAElCM,WAAWA,CAAC;IAAEC;EAAoD,CAAC,EAAE;IACnE,IAAI,CAACC,kBAAkB,GAAGD,wBAAwB;EACpD;AACF;AAACE,OAAA,CAAAzB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.GifCelebrationsModel = void 0;
|
|
7
|
-
var _effector = require("effector");
|
|
8
|
-
var _GifCelebrationsApi = require("./GifCelebrationsApi.js");
|
|
9
|
-
var _GifCelebrationsCache = require("./GifCelebrations.cache.js");
|
|
10
|
-
var _helpers = require("../helpers.js");
|
|
11
|
-
var _constants = require("../constants.js");
|
|
12
|
-
class GifCelebrationsModel {
|
|
13
|
-
play = (0, _effector.createEvent)();
|
|
14
|
-
stop = (0, _effector.createEvent)();
|
|
15
|
-
resetGifTriggerable = (0, _effector.createEvent)();
|
|
16
|
-
setGifTriggerable = (0, _effector.createEvent)();
|
|
17
|
-
$isGifTriggerable = (0, _effector.createStore)(false).reset(this.resetGifTriggerable).reset(this.stop).on(this.setGifTriggerable, (_, isGifCelebrationMayBeTriggered) => isGifCelebrationMayBeTriggered);
|
|
18
|
-
resetPercentageTable = (0, _effector.createEvent)();
|
|
19
|
-
$problemsPercentageTable = (0, _effector.createStore)(null).reset(this.resetPercentageTable);
|
|
20
|
-
setActiveGif = (0, _effector.createEvent)();
|
|
21
|
-
$activeGif = (0, _effector.createStore)(null).reset(this.stop).reset(this.resetGifTriggerable).on(this.setActiveGif, (_, gif) => gif);
|
|
22
|
-
initialize = (0, _effector.createEvent)();
|
|
23
|
-
constructor({
|
|
24
|
-
api,
|
|
25
|
-
totalProblems,
|
|
26
|
-
resolvedProblems,
|
|
27
|
-
customGetCachePathMethod
|
|
28
|
-
}) {
|
|
29
|
-
this.api = new _GifCelebrationsApi.GifCelebrationsApi(api);
|
|
30
|
-
this.cache = new _GifCelebrationsCache.GifCelebrationsCache({
|
|
31
|
-
customGetCachePathMethod
|
|
32
|
-
});
|
|
33
|
-
this.$totalProblems = totalProblems;
|
|
34
|
-
this.$resolvedProblems = resolvedProblems;
|
|
35
|
-
this.setupEventHandlers();
|
|
36
|
-
}
|
|
37
|
-
setupEventHandlers() {
|
|
38
|
-
(0, _effector.sample)({
|
|
39
|
-
clock: this.initialize,
|
|
40
|
-
source: this.cache.$gifs,
|
|
41
|
-
filter: gifs => !gifs,
|
|
42
|
-
target: this.api.getGifsFx
|
|
43
|
-
});
|
|
44
|
-
(0, _effector.sample)({
|
|
45
|
-
source: this.api.getGifsFx.doneData,
|
|
46
|
-
filter: response => response.ok,
|
|
47
|
-
fn: response => response.data,
|
|
48
|
-
target: this.cache.prefetchAllGifs
|
|
49
|
-
});
|
|
50
|
-
(0, _effector.sample)({
|
|
51
|
-
clock: [this.initialize, this.$totalProblems.updates],
|
|
52
|
-
source: this.$totalProblems,
|
|
53
|
-
fn: totalProblems => {
|
|
54
|
-
if (totalProblems && totalProblems >= _constants.MIN_PROBLEMS_TO_SHOW_GIF) {
|
|
55
|
-
console.log('calculatePercentageTable(totalProblems): ', (0, _helpers.calculatePercentageTable)(totalProblems));
|
|
56
|
-
return (0, _helpers.calculatePercentageTable)(totalProblems);
|
|
57
|
-
}
|
|
58
|
-
return null;
|
|
59
|
-
},
|
|
60
|
-
target: this.$problemsPercentageTable
|
|
61
|
-
});
|
|
62
|
-
(0, _effector.sample)({
|
|
63
|
-
clock: this.play,
|
|
64
|
-
source: {
|
|
65
|
-
isGifCelebrationMayBeTriggered: this.$isGifTriggerable,
|
|
66
|
-
gifsGroups: this.cache.$gifs,
|
|
67
|
-
resolvedProblem: this.$resolvedProblems,
|
|
68
|
-
problemsPercentageTable: this.$problemsPercentageTable
|
|
69
|
-
},
|
|
70
|
-
filter: ({
|
|
71
|
-
isGifCelebrationMayBeTriggered,
|
|
72
|
-
gifsGroups,
|
|
73
|
-
resolvedProblem,
|
|
74
|
-
problemsPercentageTable
|
|
75
|
-
}) => !!(isGifCelebrationMayBeTriggered && gifsGroups && resolvedProblem !== undefined && problemsPercentageTable),
|
|
76
|
-
fn: sources => sources,
|
|
77
|
-
target: this.handleGifSelection
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
handleGifSelection = (0, _effector.createEffect)(({
|
|
81
|
-
gifsGroups,
|
|
82
|
-
resolvedProblem,
|
|
83
|
-
problemsPercentageTable
|
|
84
|
-
}) => {
|
|
85
|
-
const percentageMilestone = Object.keys(problemsPercentageTable).find(key => problemsPercentageTable[Number(key)] === resolvedProblem);
|
|
86
|
-
if (!percentageMilestone) return null;
|
|
87
|
-
const groupName = (0, _helpers.findGroupForPercentage)(Number(percentageMilestone));
|
|
88
|
-
const gifsForGroup = gifsGroups[groupName];
|
|
89
|
-
const unusedGifIndex = gifsForGroup.findIndex(gif => !gif.isShown);
|
|
90
|
-
if (unusedGifIndex === -1) {
|
|
91
|
-
const updatedGifsGroups = {
|
|
92
|
-
...gifsGroups
|
|
93
|
-
};
|
|
94
|
-
updatedGifsGroups[groupName] = gifsGroups[groupName].map(gif => ({
|
|
95
|
-
...gif,
|
|
96
|
-
isShown: false
|
|
97
|
-
}));
|
|
98
|
-
const gifObject = {
|
|
99
|
-
...updatedGifsGroups[groupName][0],
|
|
100
|
-
isShown: true
|
|
101
|
-
};
|
|
102
|
-
updatedGifsGroups[groupName][0].isShown = true;
|
|
103
|
-
this.setActiveGif(gifObject);
|
|
104
|
-
this.cache.set(updatedGifsGroups);
|
|
105
|
-
}
|
|
106
|
-
const selectedGif = gifsForGroup[unusedGifIndex];
|
|
107
|
-
const gifObject = {
|
|
108
|
-
...selectedGif,
|
|
109
|
-
isShown: true
|
|
110
|
-
};
|
|
111
|
-
const updatedGifsGroups = {
|
|
112
|
-
...gifsGroups
|
|
113
|
-
};
|
|
114
|
-
updatedGifsGroups[groupName][unusedGifIndex].isShown = true;
|
|
115
|
-
this.cache.set(updatedGifsGroups);
|
|
116
|
-
this.setActiveGif(gifObject);
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
exports.GifCelebrationsModel = GifCelebrationsModel;
|
|
120
|
-
//# sourceMappingURL=GifCelebrations.model.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","_GifCelebrationsApi","_GifCelebrationsCache","_helpers","_constants","GifCelebrationsModel","play","createEvent","stop","resetGifTriggerable","setGifTriggerable","$isGifTriggerable","createStore","reset","on","_","isGifCelebrationMayBeTriggered","resetPercentageTable","$problemsPercentageTable","setActiveGif","$activeGif","gif","initialize","constructor","api","totalProblems","resolvedProblems","customGetCachePathMethod","GifCelebrationsApi","cache","GifCelebrationsCache","$totalProblems","$resolvedProblems","setupEventHandlers","sample","clock","source","$gifs","filter","gifs","target","getGifsFx","doneData","response","ok","fn","data","prefetchAllGifs","updates","MIN_PROBLEMS_TO_SHOW_GIF","console","log","calculatePercentageTable","gifsGroups","resolvedProblem","problemsPercentageTable","undefined","sources","handleGifSelection","createEffect","percentageMilestone","Object","keys","find","key","Number","groupName","findGroupForPercentage","gifsForGroup","unusedGifIndex","findIndex","isShown","updatedGifsGroups","map","gifObject","set","selectedGif","exports"],"sourceRoot":"../../../../../src","sources":["features/gifCelebrations/model/GifCelebrations.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AAOA,IAAAE,qBAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAQO,MAAMK,oBAAoB,CAAC;EAOhBC,IAAI,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACpBC,IAAI,GAAG,IAAAD,qBAAW,EAAC,CAAC;EAEpBE,mBAAmB,GAAG,IAAAF,qBAAW,EAAC,CAAC;EACnCG,iBAAiB,GAAG,IAAAH,qBAAW,EAAU,CAAC;EAC1CI,iBAAiB,GAAG,IAAAC,qBAAW,EAAU,KAAK,CAAC,CAC5DC,KAAK,CAAC,IAAI,CAACJ,mBAAmB,CAAC,CAC/BI,KAAK,CAAC,IAAI,CAACL,IAAI,CAAC,CAChBM,EAAE,CACD,IAAI,CAACJ,iBAAiB,EACtB,CAACK,CAAC,EAAEC,8BAA8B,KAAKA,8BACzC,CAAC;EAEaC,oBAAoB,GAAG,IAAAV,qBAAW,EAAC,CAAC;EACpCW,wBAAwB,GAAG,IAAAN,qBAAW,EACpD,IACF,CAAC,CAACC,KAAK,CAAC,IAAI,CAACI,oBAAoB,CAAC;EAElBE,YAAY,GAAG,IAAAZ,qBAAW,EAAY,CAAC;EACvCa,UAAU,GAAG,IAAAR,qBAA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@@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.GifCelebrationsApi = void 0;
|
|
7
|
-
var _createControllerEffect = require("./../../../lib/effector/createControllerEffect.js");
|
|
8
|
-
class GifCelebrationsApi {
|
|
9
|
-
constructor(api) {
|
|
10
|
-
this.getGifsFx = (0, _createControllerEffect.createControllerEffect)(api.getGifs);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.GifCelebrationsApi = GifCelebrationsApi;
|
|
14
|
-
//# sourceMappingURL=GifCelebrationsApi.js.map
|