{"_id":"@alf-team/react-native-zendesk-chat","_rev":"2-26b5e993a9e56957412a018533c1292b","name":"@alf-team/react-native-zendesk-chat","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@alf-team/react-native-zendesk-chat","version":"1.0.0","description":"React Native Wrapper around Zopim Zendesk Chat","main":"index.js","types":"RNZendeskChat.d.ts","repository":{"type":"git","url":"git+https://github.com/tinni95/react-native-zendesk-chat.git"},"scripts":{"prettier":"prettier","prettier:all":"prettier --write '**/*.json' '**/*.js' '**/*.ts' ","lint":"eslint"},"keywords":["zendesk","chat","react-native","react","ios","android","react-component"],"homepage":"https://github.com/taskrabbit/react-native-zendesk-chat.git","bugs":{"url":"https://github.com/taskrabbit/react-native-zendesk-chat/issues"},"author":{"name":"jrichardlai"},"contributors":[{"name":"Brian Leonard","email":"brian@taskrabbit.com"},{"name":"Frederic Barthelemy","email":"frederic@taskrabbit.com"},{"name":"Jean-Richard Lai","email":"github.com/jrichardlai"},{"name":"Jordan Smith","email":"jordan@taskrabbit.com"},{"name":"Michael Kachanovskyi","email":"mikach27@gmail.com"},{"name":"Robert Murray","email":"rmurray@taskrabbit.com"},{"name":"Zane Chua","email":"github.com/zanechua"}],"license":"MIT","gitHead":"1c55763a278c7a07fd7247d7bcd1a5dee4833b99","_id":"@alf-team/react-native-zendesk-chat@1.0.0","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-C+eixz6n7M7Cd31tXyD1mdTLvttpnzw3ceeI1FTAT1tNOQEgLAU+JmFvntFleeYw+GUoBub6hlHSKO9iaUIR1w==","shasum":"79afec001a7d7e68a4d511b12f1dc88c63ddcc05","tarball":"https://registry.npmjs.org/@alf-team/react-native-zendesk-chat/-/react-native-zendesk-chat-1.0.0.tgz","fileCount":26,"unpackedSize":131432,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvPLbCRA9TVsSAnZWagAA3zYP/Ap8UVrm8umyQ/uOqPUu\nyoVyF66xPYWMJ/rKj6+BMgsHIKtYi1Sdx0mCJAhlVj9vgjooEv3PdUvBD+wK\nMHKIti0he8ucR1nVoSytvbRo2q6Gs2ZLda9UhTQpZoQo+cHbEUEmMcIUuyQ6\n9GmIdNL5boWkN2lhIGvmFej/RpaNzVA/l7Z8Uly5h8eC1BR7xVP5k84+OF4D\ne5yc4IiTo9ss16vd8s4NE9Kx2YqGS7JbPaFSIxex5OD6BTERwzUBqiVXOVpN\nyrL1Km9FcSBEJoDLFvfRQ8nZYyO45zLzpGBc3V4AlwcFDK47z77mXCQE0zPH\nkvuI2R321UJeBp002xIXZbupFjENFvqNfLGvDNGoeYlJQrDQuB/NWLW3c1gi\ntbinsHhY2NSGxQv+stTOaAGF93ZB+MuoxixNYeQRKQoxUrfTIL3wP8U/Ajir\nV30VT4LH4zYq3gvesgfpPSji6kZuecqi9gmzjkaOkTO/UBtLJXmgUDUYFq9I\nueR5eqLAUacLku5iYQv7+VMO7XY9W1n0a2YhXDZIZq3ET/twzAfgKFPDYnq+\nRiQt71Kmu1x8ehpRgshJxOdrpjtgIgTBP/p0rrU4bOaqc8j7kpHtKrE9V66X\nf0GCHl032vCY+DxxEm2Eqwa+J+rBqLFbnHx3nZ9k6JA0VwOg+K+TUSAS9sK7\nt55V\r\n=NHGA\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCt1e8CmtPkxOxWqYOzkuYdUR2mhN2vx79xMqwhe13ulgIgCWbEuZiovu8RlAmvHoTSXfaEEiN/iIddDzSnJpkw4ok="}]},"_npmUser":{"name":"giocode","email":"g.damico241095@gmail.com"},"directories":{},"maintainers":[{"name":"giocode","email":"g.damico241095@gmail.com"},{"name":"mirkoricci94","email":"m.ricci@alfonsino.delivery"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-zendesk-chat_1.0.0_1606218459211_0.4227705421740551"},"_hasShrinkwrap":false},"1.0.1":{"name":"@alf-team/react-native-zendesk-chat","version":"1.0.1","description":"React Native Wrapper around Zopim Zendesk Chat","main":"index.js","types":"RNZendeskChat.d.ts","repository":{"type":"git","url":"git+https://github.com/tinni95/react-native-zendesk-chat.git"},"scripts":{"prettier":"prettier","prettier:all":"prettier --write '**/*.json' '**/*.js' '**/*.ts' ","lint":"eslint"},"keywords":["zendesk","chat","react-native","react","ios","android","react-component"],"homepage":"https://github.com/taskrabbit/react-native-zendesk-chat.git","bugs":{"url":"https://github.com/taskrabbit/react-native-zendesk-chat/issues"},"author":{"name":"jrichardlai"},"contributors":[{"name":"Brian Leonard","email":"brian@taskrabbit.com"},{"name":"Frederic Barthelemy","email":"frederic@taskrabbit.com"},{"name":"Jean-Richard Lai","email":"github.com/jrichardlai"},{"name":"Jordan Smith","email":"jordan@taskrabbit.com"},{"name":"Michael Kachanovskyi","email":"mikach27@gmail.com"},{"name":"Robert Murray","email":"rmurray@taskrabbit.com"},{"name":"Zane Chua","email":"github.com/zanechua"}],"license":"MIT","gitHead":"1c324a01df2a3755c025eb8860d5578aecc542c9","_id":"@alf-team/react-native-zendesk-chat@1.0.1","_nodeVersion":"14.15.1","_npmVersion":"6.14.8","dist":{"integrity":"sha512-GxpIoYdEoqjj/L5AfVRST2rPFlMj25CNaSyAWSG8QHtjzyEf/EsWvkxU6nV8P2nqLZCVKmgR0lCNraGxcm92FA==","shasum":"596d933b52a3d8f3a521fb225b144b82efde05cd","tarball":"https://registry.npmjs.org/@alf-team/react-native-zendesk-chat/-/react-native-zendesk-chat-1.0.1.tgz","fileCount":26,"unpackedSize":131442,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfvPYgCRA9TVsSAnZWagAAqxIQAJQhbN3zswqHu37u+xav\n7swGgwlodR5HrUGBhPQWtql1xd1s+q07k8dPoWHib+WvGT4uyMERJ6IwoNmf\n16+pIZT4FUG8Tk8omLsb4a+ZmrPLHgzJxKhG1f/th88fX8vw6lj9l3A/0nt/\nNYa8yeJi0WQylCEo+Ga8bJHLZmF/Q+8I2MseLcoSwnb6Jd2dV9RTeprytpFG\niMMkfcN/tS7qokWKqup/BoMd9dKSP7eV3276l8WiNcFsh2vSUqVSl+GfR86y\nZjkkX8m1+T3bgwoRP6gqBzJTkDGIgFxiiXQRxPMgWn/+OEGqE9MjSnqRpU7d\nZ9mTRiVhUBMcXfmBwnrOJjXUOQy2kI5lckAMq7tg5Osd9Q3ZLGWiEWgzEeeR\niNHrccWHO7udvFKzYTZOr1881LjT/dNqMoZAtD2hQ/3s9YV6nguMjMfTphwO\nzKuOHS5R/ZTcNSpm0xgdPapt0vDSDK4K3V0b1zSaB9w7B+V1mUpISGGTdVD9\n1PQTXSe10lSdoOf3+ge6UUHuboi8crvyHzJcBtBAQ6EAzam8fyTFBWL3Oi71\n7BrDGuP9VRLEaWtmyaKj0DZrKnZP1d2mZPCOhDdifG1g8SMOEndLhyTcYyN2\nZPoXMyncoip01V9gxCfVo29Ghg8pkcubIBVkuaI5YqkPkc8Jzy9Bdr4ktfFH\nigms\r\n=YM9X\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDAiRD+Xvt6EktiL/gwY4WMUVVejVBVbR3S17OsfCTcjAiBY4P9quUP+xs9rI2b83I2YqahkhGtrAi8phTX6Lv6wNA=="}]},"_npmUser":{"name":"giocode","email":"g.damico241095@gmail.com"},"directories":{},"maintainers":[{"name":"giocode","email":"g.damico241095@gmail.com"},{"name":"mirkoricci94","email":"m.ricci@alfonsino.delivery"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-native-zendesk-chat_1.0.1_1606219296090_0.2647246944987993"},"_hasShrinkwrap":false}},"time":{"created":"2020-11-24T11:47:38.958Z","1.0.0":"2020-11-24T11:47:39.306Z","modified":"2022-04-04T12:42:03.173Z","1.0.1":"2020-11-24T12:01:36.294Z"},"maintainers":[{"name":"giocode","email":"g.damico241095@gmail.com"},{"name":"mirkoricci94","email":"m.ricci@alfonsino.delivery"}],"description":"React Native Wrapper around Zopim Zendesk Chat","homepage":"https://github.com/taskrabbit/react-native-zendesk-chat.git","keywords":["zendesk","chat","react-native","react","ios","android","react-component"],"repository":{"type":"git","url":"git+https://github.com/tinni95/react-native-zendesk-chat.git"},"contributors":[{"name":"Brian Leonard","email":"brian@taskrabbit.com"},{"name":"Frederic Barthelemy","email":"frederic@taskrabbit.com"},{"name":"Jean-Richard Lai","email":"github.com/jrichardlai"},{"name":"Jordan Smith","email":"jordan@taskrabbit.com"},{"name":"Michael Kachanovskyi","email":"mikach27@gmail.com"},{"name":"Robert Murray","email":"rmurray@taskrabbit.com"},{"name":"Zane Chua","email":"github.com/zanechua"}],"author":{"name":"jrichardlai"},"bugs":{"url":"https://github.com/taskrabbit/react-native-zendesk-chat/issues"},"license":"MIT","readme":"# react-native-zendesk-chat\n\nSimple module that supports displaying Zendesk Chat within a React Native Application.\n\nThis library assumes you're familiar with Zendesk's Official Documentation: [iOS](https://developer.zendesk.com/embeddables/docs/chat-sdk-v-2-for-ios/introduction) and [Android](https://developer.zendesk.com/embeddables/docs/chat-sdk-v-2-for-android/introduction).\n\n## VERSIONS\n\n- For **Zendesk Chat v2** use version >= 0.4.0 (this requires RN 0.59 or later!)\n- For RN version >= 0.59 use version >= 0.3.0 (Zendesk Chat v1)\n- For RN version < 0.59 use version <= 0.2.2 (Zendesk Chat v1)\n\n## Known Issues\n\n## Getting Started\n\nWith npm:\n\n`npm install react-native-zendesk-chat --save`\n\nor with yarn:\n\n`yarn add react-native-zendesk-chat`\n\n### QuickStart & Usage\n\n1. Setup Native Dependencies<br/> **iOS** If you're on react-native >= 0.60 and you have Cocoapods setup, then you just need to:\n\n```bash\n$ yarn install # and see if there are any errors\n$ (cd ios; pod install) # and see if there are any errors\n # -- you may need to do `pod install --repo-update`\n```\n\nIf you're on older react-native versions, please see the [Advanced Setup](#advanced-setup) section below\n\n**Android** If you're on react-native >= 0.60, Android should autodetect this dependency. If you're on 0.59, you may need to call `react-native link`\n\n2. Call the JS Initializer:\n\n```javascript\nimport ZendeskChat from \"react-native-zendesk-chat\";\n\n// Once in your application:\nZendeskChat.init(\"YOUR_ZENDESK_ACCOUNT_KEY\");\n\n// Optionally specify the appId provided by Zendesk\nZendeskChat.init(\"YOUR_ZENDESK_ACCOUNT_KEY\", \"APP_ID_PROVIDED_BY_ZENDESK\");\n```\n\n3. Show the Chat UI\n\n```javascript\n// On button press, when you want to show chat:\nZendeskChat.startChat({\n\tname: user.full_name,\n\temail: user.email,\n\tphone: user.mobile_phone,\n\ttags: [\"tag1\", \"tag2\"],\n\tdepartment: \"Your department\",\n\t// The behaviorFlags are optional, and each default to 'true' if omitted\n\tbehaviorFlags: {\n\t\tshowAgentAvailability: true,\n\t\tshowChatTranscriptPrompt: true,\n\t\tshowPreChatForm: true,\n\t\tshowOfflineForm: true,\n\t},\n\t// The preChatFormOptions are optional & each defaults to \"optional\" if omitted\n\tpreChatFormOptions: {\n\t\tname: !user.full_name ? \"required\" : \"optional\",\n\t\temail: \"optional\",\n\t\tphone: \"optional\",\n\t\tdepartment: \"required\",\n\t},\n\tlocalizedDismissButtonTitle: \"Dismiss\",\n});\n```\n\n### Styling\n\nChanging the UI Styling is mostly achieved through native techniques.\n\nOn Android, this is the [official documentation](https://developer.zendesk.com/embeddables/docs/android-unified-sdk/customize_the_look#how-theming-works) -- and an example might be adding these [3 lines to your app theme](https://github.com/zendesk/sdk_demo_app_android/blob/ae4c551f78911e983b0aac06967628f46be15e54/app/src/main/res/values/styles.xml#L5-L7)\n\nWhile on iOS, the options are more minimal -- check the [official doc page](https://developer.zendesk.com/embeddables/docs/chat-sdk-v-2-for-ios/customize_the_look#styling-the-chat-screen)\n\n### Migrating\n\n_From react-native-zendesk-chat <= 0.3.0_\n\nTo migrate from previous versions of the library, you should probably remove all integration steps you applied, and start over from the [Quick Start](#quickstart--usage).\n\nThe JS API calls are very similar, with mostly additive changes.\n\n### Advanced Setup\n\nAdvanced users, or users running on older versions of react-native may want to initialize things in native.\n\n#### iOS: Manually Setting up with Cocoapods\n\nIf you're on iOS < 0.60, you may need to manually install the cocoapod:\n\nAdd a reference to your Podfile:\n\n```Podfile\npod 'RNZendeskChat', :git => 'https://github.com/taskrabbit/react-native-zendesk-chat.git'\n```\n\nthen run pod install: `(cd ios; pod install)`\n\nor manually:\n\nIn Xcode, drag and drop `node_modules/react-native-zendesk-chat/RNZendeskChat.m` and `node_modules/react-native-zendesk-chat/RNZendeskChat.h` into your project.\n\n#### iOS: Configure `ZDCChat` in `AppDelegate.m`:\n\n```objective-c\n#import <ZDCChat/ZDCChat.h>\n\n// ...\n\n// Inside the appropriate appDidFinishLaunching method\n[ZDCChat initializeWithAccountKey:@\"YOUR_ZENDESK_ACCOUNT_KEY\"];\n\n// And access other interesting APIs\n```\n\n#### Android: Manual Setup & Configuration\n\nIf you're on react-native < 0.60, you should be able to call `react-native link`.\n\nIf this doesn't work, then you may need to do a complete manual install as follows:\n\n1. Open up `android/app/main/java/[...]/MainApplication.java`\n\n- Add `import com.taskrabbit.zendesk.*;` to the imports at the top of the file\n- Add `new RNZendeskChatPackage(this)` to the list returned by the `getPackages()` method\n\n2. Append the following lines to `android/settings.gradle`:\n\n```gradle\ninclude ':react-native-zendesk-chat'\nproject(':react-native-zendesk-chat').projectDir = new File(rootProject.projectDir,\t'../node_modules/react-native-zendesk-chat/android')\n```\n\n3. Insert the following lines inside the dependencies block in `android/app/build.gradle`:\n\nFor RN >= 0.60:\n\n```gradle\ndependencies {\n\t//\n  api group: 'com.zendesk', name: 'chat', version: '2.2.0'\n  api group: 'com.zendesk', name: 'messaging', version: '4.3.1'\n```\n\nFor RN < 0.60:\n\n```gradle\ncompile project(':react-native-zendesk-chat')\n```\n\n4. Configure `Chat` in `android/app/main/java/[...]/MainActivity.java`\n\n```java\n// Note: there is a JS method to do this -- prefer doing that! -- This is for advanced users only.\n\n// Call this once in your Activity's bootup lifecycle\nChat.INSTANCE.init(mReactContext, key);\n```\n\n## Contributing\n\n- Pull Requests are encouraged!\n- Be respectful!\n- The trunk branch of this repo is called `main`\n\n## License\n\nReact Native Zendesk Chat is MIT licensed, as found in the [LICENSE](https://github.com/taskrabbit/react-native-zendesk-chat/LICENSE) file.\n","readmeFilename":"README.md"}