@magmamath/students-features 0.11.0-rc.21 → 0.11.0-rc.23
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/Chat/FadeMask.js +16 -104
- package/dist/commonjs/features/chatbot/components/Chat/FadeMask.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/Chat/FadeMask.native.js +89 -0
- package/dist/commonjs/features/chatbot/components/Chat/FadeMask.native.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Chat/FadeMask.web.js +43 -0
- package/dist/commonjs/features/chatbot/components/Chat/FadeMask.web.js.map +1 -0
- package/dist/commonjs/features/chatbot/components/Chat/useChatScroll.js +5 -5
- package/dist/commonjs/features/chatbot/components/Chat/useChatScroll.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +2 -2
- package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotTranslation.js +1 -1
- package/dist/commonjs/features/chatbot/model/ChatbotTranslation.js.map +1 -1
- package/dist/commonjs/shared/translation/localization/ca.json +1 -2
- package/dist/commonjs/shared/translation/localization/de.json +1 -2
- package/dist/commonjs/shared/translation/localization/en.json +1 -2
- package/dist/commonjs/shared/translation/localization/gb.json +1 -2
- package/dist/commonjs/shared/translation/localization/sct.json +1 -2
- package/dist/commonjs/shared/translation/localization/sw.json +1 -2
- package/dist/module/features/chatbot/components/Chat/FadeMask.js +1 -104
- package/dist/module/features/chatbot/components/Chat/FadeMask.js.map +1 -1
- package/dist/module/features/chatbot/components/Chat/FadeMask.native.js +81 -0
- package/dist/module/features/chatbot/components/Chat/FadeMask.native.js.map +1 -0
- package/dist/module/features/chatbot/components/Chat/FadeMask.web.js +37 -0
- package/dist/module/features/chatbot/components/Chat/FadeMask.web.js.map +1 -0
- package/dist/module/features/chatbot/components/Chat/useChatScroll.js +6 -6
- package/dist/module/features/chatbot/components/Chat/useChatScroll.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +2 -2
- package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js +1 -1
- package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
- package/dist/module/features/chatbot/model/ChatbotTranslation.js +1 -1
- package/dist/module/features/chatbot/model/ChatbotTranslation.js.map +1 -1
- package/dist/module/shared/translation/localization/ca.json +1 -2
- package/dist/module/shared/translation/localization/de.json +1 -2
- package/dist/module/shared/translation/localization/en.json +1 -2
- package/dist/module/shared/translation/localization/gb.json +1 -2
- package/dist/module/shared/translation/localization/sct.json +1 -2
- package/dist/module/shared/translation/localization/sw.json +1 -2
- package/dist/typescript/commonjs/features/chatbot/components/Chat/FadeMask.d.ts +2 -14
- package/dist/typescript/commonjs/features/chatbot/components/Chat/FadeMask.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/Chat/FadeMask.native.d.ts +18 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/FadeMask.native.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/FadeMask.web.d.ts +19 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/FadeMask.web.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/chatbot/components/Chat/useChatScroll.d.ts +1 -1
- package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +1 -1
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +0 -6
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +0 -2
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chat/FadeMask.d.ts +2 -14
- package/dist/typescript/module/features/chatbot/components/Chat/FadeMask.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/Chat/FadeMask.native.d.ts +18 -0
- package/dist/typescript/module/features/chatbot/components/Chat/FadeMask.native.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Chat/FadeMask.web.d.ts +19 -0
- package/dist/typescript/module/features/chatbot/components/Chat/FadeMask.web.d.ts.map +1 -0
- package/dist/typescript/module/features/chatbot/components/Chat/useChatScroll.d.ts +1 -1
- package/dist/typescript/module/features/chatbot/types/model.types.d.ts +1 -1
- package/dist/typescript/module/shared/translation/constants.d.ts +0 -6
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +0 -2
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/features/chatbot/components/Chat/{FadeMask.tsx → FadeMask.native.tsx} +11 -36
- package/src/features/chatbot/components/Chat/FadeMask.ts +2 -0
- package/src/features/chatbot/components/Chat/FadeMask.web.tsx +37 -0
- package/src/features/chatbot/components/Chat/useChatScroll.ts +5 -5
- package/src/features/chatbot/components/ChatControls/ChatControls.tsx +2 -2
- package/src/features/chatbot/model/ChatBoxTextManager.ts +1 -1
- package/src/features/chatbot/model/ChatbotTranslation.ts +1 -1
- package/src/features/chatbot/types/model.types.ts +1 -1
- package/src/shared/translation/localization/ca.json +1 -2
- package/src/shared/translation/localization/de.json +1 -2
- package/src/shared/translation/localization/en.json +1 -2
- package/src/shared/translation/localization/gb.json +1 -2
- package/src/shared/translation/localization/sct.json +1 -2
- package/src/shared/translation/localization/sw.json +1 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FadeMask.web.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/chatbot/components/Chat/FadeMask.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAiC,MAAM,OAAO,CAAA;AACvE,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAExC,oBAAY,YAAY;IACtB,GAAG,QAAQ;IACX,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AACD,MAAM,MAAM,YAAY,GAAG,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,KAAK,IAAI,CAAA;AAEnE,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,gBAAgB,CAAC,YAAY,GAAG,IAAI,CAAC,CAAA;CAC/C,CAAA;AAUD,eAAO,MAAM,YAAY,MAAO,iBAAiB,SAAS,CAAA;AAE1D,eAAO,MAAM,aAAa;;uBAKc,YAAY,GAAG,SAAS;;CAO/D,CAAA"}
|
|
@@ -10,7 +10,7 @@ export declare const useChatScroll: () => {
|
|
|
10
10
|
listRef: import("react").RefObject<FlatList<any>>;
|
|
11
11
|
scroll: import("react").MutableRefObject<ScrollState>;
|
|
12
12
|
isScrolledUp: boolean;
|
|
13
|
-
fadeRef: import("react").MutableRefObject<import("./FadeMask").FadeUpdateFn | null>;
|
|
13
|
+
fadeRef: import("react").MutableRefObject<import("./FadeMask.web").FadeUpdateFn | null>;
|
|
14
14
|
webMask: import("react-native").ViewStyle | undefined;
|
|
15
15
|
handleScroll: (e: NativeSyntheticEvent<NativeScrollEvent>) => void;
|
|
16
16
|
handleLayout: (e: {
|
|
@@ -9,7 +9,7 @@ export type ChatbotMessages = {
|
|
|
9
9
|
start: ConversationMessage;
|
|
10
10
|
endMessage: ConversationMessage;
|
|
11
11
|
anotherHintOption: ChatAnswer;
|
|
12
|
-
|
|
12
|
+
giveHint: ChatAnswer;
|
|
13
13
|
};
|
|
14
14
|
export type ChatbotApiRequests = {
|
|
15
15
|
getAlternatives: (props: GetAlternativesPayload) => Promise<GetAlternativesResponse>;
|
|
@@ -23,7 +23,6 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
23
23
|
howCanIHelp: string;
|
|
24
24
|
showError: string;
|
|
25
25
|
inputPlaceholder: string;
|
|
26
|
-
wantHelp: string;
|
|
27
26
|
};
|
|
28
27
|
gifCelebrations: {
|
|
29
28
|
greatStart: string;
|
|
@@ -85,7 +84,6 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
85
84
|
howCanIHelp: string;
|
|
86
85
|
showError: string;
|
|
87
86
|
inputPlaceholder: string;
|
|
88
|
-
wantHelp: string;
|
|
89
87
|
};
|
|
90
88
|
gifCelebrations: {
|
|
91
89
|
greatStart: string;
|
|
@@ -147,7 +145,6 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
147
145
|
howCanIHelp: string;
|
|
148
146
|
showError: string;
|
|
149
147
|
inputPlaceholder: string;
|
|
150
|
-
wantHelp: string;
|
|
151
148
|
};
|
|
152
149
|
gifCelebrations: {
|
|
153
150
|
greatStart: string;
|
|
@@ -209,7 +206,6 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
209
206
|
howCanIHelp: string;
|
|
210
207
|
showError: string;
|
|
211
208
|
inputPlaceholder: string;
|
|
212
|
-
wantHelp: string;
|
|
213
209
|
};
|
|
214
210
|
gifCelebrations: {
|
|
215
211
|
greatStart: string;
|
|
@@ -271,7 +267,6 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
271
267
|
howCanIHelp: string;
|
|
272
268
|
showError: string;
|
|
273
269
|
inputPlaceholder: string;
|
|
274
|
-
wantHelp: string;
|
|
275
270
|
};
|
|
276
271
|
gifCelebrations: {
|
|
277
272
|
greatStart: string;
|
|
@@ -333,7 +328,6 @@ export declare const LOCALIZATION_CONFIGS: {
|
|
|
333
328
|
howCanIHelp: string;
|
|
334
329
|
showError: string;
|
|
335
330
|
inputPlaceholder: string;
|
|
336
|
-
wantHelp: string;
|
|
337
331
|
};
|
|
338
332
|
gifCelebrations: {
|
|
339
333
|
greatStart: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/constants.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhC,CAAA"}
|
|
@@ -24,7 +24,6 @@ export declare const setLocalization: import("effector").EventCallable<{
|
|
|
24
24
|
howCanIHelp: string;
|
|
25
25
|
showError: string;
|
|
26
26
|
inputPlaceholder: string;
|
|
27
|
-
wantHelp: string;
|
|
28
27
|
};
|
|
29
28
|
gifCelebrations: {
|
|
30
29
|
greatStart: string;
|
|
@@ -86,7 +85,6 @@ export declare const $localization: import("effector").StoreWritable<{
|
|
|
86
85
|
howCanIHelp: string;
|
|
87
86
|
showError: string;
|
|
88
87
|
inputPlaceholder: string;
|
|
89
|
-
wantHelp: string;
|
|
90
88
|
};
|
|
91
89
|
gifCelebrations: {
|
|
92
90
|
greatStart: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../../src/shared/translation/model.ts"],"names":[],"mappings":"AACA,OAAO,EAAU,YAAY,EAAE,MAAM,SAAS,CAAA;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cACD,OAAO,oBAAoB,KAAK,YAAY,EACpE,CAAA;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMzB,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,13 @@
|
|
|
1
1
|
import React, { MutableRefObject, useCallback, useRef, useState } from 'react'
|
|
2
|
-
import { StyleSheet
|
|
3
|
-
import {
|
|
2
|
+
import { StyleSheet } from 'react-native'
|
|
3
|
+
import { LinearGradient } from 'react-native-linear-gradient'
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
top: { maskImage: 'linear-gradient(to top, transparent, black 10%, black)' } as any,
|
|
10
|
-
bottom: { maskImage: 'linear-gradient(to bottom, transparent, black 10%, black)' } as any,
|
|
11
|
-
both: {
|
|
12
|
-
maskImage: 'linear-gradient(to top, transparent, black 10%, black 90%, transparent)',
|
|
13
|
-
} as any,
|
|
5
|
+
export enum FadePosition {
|
|
6
|
+
TOP = 'top',
|
|
7
|
+
BOTTOM = 'bottom',
|
|
8
|
+
BOTH = 'both',
|
|
14
9
|
}
|
|
10
|
+
export type FadeUpdateFn = (fade: FadePosition | undefined) => void
|
|
15
11
|
|
|
16
12
|
const FADE_HEIGHT = 35
|
|
17
13
|
|
|
@@ -19,13 +15,12 @@ type FadeOverlaysProps = {
|
|
|
19
15
|
fadeRef: MutableRefObject<FadeUpdateFn | null>
|
|
20
16
|
}
|
|
21
17
|
|
|
22
|
-
const
|
|
23
|
-
const { LinearGradient } = require('react-native-linear-gradient')
|
|
18
|
+
export const FadeOverlays = ({ fadeRef }: FadeOverlaysProps) => {
|
|
24
19
|
const [fade, setFade] = useState<FadePosition | undefined>(undefined)
|
|
25
20
|
fadeRef.current = setFade
|
|
26
21
|
|
|
27
|
-
const showTop = fade ===
|
|
28
|
-
const showBottom = fade ===
|
|
22
|
+
const showTop = fade === FadePosition.TOP || fade === FadePosition.BOTH
|
|
23
|
+
const showBottom = fade === FadePosition.BOTTOM || fade === FadePosition.BOTH
|
|
29
24
|
|
|
30
25
|
return (
|
|
31
26
|
<>
|
|
@@ -47,25 +42,7 @@ const NativeFadeOverlays = ({ fadeRef }: FadeOverlaysProps) => {
|
|
|
47
42
|
)
|
|
48
43
|
}
|
|
49
44
|
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
export const FadeOverlays = IS_WEB ? NoopOverlays : NativeFadeOverlays
|
|
53
|
-
|
|
54
|
-
const useWebFadeUpdate = () => {
|
|
55
|
-
const fadeRef = useRef<FadeUpdateFn | null>(null)
|
|
56
|
-
const lastFade = useRef<FadePosition | undefined>(undefined)
|
|
57
|
-
const [webMask, setWebMask] = useState<ViewStyle | undefined>(undefined)
|
|
58
|
-
|
|
59
|
-
const updateFade = useCallback((fade: FadePosition | undefined) => {
|
|
60
|
-
if (fade === lastFade.current) return
|
|
61
|
-
lastFade.current = fade
|
|
62
|
-
setWebMask(fade ? WEB_MASKS[fade] : undefined)
|
|
63
|
-
}, [])
|
|
64
|
-
|
|
65
|
-
return { fadeRef, updateFade, webMask }
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const useNativeFadeUpdate = () => {
|
|
45
|
+
export const useFadeUpdate = () => {
|
|
69
46
|
const fadeRef = useRef<FadeUpdateFn | null>(null)
|
|
70
47
|
const lastFade = useRef<FadePosition | undefined>(undefined)
|
|
71
48
|
|
|
@@ -78,8 +55,6 @@ const useNativeFadeUpdate = () => {
|
|
|
78
55
|
return { fadeRef, updateFade, webMask: undefined }
|
|
79
56
|
}
|
|
80
57
|
|
|
81
|
-
export const useFadeUpdate = IS_WEB ? useWebFadeUpdate : useNativeFadeUpdate
|
|
82
|
-
|
|
83
58
|
const styles = StyleSheet.create({
|
|
84
59
|
gradient: {
|
|
85
60
|
position: 'absolute',
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { MutableRefObject, useCallback, useRef, useState } from 'react'
|
|
2
|
+
import { ViewStyle } from 'react-native'
|
|
3
|
+
|
|
4
|
+
export enum FadePosition {
|
|
5
|
+
TOP = 'top',
|
|
6
|
+
BOTTOM = 'bottom',
|
|
7
|
+
BOTH = 'both',
|
|
8
|
+
}
|
|
9
|
+
export type FadeUpdateFn = (fade: FadePosition | undefined) => void
|
|
10
|
+
|
|
11
|
+
type FadeOverlaysProps = {
|
|
12
|
+
fadeRef: MutableRefObject<FadeUpdateFn | null>
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const WEB_MASKS: Record<FadePosition, ViewStyle> = {
|
|
16
|
+
[FadePosition.TOP]: { maskImage: 'linear-gradient(to top, transparent, black 10%, black)' } as any,
|
|
17
|
+
[FadePosition.BOTTOM]: { maskImage: 'linear-gradient(to bottom, transparent, black 10%, black)' } as any,
|
|
18
|
+
[FadePosition.BOTH]: {
|
|
19
|
+
maskImage: 'linear-gradient(to top, transparent, black 10%, black 90%, transparent)',
|
|
20
|
+
} as any,
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export const FadeOverlays = (_: FadeOverlaysProps) => null
|
|
24
|
+
|
|
25
|
+
export const useFadeUpdate = () => {
|
|
26
|
+
const fadeRef = useRef<FadeUpdateFn | null>(null)
|
|
27
|
+
const lastFade = useRef<FadePosition | undefined>(undefined)
|
|
28
|
+
const [webMask, setWebMask] = useState<ViewStyle | undefined>(undefined)
|
|
29
|
+
|
|
30
|
+
const updateFade = useCallback((fade: FadePosition | undefined) => {
|
|
31
|
+
if (fade === lastFade.current) return
|
|
32
|
+
lastFade.current = fade
|
|
33
|
+
setWebMask(fade ? WEB_MASKS[fade] : undefined)
|
|
34
|
+
}, [])
|
|
35
|
+
|
|
36
|
+
return { fadeRef, updateFade, webMask }
|
|
37
|
+
}
|
|
@@ -19,11 +19,11 @@ const initialScrollState: ScrollState = {
|
|
|
19
19
|
contentHeight: 0,
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
const computeFade = (
|
|
23
|
-
if (!
|
|
24
|
-
if (
|
|
25
|
-
if (
|
|
26
|
-
return
|
|
22
|
+
const computeFade = (scrollState: ScrollState) => {
|
|
23
|
+
if (!scrollState.isScrollable) return undefined
|
|
24
|
+
if (scrollState.isAtTop) return FadePosition.BOTTOM
|
|
25
|
+
if (scrollState.isScrolledUp) return FadePosition.BOTH
|
|
26
|
+
return FadePosition.TOP
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export const useChatScroll = () => {
|
|
@@ -27,7 +27,7 @@ export const ChatControls = ({
|
|
|
27
27
|
}: ChatControlsProps) => {
|
|
28
28
|
const isOpen = useUnit(model.$isOpen)
|
|
29
29
|
const isTranslated = useUnit(model.translation.$isTranslated)
|
|
30
|
-
const
|
|
30
|
+
const giveHint = model.textManager.messages.giveHint
|
|
31
31
|
// const [isHelpButtonVisible, setIsHelpButtonVisible] = useState(withHelpButton)
|
|
32
32
|
|
|
33
33
|
// useEffect(() => {
|
|
@@ -55,7 +55,7 @@ export const ChatControls = ({
|
|
|
55
55
|
onPress={onPressHelpButton}
|
|
56
56
|
style={{ text: styles.helpButtonText }}
|
|
57
57
|
>
|
|
58
|
-
{(isTranslated &&
|
|
58
|
+
{(isTranslated && giveHint.translatedText) || giveHint.text}
|
|
59
59
|
</Button>
|
|
60
60
|
)}
|
|
61
61
|
<Pressable onPress={onPressChatIcon}>
|
|
@@ -16,7 +16,7 @@ export class ChatBotTextManager {
|
|
|
16
16
|
start: this.messagesCreator.createMessage('chat.howCanIHelp'),
|
|
17
17
|
endMessage: this.messagesCreator.createMessage('chat.answerAgain'),
|
|
18
18
|
anotherHintOption: this.messagesCreator.createOption('chat.anotherHint'),
|
|
19
|
-
|
|
19
|
+
giveHint: this.messagesCreator.createOption('chat.giveHint'),
|
|
20
20
|
}
|
|
21
21
|
private readonly defaultMessages = { ...this.messages }
|
|
22
22
|
|
|
@@ -153,7 +153,7 @@ export class ChatbotTranslation {
|
|
|
153
153
|
}
|
|
154
154
|
|
|
155
155
|
const defaultMessages = [this.defaultMessages.error, this.defaultMessages.endMessage]
|
|
156
|
-
const defaultOptions = [this.defaultMessages.anotherHintOption, this.defaultMessages.
|
|
156
|
+
const defaultOptions = [this.defaultMessages.anotherHintOption, this.defaultMessages.giveHint]
|
|
157
157
|
const options = getOptionsForTranslation({ lastMessage: messages.at(-1), alternatives })
|
|
158
158
|
|
|
159
159
|
const translatedTextsList = await this.translateRequest({
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"errorMessage": "Something went wrong! Try again",
|
|
22
22
|
"howCanIHelp": "Hi! Do you want help?",
|
|
23
23
|
"showError": "Show error",
|
|
24
|
-
"inputPlaceholder": "Type..."
|
|
25
|
-
"wantHelp": "Want some help?"
|
|
24
|
+
"inputPlaceholder": "Type..."
|
|
26
25
|
},
|
|
27
26
|
"gifCelebrations": {
|
|
28
27
|
"greatStart": "Great start!",
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"errorMessage": "Etwas ist schiefgelaufen! Versuch es erneut",
|
|
22
22
|
"howCanIHelp": "Hi! Möchtest du Hilfe?",
|
|
23
23
|
"showError": "Fehler anzeigen",
|
|
24
|
-
"inputPlaceholder": "Tippe..."
|
|
25
|
-
"wantHelp": "Brauchst du Hilfe?"
|
|
24
|
+
"inputPlaceholder": "Tippe..."
|
|
26
25
|
},
|
|
27
26
|
"gifCelebrations": {
|
|
28
27
|
"greatStart": "Toller Start!",
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"errorMessage": "Something went wrong! Try again",
|
|
22
22
|
"howCanIHelp": "Hi! Do you want help?",
|
|
23
23
|
"showError": "Show error",
|
|
24
|
-
"inputPlaceholder": "Type..."
|
|
25
|
-
"wantHelp": "Want some help?"
|
|
24
|
+
"inputPlaceholder": "Type..."
|
|
26
25
|
},
|
|
27
26
|
"gifCelebrations": {
|
|
28
27
|
"greatStart": "Great start!",
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"errorMessage": "Something went wrong! Try again",
|
|
22
22
|
"howCanIHelp": "Hi! Do you want help?",
|
|
23
23
|
"showError": "Show error",
|
|
24
|
-
"inputPlaceholder": "Type..."
|
|
25
|
-
"wantHelp": "Want some help?"
|
|
24
|
+
"inputPlaceholder": "Type..."
|
|
26
25
|
},
|
|
27
26
|
"gifCelebrations": {
|
|
28
27
|
"greatStart": "Great start!",
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"errorMessage": "Something went wrong! Try again",
|
|
22
22
|
"howCanIHelp": "Hi! Do you want help?",
|
|
23
23
|
"showError": "Show error",
|
|
24
|
-
"inputPlaceholder": "Type..."
|
|
25
|
-
"wantHelp": "Want some help?"
|
|
24
|
+
"inputPlaceholder": "Type..."
|
|
26
25
|
},
|
|
27
26
|
"gifCelebrations": {
|
|
28
27
|
"greatStart": "Great start!",
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"errorMessage": "Något gick snett! Försök igen",
|
|
22
22
|
"howCanIHelp": "Hej! Hur kan jag hjälpa dig?",
|
|
23
23
|
"showError": "Visa fel",
|
|
24
|
-
"inputPlaceholder": "Skriv..."
|
|
25
|
-
"wantHelp": "Vill du ha hjälp?"
|
|
24
|
+
"inputPlaceholder": "Skriv..."
|
|
26
25
|
},
|
|
27
26
|
"gifCelebrations": {
|
|
28
27
|
"greatStart": "Bra start!",
|