@magmamath/students-features 0.6.14-rc.9 → 0.6.15
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 +59 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/Alternatives.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js +99 -0
- package/dist/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +4 -7
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/{Chat/Chat.js → ChatMessages/ChatbotMessages.js} +9 -12
- package/dist/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Chatbot.js +3 -5
- package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +1 -6
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/chatbot/index.js +0 -7
- package/dist/commonjs/features/chatbot/index.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js +3 -37
- package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js +10 -31
- package/dist/commonjs/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js +0 -3
- package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/commonjs/features/chatbot/types/model.types.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/ExampleSolutionModal.js +1 -3
- package/dist/commonjs/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js +12 -9
- package/dist/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js +7 -7
- package/dist/commonjs/features/exampleSolution/components/QuestionSection.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js +55 -29
- package/dist/commonjs/features/exampleSolution/components/SolutionSection.js.map +1 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js +3 -1
- package/dist/commonjs/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js +6 -4
- package/dist/commonjs/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +1 -1
- package/dist/commonjs/shared/translation/localization/en.json +1 -1
- package/dist/commonjs/shared/translation/localization/gb.json +1 -1
- package/dist/commonjs/shared/translation/localization/sct.json +2 -2
- package/dist/commonjs/shared/translation/localization/sw.json +3 -3
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js +53 -0
- package/dist/module/features/chatbot/components/Alternatives/Alternatives.js.map +1 -0
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js +92 -0
- package/dist/module/features/chatbot/components/Alternatives/HelpRequestOption.js.map +1 -0
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +4 -7
- package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
- package/dist/module/features/chatbot/components/{Chat/Chat.js → ChatMessages/ChatbotMessages.js} +7 -10
- package/dist/module/features/chatbot/components/ChatMessages/ChatbotMessages.js.map +1 -0
- package/dist/module/features/chatbot/components/Chatbot.js +3 -5
- package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +0 -5
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/chatbot/index.js +0 -1
- package/dist/module/features/chatbot/index.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotModel.js +3 -37
- package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js +10 -31
- package/dist/module/features/chatbot/model/ChatBotThreadManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatbotApi.js +0 -3
- package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
- package/dist/module/features/chatbot/types/model.types.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/ExampleSolutionModal.js +1 -3
- package/dist/module/features/exampleSolution/ExampleSolutionModal.js.map +1 -1
- package/dist/module/features/exampleSolution/assets/grid.webp +0 -0
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js +12 -9
- package/dist/module/features/exampleSolution/components/ExampleSolutionModalContent.js.map +1 -1
- package/dist/module/features/exampleSolution/components/QuestionSection.js +9 -9
- package/dist/module/features/exampleSolution/components/QuestionSection.js.map +1 -1
- package/dist/module/features/exampleSolution/components/SolutionSection.js +57 -31
- package/dist/module/features/exampleSolution/components/SolutionSection.js.map +1 -1
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js +3 -1
- package/dist/module/features/exampleSolution/model/ExampleSolution.model.js.map +1 -1
- package/dist/module/features/formulaSheet/components/FormulaSheet.js +6 -4
- package/dist/module/features/formulaSheet/components/FormulaSheet.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +1 -1
- package/dist/module/shared/translation/localization/en.json +1 -1
- package/dist/module/shared/translation/localization/gb.json +1 -1
- package/dist/module/shared/translation/localization/sct.json +2 -2
- package/dist/module/shared/translation/localization/sw.json +3 -3
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts +11 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +10 -0
- package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/{module/features/chatbot/components/Chat/Chat.d.ts → commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts} +2 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -0
- 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/constants.d.ts +0 -5
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts +0 -1
- package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +1 -5
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts +2 -5
- package/dist/typescript/commonjs/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/model/ChatbotApi.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +4 -21
- package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +1 -10
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -18
- package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +5 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts +2 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/QuestionSection.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/components/SolutionSection.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts +3 -2
- package/dist/typescript/commonjs/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts +2 -1
- package/dist/typescript/commonjs/features/exampleSolution/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts +11 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/Alternatives.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts +10 -0
- package/dist/typescript/module/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
- package/dist/typescript/{commonjs/features/chatbot/components/Chat/Chat.d.ts → module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts} +2 -4
- package/dist/typescript/module/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map +1 -0
- 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/constants.d.ts +0 -5
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/index.d.ts +0 -1
- package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +1 -5
- package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts +2 -5
- package/dist/typescript/module/features/chatbot/model/ChatBotThreadManager.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/model/ChatbotApi.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts +4 -21
- package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +1 -10
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -18
- package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/ExampleSolutionModal.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts +5 -1
- package/dist/typescript/module/features/exampleSolution/components/ExampleSolutionModalContent.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts +2 -1
- package/dist/typescript/module/features/exampleSolution/components/QuestionSection.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/components/SolutionSection.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts +3 -2
- package/dist/typescript/module/features/exampleSolution/model/ExampleSolution.model.d.ts.map +1 -1
- package/dist/typescript/module/features/exampleSolution/types.d.ts +2 -1
- package/dist/typescript/module/features/exampleSolution/types.d.ts.map +1 -1
- package/dist/typescript/module/features/formulaSheet/components/FormulaSheet.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/chatbot/components/Alternatives/Alternatives.tsx +60 -0
- package/src/features/chatbot/components/Alternatives/HelpRequestOption.tsx +91 -0
- package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +2 -6
- package/src/features/chatbot/components/{Chat/Chat.tsx → ChatMessages/ChatbotMessages.tsx} +6 -10
- package/src/features/chatbot/components/Chatbot.tsx +2 -6
- package/src/features/chatbot/constants.ts +0 -7
- package/src/features/chatbot/index.ts +0 -2
- package/src/features/chatbot/model/ChatBotModel.ts +27 -71
- package/src/features/chatbot/model/ChatBotThreadManager.ts +9 -38
- package/src/features/chatbot/model/ChatbotApi.ts +0 -2
- package/src/features/chatbot/types/api.types.ts +4 -24
- package/src/features/chatbot/types/model.types.ts +0 -15
- package/src/features/chatbot/types/units.types.ts +0 -22
- package/src/features/exampleSolution/ExampleSolutionModal.tsx +1 -7
- package/src/features/exampleSolution/assets/grid.webp +0 -0
- package/src/features/exampleSolution/components/ExampleSolutionModalContent.tsx +16 -10
- package/src/features/exampleSolution/components/QuestionSection.tsx +11 -7
- package/src/features/exampleSolution/components/SolutionSection.tsx +72 -29
- package/src/features/exampleSolution/model/ExampleSolution.model.ts +5 -2
- package/src/features/exampleSolution/types.ts +2 -1
- package/src/features/formulaSheet/components/FormulaSheet.tsx +7 -4
- package/src/shared/translation/localization/ca.json +1 -1
- package/src/shared/translation/localization/en.json +1 -1
- package/src/shared/translation/localization/gb.json +1 -1
- package/src/shared/translation/localization/sct.json +2 -2
- package/src/shared/translation/localization/sw.json +3 -3
- package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +0 -53
- package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOption.js +0 -39
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOption.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.js +0 -38
- package/dist/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js +0 -140
- package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +0 -142
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +0 -44
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +0 -1
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.js +0 -105
- package/dist/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +0 -1
- package/dist/commonjs/features/exampleSolution/assets/grid.png +0 -0
- package/dist/module/features/chatbot/components/Chat/Chat.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +0 -47
- package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/InputOption.js +0 -34
- package/dist/module/features/chatbot/components/ChatInput/InputOption.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.js +0 -32
- package/dist/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js +0 -132
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js +0 -134
- package/dist/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js +0 -38
- package/dist/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.js.map +0 -1
- package/dist/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.js +0 -97
- package/dist/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.js.map +0 -1
- package/dist/module/features/exampleSolution/assets/grid.png +0 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOption.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOption.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts +0 -4
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts +0 -18
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +0 -10
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +0 -11
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts +0 -10
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOption.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOption.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts +0 -4
- package/dist/typescript/module/features/chatbot/components/ChatInput/InputOptionWithTextArea.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts +0 -18
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts +0 -10
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/ChatTextInput.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts +0 -11
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.d.ts.map +0 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts +0 -10
- package/dist/typescript/module/features/chatbot/components/ChatInput/freeText/SendMessageButton.d.ts.map +0 -1
- package/src/features/chatbot/components/ChatInput/ChatInput.tsx +0 -56
- package/src/features/chatbot/components/ChatInput/InputOption.tsx +0 -29
- package/src/features/chatbot/components/ChatInput/InputOptionWithTextArea.tsx +0 -27
- package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -160
- package/src/features/chatbot/components/ChatInput/freeText/ChatTextInput.tsx +0 -133
- package/src/features/chatbot/components/ChatInput/freeText/FreeTextInputBlock.tsx +0 -42
- package/src/features/chatbot/components/ChatInput/freeText/SendMessageButton.tsx +0 -110
- package/src/features/exampleSolution/assets/grid.png +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ThreadItem","CHAT_BOT_MODEL_DEFAULTS","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","
|
|
1
|
+
{"version":3,"names":["ThreadItem","CHAT_BOT_MODEL_DEFAULTS","ChatBotThreadManager","api","drawBoardAdapter","threads","Map","currentKey","constructor","messagesLimit","THREAD_MESSAGES_LIMIT","messages","defaultMessages","getThreadItem","key","existingThreadItem","get","threadItem","set","content","getContent","setValidationKey","validationKey","text","setText","strokes","length","setStrokes","setDrawBoardAdapter","adapter","postMessage","problemAnswer","problem","answer","language","imageAltText","Error","result","getHint","getNextHintProps","correctAnswer","problemDescription","userAnswer","history","push","message","nextOptions","anotherHintOption","options","endMessage","threadId","id","reset","delete","clear","setMessagesLimit","limit","setApi","setCurrentKey"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatBotThreadManager.ts"],"mappings":";;AAAA,SAASA,UAAU,QAAQ,iBAAc;AAQzC,SAASC,uBAAuB,QAAQ,gBAAa;AAarD,OAAO,MAAMC,oBAAoB,CAAC;EACxBC,GAAG,GAA4B,IAAI;EACnCC,gBAAgB,GAAiC,IAAI;EAC5CC,OAAO,GAAG,IAAIC,GAAG,CAAqB,CAAC;EAGhDC,UAAU,GAAG,EAAE;EAIhBC,WAAWA,CAAC;IACjBJ,gBAAgB;IAChBD,GAAG;IACHM,aAAa,GAAGR,uBAAuB,CAACS,qBAAqB;IAC7DC;EACyB,CAAC,EAAE;IAC5B,IAAIR,GAAG,EAAE,IAAI,CAACA,GAAG,GAAGA,GAAG;IACvB,IAAI,CAACC,gBAAgB,GAAGA,gBAAgB,IAAI,IAAI;IAChD,IAAI,CAACK,aAAa,GAAGA,aAAa;IAClC,IAAI,CAACG,eAAe,GAAGD,QAAQ;EACjC;EAEA,MAAcE,aAAaA,CAAA,EAAG;IAC5B,MAAMC,GAAG,GAAG,IAAI,CAACP,UAAU;IAC3B,MAAMQ,kBAAkB,GAAG,IAAI,CAACV,OAAO,CAACW,GAAG,CAACF,GAAG,CAAC;IAChD,IAAIC,kBAAkB,EAAE,OAAOA,kBAAkB;IACjD,MAAME,UAAU,GAAG,IAAIjB,UAAU,CAAC,CAAC;IACnC,IAAI,CAACK,OAAO,CAACa,GAAG,CAACJ,GAAG,EAAEG,UAAU,CAAC;IACjC,IAAI,CAAC,IAAI,CAACb,gBAAgB,EAAE,OAAOa,UAAU;IAC7C,IAAI;MACF,MAAME,OAAO,GAAG,MAAM,IAAI,CAACf,gBAAgB,CAACgB,UAAU,CAAC,CAAC;MACxD,IAAI,CAACD,OAAO,EAAE,OAAOF,UAAU;MAC/BA,UAAU,CAACI,gBAAgB,CAACF,OAAO,CAACG,aAAa,CAAC;MAClD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CAAC;EAEMnC,GAAGA,CAACF,GAAW,EAAE;IACtB,OAAO,IAAI,CAACT,OAAO,CAACW,GAAG,CAACF,GAAG,CAAC;EAC9B;EAEOsC,KAAKA,CAACtC,GAAY,EAAE;IACzB,IAAI,OAAOA,GAAG,KAAK,QAAQ,EAAE;MAC3B,IAAI,CAACT,OAAO,CAACgD,MAAM,CAACvC,GAAG,CAAC;MACxB;IACF;IACA,IAAI,CAACT,OAAO,CAACiD,KAAK,CAAC,CAAC;EACtB;EAEOC,gBAAgBA,CAACC,KAAa,EAAE;IACrC,IAAI,CAAC/C,aAAa,GAAG+C,KAAK;EAC5B;EAEOC,MAAMA,CAACtD,GAAqB,EAAE;IACnC,IAAI,CAACA,GAAG,GAAGA,GAAG;IACd,OAAO,IAAI;EACb;EAEOuD,aAAaA,CAAC5C,GAAW,EAAE;IAChC,IAAI,CAACP,UAAU,GAAGO,GAAG;EACvB;AACF","ignoreList":[]}
|
|
@@ -4,10 +4,7 @@ import { createEffect } from 'effector';
|
|
|
4
4
|
import { createControllerEffect } from "../../../lib/effector/index.js";
|
|
5
5
|
import { replaceKatexSyntax } from "../helpers.js";
|
|
6
6
|
export class ChatbotAPI {
|
|
7
|
-
// public readonly sendMessageFx
|
|
8
|
-
|
|
9
7
|
constructor(api) {
|
|
10
|
-
// this.sendMessageFx = createControllerEffect(api.sendMessage)
|
|
11
8
|
this.spotErrorFx = createControllerEffect(api.spotError);
|
|
12
9
|
this.postMessageFx = createControllerEffect(api.postMessage);
|
|
13
10
|
this.getAlternativesFx = createEffect(api.getAlternatives);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["createEffect","createControllerEffect","replaceKatexSyntax","ChatbotAPI","constructor","api","spotErrorFx","spotError","postMessageFx","postMessage","getAlternativesFx","getAlternatives","translateTextFx","payload","response","postTranslateText","text","data","translations","map","translation","translatedText","textToSpeechTextFx","postTextToSpeech"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatbotApi.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,UAAU;AACvC,SAASC,sBAAsB,QAAQ,gCAAuB;AAG9D,SAASC,kBAAkB,QAAQ,eAAY;AAE/C,OAAO,MAAMC,UAAU,CAAC;
|
|
1
|
+
{"version":3,"names":["createEffect","createControllerEffect","replaceKatexSyntax","ChatbotAPI","constructor","api","spotErrorFx","spotError","postMessageFx","postMessage","getAlternativesFx","getAlternatives","translateTextFx","payload","response","postTranslateText","text","data","translations","map","translation","translatedText","textToSpeechTextFx","postTextToSpeech"],"sourceRoot":"../../../../../src","sources":["features/chatbot/model/ChatbotApi.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,UAAU;AACvC,SAASC,sBAAsB,QAAQ,gCAAuB;AAG9D,SAASC,kBAAkB,QAAQ,eAAY;AAE/C,OAAO,MAAMC,UAAU,CAAC;EAQtBC,WAAWA,CAACC,GAAuB,EAAE;IACnC,IAAI,CAACC,WAAW,GAAGL,sBAAsB,CAACI,GAAG,CAACE,SAAS,CAAC;IACxD,IAAI,CAACC,aAAa,GAAGP,sBAAsB,CAACI,GAAG,CAACI,WAAW,CAAC;IAC5D,IAAI,CAACC,iBAAiB,GAAGV,YAAY,CAACK,GAAG,CAACM,eAAe,CAAC;IAC1D,IAAI,CAACC,eAAe,GAAGZ,YAAY,CACjC,MAAOa,OAA+B,IAAuC;MAC3E,MAAMC,QAAQ,GAAG,MAAMT,GAAG,CAACU,iBAAiB,CAAC;QAC3C,GAAGF,OAAO;QACVG,IAAI,EAAEd,kBAAkB,CAACW,OAAO,CAACG,IAAI;MACvC,CAAC,CAAC;MAEF,OAAO;QACL,GAAGF,QAAQ;QACXG,IAAI,EAAE;UACJ,GAAGH,QAAQ,CAACG,IAAI;UAChBC,YAAY,EAAEJ,QAAQ,CAACG,IAAI,CAACC,YAAY,CAACC,GAAG,CAAEC,WAAW,KAAM;YAC7D,GAAGA,WAAW;YACdC,cAAc,EAAEnB,kBAAkB,CAAC,CAACkB,WAAW,CAACC,cAAc,CAAC,EAAE,IAAI,CAAC,CAAC,CAAC;UAC1E,CAAC,CAAC;QACJ;MACF,CAAC;IACH,CACF,CAAC;IACD,IAAI,CAACC,kBAAkB,GAAGtB,YAAY,CAACK,GAAG,CAACkB,gBAAgB,CAAC;EAC9D;AACF","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"names":["MessageVariant"],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/model.types.ts"],"mappings":";;AAwEA,WAAYA,cAAc,0BAAdA,cAAc;EAAdA,cAAc;EAAdA,cAAc;EAAA,OAAdA,cAAc;AAAA","ignoreList":[]}
|
|
@@ -1,8 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
export let ChatInputMode = /*#__PURE__*/function (ChatInputMode) {
|
|
4
|
-
ChatInputMode[ChatInputMode["FreeText"] = 1] = "FreeText";
|
|
5
|
-
ChatInputMode[ChatInputMode["Option"] = 2] = "Option";
|
|
6
|
-
return ChatInputMode;
|
|
7
|
-
}({});
|
|
8
2
|
//# sourceMappingURL=units.types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["features/chatbot/types/units.types.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -17,9 +17,7 @@ export const ExampleSolutionModal = ({
|
|
|
17
17
|
},
|
|
18
18
|
onClose: closeModal,
|
|
19
19
|
content: /*#__PURE__*/_jsx(ExampleSolutionModalContent, {
|
|
20
|
-
|
|
21
|
-
payload: params.payload,
|
|
22
|
-
cacheKey: params.cacheKey
|
|
20
|
+
params: params
|
|
23
21
|
})
|
|
24
22
|
});
|
|
25
23
|
//# sourceMappingURL=ExampleSolutionModal.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","BaseModal","SPACING","ExampleSolutionModalContent","jsx","_jsx","ExampleSolutionModal","modal","closeModal","params","style","container","paddingHorizontal","onClose","content"
|
|
1
|
+
{"version":3,"names":["React","BaseModal","SPACING","ExampleSolutionModalContent","jsx","_jsx","ExampleSolutionModal","modal","closeModal","params","style","container","paddingHorizontal","onClose","content"],"sourceRoot":"../../../../src","sources":["features/exampleSolution/ExampleSolutionModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,EAAEC,OAAO,QAAQ,4BAA4B;AAC/D,SAASC,2BAA2B,QAAQ,6CAA0C;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUtF,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EACnCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACM,CAAC,kBACnCJ,IAAA,CAACJ,SAAS;EACRS,KAAK,EAAE;IACLC,SAAS,EAAE;MAAEC,iBAAiB,EAAEV,OAAO,CAAC,GAAG;IAAE;EAC/C,CAAE;EACFW,OAAO,EAAEL,UAAW;EACpBM,OAAO,eAAET,IAAA,CAACF,2BAA2B;IAACM,MAAM,EAAEA;EAAO,CAAE;AAAE,CAC1D,CACF","ignoreList":[]}
|
|
Binary file
|
|
@@ -12,9 +12,11 @@ import { SolutionSection } from "./SolutionSection.js";
|
|
|
12
12
|
import { useExampleSolution } from "../hooks/useExampleSolution.js";
|
|
13
13
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
14
|
export const ExampleSolutionModalContent = ({
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
params: {
|
|
16
|
+
model,
|
|
17
|
+
payload,
|
|
18
|
+
cacheKey
|
|
19
|
+
}
|
|
18
20
|
}) => {
|
|
19
21
|
const {
|
|
20
22
|
result,
|
|
@@ -38,7 +40,8 @@ export const ExampleSolutionModalContent = ({
|
|
|
38
40
|
style: styles.content,
|
|
39
41
|
children: [/*#__PURE__*/_jsx(QuestionSection, {
|
|
40
42
|
status: status,
|
|
41
|
-
question: result?.question
|
|
43
|
+
question: result?.question,
|
|
44
|
+
renderKatexComponent: model.renderKatexComponent
|
|
42
45
|
}), /*#__PURE__*/_jsx(SolutionSection, {
|
|
43
46
|
status: status,
|
|
44
47
|
answer: result?.answer
|
|
@@ -55,7 +58,7 @@ export const ExampleSolutionModalContent = ({
|
|
|
55
58
|
const styles = StyleSheet.create({
|
|
56
59
|
container: {
|
|
57
60
|
width: 880,
|
|
58
|
-
|
|
61
|
+
maxHeight: 593
|
|
59
62
|
},
|
|
60
63
|
content: {
|
|
61
64
|
flex: 1,
|
|
@@ -72,8 +75,8 @@ const styles = StyleSheet.create({
|
|
|
72
75
|
},
|
|
73
76
|
lavaIconContainer: {
|
|
74
77
|
position: 'absolute',
|
|
75
|
-
bottom: -
|
|
76
|
-
right: -
|
|
78
|
+
bottom: -24,
|
|
79
|
+
right: -26
|
|
77
80
|
},
|
|
78
81
|
loaderContainer: {
|
|
79
82
|
paddingTop: 34,
|
|
@@ -84,8 +87,8 @@ const styles = StyleSheet.create({
|
|
|
84
87
|
},
|
|
85
88
|
messageBlock: {
|
|
86
89
|
position: 'absolute',
|
|
87
|
-
right:
|
|
88
|
-
bottom: -
|
|
90
|
+
right: 58,
|
|
91
|
+
bottom: -12
|
|
89
92
|
}
|
|
90
93
|
});
|
|
91
94
|
//# sourceMappingURL=ExampleSolutionModalContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","React","COLORS","HeadingVariants","SPACING","Typography","useUnit","$localization","MessageBlock","LavaIcon","QuestionSection","SolutionSection","useExampleSolution","jsx","_jsx","jsxs","_jsxs","ExampleSolutionModalContent","model","payload","cacheKey","result","status","localization","style","styles","container","children","align","variant","H2","color","NEUTRAL_9","exampleSolution","content","question","answer","messageBlock","lavaIconContainer","create","width","
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","React","COLORS","HeadingVariants","SPACING","Typography","useUnit","$localization","MessageBlock","LavaIcon","QuestionSection","SolutionSection","useExampleSolution","jsx","_jsx","jsxs","_jsxs","ExampleSolutionModalContent","params","model","payload","cacheKey","result","status","localization","style","styles","container","children","align","variant","H2","color","NEUTRAL_9","exampleSolution","content","question","renderKatexComponent","answer","messageBlock","lavaIconContainer","create","width","maxHeight","flex","flexDirection","marginTop","gap","solutionContainer","overflow","borderRadius","borderWidth","borderColor","NEUTRAL_5","position","bottom","right","loaderContainer","paddingTop","height","backgroundColor","NEUTRAL_1"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/ExampleSolutionModalContent.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,eAAe,EAAEC,OAAO,EAAEC,UAAU,QAAQ,4BAA4B;AACzF,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,aAAa,QAAQ,sCAA6B;AAC3D,SAASC,YAAY,QAAQ,mBAAgB;AAC7C,SAASC,QAAQ,QAAQ,eAAY;AAErC,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,eAAe,QAAQ,sBAAmB;AACnD,SAASC,kBAAkB,QAAQ,gCAA6B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAMhE,OAAO,MAAMC,2BAA2B,GAAGA,CAAC;EAC1CC,MAAM,EAAE;IAAEC,KAAK;IAAEC,OAAO;IAAEC;EAAS;AACH,CAAC,KAAK;EACtC,MAAM;IAAEC,MAAM;IAAEC;EAAO,CAAC,GAAGX,kBAAkB,CAAC;IAAEO,KAAK;IAAEC,OAAO;IAAEC;EAAS,CAAC,CAAC;EAC3E,MAAMG,YAAY,GAAGlB,OAAO,CAACC,aAAa,CAAC;EAE3C,oBACES,KAAA,CAAChB,IAAI;IAACyB,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5Bd,IAA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AAM,CAACmD;EACtB,CAAC;EACDb,iBAAiB,EAAE;IACjBc,QAAQ,EAAE,UAAU;IACpBC,MAAM,EAAE,CAAC,EAAE;IACXC,KAAK,EAAE,CAAC;EACV,CAAC;EACDC,eAAe,EAAE;IACfC,UAAU,EAAE,EAAE;IACdJ,QAAQ,EAAE,UAAU;IACpBZ,KAAK,EAAE,MAAM;IACbiB,MAAM,EAAE,MAAM;IACdC,eAAe,EAAE1D,MAAM,CAAC2D;EAC1B,CAAC;EACDtB,YAAY,EAAE;IACZe,QAAQ,EAAE,UAAU;IACpBE,KAAK,EAAE,EAAE;IACTD,MAAM,EAAE,CAAC;EACX;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { StyleSheet, View
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { COLORS, Loader, LoaderColor, SPACING
|
|
5
|
+
import { COLORS, Loader, LoaderColor, SPACING } from '@magmamath/react-native-ui';
|
|
6
6
|
import Animated, { FadeOut } from 'react-native-reanimated';
|
|
7
7
|
import { ExampleSolutionStatuses } from "../constants.js";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
9
|
export const QuestionSection = ({
|
|
10
10
|
question,
|
|
11
|
-
status
|
|
11
|
+
status,
|
|
12
|
+
renderKatexComponent
|
|
12
13
|
}) => {
|
|
13
14
|
return /*#__PURE__*/_jsxs(View, {
|
|
14
15
|
style: styles.container,
|
|
15
|
-
children: [/*#__PURE__*/_jsx(
|
|
16
|
-
style: styles.
|
|
17
|
-
children:
|
|
18
|
-
children: question
|
|
19
|
-
})
|
|
16
|
+
children: [question && /*#__PURE__*/_jsx(View, {
|
|
17
|
+
style: styles.katexContainer,
|
|
18
|
+
children: renderKatexComponent(question)
|
|
20
19
|
}), status === ExampleSolutionStatuses.LOADING && /*#__PURE__*/_jsx(Animated.View, {
|
|
21
20
|
exiting: FadeOut,
|
|
22
21
|
style: styles.loaderContainer,
|
|
@@ -31,12 +30,13 @@ const styles = StyleSheet.create({
|
|
|
31
30
|
container: {
|
|
32
31
|
flex: 1
|
|
33
32
|
},
|
|
34
|
-
|
|
33
|
+
katexContainer: {
|
|
35
34
|
flex: 1
|
|
36
35
|
},
|
|
37
36
|
loaderContainer: {
|
|
38
37
|
paddingTop: 34,
|
|
39
38
|
position: 'absolute',
|
|
39
|
+
zIndex: 100,
|
|
40
40
|
width: '100%',
|
|
41
41
|
height: '100%',
|
|
42
42
|
backgroundColor: COLORS.NEUTRAL_1,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","React","COLORS","Loader","LoaderColor","SPACING","Animated","FadeOut","ExampleSolutionStatuses","jsx","_jsx","jsxs","_jsxs","QuestionSection","question","status","renderKatexComponent","style","styles","container","children","katexContainer","LOADING","exiting","loaderContainer","size","color","BLUE","create","flex","paddingTop","position","zIndex","width","height","backgroundColor","NEUTRAL_1","justifyContent","alignItems","errorContainer","padding","errorText","PRIMARY_RED","textAlign"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/QuestionSection.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,MAAM,EAAEC,WAAW,EAAEC,OAAO,QAAQ,4BAA4B;AACjF,OAAOC,QAAQ,IAAIC,OAAO,QAAQ,yBAAyB;AAC3D,SAASC,uBAAuB,QAAQ,iBAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQtD,OAAO,MAAMC,eAAe,GAAGA,CAAC;EAC9BC,QAAQ;EACRC,MAAM;EACNC;AACoB,CAAC,KAAK;EAC1B,oBACEJ,KAAA,CAACZ,IAAI;IAACiB,KAAK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@@ -1,67 +1,93 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { StyleSheet, View, Image,
|
|
3
|
+
import { StyleSheet, View, Image, ImageBackground, ScrollView, useWindowDimensions } from 'react-native';
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { COLORS, IS_WEB, SPACING } from '@magmamath/react-native-ui';
|
|
6
6
|
import Animated, { FadeIn } from 'react-native-reanimated';
|
|
7
7
|
import { ExampleSolutionStatuses } from "../constants.js";
|
|
8
|
-
import gridImage from '../assets/grid.
|
|
9
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
import gridImage from '../assets/grid.webp';
|
|
9
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
|
+
const CONTAINER_SIZES = {
|
|
11
|
+
width: 489,
|
|
12
|
+
height: 543
|
|
13
|
+
};
|
|
14
|
+
const BORDER_WIDTH = 1;
|
|
15
|
+
const CONTAINER_HEIGHT_OFFSET = 160;
|
|
10
16
|
const gridImagePath = !IS_WEB ? Image.resolveAssetSource(gridImage).uri : gridImage;
|
|
11
17
|
export const SolutionSection = ({
|
|
12
18
|
answer,
|
|
13
19
|
status
|
|
14
20
|
}) => {
|
|
21
|
+
const {
|
|
22
|
+
height
|
|
23
|
+
} = useWindowDimensions();
|
|
15
24
|
const shouldShowAnswer = answer && (status === ExampleSolutionStatuses.DONE_DATA || status === ExampleSolutionStatuses.CACHE);
|
|
16
|
-
return /*#__PURE__*/
|
|
17
|
-
style: styles.container,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
},
|
|
22
|
-
style: [styles.gridImage, IS_WEB && styles.gridImageWeb]
|
|
23
|
-
}), shouldShowAnswer && /*#__PURE__*/_jsx(Animated.ScrollView, {
|
|
25
|
+
return /*#__PURE__*/_jsx(View, {
|
|
26
|
+
style: [styles.container, IS_WEB && {
|
|
27
|
+
maxHeight: height - CONTAINER_HEIGHT_OFFSET
|
|
28
|
+
}],
|
|
29
|
+
children: /*#__PURE__*/_jsx(ScrollView, {
|
|
24
30
|
style: styles.solutionScroll,
|
|
25
31
|
contentContainerStyle: styles.solutionScrollContent,
|
|
26
|
-
|
|
27
|
-
children: /*#__PURE__*/_jsx(
|
|
28
|
-
|
|
29
|
-
|
|
32
|
+
bounces: true,
|
|
33
|
+
children: IS_WEB ? /*#__PURE__*/_jsx(ImageBackground, {
|
|
34
|
+
resizeMode: "repeat",
|
|
35
|
+
style: [styles.gridImageWeb],
|
|
36
|
+
source: {
|
|
37
|
+
uri: gridImagePath
|
|
38
|
+
},
|
|
39
|
+
children: shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
|
|
40
|
+
entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
|
|
41
|
+
style: styles.solutionText,
|
|
42
|
+
children: answer
|
|
43
|
+
})
|
|
44
|
+
}) : /*#__PURE__*/_jsxs(_Fragment, {
|
|
45
|
+
children: [/*#__PURE__*/_jsx(ImageBackground, {
|
|
46
|
+
resizeMode: "repeat",
|
|
47
|
+
style: styles.gridImageRn,
|
|
48
|
+
source: {
|
|
49
|
+
uri: gridImagePath
|
|
50
|
+
}
|
|
51
|
+
}), shouldShowAnswer && /*#__PURE__*/_jsx(Animated.Text, {
|
|
52
|
+
entering: status === 'cache' ? undefined : FadeIn.delay(1000).duration(500),
|
|
53
|
+
style: styles.solutionText,
|
|
54
|
+
children: answer
|
|
55
|
+
})]
|
|
30
56
|
})
|
|
31
|
-
})
|
|
57
|
+
})
|
|
32
58
|
});
|
|
33
59
|
};
|
|
34
60
|
const styles = StyleSheet.create({
|
|
35
61
|
container: {
|
|
36
|
-
width:
|
|
62
|
+
width: CONTAINER_SIZES.width,
|
|
63
|
+
height: CONTAINER_SIZES.height,
|
|
37
64
|
overflow: 'hidden',
|
|
38
65
|
borderRadius: 8,
|
|
39
|
-
borderWidth:
|
|
66
|
+
borderWidth: BORDER_WIDTH,
|
|
40
67
|
borderColor: COLORS.NEUTRAL_5
|
|
41
68
|
},
|
|
42
|
-
|
|
69
|
+
gridImageRn: {
|
|
70
|
+
top: -327,
|
|
43
71
|
width: '100%',
|
|
44
|
-
height: '
|
|
45
|
-
|
|
46
|
-
aspectRatio: 28 / 8
|
|
72
|
+
height: '150%',
|
|
73
|
+
position: 'absolute'
|
|
47
74
|
},
|
|
48
75
|
gridImageWeb: {
|
|
49
|
-
transform: [{
|
|
50
|
-
scale: 3.5
|
|
51
|
-
}]
|
|
52
|
-
},
|
|
53
|
-
solutionScroll: {
|
|
54
|
-
position: 'absolute',
|
|
55
76
|
width: '100%',
|
|
56
77
|
height: '100%'
|
|
57
78
|
},
|
|
79
|
+
solutionScroll: {
|
|
80
|
+
flex: 1
|
|
81
|
+
},
|
|
58
82
|
solutionScrollContent: {
|
|
59
|
-
|
|
60
|
-
|
|
83
|
+
minHeight: CONTAINER_SIZES.height - BORDER_WIDTH * 2,
|
|
84
|
+
width: '100%'
|
|
61
85
|
},
|
|
62
86
|
solutionText: {
|
|
63
87
|
fontFamily: 'PlaypenSans-Light',
|
|
64
|
-
fontSize:
|
|
88
|
+
fontSize: 28,
|
|
89
|
+
marginHorizontal: SPACING[800],
|
|
90
|
+
marginVertical: SPACING[400]
|
|
65
91
|
}
|
|
66
92
|
});
|
|
67
93
|
//# sourceMappingURL=SolutionSection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StyleSheet","View","Image","
|
|
1
|
+
{"version":3,"names":["StyleSheet","View","Image","ImageBackground","ScrollView","useWindowDimensions","React","COLORS","IS_WEB","SPACING","Animated","FadeIn","ExampleSolutionStatuses","gridImage","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","CONTAINER_SIZES","width","height","BORDER_WIDTH","CONTAINER_HEIGHT_OFFSET","gridImagePath","resolveAssetSource","uri","SolutionSection","answer","status","shouldShowAnswer","DONE_DATA","CACHE","style","styles","container","maxHeight","children","solutionScroll","contentContainerStyle","solutionScrollContent","bounces","resizeMode","gridImageWeb","source","Text","entering","undefined","delay","duration","solutionText","gridImageRn","create","overflow","borderRadius","borderWidth","borderColor","NEUTRAL_5","top","position","flex","minHeight","fontFamily","fontSize","marginHorizontal","marginVertical"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/components/SolutionSection.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,IAAI,EACJC,KAAK,EACLC,eAAe,EACfC,UAAU,EACVC,mBAAmB,QACd,cAAc;AACrB,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,MAAM,EAAEC,OAAO,QAAQ,4BAA4B;AACpE,OAAOC,QAAQ,IAAIC,MAAM,QAAQ,yBAAyB;AAC1D,SAASC,uBAAuB,QAAQ,iBAAc;AACtD,OAAOC,SAAS,MAAM,qBAAqB;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAO3C,MAAMC,eAAe,GAAG;EACtBC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE;AACV,CAAC;AACD,MAAMC,YAAY,GAAG,CAAC;AACtB,MAAMC,uBAAuB,GAAG,GAAG;AAEnC,MAAMC,aAAa,GAAG,CAACjB,MAAM,GAAGN,KAAK,CAACwB,kBAAkB,CAACb,SAAS,CAAC,CAACc,GAAG,GAAGd,SAAS;AAEnF,OAAO,MAAMe,eAAe,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAA6B,CAAC,KAAK;EAC3E,MAAM;IAAER;EAAO,CAAC,GAAGjB,mBAAmB,CAAC,CAAC;EAExC,MAAM0B,gBAAgB,GACpBF,MAAM,KACLC,MAAM,KAAKlB,uBAAuB,CAACoB,SAAS,IAAIF,MAAM,KAAKlB,uBAAuB,CAACqB,KAAK,CAAC;EAE5F,oBACElB,IAAA,CAACd,IAAI;IAACiC,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAE5B,MAAM,IAAI;MAAE6B,SAA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B,SAAS,EAAE;IACTf,KAAK,EAAED,eAAe,CAACC,KAAK;IAC5BC,MAAM,EAAEF,eAAe,CAACE,MAAM;IAC9BgC,QAAQ,EAAE,QAAQ;IAClBC,YAAY,EAAE,CAAC;IACfC,WAAW,EAAEjC,YAAY;IACzBkC,WAAW,EAAElD,MAAM,CAACmD;EACtB,CAAC;EACDN,WAAW,EAAE;IACXO,GAAG,EAAE,CAAC,GAAG;IACTtC,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE,MAAM;IACdsC,QAAQ,EAAE;EACZ,CAAC;EACDhB,YAAY,EAAE;IACZvB,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV,CAAC;EACDiB,cAAc,EAAE;IACdsB,IAAI,EAAE;EACR,CAAC;EACDpB,qBAAqB,EAAE;IACrBqB,SAAS,EAAE1C,eAAe,CAACE,MAAM,GAAGC,YAAY,GAAG,CAAC;IACpDF,KAAK,EAAE;EACT,CAAC;EACD8B,YAAY,EAAE;IACZY,UAAU,EAAE,mBAAmB;IAC/BC,QAAQ,EAAE,EAAE;IACZC,gBAAgB,EAAExD,OAAO,CAAC,GAAG,CAAC;IAC9ByD,cAAc,EAAEzD,OAAO,CAAC,GAAG;EAC7B;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,12 +6,14 @@ export class ExampleSolutionModel {
|
|
|
6
6
|
cache = new ExampleSolutionCache();
|
|
7
7
|
constructor({
|
|
8
8
|
api,
|
|
9
|
-
errorHandler
|
|
9
|
+
errorHandler,
|
|
10
|
+
renderKatexComponent
|
|
10
11
|
}) {
|
|
11
12
|
this.api = new ExampleSolutionsApi({
|
|
12
13
|
api,
|
|
13
14
|
errorHandler
|
|
14
15
|
});
|
|
16
|
+
this.renderKatexComponent = renderKatexComponent;
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
//# sourceMappingURL=ExampleSolution.model.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ExampleSolutionsApi","ExampleSolutionCache","ExampleSolutionModel","cache","constructor","api","errorHandler"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/model/ExampleSolution.model.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,yBAAsB;AAC1D,SAASC,oBAAoB,QAAQ,2BAAwB;AAE7D,OAAO,MAAMC,oBAAoB,CAAC;EAEhBC,KAAK,GAAG,IAAIF,oBAAoB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"names":["ExampleSolutionsApi","ExampleSolutionCache","ExampleSolutionModel","cache","constructor","api","errorHandler","renderKatexComponent"],"sourceRoot":"../../../../../src","sources":["features/exampleSolution/model/ExampleSolution.model.ts"],"mappings":";;AACA,SAASA,mBAAmB,QAAQ,yBAAsB;AAC1D,SAASC,oBAAoB,QAAQ,2BAAwB;AAE7D,OAAO,MAAMC,oBAAoB,CAAC;EAEhBC,KAAK,GAAG,IAAIF,oBAAoB,CAAC,CAAC;EAIlDG,WAAWA,CAAC;IAAEC,GAAG;IAAEC,YAAY;IAAEC;EAAgD,CAAC,EAAE;IAClF,IAAI,CAACF,GAAG,GAAG,IAAIL,mBAAmB,CAAC;MAAEK,GAAG;MAAEC;IAAa,CAAC,CAAC;IACzD,IAAI,CAACC,oBAAoB,GAAGA,oBAAoB;EAClD;AACF","ignoreList":[]}
|
|
@@ -18,6 +18,10 @@ export const FormulaSheet = /*#__PURE__*/forwardRef(({
|
|
|
18
18
|
const isOpen = useUnit(model.modal.$isOpen);
|
|
19
19
|
const sheetFileBlob = useUnit(model.file.$blob);
|
|
20
20
|
const isRequestPending = useUnit(model.api.getPDFFileBlobFx.pending);
|
|
21
|
+
const onPressHandler = () => {
|
|
22
|
+
model.modal.toggle();
|
|
23
|
+
onPress?.();
|
|
24
|
+
};
|
|
21
25
|
useEffect(() => {
|
|
22
26
|
model.file.setId(fileId ?? null);
|
|
23
27
|
}, [fileId]);
|
|
@@ -28,10 +32,8 @@ export const FormulaSheet = /*#__PURE__*/forwardRef(({
|
|
|
28
32
|
variant: ButtonVariant.SECONDARY,
|
|
29
33
|
colorScheme: buttonColor,
|
|
30
34
|
isActive: isOpen,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
onPress?.();
|
|
34
|
-
},
|
|
35
|
+
delayHoverIn: 0,
|
|
36
|
+
onPressIn: () => onPressHandler(),
|
|
35
37
|
icon: /*#__PURE__*/_jsx(TheoryIcon, {
|
|
36
38
|
color: isOpen ? COLORS.NEUTRAL_1 : undefined,
|
|
37
39
|
size: 20
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRef","useEffect","useUnit","Button","ButtonColor","ButtonSize","ButtonVariant","COLORS","TheoryIcon","LoaderColor","FormulaSheetModal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FormulaSheet","model","fileId","renderer","buttonSize","MEDIUM","buttonColor","BLUE","loaderColor","onPress","style","ref","isOpen","modal","$isOpen","sheetFileBlob","file","$blob","isRequestPending","api","getPDFFileBlobFx","pending","setId","children","size","variant","SECONDARY","colorScheme","isActive","
|
|
1
|
+
{"version":3,"names":["React","forwardRef","useEffect","useUnit","Button","ButtonColor","ButtonSize","ButtonVariant","COLORS","TheoryIcon","LoaderColor","FormulaSheetModal","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","FormulaSheet","model","fileId","renderer","buttonSize","MEDIUM","buttonColor","BLUE","loaderColor","onPress","style","ref","isOpen","modal","$isOpen","sheetFileBlob","file","$blob","isRequestPending","api","getPDFFileBlobFx","pending","onPressHandler","toggle","setId","children","size","variant","SECONDARY","colorScheme","isActive","delayHoverIn","onPressIn","icon","color","NEUTRAL_1","undefined","isLoading","onClose","setIsOpen"],"sourceRoot":"../../../../../src","sources":["features/formulaSheet/components/FormulaSheet.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAaC,SAAS,QAAQ,OAAO;AAC/D,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SACEC,MAAM,EACNC,WAAW,EACXC,UAAU,EACVC,aAAa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KAAMV,cAAc,CAAC,CAAE;MAClCW,IAAI,eAAEtC,IAAA,CAACJ,UAAU;QAAC2C,KAAK,EAAEtB,MAAM,GAAGtB,MAAM,CAAC6C,SAAS,GAAGC,SAAU;QAACV,IAAI,EAAE;MAAG,CAAE,CAAE;MAC7EhB,KAAK,EAAEA;IAAM,CACd,CAAC,EAEDE,MAAM,iBACLjB,IAAA,CAACF,iBAAiB;MAChB4C,SAAS,EAAEnB,gBAAiB;MAC5BV,WAAW,EAAEA,WAAY;MACzB8B,OAAO,EAAEA,CAAA,KAAMrC,KAAK,CAACY,KAAK,CAAC0B,SAAS,CAAC,KAAK,CAAE;MAAAd,QAAA,EAE3CtB,QAAQ,CAACY,aAAa,IAAI,EAAE;IAAC,CACb,CACpB;EAAA,CACD,CAAC;AAEP,CACF,CAAC","ignoreList":[]}
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"time.yearsAgo": "years ago",
|
|
14
14
|
"chat": {
|
|
15
15
|
"anotherHint": "Give me another hint",
|
|
16
|
-
"giveHint": "
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"time.yearsAgo": "years ago",
|
|
14
14
|
"chat": {
|
|
15
15
|
"anotherHint": "Give me another hint",
|
|
16
|
-
"giveHint": "
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"time.yearsAgo": "years ago",
|
|
14
14
|
"chat": {
|
|
15
15
|
"anotherHint": "Give me another hint",
|
|
16
|
-
"giveHint": "
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"time.yearAgo": "year ago",
|
|
13
13
|
"time.yearsAgo": "years ago",
|
|
14
14
|
"chat": {
|
|
15
|
-
"anotherHint": "
|
|
16
|
-
"giveHint": "
|
|
15
|
+
"anotherHint": "Give me another hint",
|
|
16
|
+
"giveHint": "Give me a hint",
|
|
17
17
|
"answerAgain": "Answer again to get another hint!",
|
|
18
18
|
"errorMessage": "Something went wrong! Try again",
|
|
19
19
|
"howCanIHelp": "Hi! Do you want help?",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"time.yearAgo": "år sedan",
|
|
13
13
|
"time.yearsAgo": "år sedan",
|
|
14
14
|
"chat": {
|
|
15
|
-
"anotherHint": "Ge ledtråd",
|
|
16
|
-
"giveHint": "Ge ledtråd",
|
|
15
|
+
"anotherHint": "Ge mig en ledtråd",
|
|
16
|
+
"giveHint": "Ge mig en ledtråd",
|
|
17
17
|
"answerAgain": "Svara igen för att få en till ledtråd!",
|
|
18
18
|
"errorMessage": "Något gick snett! Försök igen",
|
|
19
19
|
"howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"almostThere": "Nästan där"
|
|
26
26
|
},
|
|
27
27
|
"exampleSolution": {
|
|
28
|
-
"exampleSolution": "
|
|
28
|
+
"exampleSolution": "Lösningsexempel",
|
|
29
29
|
"letMeThink": "Låt mig tänka...",
|
|
30
30
|
"aha": "Aha!",
|
|
31
31
|
"errorMessage": "Något gick snett med att generera en exempellösning"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ColorScheme } from '../../types/style.types';
|
|
3
|
+
type AlternativesProps = {
|
|
4
|
+
onPressAlternative: (message: string, translatedMessage?: string) => void;
|
|
5
|
+
hasMessages: boolean;
|
|
6
|
+
isHintFeedback: boolean;
|
|
7
|
+
colorScheme?: ColorScheme;
|
|
8
|
+
};
|
|
9
|
+
export declare const Alternatives: ({ onPressAlternative, hasMessages, isHintFeedback, colorScheme, }: AlternativesProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=Alternatives.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/Alternatives/Alternatives.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Alternatives.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/Alternatives.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAGrD,KAAK,iBAAiB,GAAG;IACvB,kBAAkB,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,iBAAiB,CAAC,EAAE,MAAM,KAAK,IAAI,CAAA;IACzE,WAAW,EAAE,OAAO,CAAA;IACpB,cAAc,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,YAAY,sEAKtB,iBAAiB,sBA6BnB,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type HelpRequestOptionProps = {
|
|
3
|
+
onPress: () => void;
|
|
4
|
+
message: string;
|
|
5
|
+
disabled: boolean;
|
|
6
|
+
hoverColor?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const HelpRequestOption: ({ onPress, message, disabled, hoverColor, }: HelpRequestOptionProps) => React.JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=HelpRequestOption.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/Alternatives/HelpRequestOption.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HelpRequestOption.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Alternatives/HelpRequestOption.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAA;AAK1D,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,eAAO,MAAM,iBAAiB,gDAK3B,sBAAsB,sBAyCxB,CAAA"}
|
package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MessageLoader.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;
|
|
1
|
+
{"version":3,"file":"MessageLoader.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessage/MessageLoader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,KAAK,kBAAkB,GAAG;IACxB,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,aAAa,oBAAwC,kBAAkB,sBASnF,CAAA"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ChatbotModel } from '../../model/ChatBotModel';
|
|
3
3
|
import { ColorScheme } from '../../types/style.types';
|
|
4
|
-
import { ChatInputMode } from '../../types/units.types';
|
|
5
4
|
type ChatbotMessagesProps = {
|
|
6
5
|
model: ChatbotModel;
|
|
7
6
|
isHintFeedback: boolean;
|
|
8
7
|
isTextToSpeechEnabled: boolean;
|
|
9
|
-
inputMode: ChatInputMode;
|
|
10
8
|
colorScheme?: ColorScheme;
|
|
11
9
|
};
|
|
12
|
-
export declare const
|
|
10
|
+
export declare const ChatbotMessages: ({ model, isHintFeedback, isTextToSpeechEnabled, colorScheme, }: ChatbotMessagesProps) => React.JSX.Element;
|
|
13
11
|
export {};
|
|
14
|
-
//# sourceMappingURL=
|
|
12
|
+
//# sourceMappingURL=ChatbotMessages.d.ts.map
|
package/dist/typescript/commonjs/features/chatbot/components/ChatMessages/ChatbotMessages.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChatbotMessages.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/ChatMessages/ChatbotMessages.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiB,MAAM,OAAO,CAAA;AAIrC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAKvD,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,KAAK,oBAAoB,GAAG;IAC1B,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAQD,eAAO,MAAM,eAAe,mEAKzB,oBAAoB,sBAwEtB,CAAA"}
|
|
@@ -2,7 +2,6 @@ import React, { ComponentType, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { ChatbotModel } from '../model/ChatBotModel';
|
|
3
3
|
import { AUDIO_CONFIG, DEFAULT_VOICE } from '../constants';
|
|
4
4
|
import { ColorScheme } from '../types/style.types';
|
|
5
|
-
import { ChatInputMode } from '../types/units.types';
|
|
6
5
|
type ChatbotProps = {
|
|
7
6
|
model: ChatbotModel;
|
|
8
7
|
isHintFeedback: boolean;
|
|
@@ -11,7 +10,6 @@ type ChatbotProps = {
|
|
|
11
10
|
voice: typeof DEFAULT_VOICE;
|
|
12
11
|
audioConfig: typeof AUDIO_CONFIG;
|
|
13
12
|
};
|
|
14
|
-
inputMode?: ChatInputMode;
|
|
15
13
|
ButtonWrapper: ComponentType<PropsWithChildren>;
|
|
16
14
|
iconSize?: {
|
|
17
15
|
width: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"Chatbot.d.ts","sourceRoot":"","sources":["../../../../../../src/features/chatbot/components/Chatbot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAG/D,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAA;AAElD,KAAK,YAAY,GAAG;IAClB,KAAK,EAAE,YAAY,CAAA;IACnB,cAAc,EAAE,OAAO,CAAA;IACvB,qBAAqB,EAAE,OAAO,CAAA;IAC9B,kBAAkB,CAAC,EAAE;QACnB,KAAK,EAAE,OAAO,aAAa,CAAA;QAC3B,WAAW,EAAE,OAAO,YAAY,CAAA;KACjC,CAAA;IACD,aAAa,EAAE,aAAa,CAAC,iBAAiB,CAAC,CAAA;IAC/C,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IAC5C,WAAW,CAAC,EAAE,WAAW,CAAA;CAC1B,CAAA;AAED,eAAO,MAAM,OAAO,gHAQjB,YAAY,6BA8Bd,CAAA"}
|