Permalink
Browse files

ignore example folder

  • Loading branch information...
FaridSafi committed May 27, 2018
1 parent cbbf812 commit f825ae818161a6907f4647a35e79c72478c3c8c0
Showing with 22,138 additions and 5 deletions.
  1. +1 βˆ’0 .eslintignore
  2. +1 βˆ’0 .npmignore
  3. +3 βˆ’0 example-pusher-chatkit/.babelrc
  4. +6 βˆ’0 example-pusher-chatkit/.buckconfig
  5. +54 βˆ’0 example-pusher-chatkit/.flowconfig
  6. +1 βˆ’0 example-pusher-chatkit/.gitattributes
  7. +56 βˆ’0 example-pusher-chatkit/.gitignore
  8. +1 βˆ’0 example-pusher-chatkit/.watchmanconfig
  9. +8 βˆ’0 example-pusher-chatkit/App.js
  10. +75 βˆ’0 example-pusher-chatkit/MyChat.js
  11. +266 βˆ’0 example-pusher-chatkit/README.md
  12. +65 βˆ’0 example-pusher-chatkit/android/app/BUCK
  13. +150 βˆ’0 example-pusher-chatkit/android/app/build.gradle
  14. +70 βˆ’0 example-pusher-chatkit/android/app/proguard-rules.pro
  15. +26 βˆ’0 example-pusher-chatkit/android/app/src/main/AndroidManifest.xml
  16. +15 βˆ’0 example-pusher-chatkit/android/app/src/main/java/com/giftedchatwithchatkit/MainActivity.java
  17. +45 βˆ’0 example-pusher-chatkit/android/app/src/main/java/com/giftedchatwithchatkit/MainApplication.java
  18. BIN example-pusher-chatkit/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
  19. BIN example-pusher-chatkit/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
  20. BIN example-pusher-chatkit/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
  21. BIN example-pusher-chatkit/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  22. +3 βˆ’0 example-pusher-chatkit/android/app/src/main/res/values/strings.xml
  23. +8 βˆ’0 example-pusher-chatkit/android/app/src/main/res/values/styles.xml
  24. +24 βˆ’0 example-pusher-chatkit/android/build.gradle
  25. +20 βˆ’0 example-pusher-chatkit/android/gradle.properties
  26. BIN example-pusher-chatkit/android/gradle/wrapper/gradle-wrapper.jar
  27. +5 βˆ’0 example-pusher-chatkit/android/gradle/wrapper/gradle-wrapper.properties
  28. +164 βˆ’0 example-pusher-chatkit/android/gradlew
  29. +90 βˆ’0 example-pusher-chatkit/android/gradlew.bat
  30. +8 βˆ’0 example-pusher-chatkit/android/keystores/BUCK
  31. +4 βˆ’0 example-pusher-chatkit/android/keystores/debug.keystore.properties
  32. +3 βˆ’0 example-pusher-chatkit/android/settings.gradle
  33. +4 βˆ’0 example-pusher-chatkit/app.json
  34. +4 βˆ’0 example-pusher-chatkit/index.js
  35. +54 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit-tvOS/Info.plist
  36. +24 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit-tvOSTests/Info.plist
  37. +1,468 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit.xcodeproj/project.pbxproj
  38. +129 βˆ’0 ...it/ios/GiftedChatWithChatkit.xcodeproj/xcshareddata/xcschemes/GiftedChatWithChatkit-tvOS.xcscheme
  39. +129 βˆ’0 ...chatkit/ios/GiftedChatWithChatkit.xcodeproj/xcshareddata/xcschemes/GiftedChatWithChatkit.xcscheme
  40. +14 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit/AppDelegate.h
  41. +35 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit/AppDelegate.m
  42. +42 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit/Base.lproj/LaunchScreen.xib
  43. +38 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit/Images.xcassets/AppIcon.appiconset/Contents.json
  44. +6 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit/Images.xcassets/Contents.json
  45. +56 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit/Info.plist
  46. +16 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkit/main.m
  47. +68 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkitTests/GiftedChatWithChatkitTests.m
  48. +24 βˆ’0 example-pusher-chatkit/ios/GiftedChatWithChatkitTests/Info.plist
  49. +9,095 βˆ’0 example-pusher-chatkit/package-lock.json
  50. +24 βˆ’0 example-pusher-chatkit/package.json
  51. BIN example-pusher-chatkit/screenshots/01-basic-gifted-chat.png
  52. BIN example-pusher-chatkit/screenshots/02-chatkit-create.png
  53. BIN example-pusher-chatkit/screenshots/03-enable-endpoint.png
  54. BIN example-pusher-chatkit/screenshots/04-create-user-room.png
  55. BIN example-pusher-chatkit/screenshots/05-send-message.png
  56. +9,717 βˆ’0 package-lock.json
  57. +19 βˆ’5 package.json
@@ -3,3 +3,4 @@ android
ios
example
example-slack-message
example-pusher-chatkit
@@ -1,6 +1,7 @@
example/
example-expo/
example-slack-message/
example-pusher-chatkit/
TODO.md
screenshots/
.babelrc
@@ -0,0 +1,3 @@
{
"presets": ["react-native"]
}
@@ -0,0 +1,6 @@
[android]
target = Google Inc.:Google APIs:23
[maven_repositories]
central = https://repo1.maven.org/maven2
@@ -0,0 +1,54 @@
[ignore]
; We fork some components by platform
.*/*[.]android.js
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Ignore unexpected extra "@providesModule"
.*/node_modules/.*/node_modules/fbjs/.*
; Ignore duplicate module providers
; For RN Apps installed via npm, "Libraries" folder is inside
; "node_modules/react-native" but in the source repo it is in the root
.*/Libraries/react-native/React.js
; Ignore polyfills
.*/Libraries/polyfills/.*
; Ignore metro
.*/node_modules/metro/.*
[include]
[libs]
node_modules/react-native/Libraries/react-native/react-native-interface.js
node_modules/react-native/flow/
node_modules/react-native/flow-github/
[options]
emoji=true
module.system=haste
munge_underscores=true
module.name_mapper='^[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> 'RelativeImageStub'
module.file_ext=.js
module.file_ext=.jsx
module.file_ext=.json
module.file_ext=.native.js
suppress_type=$FlowIssue
suppress_type=$FlowFixMe
suppress_type=$FlowFixMeProps
suppress_type=$FlowFixMeState
suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe\\($\\|[^(]\\|(\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)
suppress_comment=\\(.\\|\n\\)*\\$FlowIssue\\((\\(<VERSION>\\)? *\\(site=[a-z,_]*react_native[a-z,_]*\\)?)\\)?:? #[0-9]+
suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
[version]
^0.67.0
@@ -0,0 +1 @@
*.pbxproj -text
@@ -0,0 +1,56 @@
# OSX
#
.DS_Store
# Xcode
#
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate
project.xcworkspace
# Android/IntelliJ
#
build/
.idea
.gradle
local.properties
*.iml
# node.js
#
node_modules/
npm-debug.log
yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/
*/fastlane/report.xml
*/fastlane/Preview.html
*/fastlane/screenshots
# Bundle artifact
*.jsbundle
@@ -0,0 +1 @@
{}
@@ -0,0 +1,8 @@
import React, { Component } from "react";
import MyChat from "./MyChat";
export default class App extends Component {
render() {
return <MyChat />;
}
}
@@ -0,0 +1,75 @@
import React from "react";
import { GiftedChat } from "react-native-gifted-chat";
import Chatkit from "@pusher/chatkit";
const CHATKIT_TOKEN_PROVIDER_ENDPOINT =
"<url from TEST TOKEN PROVIDER section>";
const CHATKIT_INSTANCE_LOCATOR = "<id from CREDENTIALS section>";
const CHATKIT_ROOM_ID = "<room identifier from INSTANCE INSPECTOR section>";
const CHATKIT_USER_NAME = "<user name>";
export default class MyChat extends React.Component {
state = {
messages: []
};
componentDidMount() {
const tokenProvider = new Chatkit.TokenProvider({
url: CHATKIT_TOKEN_PROVIDER_ENDPOINT
});
const chatManager = new Chatkit.ChatManager({
instanceLocator: CHATKIT_INSTANCE_LOCATOR,
userId: CHATKIT_USER_NAME,
tokenProvider: tokenProvider
});
chatManager.connect().then(currentUser => {
this.currentUser = currentUser;
this.currentUser.subscribeToRoom({
roomId: CHATKIT_ROOM_ID,
hooks: {
onNewMessage: this.onReceive.bind(this)
}
});
});
}
onReceive(data) {
const { id, senderId, text, createdAt } = data;
const incomingMessage = {
_id: id,
text: text,
createdAt: new Date(createdAt),
user: {
_id: senderId,
name: senderId,
avatar:
"https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQmXGGuS_PrRhQt73sGzdZvnkQrPXvtA-9cjcPxJLhLo8rW-sVA"
}
};
this.setState(previousState => ({
messages: GiftedChat.append(previousState.messages, incomingMessage)
}));
}
onSend([message]) {
this.currentUser.sendMessage({
text: message.text,
roomId: CHATKIT_ROOM_ID
});
}
render() {
return (
<GiftedChat
messages={this.state.messages}
onSend={messages => this.onSend(messages)}
user={{
_id: CHATKIT_USER_NAME
}}
/>
);
}
}
Oops, something went wrong.

0 comments on commit f825ae8

Please sign in to comment.