├── .gitignore ├── LICENSE.md ├── README.md ├── asset ├── reactnative-sample-thumbnail.jpg └── uikit.png ├── catalog-info.yaml ├── javascript ├── javascript-basic-local-caching │ ├── .babelrc │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .prettierignore │ ├── .prettierrc │ ├── README.md │ ├── chat.html │ ├── index.html │ ├── migration.ts │ ├── package.json │ ├── server.js │ ├── src │ │ ├── js │ │ │ ├── Chat.js │ │ │ ├── ChatLeftMenu.js │ │ │ ├── SendBirdAction.js │ │ │ ├── SendBirdChatEvent.js │ │ │ ├── SendBirdConnection.js │ │ │ ├── SendBirdEvent.js │ │ │ ├── components │ │ │ │ ├── ChatBody.js │ │ │ │ ├── ChatInput.js │ │ │ │ ├── ChatMain.js │ │ │ │ ├── ChatMenu.js │ │ │ │ ├── ChatTopMenu.js │ │ │ │ ├── ChatUserItem.js │ │ │ │ ├── LeftListItem.js │ │ │ │ ├── List.js │ │ │ │ ├── Message.js │ │ │ │ ├── MessageDeleteModal.js │ │ │ │ ├── Modal.js │ │ │ │ ├── Spinner.js │ │ │ │ ├── Toast.js │ │ │ │ ├── UserBlockModal.js │ │ │ │ ├── UserItem.js │ │ │ │ └── UserList.js │ │ │ ├── const.js │ │ │ ├── index.js │ │ │ ├── main.js │ │ │ └── utils.js │ │ └── scss │ │ │ ├── _animation.scss │ │ │ ├── _common.scss │ │ │ ├── _icons.scss │ │ │ ├── _mixins.scss │ │ │ ├── _normalize.scss │ │ │ ├── _variables.scss │ │ │ ├── chat-body.scss │ │ │ ├── chat-input.scss │ │ │ ├── chat-main.scss │ │ │ ├── chat-menu.scss │ │ │ ├── chat-top-menu.scss │ │ │ ├── chat-user-item.scss │ │ │ ├── chat.scss │ │ │ ├── index.scss │ │ │ ├── list-item.scss │ │ │ ├── list.scss │ │ │ ├── main.scss │ │ │ ├── message-delete-modal.scss │ │ │ ├── message.scss │ │ │ ├── mixins │ │ │ ├── _border-radius.scss │ │ │ ├── _reset.scss │ │ │ ├── _state.scss │ │ │ └── _transform.scss │ │ │ ├── modal.scss │ │ │ ├── spinner.scss │ │ │ ├── toast.scss │ │ │ ├── user-block-modal.scss │ │ │ ├── user-item.scss │ │ │ └── user-list.scss │ └── webpack.config.js ├── javascript-basic-syncmanager │ ├── .babelrc │ ├── .eslintignore │ ├── .eslintrc.js │ ├── .prettierignore │ ├── .prettierrc │ ├── README.md │ ├── chat.html │ ├── index.html │ ├── package.json │ ├── server.js │ ├── src │ │ ├── js │ │ │ ├── Chat.js │ │ │ ├── ChatLeftMenu.js │ │ │ ├── SendBirdAction.js │ │ │ ├── SendBirdChatEvent.js │ │ │ ├── SendBirdConnection.js │ │ │ ├── SendBirdEvent.js │ │ │ ├── components │ │ │ │ ├── ChatBody.js │ │ │ │ ├── ChatInput.js │ │ │ │ ├── ChatMain.js │ │ │ │ ├── ChatMenu.js │ │ │ │ ├── ChatTopMenu.js │ │ │ │ ├── ChatUserItem.js │ │ │ │ ├── LeftListItem.js │ │ │ │ ├── List.js │ │ │ │ ├── Message.js │ │ │ │ ├── MessageDeleteModal.js │ │ │ │ ├── Modal.js │ │ │ │ ├── Spinner.js │ │ │ │ ├── Toast.js │ │ │ │ ├── UserBlockModal.js │ │ │ │ ├── UserItem.js │ │ │ │ └── UserList.js │ │ │ ├── const.js │ │ │ ├── index.js │ │ │ ├── main.js │ │ │ └── utils.js │ │ └── scss │ │ │ ├── _animation.scss │ │ │ ├── _common.scss │ │ │ ├── _icons.scss │ │ │ ├── _mixins.scss │ │ │ ├── _normalize.scss │ │ │ ├── _variables.scss │ │ │ ├── chat-body.scss │ │ │ ├── chat-input.scss │ │ │ ├── chat-main.scss │ │ │ ├── chat-menu.scss │ │ │ ├── chat-top-menu.scss │ │ │ ├── chat-user-item.scss │ │ │ ├── chat.scss │ │ │ ├── index.scss │ │ │ ├── list-item.scss │ │ │ ├── list.scss │ │ │ ├── main.scss │ │ │ ├── message-delete-modal.scss │ │ │ ├── message.scss │ │ │ ├── mixins │ │ │ ├── _border-radius.scss │ │ │ ├── _reset.scss │ │ │ ├── _state.scss │ │ │ └── _transform.scss │ │ │ ├── modal.scss │ │ │ ├── spinner.scss │ │ │ ├── toast.scss │ │ │ ├── user-block-modal.scss │ │ │ ├── user-item.scss │ │ │ └── user-list.scss │ └── webpack.config.js ├── javascript-basic │ ├── .babelrc │ ├── .eslintrc.js │ ├── .prettierignore │ ├── .prettierrc │ ├── README.md │ ├── chat.html │ ├── index.html │ ├── package.json │ ├── server.js │ ├── src │ │ ├── js │ │ │ ├── Chat.js │ │ │ ├── ChatLeftMenu.js │ │ │ ├── SendBirdAction.js │ │ │ ├── SendBirdChatEvent.js │ │ │ ├── SendBirdConnection.js │ │ │ ├── SendBirdEvent.js │ │ │ ├── components │ │ │ │ ├── ChatBody.js │ │ │ │ ├── ChatInput.js │ │ │ │ ├── ChatMain.js │ │ │ │ ├── ChatMenu.js │ │ │ │ ├── ChatTopMenu.js │ │ │ │ ├── ChatUserItem.js │ │ │ │ ├── LeftListItem.js │ │ │ │ ├── List.js │ │ │ │ ├── Message.js │ │ │ │ ├── MessageDeleteModal.js │ │ │ │ ├── Modal.js │ │ │ │ ├── OpenChannelCreateModal.js │ │ │ │ ├── OpenChannelItem.js │ │ │ │ ├── OpenChannelList.js │ │ │ │ ├── OpenChannelSearchBox.js │ │ │ │ ├── Spinner.js │ │ │ │ ├── UserBlockModal.js │ │ │ │ ├── UserItem.js │ │ │ │ └── UserList.js │ │ │ ├── const.js │ │ │ ├── index.js │ │ │ ├── main.js │ │ │ └── utils.js │ │ └── scss │ │ │ ├── _animation.scss │ │ │ ├── _common.scss │ │ │ ├── _icons.scss │ │ │ ├── _mixins.scss │ │ │ ├── _normalize.scss │ │ │ ├── _variables.scss │ │ │ ├── chat-body.scss │ │ │ ├── chat-input.scss │ │ │ ├── chat-main.scss │ │ │ ├── chat-menu.scss │ │ │ ├── chat-top-menu.scss │ │ │ ├── chat-user-item.scss │ │ │ ├── chat.scss │ │ │ ├── index.scss │ │ │ ├── list-item.scss │ │ │ ├── list.scss │ │ │ ├── main.scss │ │ │ ├── message-delete-modal.scss │ │ │ ├── message.scss │ │ │ ├── mixins │ │ │ ├── _border-radius.scss │ │ │ ├── _reset.scss │ │ │ ├── _state.scss │ │ │ └── _transform.scss │ │ │ ├── modal.scss │ │ │ ├── open-channel-item.scss │ │ │ ├── open-create-modal.scss │ │ │ ├── spinner.scss │ │ │ ├── user-block-modal.scss │ │ │ ├── user-item.scss │ │ │ └── user-list.scss │ └── webpack.config.js ├── javascript-live-chat │ ├── .babelrc │ ├── .eslintrc.js │ ├── .prettierignore │ ├── .prettierrc │ ├── README.md │ ├── SendBird.min.js │ ├── index.html │ ├── package.json │ ├── server.js │ ├── src │ │ ├── js │ │ │ ├── adapter.js │ │ │ ├── chat.js │ │ │ └── elements │ │ │ │ ├── chat-board.js │ │ │ │ ├── element.js │ │ │ │ ├── login-board.js │ │ │ │ ├── message-board.js │ │ │ │ └── spinner.js │ │ └── scss │ │ │ ├── _animation.scss │ │ │ ├── _icons.scss │ │ │ ├── _mixins.scss │ │ │ ├── _variables.scss │ │ │ ├── chat.scss │ │ │ └── mixins │ │ │ ├── _border-radius.scss │ │ │ ├── _box-shadow.scss │ │ │ ├── _reset.scss │ │ │ ├── _state.scss │ │ │ └── _transform.scss │ └── webpack.config.js └── javascript-widget │ ├── .babelrc │ ├── .eslintrc.js │ ├── CUSTOMIZE.md │ ├── README.md │ ├── index.html │ ├── package.json │ ├── server.js │ ├── src │ ├── js │ │ ├── adapter.js │ │ ├── consts.js │ │ ├── elements │ │ │ ├── chat-section.js │ │ │ ├── elements.js │ │ │ ├── list-board.js │ │ │ ├── popup.js │ │ │ ├── spinner.js │ │ │ └── widget-btn.js │ │ ├── utils.js │ │ └── widget.js │ └── scss │ │ ├── _animation.scss │ │ ├── _icons.scss │ │ ├── _mixins.scss │ │ ├── _variables.scss │ │ ├── mixins │ │ ├── _border-radius.scss │ │ ├── _box-shadow.scss │ │ ├── _reset.scss │ │ ├── _state.scss │ │ └── _transform.scss │ │ └── widget.scss │ └── webpack.config.js ├── react-native ├── react-native-hook-local-caching │ ├── README.md │ └── Sendbird │ │ ├── .buckconfig │ │ ├── .eslintrc.js │ │ ├── .flowconfig │ │ ├── .gitignore │ │ ├── .prettierignore │ │ ├── .prettierrc │ │ ├── .watchmanconfig │ │ ├── App.js │ │ ├── android │ │ ├── app │ │ │ ├── BUCK │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── debug.keystore │ │ │ ├── google-services.json │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── sendbird │ │ │ │ │ └── ReactNativeFlipper.java │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── sendbird │ │ │ │ │ └── chat │ │ │ │ │ └── reactnative │ │ │ │ │ └── sample │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_notification.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_notification.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_notification.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ │ ├── app.json │ │ ├── asset │ │ ├── launcher.png │ │ ├── logo.png │ │ ├── logo_white.png │ │ └── notification_icon.png │ │ ├── babel.config.js │ │ ├── index.js │ │ ├── ios │ │ ├── GoogleService-Info.plist │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── Sendbird.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Sendbird.xcscheme │ │ ├── Sendbird.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── Sendbird │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ ├── Sendbird.entitlements │ │ │ └── main.m │ │ └── SendbirdTests │ │ │ ├── Info.plist │ │ │ └── SendbirdTests.m │ │ ├── metro.config.js │ │ ├── package.json │ │ └── src │ │ ├── asset │ │ ├── logo-icon-purple.png │ │ ├── logo-icon-white.png │ │ └── logo.png │ │ ├── component │ │ ├── adminMessage.js │ │ ├── channel.js │ │ ├── fileMessage.js │ │ ├── message.js │ │ ├── user.js │ │ └── userMessage.js │ │ ├── context.js │ │ ├── hooks │ │ ├── useChannelHandler.js │ │ ├── useConnectionHandler.js │ │ ├── useForceUpdate.js │ │ ├── useGroupChannelCollection.js │ │ ├── useIsMountedRef.js │ │ └── useMessageCollection │ │ │ ├── reducer.js │ │ │ └── useMessageCollection.js │ │ ├── libs │ │ ├── AuthManager.js │ │ └── NotificationManager.js │ │ ├── page │ │ ├── channels.js │ │ ├── chat.js │ │ ├── invite.js │ │ ├── lobby.js │ │ ├── login.js │ │ ├── member.js │ │ └── profile.js │ │ ├── reducer │ │ ├── invite.js │ │ ├── login.js │ │ ├── member.js │ │ └── profile.js │ │ └── utils.js ├── react-native-hook │ ├── README.md │ └── Sendbird │ │ ├── .buckconfig │ │ ├── .eslintrc.js │ │ ├── .flowconfig │ │ ├── .gitignore │ │ ├── .prettierignore │ │ ├── .prettierrc │ │ ├── .watchmanconfig │ │ ├── App.js │ │ ├── android │ │ ├── app │ │ │ ├── BUCK │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── debug.keystore │ │ │ ├── google-services.json │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ ├── AndroidManifest.xml │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── sendbird │ │ │ │ │ └── ReactNativeFlipper.java │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── sendbird │ │ │ │ │ └── chat │ │ │ │ │ └── reactnative │ │ │ │ │ └── sample │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_notification.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_notification.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_notification.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ └── settings.gradle │ │ ├── app.json │ │ ├── asset │ │ ├── launcher.png │ │ ├── logo.png │ │ ├── logo_white.png │ │ └── notification_icon.png │ │ ├── babel.config.js │ │ ├── index.js │ │ ├── ios │ │ ├── GoogleService-Info.plist │ │ ├── Podfile │ │ ├── Podfile.lock │ │ ├── Sendbird.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ └── Sendbird.xcscheme │ │ ├── Sendbird.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── Sendbird │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ └── Contents.json │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── LaunchScreen.storyboard │ │ │ ├── Sendbird.entitlements │ │ │ └── main.m │ │ └── SendbirdTests │ │ │ ├── Info.plist │ │ │ └── SendbirdTests.m │ │ ├── metro.config.js │ │ ├── package.json │ │ └── src │ │ ├── asset │ │ ├── logo-icon-purple.png │ │ ├── logo-icon-white.png │ │ └── logo.png │ │ ├── component │ │ ├── adminMessage.js │ │ ├── channel.js │ │ ├── fileMessage.js │ │ ├── message.js │ │ ├── user.js │ │ └── userMessage.js │ │ ├── context.js │ │ ├── page │ │ ├── channels.js │ │ ├── chat.js │ │ ├── invite.js │ │ ├── lobby.js │ │ ├── login.js │ │ ├── member.js │ │ └── profile.js │ │ ├── reducer │ │ ├── channels.js │ │ ├── chat.js │ │ ├── invite.js │ │ ├── login.js │ │ ├── member.js │ │ └── profile.js │ │ └── utils.js ├── react-native-redux-syncmanager │ ├── README.md │ └── ReactNativeSyncManagerSample │ │ ├── .buckconfig │ │ ├── .eslintrc.js │ │ ├── .flowconfig │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .prettierrc.js │ │ ├── .watchmanconfig │ │ ├── App.js │ │ ├── __mocks__ │ │ ├── mockCachedImage.js │ │ ├── mockFirebase.js │ │ ├── mockNativeModules.js │ │ ├── mockNavigation.js │ │ ├── mockSendbird.js │ │ ├── mockSyncManager.js │ │ ├── mockToast.js │ │ └── mockVideo.js │ │ ├── __tests__ │ │ ├── __snapshots__ │ │ │ └── utils.test.js.snap │ │ ├── action │ │ │ ├── __snapshots__ │ │ │ │ ├── chat.test.js.snap │ │ │ │ ├── invite.test.js.snap │ │ │ │ ├── main.test.js.snap │ │ │ │ ├── member.test.js.snap │ │ │ │ └── signin.test.js.snap │ │ │ ├── chat.test.js │ │ │ ├── invite.test.js │ │ │ ├── main.test.js │ │ │ ├── member.test.js │ │ │ └── signin.test.js │ │ ├── controller │ │ │ ├── __snapshots__ │ │ │ │ ├── chat.test.js.snap │ │ │ │ ├── invite.test.js.snap │ │ │ │ ├── main.test.js.snap │ │ │ │ ├── member.test.js.snap │ │ │ │ ├── notfound.test.js.snap │ │ │ │ └── signin.test.js.snap │ │ │ ├── chat.test.js │ │ │ ├── invite.test.js │ │ │ ├── main.test.js │ │ │ ├── member.test.js │ │ │ ├── notfound.test.js │ │ │ └── signin.test.js │ │ ├── navigator.test.js │ │ ├── reducer │ │ │ ├── __snapshots__ │ │ │ │ ├── chat.test.js.snap │ │ │ │ ├── invite.test.js.snap │ │ │ │ ├── main.test.js.snap │ │ │ │ ├── member.test.js.snap │ │ │ │ └── signin.test.js.snap │ │ │ ├── chat.test.js │ │ │ ├── invite.test.js │ │ │ ├── main.test.js │ │ │ ├── member.test.js │ │ │ └── signin.test.js │ │ ├── utils.test.js │ │ └── view │ │ │ ├── __snapshots__ │ │ │ ├── groupChannel.test.js.snap │ │ │ ├── message.test.js.snap │ │ │ └── user.test.js.snap │ │ │ ├── groupChannel.test.js │ │ │ ├── message.test.js │ │ │ └── user.test.js │ │ ├── android │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.buildship.core.prefs │ │ ├── app │ │ │ ├── .classpath │ │ │ ├── .project │ │ │ ├── .settings │ │ │ │ └── org.eclipse.buildship.core.prefs │ │ │ ├── BUCK │ │ │ ├── bin │ │ │ │ └── src │ │ │ │ │ └── main │ │ │ │ │ └── java │ │ │ │ │ └── com │ │ │ │ │ └── reactnativesyncmanagersample │ │ │ │ │ ├── MainActivity.class │ │ │ │ │ └── MainApplication.class │ │ │ ├── build.gradle │ │ │ ├── build_defs.bzl │ │ │ ├── debug.keystore │ │ │ ├── google-services.json │ │ │ ├── proguard-rules.pro │ │ │ └── src │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── main │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── assets │ │ │ │ └── fonts │ │ │ │ │ ├── AntDesign.ttf │ │ │ │ │ ├── Entypo.ttf │ │ │ │ │ ├── EvilIcons.ttf │ │ │ │ │ ├── Feather.ttf │ │ │ │ │ ├── FontAwesome.ttf │ │ │ │ │ ├── FontAwesome5_Brands.ttf │ │ │ │ │ ├── FontAwesome5_Regular.ttf │ │ │ │ │ ├── FontAwesome5_Solid.ttf │ │ │ │ │ ├── Fontisto.ttf │ │ │ │ │ ├── Foundation.ttf │ │ │ │ │ ├── Ionicons.ttf │ │ │ │ │ ├── MaterialCommunityIcons.ttf │ │ │ │ │ ├── MaterialIcons.ttf │ │ │ │ │ ├── Octicons.ttf │ │ │ │ │ ├── SimpleLineIcons.ttf │ │ │ │ │ └── Zocial.ttf │ │ │ │ ├── java │ │ │ │ └── com │ │ │ │ │ └── reactnativesyncmanagersample │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ └── MainApplication.java │ │ │ │ └── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ ├── ic_launcher.png │ │ │ │ └── ic_notification.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ ├── strings.xml │ │ │ │ └── styles.xml │ │ ├── build.gradle │ │ ├── gradle.properties │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ ├── gradlew │ │ ├── gradlew.bat │ │ ├── keystores │ │ │ ├── BUCK │ │ │ └── debug.keystore.properties │ │ └── settings.gradle │ │ ├── app.json │ │ ├── babel.config.js │ │ ├── index.js │ │ ├── ios │ │ ├── Podfile │ │ ├── ReactNativeSyncManagerSample-tvOS │ │ │ └── Info.plist │ │ ├── ReactNativeSyncManagerSample-tvOSTests │ │ │ └── Info.plist │ │ ├── ReactNativeSyncManagerSample.xcodeproj │ │ │ ├── project.pbxproj │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ ├── ReactNativeSyncManagerSample-tvOS.xcscheme │ │ │ │ └── ReactNativeSyncManagerSample.xcscheme │ │ ├── ReactNativeSyncManagerSample.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── ReactNativeSyncManagerSample │ │ │ ├── AppDelegate.h │ │ │ ├── AppDelegate.m │ │ │ ├── Base.lproj │ │ │ │ └── LaunchScreen.xib │ │ │ ├── Images.xcassets │ │ │ │ ├── AppIcon.appiconset │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── ic_launcher-3.jpg │ │ │ │ │ ├── ic_launcher-4.jpg │ │ │ │ │ ├── ic_launcher-5.jpg │ │ │ │ │ └── ic_notification.png │ │ │ │ └── Contents.json │ │ │ ├── Info.plist │ │ │ ├── ReactNativeSyncManagerSample.entitlements │ │ │ └── main.m │ │ └── ReactNativeSyncManagerSampleTests │ │ │ ├── Info.plist │ │ │ └── ReactNativeSyncManagerSampleTests.m │ │ ├── metro.config.js │ │ ├── package.json │ │ └── src │ │ ├── action │ │ ├── chat.js │ │ ├── invite.js │ │ ├── main.js │ │ ├── member.js │ │ └── signin.js │ │ ├── config.js │ │ ├── controller │ │ ├── chat.js │ │ ├── invite.js │ │ ├── main.js │ │ ├── member.js │ │ ├── notfound.js │ │ └── signin.js │ │ ├── img │ │ ├── icon_sb_256.png │ │ ├── icon_sb_34.png │ │ ├── icon_sb_512.png │ │ └── icon_sb_68.png │ │ ├── navigator.js │ │ ├── push.js │ │ ├── reducer │ │ ├── chat.js │ │ ├── index.js │ │ ├── invite.js │ │ ├── main.js │ │ ├── member.js │ │ └── signin.js │ │ ├── store.js │ │ ├── style │ │ ├── chat.js │ │ ├── groupChannel.js │ │ ├── invite.js │ │ ├── main.js │ │ ├── member.js │ │ ├── message.js │ │ ├── notfound.js │ │ ├── signin.js │ │ └── user.js │ │ ├── utils.js │ │ └── view │ │ ├── groupChannel.js │ │ ├── message.js │ │ └── user.js └── react-native-redux │ ├── README.md │ └── ReactNativeWithSendBird │ ├── .gitignore │ ├── App.js │ ├── __mocks__ │ ├── mockCachedImage.js │ ├── mockFirebase.js │ ├── mockNavigation.js │ ├── mockSendbird.js │ └── mockVideo.js │ ├── __tests__ │ ├── actions │ │ ├── blockUserActions.test.js │ │ ├── chatActions.test.js │ │ ├── groupChannelActions.js │ │ ├── groupChannelInviteActions.test.js │ │ ├── loginActions.test.js │ │ ├── memberActions.test.js │ │ ├── menuActions.test.js │ │ ├── openChannelActions.test.js │ │ ├── openChannelCreateActions.test.js │ │ └── profileActions.test.js │ ├── components │ │ ├── AdminMessage.test.js │ │ ├── FileItem.test.js │ │ ├── Hr.test.js │ │ ├── ImageItem.test.js │ │ ├── Message.test.js │ │ ├── MessageAvatar.test.js │ │ ├── MessageBubble.test.js │ │ ├── MessageContainer.test.js │ │ ├── MessageInput.test.js │ │ ├── Spinner.test.js │ │ ├── TextItem.test.js │ │ └── __snapshots__ │ │ │ ├── AdminMessage.test.js.snap │ │ │ ├── FileItem.test.js.snap │ │ │ ├── Hr.test.js.snap │ │ │ ├── ImageItem.test.js.snap │ │ │ ├── Message.test.js.snap │ │ │ ├── MessageAvatar.test.js.snap │ │ │ ├── MessageBubble.test.js.snap │ │ │ ├── MessageContainer.test.js.snap │ │ │ ├── MessageInput.test.js.snap │ │ │ ├── Spinner.test.js.snap │ │ │ └── TextItem.test.js.snap │ ├── helpers │ │ └── mockStorage.js │ ├── reducers │ │ ├── __snapshots__ │ │ │ ├── blockUserReducer.tests.js.snap │ │ │ ├── chatReducer.tests.js.snap │ │ │ ├── groupChannelInviteReducer.tests.js.snap │ │ │ ├── groupChannelReducer.tests.js.snap │ │ │ ├── loginReducer.tests.js.snap │ │ │ ├── memberReducer.tests.js.snap │ │ │ ├── menuReducer.tests.js.snap │ │ │ ├── openChannelCreateReducer.tests.js.snap │ │ │ ├── openChannelReducer.tests.js.snap │ │ │ └── profileReducer.tests.js.snap │ │ ├── blockUserReducer.tests.js │ │ ├── chatReducer.tests.js │ │ ├── groupChannelInviteReducer.tests.js │ │ ├── groupChannelReducer.tests.js │ │ ├── loginReducer.tests.js │ │ ├── memberReducer.tests.js │ │ ├── menuReducer.tests.js │ │ ├── openChannelCreateReducer.tests.js │ │ ├── openChannelReducer.tests.js │ │ └── profileReducer.tests.js │ └── screens │ │ ├── BlockUser.test.js │ │ ├── Chat.test.js │ │ ├── GroupChannel.test.js │ │ ├── GroupChannelInvite.test.js │ │ ├── Login.test.js │ │ ├── Member.test.js │ │ ├── Menu.test.js │ │ ├── OpenChannel.test.js │ │ ├── OpenChannelCreate.test.js │ │ ├── Profile.test.js │ │ ├── Start.test.js │ │ └── __snapshots__ │ │ ├── BlockUser.test.js.snap │ │ ├── Chat.test.js.snap │ │ ├── GroupChannel.test.js.snap │ │ ├── GroupChannelInvite.test.js.snap │ │ ├── Login.test.js.snap │ │ ├── Member.test.js.snap │ │ ├── Menu.test.js.snap │ │ ├── OpenChannel.test.js.snap │ │ ├── OpenChannelCreate.test.js.snap │ │ ├── Profile.test.js.snap │ │ └── Start.test.js.snap │ ├── android │ ├── app │ │ ├── BUCK │ │ ├── build.gradle │ │ ├── build_defs.bzl │ │ ├── google-services.json │ │ ├── proguard-rules.pro │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── assets │ │ │ └── fonts │ │ │ │ ├── AntDesign.ttf │ │ │ │ ├── Entypo.ttf │ │ │ │ ├── EvilIcons.ttf │ │ │ │ ├── Feather.ttf │ │ │ │ ├── FontAwesome.ttf │ │ │ │ ├── FontAwesome5_Brands.ttf │ │ │ │ ├── FontAwesome5_Regular.ttf │ │ │ │ ├── FontAwesome5_Solid.ttf │ │ │ │ ├── Foundation.ttf │ │ │ │ ├── Ionicons.ttf │ │ │ │ ├── MaterialCommunityIcons.ttf │ │ │ │ ├── MaterialIcons.ttf │ │ │ │ ├── Octicons.ttf │ │ │ │ ├── SimpleLineIcons.ttf │ │ │ │ └── Zocial.ttf │ │ │ ├── java │ │ │ └── com │ │ │ │ └── reactnativewithsendbird │ │ │ │ ├── MainActivity.java │ │ │ │ └── MainApplication.java │ │ │ └── res │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── sendbird_ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── sendbird_ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ ├── sendbird_ic_launcher.png │ │ │ └── sendbird_ic_notification.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── sendbird_ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ ├── ic_launcher_round.png │ │ │ └── sendbird_ic_launcher.png │ │ │ └── values │ │ │ ├── strings.xml │ │ │ └── styles.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── gradlew │ ├── gradlew.bat │ └── settings.gradle │ ├── app.json │ ├── babel.config.js │ ├── index.js │ ├── ios │ ├── Podfile │ ├── ReactNativeWithSendBird-tvOS │ │ └── Info.plist │ ├── ReactNativeWithSendBird-tvOSTests │ │ └── Info.plist │ ├── ReactNativeWithSendBird.xcodeproj │ │ ├── project.pbxproj │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ ├── ReactNativeWithSendBird-tvOS.xcscheme │ │ │ └── ReactNativeWithSendBird.xcscheme │ ├── ReactNativeWithSendBird.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ ├── ReactNativeWithSendBird │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── Base.lproj │ │ │ └── LaunchScreen.xib │ │ ├── GoogleService-Info.plist │ │ ├── Images.xcassets │ │ │ ├── AppIcon.appiconset │ │ │ │ ├── Contents.json │ │ │ │ ├── icon_1024px.png │ │ │ │ ├── icon_120px.png │ │ │ │ ├── icon_152px.png │ │ │ │ ├── icon_167px.png │ │ │ │ ├── icon_180px.png │ │ │ │ └── icon_76px.png │ │ │ └── Contents.json │ │ ├── Info.plist │ │ ├── ReactNativeWithSendBird.entitlements │ │ └── main.m │ └── ReactNativeWithSendBirdTests │ │ ├── Info.plist │ │ └── ReactNativeWithSendBirdTests.m │ ├── jsconfig.json │ ├── metro.config.js │ ├── package.json │ └── src │ ├── actions │ ├── blockUserActions.js │ ├── chatActions.js │ ├── groupChannelActions.js │ ├── groupChannelInviteActions.js │ ├── index.js │ ├── loginActions.js │ ├── memberActions.js │ ├── menuActions.js │ ├── openChannelActions.js │ ├── openChannelCreateActions.js │ ├── profileActions.js │ └── types.js │ ├── appStateChangeHandler.js │ ├── backgroundPush.js │ ├── components │ ├── Hr.js │ ├── ImageItem.js │ ├── Message.js │ ├── MessageAvatar.js │ ├── MessageBubble.js │ ├── MessageContainer.js │ ├── MessageInput.js │ ├── MessageItem.js │ ├── Spinner.js │ └── index.js │ ├── img │ ├── icon_sb_256.png │ ├── icon_sb_34.png │ ├── icon_sb_512.png │ └── icon_sb_68.png │ ├── reducers │ ├── blockUserReducer.js │ ├── chatReducer.js │ ├── groupChannelInviteReducer.js │ ├── groupChannelReducer.js │ ├── index.js │ ├── loginReducer.js │ ├── memberReducer.js │ ├── menuReducer.js │ ├── openChannelCreateReducer.js │ ├── openChannelReducer.js │ └── profileReducer.js │ ├── screens │ ├── BlockUser.js │ ├── Chat.js │ ├── GroupChannel.js │ ├── GroupChannelInvite.js │ ├── Login.js │ ├── Member.js │ ├── Menu.js │ ├── OpenChannel.js │ ├── OpenChannelCreate.js │ ├── Profile.js │ └── Start.js │ ├── sendbirdActions │ ├── chat.js │ ├── groupChannel.js │ ├── index.js │ ├── openChannel.js │ ├── user.js │ └── utils.js │ └── store │ └── index.js └── react ├── README.md ├── react-app-composed ├── .env.example ├── .gitignore ├── README.md ├── config │ ├── env.js │ ├── getHttpsConfig.js │ ├── jest │ │ ├── cssTransform.js │ │ └── fileTransform.js │ ├── modules.js │ ├── paths.js │ ├── pnpTs.js │ ├── webpack.config.js │ └── webpackDevServer.config.js ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt ├── scripts │ ├── build.js │ ├── start.js │ └── test.js └── src │ ├── App.css │ ├── App.js │ ├── Chat.css │ ├── Chat.js │ ├── Login.jsx │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── serviceWorker.js │ └── setupTests.js ├── react-app-custom ├── .env.example ├── .gitignore ├── README.md ├── config │ ├── env.js │ ├── getHttpsConfig.js │ ├── jest │ │ ├── cssTransform.js │ │ └── fileTransform.js │ ├── modules.js │ ├── paths.js │ ├── pnpTs.js │ ├── webpack.config.js │ └── webpackDevServer.config.js ├── package.json ├── public │ ├── favicon.ico │ ├── index.html │ ├── logo192.png │ ├── logo512.png │ ├── manifest.json │ └── robots.txt ├── scripts │ ├── build.js │ ├── start.js │ └── test.js └── src │ ├── App.css │ ├── App.js │ ├── Chat │ ├── ChannelPreview.jsx │ ├── CustomUserList.js │ ├── Index.jsx │ ├── Message.jsx │ └── index.css │ ├── Login.jsx │ ├── index.css │ ├── index.js │ ├── logo.svg │ ├── serviceWorker.js │ └── setupTests.js └── react-app-simple ├── .env.example ├── .gitignore ├── README.md ├── config ├── env.js ├── getHttpsConfig.js ├── jest │ ├── cssTransform.js │ └── fileTransform.js ├── modules.js ├── paths.js ├── pnpTs.js ├── webpack.config.js └── webpackDevServer.config.js ├── package.json ├── public ├── favicon.ico ├── index.html ├── logo192.png ├── logo512.png ├── manifest.json └── robots.txt ├── scripts ├── build.js ├── start.js └── test.js └── src ├── App.css ├── App.js ├── index.css ├── index.js ├── logo.svg ├── serviceWorker.js └── setupTests.js /asset/reactnative-sample-thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/asset/reactnative-sample-thumbnail.jpg -------------------------------------------------------------------------------- /asset/uikit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/asset/uikit.png -------------------------------------------------------------------------------- /catalog-info.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: backstage.io/v1alpha1 2 | kind: Component 3 | metadata: 4 | name: sendbird-javascript-samples 5 | description: A guide of the installation and functions of Sendbird Chat, UIKit, and SyncManager for JavaScript samples 6 | annotations: 7 | github.com/project-slug: sendbird/sendbird-javascript-samples 8 | spec: 9 | type: library 10 | lifecycle: production 11 | owner: dep-client-platform 12 | system: sendbird-chat 13 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env"], 3 | "env": { 4 | "test": { 5 | "presets": ["env"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/.eslintignore: -------------------------------------------------------------------------------- 1 | 2 | **/*.min.js -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | commonjs: true, 5 | es6: true 6 | }, 7 | extends: 'eslint:recommended', 8 | parserOptions: { 9 | parser: 'babel-eslint', 10 | sourceType: 'module' 11 | }, 12 | rules: { 13 | 'linebreak-style': ['error', 'unix'], 14 | quotes: ['warn', 'single'], 15 | semi: ['warn', 'always'], 16 | 'no-console': 1, 17 | 'no-unused-vars': 1, 18 | 'no-inner-declarations': 1, 19 | 'no-useless-escape': 1 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/.prettierignore: -------------------------------------------------------------------------------- 1 | README.md 2 | .eslintrc.js -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "printWidth": 120, 4 | "trailingComma": "none", 5 | "arrowParens": "avoid" 6 | } -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | 4 | const PORT = 9000; 5 | 6 | app.use(express.static('dist')); 7 | app.use(express.static('./')); 8 | 9 | app.get('/', function(req, res) { 10 | res.sendfile('index.html'); 11 | }); 12 | 13 | app.listen(PORT); 14 | console.log(`[SERVER RUNNING] 127.0.0.1:${PORT}`); 15 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/js/const.js: -------------------------------------------------------------------------------- 1 | export const APP_ID = '9DA1B1F4-0BE6-4DA8-82C5-2E81DAB56F23'; 2 | export const USER_ID = 'user_id'; 3 | export const DISPLAY_NONE = 'none'; 4 | export const DISPLAY_BLOCK = 'block'; 5 | export const DISPLAY_FLEX = 'flex'; 6 | export const ACTIVE_CLASSNAME = 'active'; 7 | export const KEY_ENTER = 13; 8 | export const FILE_ID = 'attach_file_id'; 9 | export const UPDATE_INTERVAL_TIME = 5 * 1000; 10 | export const COLOR_RED = '#DC5960'; 11 | export const MESSAGE_REQ_ID = 'reqId'; 12 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/_common.scss: -------------------------------------------------------------------------------- 1 | @import 'normalize'; 2 | @import 'variables'; 3 | @import 'mixins'; 4 | @import 'icons'; 5 | 6 | body { 7 | display: flex; 8 | font-family: $font-family-exo2; 9 | -webkit-font-smoothing: antialiased; 10 | } 11 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins/border-radius'; 2 | @import 'mixins/state'; 3 | @import 'mixins/transform'; 4 | @import 'mixins/reset'; 5 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/chat-body.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | @import 'icons'; 4 | 5 | .chat-body { 6 | display: flex; 7 | flex-direction: column; 8 | height: 100%; 9 | max-height: calc(100vh - 180px); 10 | overflow-y: auto; 11 | overflow-x: hidden; 12 | padding: 10px 0; 13 | 14 | & > .new-message-pop { 15 | margin: 0px 10px; 16 | display: flex; 17 | width: inherit; 18 | 19 | position: sticky; 20 | bottom: -10px; 21 | background-color: $color-white; 22 | border: 5px solid $color-blue; 23 | border-radius: 10px; 24 | 25 | & > .new-message-pop-text { 26 | margin-left: 30px; 27 | height: 30px; 28 | font-size: 24px; 29 | color: $color-blue; 30 | @include hover-focus { 31 | cursor: pointer; 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/chat-main.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .chat-main-root { 5 | display: flex; 6 | flex-direction: row; 7 | height: 100%; 8 | overflow-y: auto; 9 | overflow-x: hidden; 10 | padding: 0; 11 | 12 | & > .chat-main { 13 | display: flex; 14 | flex-direction: column; 15 | justify-content: space-between; 16 | width: 100%; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/chat-user-item.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .chat-user-item { 5 | display: flex; 6 | flex-direction: row; 7 | align-items: center; 8 | padding: 10px 20px; 9 | cursor: pointer; 10 | 11 | & > .user-image { 12 | display: flex; 13 | width: 36px; 14 | height: 36px; 15 | margin-right: 10px; 16 | background-size: 36px 36px; 17 | background-position: center center; 18 | background-repeat: no-repeat; 19 | @include border-radius(50%); 20 | } 21 | 22 | & > .user-nickname { 23 | width: 154px; 24 | max-width: 154px; 25 | white-space: nowrap; 26 | overflow: hidden; 27 | -ms-text-overflow: ellipsis; 28 | text-overflow: ellipsis; 29 | } 30 | & > .user-nickname.is-user { 31 | font-weight: 600; 32 | color: $color-purple-deep; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/message-delete-modal.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .modal-message { 5 | display: flex; 6 | align-items: center; 7 | padding: 10px 10px; 8 | width: 100%; 9 | border: 1px solid $color-red; 10 | background-color: $color-white; 11 | font-size: 18px; 12 | margin: 10px 0; 13 | @include border-radius(4px); 14 | } 15 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/mixins/_reset.scss: -------------------------------------------------------------------------------- 1 | @mixin reset { 2 | margin: 0; 3 | padding: 0; 4 | font-size: 100%; 5 | line-height: 1; 6 | width: auto; 7 | height: auto; 8 | box-sizing: initial; 9 | } 10 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/mixins/_transform.scss: -------------------------------------------------------------------------------- 1 | @mixin transform-translate($x, $y) { 2 | -webkit-transform: translate($x, $y); 3 | -moz-transform: translate($x, $y); 4 | -ms-transform: translate($x, $y); 5 | -o-transform: translate($x, $y); 6 | transform: translate($x, $y); 7 | } 8 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/toast.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | @import 'animation'; 3 | 4 | .sb-toast { 5 | position: fixed; 6 | top: 0; 7 | left: 0; 8 | width: 100%; 9 | text-align: center; 10 | 11 | .sb-toast-message { 12 | color: $color-white; 13 | display:inline-block; 14 | font-size: 14px; 15 | padding:10px 15px; 16 | margin-top:20px; 17 | border-radius:5px; 18 | background-color: $color-purple-dark; 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /javascript/javascript-basic-local-caching/src/scss/user-list.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .button-create { 5 | width: 80px; 6 | height: 36px; 7 | text-align: center; 8 | justify-content: center; 9 | display: flex; 10 | line-height: 36px; 11 | font-weight: 600; 12 | color: $color-white; 13 | cursor: pointer; 14 | background-color: $color-blue; 15 | border: 1px solid $color-blue; 16 | margin-right: 12px; 17 | @include border-radius(4px); 18 | @include hover-focus { 19 | cursor: pointer; 20 | background-color: $color-blue-dark; 21 | border: 1px solid $color-blue-dark; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env"], 3 | "env": { 4 | "test": { 5 | "presets": ["env"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/.eslintignore: -------------------------------------------------------------------------------- 1 | 2 | **/*.min.js -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | commonjs: true, 5 | es6: true 6 | }, 7 | extends: 'eslint:recommended', 8 | parserOptions: { 9 | parser: 'babel-eslint', 10 | sourceType: 'module' 11 | }, 12 | rules: { 13 | 'linebreak-style': ['error', 'unix'], 14 | quotes: ['warn', 'single'], 15 | semi: ['warn', 'always'], 16 | 'no-console': 1, 17 | 'no-unused-vars': 1, 18 | 'no-inner-declarations': 1, 19 | 'no-useless-escape': 1 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/.prettierignore: -------------------------------------------------------------------------------- 1 | README.md 2 | .eslintrc.js -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "printWidth": 120 4 | } -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | 4 | const PORT = 9000; 5 | 6 | app.use(express.static('dist')); 7 | app.use(express.static('./')); 8 | 9 | app.get('/', function(req, res) { 10 | res.sendfile('index.html'); 11 | }); 12 | 13 | app.listen(PORT); 14 | console.log(`[SERVER RUNNING] 127.0.0.1:${PORT}`); 15 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/js/const.js: -------------------------------------------------------------------------------- 1 | export const APP_ID = '9DA1B1F4-0BE6-4DA8-82C5-2E81DAB56F23'; 2 | export const USER_ID = 'user_id'; 3 | export const DISPLAY_NONE = 'none'; 4 | export const DISPLAY_BLOCK = 'block'; 5 | export const DISPLAY_FLEX = 'flex'; 6 | export const ACTIVE_CLASSNAME = 'active'; 7 | export const KEY_ENTER = 13; 8 | export const FILE_ID = 'attach_file_id'; 9 | export const UPDATE_INTERVAL_TIME = 5 * 1000; 10 | export const COLOR_RED = '#DC5960'; 11 | export const MESSAGE_REQ_ID = 'reqId'; 12 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/_common.scss: -------------------------------------------------------------------------------- 1 | @import 'normalize'; 2 | @import 'variables'; 3 | @import 'mixins'; 4 | @import 'icons'; 5 | 6 | body { 7 | display: flex; 8 | font-family: $font-family-exo2; 9 | -webkit-font-smoothing: antialiased; 10 | } 11 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins/border-radius'; 2 | @import 'mixins/state'; 3 | @import 'mixins/transform'; 4 | @import 'mixins/reset'; 5 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/chat-body.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | @import 'icons'; 4 | 5 | .chat-body { 6 | display: flex; 7 | flex-direction: column; 8 | height: 100%; 9 | max-height: calc(100vh - 180px); 10 | overflow-y: auto; 11 | overflow-x: hidden; 12 | padding: 10px 0; 13 | 14 | & > .new-message-pop { 15 | margin: 0px 10px; 16 | display: flex; 17 | width: inherit; 18 | 19 | position: sticky; 20 | bottom: -10px; 21 | background-color: $color-white; 22 | border: 5px solid $color-blue; 23 | border-radius: 10px; 24 | 25 | & > .new-message-pop-text { 26 | margin-left: 30px; 27 | height: 30px; 28 | font-size: 24px; 29 | color: $color-blue; 30 | @include hover-focus { 31 | cursor: pointer; 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/chat-main.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .chat-main-root { 5 | display: flex; 6 | flex-direction: row; 7 | height: 100%; 8 | overflow-y: auto; 9 | overflow-x: hidden; 10 | padding: 0; 11 | 12 | & > .chat-main { 13 | display: flex; 14 | flex-direction: column; 15 | justify-content: space-between; 16 | width: 100%; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/chat-user-item.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .chat-user-item { 5 | display: flex; 6 | flex-direction: row; 7 | align-items: center; 8 | padding: 10px 20px; 9 | cursor: pointer; 10 | 11 | & > .user-image { 12 | display: flex; 13 | width: 36px; 14 | height: 36px; 15 | margin-right: 10px; 16 | background-size: 36px 36px; 17 | background-position: center center; 18 | background-repeat: no-repeat; 19 | @include border-radius(50%); 20 | } 21 | 22 | & > .user-nickname { 23 | width: 154px; 24 | max-width: 154px; 25 | white-space: nowrap; 26 | overflow: hidden; 27 | -ms-text-overflow: ellipsis; 28 | text-overflow: ellipsis; 29 | } 30 | & > .user-nickname.is-user { 31 | font-weight: 600; 32 | color: $color-purple-deep; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/message-delete-modal.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .modal-message { 5 | display: flex; 6 | align-items: center; 7 | padding: 10px 10px; 8 | width: 100%; 9 | border: 1px solid $color-red; 10 | background-color: $color-white; 11 | font-size: 18px; 12 | margin: 10px 0; 13 | @include border-radius(4px); 14 | } 15 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/mixins/_reset.scss: -------------------------------------------------------------------------------- 1 | @mixin reset { 2 | margin: 0; 3 | padding: 0; 4 | font-size: 100%; 5 | line-height: 1; 6 | width: auto; 7 | height: auto; 8 | box-sizing: initial; 9 | } 10 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/mixins/_transform.scss: -------------------------------------------------------------------------------- 1 | @mixin transform-translate($x, $y) { 2 | -webkit-transform: translate($x, $y); 3 | -moz-transform: translate($x, $y); 4 | -ms-transform: translate($x, $y); 5 | -o-transform: translate($x, $y); 6 | transform: translate($x, $y); 7 | } 8 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/toast.scss: -------------------------------------------------------------------------------- 1 | @import 'variables'; 2 | @import 'animation'; 3 | 4 | .sb-toast { 5 | position: fixed; 6 | top: 0; 7 | left: 0; 8 | width: 100%; 9 | text-align: center; 10 | 11 | .sb-toast-message { 12 | color: $color-white; 13 | display:inline-block; 14 | font-size: 14px; 15 | padding:10px 15px; 16 | margin-top:20px; 17 | border-radius:5px; 18 | background-color: $color-purple-dark; 19 | } 20 | } 21 | 22 | -------------------------------------------------------------------------------- /javascript/javascript-basic-syncmanager/src/scss/user-list.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .button-create { 5 | width: 80px; 6 | height: 36px; 7 | text-align: center; 8 | justify-content: center; 9 | display: flex; 10 | line-height: 36px; 11 | font-weight: 600; 12 | color: $color-white; 13 | cursor: pointer; 14 | background-color: $color-blue; 15 | border: 1px solid $color-blue; 16 | margin-right: 12px; 17 | @include border-radius(4px); 18 | @include hover-focus { 19 | cursor: pointer; 20 | background-color: $color-blue-dark; 21 | border: 1px solid $color-blue-dark; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /javascript/javascript-basic/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env"], 3 | "env": { 4 | "test": { 5 | "presets": ["env"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /javascript/javascript-basic/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | env: { 3 | browser: true, 4 | commonjs: true, 5 | es6: true 6 | }, 7 | extends: 'eslint:recommended', 8 | parserOptions: { 9 | parser: 'babel-eslint', 10 | sourceType: 'module' 11 | }, 12 | rules: { 13 | 'linebreak-style': ['error', 'unix'], 14 | quotes: ['warn', 'single'], 15 | semi: ['warn', 'always'], 16 | 'no-console': 1, 17 | 'no-unused-vars': 1, 18 | 'no-inner-declarations': 1, 19 | 'no-useless-escape': 1 20 | } 21 | }; 22 | -------------------------------------------------------------------------------- /javascript/javascript-basic/.prettierignore: -------------------------------------------------------------------------------- 1 | README.md 2 | .eslintrc.js -------------------------------------------------------------------------------- /javascript/javascript-basic/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "printWidth": 120 4 | } -------------------------------------------------------------------------------- /javascript/javascript-basic/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | 4 | const PORT = 9000; 5 | 6 | app.use(express.static('dist')); 7 | app.use(express.static('./')); 8 | 9 | app.get('/', function(req, res) { 10 | res.sendfile('index.html'); 11 | }); 12 | 13 | app.listen(PORT); 14 | console.log(`[SERVER RUNNING] 127.0.0.1:${PORT}`); 15 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/js/const.js: -------------------------------------------------------------------------------- 1 | export const APP_ID = '9DA1B1F4-0BE6-4DA8-82C5-2E81DAB56F23'; 2 | export const USER_ID = 'user_id'; 3 | export const DISPLAY_NONE = 'none'; 4 | export const DISPLAY_BLOCK = 'block'; 5 | export const DISPLAY_FLEX = 'flex'; 6 | export const ACTIVE_CLASSNAME = 'active'; 7 | export const KEY_ENTER = 13; 8 | export const FILE_ID = 'attach_file_id'; 9 | export const UPDATE_INTERVAL_TIME = 5 * 1000; 10 | export const COLOR_RED = '#DC5960'; 11 | export const MESSAGE_REQ_ID = 'reqId'; 12 | export const OPEN_CHANNEL_SEARCH_URL = 'search_open_channel'; 13 | 14 | export const body = document.querySelector('body'); 15 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/_common.scss: -------------------------------------------------------------------------------- 1 | @import 'normalize'; 2 | @import 'variables'; 3 | @import 'mixins'; 4 | @import 'icons'; 5 | 6 | body { 7 | display: flex; 8 | font-family: $font-family-exo2; 9 | -webkit-font-smoothing: antialiased; 10 | } 11 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins/border-radius'; 2 | @import 'mixins/state'; 3 | @import 'mixins/transform'; 4 | @import 'mixins/reset'; 5 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/chat-body.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | @import 'icons'; 4 | 5 | .chat-body { 6 | display: flex; 7 | flex-direction: column; 8 | height: 100%; 9 | max-height: calc(100vh - 180px); 10 | overflow-y: auto; 11 | overflow-x: hidden; 12 | padding: 10px 0; 13 | } 14 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/chat-main.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .chat-main-root { 5 | display: flex; 6 | flex-direction: row; 7 | height: 100%; 8 | overflow-y: auto; 9 | overflow-x: hidden; 10 | padding: 0; 11 | 12 | & > .chat-main { 13 | display: flex; 14 | flex-direction: column; 15 | justify-content: space-between; 16 | width: 100%; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/chat-user-item.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .chat-user-item { 5 | display: flex; 6 | flex-direction: row; 7 | align-items: center; 8 | padding: 10px 20px; 9 | cursor: pointer; 10 | 11 | & > .user-image { 12 | display: flex; 13 | width: 36px; 14 | height: 36px; 15 | margin-right: 10px; 16 | background-size: 36px 36px; 17 | background-position: center center; 18 | background-repeat: no-repeat; 19 | @include border-radius(50%); 20 | } 21 | 22 | & > .user-nickname { 23 | width: 154px; 24 | max-width: 154px; 25 | white-space: nowrap; 26 | overflow: hidden; 27 | -ms-text-overflow: ellipsis; 28 | text-overflow: ellipsis; 29 | } 30 | & > .user-nickname.is-user { 31 | font-weight: 600; 32 | color: $color-purple-deep; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/message-delete-modal.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .modal-message { 5 | display: flex; 6 | align-items: center; 7 | padding: 10px 10px; 8 | width: 100%; 9 | border: 1px solid $color-red; 10 | background-color: $color-white; 11 | font-size: 18px; 12 | margin: 10px 0; 13 | @include border-radius(4px); 14 | } 15 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/mixins/_reset.scss: -------------------------------------------------------------------------------- 1 | @mixin reset { 2 | margin: 0; 3 | padding: 0; 4 | font-size: 100%; 5 | line-height: 1; 6 | width: auto; 7 | height: auto; 8 | box-sizing: initial; 9 | } 10 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/mixins/_transform.scss: -------------------------------------------------------------------------------- 1 | @mixin transform-translate($x, $y) { 2 | -webkit-transform: translate($x, $y); 3 | -moz-transform: translate($x, $y); 4 | -ms-transform: translate($x, $y); 5 | -o-transform: translate($x, $y); 6 | transform: translate($x, $y); 7 | } 8 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/open-channel-item.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | @import 'icons'; 4 | 5 | .channel-item { 6 | display: flex; 7 | flex-direction: column; 8 | padding: 8px 50px 8px 20px; 9 | border: 1px solid transparent; 10 | border-bottom: 1px solid $color-gray-dark; 11 | cursor: pointer; 12 | @include hover-focus { 13 | cursor: pointer; 14 | border: 1px solid $color-purple-light; 15 | @include icon($ic-enter, 24px 24px, calc(100% - 20px) center); 16 | @include border-radius(2px); 17 | } 18 | 19 | & > .item-title { 20 | display: flex; 21 | font-size: 20px; 22 | font-weight: 500; 23 | } 24 | 25 | & > .item-desc { 26 | display: flex; 27 | font-size: 14px; 28 | font-weight: 300; 29 | color: #353535; 30 | margin-top: 6px; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/open-create-modal.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .modal-input { 5 | display: flex; 6 | width: 100%; 7 | height: 35px; 8 | border: 1px solid $color-gray-dark; 9 | background-color: $color-gray-light; 10 | font-size: 18px; 11 | padding: 2px 10px; 12 | margin: 10px 0; 13 | @include border-radius(4px); 14 | @include focus { 15 | outline: none; 16 | background-color: $color-white; 17 | border: 1px solid $color-purple-light; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/user-block-modal.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .modal-user { 5 | display: flex; 6 | align-items: center; 7 | padding: 10px 10px; 8 | width: 100%; 9 | border: 1px solid $color-red; 10 | background-color: $color-white; 11 | font-size: 18px; 12 | margin: 10px 0; 13 | @include border-radius(4px); 14 | 15 | & > .user-profile { 16 | display: flex; 17 | width: 36px; 18 | height: 36px; 19 | margin-right: 10px; 20 | background-size: 36px 36px; 21 | background-position: center center; 22 | background-repeat: no-repeat; 23 | @include border-radius(50%); 24 | } 25 | 26 | & > .user-nickname { 27 | width: 330px; 28 | max-width: 330px; 29 | white-space: nowrap; 30 | overflow: hidden; 31 | -ms-text-overflow: ellipsis; 32 | text-overflow: ellipsis; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /javascript/javascript-basic/src/scss/user-list.scss: -------------------------------------------------------------------------------- 1 | @import 'mixins'; 2 | @import 'variables'; 3 | 4 | .button-create { 5 | width: 80px; 6 | height: 36px; 7 | text-align: center; 8 | justify-content: center; 9 | display: flex; 10 | line-height: 36px; 11 | font-weight: 600; 12 | color: $color-white; 13 | cursor: pointer; 14 | background-color: $color-blue; 15 | border: 1px solid $color-blue; 16 | margin-right: 12px; 17 | @include border-radius(4px); 18 | @include hover-focus { 19 | cursor: pointer; 20 | background-color: $color-blue-dark; 21 | border: 1px solid $color-blue-dark; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env" 4 | ], 5 | "env": { 6 | "test": { 7 | "presets": ["@babel/preset-env"] 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /javascript/javascript-live-chat/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'env': { 3 | 'browser': true, 4 | 'commonjs': true, 5 | 'es6': true 6 | }, 7 | 'extends': 'eslint:recommended', 8 | 'parserOptions': { 9 | 'sourceType': 'module' 10 | }, 11 | 'parser': 'babel-eslint', 12 | 'rules': { 13 | 'indent': ['error', 2], 14 | 'semi': 1, 15 | 'no-console': 1, 16 | 'camelcase': 1, 17 | 'no-unused-vars': 1, 18 | 'no-useless-escape': 1 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/.prettierignore: -------------------------------------------------------------------------------- 1 | README.md 2 | .eslintrc.js -------------------------------------------------------------------------------- /javascript/javascript-live-chat/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "singleQuote": true, 3 | "printWidth": 120 4 | } -------------------------------------------------------------------------------- /javascript/javascript-live-chat/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | 4 | const PORT = 9000; 5 | 6 | app.use(express.static('dist')); 7 | app.use(express.static('./')); 8 | 9 | app.get('/', function (req, res) { 10 | res.sendfile('index.html'); 11 | }); 12 | 13 | app.listen(PORT); 14 | console.log(`[SERVER RUNNING] 127.0.0.1:${PORT}`); 15 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/src/js/elements/chat-board.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | import Element from './element.js'; 3 | 4 | class ChatBoard extends Element { 5 | constructor(parent) { 6 | super(); 7 | this.setClass('chat-board'); 8 | parent.appendElement(this); 9 | } 10 | } 11 | 12 | export { ChatBoard as default }; 13 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/src/js/elements/spinner.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | import Element from './element.js'; 4 | 5 | const SPINNER_COUNT = 3; 6 | 7 | class Spinner extends Element { 8 | constructor() { 9 | super(); 10 | this.setClass('sb-spinner'); 11 | for(let i = 0 ; i < SPINNER_COUNT ; i++) { 12 | this.appendElement(new Element()); 13 | } 14 | } 15 | 16 | attachTo($target) { 17 | $target.val(""); 18 | $target.appendElement(this); 19 | } 20 | 21 | remove($target) { 22 | if ($target.first()) { 23 | $target.removeElement(this); 24 | } 25 | } 26 | } 27 | 28 | export { Spinner as default }; 29 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/src/scss/_icons.scss: -------------------------------------------------------------------------------- 1 | // Icons 2 | $icon-prefix: 'https://dxstmhyqfqr1o.cloudfront.net/liveChat/'; 3 | 4 | $icon-send-btn: 'btn-send.svg'; 5 | 6 | @mixin icon($name) { 7 | background-image: url($icon-prefix + $name); 8 | background-position: center; 9 | background-size: 19px 19px; 10 | background-repeat: no-repeat; 11 | } 12 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/src/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/border-radius"; 2 | @import "mixins/box-shadow"; 3 | @import "mixins/state"; 4 | @import "mixins/transform"; 5 | @import "mixins/reset"; 6 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/src/scss/mixins/_box-shadow.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | -webkit-box-shadow: $shadow; 3 | -moz-box-shadow: $shadow; 4 | box-shadow: $shadow; 5 | } 6 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/src/scss/mixins/_reset.scss: -------------------------------------------------------------------------------- 1 | @mixin reset { 2 | margin: 0; 3 | padding: 0; 4 | font-size: 100%; 5 | line-height: 1; 6 | width: auto; 7 | height: auto; 8 | box-sizing: initial; 9 | } 10 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/src/scss/mixins/_state.scss: -------------------------------------------------------------------------------- 1 | @mixin hover { 2 | &:hover { @content; } 3 | } 4 | 5 | @mixin plain-hover { 6 | &, 7 | &:hover { @content; } 8 | } 9 | 10 | @mixin focus { 11 | &:focus { @content; } 12 | } 13 | 14 | @mixin plain-focus { 15 | &, 16 | &:focus { @content; } 17 | } 18 | 19 | @mixin hover-focus { 20 | &:hover, 21 | &:focus { @content; } 22 | } 23 | 24 | @mixin plain-hover-focus { 25 | &, 26 | &:hover, 27 | &:focus { @content; } 28 | } 29 | 30 | @mixin active { 31 | &:active { @content; } 32 | } 33 | 34 | @mixin after { 35 | &::after { 36 | @content 37 | } 38 | } 39 | 40 | @mixin before { 41 | &::before { 42 | @content 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /javascript/javascript-live-chat/src/scss/mixins/_transform.scss: -------------------------------------------------------------------------------- 1 | @mixin transform-translate($x, $y) { 2 | -webkit-transform: translate($x, $y); 3 | -moz-transform: translate($x, $y); 4 | -ms-transform: translate($x, $y); 5 | -o-transform: translate($x, $y); 6 | transform: translate($x, $y); 7 | } 8 | -------------------------------------------------------------------------------- /javascript/javascript-widget/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env" 4 | ], 5 | "env": { 6 | "test": { 7 | "presets": ["@babel/preset-env"] 8 | } 9 | } 10 | } -------------------------------------------------------------------------------- /javascript/javascript-widget/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | 'env': { 3 | 'browser': true, 4 | 'commonjs': true, 5 | 'es6': true 6 | }, 7 | 'extends': 'eslint:recommended', 8 | 'parserOptions': { 9 | 'sourceType': 'module' 10 | }, 11 | 'parser': 'babel-eslint', 12 | 'rules': { 13 | 'indent': ['error', 2], 14 | 'semi': 1, 15 | 'no-console': 1, 16 | 'camelcase': 1, 17 | 'no-unused-vars': 1 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /javascript/javascript-widget/server.js: -------------------------------------------------------------------------------- 1 | const express = require('express'); 2 | const app = express(); 3 | 4 | const PORT = 9000; 5 | 6 | app.use(express.static('dist')); 7 | app.use(express.static('./')); 8 | 9 | app.get('/', function(req, res) { 10 | res.sendfile('index.html'); 11 | }); 12 | 13 | app.listen(PORT); 14 | console.log(`[SERVER RUNNING] 127.0.0.1:${PORT}`); 15 | -------------------------------------------------------------------------------- /javascript/javascript-widget/src/js/elements/spinner.js: -------------------------------------------------------------------------------- 1 | import { className } from '../consts.js'; 2 | import Element from './elements.js'; 3 | 4 | const EMPTY_STRING = ''; 5 | 6 | class Spinner extends Element { 7 | constructor() { 8 | super(); 9 | this._create(); 10 | } 11 | 12 | _create() { 13 | this.self = this.createDiv(); 14 | this._setClass(this.self, [className.SPINNER]); 15 | var i; 16 | for (i = 0 ; i < 3 ; i++) { 17 | this.self.appendChild(this.createDiv()); 18 | } 19 | } 20 | 21 | insert(target) { 22 | this._setContent(target, EMPTY_STRING); 23 | target.appendChild(this.self); 24 | } 25 | 26 | remove(target) { 27 | if (target.firstElementChild) { 28 | target.removeChild(this.self); 29 | } 30 | } 31 | } 32 | 33 | export { Spinner as default }; 34 | -------------------------------------------------------------------------------- /javascript/javascript-widget/src/scss/_mixins.scss: -------------------------------------------------------------------------------- 1 | @import "mixins/border-radius"; 2 | @import "mixins/box-shadow"; 3 | @import "mixins/state"; 4 | @import "mixins/transform"; 5 | @import "mixins/reset"; 6 | -------------------------------------------------------------------------------- /javascript/javascript-widget/src/scss/mixins/_box-shadow.scss: -------------------------------------------------------------------------------- 1 | @mixin box-shadow($shadow...) { 2 | -webkit-box-shadow: $shadow; 3 | -moz-box-shadow: $shadow; 4 | box-shadow: $shadow; 5 | } 6 | -------------------------------------------------------------------------------- /javascript/javascript-widget/src/scss/mixins/_reset.scss: -------------------------------------------------------------------------------- 1 | @mixin reset { 2 | margin: 0; 3 | padding: 0; 4 | font-size: 100%; 5 | line-height: 1; 6 | width: auto; 7 | height: auto; 8 | box-sizing: initial; 9 | } 10 | -------------------------------------------------------------------------------- /javascript/javascript-widget/src/scss/mixins/_state.scss: -------------------------------------------------------------------------------- 1 | @mixin hover { 2 | &:hover { @content; } 3 | } 4 | 5 | @mixin plain-hover { 6 | &, 7 | &:hover { @content; } 8 | } 9 | 10 | @mixin focus { 11 | &:focus { @content; } 12 | } 13 | 14 | @mixin plain-focus { 15 | &, 16 | &:focus { @content; } 17 | } 18 | 19 | @mixin hover-focus { 20 | &:hover, 21 | &:focus { @content; } 22 | } 23 | 24 | @mixin plain-hover-focus { 25 | &, 26 | &:hover, 27 | &:focus { @content; } 28 | } 29 | 30 | @mixin after { 31 | &::after { 32 | @content 33 | } 34 | } 35 | 36 | @mixin before { 37 | &::before { 38 | @content 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /javascript/javascript-widget/src/scss/mixins/_transform.scss: -------------------------------------------------------------------------------- 1 | @mixin transform-translate($x, $y) { 2 | -webkit-transform: translate($x, $y); 3 | -moz-transform: translate($x, $y); 4 | -ms-transform: translate($x, $y); 5 | -o-transform: translate($x, $y); 6 | transform: translate($x, $y); 7 | } 8 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | rules: { 5 | 'react-hooks/exhaustive-deps': 0, 6 | curly: 0, 7 | }, 8 | }; 9 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.min.js 2 | **/*.md 3 | **/*.json -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "quoteProps": "preserve", 8 | "trailingComma": "all", 9 | "bracketSpacing": true, 10 | "arrowParens": "avoid" 11 | } 12 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/android/app/debug.keystore -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/java/com/sendbird/chat/reactnative/sample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.sendbird.chat.reactnative.sample; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "Sendbird"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xhdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xhdpi/ic_notification.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xxhdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xxhdpi/ic_notification.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xxxhdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/mipmap-xxxhdpi/ic_notification.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Sendbird 3 | 4 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'Sendbird' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sendbird", 3 | "displayName": "Sendbird" 4 | } -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/asset/launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/asset/launcher.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/asset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/asset/logo.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/asset/logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/asset/logo_white.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/asset/notification_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/asset/notification_icon.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | import { AppRegistry, Platform } from 'react-native'; 5 | import messaging from '@react-native-firebase/messaging'; 6 | 7 | import App from './App'; 8 | import { name as appName } from './app.json'; 9 | import { onRemoteMessage } from './src/utils'; 10 | 11 | if (Platform.OS !== 'ios') { 12 | messaging().setBackgroundMessageHandler(onRemoteMessage); 13 | } 14 | 15 | AppRegistry.registerComponent(appName, () => App); 16 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/ios/Sendbird.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/ios/Sendbird.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/ios/Sendbird/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/ios/Sendbird/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/ios/Sendbird/Sendbird.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/ios/Sendbird/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/asset/logo-icon-purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/src/asset/logo-icon-purple.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/asset/logo-icon-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/src/asset/logo-icon-white.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/asset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook-local-caching/Sendbird/src/asset/logo.png -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/component/adminMessage.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text, View } from 'react-native'; 3 | 4 | import { withAppContext } from '../context'; 5 | 6 | const AdminMessage = props => { 7 | const { message } = props; 8 | return ( 9 | <> 10 | 11 | {message.message} 12 | 13 | 14 | ); 15 | }; 16 | 17 | const style = { 18 | container: { 19 | width: '100%', 20 | alignItems: 'center', 21 | paddingVertical: 12, 22 | }, 23 | message: { 24 | fontSize: 18, 25 | color: '#ccc', 26 | }, 27 | }; 28 | 29 | export default withAppContext(AdminMessage); 30 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/component/message.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { withAppContext } from '../context'; 3 | 4 | import UserMessage from './userMessage'; 5 | import FileMessage from './fileMessage'; 6 | import AdminMessage from './adminMessage'; 7 | 8 | const Message = props => { 9 | const { message } = props; 10 | let component = null; 11 | if (message.isUserMessage()) { 12 | component = ; 13 | } else if (message.isFileMessage()) { 14 | component = ; 15 | } else if (message.isAdminMessage()) { 16 | component = ; 17 | } 18 | return component; 19 | }; 20 | 21 | export default withAppContext(Message); 22 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/context.js: -------------------------------------------------------------------------------- 1 | import React, { createContext } from 'react'; 2 | 3 | export const AppContext = createContext(); 4 | 5 | export const withAppContext = (Component, mapStateToProp = null) => { 6 | const ConsumableComponent = props => { 7 | return ( 8 | 9 | {state => { 10 | const mappedProps = mapStateToProp ? mapStateToProp(state) : state; 11 | const mergedProps = { ...props, ...mappedProps }; 12 | return ; 13 | }} 14 | 15 | ); 16 | }; 17 | return ConsumableComponent; 18 | }; 19 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/hooks/useChannelHandler.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | export const useChannelHandler = (sdk, handlerId, hookHandler, deps = []) => { 4 | useEffect(() => { 5 | const handler = new sdk.ChannelHandler(); 6 | const handlerKeys = Object.keys(handler); 7 | handlerKeys.forEach(key => { 8 | const hookHandlerFn = hookHandler[key]; 9 | if (hookHandlerFn) handler[key] = hookHandlerFn; 10 | }); 11 | 12 | sdk.addChannelHandler(handlerId, handler); 13 | return () => sdk.removeChannelHandler(handlerId); 14 | }, [sdk, handlerId, ...deps]); 15 | }; 16 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/hooks/useConnectionHandler.js: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | export const useConnectionHandler = (sdk, handlerId, hookHandler, deps = []) => { 4 | useEffect(() => { 5 | const handler = new sdk.ConnectionHandler(); 6 | const handlerKeys = Object.keys(handler); 7 | handlerKeys.forEach(key => { 8 | const hookHandlerFn = hookHandler[key]; 9 | if (hookHandlerFn) handler[key] = hookHandlerFn; 10 | }); 11 | 12 | sdk.addConnectionHandler(handlerId, handler); 13 | return () => sdk.removeConnectionHandler(handlerId); 14 | }, [sdk, handlerId, ...deps]); 15 | }; 16 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/hooks/useForceUpdate.js: -------------------------------------------------------------------------------- 1 | import { useCallback, useState } from 'react'; 2 | 3 | export const useForceUpdate = () => { 4 | const [, updater] = useState(0); 5 | return useCallback(() => updater(prev => prev + 1), []); 6 | }; 7 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/hooks/useIsMountedRef.js: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from 'react'; 2 | 3 | export const useIsMountedRef = () => { 4 | const isMounted = useRef(true); 5 | 6 | useEffect(() => { 7 | return () => { 8 | isMounted.current = false; 9 | }; 10 | }, []); 11 | 12 | return isMounted; 13 | }; 14 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/libs/AuthManager.js: -------------------------------------------------------------------------------- 1 | import AsyncStorage from '@react-native-async-storage/async-storage'; 2 | 3 | export default class AuthManager { 4 | static SAVED_USER = 'SAVED_USER'; 5 | 6 | static async getUserForAutoSignIn() { 7 | const user = await AsyncStorage.getItem(AuthManager.SAVED_USER); 8 | if (user) return JSON.parse(user); 9 | else return null; 10 | } 11 | 12 | static signIn(user) { 13 | return AsyncStorage.setItem(AuthManager.SAVED_USER, JSON.stringify(user)); 14 | } 15 | 16 | static signOut() { 17 | return AsyncStorage.removeItem(AuthManager.SAVED_USER); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/reducer/login.js: -------------------------------------------------------------------------------- 1 | export const loginReducer = (state, action) => { 2 | switch (action.type) { 3 | case 'edit-userId': { 4 | const { content } = action.payload || {}; 5 | return { ...state, userId: content }; 6 | } 7 | case 'edit-nickname': { 8 | const { content } = action.payload || {}; 9 | return { ...state, nickname: content }; 10 | } 11 | case 'start-connection': { 12 | return { ...state, connecting: true, error: '' }; 13 | } 14 | case 'end-connection': { 15 | return { ...state, connecting: false }; 16 | } 17 | case 'error': { 18 | const { error } = action.payload || {}; 19 | return { ...state, error }; 20 | } 21 | } 22 | return state; 23 | }; 24 | -------------------------------------------------------------------------------- /react-native/react-native-hook-local-caching/Sendbird/src/reducer/profile.js: -------------------------------------------------------------------------------- 1 | export const profileReducer = (state, action) => { 2 | switch (action.type) { 3 | case 'edit-nickname': { 4 | const { content } = action.payload || {}; 5 | return { ...state, nickname: content }; 6 | } 7 | case 'start-update': { 8 | return { ...state, updating: true, error: '' }; 9 | } 10 | case 'end-update': { 11 | return { ...state, updating: false }; 12 | } 13 | case 'error': { 14 | const { error } = action.payload || {}; 15 | return { ...state, error }; 16 | } 17 | } 18 | return { ...state }; 19 | }; 20 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | rules: { 5 | 'react-hooks/exhaustive-deps': 0, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/.prettierignore: -------------------------------------------------------------------------------- 1 | **/*.min.js 2 | **/*.md 3 | **/*.json -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 120, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "semi": true, 6 | "singleQuote": true, 7 | "quoteProps": "preserve", 8 | "trailingComma": "all", 9 | "bracketSpacing": true, 10 | "arrowParens": "avoid" 11 | } 12 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/android/app/debug.keystore -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/main/java/com/sendbird/chat/reactnative/sample/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.sendbird.chat.reactnative.sample; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "Sendbird"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xhdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xhdpi/ic_notification.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xxhdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xxhdpi/ic_notification.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xxxhdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/android/app/src/main/res/mipmap-xxxhdpi/ic_notification.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Sendbird 3 | 4 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'Sendbird' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Sendbird", 3 | "displayName": "Sendbird" 4 | } -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/asset/launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/asset/launcher.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/asset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/asset/logo.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/asset/logo_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/asset/logo_white.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/asset/notification_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/asset/notification_icon.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'], 3 | }; 4 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | import { AppRegistry, Platform } from 'react-native'; 5 | import messaging from '@react-native-firebase/messaging'; 6 | 7 | import App from './App'; 8 | import { name as appName } from './app.json'; 9 | import { onRemoteMessage } from './src/utils'; 10 | 11 | if (Platform.OS !== 'ios') { 12 | messaging().setBackgroundMessageHandler(onRemoteMessage); 13 | } 14 | 15 | AppRegistry.registerComponent(appName, () => App); 16 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/ios/Sendbird.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/ios/Sendbird.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/ios/Sendbird/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : UIResponder 5 | 6 | @property (nonatomic, strong) UIWindow *window; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/ios/Sendbird/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/ios/Sendbird/Sendbird.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/ios/Sendbird/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char * argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/ios/SendbirdTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: true, 14 | }, 15 | }), 16 | }, 17 | }; 18 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/src/asset/logo-icon-purple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/src/asset/logo-icon-purple.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/src/asset/logo-icon-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/src/asset/logo-icon-white.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/src/asset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-hook/Sendbird/src/asset/logo.png -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/src/component/adminMessage.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Text, View } from 'react-native'; 3 | 4 | import { withAppContext } from '../context'; 5 | 6 | const AdminMessage = props => { 7 | const { message } = props; 8 | return ( 9 | <> 10 | 11 | {message.message} 12 | 13 | 14 | ); 15 | }; 16 | 17 | const style = { 18 | container: { 19 | width: '100%', 20 | alignItems: 'center', 21 | paddingVertical: 12, 22 | }, 23 | message: { 24 | fontSize: 18, 25 | color: '#ccc', 26 | }, 27 | }; 28 | 29 | export default withAppContext(AdminMessage); 30 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/src/component/message.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { withAppContext } from '../context'; 3 | 4 | import UserMessage from './userMessage'; 5 | import FileMessage from './fileMessage'; 6 | import AdminMessage from './adminMessage'; 7 | 8 | const Message = props => { 9 | const { message } = props; 10 | let component = null; 11 | if (message.isUserMessage()) { 12 | component = ; 13 | } else if (message.isFileMessage()) { 14 | component = ; 15 | } else if (message.isAdminMessage()) { 16 | component = ; 17 | } 18 | return component; 19 | }; 20 | 21 | export default withAppContext(Message); 22 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/src/context.js: -------------------------------------------------------------------------------- 1 | import React, { createContext } from 'react'; 2 | 3 | export const AppContext = createContext(); 4 | export const withAppContext = (Component, mapStateToProp = null) => { 5 | const ConsumableComponent = props => { 6 | return ( 7 | 8 | {state => { 9 | const mappedProps = mapStateToProp ? mapStateToProp(state) : state; 10 | const mergedProps = { ...props, ...mappedProps }; 11 | return ; 12 | }} 13 | 14 | ); 15 | }; 16 | return ConsumableComponent; 17 | }; 18 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/src/reducer/login.js: -------------------------------------------------------------------------------- 1 | export const loginReducer = (state, action) => { 2 | switch (action.type) { 3 | case 'edit-userId': { 4 | const { content } = action.payload || {}; 5 | return { ...state, userId: content }; 6 | } 7 | case 'edit-nickname': { 8 | const { content } = action.payload || {}; 9 | return { ...state, nickname: content }; 10 | } 11 | case 'start-connection': { 12 | return { ...state, connecting: true, error: '' }; 13 | } 14 | case 'end-connection': { 15 | return { ...state, connecting: false }; 16 | } 17 | case 'error': { 18 | const { error } = action.payload || {}; 19 | return { ...state, error }; 20 | } 21 | } 22 | return state; 23 | }; 24 | -------------------------------------------------------------------------------- /react-native/react-native-hook/Sendbird/src/reducer/profile.js: -------------------------------------------------------------------------------- 1 | export const profileReducer = (state, action) => { 2 | switch (action.type) { 3 | case 'edit-nickname': { 4 | const { content } = action.payload || {}; 5 | return { ...state, nickname: content }; 6 | } 7 | case 'start-update': { 8 | return { ...state, updating: true, error: '' }; 9 | } 10 | case 'end-update': { 11 | return { ...state, updating: false }; 12 | } 13 | case 'error': { 14 | const { error } = action.payload || {}; 15 | return { ...state, error }; 16 | } 17 | } 18 | return { ...state }; 19 | }; 20 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/.buckconfig: -------------------------------------------------------------------------------- 1 | 2 | [android] 3 | target = Google Inc.:Google APIs:23 4 | 5 | [maven_repositories] 6 | central = https://repo1.maven.org/maven2 7 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | extends: '@react-native-community', 4 | }; 5 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/.gitattributes: -------------------------------------------------------------------------------- 1 | *.pbxproj -text 2 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/.prettierrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | printWidth: 120, 3 | tabWidth: 2, 4 | useTabs: false, 5 | semi: true, 6 | singleQuote: true, 7 | quoteProps: 'preserve', 8 | trailingComma: 'none', 9 | bracketSpacing: true, 10 | arrowParens: 'avoid', 11 | }; 12 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/.watchmanconfig: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__mocks__/mockCachedImage.js: -------------------------------------------------------------------------------- 1 | jest.mock('react-native-cached-image', () => ({ 2 | CachedImage: 'CachedImage' 3 | })); 4 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__mocks__/mockFirebase.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | jest.mock('react-native-firebase', () => ({ 3 | messaging: jest.fn(() => ({ 4 | hasPermission: jest.fn(() => Promise.resolve(true)), 5 | subscribeToTopic: jest.fn(), 6 | unsubscribeFromTopic: jest.fn(), 7 | requestPermission: jest.fn(() => Promise.resolve(true)), 8 | getToken: jest.fn(() => Promise.resolve('myMockToken')), 9 | onTokenRefresh: jest.fn(), 10 | onMessage: jest.fn() 11 | })), 12 | notifications: jest.fn(() => ({ 13 | onNotification: jest.fn(), 14 | onNotificationDisplayed: jest.fn(), 15 | onNotificationOpened: jest.fn(), 16 | removeAllDeliveredNotifications: jest.fn() 17 | })) 18 | })); 19 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__mocks__/mockNativeModules.js: -------------------------------------------------------------------------------- 1 | jest.mock('NativeModules', () => ({ 2 | UIManager: { 3 | RCTView: () => {} 4 | }, 5 | RNGestureHandlerModule: { 6 | attachGestureHandler: jest.fn(), 7 | createGestureHandler: jest.fn(), 8 | dropGestureHandler: jest.fn(), 9 | updateGestureHandler: jest.fn(), 10 | State: {}, 11 | Directions: { 12 | forceTouchAvailable: jest.fn() 13 | } 14 | }, 15 | PlatformConstants: { 16 | forceTouchAvailable: false 17 | } 18 | })); 19 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__mocks__/mockNavigation.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | jest.mock('react-navigation', () => ({ 3 | StackActions: { 4 | reset: jest.fn() 5 | }, 6 | NavigationActions: { 7 | navigate: jest.fn() 8 | } 9 | })); 10 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__mocks__/mockToast.js: -------------------------------------------------------------------------------- 1 | export const Toast = { 2 | show: jest.fn(), 3 | durations: { 4 | SHORT: 'short' 5 | }, 6 | positions: { 7 | BOTTOM: 'bottom' 8 | } 9 | }; 10 | 11 | jest.mock('react-native-root-toast', () => { 12 | return Toast; 13 | }); 14 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__mocks__/mockVideo.js: -------------------------------------------------------------------------------- 1 | jest.mock('react-native-video', () => { 2 | return 'Video'; 3 | }); 4 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/__snapshots__/utils.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`utils createChannelTitle concise 1`] = `"12345, 23456, 567..."`; 4 | 5 | exports[`utils createChannelTitle full 1`] = `"12345, 23456, 56789"`; 6 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/action/__snapshots__/invite.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`action/invite fetchUsers 1`] = ` 4 | Object { 5 | "payload": Object { 6 | "users": Array [ 7 | Object { 8 | "nickname": "test", 9 | }, 10 | Object { 11 | "nickname": "test 2", 12 | }, 13 | ], 14 | }, 15 | "type": "user-fetch", 16 | } 17 | `; 18 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/action/__snapshots__/member.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`action/invite initMembers 1`] = ` 4 | Object { 5 | "payload": Object { 6 | "members": Array [ 7 | Object { 8 | "nickname": "test", 9 | }, 10 | Object { 11 | "nickname": "test 2", 12 | }, 13 | ], 14 | }, 15 | "type": "member-init", 16 | } 17 | `; 18 | 19 | exports[`action/invite updateMembers 1`] = ` 20 | Object { 21 | "payload": Object { 22 | "members": Array [ 23 | Object { 24 | "nickname": "test", 25 | }, 26 | Object { 27 | "nickname": "test 2", 28 | }, 29 | ], 30 | }, 31 | "type": "member-update", 32 | } 33 | `; 34 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/action/__snapshots__/signin.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`action/authenticate authenticate 1`] = ` 4 | Object { 5 | "type": "authenticate", 6 | } 7 | `; 8 | 9 | exports[`action/authenticate fail 1`] = ` 10 | Object { 11 | "payload": Object { 12 | "err": [Error: fail], 13 | }, 14 | "type": "signin-failed", 15 | } 16 | `; 17 | 18 | exports[`action/authenticate succeed 1`] = ` 19 | Object { 20 | "payload": Object { 21 | "user": Object { 22 | "nickname": "test", 23 | }, 24 | }, 25 | "type": "signin-success", 26 | } 27 | `; 28 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/action/invite.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Action from '../../src/action/invite'; 4 | 5 | describe('action/invite', () => { 6 | it('fetchUsers', () => { 7 | const result = Action.fetchUsers([{ nickname: 'test' }, { nickname: 'test 2' }]); 8 | expect(result).toMatchSnapshot(); 9 | }); 10 | }); 11 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/action/member.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Action from '../../src/action/member'; 4 | 5 | describe('action/invite', () => { 6 | it('initMembers', () => { 7 | const result = Action.initMembers([{ nickname: 'test' }, { nickname: 'test 2' }]); 8 | expect(result).toMatchSnapshot(); 9 | }); 10 | 11 | it('updateMembers', () => { 12 | const result = Action.updateMembers([{ nickname: 'test' }, { nickname: 'test 2' }]); 13 | expect(result).toMatchSnapshot(); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/action/signin.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Action from '../../src/action/signin'; 4 | 5 | describe('action/authenticate', () => { 6 | it('authenticate', () => { 7 | const result = Action.authenticate(); 8 | expect(result).toMatchSnapshot(); 9 | }); 10 | 11 | it('succeed', () => { 12 | const result = Action.succeed({ nickname: 'test' }); 13 | expect(result).toMatchSnapshot(); 14 | }); 15 | 16 | it('fail', () => { 17 | const result = Action.fail(new Error('fail')); 18 | expect(result).toMatchSnapshot(); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/controller/__snapshots__/notfound.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`controller/notfound renders correctly 1`] = ` 4 | 15 | 24 | The channel does not exist or you are not a member of this channel. 25 | 26 | 27 | `; 28 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/controller/main.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { MainController } from '../../src/controller/main'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | const navigation = { 7 | setParams: jest.fn(), 8 | getParam: jest.fn().mockReturnValue({ userId: 123 }), 9 | navigate: jest.fn(), 10 | state: { 11 | params: { 12 | channelUrl: 'channelUrl', 13 | isOpenChannel: true 14 | } 15 | }, 16 | dispatch: jest.fn(), 17 | addListener: jest.fn() 18 | }; 19 | 20 | describe('controller/main', () => { 21 | it('renders correctly', () => { 22 | const comp = ; 23 | const tree = renderer.create(comp).toJSON(); 24 | expect(tree).toMatchSnapshot(); 25 | }); 26 | 27 | // TODO: add test cases 28 | }); 29 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/controller/notfound.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import NotFound from '../../src/controller/notfound'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | const navigation = { 7 | setParams: jest.fn(), 8 | getParam: jest.fn().mockReturnValue('channel Url'), 9 | navigate: jest.fn(), 10 | state: { 11 | params: { 12 | channelUrl: 'channelUrl', 13 | isOpenChannel: true 14 | } 15 | }, 16 | dispatch: jest.fn(), 17 | addListener: jest.fn() 18 | }; 19 | 20 | describe('controller/notfound', () => { 21 | it('renders correctly', () => { 22 | const tree = renderer.create().toJSON(); 23 | expect(tree).toMatchSnapshot(); 24 | }); 25 | 26 | // TODO: add test cases 27 | }); 28 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/controller/signin.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { SigninController } from '../../src/controller/signin'; 4 | import store from '../../src/store'; 5 | import renderer from 'react-test-renderer'; 6 | 7 | describe('controller/signing', () => { 8 | it('renders correctly', () => { 9 | const tree = renderer.create().toJSON(); 10 | expect(tree).toMatchSnapshot(); 11 | }); 12 | 13 | // TODO: add test cases 14 | }); 15 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/reducer/__snapshots__/invite.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`reducer/invite USER_FETCH 1`] = ` 4 | Object { 5 | "err": null, 6 | "users": Array [ 7 | "d", 8 | "e", 9 | "f", 10 | "a", 11 | "b", 12 | "c", 13 | ], 14 | } 15 | `; 16 | 17 | exports[`reducer/invite checking initial state 1`] = ` 18 | Object { 19 | "err": null, 20 | "users": Array [], 21 | } 22 | `; 23 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/reducer/__snapshots__/member.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`reducer/member MEMBER_INIT 1`] = ` 4 | Object { 5 | "members": Array [ 6 | Object { 7 | "userId": 1, 8 | }, 9 | Object { 10 | "userId": 2, 11 | }, 12 | Object { 13 | "userId": 3, 14 | }, 15 | ], 16 | } 17 | `; 18 | 19 | exports[`reducer/member MEMBER_UPDATE 1`] = ` 20 | Object { 21 | "members": Array [ 22 | Object { 23 | "userId": 1, 24 | }, 25 | Object { 26 | "userId": 2, 27 | }, 28 | Object { 29 | "userId": 3, 30 | }, 31 | ], 32 | } 33 | `; 34 | 35 | exports[`reducer/member checking initial state 1`] = ` 36 | Object { 37 | "members": Array [], 38 | } 39 | `; 40 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/reducer/invite.test.js: -------------------------------------------------------------------------------- 1 | import { reducer } from '../../src/reducer/invite'; 2 | import Action from '../../src/action/invite'; 3 | 4 | describe('reducer/invite', () => { 5 | test('checking initial state', () => { 6 | const action = { type: 'nonexistent' }; 7 | expect(reducer(undefined, action)).toMatchSnapshot(); 8 | }); 9 | 10 | test('USER_FETCH', () => { 11 | const action = { 12 | type: Action.Type.USER_FETCH, 13 | payload: { 14 | users: ['a', 'b', 'c'] 15 | } 16 | }; 17 | expect(reducer({ users: ['d', 'e', 'f'], err: null }, action)).toMatchSnapshot(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/__tests__/view/user.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import UserView from '../../src/view/user'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | describe('view/user', () => { 7 | it('renders correctly', () => { 8 | const user = { 9 | userId: 'userId', 10 | nickname: 'nick' 11 | }; 12 | const tree = renderer.create().toJSON(); 13 | expect(tree).toMatchSnapshot(); 14 | }); 15 | 16 | it('renders correctly when selected', () => { 17 | const user = { 18 | userId: 'userId', 19 | nickname: 'nick' 20 | }; 21 | const tree = renderer.create().toJSON(); 22 | expect(tree).toMatchSnapshot(); 23 | }); 24 | 25 | // TODO: add test cases 26 | }); 27 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | ReactNativeSyncManagerSample 4 | Project android___ created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | arguments= 2 | auto.sync=false 3 | build.scans.enabled=false 4 | connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) 5 | connection.project.dir= 6 | eclipse.preferences.version=1 7 | gradle.user.home= 8 | java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home 9 | jvm.arguments= 10 | offline.mode=false 11 | override.workspace.settings=true 12 | show.console.view=true 13 | show.executions.view=true 14 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/bin/src/main/java/com/reactnativesyncmanagersample/MainActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/bin/src/main/java/com/reactnativesyncmanagersample/MainActivity.class -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/bin/src/main/java/com/reactnativesyncmanagersample/MainApplication.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/bin/src/main/java/com/reactnativesyncmanagersample/MainApplication.class -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/debug.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/debug.keystore -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -keep class io.invertase.firebase.** { *; } 12 | -dontwarn io.invertase.firebase.** -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/AntDesign.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/AntDesign.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Feather.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Feather.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Fontisto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Fontisto.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/SimpleLineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/SimpleLineIcons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-xhdpi/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-xhdpi/ic_notification.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ReactNativeSyncManagerSample 3 | com.reactnativesyncmanagersample.default_channel_id 4 | 5 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Mon Oct 07 11:32:32 KST 2019 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip 7 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/keystores/BUCK: -------------------------------------------------------------------------------- 1 | keystore( 2 | name = "debug", 3 | properties = "debug.keystore.properties", 4 | store = "debug.keystore", 5 | visibility = [ 6 | "PUBLIC", 7 | ], 8 | ) 9 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/keystores/debug.keystore.properties: -------------------------------------------------------------------------------- 1 | key.store=debug.keystore 2 | key.alias=androiddebugkey 3 | key.store.password=android 4 | key.alias.password=android 5 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactNativeSyncManagerSample' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' 4 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativeSyncManagerSample", 3 | "displayName": "ReactNativeSyncManagerSample" 4 | } 5 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'] 3 | }; 4 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @format 3 | */ 4 | 5 | import { AppRegistry } from 'react-native'; 6 | import App from './App'; 7 | import { name as appName } from './app.json'; 8 | import backgroundPush from './src/push'; 9 | import 'react-native-gesture-handler'; 10 | 11 | AppRegistry.registerComponent(appName, () => App); 12 | AppRegistry.registerHeadlessTask('RNFirebaseBackgroundMessage', () => backgroundPush); 13 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/Images.xcassets/AppIcon.appiconset/ic_launcher-3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/Images.xcassets/AppIcon.appiconset/ic_launcher-3.jpg -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/Images.xcassets/AppIcon.appiconset/ic_launcher-4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/Images.xcassets/AppIcon.appiconset/ic_launcher-4.jpg -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/Images.xcassets/AppIcon.appiconset/ic_launcher-5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/Images.xcassets/AppIcon.appiconset/ic_launcher-5.jpg -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/Images.xcassets/AppIcon.appiconset/ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/Images.xcassets/AppIcon.appiconset/ic_notification.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/ReactNativeSyncManagerSample.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/ios/ReactNativeSyncManagerSample/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | 8 | module.exports = { 9 | transformer: { 10 | getTransformOptions: async () => ({ 11 | transform: { 12 | experimentalImportSupport: false, 13 | inlineRequires: false 14 | } 15 | }) 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/action/invite.js: -------------------------------------------------------------------------------- 1 | 2 | const Action = { 3 | Type: { 4 | USER_FETCH: 'user-fetch' 5 | } 6 | }; 7 | Action.fetchUsers = users => { 8 | return { 9 | type: Action.Type.USER_FETCH, 10 | payload: { users } 11 | }; 12 | }; 13 | 14 | export default Action; -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/action/member.js: -------------------------------------------------------------------------------- 1 | 2 | const Action = { 3 | Type: { 4 | MEMBER_INIT: 'member-init', 5 | MEMBER_UPDATE: 'member-update' 6 | } 7 | }; 8 | Action.initMembers = members => { 9 | return { 10 | type: Action.Type.MEMBER_INIT, 11 | payload: { 12 | members 13 | } 14 | }; 15 | }; 16 | Action.updateMembers = members => { 17 | return { 18 | type: Action.Type.MEMBER_UPDATE, 19 | payload: { 20 | members 21 | } 22 | }; 23 | }; 24 | 25 | export default Action; -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/action/signin.js: -------------------------------------------------------------------------------- 1 | 2 | const Action = { 3 | Type: { 4 | AUTHENTICATE: 'authenticate', 5 | SIGNIN_SUCCESS: 'signin-success', 6 | SIGNIN_FAILED: 'signin-failed' 7 | } 8 | }; 9 | Action.authenticate = () => { 10 | return { 11 | type: Action.Type.AUTHENTICATE 12 | }; 13 | }; 14 | Action.succeed = user => { 15 | return { 16 | type: Action.Type.SIGNIN_SUCCESS, 17 | payload: { user } 18 | }; 19 | }; 20 | Action.fail = err => { 21 | return { 22 | type: Action.Type.SIGNIN_FAILED, 23 | payload: { err } 24 | }; 25 | }; 26 | 27 | export default Action; -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/config.js: -------------------------------------------------------------------------------- 1 | 2 | export default class Config { 3 | static get appId() { 4 | return '9DA1B1F4-0BE6-4DA8-82C5-2E81DAB56F23'; 5 | } 6 | } -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/img/icon_sb_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/img/icon_sb_256.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/img/icon_sb_34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/img/icon_sb_34.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/img/icon_sb_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/img/icon_sb_512.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/img/icon_sb_68.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/img/icon_sb_68.png -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/navigator.js: -------------------------------------------------------------------------------- 1 | 2 | const _stack = []; 3 | 4 | export const navigator = { 5 | push: channelUrl => { 6 | if(_stack.indexOf(channelUrl) < 0) { 7 | _stack.push(channelUrl); 8 | return true; 9 | } 10 | return false; 11 | }, 12 | pop: () => { 13 | if(_stack.length > 0) { 14 | _stack.pop(); 15 | } 16 | }, 17 | top: () => { 18 | return _stack.length > 0 ? _stack[_stack.length - 1] : null; 19 | } 20 | }; -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/reducer/index.js: -------------------------------------------------------------------------------- 1 | import { combineReducers } from 'redux'; 2 | import { reducer as main } from './main'; 3 | import { reducer as chat } from './chat'; 4 | import { reducer as invite } from './invite'; 5 | import { reducer as member } from './member'; 6 | import { reducer as signin } from './signin'; 7 | 8 | export default combineReducers({ 9 | main, 10 | chat, 11 | invite, 12 | member, 13 | signin 14 | }); 15 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/reducer/invite.js: -------------------------------------------------------------------------------- 1 | import Action from "../action/invite"; 2 | 3 | const _initialState = { 4 | users: [], 5 | err: null 6 | }; 7 | 8 | export const reducer = (state = _initialState, action) => { 9 | const newState = { ...state }; 10 | switch(action.type) { 11 | case Action.Type.USER_FETCH: { 12 | newState.users = newState.users.concat(action.payload.users); 13 | break; 14 | } 15 | } 16 | return newState; 17 | }; -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/reducer/member.js: -------------------------------------------------------------------------------- 1 | 2 | import Action from "../action/member"; 3 | 4 | const _initialState = { 5 | members: [] 6 | }; 7 | 8 | export const reducer = (state = _initialState, action) => { 9 | const newState = { ...state }; 10 | switch(action.type) { 11 | case Action.Type.MEMBER_INIT: { 12 | newState.members = action.payload.members; 13 | break; 14 | } 15 | case Action.Type.MEMBER_UPDATE: { 16 | newState.members = [ ...action.payload.members ]; 17 | break; 18 | } 19 | } 20 | return newState; 21 | }; -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/store.js: -------------------------------------------------------------------------------- 1 | import {createStore, compose, applyMiddleware} from 'redux'; 2 | import thunk from 'redux-thunk'; 3 | import reducers from './reducer'; 4 | 5 | export const store = createStore(reducers, {}, compose(applyMiddleware(thunk))); 6 | -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/style/invite.js: -------------------------------------------------------------------------------- 1 | 2 | import { StyleSheet } from 'react-native'; 3 | 4 | export const style = StyleSheet.create({ 5 | headerInviteContainer: { 6 | marginLeft: 0, 7 | marginRight: 10 8 | }, 9 | headerInvite: { 10 | backgroundColor: 'transparent', 11 | paddingHorizontal: 10 12 | } 13 | }); -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/style/main.js: -------------------------------------------------------------------------------- 1 | 2 | import { StyleSheet } from 'react-native'; 3 | 4 | export const style = StyleSheet.create({ 5 | container: { 6 | flex: 1, 7 | backgroundColor: '#f3f3f3' 8 | }, 9 | actionButtonShadow: { 10 | shadowColor: "#333", 11 | shadowOpacity: 0.6, 12 | shadowOffset: { 13 | height: 1, 14 | width: 1 15 | } 16 | }, 17 | actionButtonIcon: { 18 | fontSize: 20, 19 | height: 22, 20 | color: 'white' 21 | }, 22 | signoutButtonContainer: { 23 | marginLeft: 0, 24 | marginRight: 10 25 | }, 26 | signoutButton: { 27 | backgroundColor: 'transparent', 28 | paddingHorizontal: 10 29 | } 30 | }); -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/style/member.js: -------------------------------------------------------------------------------- 1 | 2 | import { StyleSheet } from 'react-native'; 3 | 4 | export const style = StyleSheet.create({ 5 | headerInviteContainer: { 6 | marginLeft: 0, 7 | marginRight: 10 8 | }, 9 | headerInvite: { 10 | backgroundColor: 'transparent', 11 | paddingHorizontal: 10 12 | } 13 | }); -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/style/notfound.js: -------------------------------------------------------------------------------- 1 | 2 | import { StyleSheet } from 'react-native'; 3 | 4 | export const style = StyleSheet.create({ 5 | container: { 6 | flex: 1, 7 | justifyContent: 'center', 8 | alignItems: 'center', 9 | backgroundColor: '#f3f3f3', 10 | padding: 40 11 | }, 12 | message: { 13 | fontSize: 18, 14 | color: '#999', 15 | textAlign: 'center' 16 | } 17 | }); -------------------------------------------------------------------------------- /react-native/react-native-redux-syncmanager/ReactNativeSyncManagerSample/src/style/user.js: -------------------------------------------------------------------------------- 1 | 2 | import { StyleSheet } from 'react-native'; 3 | 4 | export const style = StyleSheet.create({ 5 | container: { 6 | backgroundColor: '#fff' 7 | }, 8 | nickname: { 9 | fontWeight: '500', 10 | fontSize: 16, 11 | marginLeft: 8 12 | }, 13 | selectContainer: { 14 | padding: 0, 15 | margin: 0, 16 | marginLeft: 4, 17 | marginRight: 4 18 | }, 19 | select: { 20 | padding: 0, 21 | margin: 0 22 | } 23 | }); -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__mocks__/mockCachedImage.js: -------------------------------------------------------------------------------- 1 | jest.mock('react-native-cached-image', () => ({ 2 | CachedImage: 'CachedImage' 3 | })); 4 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__mocks__/mockFirebase.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | jest.mock('react-native-firebase', () => ({ 3 | messaging: jest.fn(() => ({ 4 | hasPermission: jest.fn(() => Promise.resolve(true)), 5 | subscribeToTopic: jest.fn(), 6 | unsubscribeFromTopic: jest.fn(), 7 | requestPermission: jest.fn(() => Promise.resolve(true)), 8 | getToken: jest.fn(() => Promise.resolve('myMockToken')), 9 | onTokenRefresh: jest.fn(), 10 | onMessage: jest.fn() 11 | })), 12 | notifications: jest.fn(() => ({ 13 | onNotification: jest.fn(), 14 | onNotificationDisplayed: jest.fn(), 15 | onNotificationOpened: jest.fn(), 16 | removeAllDeliveredNotifications: jest.fn() 17 | })) 18 | })); 19 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__mocks__/mockNavigation.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable no-undef */ 2 | jest.mock('react-navigation', () => ({ 3 | StackActions: { 4 | reset: jest.fn() 5 | }, 6 | NavigationActions: { 7 | navigate: jest.fn() 8 | } 9 | })); 10 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__mocks__/mockVideo.js: -------------------------------------------------------------------------------- 1 | jest.mock('react-native-video', () => { 2 | return 'Video'; 3 | }); 4 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/AdminMessage.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { AdminMessage } from '../../src/components'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | describe('component/AdminMessage', () => { 7 | it('renders correctly', () => { 8 | let props = { 9 | message: 'test_message' 10 | }; 11 | const tree = renderer.create().toJSON(); 12 | expect(tree).toMatchSnapshot(); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/Hr.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { HR } from '../../src/components'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | describe('component/Hr', () => { 7 | it('renders correctly', () => { 8 | const tree = renderer.create(
).toJSON(); 9 | expect(tree).toMatchSnapshot(); 10 | }); 11 | }); 12 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/ImageItem.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { ImageItem } from '../../src/components'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | describe('component/ImageItem', () => { 7 | it('renders correctly', () => { 8 | let props = { 9 | message: 'test_message_uri' 10 | }; 11 | const tree = renderer.create().toJSON(); 12 | expect(tree).toMatchSnapshot(); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/MessageAvatar.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { MessageAvatar } from '../../src/components'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | describe('component/MessageAvatar', () => { 7 | it('renders correctly with user present', () => { 8 | let props = { 9 | uri: 'test_uri', 10 | isShow: false, 11 | onPress: () => {} 12 | }; 13 | const tree = renderer.create().toJSON(); 14 | expect(tree).toMatchSnapshot(); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/Spinner.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { Spinner } from '../../src/components'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | describe('component/Spinner', () => { 7 | it('renders correctly when visible', () => { 8 | const props = { 9 | visible: true 10 | }; 11 | const tree = renderer.create().toJSON(); 12 | expect(tree).toMatchSnapshot(); 13 | }); 14 | 15 | it('renders correctly when not visible', () => { 16 | const props = { 17 | visible: false 18 | }; 19 | const tree = renderer.create().toJSON(); 20 | expect(tree).toMatchSnapshot(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/TextItem.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import { TextItem } from '../../src/components'; 4 | import renderer from 'react-test-renderer'; 5 | 6 | describe('component/TextItem', () => { 7 | it('renders correctly with user present', () => { 8 | const props = { 9 | isUser: true, 10 | message: 'test_message' 11 | }; 12 | const tree = renderer.create().toJSON(); 13 | expect(tree).toMatchSnapshot(); 14 | }); 15 | 16 | it('renders correctly with no user present', () => { 17 | const props = { 18 | isUser: false, 19 | message: 'test_message' 20 | }; 21 | const tree = renderer.create().toJSON(); 22 | expect(tree).toMatchSnapshot(); 23 | }); 24 | }); 25 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/__snapshots__/Hr.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`component/Hr renders correctly 1`] = ` 4 | 17 | `; 18 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/__snapshots__/ImageItem.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`component/ImageItem renders correctly 1`] = ` 4 | 7 | 21 | 22 | `; 23 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/__snapshots__/MessageAvatar.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`component/MessageAvatar renders correctly with user present 1`] = ` 4 | 14 | `; 15 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/components/__snapshots__/TextItem.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`component/TextItem renders correctly with no user present 1`] = ` 4 | 7 | 15 | test_message 16 | 17 | 18 | `; 19 | 20 | exports[`component/TextItem renders correctly with user present 1`] = ` 21 | 24 | 32 | test_message 33 | 34 | 35 | `; 36 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/helpers/mockStorage.js: -------------------------------------------------------------------------------- 1 | export default class MockStorage { 2 | constructor(cache = {}) { 3 | this.storageCache = cache; 4 | } 5 | 6 | setItem = jest.fn((key, value, cb) => { 7 | if (typeof key !== 'string' || typeof value !== 'string') { 8 | cb(new Error('Key and value must be string')); 9 | } else { 10 | this.storageCache[key] = value; 11 | cb(null); 12 | } 13 | }); 14 | 15 | getItem = jest.fn((key, cb) => { 16 | if (this.storageCache.hasOwnProperty(key)) { 17 | cb(null, this.storageCache[key]); 18 | } else { 19 | cb(new Error('Not present ' + key), null); 20 | } 21 | }); 22 | } 23 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/reducers/__snapshots__/loginReducer.tests.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`reducers/loginReducer INIT_LOGIN 1`] = ` 4 | Object { 5 | "error": "", 6 | "user": null, 7 | } 8 | `; 9 | 10 | exports[`reducers/loginReducer LOGIN_FAIL 1`] = ` 11 | Object { 12 | "error": "error", 13 | "user": null, 14 | } 15 | `; 16 | 17 | exports[`reducers/loginReducer LOGIN_SUCCESS 1`] = ` 18 | Object { 19 | "error": "", 20 | "user": "user", 21 | } 22 | `; 23 | 24 | exports[`reducers/loginReducer checking initial state 1`] = ` 25 | Object { 26 | "error": "", 27 | "user": null, 28 | } 29 | `; 30 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/reducers/__snapshots__/memberReducer.tests.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`reducers/memberReducer INIT_MEMBER 1`] = ` 4 | Object { 5 | "list": Array [], 6 | } 7 | `; 8 | 9 | exports[`reducers/memberReducer MEMBER_LIST_FAIL 1`] = ` 10 | Object { 11 | "list": Array [], 12 | } 13 | `; 14 | 15 | exports[`reducers/memberReducer MEMBER_LIST_SUCCESS 1`] = ` 16 | Object { 17 | "list": Array [ 18 | "1", 19 | "2", 20 | ], 21 | } 22 | `; 23 | 24 | exports[`reducers/memberReducer checking initial state 1`] = ` 25 | Object { 26 | "list": Array [], 27 | } 28 | `; 29 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/reducers/__snapshots__/menuReducer.tests.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`reducers/menuReducer DISCONNECT_SUCCESS 1`] = ` 4 | Object { 5 | "isDisconnected": true, 6 | } 7 | `; 8 | 9 | exports[`reducers/menuReducer INIT_MENU 1`] = ` 10 | Object { 11 | "isDisconnected": false, 12 | } 13 | `; 14 | 15 | exports[`reducers/menuReducer checking initial state 1`] = ` 16 | Object { 17 | "isDisconnected": false, 18 | } 19 | `; 20 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/reducers/__snapshots__/openChannelCreateReducer.tests.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`reducers/openChannelCreateReducer INIT_OPEN_CHANNEL_CREATE 1`] = ` 4 | Object { 5 | "channel": null, 6 | "error": "", 7 | } 8 | `; 9 | 10 | exports[`reducers/openChannelCreateReducer OPEN_CHANNEL_CREATE_FAIL 1`] = ` 11 | Object { 12 | "channel": null, 13 | "error": "error", 14 | } 15 | `; 16 | 17 | exports[`reducers/openChannelCreateReducer OPEN_CHANNEL_CREATE_SUCCESS 1`] = ` 18 | Object { 19 | "channel": "channel", 20 | "error": "", 21 | } 22 | `; 23 | 24 | exports[`reducers/openChannelCreateReducer checking initial state 1`] = ` 25 | Object { 26 | "channel": null, 27 | "error": "", 28 | } 29 | `; 30 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/reducers/menuReducer.tests.js: -------------------------------------------------------------------------------- 1 | import { menuReducer } from '../../src/reducers'; 2 | import { INIT_MENU, DISCONNECT_SUCCESS } from '../../src/actions/types'; 3 | 4 | describe('reducers/menuReducer', () => { 5 | test('checking initial state', () => { 6 | const action = { type: 'nonexistent' }; 7 | expect(menuReducer(undefined, action)).toMatchSnapshot(); 8 | }); 9 | 10 | test('INIT_MENU', () => { 11 | const action = { type: INIT_MENU }; 12 | expect(menuReducer(undefined, action)).toMatchSnapshot(); 13 | }); 14 | 15 | test('DISCONNECT_SUCCESS', () => { 16 | const action = { type: DISCONNECT_SUCCESS }; 17 | expect(menuReducer(undefined, action)).toMatchSnapshot(); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/BlockUser.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import BlockUser from '../../src/screens/BlockUser'; 4 | import store from '../../src/store'; 5 | import renderer from 'react-test-renderer'; 6 | 7 | describe('screen/BlockUser', () => { 8 | it('renders correctly', () => { 9 | const tree = renderer.create().toJSON(); 10 | expect(tree).toMatchSnapshot(); 11 | }); 12 | 13 | // TODO: add test cases 14 | }); 15 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/Chat.test.js: -------------------------------------------------------------------------------- 1 | jest.useFakeTimers(); 2 | 3 | import 'react-native'; 4 | import React from 'react'; 5 | import Chat from '../../src/screens/Chat'; 6 | import store from '../../src/store'; 7 | import renderer from 'react-test-renderer'; 8 | 9 | const navigation = { 10 | setParams: jest.fn(), 11 | navigate: jest.fn(), 12 | state: { 13 | params: { 14 | channelUrl: 'channelUrl', 15 | isOpenChannel: true 16 | } 17 | }, 18 | dispatch: jest.fn(), 19 | addListener: jest.fn() 20 | }; 21 | 22 | describe('screen/Chat', () => { 23 | it('renders correctly', () => { 24 | const tree = renderer.create().toJSON(); 25 | expect(tree).toMatchSnapshot(); 26 | }); 27 | 28 | // TODO: add test cases 29 | }); 30 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/GroupChannel.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import GroupChannel from '../../src/screens/GroupChannel'; 4 | import store from '../../src/store'; 5 | import renderer from 'react-test-renderer'; 6 | 7 | const navigation = { 8 | setParams: jest.fn(), 9 | navigate: jest.fn(), 10 | state: { 11 | params: { 12 | channelUrl: 'channelUrl', 13 | isOpenChannel: true 14 | } 15 | }, 16 | dispatch: jest.fn(), 17 | addListener: jest.fn() 18 | }; 19 | 20 | describe('screen/GroupChannel', () => { 21 | it('renders correctly', () => { 22 | const tree = renderer.create().toJSON(); 23 | expect(tree).toMatchSnapshot(); 24 | }); 25 | 26 | // TODO: add test cases 27 | }); 28 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/GroupChannelInvite.test.js: -------------------------------------------------------------------------------- 1 | jest.useFakeTimers(); 2 | 3 | import 'react-native'; 4 | import React from 'react'; 5 | import GroupChannelInvite from '../../src/screens/GroupChannelInvite'; 6 | import store from '../../src/store'; 7 | import renderer from 'react-test-renderer'; 8 | 9 | const navigation = { 10 | setParams: jest.fn(), 11 | navigate: jest.fn(), 12 | state: { 13 | params: { 14 | channelUrl: 'channelUrl' 15 | } 16 | } 17 | }; 18 | 19 | describe('screen/GroupChannelInvite', () => { 20 | it('renders correctly', () => { 21 | const tree = renderer.create().toJSON(); 22 | expect(tree).toMatchSnapshot(); 23 | }); 24 | 25 | // TODO: add test cases 26 | }); 27 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/Login.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Login from '../../src/screens/Login'; 4 | import store from '../../src/store'; 5 | import renderer from 'react-test-renderer'; 6 | 7 | describe('screen/Login', () => { 8 | it('renders correctly', () => { 9 | const tree = renderer.create().toJSON(); 10 | expect(tree).toMatchSnapshot(); 11 | }); 12 | 13 | // TODO: add test cases 14 | }); 15 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/Member.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Member from '../../src/screens/Member'; 4 | import store from '../../src/store'; 5 | import renderer from 'react-test-renderer'; 6 | 7 | const navigation = { 8 | setParams: jest.fn(), 9 | navigate: jest.fn(), 10 | state: { 11 | params: { 12 | channelUrl: 'channelUrl', 13 | isOpenChannel: true 14 | } 15 | }, 16 | dispatch: jest.fn(), 17 | addListener: jest.fn() 18 | }; 19 | 20 | describe('screen/Member', () => { 21 | it('renders correctly', () => { 22 | const tree = renderer.create().toJSON(); 23 | expect(tree).toMatchSnapshot(); 24 | }); 25 | 26 | // TODO: add test cases 27 | }); 28 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/Menu.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import Menu from '../../src/screens/Menu'; 4 | import store from '../../src/store'; 5 | import renderer from 'react-test-renderer'; 6 | 7 | describe('screen/Menu', () => { 8 | it('renders correctly', () => { 9 | const tree = renderer.create().toJSON(); 10 | expect(tree).toMatchSnapshot(); 11 | }); 12 | 13 | // TODO: add test cases 14 | }); 15 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/OpenChannel.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import OpenChannel from '../../src/screens/OpenChannel'; 4 | import store from '../../src/store'; 5 | import renderer from 'react-test-renderer'; 6 | 7 | const navigation = { 8 | setParams: jest.fn(), 9 | navigate: jest.fn(), 10 | state: { 11 | params: { 12 | channelUrl: 'channelUrl' 13 | } 14 | }, 15 | dispatch: jest.fn(), 16 | addListener: jest.fn() 17 | }; 18 | 19 | describe('screen/OpenChannel', () => { 20 | it('renders correctly', () => { 21 | const tree = renderer.create().toJSON(); 22 | expect(tree).toMatchSnapshot(); 23 | }); 24 | 25 | // TODO: add test cases 26 | }); 27 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/OpenChannelCreate.test.js: -------------------------------------------------------------------------------- 1 | import 'react-native'; 2 | import React from 'react'; 3 | import OpenChannelCreate from '../../src/screens/OpenChannelCreate'; 4 | import store from '../../src/store'; 5 | import renderer from 'react-test-renderer'; 6 | 7 | const navigation = { 8 | setParams: jest.fn(), 9 | navigate: jest.fn(), 10 | state: { 11 | params: { 12 | channelUrl: 'channelUrl' 13 | } 14 | }, 15 | dispatch: jest.fn() 16 | }; 17 | 18 | describe('screen/OpenChannelCreate', () => { 19 | it('renders correctly', () => { 20 | const tree = renderer.create().toJSON(); 21 | expect(tree).toMatchSnapshot(); 22 | }); 23 | 24 | // TODO: add test cases 25 | }); 26 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/__tests__/screens/__snapshots__/BlockUser.test.js.snap: -------------------------------------------------------------------------------- 1 | // Jest Snapshot v1, https://goo.gl/fbAQLP 2 | 3 | exports[`screen/BlockUser renders correctly 1`] = ` 4 | 5 | 17 | 18 | 19 | 20 | `; 21 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/build_defs.bzl: -------------------------------------------------------------------------------- 1 | """Helper definitions to glob .aar and .jar targets""" 2 | 3 | def create_aar_targets(aarfiles): 4 | for aarfile in aarfiles: 5 | name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] 6 | lib_deps.append(":" + name) 7 | android_prebuilt_aar( 8 | name = name, 9 | aar = aarfile, 10 | ) 11 | 12 | def create_jar_targets(jarfiles): 13 | for jarfile in jarfiles: 14 | name = "jars__" + jarfile[jarfile.rindex("/") + 1:jarfile.rindex(".jar")] 15 | lib_deps.append(":" + name) 16 | prebuilt_jar( 17 | name = name, 18 | binary_jar = jarfile, 19 | ) 20 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /usr/local/Cellar/android-sdk/24.3.3/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/AntDesign.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/AntDesign.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Entypo.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Entypo.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/EvilIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/EvilIcons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Feather.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Feather.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/FontAwesome.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/FontAwesome.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Foundation.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Foundation.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Ionicons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/MaterialIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/MaterialIcons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Octicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Octicons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/SimpleLineIcons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/SimpleLineIcons.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Zocial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/assets/fonts/Zocial.ttf -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/java/com/reactnativewithsendbird/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.reactnativewithsendbird; 2 | 3 | import com.facebook.react.ReactActivity; 4 | 5 | public class MainActivity extends ReactActivity { 6 | 7 | /** 8 | * Returns the name of the main component registered from JavaScript. This is used to schedule 9 | * rendering of the component. 10 | */ 11 | @Override 12 | protected String getMainComponentName() { 13 | return "ReactNativeWithSendBird"; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-hdpi/sendbird_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-hdpi/sendbird_ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-mdpi/sendbird_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-mdpi/sendbird_ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xhdpi/sendbird_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xhdpi/sendbird_ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xhdpi/sendbird_ic_notification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xhdpi/sendbird_ic_notification.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxhdpi/sendbird_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxhdpi/sendbird_ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxxhdpi/sendbird_ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/mipmap-xxxhdpi/sendbird_ic_launcher.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | ReactNativeWithSendBird 3 | com.reactnativewithsendbird.default_channel_id 4 | 5 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/android/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/android/settings.gradle: -------------------------------------------------------------------------------- 1 | rootProject.name = 'ReactNativeWithSendBird' 2 | apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings) 3 | include ':app' -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ReactNativeWithSendBird", 3 | "displayName": "ReactNativeWithSendBird" 4 | } -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: ['module:metro-react-native-babel-preset'] 3 | }; 4 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/index.js: -------------------------------------------------------------------------------- 1 | import { AppRegistry } from 'react-native'; 2 | import { name as appName } from './app.json'; 3 | import App from './App'; 4 | import backgroundPush from './src/backgroundPush'; 5 | 6 | AppRegistry.registerComponent(appName, () => App); 7 | AppRegistry.registerHeadlessTask('RNFirebaseBackgroundMessage', () => backgroundPush); 8 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/AppDelegate.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (nonatomic, strong) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_1024px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_1024px.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_120px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_120px.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_152px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_152px.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_167px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_167px.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_180px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_180px.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_76px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/AppIcon.appiconset/icon_76px.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/Images.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/ReactNativeWithSendBird.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/ios/ReactNativeWithSendBird/main.m: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) Facebook, Inc. and its affiliates. 3 | * 4 | * This source code is licensed under the MIT license found in the 5 | * LICENSE file in the root directory of this source tree. 6 | */ 7 | 8 | #import 9 | 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "allowSyntheticDefaultImports": true 4 | }, 5 | "exclude": [ 6 | "node_modules" 7 | ] 8 | } -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/metro.config.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Metro configuration for React Native 3 | * https://github.com/facebook/react-native 4 | * 5 | * @format 6 | */ 7 | const blacklist = require('metro-config/src/defaults/blacklist'); 8 | 9 | module.exports = { 10 | transformer: { 11 | getTransformOptions: async () => ({ 12 | transform: { 13 | experimentalImportSupport: false, 14 | inlineRequires: false 15 | } 16 | }) 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/actions/index.js: -------------------------------------------------------------------------------- 1 | export * from './loginActions'; 2 | export * from './menuActions'; 3 | export * from './profileActions'; 4 | export * from './openChannelActions'; 5 | export * from './openChannelCreateActions'; 6 | export * from './chatActions'; 7 | export * from './memberActions'; 8 | export * from './blockUserActions'; 9 | export * from './groupChannelActions'; 10 | export * from './groupChannelInviteActions'; 11 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/actions/loginActions.js: -------------------------------------------------------------------------------- 1 | import { INIT_LOGIN, LOGIN_SUCCESS, LOGIN_FAIL } from './types'; 2 | import { sbConnect } from '../sendbirdActions'; 3 | 4 | export const initLogin = () => { 5 | return { type: INIT_LOGIN }; 6 | }; 7 | 8 | export const sendbirdLogin = ({ userId, nickname }) => { 9 | return dispatch => { 10 | return sbConnect(userId, nickname) 11 | .then(user => loginSuccess(dispatch, user)) 12 | .catch(error => loginFail(dispatch, error)); 13 | }; 14 | }; 15 | 16 | const loginFail = (dispatch, error) => { 17 | dispatch({ 18 | type: LOGIN_FAIL, 19 | payload: error 20 | }); 21 | }; 22 | 23 | const loginSuccess = (dispatch, user) => { 24 | dispatch({ 25 | type: LOGIN_SUCCESS, 26 | payload: user 27 | }); 28 | }; 29 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/actions/menuActions.js: -------------------------------------------------------------------------------- 1 | import { INIT_MENU, DISCONNECT_SUCCESS } from './types'; 2 | import { sbDisconnect } from '../sendbirdActions'; 3 | 4 | export const initMenu = () => { 5 | return { type: INIT_MENU }; 6 | }; 7 | 8 | export const sendbirdLogout = () => { 9 | return dispatch => { 10 | return sbDisconnect().then(() => dispatch({ type: DISCONNECT_SUCCESS })); 11 | }; 12 | }; 13 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/actions/openChannelCreateActions.js: -------------------------------------------------------------------------------- 1 | import { INIT_OPEN_CHANNEL_CREATE, OPEN_CHANNEL_CREATE_SUCCESS, OPEN_CHANNEL_CREATE_FAIL } from './types'; 2 | import { sbCreateOpenChannel } from '../sendbirdActions'; 3 | 4 | export const initOpenChannelCreate = () => { 5 | return { type: INIT_OPEN_CHANNEL_CREATE }; 6 | }; 7 | 8 | export const createOpenChannel = channelName => { 9 | return dispatch => { 10 | return sbCreateOpenChannel(channelName) 11 | .then(channel => 12 | dispatch({ 13 | type: OPEN_CHANNEL_CREATE_SUCCESS, 14 | channel: channel 15 | }) 16 | ) 17 | .catch(error => 18 | dispatch({ 19 | type: OPEN_CHANNEL_CREATE_FAIL, 20 | error: error 21 | }) 22 | ); 23 | }; 24 | }; 25 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/appStateChangeHandler.js: -------------------------------------------------------------------------------- 1 | export default (function() { 2 | var instance; 3 | 4 | function AppStateChangeHandler() { 5 | this.cbs = {}; 6 | this.addCallback = (key, cb) => { 7 | this.cbs[key] = cb; 8 | return () => { 9 | delete this.cbs[key]; 10 | }; 11 | }; 12 | 13 | this.notify = () => { 14 | for (let key in this.cbs) { 15 | this.cbs[key](); 16 | } 17 | }; 18 | } 19 | 20 | return { 21 | getInstance: function() { 22 | if (!instance) { 23 | instance = new AppStateChangeHandler(); 24 | } 25 | return instance; 26 | } 27 | }; 28 | })(); 29 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/components/Hr.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import { View } from 'react-native'; 3 | 4 | class HR extends Component { 5 | render() { 6 | return ; 7 | } 8 | } 9 | 10 | const styles = { 11 | lineStyle: { 12 | flexDirection: 'row', 13 | alignItems: 'center', 14 | height: 1, 15 | backgroundColor: '#e6e6e6' 16 | } 17 | }; 18 | 19 | export { HR }; 20 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/components/Spinner.js: -------------------------------------------------------------------------------- 1 | import React, { Component } from 'react'; 2 | import SpinnerComponent from 'react-native-loading-spinner-overlay'; 3 | 4 | class Spinner extends Component { 5 | render() { 6 | return ; 7 | } 8 | } 9 | 10 | export { Spinner }; 11 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/components/index.js: -------------------------------------------------------------------------------- 1 | export * from './Spinner'; 2 | export * from './Message'; 3 | export * from './MessageItem'; 4 | export * from './ImageItem'; 5 | export * from './MessageInput'; 6 | export * from './Hr'; 7 | export * from './MessageContainer'; 8 | export * from './MessageAvatar'; 9 | export * from './MessageBubble'; 10 | export { Button, Icon, Avatar, FormLabel, FormInput, FormValidationMessage, ListItem } from 'react-native-elements'; 11 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/img/icon_sb_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/src/img/icon_sb_256.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/img/icon_sb_34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/src/img/icon_sb_34.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/img/icon_sb_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/src/img/icon_sb_512.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/img/icon_sb_68.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react-native/react-native-redux/ReactNativeWithSendBird/src/img/icon_sb_68.png -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/reducers/loginReducer.js: -------------------------------------------------------------------------------- 1 | import { INIT_LOGIN, LOGIN_SUCCESS, LOGIN_FAIL } from '../actions/types'; 2 | 3 | const INITIAL_STATE = { 4 | error: '', 5 | user: null 6 | }; 7 | 8 | export default (state = INITIAL_STATE, action) => { 9 | switch (action.type) { 10 | case INIT_LOGIN: 11 | return { ...state, ...INITIAL_STATE }; 12 | case LOGIN_SUCCESS: 13 | return { ...state, ...INITIAL_STATE, user: action.payload }; 14 | case LOGIN_FAIL: 15 | return { ...state, ...INITIAL_STATE, error: action.payload }; 16 | default: 17 | return state; 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/reducers/memberReducer.js: -------------------------------------------------------------------------------- 1 | import { INIT_MEMBER, MEMBER_LIST_SUCCESS, MEMBER_LIST_FAIL } from '../actions/types'; 2 | 3 | const INITAL_STATE = { 4 | list: [] 5 | }; 6 | 7 | export default (state = INITAL_STATE, action) => { 8 | switch (action.type) { 9 | case INIT_MEMBER: 10 | return { ...state, ...INITAL_STATE }; 11 | case MEMBER_LIST_SUCCESS: 12 | return { ...state, list: action.list }; 13 | case MEMBER_LIST_FAIL: 14 | return { ...state, list: [] }; 15 | default: 16 | return state; 17 | } 18 | }; 19 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/reducers/menuReducer.js: -------------------------------------------------------------------------------- 1 | import { INIT_MENU, DISCONNECT_SUCCESS } from '../actions/types'; 2 | 3 | const INITIAL_STATE = { 4 | isDisconnected: false 5 | }; 6 | 7 | export default (state = INITIAL_STATE, action) => { 8 | switch (action.type) { 9 | case INIT_MENU: 10 | return { ...state, ...INITIAL_STATE }; 11 | case DISCONNECT_SUCCESS: 12 | return { ...state, isDisconnected: true }; 13 | default: 14 | return state; 15 | } 16 | }; 17 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/reducers/openChannelCreateReducer.js: -------------------------------------------------------------------------------- 1 | import { INIT_OPEN_CHANNEL_CREATE, OPEN_CHANNEL_CREATE_SUCCESS, OPEN_CHANNEL_CREATE_FAIL } from '../actions/types'; 2 | 3 | const INITAL_STATE = { 4 | error: '', 5 | channel: null 6 | }; 7 | 8 | export default (state = INITAL_STATE, action) => { 9 | switch (action.type) { 10 | case INIT_OPEN_CHANNEL_CREATE: 11 | return { ...state, ...INITAL_STATE }; 12 | case OPEN_CHANNEL_CREATE_SUCCESS: 13 | return { ...state, ...INITAL_STATE, channel: action.channel }; 14 | case OPEN_CHANNEL_CREATE_FAIL: 15 | return { ...state, ...INITAL_STATE, error: action.error }; 16 | default: 17 | return state; 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/reducers/profileReducer.js: -------------------------------------------------------------------------------- 1 | import { INIT_PROFILE, GET_PROFILE_SUCCESS, UPDATE_PROFILE_SUCCESS, UPDATE_PROFILE_FAIL } from '../actions/types'; 2 | 3 | const INITIAL_STATE = { 4 | userInfo: null, 5 | error: '', 6 | isSaved: false 7 | }; 8 | 9 | export default (state = INITIAL_STATE, action) => { 10 | switch (action.type) { 11 | case INIT_PROFILE: 12 | return { ...state, ...INITIAL_STATE }; 13 | case GET_PROFILE_SUCCESS: 14 | return { ...state, userInfo: action.userInfo }; 15 | case UPDATE_PROFILE_SUCCESS: 16 | return { ...state, error: '', isSaved: true }; 17 | case UPDATE_PROFILE_FAIL: 18 | return { ...state, error: action.error, isSaved: false }; 19 | default: 20 | return state; 21 | } 22 | }; 23 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/sendbirdActions/index.js: -------------------------------------------------------------------------------- 1 | export * from './utils'; 2 | export * from './user'; 3 | export * from './openChannel'; 4 | export * from './groupChannel'; 5 | export * from './chat'; 6 | -------------------------------------------------------------------------------- /react-native/react-native-redux/ReactNativeWithSendBird/src/store/index.js: -------------------------------------------------------------------------------- 1 | import { createStore, compose, applyMiddleware } from 'redux'; 2 | import thunk from 'redux-thunk'; 3 | import reducers from '../reducers'; 4 | 5 | const store = createStore(reducers, {}, compose(applyMiddleware(thunk))); 6 | 7 | export default store; 8 | -------------------------------------------------------------------------------- /react/react-app-composed/.env.example: -------------------------------------------------------------------------------- 1 | # Rename this file to .env and input correct values to use 2 | # Your App Id 3 | APP_ID=xxx 4 | # This is a trick to make scripts work in deployment 5 | # before: `/assets/main.js` after `./assets/main.js` 6 | PUBLIC_URL=./ 7 | -------------------------------------------------------------------------------- /react/react-app-composed/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /react/react-app-composed/config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/en/webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /react/react-app-composed/config/pnpTs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { resolveModuleName } = require('ts-pnp'); 4 | 5 | exports.resolveModuleName = ( 6 | typescript, 7 | moduleName, 8 | containingFile, 9 | compilerOptions, 10 | resolutionHost 11 | ) => { 12 | return resolveModuleName( 13 | moduleName, 14 | containingFile, 15 | compilerOptions, 16 | resolutionHost, 17 | typescript.resolveModuleName 18 | ); 19 | }; 20 | 21 | exports.resolveTypeReferenceDirective = ( 22 | typescript, 23 | moduleName, 24 | containingFile, 25 | compilerOptions, 26 | resolutionHost 27 | ) => { 28 | return resolveModuleName( 29 | moduleName, 30 | containingFile, 31 | compilerOptions, 32 | resolutionHost, 33 | typescript.resolveTypeReferenceDirective 34 | ); 35 | }; 36 | -------------------------------------------------------------------------------- /react/react-app-composed/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react/react-app-composed/public/favicon.ico -------------------------------------------------------------------------------- /react/react-app-composed/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react/react-app-composed/public/logo192.png -------------------------------------------------------------------------------- /react/react-app-composed/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react/react-app-composed/public/logo512.png -------------------------------------------------------------------------------- /react/react-app-composed/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react/react-app-composed/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /react/react-app-composed/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: inherit; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /react/react-app-composed/src/App.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import './App.css'; 3 | 4 | import { 5 | BrowserRouter as Router, 6 | Switch, 7 | Route, 8 | } from 'react-router-dom'; 9 | 10 | import Login from './Login'; 11 | import Chat from './Chat'; 12 | 13 | function App() { 14 | const [config, setconfig] = useState({}); 15 | return ( 16 |
17 | 18 | 19 | 20 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
32 | ); 33 | } 34 | 35 | export default App; 36 | -------------------------------------------------------------------------------- /react/react-app-composed/src/Chat.css: -------------------------------------------------------------------------------- 1 | .sendbird-app__wrap { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | } 6 | .sendbird-app__channellist-wrap { 7 | max-width: 320px; 8 | } 9 | .sendbird-app__conversation-wrap { 10 | flex: 1; 11 | position: relative; 12 | } 13 | .sendbird-app__settingspanel-wrap { 14 | position: fixed; 15 | top: 0; 16 | right: 0; 17 | height: 100%; 18 | } 19 | -------------------------------------------------------------------------------- /react/react-app-composed/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react/react-app-composed/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want your app to work offline and load faster, you can change 15 | // unregister() to register() below. Note this comes with some pitfalls. 16 | // Learn more about service workers: https://bit.ly/CRA-PWA 17 | serviceWorker.unregister(); 18 | -------------------------------------------------------------------------------- /react/react-app-composed/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /react/react-app-custom/.env.example: -------------------------------------------------------------------------------- 1 | # Rename this file to .env and input correct values to use 2 | APP_ID=xxx 3 | 4 | # This is a trick to make scripts work in deployment 5 | # before: `/assets/main.js` after `./assets/main.js` 6 | PUBLIC_URL=./ 7 | -------------------------------------------------------------------------------- /react/react-app-custom/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /react/react-app-custom/config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/en/webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /react/react-app-custom/config/pnpTs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { resolveModuleName } = require('ts-pnp'); 4 | 5 | exports.resolveModuleName = ( 6 | typescript, 7 | moduleName, 8 | containingFile, 9 | compilerOptions, 10 | resolutionHost 11 | ) => { 12 | return resolveModuleName( 13 | moduleName, 14 | containingFile, 15 | compilerOptions, 16 | resolutionHost, 17 | typescript.resolveModuleName 18 | ); 19 | }; 20 | 21 | exports.resolveTypeReferenceDirective = ( 22 | typescript, 23 | moduleName, 24 | containingFile, 25 | compilerOptions, 26 | resolutionHost 27 | ) => { 28 | return resolveModuleName( 29 | moduleName, 30 | containingFile, 31 | compilerOptions, 32 | resolutionHost, 33 | typescript.resolveTypeReferenceDirective 34 | ); 35 | }; 36 | -------------------------------------------------------------------------------- /react/react-app-custom/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react/react-app-custom/public/favicon.ico -------------------------------------------------------------------------------- /react/react-app-custom/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react/react-app-custom/public/logo192.png -------------------------------------------------------------------------------- /react/react-app-custom/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react/react-app-custom/public/logo512.png -------------------------------------------------------------------------------- /react/react-app-custom/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react/react-app-custom/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /react/react-app-custom/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | height: 40vmin; 7 | pointer-events: none; 8 | } 9 | 10 | @media (prefers-reduced-motion: no-preference) { 11 | .App-logo { 12 | animation: App-logo-spin infinite 20s linear; 13 | } 14 | } 15 | 16 | .App-header { 17 | background-color: #282c34; 18 | min-height: 100vh; 19 | display: flex; 20 | flex-direction: column; 21 | align-items: center; 22 | justify-content: center; 23 | font-size: calc(10px + 2vmin); 24 | color: white; 25 | } 26 | 27 | .App-link { 28 | color: #61dafb; 29 | } 30 | 31 | @keyframes App-logo-spin { 32 | from { 33 | transform: rotate(0deg); 34 | } 35 | to { 36 | transform: rotate(360deg); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /react/react-app-custom/src/Chat/index.css: -------------------------------------------------------------------------------- 1 | .sendbird-app__wrap { 2 | width: 100%; 3 | height: 100%; 4 | display: flex; 5 | } 6 | .sendbird-app__channellist-wrap { 7 | max-width: 320px; 8 | } 9 | .sendbird-app__conversation-wrap { 10 | flex: 1; 11 | position: relative; 12 | } 13 | .sendbird-app__settingspanel-wrap { 14 | position: fixed; 15 | top: 0; 16 | right: 0; 17 | height: 100%; 18 | } 19 | -------------------------------------------------------------------------------- /react/react-app-custom/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react/react-app-custom/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want your app to work offline and load faster, you can change 15 | // unregister() to register() below. Note this comes with some pitfalls. 16 | // Learn more about service workers: https://bit.ly/CRA-PWA 17 | serviceWorker.unregister(); 18 | -------------------------------------------------------------------------------- /react/react-app-custom/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /react/react-app-simple/.env.example: -------------------------------------------------------------------------------- 1 | # Rename this file to .env and input correct values to use 2 | # Your App Id 3 | APP_ID=xxx 4 | # This is a trick to make scripts work in deployment 5 | # before: `/assets/main.js` after `./assets/main.js` 6 | PUBLIC_URL=./ 7 | -------------------------------------------------------------------------------- /react/react-app-simple/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /react/react-app-simple/config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/en/webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /react/react-app-simple/config/pnpTs.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const { resolveModuleName } = require('ts-pnp'); 4 | 5 | exports.resolveModuleName = ( 6 | typescript, 7 | moduleName, 8 | containingFile, 9 | compilerOptions, 10 | resolutionHost 11 | ) => { 12 | return resolveModuleName( 13 | moduleName, 14 | containingFile, 15 | compilerOptions, 16 | resolutionHost, 17 | typescript.resolveModuleName 18 | ); 19 | }; 20 | 21 | exports.resolveTypeReferenceDirective = ( 22 | typescript, 23 | moduleName, 24 | containingFile, 25 | compilerOptions, 26 | resolutionHost 27 | ) => { 28 | return resolveModuleName( 29 | moduleName, 30 | containingFile, 31 | compilerOptions, 32 | resolutionHost, 33 | typescript.resolveTypeReferenceDirective 34 | ); 35 | }; 36 | -------------------------------------------------------------------------------- /react/react-app-simple/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react/react-app-simple/public/favicon.ico -------------------------------------------------------------------------------- /react/react-app-simple/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react/react-app-simple/public/logo192.png -------------------------------------------------------------------------------- /react/react-app-simple/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sendbird/sendbird-javascript-samples/d6d09a3714cb1889d56a2582739196e9d6e0bd7b/react/react-app-simple/public/logo512.png -------------------------------------------------------------------------------- /react/react-app-simple/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /react/react-app-simple/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /react/react-app-simple/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | height: 99vh; 4 | } 5 | 6 | .App-logo { 7 | height: 40vmin; 8 | pointer-events: none; 9 | } 10 | 11 | @media (prefers-reduced-motion: no-preference) { 12 | .App-logo { 13 | animation: App-logo-spin infinite 20s linear; 14 | } 15 | } 16 | 17 | .App-header { 18 | background-color: #282c34; 19 | min-height: 100vh; 20 | display: flex; 21 | flex-direction: column; 22 | align-items: center; 23 | justify-content: center; 24 | font-size: calc(10px + 2vmin); 25 | color: white; 26 | } 27 | 28 | .App-link { 29 | color: #61dafb; 30 | } 31 | 32 | @keyframes App-logo-spin { 33 | from { 34 | transform: rotate(0deg); 35 | } 36 | to { 37 | transform: rotate(360deg); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /react/react-app-simple/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import logo from './logo.svg'; 3 | import './App.css'; 4 | 5 | import { App as SendBirdApp } from 'sendbird-uikit'; 6 | import 'sendbird-uikit/dist/index.css'; 7 | 8 | function App() { 9 | return ( 10 |
11 | 16 |
17 | ); 18 | } 19 | 20 | export default App; 21 | -------------------------------------------------------------------------------- /react/react-app-simple/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /react/react-app-simple/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want your app to work offline and load faster, you can change 15 | // unregister() to register() below. Note this comes with some pitfalls. 16 | // Learn more about service workers: https://bit.ly/CRA-PWA 17 | serviceWorker.unregister(); 18 | -------------------------------------------------------------------------------- /react/react-app-simple/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | --------------------------------------------------------------------------------