@magmamath/students-features 0.6.12 → 0.6.14-rc.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/Alternatives/Alternatives.js +17 -5
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +148 -41
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Alternatives/InputButton.js +110 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/InputButton.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/InputWithHintRow.js +159 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/InputWithHintRow.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +7 -4
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js +31 -0
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/assets/grid.png +0 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +97 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js +44 -0
- package/dist/commonjs/features/exampleSolution/components/LavaIcon.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js +61 -0
- package/dist/commonjs/features/exampleSolution/components/MessageBlock.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +68 -0
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +75 -0
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/constants.js +13 -0
- package/dist/commonjs/features/exampleSolution/constants.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js +61 -0
- package/dist/commonjs/features/exampleSolution/hooks/useExampleSolution.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/index.js +39 -0
- package/dist/commonjs/features/exampleSolution/index.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +22 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js +32 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js +18 -0
- package/dist/commonjs/features/exampleSolution/model/ExampleSolutionCache.js.map +1 -0
- package/dist/commonjs/features/exampleSolution/types.js +6 -0
- package/dist/commonjs/features/exampleSolution/types.js.map +1 -0
- package/dist/commonjs/index.js +24 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js +681 -0
- package/dist/commonjs/shared/icons/ExcitedLavaIcon.js.map +1 -0
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js +616 -0
- package/dist/commonjs/shared/icons/LavaIconInGlasses.js.map +1 -0
- package/dist/commonjs/shared/icons/index.js +204 -0
- package/dist/commonjs/shared/icons/index.js.map +1 -0
- package/dist/commonjs/shared/translation/localization/ca.json +7 -1
- package/dist/commonjs/shared/translation/localization/en.json +8 -2
- package/dist/commonjs/shared/translation/localization/gb.json +7 -1
- package/dist/commonjs/shared/translation/localization/sct.json +7 -1
- package/dist/commonjs/shared/translation/localization/sw.json +7 -1
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +17 -5
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -1
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +147 -41
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -1
- package/dist/module/features/chatbot/components/Alternatives/InputButton.js +102 -0
- package/dist/module/features/chatbot/components/Alternatives/InputButton.js.map +1 -0
- package/dist/module/features/chatbot/components/Alternatives/InputWithHintRow.js +152 -0
- package/dist/module/features/chatbot/components/Alternatives/InputWithHintRow.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +7 -4
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js +1 -1
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -1
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js +25 -0
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +1 -0
- package/dist/module/features/exampleSolution/assets/grid.png +0 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +91 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -0
- package/dist/module/features/exampleSolution/components/LavaIcon.js +36 -0
- package/dist/module/features/exampleSolution/components/LavaIcon.js.map +1 -0
- package/dist/module/features/exampleSolution/components/MessageBlock.js +53 -0
- package/dist/module/features/exampleSolution/components/MessageBlock.js.map +1 -0
- package/dist/module/features/exampleSolution/components/QuestionSection.js +60 -0
- package/dist/module/features/exampleSolution/components/QuestionSection.js.map +1 -0
- package/dist/module/features/exampleSolution/components/SolutionSection.js +67 -0
- package/dist/module/features/exampleSolution/components/SolutionSection.js.map +1 -0
- package/dist/module/features/exampleSolution/constants.js +9 -0
- package/dist/module/features/exampleSolution/constants.js.map +1 -0
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js +56 -0
- package/dist/module/features/exampleSolution/hooks/useExampleSolution.js.map +1 -0
- package/dist/module/features/exampleSolution/index.js +6 -0
- package/dist/module/features/exampleSolution/index.js.map +1 -0
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +17 -0
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +1 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js +27 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionApi.js.map +1 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js +13 -0
- package/dist/module/features/exampleSolution/model/ExampleSolutionCache.js.map +1 -0
- package/dist/module/features/exampleSolution/types.js +4 -0
- package/dist/module/features/exampleSolution/types.js.map +1 -0
- package/dist/module/index.js +2 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/icons/ExcitedLavaIcon.js +673 -0
- package/dist/module/shared/icons/ExcitedLavaIcon.js.map +1 -0
- package/dist/module/shared/icons/LavaIconInGlasses.js +608 -0
- package/dist/module/shared/icons/LavaIconInGlasses.js.map +1 -0
- package/dist/module/shared/icons/index.js +21 -0
- package/dist/module/shared/icons/index.js.map +1 -0
- package/dist/module/shared/translation/localization/ca.json +7 -1
- package/dist/module/shared/translation/localization/en.json +8 -2
- package/dist/module/shared/translation/localization/gb.json +7 -1
- package/dist/module/shared/translation/localization/sct.json +7 -1
- package/dist/module/shared/translation/localization/sw.json +7 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +3 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/InputButton.d.ts +9 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/InputButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/InputWithHintRow.d.ts +10 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/InputWithHintRow.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +4 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts +10 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/LavaIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts +10 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/MessageBlock.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts +6 -0
- package/dist/typescript/commonjs/features/exampleSolution/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/hooks/useExampleSolution.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts +4 -0
- package/dist/typescript/commonjs/features/exampleSolution/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +9 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts +13 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts +11 -0
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +26 -0
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +2 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/ExcitedLavaIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts +4 -0
- package/dist/typescript/commonjs/shared/icons/LavaIconInGlasses.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/icons/index.d.ts +19 -0
- package/dist/typescript/commonjs/shared/icons/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +30 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +12 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +3 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/InputButton.d.ts +9 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/InputButton.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/InputWithHintRow.d.ts +10 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/InputWithHintRow.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts +11 -0
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +4 -0
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts +10 -0
- package/dist/typescript/module/features/exampleSolution/components/LavaIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts +10 -0
- package/dist/typescript/module/features/exampleSolution/components/MessageBlock.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/constants.d.ts +6 -0
- package/dist/typescript/module/features/exampleSolution/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/hooks/useExampleSolution.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/index.d.ts +4 -0
- package/dist/typescript/module/features/exampleSolution/index.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +9 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts +13 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionApi.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts +11 -0
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolutionCache.d.ts.map +1 -0
- package/dist/typescript/module/features/exampleSolution/types.d.ts +26 -0
- package/dist/typescript/module/features/exampleSolution/types.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +2 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts +4 -0
- package/dist/typescript/module/shared/icons/ExcitedLavaIcon.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts +4 -0
- package/dist/typescript/module/shared/icons/LavaIconInGlasses.d.ts.map +1 -0
- package/dist/typescript/module/shared/icons/index.d.ts +19 -0
- package/dist/typescript/module/shared/icons/index.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +30 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +12 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +6 -2
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +18 -8
- package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +146 -35
- package/src/features/chatbot/components/Alternatives/InputButton.tsx +101 -0
- package/src/features/chatbot/components/Alternatives/InputWithHintRow.tsx +157 -0
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +6 -2
- package/src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx +1 -1
- package/src/features/exampleSolution/ExampleSolutionModal.tsx +29 -0
- package/src/features/exampleSolution/assets/grid.png +0 -0
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +71 -0
- package/src/features/exampleSolution/components/LavaIcon.tsx +35 -0
- package/src/features/exampleSolution/components/MessageBlock.tsx +67 -0
- package/src/features/exampleSolution/components/QuestionSection.tsx +56 -0
- package/src/features/exampleSolution/components/SolutionSection.tsx +69 -0
- package/src/features/exampleSolution/constants.ts +5 -0
- package/src/features/exampleSolution/hooks/useExampleSolution.ts +66 -0
- package/src/features/exampleSolution/index.ts +3 -0
- package/src/features/exampleSolution/model/ExampleSolution.model.ts +12 -0
- package/src/features/exampleSolution/model/ExampleSolutionApi.ts +33 -0
- package/src/features/exampleSolution/model/ExampleSolutionCache.ts +20 -0
- package/src/features/exampleSolution/types.ts +26 -0
- package/src/index.ts +2 -0
- package/src/shared/icons/ExcitedLavaIcon.tsx +541 -0
- package/src/shared/icons/LavaIconInGlasses.tsx +489 -0
- package/src/shared/icons/index.ts +18 -0
- package/src/shared/translation/localization/ca.json +7 -1
- package/src/shared/translation/localization/en.json +8 -2
- package/src/shared/translation/localization/gb.json +7 -1
- package/src/shared/translation/localization/sct.json +7 -1
- package/src/shared/translation/localization/sw.json +7 -1
|
@@ -7,10 +7,10 @@ exports.MessageLoader = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
10
|
-
var _ChatbotIcon = require("../../../../shared/icons/ChatbotIcon.js");
|
|
11
10
|
var _ThreeDotsLoader = require("../ThreeDotsLoader/ThreeDotsLoader.js");
|
|
12
11
|
var _constants = require("../../constants.js");
|
|
13
12
|
var _styleTypes = require("../../types/style.types.js");
|
|
13
|
+
var _studentsFeatures = require("@magmamath/students-features");
|
|
14
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
const MessageLoader = ({
|
|
@@ -19,7 +19,7 @@ const MessageLoader = ({
|
|
|
19
19
|
style: styles.container,
|
|
20
20
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
21
21
|
style: styles.icon,
|
|
22
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
22
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_studentsFeatures.LavaIconInGlasses, {
|
|
23
23
|
width: 60,
|
|
24
24
|
height: 80
|
|
25
25
|
})
|
|
@@ -35,11 +35,14 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
35
35
|
container: {
|
|
36
36
|
flexDirection: 'row',
|
|
37
37
|
width: 327,
|
|
38
|
-
alignItems: 'flex-end'
|
|
38
|
+
alignItems: 'flex-end',
|
|
39
|
+
paddingLeft: 70
|
|
39
40
|
},
|
|
40
41
|
icon: {
|
|
42
|
+
position: 'absolute',
|
|
43
|
+
zIndex: 1,
|
|
41
44
|
alignSelf: 'flex-end',
|
|
42
|
-
|
|
45
|
+
left: 0
|
|
43
46
|
},
|
|
44
47
|
loader: {
|
|
45
48
|
flex: 1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNativeUi","_ThreeDotsLoader","_constants","_styleTypes","_studentsFeatures","_jsxRuntime","e","__esModule","default","MessageLoader","colorScheme","ColorScheme","Blue","jsxs","View","style","styles","container","children","jsx","icon","LavaIconInGlasses","width","height","loader","ThreeDotsLoader","backgroundColor","CONTROLS_COLORS_MAP","background","exports","StyleSheet","create","flexDirection","alignItems","paddingLeft","position","zIndex","alignSelf","left","flex","maxWidth","padding","paddingTop","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","borderRadius","borderBottomLeftRadius","COLORS","NEUTRAL_3"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessage/MessageLoader.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAGA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAAgE,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAMzD,MAAMG,aAAa,GAAGA,CAAC;EAAEC,WAAW,GAAGC,uBAAW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MAAM,EAAE;IAAE,CAAC;IACrCsB,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE,CAAC;IACZC,YAAY,EAAE,CAAC;IACfC,sBAAsB,EAAE,CAAC;IACzBvB,eAAe,EAAEwB,qBAAM,CAACC;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -79,7 +79,7 @@ const ChatbotMessages = ({
|
|
|
79
79
|
}, message.id)), isHelpRequestPending && /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageLoader.MessageLoader, {
|
|
80
80
|
colorScheme: colorScheme
|
|
81
81
|
})]
|
|
82
|
-
}),
|
|
82
|
+
}), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Alternatives.Alternatives, {
|
|
83
83
|
onPressAlternative: askChatForHelp,
|
|
84
84
|
hasMessages: messages.length > 1,
|
|
85
85
|
isHintFeedback: isHintFeedback,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_Alternatives","_modelTypes","_styleTypes","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TOOLBAR_HEIGHT","BOTTOM_OFFSET","Platform","select","web","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","colorScheme","ColorScheme","Blue","dimensions","useWindowDimensions","ref","useRef","isOpen","useUnit","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","errorSpottingEnabled","errorSpotting","$isEnabled","messages","useStoreMap","$currentChatData","lastMessageId","at","id","MAX_HEIGHT","height","askChatForHelp","message","translatedMessage","jsx","View","style","styles","container","maxHeight","children","jsxs","ScrollView","bounces","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","ChatMessage","withIcon","isOwnMessage","variant","MessageVariant","SENT","RECEIVED","withErrorSpotting","t2sState","isEnabled","isActive","isLoading","status","disabled","MessageLoader","Alternatives","onPressAlternative","hasMessages","length","exports","StyleSheet","create","flex","alignItems","width","paddingVertical","paddingRight"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAGA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAAqD,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,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,SAAAX,wBAAAW,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,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAA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A4E,IAAI;QAACC,KAAK,EAAEC,MAAM,CAACc,GAAI;QAAAX,QAAA,GACrBjB,QAAQ,CAAC6B,GAAG,CAAEpB,OAAO,iBACpB,IAAAlE,WAAA,CAAAoE,GAAA,EAACzE,YAAA,CAAA4F,WAAW;UAEVtC,YAAY,EAAEA,YAAa;UAC3BuC,QAAQ,EAAE,CAACtB,OAAO,CAACuB,YAAY,IAAIvB,OAAO,CAACJ,EAAE,KAAKF,aAAc;UAChEM,OAAO,EAAEA,OAAQ;UACjBwB,OAAO,EAAExB,OAAO,CAACuB,YAAY,GAAGE,0BAAc,CAACC,IAAI,GAAGD,0BAAc,CAACE,QAAS;UAC9E/D,WAAW,EAAEA,WAAY;UACzBgE,iBAAiB,EAAExC,oBAAoB,IAAI,CAACY,OAAO,CAACuB,YAAa;UACjEM,QAAQ,EAAE;YACRC,SAAS,EAAEnE,qBAAqB,IAAI,CAACqC,OAAO,CAACuB,YAAY;YACzDQ,QAAQ,EAAE/B,OAAO,CAACJ,EAAE,KAAKhB,gBAAgB;YACzCoD,SAAS,EAAEvD,qBAAqB;YAChCwD,MAAM,EAAE/C,WAAW;YACnBgD,QAAQ,EAAEzD;UACZ;QAAE,GAbGuB,OAAO,CAACJ,EAcd,CACF,CAAC,EAEDtB,oBAAoB,iBAAI,IAAAxC,WAAA,CAAAoE,GAAA,EAACxE,cAAA,CAAAyG,aAAa;UAACvE,WAAW,EAAEA;QAAY,CAAE,CAAC;MAAA,CAChE,CACP,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_effectorReact","_ChatMessage","_MessageLoader","_Alternatives","_modelTypes","_styleTypes","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","TOOLBAR_HEIGHT","BOTTOM_OFFSET","Platform","select","web","ChatbotMessages","model","isHintFeedback","isTextToSpeechEnabled","colorScheme","ColorScheme","Blue","dimensions","useWindowDimensions","ref","useRef","isOpen","useUnit","$isOpen","isHelpRequestPending","sendHelpRequestFx","pending","isTextToSpeechPending","api","textToSpeechTextFx","currentPlayingId","t2s","$currentPlayingId","isTranslated","translation","$isTranslated","audioStatus","$status","errorSpottingEnabled","errorSpotting","$isEnabled","messages","useStoreMap","$currentChatData","lastMessageId","at","id","MAX_HEIGHT","height","askChatForHelp","message","translatedMessage","jsx","View","style","styles","container","maxHeight","children","jsxs","ScrollView","bounces","contentContainerStyle","list","onContentSizeChange","_","current","scrollToEnd","setScrollActive","gap","map","ChatMessage","withIcon","isOwnMessage","variant","MessageVariant","SENT","RECEIVED","withErrorSpotting","t2sState","isEnabled","isActive","isLoading","status","disabled","MessageLoader","Alternatives","onPressAlternative","hasMessages","length","exports","StyleSheet","create","flex","alignItems","width","paddingVertical","paddingRight"],"sourceRoot":"../../../../../../src","sources":["features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAGA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AAAqD,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,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,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,C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P,EAEAO,MAAM,iBACL,IAAArC,WAAA,CAAAoE,GAAA,EAACvE,aAAA,CAAAyG,YAAY;QACXC,kBAAkB,EAAEtC,cAAe;QACnCuC,WAAW,EAAE/C,QAAQ,CAACgD,MAAM,GAAG,CAAE;QACjC7E,cAAc,EAAEA,cAAe;QAC/BE,WAAW,EAAEA;MAAY,CAC1B,CACF;IAAA,CACS;EAAC,CACT,CAAC;AAEX,CAAC;AAAA4E,OAAA,CAAAhF,eAAA,GAAAA,eAAA;AAED,MAAM6C,MAAM,GAAGoC,uBAAU,CAACC,MAAM,CAAC;EAC/BpC,SAAS,EAAE;IACTqC,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE,UAAU;IACtBC,KAAK,EAAE,GAAG;IACV/C,MAAM,EAAE;EACV,CAAC;EACDe,IAAI,EAAE;IACJ+B,UAAU,EAAE,UAAU;IACtBE,eAAe,EAAE,CAAC;IAClBC,YAAY,EAAE;EAChB,CAAC;EACD5B,GAAG,EAAE;IACHwB,IAAI,EAAE,CAAC;IACPxB,GAAG,EAAE;EACP;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ExampleSolutionModal = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
9
|
+
var _ExampleSolutionModalContent = require("./components/ExampleSolutionModalContent.js");
|
|
10
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
const ExampleSolutionModal = ({
|
|
13
|
+
modal: {
|
|
14
|
+
closeModal,
|
|
15
|
+
params
|
|
16
|
+
}
|
|
17
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.BaseModal, {
|
|
18
|
+
style: {
|
|
19
|
+
container: {
|
|
20
|
+
paddingHorizontal: _reactNativeUi.SPACING[800]
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
onClose: closeModal,
|
|
24
|
+
content: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ExampleSolutionModalContent.ExampleSolutionModalContent, {
|
|
25
|
+
model: params.model,
|
|
26
|
+
payload: params.payload,
|
|
27
|
+
cacheKey: params.cacheKey
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
exports.ExampleSolutionModal = ExampleSolutionModal;
|
|
31
|
+
//# sourceMappingURL=ExampleSolutionModal.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeUi","_ExampleSolutionModalContent","_jsxRuntime","e","__esModule","default","ExampleSolutionModal","modal","closeModal","params","jsx","BaseModal","style","container","paddingHorizontal","SPACING","onClose","content","ExampleSolutionModalContent","model","payload","cacheKey","exports"],"sourceRoot":"../../../../src","sources":["features/exampleSolution/ExampleSolutionModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,4BAAA,GAAAF,OAAA;AAAsF,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAU/E,MAAMG,oBAAoB,GAAGA,CAAC;EACnCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACM,CAAC,kBACnC,IAAAP,WAAA,CAAAQ,GAAA,EAACV,cAAA,CAAAW,SAAS;EACRC,KAAK,EAAE;IACLC,SAAS,EAAE;MAAEC,iBAAiB,EAAEC,sBAAO,CAAC,GAAG;IAAE;EAC/C,CAAE;EACFC,OAAO,EAAER,UAAW;EACpBS,OAAO,eACL,IAAAf,WAAA,CAAAQ,GAAA,EAACT,4BAAA,CAAAiB,2BAA2B;IAC1BC,KAAK,EAAEV,MAAM,CAACU,KAAM;IACpBC,OAAO,EAAEX,MAAM,CAACW,OAAQ;IACxBC,QAAQ,EAAEZ,MAAM,CAACY;EAAS,CAC3B;AACF,CACF,CACF;AAAAC,OAAA,CAAAhB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
|
|
Binary file
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ExampleSolutionModalContent = 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 _MessageBlock = require("./MessageBlock.js");
|
|
13
|
+
var _LavaIcon = require("./LavaIcon.js");
|
|
14
|
+
var _QuestionSection = require("./QuestionSection.js");
|
|
15
|
+
var _SolutionSection = require("./SolutionSection.js");
|
|
16
|
+
var _useExampleSolution = require("../hooks/useExampleSolution.js");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
const ExampleSolutionModalContent = ({
|
|
20
|
+
model,
|
|
21
|
+
payload,
|
|
22
|
+
cacheKey
|
|
23
|
+
}) => {
|
|
24
|
+
const {
|
|
25
|
+
result,
|
|
26
|
+
status
|
|
27
|
+
} = (0, _useExampleSolution.useExampleSolution)({
|
|
28
|
+
model,
|
|
29
|
+
payload,
|
|
30
|
+
cacheKey
|
|
31
|
+
});
|
|
32
|
+
const localization = (0, _effectorReact.useUnit)(_index.$localization);
|
|
33
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
34
|
+
style: styles.container,
|
|
35
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
36
|
+
align: "center",
|
|
37
|
+
variant: _reactNativeUi.HeadingVariants.H2,
|
|
38
|
+
style: {
|
|
39
|
+
color: _reactNativeUi.COLORS.NEUTRAL_9
|
|
40
|
+
},
|
|
41
|
+
children: localization.exampleSolution.exampleSolution
|
|
42
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
43
|
+
style: styles.content,
|
|
44
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_QuestionSection.QuestionSection, {
|
|
45
|
+
status: status,
|
|
46
|
+
question: result?.question
|
|
47
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_SolutionSection.SolutionSection, {
|
|
48
|
+
status: status,
|
|
49
|
+
answer: result?.answer
|
|
50
|
+
})]
|
|
51
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_MessageBlock.MessageBlock, {
|
|
52
|
+
status: status,
|
|
53
|
+
style: styles.messageBlock
|
|
54
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_LavaIcon.LavaIcon, {
|
|
55
|
+
status: status,
|
|
56
|
+
style: styles.lavaIconContainer
|
|
57
|
+
})]
|
|
58
|
+
});
|
|
59
|
+
};
|
|
60
|
+
exports.ExampleSolutionModalContent = ExampleSolutionModalContent;
|
|
61
|
+
const styles = _reactNative.StyleSheet.create({
|
|
62
|
+
container: {
|
|
63
|
+
width: 880,
|
|
64
|
+
height: 593
|
|
65
|
+
},
|
|
66
|
+
content: {
|
|
67
|
+
flex: 1,
|
|
68
|
+
flexDirection: 'row',
|
|
69
|
+
marginTop: _reactNativeUi.SPACING[400],
|
|
70
|
+
gap: _reactNativeUi.SPACING[400]
|
|
71
|
+
},
|
|
72
|
+
solutionContainer: {
|
|
73
|
+
width: 351,
|
|
74
|
+
overflow: 'hidden',
|
|
75
|
+
borderRadius: 8,
|
|
76
|
+
borderWidth: 1,
|
|
77
|
+
borderColor: _reactNativeUi.COLORS.NEUTRAL_5
|
|
78
|
+
},
|
|
79
|
+
lavaIconContainer: {
|
|
80
|
+
position: 'absolute',
|
|
81
|
+
bottom: -54,
|
|
82
|
+
right: -50
|
|
83
|
+
},
|
|
84
|
+
loaderContainer: {
|
|
85
|
+
paddingTop: 34,
|
|
86
|
+
position: 'absolute',
|
|
87
|
+
width: '100%',
|
|
88
|
+
height: '100%',
|
|
89
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1
|
|
90
|
+
},
|
|
91
|
+
messageBlock: {
|
|
92
|
+
position: 'absolute',
|
|
93
|
+
right: 38,
|
|
94
|
+
bottom: -22
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
//# sourceMappingURL=ExampleSolutionModalContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeUi","_effectorReact","_index","_MessageBlock","_LavaIcon","_QuestionSection","_SolutionSection","_useExampleSolution","_jsxRuntime","e","__esModule","default","ExampleSolutionModalContent","model","payload","cacheKey","result","status","useExampleSolution","localization","useUnit","$localization","jsxs","View","style","styles","container","children","jsx","Typography","align","variant","HeadingVariants","H2","color","COLORS","NEUTRAL_9","exampleSolution","content","QuestionSection","question","SolutionSection","answer","MessageBlock","messageBlock","LavaIcon","lavaIconContainer","exports","StyleSheet","create","width","height","flex","flexDirection","marginTop","SPACING","gap","solutionContainer","overflow","borderRadius","borderWidth","borderColor","NEUTRAL_5","position","bottom","right","loaderContainer","paddingTop","backgroundColor","NEUTRAL_1"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAA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AM;IACbC,MAAM,EAAE,MAAM;IACdiB,eAAe,EAAEjC,qBAAM,CAACkC;EAC1B,CAAC;EACDzB,YAAY,EAAE;IACZmB,QAAQ,EAAE,UAAU;IACpBE,KAAK,EAAE,EAAE;IACTD,MAAM,EAAE,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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","LavaIconIn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AAA8C,eAAe;QAACH,MAAM,EAAEjB;MAAiB,CAAE;IAAC,CAChC,CAChB;EAAA,CACD,CAAC;AAEP,CAAC;AAAAqB,OAAA,CAAApB,QAAA,GAAAA,QAAA","ignoreList":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,C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,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.QuestionSection = 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 QuestionSection = ({
|
|
17
|
+
question,
|
|
18
|
+
status
|
|
19
|
+
}) => {
|
|
20
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
21
|
+
style: styles.container,
|
|
22
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
|
|
23
|
+
style: styles.scrollView,
|
|
24
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
25
|
+
children: question
|
|
26
|
+
})
|
|
27
|
+
}), status === _constants.ExampleSolutionStatuses.LOADING && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
28
|
+
exiting: _reactNativeReanimated.FadeOut,
|
|
29
|
+
style: styles.loaderContainer,
|
|
30
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Loader, {
|
|
31
|
+
size: "large",
|
|
32
|
+
color: _reactNativeUi.LoaderColor.BLUE
|
|
33
|
+
})
|
|
34
|
+
})]
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
exports.QuestionSection = QuestionSection;
|
|
38
|
+
const styles = _reactNative.StyleSheet.create({
|
|
39
|
+
container: {
|
|
40
|
+
flex: 1
|
|
41
|
+
},
|
|
42
|
+
scrollView: {
|
|
43
|
+
flex: 1
|
|
44
|
+
},
|
|
45
|
+
loaderContainer: {
|
|
46
|
+
paddingTop: 34,
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
width: '100%',
|
|
49
|
+
height: '100%',
|
|
50
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
51
|
+
justifyContent: 'flex-start',
|
|
52
|
+
alignItems: 'center'
|
|
53
|
+
},
|
|
54
|
+
errorContainer: {
|
|
55
|
+
position: 'absolute',
|
|
56
|
+
width: '100%',
|
|
57
|
+
height: '100%',
|
|
58
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
59
|
+
justifyContent: 'center',
|
|
60
|
+
alignItems: 'center',
|
|
61
|
+
padding: _reactNativeUi.SPACING[400]
|
|
62
|
+
},
|
|
63
|
+
errorText: {
|
|
64
|
+
color: _reactNativeUi.COLORS.PRIMARY_RED,
|
|
65
|
+
textAlign: 'center'
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
//# sourceMappingURL=QuestionSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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","QuestionSection","question","status","jsxs","View","style","styles","container","children","jsx","ScrollView","scrollView","Typography","ExampleSolutionStatuses","LOADING","exiting","FadeOut","loaderContainer","Loader","size","color","LoaderColor","BLUE","exports","StyleSheet","create","flex","paddingTop","position","width","height","backgroundColor","COLORS","NEUTRAL_1","justifyContent","alignItems","errorContainer","padding","SPACING","errorText","PRIMARY_RED","textAlign"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/QuestionSection.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;AAAsD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,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,UA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ACX,KAAK,EAAEC,MAAM,CAACW,eAAgB;MAAAT,QAAA,eAC7D,IAAA7B,WAAA,CAAA8B,GAAA,EAAClC,cAAA,CAAA2C,MAAM;QAACC,IAAI,EAAC,OAAO;QAACC,KAAK,EAAEC,0BAAW,CAACC;MAAK,CAAE;IAAC,CACnC,CAChB;EAAA,CACG,CAAC;AAEX,CAAC;AAAAC,OAAA,CAAAvB,eAAA,GAAAA,eAAA;AAED,MAAMM,MAAM,GAAGkB,uBAAU,CAACC,MAAM,CAAC;EAC/BlB,SAAS,EAAE;IACTmB,IAAI,EAAE;EACR,CAAC;EACDf,UAAU,EAAE;IACVe,IAAI,EAAE;EACR,CAAC;EACDT,eAAe,EAAE;IACfU,UAAU,EAAE,EAAE;IACdC,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,eAAe,EAAEC,qBAAM,CAACC,SAAS;IACjCC,cAAc,EAAE,YAAY;IAC5BC,UAAU,EAAE;EACd,CAAC;EACDC,cAAc,EAAE;IACdR,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdC,eAAe,EAAEC,qBAAM,CAACC,SAAS;IACjCC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBE,OAAO,EAAEC,sBAAO,CAAC,GAAG;EACtB,CAAC;EACDC,SAAS,EAAE;IACTnB,KAAK,EAAEY,qBAAM,CAACQ,WAAW;IACzBC,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.SolutionSection = 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 _grid = _interopRequireDefault(require("../assets/grid.png"));
|
|
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 gridImagePath = !_reactNativeUi.IS_WEB ? _reactNative.Image.resolveAssetSource(_grid.default).uri : _grid.default;
|
|
18
|
+
const SolutionSection = ({
|
|
19
|
+
answer,
|
|
20
|
+
status
|
|
21
|
+
}) => {
|
|
22
|
+
const shouldShowAnswer = answer && (status === _constants.ExampleSolutionStatuses.DONE_DATA || status === _constants.ExampleSolutionStatuses.CACHE);
|
|
23
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
24
|
+
style: styles.container,
|
|
25
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
26
|
+
source: {
|
|
27
|
+
uri: gridImagePath
|
|
28
|
+
},
|
|
29
|
+
style: [styles.gridImage, _reactNativeUi.IS_WEB && styles.gridImageWeb]
|
|
30
|
+
}), shouldShowAnswer && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.ScrollView, {
|
|
31
|
+
style: styles.solutionScroll,
|
|
32
|
+
contentContainerStyle: styles.solutionScrollContent,
|
|
33
|
+
entering: status === 'cache' ? undefined : _reactNativeReanimated.FadeIn.delay(1000).duration(500),
|
|
34
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
35
|
+
style: styles.solutionText,
|
|
36
|
+
children: answer
|
|
37
|
+
})
|
|
38
|
+
})]
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
exports.SolutionSection = SolutionSection;
|
|
42
|
+
const styles = _reactNative.StyleSheet.create({
|
|
43
|
+
container: {
|
|
44
|
+
width: 500,
|
|
45
|
+
overflow: 'hidden',
|
|
46
|
+
borderRadius: 8,
|
|
47
|
+
borderWidth: 1,
|
|
48
|
+
borderColor: _reactNativeUi.COLORS.NEUTRAL_5
|
|
49
|
+
},
|
|
50
|
+
gridImage: {
|
|
51
|
+
width: '100%',
|
|
52
|
+
height: '100%',
|
|
53
|
+
resizeMode: 'cover',
|
|
54
|
+
aspectRatio: 28 / 8
|
|
55
|
+
},
|
|
56
|
+
gridImageWeb: {
|
|
57
|
+
transform: [{
|
|
58
|
+
scale: 3.5
|
|
59
|
+
}]
|
|
60
|
+
},
|
|
61
|
+
solutionScroll: {
|
|
62
|
+
position: 'absolute',
|
|
63
|
+
width: '100%',
|
|
64
|
+
height: '100%'
|
|
65
|
+
},
|
|
66
|
+
solutionScrollContent: {
|
|
67
|
+
paddingHorizontal: _reactNativeUi.SPACING[800],
|
|
68
|
+
paddingVertical: _reactNativeUi.SPACING[400]
|
|
69
|
+
},
|
|
70
|
+
solutionText: {
|
|
71
|
+
fontFamily: 'PlaypenSans-Light',
|
|
72
|
+
fontSize: 22
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=SolutionSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeUi","_reactNativeReanimated","_interopRequireWildcard","_constants","_grid","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","gridImagePath","IS_WEB","Image","resolveAssetSource","gridImage","uri","SolutionSection","answer","status","shouldShowAnswer","ExampleSolutionStatuses","DONE_DATA","CACHE","jsxs","View","style","styles","container","children","jsx","source","gridImageWeb","ScrollView","solutionScroll","contentContainerStyle","solutionScrollContent","entering","undefined","FadeIn","delay","duration","Text","solutionText","exports","StyleSheet","create","width","overflow","borderRadius","borderWidth","borderColor","COLORS","NEUTRAL_5","height","resizeMode","aspectRatio","transform","scale","position","paddingHorizontal","SPACING","paddingVertical","fontFamily","fontSize"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/SolutionSection.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;AACA,IAAAO,KAAA,GAAAL,sBAAA,CAAAF,OAAA;AAA0C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAS,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,SAAAL,wBAAAK,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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QAAQ,EAAE,UAAU;IACpBZ,KAAK,EAAE,MAAM;IACbO,MAAM,EAAE;EACV,CAAC;EACDlB,qBAAqB,EAAE;IACrBwB,iBAAiB,EAAEC,sBAAO,CAAC,GAAG,CAAC;IAC/BC,eAAe,EAAED,sBAAO,CAAC,GAAG;EAC9B,CAAC;EACDlB,YAAY,EAAE;IACZoB,UAAU,EAAE,mBAAmB;IAC/BC,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ExampleSolutionStatuses = void 0;
|
|
7
|
+
let ExampleSolutionStatuses = exports.ExampleSolutionStatuses = /*#__PURE__*/function (ExampleSolutionStatuses) {
|
|
8
|
+
ExampleSolutionStatuses["LOADING"] = "loading";
|
|
9
|
+
ExampleSolutionStatuses["DONE_DATA"] = "doneData";
|
|
10
|
+
ExampleSolutionStatuses["CACHE"] = "cache";
|
|
11
|
+
return ExampleSolutionStatuses;
|
|
12
|
+
}({});
|
|
13
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["ExampleSolutionStatuses","exports"],"sourceRoot":"../../../../src","sources":["features/exampleSolution/constants.ts"],"mappings":";;;;;;IAAkBA,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,0BAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAvBA,uBAAuB;EAAA,OAAvBA,uBAAuB;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useExampleSolution = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _effectorReact = require("effector-react");
|
|
9
|
+
var _constants = require("../constants.js");
|
|
10
|
+
const ANIMATION_DELAY = 600;
|
|
11
|
+
const useExampleSolution = ({
|
|
12
|
+
model,
|
|
13
|
+
payload,
|
|
14
|
+
cacheKey
|
|
15
|
+
}) => {
|
|
16
|
+
const exampleSolutionsCache = (0, _effectorReact.useUnit)(model.cache.$state);
|
|
17
|
+
const [result, setResult] = (0, _react.useState)(null);
|
|
18
|
+
const [status, setStatus] = (0, _react.useState)(_constants.ExampleSolutionStatuses.LOADING);
|
|
19
|
+
(0, _react.useEffect)(() => {
|
|
20
|
+
let timer = null;
|
|
21
|
+
const fetchExampleSolution = async () => {
|
|
22
|
+
try {
|
|
23
|
+
if (exampleSolutionsCache[cacheKey]) {
|
|
24
|
+
setResult(exampleSolutionsCache[cacheKey]);
|
|
25
|
+
setStatus(_constants.ExampleSolutionStatuses.CACHE);
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
const startTime = Date.now();
|
|
29
|
+
const response = await model.api.generateExampleSolutionFx(payload);
|
|
30
|
+
setResult(response);
|
|
31
|
+
model.cache.addExampleSolution({
|
|
32
|
+
cacheKey,
|
|
33
|
+
response
|
|
34
|
+
});
|
|
35
|
+
const elapsedTime = Date.now() - startTime;
|
|
36
|
+
if (elapsedTime >= ANIMATION_DELAY) {
|
|
37
|
+
setStatus(_constants.ExampleSolutionStatuses.DONE_DATA);
|
|
38
|
+
} else {
|
|
39
|
+
timer = setTimeout(() => {
|
|
40
|
+
setStatus(_constants.ExampleSolutionStatuses.DONE_DATA);
|
|
41
|
+
}, ANIMATION_DELAY - elapsedTime);
|
|
42
|
+
}
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error('Failed to fetch example solution:', error);
|
|
45
|
+
setStatus(_constants.ExampleSolutionStatuses.DONE_DATA);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
fetchExampleSolution();
|
|
49
|
+
return () => {
|
|
50
|
+
if (timer) {
|
|
51
|
+
clearTimeout(timer);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
}, []);
|
|
55
|
+
return {
|
|
56
|
+
result,
|
|
57
|
+
status
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
exports.useExampleSolution = useExampleSolution;
|
|
61
|
+
//# sourceMappingURL=useExampleSolution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_effectorReact","_constants","ANIMATION_DELAY","useExampleSolution","model","payload","cacheKey","exampleSolutionsCache","useUnit","cache","$state","result","setResult","useState","status","setStatus","ExampleSolutionStatuses","LOADING","useEffect","timer","fetchExampleSolution","CACHE","startTime","Date","now","response","api","generateExampleSolutionFx","addExampleSolution","elapsedTime","DONE_DATA","setTimeout","error","console","clearTimeout","exports"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/hooks/useExampleSolution.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAEA,IAAAE,UAAA,GAAAF,OAAA;AAEA,MAAMG,eAAe,GAAG,GAAG;AAOpB,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,KAAK;EACLC,OAAO;EACPC;AAC0B,CAAC,KAA+B;EAC1D,MAAMC,qBAAqB,GAAG,IAAAC,sBAAO,EAACJ,KAAK,CAACK,KAAK,CAACC,MAAM,CAAC;EACzD,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAC,eAAQ,EAAiC,IAAI,CAAC;EAC1E,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAF,eAAQ,EAA0BG,kCAAuB,CAACC,OAAO,CAAC;EAE9F,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAIC,KAA4B,GAAG,IAAI;IAEvC,MAAMC,oBAAoB,GAAG,MAAAA,CAAA,KAAY;MACvC,IAAI;QACF,IAAIb,qBAAqB,CAACD,QAAQ,CAAC,EAAE;UACnCM,SAAS,CAACL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