react-native-srschat 0.1.25 → 0.1.26

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.
Files changed (2) hide show
  1. package/README.md +0 -104
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -6,107 +6,3 @@
6
6
  Installing the package:
7
7
  `npm i react-native-srschat`
8
8
 
9
- ### Example Implementation
10
-
11
- ```
12
- import React, { useState } from 'react';
13
- import { View, StyleSheet, Button } from 'react-native';
14
- import { Chat } from 'react-native-srschat';
15
-
16
- export default function App() {
17
- const [showIcon, setShowIcon] = useState(true);
18
- const [toggleChat, setToggleChat] = useState(false);
19
-
20
- const onProductCardClick = (productData) => {
21
- console.log('Product Card Clicked:', productData);
22
- };
23
-
24
- const onAddToCartClick = (productData) => {
25
- console.log('Added to Cart:', productData);
26
- };
27
-
28
- const data = {
29
- "env":"stage",
30
- "customer_code": "HPTA",
31
- "branch_code": "BELHARR",
32
- "active_ship_to": 1,
33
- "branch_full_name": "BEL-AQUA HARRISBURG",
34
- "branch_email": "OrdersHarrisburg@bel-aqua.com",
35
- "customer_token": "eyJraWQiOiIxIiwiYWxnIjoiSFMyNTYifQ.eyJ1aWQiOjExMTM4MCwidXR5cGlkIjozLCJpYXQiOjE3NDI5OTQzNDQsImV4cCI6MTc0MzAyMzE0NH0.9-foLr2JwxS9_1s6VV0YLfTWWlb1QpsVw_IvhhIoXhc"
36
- }
37
-
38
- const uiConfig = {
39
- testButtons: false, // show the test buttons for onProductCardClick and onAddToCartClick – defaults to false
40
- iconType: "button", // "button" or "tab" – defaults to button
41
- iconPosition: { // ex. button { bottom: 80, right: 20 } tab { bottom: 600, right: 0 } – defaults to { bottom: 80, right: 20 }
42
- bottom: 80,
43
- right: 20,
44
- },
45
- showIcon: showIcon, // true or false, show the chat icon – no prop defaults to true
46
- toggleChat: toggleChat // toggle the chat window
47
- }
48
-
49
- return (
50
- <>
51
- <View style={styles.container}>
52
- <View style={styles.container}>
53
- <Button title="Toggle Chat" onPress={() => setToggleChat(prev => !prev)}/>
54
- <Button title="Show Icon" onPress={() => setShowIcon(prev => !prev)} />
55
- </View>
56
- </View>
57
- <Chat
58
- data={data}
59
- onProductCardClick={onProductCardClick}
60
- onAddToCartClick={onAddToCartClick}
61
- uiConfig={uiConfig}
62
- />
63
- </>
64
- );
65
- }
66
-
67
- const styles = StyleSheet.create({
68
- container: {
69
- flex: 1,
70
- backgroundColor: '#fff',
71
- marginTop: 200
72
- },
73
- });
74
- ```
75
-
76
- ### Example Implementation
77
-
78
- With successful integration, you should see the bubble pop up in the bottom right corner of the screen.
79
-
80
- Clicking on the bubble will pull up the chat interface. The chat is **still in development**. There are currently two placeholder buttons that execute the funtions *onProductCardClick* and *onAddToCartClick*. These functions will send a product payload.
81
-
82
- ### To Do (HERITAGE)
83
-
84
- * Create a function for onProductCardClick to navigate to the product page when clicked.
85
- * Create a function for onAddToCartClick to add the associated quantity and item to cart.
86
- * Pass through the data needed for the chat (listed in the example implementation).
87
-
88
- ### To Do (INSTALILY)
89
- * Set up voice functionality
90
-
91
- ### Dev Instructions (INSTALILY)
92
-
93
- Installing packages for srschat
94
- `npm install`
95
-
96
- Install example
97
- `cd example`
98
- `npm install`
99
-
100
- Install pods (in example still)
101
- `npx pod-install`
102
- or
103
- `cd ios`
104
- `pod install --repo-update`
105
-
106
- Run example
107
- `npm start`
108
-
109
- Publishing
110
- `yarn build`
111
- `npm login`
112
- `yarn publish`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-srschat",
3
- "version": "0.1.25",
3
+ "version": "0.1.26",
4
4
  "private": false,
5
5
  "description": "A modern, sophisticated chat interface for React Native",
6
6
  "main": "lib/commonjs/index",