Skip to content

Commit

Permalink
fix(chat-hooks): rename module
Browse files Browse the repository at this point in the history
  • Loading branch information
bang9 committed May 31, 2022
1 parent 15aa6f8 commit 7a2c30c
Show file tree
Hide file tree
Showing 54 changed files with 54 additions and 48 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ aliases:
key: yarn-packages-{{ arch }}-{{ checksum "yarn.lock" }}-v1
paths:
- sample/node_modules
- packages/chat-react-hooks/node_modules
- packages/uikit-chat-hooks/node_modules
- packages/uikit-react-native/node_modules
- packages/uikit-react-native-core/node_modules
- packages/uikit-react-native-foundation/node_modules
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
* android service account path ([dfec8fc](https://github.com/sendbird/sendbird-uikit-react-native/commit/dfec8fc45a2db02e822f74cabd95d8f6a23b9e7f))
* changed ios match git authorization method to ssh ([a293a75](https://github.com/sendbird/sendbird-uikit-react-native/commit/a293a75345fc23f8cc06e2c6a0f040df657eb64a))
* **chat-hooks:** added guard to useGroupChannelListWithQuery init ([5ec16d9](https://github.com/sendbird/sendbird-uikit-react-native/commit/5ec16d927dd1381bb9c2c8cdafc8f7b614cdded5))
* **chat-react-hooks:** wrong if condition ([4f93e6c](https://github.com/sendbird/sendbird-uikit-react-native/commit/4f93e6c5fde4e4e3c26b214934d9c115f3ce452b))
* **chat-hooks:** wrong if condition ([4f93e6c](https://github.com/sendbird/sendbird-uikit-react-native/commit/4f93e6c5fde4e4e3c26b214934d9c115f3ce452b))
* **core:** added performance warning and create patch to sample ([c366f28](https://github.com/sendbird/sendbird-uikit-react-native/commit/c366f28a1aea06d896a753a47df88c67e81e5bdc))
* **core:** exports expo platform service creators ([c98f776](https://github.com/sendbird/sendbird-uikit-react-native/commit/c98f776d41040cdd11cc159dcdb2e7449b91106c))
* **core:** fixed landscape layout ([3d2ce2d](https://github.com/sendbird/sendbird-uikit-react-native/commit/3d2ce2d4249b197d81e4bb241b63e9014a5654fc))
Expand Down
9 changes: 0 additions & 9 deletions packages/chat-react-hooks/README.md

This file was deleted.

1 change: 0 additions & 1 deletion packages/chat-react-hooks/src/__tests__/index.test.tsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
### Bug Fixes

* **chat-hooks:** added guard to useGroupChannelListWithQuery init ([5ec16d9](https://github.com/sendbird/sendbird-uikit-react-native/commit/5ec16d927dd1381bb9c2c8cdafc8f7b614cdded5))
* **chat-react-hooks:** wrong if condition ([4f93e6c](https://github.com/sendbird/sendbird-uikit-react-native/commit/4f93e6c5fde4e4e3c26b214934d9c115f3ce452b))
* **chat-hooks:** wrong if condition ([4f93e6c](https://github.com/sendbird/sendbird-uikit-react-native/commit/4f93e6c5fde4e4e3c26b214934d9c115f3ce452b))
* fixed channel preview update properly ([b8b3d53](https://github.com/sendbird/sendbird-uikit-react-native/commit/b8b3d536d80b1f15b39e47e428d648da4f513831))
* **utils:** pubsub enhancement ([2006249](https://github.com/sendbird/sendbird-uikit-react-native/commit/2006249e34777293b04dd06f9186cf1436298c6e))

Expand Down
File renamed without changes.
9 changes: 9 additions & 0 deletions packages/uikit-chat-hooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# @sendbird/uikit-chat-hooks

uikit-chat-hooks

## Installation

```sh
npm install @sendbird/uikit-chat-hooks
```
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@sendbird/chat-react-hooks",
"name": "@sendbird/uikit-chat-hooks",
"version": "0.1.2",
"description": "React hooks that built with SendbirdChat SDK",
"main": "lib/commonjs/index",
Expand All @@ -25,7 +25,7 @@
"repository": {
"type": "git",
"url": "https://github.com/sendbird/sendbird-uikit-react-native.git",
"directory": "packages/chat-react-hooks"
"directory": "packages/uikit-chat-hooks"
},
"author": "Sendbird <support@sendbird.com>",
"license": "SEE LICENSE IN LICENSE.md",
Expand Down
1 change: 1 addition & 0 deletions packages/uikit-chat-hooks/src/__tests__/index.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
it.todo('@sendbird/uikit-chat-hooks');
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type Sendbird from 'sendbird';

import type { SendbirdChatSDK } from '@sendbird/uikit-utils';
import { Logger, NOOP, isDifferentChannel, useForceUpdate } from '@sendbird/uikit-utils';
import { useIsMountedRef } from '@sendbird/uikit-utils/src/hooks';
import { useIsMountedRef } from '@sendbird/uikit-utils';

import useInternalPubSub from '../../common/useInternalPubSub';
import type { UseGroupChannelMessages, UseGroupChannelMessagesOptions } from '../../types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export { useChannelHandler } from './handler/useChannelHandler';
export { useConnectionHandler } from './handler/useConnectionHandler';
export { useUserEventHandler } from './handler/useUserEventHandler';

export { default as CustomQuery } from './model/CustomQuery';

export type {
UseGroupChannelList,
UseGroupChannelListOptions,
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion packages/uikit-react-native-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"registry": "https://registry.npmjs.org/"
},
"dependencies": {
"@sendbird/chat-react-hooks": "0.1.2",
"@sendbird/uikit-chat-hooks": "0.1.2",
"@sendbird/uikit-react-native-foundation": "0.1.2",
"@sendbird/uikit-utils": "0.1.2"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
useToast,
useUIKitTheme,
} from '@sendbird/uikit-react-native-foundation';
import type { BottomSheetItem } from '@sendbird/uikit-react-native-foundation/src/ui/BottomSheet';
import type { BottomSheetItem } from '@sendbird/uikit-react-native-foundation';
import type { SendbirdMessage } from '@sendbird/uikit-utils';
import {
Logger,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createContext, useState } from 'react';
import type Sendbird from 'sendbird';

import { useChannelHandler } from '@sendbird/chat-react-hooks';
import { useChannelHandler } from '@sendbird/uikit-chat-hooks';
import { NOOP, isDifferentChannel, useUniqId } from '@sendbird/uikit-utils';

import ProviderLayout from '../../../components/ProviderLayout';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type React from 'react';
import type { FlatListProps } from 'react-native';
import type Sendbird from 'sendbird';

import type { UseGroupChannelMessagesOptions } from '@sendbird/chat-react-hooks';
import type { UseGroupChannelMessagesOptions } from '@sendbird/uikit-chat-hooks';
import type { BaseHeaderProps } from '@sendbird/uikit-react-native-foundation';
import type { SendbirdMessage } from '@sendbird/uikit-utils';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { createContext, useCallback, useEffect, useState } from 'react';
import type Sendbird from 'sendbird';

import { useChannelHandler } from '@sendbird/chat-react-hooks';
import { useChannelHandler } from '@sendbird/uikit-chat-hooks';
import { useActionMenu, useBottomSheet, usePrompt } from '@sendbird/uikit-react-native-foundation';
import { NOOP, isDifferentChannel, useForceUpdate, useUniqId } from '@sendbird/uikit-utils';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type React from 'react';
import type { FlatListProps } from 'react-native';
import type Sendbird from 'sendbird';

import type { UseGroupChannelListOptions } from '@sendbird/chat-react-hooks';
import type { UseGroupChannelListOptions } from '@sendbird/uikit-chat-hooks';
import type { BaseHeaderProps } from '@sendbird/uikit-react-native-foundation';

import type { CommonComponent } from '../../types';
Expand All @@ -22,7 +22,7 @@ import type { CommonComponent } from '../../types';
* @property Header.Header - Custom header component from Fragment {@link Fragment.Header}
*
* @type {GroupChannelListProps.List} - Props from Fragment for create List module
* @property List.groupChannels - GroupChannels from SendbirdChat SDK, We are using '@sendbird/chat-react-hooks'
* @property List.groupChannels - GroupChannels from SendbirdChat SDK, We are using '@sendbird/uikit-chat-hooks'
* @property List.renderGroupChannelPreview - Method to render GroupChannel preview
* @property List.onLoadNext - Method to load more data, called with onEndReached of FlatList
* @property List.onRefresh - Method to refresh GroupChannels
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type React from 'react';
import type Sendbird from 'sendbird';

import type { UseUserListOptions } from '@sendbird/chat-react-hooks';
import type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';
import type { BaseHeaderProps } from '@sendbird/uikit-react-native-foundation';

import type { CommonComponent } from '../../types';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type React from 'react';

import type { UseUserListOptions } from '@sendbird/chat-react-hooks';
import type { UseUserListOptions } from '@sendbird/uikit-chat-hooks';
import type { BaseHeaderProps } from '@sendbird/uikit-react-native-foundation';
import type { ContextValue } from '@sendbird/uikit-utils';

Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-react-native-core/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// export * from '@sendbird/chat-react-hooks';
// export * from '@sendbird/uikit-chat-hooks';

/** Context **/
export { SendbirdChatContext, SendbirdChatProvider, useSendbirdChat } from './contexts/SendbirdChat';
Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-react-native-core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig.json",
"references": [
{
"path": "../chat-react-hooks"
"path": "../uikit-chat-hooks"
},
{
"path": "../uikit-utils"
Expand Down
4 changes: 2 additions & 2 deletions packages/uikit-react-native-foundation/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ export { default as LightUIKitTheme } from './theme/LightUIKitTheme';
export { default as UIKitThemeProvider } from './theme/UIKitThemeProvider';

/** UI **/
export { default as ActionMenu } from './ui/ActionMenu';
export { default as ActionMenu, ActionMenuItem } from './ui/ActionMenu';
export { default as Alert } from './ui/Alert';
export { default as Avatar } from './ui/Avatar';
export { default as Badge } from './ui/Badge';
export { default as BottomSheet } from './ui/BottomSheet';
export { default as BottomSheet, BottomSheetItem } from './ui/BottomSheet';
export { default as Button } from './ui/Button';
export { default as ChannelFrozenBanner } from './ui/ChannelFrozenBanner';
export { DialogProvider, useActionMenu, useAlert, usePrompt, useBottomSheet } from './ui/Dialog';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useCallback } from 'react';
import { TouchableOpacity } from 'react-native';
import type Sendbird from 'sendbird';

import { useUserList } from '@sendbird/chat-react-hooks';
import { useUserList } from '@sendbird/uikit-chat-hooks';
import type { GroupChannelCreateFragment, UserListModule } from '@sendbird/uikit-react-native-core';
import { createUserListModule, useLocalization, useSendbirdChat } from '@sendbird/uikit-react-native-core';
import { Logger } from '@sendbird/uikit-utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useCallback, useEffect, useMemo } from 'react';
import { View } from 'react-native';

import { useGroupChannelMessages } from '@sendbird/chat-react-hooks';
import { useInternalPubSub } from '@sendbird/chat-react-hooks';
import { useGroupChannelMessages } from '@sendbird/uikit-chat-hooks';
import { useInternalPubSub } from '@sendbird/uikit-chat-hooks';
import type { GroupChannelFragment, GroupChannelModule, GroupChannelProps } from '@sendbird/uikit-react-native-core';
import { createGroupChannelModule, useSendbirdChat } from '@sendbird/uikit-react-native-core';
import { NOOP, messageComparator } from '@sendbird/uikit-utils';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useCallback } from 'react';
import { TouchableOpacity } from 'react-native';
import type Sendbird from 'sendbird';

import { useUserList } from '@sendbird/chat-react-hooks';
import { useUserList } from '@sendbird/uikit-chat-hooks';
import type { GroupChannelInviteFragment, UserListModule } from '@sendbird/uikit-react-native-core';
import { createUserListModule, useLocalization, useSendbirdChat } from '@sendbird/uikit-react-native-core';
import { Logger } from '@sendbird/uikit-utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useCallback } from 'react';
import { Pressable, View } from 'react-native';

import { useGroupChannelList } from '@sendbird/chat-react-hooks';
import { useGroupChannelList } from '@sendbird/uikit-chat-hooks';
import type {
GroupChannelListFragment,
GroupChannelListModule,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import React, { useCallback } from 'react';
import type Sendbird from 'sendbird';

import { useUserList } from '@sendbird/chat-react-hooks';
import CustomQuery from '@sendbird/chat-react-hooks/src/model/CustomQuery';
import { CustomQuery, useUserList } from '@sendbird/uikit-chat-hooks';
import type { GroupChannelMembersFragment, UserListModule } from '@sendbird/uikit-react-native-core';
import { createUserListModule, useLocalization, useSendbirdChat } from '@sendbird/uikit-react-native-core';
import { Icon } from '@sendbird/uikit-react-native-foundation';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useEffect, useState } from 'react';
import type Sendbird from 'sendbird';

import { useChannelHandler } from '@sendbird/chat-react-hooks';
import { useChannelHandler } from '@sendbird/uikit-chat-hooks';
import { useSendbirdChat } from '@sendbird/uikit-react-native-core';
import { Icon, LoadingSpinner, createStyleSheet, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';
import type { SendbirdMessage } from '@sendbird/uikit-utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';

import { useLocalization } from '@sendbird/uikit-react-native-core';
import Placeholder from '@sendbird/uikit-react-native-foundation/src/ui/Placeholder';
import { Placeholder } from '@sendbird/uikit-react-native-foundation';

type Props = {
type:
Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-react-native/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../../tsconfig",
"references": [
{
"path": "../chat-react-hooks"
"path": "../uikit-chat-hooks"
},
{
"path": "../uikit-react-native-core"
Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-utils/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# @sendbird/uikit-utils

chat-react-hooks
uikit-chat-hooks

## Installation

Expand Down
2 changes: 1 addition & 1 deletion packages/uikit-utils/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export {
replaceUrlAsComponents,
} from './shared/regex';

export { useAsyncEffect, useAsyncLayoutEffect, useForceUpdate, useUniqId, useIIFE } from './hooks';
export { useAsyncEffect, useAsyncLayoutEffect, useForceUpdate, useUniqId, useIIFE, useIsMountedRef } from './hooks';

export * from './ui-format/groupChannel';
export * from './ui-format/common';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { ScrollView, StatusBar, StyleSheet, View } from 'react-native';
import { useSafeAreaInsets } from 'react-native-safe-area-context';

import { usePushTrigger } from '@sendbird/chat-react-hooks';
import { usePushTrigger } from '@sendbird/uikit-chat-hooks';
import { usePlatformService, useSendbirdChat } from '@sendbird/uikit-react-native-core';
import {
Avatar,
Expand All @@ -16,7 +16,7 @@ import {
usePrompt,
useUIKitTheme,
} from '@sendbird/uikit-react-native-foundation';
import { useBottomSheet } from '@sendbird/uikit-react-native-foundation/src/ui/Dialog';
import { useBottomSheet } from '@sendbird/uikit-react-native-foundation';

import { useAppNavigation } from '../../../hooks/useAppNavigation';
import useAppearance from '../../../hooks/useAppearance';
Expand Down
2 changes: 1 addition & 1 deletion sample/src/screens/uikit-app/GroupChannelTabs/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import React from 'react';

import { useTotalUnreadMessageCount } from '@sendbird/chat-react-hooks';
import { useTotalUnreadMessageCount } from '@sendbird/uikit-chat-hooks';
import { useSendbirdChat } from '@sendbird/uikit-react-native-core';
import { Icon, useUIKitTheme } from '@sendbird/uikit-react-native-foundation';

Expand Down
9 changes: 7 additions & 2 deletions sample/stories/Dialog.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ import type { ComponentMeta, ComponentStory } from '@storybook/react-native';
import React from 'react';
import { Button } from 'react-native';

import { DialogProvider, useActionMenu, useAlert, usePrompt } from '@sendbird/uikit-react-native-foundation';
import { useBottomSheet } from '@sendbird/uikit-react-native-foundation/src/ui/Dialog';
import {
DialogProvider,
useActionMenu,
useAlert,
useBottomSheet,
usePrompt,
} from '@sendbird/uikit-react-native-foundation';

import { loremIpsum } from './constant';

Expand Down
4 changes: 2 additions & 2 deletions sample/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"extends": "../tsconfig.json",
"references": [
{
"path": "../packages/chat-react-hooks"
"path": "../packages/uikit-chat-hooks"
},
{
"path": "../packages/uikit-react-native"
Expand All @@ -17,4 +17,4 @@
"path": "../packages/uikit-utils"
}
]
}
}

0 comments on commit 7a2c30c

Please sign in to comment.