@magmamath/students-features 0.8.0-rc.3 → 0.8.0
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/ChatInput/ChatInput.js +1 -2
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +3 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/helpers.js +8 -2
- package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +2 -3
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/units.types.js +0 -10
- package/dist/commonjs/features/chatbot/types/units.types.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -8
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +1 -0
- package/dist/commonjs/shared/translation/localization/en.json +1 -0
- package/dist/commonjs/shared/translation/localization/gb.json +1 -0
- package/dist/commonjs/shared/translation/localization/sct.json +1 -0
- package/dist/commonjs/shared/translation/localization/sw.json +3 -2
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -2
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +3 -1
- package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/helpers.js +8 -2
- package/dist/module/features/chatbot/helpers.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +2 -3
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/types/units.types.js +0 -6
- package/dist/module/features/chatbot/types/units.types.js.map +1 -1
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +0 -8
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +1 -0
- package/dist/module/shared/translation/localization/en.json +1 -0
- package/dist/module/shared/translation/localization/gb.json +1 -0
- package/dist/module/shared/translation/localization/sct.json +1 -0
- package/dist/module/shared/translation/localization/sw.json +3 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +0 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +5 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +2 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +0 -2
- package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +5 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +2 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +1 -2
- package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +3 -1
- package/src/features/chatbot/components/Chatbot.tsx +0 -2
- package/src/features/chatbot/helpers.ts +11 -2
- package/src/features/chatbot/model/ChatBotModel.ts +2 -3
- package/src/features/chatbot/types/units.types.ts +0 -5
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +0 -4
- package/src/shared/translation/localization/ca.json +1 -0
- package/src/shared/translation/localization/en.json +1 -0
- package/src/shared/translation/localization/gb.json +1 -0
- package/src/shared/translation/localization/sct.json +1 -0
- package/src/shared/translation/localization/sw.json +3 -2
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js +0 -44
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js +0 -61
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/module/features/exampleSolution/components/LavaIcon.js +0 -36
- package/dist/module/features/exampleSolution/components/LavaIcon.js.map +0 -1
- package/dist/module/features/exampleSolution/components/MessageBlock.js +0 -53
- package/dist/module/features/exampleSolution/components/MessageBlock.js.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts.map +0 -1
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts +0 -10
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts.map +0 -1
- package/src/features/exampleSolution/components/LavaIcon.tsx +0 -35
- package/src/features/exampleSolution/components/MessageBlock.tsx +0 -67
|
@@ -3,8 +3,6 @@ import React from 'react'
|
|
|
3
3
|
import { COLORS, HeadingVariants, IS_WEB, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
4
|
import { useUnit } from 'effector-react'
|
|
5
5
|
import { $localization } from '../../../shared/translation'
|
|
6
|
-
import { MessageBlock } from './MessageBlock'
|
|
7
|
-
import { LavaIcon } from './LavaIcon'
|
|
8
6
|
import { ExampleSolutionModalParams } from '../types'
|
|
9
7
|
import { QuestionSection } from './QuestionSection'
|
|
10
8
|
import { SolutionSection } from './SolutionSection'
|
|
@@ -40,8 +38,6 @@ export const ExampleSolutionModalContent = ({
|
|
|
40
38
|
/>
|
|
41
39
|
<SolutionSection status={status} answer={result?.answer} />
|
|
42
40
|
</View>
|
|
43
|
-
<MessageBlock status={status} style={styles.messageBlock} />
|
|
44
|
-
<LavaIcon status={status} style={styles.lavaIconContainer} />
|
|
45
41
|
</View>
|
|
46
42
|
)
|
|
47
43
|
}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"chat": {
|
|
15
15
|
"anotherHint": "Give me another hint",
|
|
16
16
|
"giveHint": "I need a hint",
|
|
17
|
+
"giveHintOpenChat": "I need a hint",
|
|
17
18
|
"answerAgain": "Answer again to get another hint!",
|
|
18
19
|
"errorMessage": "Something went wrong! Try again",
|
|
19
20
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"chat": {
|
|
15
15
|
"anotherHint": "Give me another hint",
|
|
16
16
|
"giveHint": "I need a hint",
|
|
17
|
+
"giveHintOpenChat": "I need a hint",
|
|
17
18
|
"answerAgain": "Answer again to get another hint!",
|
|
18
19
|
"errorMessage": "Something went wrong! Try again",
|
|
19
20
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"chat": {
|
|
15
15
|
"anotherHint": "Give me another hint",
|
|
16
16
|
"giveHint": "I need a hint",
|
|
17
|
+
"giveHintOpenChat": "I need a hint",
|
|
17
18
|
"answerAgain": "Answer again to get another hint!",
|
|
18
19
|
"errorMessage": "Something went wrong! Try again",
|
|
19
20
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"chat": {
|
|
15
15
|
"anotherHint": "Give me another hint",
|
|
16
16
|
"giveHint": "I need a hint",
|
|
17
|
+
"giveHintOpenChat": "I need a hint",
|
|
17
18
|
"answerAgain": "Answer again to get another hint!",
|
|
18
19
|
"errorMessage": "Something went wrong! Try again",
|
|
19
20
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -12,8 +12,9 @@
|
|
|
12
12
|
"time.yearAgo": "år sedan",
|
|
13
13
|
"time.yearsAgo": "år sedan",
|
|
14
14
|
"chat": {
|
|
15
|
-
"anotherHint": "Ge mig en ledtråd",
|
|
16
|
-
"giveHint": "Ge ledtråd",
|
|
15
|
+
"anotherHint": "Ge mig en till ledtråd",
|
|
16
|
+
"giveHint": "Ge mig en ledtråd",
|
|
17
|
+
"giveHintOpenChat": "Ge ledtråd",
|
|
17
18
|
"answerAgain": "Svara igen för att få en till ledtråd!",
|
|
18
19
|
"errorMessage": "Något gick snett! Försök igen",
|
|
19
20
|
"howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.LavaIcon = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _ExcitedLavaIcon = require("../../../shared/icons/ExcitedLavaIcon.js");
|
|
9
|
-
var _index = require("../../../shared/icons/index.js");
|
|
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 LAVA_ICON_HEIGHT = 112;
|
|
17
|
-
const LavaIcon = ({
|
|
18
|
-
status,
|
|
19
|
-
style
|
|
20
|
-
}) => {
|
|
21
|
-
const opacityAnimation = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
22
|
-
return {
|
|
23
|
-
opacity: (0, _reactNativeReanimated.withTiming)(status === _constants.ExampleSolutionStatuses.LOADING ? 1 : 0, {
|
|
24
|
-
duration: 500
|
|
25
|
-
})
|
|
26
|
-
};
|
|
27
|
-
}, [status]);
|
|
28
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
29
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
30
|
-
style: [style, opacityAnimation],
|
|
31
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_index.LavaIconInGlasses, {
|
|
32
|
-
height: 112
|
|
33
|
-
})
|
|
34
|
-
}), status !== _constants.ExampleSolutionStatuses.LOADING && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
35
|
-
style: style,
|
|
36
|
-
entering: _reactNativeReanimated.FadeIn,
|
|
37
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExcitedLavaIcon.ExcitedLavaIcon, {
|
|
38
|
-
height: LAVA_ICON_HEIGHT
|
|
39
|
-
})
|
|
40
|
-
})]
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
exports.LavaIcon = LavaIcon;
|
|
44
|
-
//# sourceMappingURL=LavaIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_ExcitedLavaIcon","_index","_reactNativeReanimated","_interopRequireWildcard","_constants","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","LAVA_ICON_HEIGHT","LavaIcon","status","style","opacityAnimation","useAnimatedStyle","opacity","withTiming","ExampleSolutionStatuses","LOADING","duration","jsxs","Fragment","children","jsx","View","LavaIconInGlasses","height","entering","FadeIn","ExcitedLavaIcon","exports"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/LavaIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAC,uBAAA,CAAAJ,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
|
|
5
|
-
});
|
|
6
|
-
exports.MessageBlock = void 0;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _effectorReact = require("effector-react");
|
|
11
|
-
var _index = require("../../../shared/translation/index.js");
|
|
12
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
13
|
-
var _constants = require("../constants.js");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
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); }
|
|
16
|
-
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; }
|
|
17
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
18
|
-
const MessageBlock = ({
|
|
19
|
-
status,
|
|
20
|
-
style
|
|
21
|
-
}) => {
|
|
22
|
-
const localization = (0, _effectorReact.useUnit)(_index.$localization);
|
|
23
|
-
const opacityAnimation = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
24
|
-
return {
|
|
25
|
-
opacity: (0, _reactNativeReanimated.withDelay)(2000, (0, _reactNativeReanimated.withTiming)(status === _constants.ExampleSolutionStatuses.LOADING ? 1 : 0, {
|
|
26
|
-
duration: 350
|
|
27
|
-
}))
|
|
28
|
-
};
|
|
29
|
-
}, [status]);
|
|
30
|
-
if (status === _constants.ExampleSolutionStatuses.CACHE) return null;
|
|
31
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
32
|
-
layout: _reactNativeReanimated.LinearTransition.duration(250),
|
|
33
|
-
style: [styles.container, opacityAnimation, style],
|
|
34
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
35
|
-
variant: 'small',
|
|
36
|
-
numberOfLines: 1,
|
|
37
|
-
children: status === _constants.ExampleSolutionStatuses.LOADING ? localization.exampleSolution.letMeThink : localization.exampleSolution.aha
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
exports.MessageBlock = MessageBlock;
|
|
42
|
-
const styles = _reactNative.StyleSheet.create({
|
|
43
|
-
container: {
|
|
44
|
-
padding: _reactNativeUi.SPACING[200],
|
|
45
|
-
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
46
|
-
height: 44,
|
|
47
|
-
borderRadius: 12,
|
|
48
|
-
borderBottomRightRadius: 2,
|
|
49
|
-
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
50
|
-
borderColor: _reactNativeUi.COLORS.NEUTRAL_5,
|
|
51
|
-
shadowColor: _reactNativeUi.COLORS.NEUTRAL_10,
|
|
52
|
-
shadowOffset: {
|
|
53
|
-
width: 0,
|
|
54
|
-
height: 1
|
|
55
|
-
},
|
|
56
|
-
shadowOpacity: 0.2,
|
|
57
|
-
shadowRadius: 1,
|
|
58
|
-
elevation: 3
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
//# sourceMappingURL=MessageBlock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeUi","_effectorReact","_index","_reactNativeReanimated","_interopRequireWildcard","_constants","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","MessageBlock","status","style","localization","useUnit","$localization","opacityAnimation","useAnimatedStyle","opacity","withDelay","withTiming","ExampleSolutionStatuses","LOADING","duration","CACHE","jsx","View","layout","LinearTransition","styles","container","children","Typography","variant","numberOfLines","exampleSolution","letMeThink","aha","exports","StyleSheet","create","padding","SPACING","backgroundColor","COLORS","NEUTRAL_3","height","borderRadius","borderBottomRightRadius","borderWidth","hairlineWidth","borderColor","NEUTRAL_5","shadowColor","NEUTRAL_10","shadowOffset","width","shadowOpacity","shadowRadius","elevation"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/MessageBlock.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAC,uBAAA,CAAAP,OAAA;AAMA,IAAAQ,UAAA,GAAAR,OAAA;AAAsD,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAJ,wBAAAI,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA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C8B,IAAI;IACZC,MAAM,EAAEC,uCAAgB,CAACL,QAAQ,CAAC,GAAG,CAAE;IACvCX,KAAK,EAAE,CAACiB,MAAM,CAACC,SAAS,EAAEd,gBAAgB,EAAEJ,KAAK,CAAE;IAAAmB,QAAA,eAEnD,IAAA1C,WAAA,CAAAoC,GAAA,EAAC1C,cAAA,CAAAiD,UAAU;MAACC,OAAO,EAAE,OAAQ;MAACC,aAAa,EAAE,CAAE;MAAAH,QAAA,EAC5CpB,MAAM,KAAKU,kCAAuB,CAACC,OAAO,GACvCT,YAAY,CAACsB,eAAe,CAACC,UAAU,GACvCvB,YAAY,CAACsB,eAAe,CAACE;IAAG,CAC1B;EAAC,CACA,CAAC;AAEpB,CAAC;AAAAC,OAAA,CAAA5B,YAAA,GAAAA,YAAA;AAED,MAAMmB,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,OAAO,EAAEC,sBAAO,CAAC,GAAG,CAAC;IACrBC,eAAe,EAAEC,qBAAM,CAACC,SAAS;IACjCC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBC,uBAAuB,EAAE,CAAC;IAC1BC,WAAW,EAAEV,uBAAU,CAACW,aAAa;IACrCC,WAAW,EAAEP,qBAAM,CAACQ,SAAS;IAE7BC,WAAW,EAAET,qBAAM,CAACU,UAAU;IAC9BC,YAAY,EAAE;MACZC,KAAK,EAAE,CAAC;MACRV,MAAM,EAAE;IACV,CAAC;IACDW,aAAa,EAAE,GAAG;IAClBC,YAAY,EAAE,CAAC;IAEfC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { ExcitedLavaIcon } from "../../../shared/icons/ExcitedLavaIcon.js";
|
|
5
|
-
import { LavaIconInGlasses } from "../../../shared/icons/index.js";
|
|
6
|
-
import Animated, { FadeIn, useAnimatedStyle, withTiming } from 'react-native-reanimated';
|
|
7
|
-
import { ExampleSolutionStatuses } from "../constants.js";
|
|
8
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
-
const LAVA_ICON_HEIGHT = 112;
|
|
10
|
-
export const LavaIcon = ({
|
|
11
|
-
status,
|
|
12
|
-
style
|
|
13
|
-
}) => {
|
|
14
|
-
const opacityAnimation = useAnimatedStyle(() => {
|
|
15
|
-
return {
|
|
16
|
-
opacity: withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, {
|
|
17
|
-
duration: 500
|
|
18
|
-
})
|
|
19
|
-
};
|
|
20
|
-
}, [status]);
|
|
21
|
-
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
22
|
-
children: [/*#__PURE__*/_jsx(Animated.View, {
|
|
23
|
-
style: [style, opacityAnimation],
|
|
24
|
-
children: /*#__PURE__*/_jsx(LavaIconInGlasses, {
|
|
25
|
-
height: 112
|
|
26
|
-
})
|
|
27
|
-
}), status !== ExampleSolutionStatuses.LOADING && /*#__PURE__*/_jsx(Animated.View, {
|
|
28
|
-
style: style,
|
|
29
|
-
entering: FadeIn,
|
|
30
|
-
children: /*#__PURE__*/_jsx(ExcitedLavaIcon, {
|
|
31
|
-
height: LAVA_ICON_HEIGHT
|
|
32
|
-
})
|
|
33
|
-
})]
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=LavaIcon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","ExcitedLavaIcon","LavaIconInGlasses","Animated","FadeIn","useAnimatedStyle","withTiming","ExampleSolutionStatuses","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","LAVA_ICON_HEIGHT","LavaIcon","status","style","opacityAnimation","opacity","LOADING","duration","children","View","height","entering"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/LavaIcon.tsx"],"mappings":";;AAAA,OAAOA,KAA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';
|
|
4
|
-
import React from 'react';
|
|
5
|
-
import { COLORS, SPACING, Typography } from '@magmamath/react-native-ui';
|
|
6
|
-
import { useUnit } from 'effector-react';
|
|
7
|
-
import { $localization } from "../../../shared/translation/index.js";
|
|
8
|
-
import Animated, { LinearTransition, useAnimatedStyle, withDelay, withTiming } from 'react-native-reanimated';
|
|
9
|
-
import { ExampleSolutionStatuses } from "../constants.js";
|
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
|
-
export const MessageBlock = ({
|
|
12
|
-
status,
|
|
13
|
-
style
|
|
14
|
-
}) => {
|
|
15
|
-
const localization = useUnit($localization);
|
|
16
|
-
const opacityAnimation = useAnimatedStyle(() => {
|
|
17
|
-
return {
|
|
18
|
-
opacity: withDelay(2000, withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, {
|
|
19
|
-
duration: 350
|
|
20
|
-
}))
|
|
21
|
-
};
|
|
22
|
-
}, [status]);
|
|
23
|
-
if (status === ExampleSolutionStatuses.CACHE) return null;
|
|
24
|
-
return /*#__PURE__*/_jsx(Animated.View, {
|
|
25
|
-
layout: LinearTransition.duration(250),
|
|
26
|
-
style: [styles.container, opacityAnimation, style],
|
|
27
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
|
28
|
-
variant: 'small',
|
|
29
|
-
numberOfLines: 1,
|
|
30
|
-
children: status === ExampleSolutionStatuses.LOADING ? localization.exampleSolution.letMeThink : localization.exampleSolution.aha
|
|
31
|
-
})
|
|
32
|
-
});
|
|
33
|
-
};
|
|
34
|
-
const styles = StyleSheet.create({
|
|
35
|
-
container: {
|
|
36
|
-
padding: SPACING[200],
|
|
37
|
-
backgroundColor: COLORS.NEUTRAL_3,
|
|
38
|
-
height: 44,
|
|
39
|
-
borderRadius: 12,
|
|
40
|
-
borderBottomRightRadius: 2,
|
|
41
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
42
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
43
|
-
shadowColor: COLORS.NEUTRAL_10,
|
|
44
|
-
shadowOffset: {
|
|
45
|
-
width: 0,
|
|
46
|
-
height: 1
|
|
47
|
-
},
|
|
48
|
-
shadowOpacity: 0.2,
|
|
49
|
-
shadowRadius: 1,
|
|
50
|
-
elevation: 3
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
//# sourceMappingURL=MessageBlock.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","React","COLORS","SPACING","Typography","useUnit","$localization","Animated","LinearTransition","useAnimatedStyle","withDelay","withTiming","ExampleSolutionStatuses","jsx","_jsx","MessageBlock","status","style","localization","opacityAnimation","opacity","LOADING","duration","CACHE","View","layout","styles","container","children","variant","numberOfLines","exampleSolution","letMeThink","aha","create","padding","backgroundColor","NEUTRAL_3","height","borderRadius","borderBottomRightRadius","borderWidth","hairlineWidth","borderColor","NEUTRAL_5","shadowColor","NEUTRAL_10","shadowOffset","width","shadowOpacity","shadowRadius","elevation"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/MessageBlock.tsx"],"mappings":";;AAAA,SAAoBA,UAAU,QAAmB,cAAc;AAC/D,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,OAAO,EAAEC,UAAU,QAAQ,4BAA4B;AACxE,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,aAAa,QAAQ,sCAA6B;AAC3D,OAAOC,QAAQ,IACbC,gBAAgB,EAChBC,gBAAgB,EAChBC,SAAS,EACTC,UAAU,QACL,yBAAyB;AAChC,SAASC,uBAAuB,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAOtD,OAAO,MAAMC,YAAY,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAAyB,CAAC,KAAK;EACpE,MAAMC,YAAY,GAAGb,OAAO,CAACC,aAAa,CAAC;EAE3C,MAAMa,gBAAgB,GAAGV,gBAAgB,CAAC,MAAM;IAC9C,OAAO;MACLW,OAAO,EAAEV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ignoreList":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { ExampleSolutionStatuses } from '../constants';
|
|
4
|
-
type LavaIconProps = {
|
|
5
|
-
status: ExampleSolutionStatuses;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export declare const LavaIcon: ({ status, style }: LavaIconProps) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=LavaIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LavaIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/LavaIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAItD,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,aAAa,sBAoBxD,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ExampleSolutionStatuses } from '../constants';
|
|
4
|
-
type MessageBlockProps = {
|
|
5
|
-
status: ExampleSolutionStatuses;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export declare const MessageBlock: ({ status, style }: MessageBlockProps) => React.JSX.Element | null;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=MessageBlock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/MessageBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,YAAY,sBAAuB,iBAAiB,6BA0BhE,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
3
|
-
import { ExampleSolutionStatuses } from '../constants';
|
|
4
|
-
type LavaIconProps = {
|
|
5
|
-
status: ExampleSolutionStatuses;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export declare const LavaIcon: ({ status, style }: LavaIconProps) => React.JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=LavaIcon.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LavaIcon.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/LavaIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAItD,KAAK,aAAa,GAAG;IACnB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,QAAQ,sBAAuB,aAAa,sBAoBxD,CAAA"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { ExampleSolutionStatuses } from '../constants';
|
|
4
|
-
type MessageBlockProps = {
|
|
5
|
-
status: ExampleSolutionStatuses;
|
|
6
|
-
style?: StyleProp<ViewStyle>;
|
|
7
|
-
};
|
|
8
|
-
export declare const MessageBlock: ({ status, style }: MessageBlockProps) => React.JSX.Element | null;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=MessageBlock.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MessageBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/features/exampleSolution/components/MessageBlock.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAc,SAAS,EAAE,MAAM,cAAc,CAAA;AAC/D,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AAEtD,KAAK,iBAAiB,GAAG;IACvB,MAAM,EAAE,uBAAuB,CAAA;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;CAC7B,CAAA;AAED,eAAO,MAAM,YAAY,sBAAuB,iBAAiB,6BA0BhE,CAAA"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import React from 'react'
|
|
2
|
-
import { ExcitedLavaIcon } from '../../../shared/icons/ExcitedLavaIcon'
|
|
3
|
-
import { LavaIconInGlasses } from '../../../shared/icons'
|
|
4
|
-
import Animated, { FadeIn, useAnimatedStyle, withTiming } from 'react-native-reanimated'
|
|
5
|
-
import { StyleProp, ViewStyle } from 'react-native'
|
|
6
|
-
import { ExampleSolutionStatuses } from '../constants'
|
|
7
|
-
|
|
8
|
-
const LAVA_ICON_HEIGHT = 112
|
|
9
|
-
|
|
10
|
-
type LavaIconProps = {
|
|
11
|
-
status: ExampleSolutionStatuses
|
|
12
|
-
style?: StyleProp<ViewStyle>
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export const LavaIcon = ({ status, style }: LavaIconProps) => {
|
|
16
|
-
const opacityAnimation = useAnimatedStyle(() => {
|
|
17
|
-
return {
|
|
18
|
-
opacity: withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, { duration: 500 }),
|
|
19
|
-
}
|
|
20
|
-
}, [status])
|
|
21
|
-
|
|
22
|
-
return (
|
|
23
|
-
<>
|
|
24
|
-
<Animated.View style={[style, opacityAnimation]}>
|
|
25
|
-
<LavaIconInGlasses height={112} />
|
|
26
|
-
</Animated.View>
|
|
27
|
-
|
|
28
|
-
{status !== ExampleSolutionStatuses.LOADING && (
|
|
29
|
-
<Animated.View style={style} entering={FadeIn}>
|
|
30
|
-
<ExcitedLavaIcon height={LAVA_ICON_HEIGHT} />
|
|
31
|
-
</Animated.View>
|
|
32
|
-
)}
|
|
33
|
-
</>
|
|
34
|
-
)
|
|
35
|
-
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { StyleProp, StyleSheet, ViewStyle } from 'react-native'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import { COLORS, SPACING, Typography } from '@magmamath/react-native-ui'
|
|
4
|
-
import { useUnit } from 'effector-react'
|
|
5
|
-
import { $localization } from '../../../shared/translation'
|
|
6
|
-
import Animated, {
|
|
7
|
-
LinearTransition,
|
|
8
|
-
useAnimatedStyle,
|
|
9
|
-
withDelay,
|
|
10
|
-
withTiming,
|
|
11
|
-
} from 'react-native-reanimated'
|
|
12
|
-
import { ExampleSolutionStatuses } from '../constants'
|
|
13
|
-
|
|
14
|
-
type MessageBlockProps = {
|
|
15
|
-
status: ExampleSolutionStatuses
|
|
16
|
-
style?: StyleProp<ViewStyle>
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const MessageBlock = ({ status, style }: MessageBlockProps) => {
|
|
20
|
-
const localization = useUnit($localization)
|
|
21
|
-
|
|
22
|
-
const opacityAnimation = useAnimatedStyle(() => {
|
|
23
|
-
return {
|
|
24
|
-
opacity: withDelay(
|
|
25
|
-
2000,
|
|
26
|
-
withTiming(status === ExampleSolutionStatuses.LOADING ? 1 : 0, { duration: 350 }),
|
|
27
|
-
),
|
|
28
|
-
}
|
|
29
|
-
}, [status])
|
|
30
|
-
|
|
31
|
-
if (status === ExampleSolutionStatuses.CACHE) return null
|
|
32
|
-
|
|
33
|
-
return (
|
|
34
|
-
<Animated.View
|
|
35
|
-
layout={LinearTransition.duration(250)}
|
|
36
|
-
style={[styles.container, opacityAnimation, style]}
|
|
37
|
-
>
|
|
38
|
-
<Typography variant={'small'} numberOfLines={1}>
|
|
39
|
-
{status === ExampleSolutionStatuses.LOADING
|
|
40
|
-
? localization.exampleSolution.letMeThink
|
|
41
|
-
: localization.exampleSolution.aha}
|
|
42
|
-
</Typography>
|
|
43
|
-
</Animated.View>
|
|
44
|
-
)
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
const styles = StyleSheet.create({
|
|
48
|
-
container: {
|
|
49
|
-
padding: SPACING[200],
|
|
50
|
-
backgroundColor: COLORS.NEUTRAL_3,
|
|
51
|
-
height: 44,
|
|
52
|
-
borderRadius: 12,
|
|
53
|
-
borderBottomRightRadius: 2,
|
|
54
|
-
borderWidth: StyleSheet.hairlineWidth,
|
|
55
|
-
borderColor: COLORS.NEUTRAL_5,
|
|
56
|
-
|
|
57
|
-
shadowColor: COLORS.NEUTRAL_10,
|
|
58
|
-
shadowOffset: {
|
|
59
|
-
width: 0,
|
|
60
|
-
height: 1,
|
|
61
|
-
},
|
|
62
|
-
shadowOpacity: 0.2,
|
|
63
|
-
shadowRadius: 1,
|
|
64
|
-
|
|
65
|
-
elevation: 3,
|
|
66
|
-
},
|
|
67
|
-
})
|