Skip to content

Commit c73034a

Browse files
authored
Merge pull request #4 from botstar/develop
Release v0.1.0
2 parents 9c2bdb3 + ea74ad1 commit c73034a

10 files changed

+72
-110
lines changed

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Thank you for your interest in developing ChativeWidget! Below is a detailed gui
66

77
1. Clone the repository to your local machine:
88
```
9-
git clone https://github.com/botstar/chative-react-native-widget.git
10-
cd chative-react-native-widget
9+
git clone https://github.com/botstar/@chative.io/react-native-widget.git
10+
cd @chative.io/react-native-widget
1111
```
1212

1313
2. Install dependencies:
@@ -58,7 +58,7 @@ After you've completed your changes and want to test them:
5858
yarn livechat
5959
```
6060
This command will perform the following steps:
61-
- Remove the current version of chative-react-native-widget
61+
- Remove the current version of @chative.io/react-native-widget
6262
- Clear the yarn cache
6363
- Install the new version from the .tgz file
6464

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ Chative Widget is a React Native component that provides an easy-to-use chat wid
1717
## Installation
1818

1919
```bash
20-
npm install chative-react-native-widget
20+
npm install @chative.io/react-native-widget
2121
# or
22-
yarn add chative-react-native-widget
22+
yarn add @chative.io/react-native-widget
2323
```
2424

2525
This library depends on [react-native-webview](https://www.npmjs.com/package/react-native-webview) and [async-storage](https://github.com/react-native-async-storage/async-storage). Please follow the instructions provided in the docs.
@@ -31,7 +31,7 @@ Here's a basic example of how to use the ChativeWidget in your React Native appl
3131
```jsx
3232
import React, { useRef } from 'react';
3333
import { Button, View } from 'react-native';
34-
import ChativeWidget from 'chative-react-native-widget';
34+
import ChativeWidget from '@chative.io/react-native-widget';
3535

3636
export default function App() {
3737
const widgetRef = useRef(null);
@@ -98,7 +98,7 @@ You can customize the appearance of the widget by providing a custom header comp
9898
This module includes TypeScript declarations. You can import types like this:
9999
100100
```typescript
101-
import ChativeWidget, { ChativeWidgetRef } from 'chative-react-native-widget';
101+
import ChativeWidget, { ChativeWidgetRef } from '@chative.io/react-native-widget';
102102
```
103103
104104
## License

examples/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ChativeWidget from 'chative-react-native-widget';
1+
import ChativeWidget from '@chative.io/react-native-widget';
22
import React, { useRef } from 'react';
33
import { Button, SafeAreaView, StyleSheet, View } from 'react-native';
44

examples/WebView.js

Lines changed: 0 additions & 52 deletions
This file was deleted.

examples/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,16 @@
77
"android": "expo start --android",
88
"ios": "expo start --ios",
99
"web": "expo start --web",
10-
"livechat": "yarn remove chative-react-native-widget && yarn cache clean && yarn add ../chative-react-native-widget-v0.0.1.tgz"
10+
"livechat": "yarn remove @chative.io/react-native-widget && yarn cache clean && yarn add ../chative.io-react-native-widget-v0.0.1.tgz"
1111
},
1212
"dependencies": {
13+
"@chative.io/react-native-widget": "../chative.io-react-native-widget-v0.0.1.tgz",
1314
"@react-native-async-storage/async-storage": "^1.23.1",
14-
"chative-react-native-widget": "../chative-react-native-widget-v0.0.1.tgz",
1515
"expo": "~51.0.20",
1616
"expo-status-bar": "~1.12.1",
1717
"react": "18.2.0",
1818
"react-native": "0.74.3",
19-
"react-native-webview": "^13.8.6"
19+
"react-native-webview": "13.8.6"
2020
},
2121
"devDependencies": {
2222
"@babel/core": "^7.20.0"

examples/yarn.lock

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@
6868
trim-right "^1.0.1"
6969

7070
"@babel/generator@^7.20.0", "@babel/generator@^7.20.5", "@babel/generator@^7.24.8", "@babel/generator@^7.24.9":
71-
version "7.24.9"
72-
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.9.tgz#5c2575a1070e661bbbc9df82a853989c9a656f12"
73-
integrity sha512-G8v3jRg+z8IwY1jHFxvCNhOPYPterE4XljNgdGTYfSTtzzwjIswIzIaSPSLs3R7yFuqnqNeay5rjICfqVr+/6A==
71+
version "7.24.10"
72+
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.24.10.tgz#a4ab681ec2a78bbb9ba22a3941195e28a81d8e76"
73+
integrity sha512-o9HBZL1G2129luEUlG1hB4N/nlYNWHnpwlND9eOMclRqqu1YDy2sSYVCFUZwl8I1Gxh+QSRrP2vD7EpUmFVXxg==
7474
dependencies:
7575
"@babel/types" "^7.24.9"
7676
"@jridgewell/gen-mapping" "^0.3.5"
@@ -796,6 +796,10 @@
796796
"@babel/helper-validator-identifier" "^7.24.7"
797797
to-fast-properties "^2.0.0"
798798

799+
"@chative.io/react-native-widget@../chative.io-react-native-widget-v0.0.1.tgz":
800+
version "0.0.1"
801+
resolved "../chative.io-react-native-widget-v0.0.1.tgz#2a83d779d7f53b04c981b12c1f666ce221e6c532"
802+
799803
"@expo/bunyan@^4.0.0":
800804
version "4.0.0"
801805
resolved "https://registry.yarnpkg.com/@expo/bunyan/-/bunyan-4.0.0.tgz#be0c1de943c7987a9fbd309ea0b1acd605890c7b"
@@ -1289,9 +1293,9 @@
12891293
integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==
12901294

12911295
"@react-native-async-storage/async-storage@^1.23.1":
1292-
version "1.23.1"
1293-
resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.23.1.tgz#cad3cd4fab7dacfe9838dce6ecb352f79150c883"
1294-
integrity sha512-Qd2kQ3yi6Y3+AcUlrHxSLlnBvpdCEMVGFlVBneVOjaFaPU61g1huc38g339ysXspwY1QZA2aNhrk/KlHGO+ewA==
1296+
version "1.24.0"
1297+
resolved "https://registry.yarnpkg.com/@react-native-async-storage/async-storage/-/async-storage-1.24.0.tgz#888efbc62a26f7d9464b32f4d3027b7f2771999b"
1298+
integrity sha512-W4/vbwUOYOjco0x3toB8QCr7EjIP6nE9G7o8PMguvvjYT5Awg09lyV4enACRx4s++PPulBiBSjL0KTFx2u0Z/g==
12951299
dependencies:
12961300
merge-options "^3.0.4"
12971301

@@ -1690,16 +1694,16 @@
16901694
"@types/node" "*"
16911695

16921696
"@types/node@*":
1693-
version "20.14.10"
1694-
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.10.tgz#a1a218290f1b6428682e3af044785e5874db469a"
1695-
integrity sha512-MdiXf+nDuMvY0gJKxyfZ7/6UFsETO7mGKF54MVD/ekJS6HdFtpZFBgrh6Pseu64XTb2MLyFPlbW6hj8HYRQNOQ==
1697+
version "20.14.11"
1698+
resolved "https://registry.yarnpkg.com/@types/node/-/node-20.14.11.tgz#09b300423343460455043ddd4d0ded6ac579b74b"
1699+
integrity sha512-kprQpL8MMeszbz6ojB5/tU8PLN4kesnN8Gjzw349rDlNgsSzg90lAVj3llK99Dh7JON+t9AuscPPFW6mPbTnSA==
16961700
dependencies:
16971701
undici-types "~5.26.4"
16981702

16991703
"@types/node@^18.0.0":
1700-
version "18.19.39"
1701-
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.39.tgz#c316340a5b4adca3aee9dcbf05de385978590593"
1702-
integrity sha512-nPwTRDKUctxw3di5b4TfT3I0sWDiWoPQCZjXhvdkINntwr8lcoVCKsTgnXeRubKIlfnV+eN/HYk6Jb40tbcEAQ==
1704+
version "18.19.40"
1705+
resolved "https://registry.yarnpkg.com/@types/node/-/node-18.19.40.tgz#e9213ba98122992dafd8d55a2196f2ebb56b2555"
1706+
integrity sha512-MIxieZHrm4Ee8XArBIc+Or9HINt2StOmCbgRcXGSJl8q14svRvkZPe7LJq9HKtTI1SK3wU8b91TjntUm7T69Pg==
17031707
dependencies:
17041708
undici-types "~5.26.4"
17051709

@@ -2263,10 +2267,6 @@ charenc@0.0.2, charenc@~0.0.1:
22632267
resolved "https://registry.yarnpkg.com/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667"
22642268
integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==
22652269

2266-
chative-react-native-widget@../chative-react-native-widget-v0.0.1.tgz:
2267-
version "0.0.1"
2268-
resolved "../chative-react-native-widget-v0.0.1.tgz#6b64d0e39773d3160899c53c54fe01236f1e76e2"
2269-
22702270
chownr@^2.0.0:
22712271
version "2.0.0"
22722272
resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece"
@@ -2955,10 +2955,10 @@ expo-file-system@~17.0.1:
29552955
resolved "https://registry.yarnpkg.com/expo-file-system/-/expo-file-system-17.0.1.tgz#b9f8af8c1c06ec71d96fd7a0d2567fa9e1c88f15"
29562956
integrity sha512-dYpnZJqTGj6HCYJyXAgpFkQWsiCH3HY1ek2cFZVHFoEc5tLz9gmdEgTF6nFHurvmvfmXqxi7a5CXyVm0aFYJBw==
29572957

2958-
expo-font@~12.0.8:
2959-
version "12.0.8"
2960-
resolved "https://registry.yarnpkg.com/expo-font/-/expo-font-12.0.8.tgz#23b769063ba72484c767a4fdb0ff3a26d23645d2"
2961-
integrity sha512-xK9kOEyD/vnREicM5yS2uVwzB83weu+UE6QwJRH2dhoQcdJiWGGKOj+blJ8GrtU+BqtyNijyWcwfBbYOJnf8eQ==
2958+
expo-font@~12.0.9:
2959+
version "12.0.9"
2960+
resolved "https://registry.yarnpkg.com/expo-font/-/expo-font-12.0.9.tgz#096860a6b8b5dd54152262eafd318593ec2db48c"
2961+
integrity sha512-seTCyf0tbgkAnp3ZI9ZfK9QVtURQUgFnuj+GuJ5TSnN0XsOtVe1s2RxTvmMgkfuvfkzcjJ69gyRpsZS1cC8hjw==
29622962
dependencies:
29632963
fontfaceobserver "^2.1.0"
29642964

@@ -2991,9 +2991,9 @@ expo-status-bar@~1.12.1:
29912991
integrity sha512-/t3xdbS8KB0prj5KG5w7z+wZPFlPtkgs95BsmrP/E7Q0xHXTcDcQ6Cu2FkFuRM+PKTb17cJDnLkawyS5vDLxMA==
29922992

29932993
expo@~51.0.20:
2994-
version "51.0.20"
2995-
resolved "https://registry.yarnpkg.com/expo/-/expo-51.0.20.tgz#e34ce895875e29bb46a818ff5be7178b4fce2bfb"
2996-
integrity sha512-EmNZel6j7pU4YF1QcIcgpVdYsA1lASQcEw9PPSevjreNT6nlge2CNHB6mAphAKGz5PdgcWYBn/v4qQj1/FJuZQ==
2994+
version "51.0.21"
2995+
resolved "https://registry.yarnpkg.com/expo/-/expo-51.0.21.tgz#91cb8b78d25ebed4e849f3a25881f25b75bcfe18"
2996+
integrity sha512-tCKJUw4U4F15FecFPwJTFnAwHZMmUD1Wm7FX0Z/Oj3Jr14MOkom8Lnt2OkBK6BtM91lz33EF9OhgqReX6kchLA==
29972997
dependencies:
29982998
"@babel/runtime" "^7.20.0"
29992999
"@expo/cli" "0.18.25"
@@ -3004,7 +3004,7 @@ expo@~51.0.20:
30043004
babel-preset-expo "~11.0.12"
30053005
expo-asset "~10.0.10"
30063006
expo-file-system "~17.0.1"
3007-
expo-font "~12.0.8"
3007+
expo-font "~12.0.9"
30083008
expo-keep-awake "~13.0.2"
30093009
expo-modules-autolinking "1.11.1"
30103010
expo-modules-core "1.12.19"
@@ -4717,9 +4717,9 @@ node-int64@^0.4.0:
47174717
integrity sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==
47184718

47194719
node-releases@^2.0.14:
4720-
version "2.0.14"
4721-
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.14.tgz#2ffb053bceb8b2be8495ece1ab6ce600c4461b0b"
4722-
integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==
4720+
version "2.0.17"
4721+
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.17.tgz#d74bc4fec38d839eec5db2a3c9c963d4f33cb366"
4722+
integrity sha512-Ww6ZlOiEQfPfXM45v17oabk77Z7mg5bOt7AjDyzy7RjK9OrLrLC8dyZQoAPEOtFX9SaNf1Tdvr5gRJWdTJj7GA==
47234723

47244724
node-stream-zip@^1.9.1:
47254725
version "1.15.0"
@@ -5235,7 +5235,7 @@ react-is@^17.0.1:
52355235
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
52365236
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
52375237

5238-
react-native-webview@^13.8.6:
5238+
react-native-webview@13.8.6:
52395239
version "13.8.6"
52405240
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.8.6.tgz#5d4a62cb311d5ef8d910a8e112b3f1f2807bcd18"
52415241
integrity sha512-jtZ9OgB2AN6rhDwto6dNL3PtOtl/SI4VN93pZEPbMLvRjqHfxiUrilGllL5fKAXq5Ry5FJyfUi82A4Ii8olZ7A==
@@ -5575,9 +5575,9 @@ semver@^6.3.1:
55755575
integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==
55765576

55775577
semver@^7.3.5, semver@^7.5.2, semver@^7.5.4, semver@^7.6.0:
5578-
version "7.6.2"
5579-
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.2.tgz#1e3b34759f896e8f14d6134732ce798aeb0c6e13"
5580-
integrity sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==
5578+
version "7.6.3"
5579+
resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143"
5580+
integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==
55815581

55825582
send@0.18.0, send@^0.18.0:
55835583
version "0.18.0"
@@ -6062,9 +6062,9 @@ terminal-link@^2.1.1:
60626062
supports-hyperlinks "^2.0.0"
60636063

60646064
terser@^5.15.0:
6065-
version "5.31.2"
6066-
resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.2.tgz#b5ca188107b706084dca82f988089fa6102eba11"
6067-
integrity sha512-LGyRZVFm/QElZHy/CPr/O4eNZOZIzsrQ92y4v9UJe/pFJjypje2yI3C2FmPtvUEnhadlSbmG2nXtdcjHOjCfxw==
6065+
version "5.31.3"
6066+
resolved "https://registry.yarnpkg.com/terser/-/terser-5.31.3.tgz#b24b7beb46062f4653f049eea4f0cd165d0f0c38"
6067+
integrity sha512-pAfYn3NIZLyZpa83ZKigvj6Rn9c/vd5KfYGX7cN1mnzqgDcxWvrU5ZtAfIKhEXz9nRecw4z3LXkjaq96/qZqAA==
60686068
dependencies:
60696069
"@jridgewell/source-map" "^0.3.3"
60706070
acorn "^8.8.2"

index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { ReactElement } from 'react';
44
import { ViewStyle } from 'react-native';
55

6-
declare module 'chative-react-native-widget' {
6+
declare module '@chative.io/react-native-widget' {
77
export interface ChativeWidgetProps {
88
channelId: string;
99
headerComponent?: ReactElement;

package.json

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "chative-react-native-widget",
3-
"version": "0.0.1",
2+
"name": "@chative.io/react-native-widget",
3+
"version": "0.1.0",
44
"description": "React Native SDK for Chative",
55
"main": "index.js",
66
"scripts": {
@@ -41,14 +41,29 @@
4141
]
4242
},
4343
"keywords": [
44-
"sdk",
45-
"livechat",
46-
"react",
47-
"native",
48-
"chative",
49-
"widget",
50-
"chat",
51-
"customer-support"
44+
"sdk",
45+
"livechat",
46+
"react",
47+
"native",
48+
"chative",
49+
"widget",
50+
"chat",
51+
"customer-support",
52+
"react-native",
53+
"messaging",
54+
"real-time",
55+
"communication",
56+
"mobile",
57+
"ios",
58+
"android",
59+
"support-tool",
60+
"customer-service",
61+
"engagement",
62+
"chatbot",
63+
"helpdesk",
64+
"crm",
65+
"conversational-ui",
66+
"cross-platform"
5267
],
5368
"author": "chative",
5469
"license": "MIT",

src/ChativeWidget.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ const styles = StyleSheet.create({
8585
left: 0,
8686
right: 0,
8787
bottom: 0,
88-
backgroundColor: 'red',
8988
},
9089
mainView: {
9190
flex: 1,

src/WebView.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const WebViewComponent = forwardRef(({ channelId, onLoaded, onClosedWidget, onNe
3535
}}
3636
onLoadEnd={() => {
3737
webViewRef.current?.injectJavaScript(javascript);
38-
onLoaded();
38+
onLoaded && onLoaded();
3939
}}
4040
onMessage={(event) => {
4141
const { data } = event.nativeEvent;

0 commit comments

Comments
 (0)