@sendbird/uikit-react-native 2.0.0-rc.0 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -63,7 +63,7 @@ const SendbirdChatProvider = _ref => {
63
63
  (0, _react.useEffect)(() => {
64
64
  const listener = status => {
65
65
  // 'active' | 'background' | 'inactive' | 'unknown' | 'extension';
66
- if (status === 'active') sdkInstance.connectionState === 'CLOSED' && sdkInstance.setForegroundState();else sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();
66
+ if (status === 'active') sdkInstance.connectionState === 'CLOSED' && sdkInstance.setForegroundState();else if (status === 'background') sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();
67
67
  };
68
68
 
69
69
  const subscriber = _reactNative.AppState.addEventListener('change', listener);
@@ -1 +1 @@
1
- {"version":3,"names":["SendbirdChatContext","React","createContext","SendbirdChatProvider","children","sdkInstance","enableAutoPushTokenRegistration","enableChannelListMessageReceiptStatus","enableChannelListTypingIndicator","currentUser","_setCurrentUser","useState","forceUpdate","useForceUpdate","appFeatures","useAppFeatures","setCurrentUser","useCallback","user","updateCurrentUserInfo","nickname","profile","Error","params","profileUrl","profileImage","markAsDeliveredWithChannel","channel","deliveryReceiptEnabled","confirmAndMarkAsDelivered","useEffect","listener","status","connectionState","setForegroundState","setBackgroundState","subscriber","AppState","addEventListener","remove","value","sdk","features","autoPushTokenRegistrationEnabled","channelListTypingIndicatorEnabled","channelListMessageReceiptStatusEnabled"],"sources":["SendbirdChat.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { AppState, AppStateStatus } from 'react-native';\n\nimport { useAppFeatures } from '@sendbird/uikit-chat-hooks';\nimport type {\n SendbirdChatSDK,\n SendbirdGroupChannel,\n SendbirdUser,\n SendbirdUserUpdateParams,\n} from '@sendbird/uikit-utils';\nimport { confirmAndMarkAsDelivered, useForceUpdate } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../platform/types';\n\ntype Props = React.PropsWithChildren<{\n sdkInstance: SendbirdChatSDK;\n\n enableAutoPushTokenRegistration: boolean;\n enableChannelListTypingIndicator: boolean;\n enableChannelListMessageReceiptStatus: boolean;\n}>;\n\ntype Context = {\n sdk: SendbirdChatSDK;\n currentUser?: SendbirdUser;\n setCurrentUser: React.Dispatch<React.SetStateAction<SendbirdUser | undefined>>;\n\n // helper functions\n updateCurrentUserInfo: (nickname?: string, profile?: string | FileType) => Promise<SendbirdUser>;\n markAsDeliveredWithChannel: (channel: SendbirdGroupChannel) => void;\n\n features: {\n // UIKit features\n autoPushTokenRegistrationEnabled: boolean;\n channelListTypingIndicatorEnabled: boolean;\n channelListMessageReceiptStatusEnabled: boolean;\n\n // Sendbird application features\n deliveryReceiptEnabled: boolean;\n broadcastChannelEnabled: boolean;\n superGroupChannelEnabled: boolean;\n reactionEnabled: boolean;\n };\n};\n\nexport const SendbirdChatContext = React.createContext<Context | null>(null);\nexport const SendbirdChatProvider = ({\n children,\n sdkInstance,\n enableAutoPushTokenRegistration,\n enableChannelListMessageReceiptStatus,\n enableChannelListTypingIndicator,\n}: Props) => {\n const [currentUser, _setCurrentUser] = useState<SendbirdUser>();\n const forceUpdate = useForceUpdate();\n const appFeatures = useAppFeatures(sdkInstance);\n\n const setCurrentUser: Context['setCurrentUser'] = useCallback((user) => {\n // NOTE: Sendbird SDK handle User object is always same object, so force update after setCurrentUser\n _setCurrentUser(user);\n forceUpdate();\n }, []);\n\n const updateCurrentUserInfo: Context['updateCurrentUserInfo'] = useCallback(\n async (nickname, profile) => {\n let user = currentUser;\n\n if (!user) throw new Error('Current user is not defined, please connect using `useConnection()` hook first');\n\n const params: SendbirdUserUpdateParams = { nickname };\n\n if (typeof profile === 'string') {\n params.profileUrl = profile;\n } else if (typeof profile === 'object') {\n params.profileImage = profile;\n } else {\n throw new Error(`Cannot update profile, not supported profile type(${typeof profile})`);\n }\n\n user = await sdkInstance.updateCurrentUserInfo(params);\n\n setCurrentUser(user);\n return user;\n },\n [sdkInstance, currentUser, setCurrentUser],\n );\n\n const markAsDeliveredWithChannel: Context['markAsDeliveredWithChannel'] = useCallback(\n (channel: SendbirdGroupChannel) => {\n if (appFeatures.deliveryReceiptEnabled) confirmAndMarkAsDelivered(sdkInstance, channel);\n },\n [sdkInstance, appFeatures.deliveryReceiptEnabled],\n );\n\n useEffect(() => {\n const listener = (status: AppStateStatus) => {\n // 'active' | 'background' | 'inactive' | 'unknown' | 'extension';\n if (status === 'active') sdkInstance.connectionState === 'CLOSED' && sdkInstance.setForegroundState();\n else sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();\n };\n\n const subscriber = AppState.addEventListener('change', listener);\n return () => subscriber.remove();\n }, [sdkInstance]);\n\n const value: Context = {\n sdk: sdkInstance,\n currentUser,\n setCurrentUser,\n\n updateCurrentUserInfo,\n markAsDeliveredWithChannel,\n\n features: {\n ...appFeatures,\n autoPushTokenRegistrationEnabled: enableAutoPushTokenRegistration,\n channelListTypingIndicatorEnabled: enableChannelListTypingIndicator,\n channelListMessageReceiptStatusEnabled: enableChannelListMessageReceiptStatus,\n },\n };\n\n return <SendbirdChatContext.Provider value={value}>{children}</SendbirdChatContext.Provider>;\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAOA;;;;;;AAmCO,MAAMA,mBAAmB,gBAAGC,cAAA,CAAMC,aAAN,CAAoC,IAApC,CAA5B;;;;AACA,MAAMC,oBAAoB,GAAG,QAMvB;EAAA,IANwB;IACnCC,QADmC;IAEnCC,WAFmC;IAGnCC,+BAHmC;IAInCC,qCAJmC;IAKnCC;EALmC,CAMxB;EACX,MAAM,CAACC,WAAD,EAAcC,eAAd,IAAiC,IAAAC,eAAA,GAAvC;EACA,MAAMC,WAAW,GAAG,IAAAC,0BAAA,GAApB;EACA,MAAMC,WAAW,GAAG,IAAAC,8BAAA,EAAeV,WAAf,CAApB;EAEA,MAAMW,cAAyC,GAAG,IAAAC,kBAAA,EAAaC,IAAD,IA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7B,WAAW,CAAC4B,eAAZ,KAAgC,MAAhC,IAA0C5B,WAAW,CAAC8B,kBAAZ,EAA1C;IACN,CAJD;;IAMA,MAAMC,UAAU,GAAGC,qBAAA,CAASC,gBAAT,CAA0B,QAA1B,EAAoCP,QAApC,CAAnB;;IACA,OAAO,MAAMK,UAAU,CAACG,MAAX,EAAb;EACD,CATD,EASG,CAAClC,WAAD,CATH;EAWA,MAAMmC,KAAc,GAAG;IACrBC,GAAG,EAAEpC,WADgB;IAErBI,WAFqB;IAGrBO,cAHqB;IAKrBG,qBALqB;IAMrBO,0BANqB;IAQrBgB,QAAQ,EAAE,EACR,GAAG5B,WADK;MAER6B,gCAAgC,EAAErC,+BAF1B;MAGRsC,iCAAiC,EAAEpC,gCAH3B;MAIRqC,sCAAsC,EAAEtC;IAJhC;EARW,CAAvB;EAgBA,oBAAO,6BAAC,mBAAD,CAAqB,QAArB;IAA8B,KAAK,EAAEiC;EAArC,GAA6CpC,QAA7C,CAAP;AACD,CA5EM"}
1
+ {"version":3,"names":["SendbirdChatContext","React","createContext","SendbirdChatProvider","children","sdkInstance","enableAutoPushTokenRegistration","enableChannelListMessageReceiptStatus","enableChannelListTypingIndicator","currentUser","_setCurrentUser","useState","forceUpdate","useForceUpdate","appFeatures","useAppFeatures","setCurrentUser","useCallback","user","updateCurrentUserInfo","nickname","profile","Error","params","profileUrl","profileImage","markAsDeliveredWithChannel","channel","deliveryReceiptEnabled","confirmAndMarkAsDelivered","useEffect","listener","status","connectionState","setForegroundState","setBackgroundState","subscriber","AppState","addEventListener","remove","value","sdk","features","autoPushTokenRegistrationEnabled","channelListTypingIndicatorEnabled","channelListMessageReceiptStatusEnabled"],"sources":["SendbirdChat.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { AppState, AppStateStatus } from 'react-native';\n\nimport { useAppFeatures } from '@sendbird/uikit-chat-hooks';\nimport type {\n SendbirdChatSDK,\n SendbirdGroupChannel,\n SendbirdUser,\n SendbirdUserUpdateParams,\n} from '@sendbird/uikit-utils';\nimport { confirmAndMarkAsDelivered, useForceUpdate } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../platform/types';\n\ntype Props = React.PropsWithChildren<{\n sdkInstance: SendbirdChatSDK;\n\n enableAutoPushTokenRegistration: boolean;\n enableChannelListTypingIndicator: boolean;\n enableChannelListMessageReceiptStatus: boolean;\n}>;\n\ntype Context = {\n sdk: SendbirdChatSDK;\n currentUser?: SendbirdUser;\n setCurrentUser: React.Dispatch<React.SetStateAction<SendbirdUser | undefined>>;\n\n // helper functions\n updateCurrentUserInfo: (nickname?: string, profile?: string | FileType) => Promise<SendbirdUser>;\n markAsDeliveredWithChannel: (channel: SendbirdGroupChannel) => void;\n\n features: {\n // UIKit features\n autoPushTokenRegistrationEnabled: boolean;\n channelListTypingIndicatorEnabled: boolean;\n channelListMessageReceiptStatusEnabled: boolean;\n\n // Sendbird application features\n deliveryReceiptEnabled: boolean;\n broadcastChannelEnabled: boolean;\n superGroupChannelEnabled: boolean;\n reactionEnabled: boolean;\n };\n};\n\nexport const SendbirdChatContext = React.createContext<Context | null>(null);\nexport const SendbirdChatProvider = ({\n children,\n sdkInstance,\n enableAutoPushTokenRegistration,\n enableChannelListMessageReceiptStatus,\n enableChannelListTypingIndicator,\n}: Props) => {\n const [currentUser, _setCurrentUser] = useState<SendbirdUser>();\n const forceUpdate = useForceUpdate();\n const appFeatures = useAppFeatures(sdkInstance);\n\n const setCurrentUser: Context['setCurrentUser'] = useCallback((user) => {\n // NOTE: Sendbird SDK handle User object is always same object, so force update after setCurrentUser\n _setCurrentUser(user);\n forceUpdate();\n }, []);\n\n const updateCurrentUserInfo: Context['updateCurrentUserInfo'] = useCallback(\n async (nickname, profile) => {\n let user = currentUser;\n\n if (!user) throw new Error('Current user is not defined, please connect using `useConnection()` hook first');\n\n const params: SendbirdUserUpdateParams = { nickname };\n\n if (typeof profile === 'string') {\n params.profileUrl = profile;\n } else if (typeof profile === 'object') {\n params.profileImage = profile;\n } else {\n throw new Error(`Cannot update profile, not supported profile type(${typeof profile})`);\n }\n\n user = await sdkInstance.updateCurrentUserInfo(params);\n\n setCurrentUser(user);\n return user;\n },\n [sdkInstance, currentUser, setCurrentUser],\n );\n\n const markAsDeliveredWithChannel: Context['markAsDeliveredWithChannel'] = useCallback(\n (channel: SendbirdGroupChannel) => {\n if (appFeatures.deliveryReceiptEnabled) confirmAndMarkAsDelivered(sdkInstance, channel);\n },\n [sdkInstance, appFeatures.deliveryReceiptEnabled],\n );\n\n useEffect(() => {\n const listener = (status: AppStateStatus) => {\n // 'active' | 'background' | 'inactive' | 'unknown' | 'extension';\n if (status === 'active') sdkInstance.connectionState === 'CLOSED' && sdkInstance.setForegroundState();\n else if (status === 'background') sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();\n };\n\n const subscriber = AppState.addEventListener('change', listener);\n return () => subscriber.remove();\n }, [sdkInstance]);\n\n const value: Context = {\n sdk: sdkInstance,\n currentUser,\n setCurrentUser,\n\n updateCurrentUserInfo,\n markAsDeliveredWithChannel,\n\n features: {\n ...appFeatures,\n autoPushTokenRegistrationEnabled: enableAutoPushTokenRegistration,\n channelListTypingIndicatorEnabled: enableChannelListTypingIndicator,\n channelListMessageReceiptStatusEnabled: enableChannelListMessageReceiptStatus,\n },\n };\n\n return <SendbirdChatContext.Provider value={value}>{children}</SendbirdChatContext.Provider>;\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AAOA;;;;;;AAmCO,MAAMA,mBAAmB,gBAAGC,cAAA,CAAMC,aAAN,CAAoC,IAApC,CAA5B;;;;AACA,MAAMC,oBAAoB,GAAG,QAMvB;EAAA,IANwB;IACnCC,QADmC;IAEnCC,WAFmC;IAGnCC,+BAHmC;IAInCC,qCAJmC;IAKnCC;EALmC,CAMxB;EACX,MAAM,CAACC,WAAD,EAAcC,eAAd,IAAiC,IAAAC,eAAA,GAAvC;EACA,MAAMC,WAAW,GAAG,IAAAC,0BAAA,GAApB;EACA,MAA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AK,QAAf,EAAyB3B,WAAW,CAAC4B,eAAZ,KAAgC,QAAhC,IAA4C5B,WAAW,CAAC6B,kBAAZ,EAA5C,CAAzB,KACK,IAAIF,MAAM,KAAK,YAAf,EAA6B3B,WAAW,CAAC4B,eAAZ,KAAgC,MAAhC,IAA0C5B,WAAW,CAAC8B,kBAAZ,EAA1C;IACnC,CAJD;;IAMA,MAAMC,UAAU,GAAGC,qBAAA,CAASC,gBAAT,CAA0B,QAA1B,EAAoCP,QAApC,CAAnB;;IACA,OAAO,MAAMK,UAAU,CAACG,MAAX,EAAb;EACD,CATD,EASG,CAAClC,WAAD,CATH;EAWA,MAAMmC,KAAc,GAAG;IACrBC,GAAG,EAAEpC,WADgB;IAErBI,WAFqB;IAGrBO,cAHqB;IAKrBG,qBALqB;IAMrBO,0BANqB;IAQrBgB,QAAQ,EAAE,EACR,GAAG5B,WADK;MAER6B,gCAAgC,EAAErC,+BAF1B;MAGRsC,iCAAiC,EAAEpC,gCAH3B;MAIRqC,sCAAsC,EAAEtC;IAJhC;EARW,CAAvB;EAgBA,oBAAO,6BAAC,mBAAD,CAAqB,QAArB;IAA8B,KAAK,EAAEiC;EAArC,GAA6CpC,QAA7C,CAAP;AACD,CA5EM"}
@@ -44,7 +44,6 @@ var _exportNames = {
44
44
  createExpoMediaService: true,
45
45
  SendbirdUIKitContainer: true,
46
46
  SendbirdUIKit: true,
47
- SendbirdUIKitContainerProps: true,
48
47
  SBUError: true
49
48
  };
50
49
  Object.defineProperty(exports, "ChannelCover", {
@@ -143,12 +142,6 @@ Object.defineProperty(exports, "SendbirdUIKitContainer", {
143
142
  return _SendbirdUIKitContainer.default;
144
143
  }
145
144
  });
146
- Object.defineProperty(exports, "SendbirdUIKitContainerProps", {
147
- enumerable: true,
148
- get: function () {
149
- return _SendbirdUIKitContainer.SendbirdUIKitContainerProps;
150
- }
151
- });
152
145
  Object.defineProperty(exports, "StatusComposition", {
153
146
  enumerable: true,
154
147
  get: function () {
@@ -1 +1 @@
1
- {"version":3,"names":["Logger","setLogLevel","__DEV__","setTitle","Platform","OS"],"sources":["index.ts"],"sourcesContent":["/** Components **/\nimport { Platform } from 'react-native';\n\nimport { Logger } from '@sendbird/uikit-utils';\n\nexport { default as MessageRenderer } from './components/MessageRenderer';\nexport { default as ChannelCover } from './components/ChannelCover';\nexport { default as ChatFlatList } from './components/ChatFlatList';\nexport { default as FileViewer } from './components/FileViewer';\nexport { default as NewMessagesButton } from './components/NewMessagesButton';\nexport { default as ProviderLayout } from './components/ProviderLayout';\nexport { default as ScrollToBottomButton } from './components/ScrollToBottomButton';\nexport { default as StatusComposition } from './components/StatusComposition';\nexport { default as TypedPlaceholder } from './components/TypedPlaceholder';\nexport { default as UserActionBar } from './components/UserActionBar';\nexport { default as UserSelectableBar } from './components/UserSelectableBar';\n\n/** Fragments **/\nexport { default as createGroupChannelCreateFragment } from './fragments/createGroupChannelCreateFragment';\nexport { default as createGroupChannelFragment } from './fragments/createGroupChannelFragment';\nexport { default as createGroupChannelSettingsFragment } from './fragments/createGroupChannelSettingsFragment';\nexport { default as createGroupChannelInviteFragment } from './fragments/createGroupChannelInviteFragment';\nexport { default as createGroupChannelListFragment } from './fragments/createGroupChannelListFragment';\nexport { default as createGroupChannelMembersFragment } from './fragments/createGroupChannelMembersFragment';\n\n/** Context **/\nexport { SendbirdChatContext, SendbirdChatProvider } from './contexts/SendbirdChat';\nexport { PlatformServiceContext, PlatformServiceProvider } from './contexts/PlatformService';\nexport { LocalizationContext, LocalizationProvider } from './contexts/Localization';\n\n/** Hooks **/\nexport { default as useConnection } from './hooks/useConnection';\nexport { default as usePushTokenRegistration } from './hooks/usePushTokenRegistration';\nexport { useLocalization, usePlatformService, useSendbirdChat } from './hooks/useContext';\n\n/** Localization **/\nexport { default as StringSetEn } from './localization/StringSet.en';\nexport { createBaseStringSet } from './localization/StringSet.type';\nexport type { StringSet } from './localization/StringSet.type';\n\n/** Platform API **/\nexport { default as createNativeFileService } from './platform/createFileService.native';\nexport { default as createNativeClipboardService } from './platform/createClipboardService.native';\nexport { default as createNativeNotificationService } from './platform/createNotificationService.native';\nexport { default as createNativeMediaService } from './platform/createMediaService.native';\nexport { default as createExpoFileService } from './platform/createFileService.expo';\nexport { default as createExpoClipboardService } from './platform/createClipboardService.expo';\nexport { default as createExpoNotificationService } from './platform/createNotificationService.expo';\nexport { default as createExpoMediaService } from './platform/createMediaService.expo';\n\nexport type {\n FileServiceInterface,\n ClipboardServiceInterface,\n FilePickerServiceInterface,\n FileSystemServiceInterface,\n SaveOptions,\n OpenDocumentOptions,\n OpenCameraOptions,\n OpenMediaLibraryOptions,\n OpenResultListener,\n DownloadedPath,\n Unsubscribe,\n FilePickerResponse,\n FileType,\n NotificationServiceInterface,\n} from './platform/types';\n\n/** Domain **/\nexport * from './domain/groupChannel';\nexport type {\n GroupChannelProps,\n GroupChannelModule,\n GroupChannelFragment,\n GroupChannelContextsType,\n} from './domain/groupChannel/types';\n\nexport * from './domain/groupChannelSettings';\nexport type {\n GroupChannelSettingsProps,\n GroupChannelSettingsModule,\n GroupChannelSettingsFragment,\n GroupChannelSettingsContextsType,\n} from './domain/groupChannelSettings/types';\n\nexport * from './domain/groupChannelList';\nexport type {\n GroupChannelType,\n GroupChannelListProps,\n GroupChannelListModule,\n GroupChannelListFragment,\n GroupChannelListContextsType,\n} from './domain/groupChannelList/types';\n\nexport * from './domain/userList';\nexport type { UserListProps, UserListModule, UserListContextsType } from './domain/userList/types';\nexport * from './domain/groupChannelUserList/types';\n\n/** UIKit **/\nexport {\n default as SendbirdUIKitContainer,\n SendbirdUIKit,\n SendbirdUIKitContainerProps,\n} from './containers/SendbirdUIKitContainer';\nexport { default as SBUError } from './libs/SBUError';\n\nexport * from './types';\n\nLogger.setLogLevel(__DEV__ ? 'warn' : 'none');\nLogger.setTitle(`[UIKIT_${Platform.OS}]`);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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"sourcesContent":["/** Components **/\nimport { Platform } from 'react-native';\n\nimport { Logger } from '@sendbird/uikit-utils';\n\nexport { default as MessageRenderer } from './components/MessageRenderer';\nexport { default as ChannelCover } from './components/ChannelCover';\nexport { default as ChatFlatList } from './components/ChatFlatList';\nexport { default as FileViewer } from './components/FileViewer';\nexport { default as NewMessagesButton } from './components/NewMessagesButton';\nexport { default as ProviderLayout } from './components/ProviderLayout';\nexport { default as ScrollToBottomButton } from './components/ScrollToBottomButton';\nexport { default as StatusComposition } from './components/StatusComposition';\nexport { default as TypedPlaceholder } from './components/TypedPlaceholder';\nexport { default as UserActionBar } from './components/UserActionBar';\nexport { default as UserSelectableBar } from './components/UserSelectableBar';\n\n/** Fragments **/\nexport { default as createGroupChannelCreateFragment } from './fragments/createGroupChannelCreateFragment';\nexport { default as createGroupChannelFragment } from './fragments/createGroupChannelFragment';\nexport { default as createGroupChannelSettingsFragment } from './fragments/createGroupChannelSettingsFragment';\nexport { default as createGroupChannelInviteFragment } from './fragments/createGroupChannelInviteFragment';\nexport { default as createGroupChannelListFragment } from './fragments/createGroupChannelListFragment';\nexport { default as createGroupChannelMembersFragment } from './fragments/createGroupChannelMembersFragment';\n\n/** Context **/\nexport { SendbirdChatContext, SendbirdChatProvider } from './contexts/SendbirdChat';\nexport { PlatformServiceContext, PlatformServiceProvider } from './contexts/PlatformService';\nexport { LocalizationContext, LocalizationProvider } from './contexts/Localization';\n\n/** Hooks **/\nexport { default as useConnection } from './hooks/useConnection';\nexport { default as usePushTokenRegistration } from './hooks/usePushTokenRegistration';\nexport { useLocalization, usePlatformService, useSendbirdChat } from './hooks/useContext';\n\n/** Localization **/\nexport { default as StringSetEn } from './localization/StringSet.en';\nexport { createBaseStringSet } from './localization/StringSet.type';\nexport type { StringSet } from './localization/StringSet.type';\n\n/** Platform API **/\nexport { default as createNativeFileService } from './platform/createFileService.native';\nexport { default as createNativeClipboardService } from './platform/createClipboardService.native';\nexport { default as createNativeNotificationService } from './platform/createNotificationService.native';\nexport { default as createNativeMediaService } from './platform/createMediaService.native';\nexport { default as createExpoFileService } from './platform/createFileService.expo';\nexport { default as createExpoClipboardService } from './platform/createClipboardService.expo';\nexport { default as createExpoNotificationService } from './platform/createNotificationService.expo';\nexport { default as createExpoMediaService } from './platform/createMediaService.expo';\n\nexport type {\n FileServiceInterface,\n ClipboardServiceInterface,\n FilePickerServiceInterface,\n FileSystemServiceInterface,\n SaveOptions,\n OpenDocumentOptions,\n OpenCameraOptions,\n OpenMediaLibraryOptions,\n OpenResultListener,\n DownloadedPath,\n Unsubscribe,\n FilePickerResponse,\n FileType,\n NotificationServiceInterface,\n} from './platform/types';\n\n/** Domain **/\nexport * from './domain/groupChannel';\nexport type {\n GroupChannelProps,\n GroupChannelModule,\n GroupChannelFragment,\n GroupChannelContextsType,\n} from './domain/groupChannel/types';\n\nexport * from './domain/groupChannelSettings';\nexport type {\n GroupChannelSettingsProps,\n GroupChannelSettingsModule,\n GroupChannelSettingsFragment,\n GroupChannelSettingsContextsType,\n} from './domain/groupChannelSettings/types';\n\nexport * from './domain/groupChannelList';\nexport type {\n GroupChannelType,\n GroupChannelListProps,\n GroupChannelListModule,\n GroupChannelListFragment,\n GroupChannelListContextsType,\n} from './domain/groupChannelList/types';\n\nexport * from './domain/userList';\nexport type { UserListProps, UserListModule, UserListContextsType } from './domain/userList/types';\nexport * from './domain/groupChannelUserList/types';\n\n/** UIKit **/\nexport { default as SendbirdUIKitContainer, SendbirdUIKit } from './containers/SendbirdUIKitContainer';\nexport type { SendbirdUIKitContainerProps } from './containers/SendbirdUIKitContainer';\nexport { default as SBUError } from './libs/SBUError';\n\nexport * from './types';\n\nLogger.setLogLevel(__DEV__ ? 'warn' : 'none');\nLogger.setTitle(`[UIKIT_${Platform.OS}]`);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AAGA;;AACA;;AAIA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAoBA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAQA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAQA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AASA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AAGA;;AAEA;;AAEA;;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;;;;;;;AAtGA;;AAiBA;;AAQA;;AAKA;;AAKA;;AAKA;;AA2BA;;AA8BA;AAOAA,kBAAA,CAAOC,WAAP,CAAmBC,OAAO,GAAG,MAAH,GAAY,MAAtC;;AACAF,kBAAA,CAAOG,QAAP,CAAiB,UAASC,qBAAA,CAASC,EAAG,GAAtC"}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- const VERSION = '2.0.0-rc.0';
7
+ const VERSION = '2.0.1';
8
8
  var _default = VERSION;
9
9
  exports.default = _default;
10
10
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '2.0.0-rc.0';\nexport default VERSION;\n"],"mappings":";;;;;;AAAA,MAAMA,OAAO,GAAG,YAAhB;eACeA,O"}
1
+ {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '2.0.1';\nexport default VERSION;\n"],"mappings":";;;;;;AAAA,MAAMA,OAAO,GAAG,OAAhB;eACeA,O"}
@@ -45,7 +45,7 @@ export const SendbirdChatProvider = _ref => {
45
45
  useEffect(() => {
46
46
  const listener = status => {
47
47
  // 'active' | 'background' | 'inactive' | 'unknown' | 'extension';
48
- if (status === 'active') sdkInstance.connectionState === 'CLOSED' && sdkInstance.setForegroundState();else sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();
48
+ if (status === 'active') sdkInstance.connectionState === 'CLOSED' && sdkInstance.setForegroundState();else if (status === 'background') sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();
49
49
  };
50
50
 
51
51
  const subscriber = AppState.addEventListener('change', listener);
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useEffect","useState","AppState","useAppFeatures","confirmAndMarkAsDelivered","useForceUpdate","SendbirdChatContext","createContext","SendbirdChatProvider","children","sdkInstance","enableAutoPushTokenRegistration","enableChannelListMessageReceiptStatus","enableChannelListTypingIndicator","currentUser","_setCurrentUser","forceUpdate","appFeatures","setCurrentUser","user","updateCurrentUserInfo","nickname","profile","Error","params","profileUrl","profileImage","markAsDeliveredWithChannel","channel","deliveryReceiptEnabled","listener","status","connectionState","setForegroundState","setBackgroundState","subscriber","addEventListener","remove","value","sdk","features","autoPushTokenRegistrationEnabled","channelListTypingIndicatorEnabled","channelListMessageReceiptStatusEnabled"],"sources":["SendbirdChat.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { AppState, AppStateStatus } from 'react-native';\n\nimport { useAppFeatures } from '@sendbird/uikit-chat-hooks';\nimport type {\n SendbirdChatSDK,\n SendbirdGroupChannel,\n SendbirdUser,\n SendbirdUserUpdateParams,\n} from '@sendbird/uikit-utils';\nimport { confirmAndMarkAsDelivered, useForceUpdate } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../platform/types';\n\ntype Props = React.PropsWithChildren<{\n sdkInstance: SendbirdChatSDK;\n\n enableAutoPushTokenRegistration: boolean;\n enableChannelListTypingIndicator: boolean;\n enableChannelListMessageReceiptStatus: boolean;\n}>;\n\ntype Context = {\n sdk: SendbirdChatSDK;\n currentUser?: SendbirdUser;\n setCurrentUser: React.Dispatch<React.SetStateAction<SendbirdUser | undefined>>;\n\n // helper functions\n updateCurrentUserInfo: (nickname?: string, profile?: string | FileType) => Promise<SendbirdUser>;\n markAsDeliveredWithChannel: (channel: SendbirdGroupChannel) => void;\n\n features: {\n // UIKit features\n autoPushTokenRegistrationEnabled: boolean;\n channelListTypingIndicatorEnabled: boolean;\n channelListMessageReceiptStatusEnabled: boolean;\n\n // Sendbird application features\n deliveryReceiptEnabled: boolean;\n broadcastChannelEnabled: boolean;\n superGroupChannelEnabled: boolean;\n reactionEnabled: boolean;\n };\n};\n\nexport const SendbirdChatContext = React.createContext<Context | null>(null);\nexport const SendbirdChatProvider = ({\n children,\n sdkInstance,\n enableAutoPushTokenRegistration,\n enableChannelListMessageReceiptStatus,\n enableChannelListTypingIndicator,\n}: Props) => {\n const [currentUser, _setCurrentUser] = useState<SendbirdUser>();\n const forceUpdate = useForceUpdate();\n const appFeatures = useAppFeatures(sdkInstance);\n\n const setCurrentUser: Context['setCurrentUser'] = useCallback((user) => {\n // NOTE: Sendbird SDK handle User object is always same object, so force update after setCurrentUser\n _setCurrentUser(user);\n forceUpdate();\n }, []);\n\n const updateCurrentUserInfo: Context['updateCurrentUserInfo'] = useCallback(\n async (nickname, profile) => {\n let user = currentUser;\n\n if (!user) throw new Error('Current user is not defined, please connect using `useConnection()` hook first');\n\n const params: SendbirdUserUpdateParams = { nickname };\n\n if (typeof profile === 'string') {\n params.profileUrl = profile;\n } else if (typeof profile === 'object') {\n params.profileImage = profile;\n } else {\n throw new Error(`Cannot update profile, not supported profile type(${typeof profile})`);\n }\n\n user = await sdkInstance.updateCurrentUserInfo(params);\n\n setCurrentUser(user);\n return user;\n },\n [sdkInstance, currentUser, setCurrentUser],\n );\n\n const markAsDeliveredWithChannel: Context['markAsDeliveredWithChannel'] = useCallback(\n (channel: SendbirdGroupChannel) => {\n if (appFeatures.deliveryReceiptEnabled) confirmAndMarkAsDelivered(sdkInstance, channel);\n },\n [sdkInstance, appFeatures.deliveryReceiptEnabled],\n );\n\n useEffect(() => {\n const listener = (status: AppStateStatus) => {\n // 'active' | 'background' | 'inactive' | 'unknown' | 'extension';\n if (status === 'active') sdkInstance.connectionState === 'CLOSED' && sdkInstance.setForegroundState();\n else sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();\n };\n\n const subscriber = AppState.addEventListener('change', listener);\n return () => subscriber.remove();\n }, [sdkInstance]);\n\n const value: Context = {\n sdk: sdkInstance,\n currentUser,\n setCurrentUser,\n\n updateCurrentUserInfo,\n markAsDeliveredWithChannel,\n\n features: {\n ...appFeatures,\n autoPushTokenRegistrationEnabled: enableAutoPushTokenRegistration,\n channelListTypingIndicatorEnabled: enableChannelListTypingIndicator,\n channelListMessageReceiptStatusEnabled: enableChannelListMessageReceiptStatus,\n },\n };\n\n return <SendbirdChatContext.Provider value={value}>{children}</SendbirdChatContext.Provider>;\n};\n"],"mappings":"AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,SAA7B,EAAwCC,QAAxC,QAAwD,OAAxD;AACA,SAASC,QAAT,QAAyC,cAAzC;AAEA,SAASC,cAAT,QAA+B,4BAA/B;AAOA,SAASC,yBAAT,EAAoCC,cAApC,QAA0D,uBAA1D;AAmCA,OAAO,MAAMC,mBAAmB,gBAAGR,KAAK,C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AAW,CAACY,sBAAhB,EAAwCzB,yBAAyB,CAACM,WAAD,EAAckB,OAAd,CAAzB;EACzC,CAHkF,EAInF,CAAClB,WAAD,EAAcO,WAAW,CAACY,sBAA1B,CAJmF,CAArF;EAOA7B,SAAS,CAAC,MAAM;IACd,MAAM8B,QAAQ,GAAIC,MAAD,IAA4B;MAC3C;MACA,IAAIA,MAAM,KAAK,QAAf,EAAyBrB,WAAW,CAACsB,eAAZ,KAAgC,QAAhC,IAA4CtB,WAAW,CAACuB,kBAAZ,EAA5C,CAAzB,KACKvB,WAAW,CAACsB,eAAZ,KAAgC,MAAhC,IAA0CtB,WAAW,CAACwB,kBAAZ,EAA1C;IACN,CAJD;;IAMA,MAAMC,UAAU,GAAGjC,QAAQ,CAACkC,gBAAT,CAA0B,QAA1B,EAAoCN,QAApC,CAAnB;IACA,OAAO,MAAMK,UAAU,CAACE,MAAX,EAAb;EACD,CATQ,EASN,CAAC3B,WAAD,CATM,CAAT;EAWA,MAAM4B,KAAc,GAAG;IACrBC,GAAG,EAAE7B,WADgB;IAErBI,WAFqB;IAGrBI,cAHqB;IAKrBE,qBALqB;IAMrBO,0BANqB;IAQrBa,QAAQ,EAAE,EACR,GAAGvB,WADK;MAERwB,gCAAgC,EAAE9B,+BAF1B;MAGR+B,iCAAiC,EAAE7B,gCAH3B;MAIR8B,sCAAsC,EAAE/B;IAJhC;EARW,CAAvB;EAgBA,oBAAO,oBAAC,mBAAD,CAAqB,QAArB;IAA8B,KAAK,EAAE0B;EAArC,GAA6C7B,QAA7C,CAAP;AACD,CA5EM"}
1
+ {"version":3,"names":["React","useCallback","useEffect","useState","AppState","useAppFeatures","confirmAndMarkAsDelivered","useForceUpdate","SendbirdChatContext","createContext","SendbirdChatProvider","children","sdkInstance","enableAutoPushTokenRegistration","enableChannelListMessageReceiptStatus","enableChannelListTypingIndicator","currentUser","_setCurrentUser","forceUpdate","appFeatures","setCurrentUser","user","updateCurrentUserInfo","nickname","profile","Error","params","profileUrl","profileImage","markAsDeliveredWithChannel","channel","deliveryReceiptEnabled","listener","status","connectionState","setForegroundState","setBackgroundState","subscriber","addEventListener","remove","value","sdk","features","autoPushTokenRegistrationEnabled","channelListTypingIndicatorEnabled","channelListMessageReceiptStatusEnabled"],"sources":["SendbirdChat.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useState } from 'react';\nimport { AppState, AppStateStatus } from 'react-native';\n\nimport { useAppFeatures } from '@sendbird/uikit-chat-hooks';\nimport type {\n SendbirdChatSDK,\n SendbirdGroupChannel,\n SendbirdUser,\n SendbirdUserUpdateParams,\n} from '@sendbird/uikit-utils';\nimport { confirmAndMarkAsDelivered, useForceUpdate } from '@sendbird/uikit-utils';\n\nimport type { FileType } from '../platform/types';\n\ntype Props = React.PropsWithChildren<{\n sdkInstance: SendbirdChatSDK;\n\n enableAutoPushTokenRegistration: boolean;\n enableChannelListTypingIndicator: boolean;\n enableChannelListMessageReceiptStatus: boolean;\n}>;\n\ntype Context = {\n sdk: SendbirdChatSDK;\n currentUser?: SendbirdUser;\n setCurrentUser: React.Dispatch<React.SetStateAction<SendbirdUser | undefined>>;\n\n // helper functions\n updateCurrentUserInfo: (nickname?: string, profile?: string | FileType) => Promise<SendbirdUser>;\n markAsDeliveredWithChannel: (channel: SendbirdGroupChannel) => void;\n\n features: {\n // UIKit features\n autoPushTokenRegistrationEnabled: boolean;\n channelListTypingIndicatorEnabled: boolean;\n channelListMessageReceiptStatusEnabled: boolean;\n\n // Sendbird application features\n deliveryReceiptEnabled: boolean;\n broadcastChannelEnabled: boolean;\n superGroupChannelEnabled: boolean;\n reactionEnabled: boolean;\n };\n};\n\nexport const SendbirdChatContext = React.createContext<Context | null>(null);\nexport const SendbirdChatProvider = ({\n children,\n sdkInstance,\n enableAutoPushTokenRegistration,\n enableChannelListMessageReceiptStatus,\n enableChannelListTypingIndicator,\n}: Props) => {\n const [currentUser, _setCurrentUser] = useState<SendbirdUser>();\n const forceUpdate = useForceUpdate();\n const appFeatures = useAppFeatures(sdkInstance);\n\n const setCurrentUser: Context['setCurrentUser'] = useCallback((user) => {\n // NOTE: Sendbird SDK handle User object is always same object, so force update after setCurrentUser\n _setCurrentUser(user);\n forceUpdate();\n }, []);\n\n const updateCurrentUserInfo: Context['updateCurrentUserInfo'] = useCallback(\n async (nickname, profile) => {\n let user = currentUser;\n\n if (!user) throw new Error('Current user is not defined, please connect using `useConnection()` hook first');\n\n const params: SendbirdUserUpdateParams = { nickname };\n\n if (typeof profile === 'string') {\n params.profileUrl = profile;\n } else if (typeof profile === 'object') {\n params.profileImage = profile;\n } else {\n throw new Error(`Cannot update profile, not supported profile type(${typeof profile})`);\n }\n\n user = await sdkInstance.updateCurrentUserInfo(params);\n\n setCurrentUser(user);\n return user;\n },\n [sdkInstance, currentUser, setCurrentUser],\n );\n\n const markAsDeliveredWithChannel: Context['markAsDeliveredWithChannel'] = useCallback(\n (channel: SendbirdGroupChannel) => {\n if (appFeatures.deliveryReceiptEnabled) confirmAndMarkAsDelivered(sdkInstance, channel);\n },\n [sdkInstance, appFeatures.deliveryReceiptEnabled],\n );\n\n useEffect(() => {\n const listener = (status: AppStateStatus) => {\n // 'active' | 'background' | 'inactive' | 'unknown' | 'extension';\n if (status === 'active') sdkInstance.connectionState === 'CLOSED' && sdkInstance.setForegroundState();\n else if (status === 'background') sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();\n };\n\n const subscriber = AppState.addEventListener('change', listener);\n return () => subscriber.remove();\n }, [sdkInstance]);\n\n const value: Context = {\n sdk: sdkInstance,\n currentUser,\n setCurrentUser,\n\n updateCurrentUserInfo,\n markAsDeliveredWithChannel,\n\n features: {\n ...appFeatures,\n autoPushTokenRegistrationEnabled: enableAutoPushTokenRegistration,\n channelListTypingIndicatorEnabled: enableChannelListTypingIndicator,\n channelListMessageReceiptStatusEnabled: enableChannelListMessageReceiptStatus,\n },\n };\n\n return <SendbirdChatContext.Provider value={value}>{children}</SendbirdChatContext.Provider>;\n};\n"],"mappings":"AAAA,OAAO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}
@@ -53,7 +53,7 @@ export * from './domain/userList';
53
53
  export * from './domain/groupChannelUserList/types';
54
54
  /** UIKit **/
55
55
 
56
- export { default as SendbirdUIKitContainer, SendbirdUIKit, SendbirdUIKitContainerProps } from './containers/SendbirdUIKitContainer';
56
+ export { default as SendbirdUIKitContainer, SendbirdUIKit } from './containers/SendbirdUIKitContainer';
57
57
  export { default as SBUError } from './libs/SBUError';
58
58
  export * from './types';
59
59
  Logger.setLogLevel(__DEV__ ? 'warn' : 'none');
@@ -1 +1 @@
1
- {"version":3,"names":["Platform","Logger","default","MessageRenderer","ChannelCover","ChatFlatList","FileViewer","NewMessagesButton","ProviderLayout","ScrollToBottomButton","StatusComposition","TypedPlaceholder","UserActionBar","UserSelectableBar","createGroupChannelCreateFragment","createGroupChannelFragment","createGroupChannelSettingsFragment","createGroupChannelInviteFragment","createGroupChannelListFragment","createGroupChannelMembersFragment","SendbirdChatContext","SendbirdChatProvider","PlatformServiceContext","PlatformServiceProvider","LocalizationContext","LocalizationProvider","useConnection","usePushTokenRegistration","useLocalization","usePlatformService","useSendbirdChat","StringSetEn","createBaseStringSet","createNativeFileService","createNativeClipboardService","createNativeNotificationService","createNativeMediaService","createExpoFileService","createExpoClipboardService","createExpoNotificationService","createExpoMediaService","SendbirdUIKitContainer","SendbirdUIKit","SendbirdUIKitContainerProps","SBUError","setLogLevel","__DEV__","setTitle","OS"],"sources":["index.ts"],"sourcesContent":["/** Components **/\nimport { Platform } from 'react-native';\n\nimport { Logger } from '@sendbird/uikit-utils';\n\nexport { default as MessageRenderer } from './components/MessageRenderer';\nexport { default as ChannelCover } from './components/ChannelCover';\nexport { default as ChatFlatList } from './components/ChatFlatList';\nexport { default as FileViewer } from './components/FileViewer';\nexport { default as NewMessagesButton } from './components/NewMessagesButton';\nexport { default as ProviderLayout } from './components/ProviderLayout';\nexport { default as ScrollToBottomButton } from './components/ScrollToBottomButton';\nexport { default as StatusComposition } from './components/StatusComposition';\nexport { default as TypedPlaceholder } from './components/TypedPlaceholder';\nexport { default as UserActionBar } from './components/UserActionBar';\nexport { default as UserSelectableBar } from './components/UserSelectableBar';\n\n/** Fragments **/\nexport { default as createGroupChannelCreateFragment } from './fragments/createGroupChannelCreateFragment';\nexport { default as createGroupChannelFragment } from './fragments/createGroupChannelFragment';\nexport { default as createGroupChannelSettingsFragment } from './fragments/createGroupChannelSettingsFragment';\nexport { default as createGroupChannelInviteFragment } from './fragments/createGroupChannelInviteFragment';\nexport { default as createGroupChannelListFragment } from './fragments/createGroupChannelListFragment';\nexport { default as createGroupChannelMembersFragment } from './fragments/createGroupChannelMembersFragment';\n\n/** Context **/\nexport { SendbirdChatContext, SendbirdChatProvider } from './contexts/SendbirdChat';\nexport { PlatformServiceContext, PlatformServiceProvider } from './contexts/PlatformService';\nexport { LocalizationContext, LocalizationProvider } from './contexts/Localization';\n\n/** Hooks **/\nexport { default as useConnection } from './hooks/useConnection';\nexport { default as usePushTokenRegistration } from './hooks/usePushTokenRegistration';\nexport { useLocalization, usePlatformService, useSendbirdChat } from './hooks/useContext';\n\n/** Localization **/\nexport { default as StringSetEn } from './localization/StringSet.en';\nexport { createBaseStringSet } from './localization/StringSet.type';\nexport type { StringSet } from './localization/StringSet.type';\n\n/** Platform API **/\nexport { default as createNativeFileService } from './platform/createFileService.native';\nexport { default as createNativeClipboardService } from './platform/createClipboardService.native';\nexport { default as createNativeNotificationService } from './platform/createNotificationService.native';\nexport { default as createNativeMediaService } from './platform/createMediaService.native';\nexport { default as createExpoFileService } from './platform/createFileService.expo';\nexport { default as createExpoClipboardService } from './platform/createClipboardService.expo';\nexport { default as createExpoNotificationService } from './platform/createNotificationService.expo';\nexport { default as createExpoMediaService } from './platform/createMediaService.expo';\n\nexport type {\n FileServiceInterface,\n ClipboardServiceInterface,\n FilePickerServiceInterface,\n FileSystemServiceInterface,\n SaveOptions,\n OpenDocumentOptions,\n OpenCameraOptions,\n OpenMediaLibraryOptions,\n OpenResultListener,\n DownloadedPath,\n Unsubscribe,\n FilePickerResponse,\n FileType,\n NotificationServiceInterface,\n} from './platform/types';\n\n/** Domain **/\nexport * from './domain/groupChannel';\nexport type {\n GroupChannelProps,\n GroupChannelModule,\n GroupChannelFragment,\n GroupChannelContextsType,\n} from './domain/groupChannel/types';\n\nexport * from './domain/groupChannelSettings';\nexport type {\n GroupChannelSettingsProps,\n GroupChannelSettingsModule,\n GroupChannelSettingsFragment,\n GroupChannelSettingsContextsType,\n} from './domain/groupChannelSettings/types';\n\nexport * from './domain/groupChannelList';\nexport type {\n GroupChannelType,\n GroupChannelListProps,\n GroupChannelListModule,\n GroupChannelListFragment,\n GroupChannelListContextsType,\n} from './domain/groupChannelList/types';\n\nexport * from './domain/userList';\nexport type { UserListProps, UserListModule, UserListContextsType } from './domain/userList/types';\nexport * from './domain/groupChannelUserList/types';\n\n/** UIKit **/\nexport {\n default as SendbirdUIKitContainer,\n SendbirdUIKit,\n SendbirdUIKitContainerProps,\n} from './containers/SendbirdUIKitContainer';\nexport { default as SBUError } from './libs/SBUError';\n\nexport * from './types';\n\nLogger.setLogLevel(__DEV__ ? 'warn' : 'none');\nLogger.setTitle(`[UIKIT_${Platform.OS}]`);\n"],"mappings":"AAAA;AACA,SAASA,QAAT,QAAyB,cAAzB;AAEA,SAASC,MAAT,QAAuB,uBAAvB;AAEA,SAASC,OAAO,IAAIC,eAApB,QAA2C,8BAA3C;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,2BAAxC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,2BAAxC;AACA,SAASH,OAAO,IAAII,UAApB,QAAsC,yBAAtC;AACA,SAASJ,OAAO,IAAIK,iBAApB,QAA6C,gCAA7C;AACA,SAASL,OAAO,IAAIM,cAApB,QAA0C,6BAA1C;AACA,SAASN,OAAO,IAAIO,oBAApB,QAAgD,mCAAhD;AACA,SAASP,OAAO,IAAIQ,iBAApB,QAA6C,gCAA7C;AACA,SAASR,OAAO,IAAIS,gBAApB,QAA4C,+BAA5C;AACA,SAAST,OAA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d;AAQA,cAAc,2BAAd;AASA,cAAc,mBAAd;AAEA,cAAc,qCAAd;AAEA;;AACA,SACEtC,OAAO,IAAIuC,sBADb,EAEEC,aAFF,EAGEC,2BAHF,QAIO,qCAJP;AAKA,SAASzC,OAAO,IAAI0C,QAApB,QAAoC,iBAApC;AAEA,cAAc,SAAd;AAEA3C,MAAM,CAAC4C,WAAP,CAAmBC,OAAO,GAAG,MAAH,GAAY,MAAtC;AACA7C,MAAM,CAAC8C,QAAP,CAAiB,UAAS/C,QAAQ,CAACgD,EAAG,GAAtC"}
1
+ {"version":3,"names":["Platform","Logger","default","MessageRenderer","ChannelCover","ChatFlatList","FileViewer","NewMessagesButton","ProviderLayout","ScrollToBottomButton","StatusComposition","TypedPlaceholder","UserActionBar","UserSelectableBar","createGroupChannelCreateFragment","createGroupChannelFragment","createGroupChannelSettingsFragment","createGroupChannelInviteFragment","createGroupChannelListFragment","createGroupChannelMembersFragment","SendbirdChatContext","SendbirdChatProvider","PlatformServiceContext","PlatformServiceProvider","LocalizationContext","LocalizationProvider","useConnection","usePushTokenRegistration","useLocalization","usePlatformService","useSendbirdChat","StringSetEn","createBaseStringSet","createNativeFileService","createNativeClipboardService","createNativeNotificationService","createNativeMediaService","createExpoFileService","createExpoClipboardService","createExpoNotificationService","createExpoMediaService","SendbirdUIKitContainer","SendbirdUIKit","SBUError","setLogLevel","__DEV__","setTitle","OS"],"sources":["index.ts"],"sourcesContent":["/** Components **/\nimport { Platform } from 'react-native';\n\nimport { Logger } from '@sendbird/uikit-utils';\n\nexport { default as MessageRenderer } from './components/MessageRenderer';\nexport { default as ChannelCover } from './components/ChannelCover';\nexport { default as ChatFlatList } from './components/ChatFlatList';\nexport { default as FileViewer } from './components/FileViewer';\nexport { default as NewMessagesButton } from './components/NewMessagesButton';\nexport { default as ProviderLayout } from './components/ProviderLayout';\nexport { default as ScrollToBottomButton } from './components/ScrollToBottomButton';\nexport { default as StatusComposition } from './components/StatusComposition';\nexport { default as TypedPlaceholder } from './components/TypedPlaceholder';\nexport { default as UserActionBar } from './components/UserActionBar';\nexport { default as UserSelectableBar } from './components/UserSelectableBar';\n\n/** Fragments **/\nexport { default as createGroupChannelCreateFragment } from './fragments/createGroupChannelCreateFragment';\nexport { default as createGroupChannelFragment } from './fragments/createGroupChannelFragment';\nexport { default as createGroupChannelSettingsFragment } from './fragments/createGroupChannelSettingsFragment';\nexport { default as createGroupChannelInviteFragment } from './fragments/createGroupChannelInviteFragment';\nexport { default as createGroupChannelListFragment } from './fragments/createGroupChannelListFragment';\nexport { default as createGroupChannelMembersFragment } from './fragments/createGroupChannelMembersFragment';\n\n/** Context **/\nexport { SendbirdChatContext, SendbirdChatProvider } from './contexts/SendbirdChat';\nexport { PlatformServiceContext, PlatformServiceProvider } from './contexts/PlatformService';\nexport { LocalizationContext, LocalizationProvider } from './contexts/Localization';\n\n/** Hooks **/\nexport { default as useConnection } from './hooks/useConnection';\nexport { default as usePushTokenRegistration } from './hooks/usePushTokenRegistration';\nexport { useLocalization, usePlatformService, useSendbirdChat } from './hooks/useContext';\n\n/** Localization **/\nexport { default as StringSetEn } from './localization/StringSet.en';\nexport { createBaseStringSet } from './localization/StringSet.type';\nexport type { StringSet } from './localization/StringSet.type';\n\n/** Platform API **/\nexport { default as createNativeFileService } from './platform/createFileService.native';\nexport { default as createNativeClipboardService } from './platform/createClipboardService.native';\nexport { default as createNativeNotificationService } from './platform/createNotificationService.native';\nexport { default as createNativeMediaService } from './platform/createMediaService.native';\nexport { default as createExpoFileService } from './platform/createFileService.expo';\nexport { default as createExpoClipboardService } from './platform/createClipboardService.expo';\nexport { default as createExpoNotificationService } from './platform/createNotificationService.expo';\nexport { default as createExpoMediaService } from './platform/createMediaService.expo';\n\nexport type {\n FileServiceInterface,\n ClipboardServiceInterface,\n FilePickerServiceInterface,\n FileSystemServiceInterface,\n SaveOptions,\n OpenDocumentOptions,\n OpenCameraOptions,\n OpenMediaLibraryOptions,\n OpenResultListener,\n DownloadedPath,\n Unsubscribe,\n FilePickerResponse,\n FileType,\n NotificationServiceInterface,\n} from './platform/types';\n\n/** Domain **/\nexport * from './domain/groupChannel';\nexport type {\n GroupChannelProps,\n GroupChannelModule,\n GroupChannelFragment,\n GroupChannelContextsType,\n} from './domain/groupChannel/types';\n\nexport * from './domain/groupChannelSettings';\nexport type {\n GroupChannelSettingsProps,\n GroupChannelSettingsModule,\n GroupChannelSettingsFragment,\n GroupChannelSettingsContextsType,\n} from './domain/groupChannelSettings/types';\n\nexport * from './domain/groupChannelList';\nexport type {\n GroupChannelType,\n GroupChannelListProps,\n GroupChannelListModule,\n GroupChannelListFragment,\n GroupChannelListContextsType,\n} from './domain/groupChannelList/types';\n\nexport * from './domain/userList';\nexport type { UserListProps, UserListModule, UserListContextsType } from './domain/userList/types';\nexport * from './domain/groupChannelUserList/types';\n\n/** UIKit **/\nexport { default as SendbirdUIKitContainer, SendbirdUIKit } from './containers/SendbirdUIKitContainer';\nexport type { SendbirdUIKitContainerProps } from './containers/SendbirdUIKitContainer';\nexport { default as SBUError } from './libs/SBUError';\n\nexport * from './types';\n\nLogger.setLogLevel(__DEV__ ? 'warn' : 'none');\nLogger.setTitle(`[UIKIT_${Platform.OS}]`);\n"],"mappings":"AAAA;AACA,SAASA,QAAT,QAAyB,cAAzB;AAEA,SAASC,MAAT,QAAuB,uBAAvB;AAEA,SAASC,OAAO,IAAIC,eAApB,QAA2C,8BAA3C;AACA,SAASD,OAAO,IAAIE,YAApB,QAAwC,2BAAxC;AACA,SAASF,OAAO,IAAIG,YAApB,QAAwC,2BAAxC;AACA,SAASH,OAAO,IAAII,UAApB,QAAsC,yBAAtC;AACA,SAASJ,OAAO,IAAIK,iBAApB,QAA6C,gCAA7C;AACA,SAASL,OAAO,IAAIM,cAApB,QAA0C,6BAA1C;AACA,SAASN,OAAO,IAAIO,oBAApB,QAAgD,mCAAhD;AACA,SAASP,OAAO,IAAIQ,iBAApB,QAA6C,gCAA7C;AACA,SAASR,OAAO,IAAIS,gBAApB,QAA4C,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BAAd;AAQA,cAAc,+BAAd;AAQA,cAAc,2BAAd;AASA,cAAc,mBAAd;AAEA,cAAc,qCAAd;AAEA;;AACA,SAAStC,OAAO,IAAIuC,sBAApB,EAA4CC,aAA5C,QAAiE,qCAAjE;AAEA,SAASxC,OAAO,IAAIyC,QAApB,QAAoC,iBAApC;AAEA,cAAc,SAAd;AAEA1C,MAAM,CAAC2C,WAAP,CAAmBC,OAAO,GAAG,MAAH,GAAY,MAAtC;AACA5C,MAAM,CAAC6C,QAAP,CAAiB,UAAS9C,QAAQ,CAAC+C,EAAG,GAAtC"}
@@ -1,3 +1,3 @@
1
- const VERSION = '2.0.0-rc.0';
1
+ const VERSION = '2.0.1';
2
2
  export default VERSION;
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '2.0.0-rc.0';\nexport default VERSION;\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG,YAAhB;AACA,eAAeA,OAAf"}
1
+ {"version":3,"names":["VERSION"],"sources":["version.ts"],"sourcesContent":["const VERSION = '2.0.1';\nexport default VERSION;\n"],"mappings":"AAAA,MAAMA,OAAO,GAAG,OAAhB;AACA,eAAeA,OAAf"}
@@ -5,7 +5,7 @@ import type { StringSet } from '../localization/StringSet.type';
5
5
  import type { ClipboardServiceInterface, FileServiceInterface, MediaServiceInterface, NotificationServiceInterface } from '../platform/types';
6
6
  import type { ErrorBoundaryProps, LocalCacheStorage } from '../types';
7
7
  export declare const SendbirdUIKit: Readonly<{
8
- VERSION: "2.0.0-rc.0";
8
+ VERSION: "2.0.1";
9
9
  PLATFORM: string;
10
10
  }>;
11
11
  export declare type SendbirdUIKitContainerProps = React.PropsWithChildren<{
@@ -49,6 +49,7 @@ export * from './domain/userList';
49
49
  export type { UserListProps, UserListModule, UserListContextsType } from './domain/userList/types';
50
50
  export * from './domain/groupChannelUserList/types';
51
51
  /** UIKit **/
52
- export { default as SendbirdUIKitContainer, SendbirdUIKit, SendbirdUIKitContainerProps, } from './containers/SendbirdUIKitContainer';
52
+ export { default as SendbirdUIKitContainer, SendbirdUIKit } from './containers/SendbirdUIKitContainer';
53
+ export type { SendbirdUIKitContainerProps } from './containers/SendbirdUIKitContainer';
53
54
  export { default as SBUError } from './libs/SBUError';
54
55
  export * from './types';
@@ -1,2 +1,2 @@
1
- declare const VERSION = "2.0.0-rc.0";
1
+ declare const VERSION = "2.0.1";
2
2
  export default VERSION;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sendbird/uikit-react-native",
3
- "version": "2.0.0-rc.0",
3
+ "version": "2.0.1",
4
4
  "description": "react-native-uikit",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -41,9 +41,9 @@
41
41
  "access": "public"
42
42
  },
43
43
  "dependencies": {
44
- "@sendbird/uikit-chat-hooks": "2.0.0-rc.0",
45
- "@sendbird/uikit-react-native-foundation": "2.0.0-rc.0",
46
- "@sendbird/uikit-utils": "2.0.0-rc.0"
44
+ "@sendbird/uikit-chat-hooks": "2.0.1",
45
+ "@sendbird/uikit-react-native-foundation": "2.0.1",
46
+ "@sendbird/uikit-utils": "2.0.1"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@react-native-clipboard/clipboard": "^1.8.5",
@@ -112,6 +112,9 @@
112
112
  "@react-native-firebase/messaging": {
113
113
  "optional": true
114
114
  },
115
+ "expo-av": {
116
+ "optional": true
117
+ },
115
118
  "expo-clipboard": {
116
119
  "optional": true
117
120
  },
@@ -127,6 +130,12 @@
127
130
  "expo-notifications": {
128
131
  "optional": true
129
132
  },
133
+ "expo-video-thumbnails": {
134
+ "optional": true
135
+ },
136
+ "react-native-create-thumbnail": {
137
+ "optional": true
138
+ },
130
139
  "react-native-document-picker": {
131
140
  "optional": true
132
141
  },
@@ -138,6 +147,9 @@
138
147
  },
139
148
  "react-native-permissions": {
140
149
  "optional": true
150
+ },
151
+ "react-native-video": {
152
+ "optional": true
141
153
  }
142
154
  },
143
155
  "react-native-builder-bob": {
@@ -159,5 +171,5 @@
159
171
  "readmeFile": "./README.md",
160
172
  "displayName": "@sendbird/uikit-react-native"
161
173
  },
162
- "gitHead": "394d5e3e259086c2226a24406462f119d4af9860"
174
+ "gitHead": "3c00c29c86778ab2775049a22e03a2b5cce01d87"
163
175
  }
@@ -96,7 +96,7 @@ export const SendbirdChatProvider = ({
96
96
  const listener = (status: AppStateStatus) => {
97
97
  // 'active' | 'background' | 'inactive' | 'unknown' | 'extension';
98
98
  if (status === 'active') sdkInstance.connectionState === 'CLOSED' && sdkInstance.setForegroundState();
99
- else sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();
99
+ else if (status === 'background') sdkInstance.connectionState === 'OPEN' && sdkInstance.setBackgroundState();
100
100
  };
101
101
 
102
102
  const subscriber = AppState.addEventListener('change', listener);
package/src/index.ts CHANGED
@@ -96,11 +96,8 @@ export type { UserListProps, UserListModule, UserListContextsType } from './doma
96
96
  export * from './domain/groupChannelUserList/types';
97
97
 
98
98
  /** UIKit **/
99
- export {
100
- default as SendbirdUIKitContainer,
101
- SendbirdUIKit,
102
- SendbirdUIKitContainerProps,
103
- } from './containers/SendbirdUIKitContainer';
99
+ export { default as SendbirdUIKitContainer, SendbirdUIKit } from './containers/SendbirdUIKitContainer';
100
+ export type { SendbirdUIKitContainerProps } from './containers/SendbirdUIKitContainer';
104
101
  export { default as SBUError } from './libs/SBUError';
105
102
 
106
103
  export * from './types';
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
- const VERSION = '2.0.0-rc.0';
1
+ const VERSION = '2.0.1';
2
2
  export default VERSION;