srs-heritage-chatbot 1.0.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/LICENSE +20 -0
- package/README.md +194 -0
- package/lib/commonjs/assets/chat-icon-mobile.svg +1 -0
- package/lib/commonjs/assets/heritage.png +0 -0
- package/lib/commonjs/assets/posiden.svg +51 -0
- package/lib/commonjs/components/LoadingTips.js +104 -0
- package/lib/commonjs/components/LoadingTips.js.map +1 -0
- package/lib/commonjs/components/email.js +461 -0
- package/lib/commonjs/components/email.js.map +1 -0
- package/lib/commonjs/components/feedback.js +114 -0
- package/lib/commonjs/components/feedback.js.map +1 -0
- package/lib/commonjs/components/header.js +126 -0
- package/lib/commonjs/components/header.js.map +1 -0
- package/lib/commonjs/components/input.js +144 -0
- package/lib/commonjs/components/input.js.map +1 -0
- package/lib/commonjs/components/productCard.js +688 -0
- package/lib/commonjs/components/productCard.js.map +1 -0
- package/lib/commonjs/components/progressCircle.js +99 -0
- package/lib/commonjs/components/progressCircle.js.map +1 -0
- package/lib/commonjs/components/testing.js +74 -0
- package/lib/commonjs/components/testing.js.map +1 -0
- package/lib/commonjs/components/voice.js +184 -0
- package/lib/commonjs/components/voice.js.map +1 -0
- package/lib/commonjs/components/welcomeButton.js +149 -0
- package/lib/commonjs/components/welcomeButton.js.map +1 -0
- package/lib/commonjs/components/welcomeInput.js +137 -0
- package/lib/commonjs/components/welcomeInput.js.map +1 -0
- package/lib/commonjs/contexts/AppContext.js +552 -0
- package/lib/commonjs/contexts/AppContext.js.map +1 -0
- package/lib/commonjs/hooks/Stream.js +599 -0
- package/lib/commonjs/hooks/Stream.js.map +1 -0
- package/lib/commonjs/hooks/useAsyncStorage.js +36 -0
- package/lib/commonjs/hooks/useAsyncStorage.js.map +1 -0
- package/lib/commonjs/index.js +44 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/layout/disclaimer.js +208 -0
- package/lib/commonjs/layout/disclaimer.js.map +1 -0
- package/lib/commonjs/layout/ex.js +254 -0
- package/lib/commonjs/layout/ex.js.map +1 -0
- package/lib/commonjs/layout/icon.js +118 -0
- package/lib/commonjs/layout/icon.js.map +1 -0
- package/lib/commonjs/layout/layout.js +168 -0
- package/lib/commonjs/layout/layout.js.map +1 -0
- package/lib/commonjs/layout/welcome.js +160 -0
- package/lib/commonjs/layout/welcome.js.map +1 -0
- package/lib/commonjs/layout/window.js +396 -0
- package/lib/commonjs/layout/window.js.map +1 -0
- package/lib/commonjs/utils/audioRecorder.js +412 -0
- package/lib/commonjs/utils/audioRecorder.js.map +1 -0
- package/lib/commonjs/utils/cloudinary.js +69 -0
- package/lib/commonjs/utils/cloudinary.js.map +1 -0
- package/lib/commonjs/utils/storage.js +76 -0
- package/lib/commonjs/utils/storage.js.map +1 -0
- package/lib/commonjs/utils/textToSpeech.js +53 -0
- package/lib/commonjs/utils/textToSpeech.js.map +1 -0
- package/lib/module/assets/chat-icon-mobile.svg +1 -0
- package/lib/module/assets/heritage.png +0 -0
- package/lib/module/assets/posiden.svg +51 -0
- package/lib/module/components/LoadingTips.js +95 -0
- package/lib/module/components/LoadingTips.js.map +1 -0
- package/lib/module/components/email.js +452 -0
- package/lib/module/components/email.js.map +1 -0
- package/lib/module/components/feedback.js +105 -0
- package/lib/module/components/feedback.js.map +1 -0
- package/lib/module/components/header.js +117 -0
- package/lib/module/components/header.js.map +1 -0
- package/lib/module/components/input.js +135 -0
- package/lib/module/components/input.js.map +1 -0
- package/lib/module/components/productCard.js +679 -0
- package/lib/module/components/productCard.js.map +1 -0
- package/lib/module/components/progressCircle.js +91 -0
- package/lib/module/components/progressCircle.js.map +1 -0
- package/lib/module/components/testing.js +66 -0
- package/lib/module/components/testing.js.map +1 -0
- package/lib/module/components/voice.js +175 -0
- package/lib/module/components/voice.js.map +1 -0
- package/lib/module/components/welcomeButton.js +140 -0
- package/lib/module/components/welcomeButton.js.map +1 -0
- package/lib/module/components/welcomeInput.js +128 -0
- package/lib/module/components/welcomeInput.js.map +1 -0
- package/lib/module/contexts/AppContext.js +542 -0
- package/lib/module/contexts/AppContext.js.map +1 -0
- package/lib/module/hooks/Stream.js +592 -0
- package/lib/module/hooks/Stream.js.map +1 -0
- package/lib/module/hooks/useAsyncStorage.js +29 -0
- package/lib/module/hooks/useAsyncStorage.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/layout/disclaimer.js +199 -0
- package/lib/module/layout/disclaimer.js.map +1 -0
- package/lib/module/layout/ex.js +253 -0
- package/lib/module/layout/ex.js.map +1 -0
- package/lib/module/layout/icon.js +108 -0
- package/lib/module/layout/icon.js.map +1 -0
- package/lib/module/layout/layout.js +160 -0
- package/lib/module/layout/layout.js.map +1 -0
- package/lib/module/layout/welcome.js +150 -0
- package/lib/module/layout/welcome.js.map +1 -0
- package/lib/module/layout/window.js +387 -0
- package/lib/module/layout/window.js.map +1 -0
- package/lib/module/utils/audioRecorder.js +398 -0
- package/lib/module/utils/audioRecorder.js.map +1 -0
- package/lib/module/utils/cloudinary.js +61 -0
- package/lib/module/utils/cloudinary.js.map +1 -0
- package/lib/module/utils/storage.js +67 -0
- package/lib/module/utils/storage.js.map +1 -0
- package/lib/module/utils/textToSpeech.js +43 -0
- package/lib/module/utils/textToSpeech.js.map +1 -0
- package/lib/typescript/components/LoadingTips.d.ts +3 -0
- package/lib/typescript/components/LoadingTips.d.ts.map +1 -0
- package/lib/typescript/components/email.d.ts +6 -0
- package/lib/typescript/components/email.d.ts.map +1 -0
- package/lib/typescript/components/feedback.d.ts +6 -0
- package/lib/typescript/components/feedback.d.ts.map +1 -0
- package/lib/typescript/components/header.d.ts +3 -0
- package/lib/typescript/components/header.d.ts.map +1 -0
- package/lib/typescript/components/input.d.ts +6 -0
- package/lib/typescript/components/input.d.ts.map +1 -0
- package/lib/typescript/components/productCard.d.ts +7 -0
- package/lib/typescript/components/productCard.d.ts.map +1 -0
- package/lib/typescript/components/progressCircle.d.ts +3 -0
- package/lib/typescript/components/progressCircle.d.ts.map +1 -0
- package/lib/typescript/components/testing.d.ts +6 -0
- package/lib/typescript/components/testing.d.ts.map +1 -0
- package/lib/typescript/components/voice.d.ts +5 -0
- package/lib/typescript/components/voice.d.ts.map +1 -0
- package/lib/typescript/components/welcomeButton.d.ts +4 -0
- package/lib/typescript/components/welcomeButton.d.ts.map +1 -0
- package/lib/typescript/components/welcomeInput.d.ts +6 -0
- package/lib/typescript/components/welcomeInput.d.ts.map +1 -0
- package/lib/typescript/contexts/AppContext.d.ts +10 -0
- package/lib/typescript/contexts/AppContext.d.ts.map +1 -0
- package/lib/typescript/hooks/Stream.d.ts +2 -0
- package/lib/typescript/hooks/Stream.d.ts.map +1 -0
- package/lib/typescript/hooks/useAsyncStorage.d.ts +2 -0
- package/lib/typescript/hooks/useAsyncStorage.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +8 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/layout/disclaimer.d.ts +5 -0
- package/lib/typescript/layout/disclaimer.d.ts.map +1 -0
- package/lib/typescript/layout/ex.d.ts +1 -0
- package/lib/typescript/layout/ex.d.ts.map +1 -0
- package/lib/typescript/layout/icon.d.ts +3 -0
- package/lib/typescript/layout/icon.d.ts.map +1 -0
- package/lib/typescript/layout/layout.d.ts +3 -0
- package/lib/typescript/layout/layout.d.ts.map +1 -0
- package/lib/typescript/layout/welcome.d.ts +6 -0
- package/lib/typescript/layout/welcome.d.ts.map +1 -0
- package/lib/typescript/layout/window.d.ts +5 -0
- package/lib/typescript/layout/window.d.ts.map +1 -0
- package/lib/typescript/utils/audioRecorder.d.ts +9 -0
- package/lib/typescript/utils/audioRecorder.d.ts.map +1 -0
- package/lib/typescript/utils/cloudinary.d.ts +17 -0
- package/lib/typescript/utils/cloudinary.d.ts.map +1 -0
- package/lib/typescript/utils/storage.d.ts +29 -0
- package/lib/typescript/utils/storage.d.ts.map +1 -0
- package/lib/typescript/utils/textToSpeech.d.ts +2 -0
- package/lib/typescript/utils/textToSpeech.d.ts.map +1 -0
- package/package.json +109 -0
- package/src/assets/chat-icon-mobile.svg +1 -0
- package/src/assets/heritage.png +0 -0
- package/src/assets/posiden.svg +51 -0
- package/src/components/LoadingTips.js +99 -0
- package/src/components/email.js +467 -0
- package/src/components/feedback.js +114 -0
- package/src/components/header.js +119 -0
- package/src/components/input.js +133 -0
- package/src/components/productCard.js +815 -0
- package/src/components/progressCircle.js +88 -0
- package/src/components/testing.js +60 -0
- package/src/components/voice.js +228 -0
- package/src/components/welcomeButton.js +161 -0
- package/src/components/welcomeInput.js +133 -0
- package/src/contexts/AppContext.js +678 -0
- package/src/hooks/Stream.js +655 -0
- package/src/hooks/useAsyncStorage.js +33 -0
- package/src/index.js +30 -0
- package/src/layout/disclaimer.js +231 -0
- package/src/layout/ex.js +252 -0
- package/src/layout/icon.js +105 -0
- package/src/layout/layout.js +160 -0
- package/src/layout/welcome.js +172 -0
- package/src/layout/window.js +476 -0
- package/src/utils/audioRecorder.js +445 -0
- package/src/utils/cloudinary.js +61 -0
- package/src/utils/storage.ts +89 -0
- package/src/utils/textToSpeech.js +49 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 alxkai
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
5
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
6
|
+
in the Software without restriction, including without limitation the rights
|
|
7
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
9
|
+
furnished to do so, subject to the following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all
|
|
12
|
+
copies or substantial portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
15
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
16
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
17
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
18
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
19
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
# React Native Instalily Chat
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Importing
|
|
5
|
+
|
|
6
|
+
Installing the package:
|
|
7
|
+
`npm i react-native-srschat`
|
|
8
|
+
|
|
9
|
+
###Setup
|
|
10
|
+
|
|
11
|
+
iOS
|
|
12
|
+
By default, no permissions are available. First, require the setup script in your Podfile:
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
+ def node_require(script)
|
|
17
|
+
+ # Resolve script with node to allow for hoisting
|
|
18
|
+
+ require Pod::Executable.execute_command('node', ['-p',
|
|
19
|
+
+ "require.resolve(
|
|
20
|
+
+ '#{script}',
|
|
21
|
+
+ {paths: [process.argv[1]]},
|
|
22
|
+
+ )", __dir__]).strip
|
|
23
|
+
+ end
|
|
24
|
+
|
|
25
|
+
# Use it to require both react-native's and this package's scripts:
|
|
26
|
+
+ node_require('react-native/scripts/react_native_pods.rb')
|
|
27
|
+
+ node_require('react-native-permissions/scripts/setup.rb')
|
|
28
|
+
```
|
|
29
|
+
In the same Podfile, call setup_permissions with the permissions you need. Only the permissions specified here will be added:
|
|
30
|
+
```
|
|
31
|
+
# …
|
|
32
|
+
|
|
33
|
+
platform :ios, min_ios_version_supported
|
|
34
|
+
prepare_react_native_project!
|
|
35
|
+
|
|
36
|
+
setup_permissions([
|
|
37
|
+
'Microphone',
|
|
38
|
+
'SpeechRecognition',
|
|
39
|
+
])
|
|
40
|
+
```
|
|
41
|
+
Then execute pod install in your ios directory (📌 Note that it must be re-executed each time you update this config).
|
|
42
|
+
|
|
43
|
+
Finally, add the corresponding permissions usage descriptions to your Info.plist. For example:
|
|
44
|
+
```
|
|
45
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
46
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
47
|
+
<plist version="1.0">
|
|
48
|
+
<dict>
|
|
49
|
+
|
|
50
|
+
<!-- 🚨 Keep only the permissions specified in `setup_permissions` 🚨 -->
|
|
51
|
+
|
|
52
|
+
<key>NSMicrophoneUsageDescription</key>
|
|
53
|
+
<string>[REASON]</string>
|
|
54
|
+
|
|
55
|
+
<key>NSSpeechRecognitionUsageDescription</key>
|
|
56
|
+
<string>[REASON]</string>
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
<!-- … -->
|
|
60
|
+
|
|
61
|
+
</dict>
|
|
62
|
+
</plist>
|
|
63
|
+
```
|
|
64
|
+
Android
|
|
65
|
+
Add all wanted permissions to your app android/app/src/main/AndroidManifest.xml file:
|
|
66
|
+
```
|
|
67
|
+
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
|
68
|
+
|
|
69
|
+
<!-- 🚨 Keep only the permissions used in your app 🚨 -->
|
|
70
|
+
|
|
71
|
+
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
|
|
72
|
+
|
|
73
|
+
<!-- Optional but recommended -->
|
|
74
|
+
<uses-feature android:name="android.hardware.microphone" android:required="false"/>
|
|
75
|
+
|
|
76
|
+
<queries>
|
|
77
|
+
<!-- Speech Recognition Service -->
|
|
78
|
+
<intent>
|
|
79
|
+
<action android:name="android.speech.RecognitionService"/>
|
|
80
|
+
</intent>
|
|
81
|
+
<!-- Compatibility intent for older flows -->
|
|
82
|
+
<intent>
|
|
83
|
+
<action android:name="android.speech.action.RECOGNIZE_SPEECH"/>
|
|
84
|
+
</intent>
|
|
85
|
+
<!-- Optional: TTS, if you use it -->
|
|
86
|
+
<intent>
|
|
87
|
+
<action android:name="android.intent.action.TTS_SERVICE"/>
|
|
88
|
+
</intent>
|
|
89
|
+
<!-- Optional: explicit Google packages (not required if the intents are present) -->
|
|
90
|
+
<package android:name="com.google.android.googlequicksearchbox"/>
|
|
91
|
+
<package android:name="com.google.android.tts"/>
|
|
92
|
+
</queries>
|
|
93
|
+
|
|
94
|
+
<!-- … -->
|
|
95
|
+
|
|
96
|
+
</manifest>
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Note:Even after all the permissions are correct in Android, there is one last thing to make sure this libray is working fine on Android. Please make sure the device has Google Speech Recognizing Engine such as com.google.android.googlequicksearchbox.
|
|
100
|
+
|
|
101
|
+
Please ask users to install Google Search App (Google App).
|
|
102
|
+
|
|
103
|
+
### Example Use
|
|
104
|
+
|
|
105
|
+
```
|
|
106
|
+
import React, { useState } from 'react';
|
|
107
|
+
import { View, StyleSheet, Button } from 'react-native';
|
|
108
|
+
import { Chat } from 'react-native-srschat';
|
|
109
|
+
|
|
110
|
+
export default function App() {
|
|
111
|
+
const [showIcon, setShowIcon] = useState(true);
|
|
112
|
+
const [toggleChat, setToggleChat] = useState(false);
|
|
113
|
+
const [showWelcome, setShowWelcome] = useState(false);
|
|
114
|
+
|
|
115
|
+
const onProductCardClick = (productData) => {
|
|
116
|
+
console.log('Product Card Clicked:', productData);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
const onAddToCartClick = (productData) => {
|
|
120
|
+
console.log('Added to Cart:', productData);
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
const data = {
|
|
124
|
+
"env":"stage",
|
|
125
|
+
"brand_version": "landscape", // or "pool"
|
|
126
|
+
"user_id": (the user id logged in)
|
|
127
|
+
"customer_code": "CODE",
|
|
128
|
+
"branch_code": "CODE",
|
|
129
|
+
"active_ship_to": 1,
|
|
130
|
+
"branch_full_name": "FULL_BRANCH_NAME",
|
|
131
|
+
"branch_email": "example@email.com",
|
|
132
|
+
"customer_token": "CUSTOMER_TOKEN",
|
|
133
|
+
"customer_name":"NAME",
|
|
134
|
+
"branch_details": {
|
|
135
|
+
"active_branch_business_hours": "",
|
|
136
|
+
"active_branch_email": "",
|
|
137
|
+
"active_branch_location": "",
|
|
138
|
+
"active_branch_name": "",
|
|
139
|
+
"active_branch_phone": ",
|
|
140
|
+
"active_brand_name": ""
|
|
141
|
+
},
|
|
142
|
+
"user_email":"NAME@ADDRESS.COM"
|
|
143
|
+
"session": "1234567"
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
console.log('Data being passed to Chat:', data);
|
|
147
|
+
|
|
148
|
+
const uiConfig = {
|
|
149
|
+
testButtons: false, // show the test buttons for onProductCardClick and onAddToCartClick – defaults to false
|
|
150
|
+
iconType: "button", // "button" or "tab" – defaults to button
|
|
151
|
+
iconPosition: { // ex. button { bottom: 80, right: 20 } tab { bottom: 600, right: 0 } – defaults to { bottom: 80, right: 20 }
|
|
152
|
+
bottom: 80,
|
|
153
|
+
right: 20,
|
|
154
|
+
},
|
|
155
|
+
showIcon: showIcon, // true or false, show the chat icon – no prop defaults to true
|
|
156
|
+
toggleChat: toggleChat // toggle the chat window
|
|
157
|
+
setToggleChat: (value) => setToggleChat(value),
|
|
158
|
+
showWelcome: showWelcome,
|
|
159
|
+
setShowWelcome: (value) => setShowWelcome(value)
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return (
|
|
163
|
+
<>
|
|
164
|
+
<View style={styles.container}>
|
|
165
|
+
<View style={styles.container}>
|
|
166
|
+
<Button title="Toggle Chat" onPress={() => setToggleChat(prev => !prev)}/>
|
|
167
|
+
<Button title="Show Icon" onPress={() => setShowIcon(prev => !prev)} />
|
|
168
|
+
</View>
|
|
169
|
+
<Chat
|
|
170
|
+
data={data}
|
|
171
|
+
onProductCardClick={onProductCardClick}
|
|
172
|
+
onAddToCartClick={onAddToCartClick}
|
|
173
|
+
uiConfig={uiConfig}
|
|
174
|
+
/>
|
|
175
|
+
</View>
|
|
176
|
+
</>
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
const styles = StyleSheet.create({
|
|
181
|
+
container: {
|
|
182
|
+
flex: 1,
|
|
183
|
+
backgroundColor: '#437D3D',
|
|
184
|
+
marginTop: 0,
|
|
185
|
+
paddingTop: 50
|
|
186
|
+
},
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
Note for toggle chat:
|
|
192
|
+
- setTogglechat whenever navigates page.
|
|
193
|
+
Note for toggle showWelcome:
|
|
194
|
+
- setShowWelcome whenever see welcome screen vs nonwelcome
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="44" height="44" fill="#ffffff" viewBox="0 0 256 256"><path d="M132,24A100.11,100.11,0,0,0,32,124v84.33A15.69,15.69,0,0,0,47.67,224H132a100,100,0,0,0,0-200Zm28,128H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Zm0-32H96a8,8,0,0,1,0-16h64a8,8,0,0,1,0,16Z"></path></svg>
|
|
Binary file
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg id="Layer_1" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 202.1 47.7">
|
|
3
|
+
<!-- Generator: Adobe Illustrator 29.4.0, SVG Export Plug-In . SVG Version: 2.1.0 Build 152) -->
|
|
4
|
+
<defs>
|
|
5
|
+
<style>
|
|
6
|
+
.st0, .st1 {
|
|
7
|
+
fill: #fff;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.st1 {
|
|
11
|
+
fill-rule: evenodd;
|
|
12
|
+
}
|
|
13
|
+
</style>
|
|
14
|
+
</defs>
|
|
15
|
+
<g>
|
|
16
|
+
<path class="st0" d="M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,0,0,.2.1.3,0,.1,0,.2-.1.3,0,0-.2.2-.3.2-.1,0-.3,0-.5,0s-.4,0-.6-.1c-.2,0-.3-.2-.4-.3s-.1-.3-.2-.5h-1.8c0,.6.1,1,.4,1.4s.6.6,1,.8c.4.2,1,.3,1.6.3s1.1,0,1.5-.2c.4-.2.7-.4,1-.7.2-.3.3-.7.3-1.1,0-.3,0-.5-.1-.7,0-.2-.2-.4-.4-.6Z"/>
|
|
35
|
+
<path class="st0" d="M112.2,35.7c-.5-.3-1.1-.4-1.7-.4s-1.2.1-1.7.4c-.5.3-.9.7-1.2,1.2-.3.5-.4,1.2-.4,1.9s.1,1.4.4,1.9c.3.5.7.9,1.2,1.2.5.3,1.1.4,1.7.4s1.2-.1,1.7-.4c.5-.3.9-.7,1.2-1.2.3-.5.4-1.2.4-1.9s-.1-1.4-.4-1.9c-.3-.5-.7-.9-1.2-1.2ZM111.8,39.8c-.1.3-.3.5-.5.6-.2.1-.5.2-.8.2s-.6,0-.8-.2c-.2-.1-.4-.4-.5-.6-.1-.3-.2-.6-.2-1s0-.8.2-1c.1-.3.3-.5.5-.6.2-.1.5-.2.8-.2s.6,0,.8.2c.2.1.4.4.5.6.1.3.2.6.2,1s0,.8-.2,1Z"/>
|
|
36
|
+
<polygon class="st0" points="119.3 39 119.2 39 116.8 35.4 115.2 35.4 115.2 42.2 117.1 42.2 117.1 38.6 117.1 38.6 119.6 42.2 121.1 42.2 121.1 35.4 119.3 35.4 119.3 39"/>
|
|
37
|
+
<path class="st0" d="M124.5,35.4l-2.3,6.8h2l.4-1.3h2.3l.4,1.3h2l-2.3-6.8h-2.5ZM125.1,39.5l.7-2.3h0l.7,2.3h-1.4Z"/>
|
|
38
|
+
<polygon class="st0" points="132.3 35.4 130.5 35.4 130.5 42.2 135.1 42.2 135.1 40.7 132.3 40.7 132.3 35.4"/>
|
|
39
|
+
<path class="st0" d="M140.7,35.4l-2.3,6.8h2l.4-1.3h2.3l.4,1.3h2l-2.3-6.8h-2.5ZM141.2,39.5l.7-2.3h0l.7,2.3h-1.4Z"/>
|
|
40
|
+
<rect class="st0" x="146.6" y="35.4" width="1.9" height="6.8"/>
|
|
41
|
+
<path class="st0" d="M154.7,37.1c.2-.2.5-.2.8-.2s.3,0,.5,0c.1,0,.3.1.4.2,0,0,.2.2.2.3,0,.1,0,.3.1.4h1.9c0-.4-.1-.8-.3-1.1-.2-.3-.4-.6-.7-.8-.3-.2-.6-.4-1-.5s-.8-.2-1.2-.2c-.6,0-1.2.1-1.7.4-.5.3-.9.7-1.2,1.2-.3.5-.4,1.2-.4,1.9s.1,1.4.4,1.9.7.9,1.2,1.2c.5.3,1.1.4,1.7.4s.9,0,1.3-.2.7-.4,1-.6c.3-.3.5-.5.6-.8.1-.3.2-.6.2-.9h-1.9c0,.1,0,.3-.1.4,0,.1-.1.2-.2.3-.1,0-.2.1-.4.2-.1,0-.3,0-.5,0-.3,0-.6,0-.8-.2s-.4-.4-.5-.6c-.1-.3-.2-.6-.2-1.1s0-.7.2-1,.3-.5.5-.7Z"/>
|
|
42
|
+
<polygon class="st0" points="164.2 38 161.7 38 161.7 35.4 159.9 35.4 159.9 42.2 161.7 42.2 161.7 39.5 164.2 39.5 164.2 42.2 166.1 42.2 166.1 35.4 164.2 35.4 164.2 38"/>
|
|
43
|
+
<path class="st0" d="M169.4,35.4l-2.3,6.8h2l.4-1.3h2.3l.4,1.3h2l-2.3-6.8h-2.5ZM170,39.5l.7-2.3h0l.7,2.3h-1.4Z"/>
|
|
44
|
+
<polygon class="st0" points="174.3 36.9 176.4 36.9 176.4 42.2 178.2 42.2 178.2 36.9 180.3 36.9 180.3 35.4 174.3 35.4 174.3 36.9"/>
|
|
45
|
+
<path class="st0" d="M186.3,38.9c-.2-.1-.5-.2-.8-.2h0c.3-.1.5-.2.7-.4s.4-.3.5-.5.2-.4.2-.7,0-.6-.3-.9c-.2-.3-.5-.5-.8-.6-.4-.1-.8-.2-1.3-.2h-3v6.8h3.2c.5,0,.9,0,1.3-.3.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.9.9-2.3,1.5-3.7,1.5H5.8c-1.4,0-2.7-.6-3.7-1.5-.9-.9-1.5-2.2-1.5-3.6V5.9c0-1.4.6-2.7,1.5-3.6,1-.9,2.3-1.5,3.7-1.5"/>
|
|
50
|
+
<path class="st1" d="M35.4,5h0c-.5-.5-1.3-.9-2.1-.9H7.1c-.8,0-1.6.3-2.1.9-.5.5-.9,1.3-.9,2.1v33.4c0,.8.3,1.6.9,2.1.5.5,1.3.9,2.1.9h26.3c.8,0,1.6-.3,2.1-.9.5-.5.9-1.3.9-2.1V7.1c0-.8-.3-1.6-.9-2.1M16.8,38.8c-.3-.2-.4-.5-.7-.9-1.2-1.8-.6-4.2,1.2-5.1-1.4,1.2-1.2,3.5,0,5.3.2.2.4.5.5.7h-.9ZM33.3,38.9h-2.6s-6.2,0-6.2,0c.2-.3.3-.5.4-.8,1.5-3.8,0-8,1.4-11.9-2.4,2.6-5.9,3.3-8.7,5.1-2.9,1.6-3.8,5.1-2.4,7.6h-6.3s-1.7,0-1.7,0V8.4h7v11.8h12.1v-11.8h7v30.4Z"/>
|
|
51
|
+
</svg>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.LoadingTips = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _Ionicons = _interopRequireDefault(require("react-native-vector-icons/Ionicons"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
+
const tips = [{
|
|
13
|
+
text: 'Use 👍👎 next to each response to help us improve AI Assistant',
|
|
14
|
+
icon: ''
|
|
15
|
+
}, {
|
|
16
|
+
text: '🗑️ Clear the chat history after each conversation for continued accurate responses',
|
|
17
|
+
icon: ''
|
|
18
|
+
}, {
|
|
19
|
+
text: 'Use 📧 to send any questions to the current branch support',
|
|
20
|
+
icon: ''
|
|
21
|
+
}];
|
|
22
|
+
const LoadingTips = () => {
|
|
23
|
+
const [currentTip, setCurrentTip] = (0, _react.useState)(0);
|
|
24
|
+
const fadeAnim = (0, _react.useRef)(new _reactNative.Animated.Value(1)).current;
|
|
25
|
+
const jumpAnim = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
|
|
26
|
+
(0, _react.useEffect)(() => {
|
|
27
|
+
// Fade in/out for tip changes
|
|
28
|
+
const tipInterval = setInterval(() => {
|
|
29
|
+
// Fade out
|
|
30
|
+
_reactNative.Animated.timing(fadeAnim, {
|
|
31
|
+
toValue: 0,
|
|
32
|
+
duration: 500,
|
|
33
|
+
useNativeDriver: true
|
|
34
|
+
}).start(() => {
|
|
35
|
+
// Change tip and fade in
|
|
36
|
+
setCurrentTip(prev => (prev + 1) % tips.length);
|
|
37
|
+
_reactNative.Animated.timing(fadeAnim, {
|
|
38
|
+
toValue: 1,
|
|
39
|
+
duration: 500,
|
|
40
|
+
useNativeDriver: true
|
|
41
|
+
}).start();
|
|
42
|
+
});
|
|
43
|
+
}, 4000);
|
|
44
|
+
|
|
45
|
+
// Jump animation
|
|
46
|
+
const jumpInterval = setInterval(() => {
|
|
47
|
+
_reactNative.Animated.sequence([_reactNative.Animated.timing(jumpAnim, {
|
|
48
|
+
toValue: -5,
|
|
49
|
+
duration: 250,
|
|
50
|
+
useNativeDriver: true
|
|
51
|
+
}), _reactNative.Animated.timing(jumpAnim, {
|
|
52
|
+
toValue: 0,
|
|
53
|
+
duration: 250,
|
|
54
|
+
useNativeDriver: true
|
|
55
|
+
})]).start();
|
|
56
|
+
}, 2000);
|
|
57
|
+
return () => {
|
|
58
|
+
clearInterval(tipInterval);
|
|
59
|
+
clearInterval(jumpInterval);
|
|
60
|
+
};
|
|
61
|
+
}, []);
|
|
62
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
63
|
+
style: [styles.container, {
|
|
64
|
+
opacity: fadeAnim
|
|
65
|
+
}]
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Animated.View, {
|
|
67
|
+
style: {
|
|
68
|
+
transform: [{
|
|
69
|
+
translateY: jumpAnim
|
|
70
|
+
}]
|
|
71
|
+
}
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_Ionicons.default, {
|
|
73
|
+
name: "bulb-outline",
|
|
74
|
+
size: 16,
|
|
75
|
+
color: "#367CB6"
|
|
76
|
+
})), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
77
|
+
style: styles.tipText
|
|
78
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
79
|
+
style: styles.tipIcon
|
|
80
|
+
}, tips[currentTip].icon, " "), tips[currentTip].text));
|
|
81
|
+
};
|
|
82
|
+
exports.LoadingTips = LoadingTips;
|
|
83
|
+
const styles = _reactNative.StyleSheet.create({
|
|
84
|
+
container: {
|
|
85
|
+
flexDirection: 'row',
|
|
86
|
+
alignItems: 'center',
|
|
87
|
+
padding: 10,
|
|
88
|
+
marginLeft: 15,
|
|
89
|
+
borderRadius: 8,
|
|
90
|
+
marginBottom: 8,
|
|
91
|
+
flex: 1
|
|
92
|
+
},
|
|
93
|
+
tipText: {
|
|
94
|
+
marginLeft: 8,
|
|
95
|
+
fontSize: 14,
|
|
96
|
+
color: '#303030',
|
|
97
|
+
flexShrink: 1
|
|
98
|
+
},
|
|
99
|
+
tipIcon: {
|
|
100
|
+
marginRight: 5,
|
|
101
|
+
fontSize: 16
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
//# sourceMappingURL=LoadingTips.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_Ionicons","_interopRequireDefault","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","tips","text","icon","LoadingTips","currentTip","setCurrentTip","useState","fadeAnim","useRef","Animated","Value","current","jumpAnim","useEffect","tipInterval","setInterval","timing","toValue","duration","useNativeDriver","start","prev","length","jumpInterval","sequence","clearInterval","createElement","View","style","styles","container","opacity","transform","translateY","name","size","color","Text","tipText","tipIcon","exports","StyleSheet","create","flexDirection","alignItems","padding","marginLeft","borderRadius","marginBottom","flex","fontSize","flexShrink","marginRight"],"sourceRoot":"../../../src","sources":["components/LoadingTips.js"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AAA0D,SAAAG,uBAAAC,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAK,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,C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