@amityco/react-native-social-uikit 4.0.0-03e2bf8.0 → 4.0.0-06cc633.0
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.
- package/README.md +18 -18
- package/lib/commonjs/components/CustomText/index.js +3 -2
- package/lib/commonjs/components/CustomText/index.js.map +1 -1
- package/lib/commonjs/components/Social/PostList/Components/RenderTextWithMention.js.map +1 -1
- package/lib/commonjs/components/StoryKit/src/Story.js +1 -1
- package/lib/commonjs/components/StoryKit/src/Story.js.map +1 -1
- package/lib/commonjs/components/StoryKit/src/StoryListItem.js +3 -3
- package/lib/commonjs/components/StoryKit/src/StoryListItem.js.map +1 -1
- package/lib/commonjs/components/StoryKit/src/helpers/StateHelpers.js +1 -1
- package/lib/commonjs/components/StoryKit/src/helpers/StateHelpers.js.map +1 -1
- package/lib/commonjs/index.js +7 -7
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/providers/amity-ui-kit-provider.js.map +1 -1
- package/lib/commonjs/redux/store/index.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityStoryTabComponent/AmityStoryTabComponent.js +1 -4
- package/lib/commonjs/v4/PublicApi/Components/AmityStoryTabComponent/AmityStoryTabComponent.js.map +1 -1
- package/lib/commonjs/v4/PublicApi/Components/AmityThumbnailActionComponent/AmityThumbnailActionComponent.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/StoryTargetView.js +1 -1
- package/lib/commonjs/v4/component/MyStories/StoryTargetView.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/index.js +24 -1
- package/lib/commonjs/v4/component/MyStories/index.js.map +1 -1
- package/lib/commonjs/v4/component/MyStories/styles.js +1 -2
- package/lib/commonjs/v4/component/MyStories/styles.js.map +1 -1
- package/lib/commonjs/v4/component/RenderTextWithMention/RenderTextWithMention.js.map +1 -1
- package/lib/commonjs/v4/component/StoryKit/src/Story.js +1 -1
- package/lib/commonjs/v4/component/StoryKit/src/Story.js.map +1 -1
- package/lib/commonjs/v4/component/StoryKit/src/StoryListItem.js +3 -3
- package/lib/commonjs/v4/component/StoryKit/src/StoryListItem.js.map +1 -1
- package/lib/commonjs/v4/component/StoryKit/src/helpers/StateHelpers.js +1 -1
- package/lib/commonjs/v4/component/StoryKit/src/helpers/StateHelpers.js.map +1 -1
- package/lib/commonjs/v4/elements/ChangeThumbnailButton/ChangeThumbnailButton.js.map +1 -1
- package/lib/commonjs/v4/elements/DeleteThumbnailButton/DeleteThumbnailButton.js.map +1 -1
- package/lib/commonjs/v4/routes/AmityPageRenderer.js +1 -1
- package/lib/commonjs/v4/routes/AmityPageRenderer.js.map +1 -1
- package/lib/commonjs/v4/screen/CreateStory/CreateStoryScreen.js +15 -1
- package/lib/commonjs/v4/screen/CreateStory/CreateStoryScreen.js.map +1 -1
- package/lib/module/components/CustomText/index.js +3 -2
- package/lib/module/components/CustomText/index.js.map +1 -1
- package/lib/module/components/Social/PostList/Components/RenderTextWithMention.js.map +1 -1
- package/lib/module/components/StoryKit/src/Story.js +1 -1
- package/lib/module/components/StoryKit/src/Story.js.map +1 -1
- package/lib/module/components/StoryKit/src/StoryListItem.js +3 -3
- package/lib/module/components/StoryKit/src/StoryListItem.js.map +1 -1
- package/lib/module/components/StoryKit/src/helpers/StateHelpers.js +1 -1
- package/lib/module/components/StoryKit/src/helpers/StateHelpers.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/providers/amity-ui-kit-provider.js.map +1 -1
- package/lib/module/redux/store/index.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityStoryTabComponent/AmityStoryTabComponent.js +0 -3
- package/lib/module/v4/PublicApi/Components/AmityStoryTabComponent/AmityStoryTabComponent.js.map +1 -1
- package/lib/module/v4/PublicApi/Components/AmityThumbnailActionComponent/AmityThumbnailActionComponent.js.map +1 -1
- package/lib/module/v4/component/MyStories/StoryTargetView.js +1 -1
- package/lib/module/v4/component/MyStories/StoryTargetView.js.map +1 -1
- package/lib/module/v4/component/MyStories/index.js +22 -0
- package/lib/module/v4/component/MyStories/index.js.map +1 -1
- package/lib/module/v4/component/MyStories/styles.js +1 -2
- package/lib/module/v4/component/MyStories/styles.js.map +1 -1
- package/lib/module/v4/component/RenderTextWithMention/RenderTextWithMention.js.map +1 -1
- package/lib/module/v4/component/StoryKit/src/Story.js +1 -1
- package/lib/module/v4/component/StoryKit/src/Story.js.map +1 -1
- package/lib/module/v4/component/StoryKit/src/StoryListItem.js +3 -3
- package/lib/module/v4/component/StoryKit/src/StoryListItem.js.map +1 -1
- package/lib/module/v4/component/StoryKit/src/helpers/StateHelpers.js +1 -1
- package/lib/module/v4/component/StoryKit/src/helpers/StateHelpers.js.map +1 -1
- package/lib/module/v4/elements/ChangeThumbnailButton/ChangeThumbnailButton.js.map +1 -1
- package/lib/module/v4/elements/DeleteThumbnailButton/DeleteThumbnailButton.js.map +1 -1
- package/lib/module/v4/routes/AmityPageRenderer.js +1 -1
- package/lib/module/v4/routes/AmityPageRenderer.js.map +1 -1
- package/lib/module/v4/screen/CreateStory/CreateStoryScreen.js +15 -1
- package/lib/module/v4/screen/CreateStory/CreateStoryScreen.js.map +1 -1
- package/lib/typescript/src/components/CustomText/index.d.ts.map +1 -1
- package/lib/typescript/src/components/StoryKit/src/helpers/StateHelpers.d.ts +1 -1
- package/lib/typescript/src/components/StoryKit/src/helpers/StateHelpers.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/redux/slices/bottomSheetSlice.d.ts +3 -3
- package/lib/typescript/src/redux/slices/bottomSheetSlice.d.ts.map +1 -1
- package/lib/typescript/src/redux/store/index.d.ts +5 -3
- package/lib/typescript/src/redux/store/index.d.ts.map +1 -1
- package/lib/typescript/src/screens/UserProfile/Components/UserProfileGallery.d.ts +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityCommunityImageFeedComponent/AmityCommunityImageFeedComponent.d.ts +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityCommunityVideoFeedComponent/AmityCommunityVideoFeedComponent.d.ts +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.d.ts +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.d.ts +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityStoryTabComponent/AmityStoryTabComponent.d.ts +0 -3
- package/lib/typescript/src/v4/PublicApi/Components/AmityStoryTabComponent/AmityStoryTabComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityThumbnailActionComponent/AmityThumbnailActionComponent.d.ts +2 -1
- package/lib/typescript/src/v4/PublicApi/Components/AmityThumbnailActionComponent/AmityThumbnailActionComponent.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/Gallery/GalleryComponent.d.ts +1 -1
- package/lib/typescript/src/v4/component/MyStories/index.d.ts +3 -0
- package/lib/typescript/src/v4/component/MyStories/index.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/MyStories/styles.d.ts +0 -1
- package/lib/typescript/src/v4/component/MyStories/styles.d.ts.map +1 -1
- package/lib/typescript/src/v4/component/StoryKit/src/helpers/StateHelpers.d.ts +1 -1
- package/lib/typescript/src/v4/component/StoryKit/src/helpers/StateHelpers.d.ts.map +1 -1
- package/lib/typescript/src/v4/elements/ChangeThumbnailButton/ChangeThumbnailButton.d.ts +2 -1
- package/lib/typescript/src/v4/elements/ChangeThumbnailButton/ChangeThumbnailButton.d.ts.map +1 -1
- package/lib/typescript/src/v4/elements/DeleteThumbnailButton/DeleteThumbnailButton.d.ts +2 -1
- package/lib/typescript/src/v4/elements/DeleteThumbnailButton/DeleteThumbnailButton.d.ts.map +1 -1
- package/lib/typescript/src/v4/hook/usePopup.d.ts +1 -1
- package/lib/typescript/src/v4/screen/CreateStory/CreateStoryScreen.d.ts.map +1 -1
- package/package.json +16 -16
- package/src/components/CustomText/index.tsx +7 -4
- package/src/components/Social/PostList/Components/RenderTextWithMention.tsx +1 -1
- package/src/components/StoryKit/src/Story.tsx +1 -1
- package/src/components/StoryKit/src/StoryListItem.tsx +3 -3
- package/src/components/StoryKit/src/helpers/StateHelpers.ts +1 -1
- package/src/index.tsx +2 -2
- package/src/providers/amity-ui-kit-provider.tsx +1 -1
- package/src/redux/slices/bottomSheetSlice.ts +2 -2
- package/src/redux/store/index.ts +12 -4
- package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx +1 -1
- package/src/v4/PublicApi/Components/AmityPostCommentComponent/AmityPostCommentComponent.tsx +1 -1
- package/src/v4/PublicApi/Components/AmityStoryTabComponent/AmityStoryTabComponent.tsx +0 -4
- package/src/v4/PublicApi/Components/AmityThumbnailActionComponent/AmityThumbnailActionComponent.tsx +1 -1
- package/src/v4/component/MyStories/StoryTargetView.tsx +1 -1
- package/src/v4/component/MyStories/index.tsx +21 -0
- package/src/v4/component/MyStories/styles.ts +0 -1
- package/src/v4/component/RenderTextWithMention/RenderTextWithMention.tsx +1 -1
- package/src/v4/component/StoryKit/src/Story.tsx +1 -1
- package/src/v4/component/StoryKit/src/StoryListItem.tsx +3 -3
- package/src/v4/component/StoryKit/src/helpers/StateHelpers.ts +1 -1
- package/src/v4/elements/ChangeThumbnailButton/ChangeThumbnailButton.tsx +1 -1
- package/src/v4/elements/DeleteThumbnailButton/DeleteThumbnailButton.tsx +1 -1
- package/src/v4/routes/AmityPageRenderer.tsx +1 -1
- package/src/v4/screen/CreateStory/CreateStoryScreen.tsx +22 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CreateStoryScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/v4/screen/CreateStory/CreateStoryScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,iBAAiB,GAAI;;;CAAqB,
|
|
1
|
+
{"version":3,"file":"CreateStoryScreen.d.ts","sourceRoot":"","sources":["../../../../../../src/v4/screen/CreateStory/CreateStoryScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,QAAA,MAAM,iBAAiB,GAAI;;;CAAqB,sBAwD/C,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@amityco/react-native-social-uikit",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-06cc633.0",
|
|
4
4
|
"description": "Social UIKit",
|
|
5
5
|
"main": "lib/commonjs/index",
|
|
6
6
|
"module": "lib/module/index",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@react-navigation/stack": "^7.3.1",
|
|
73
73
|
"@release-it/conventional-changelog": "^5.0.0",
|
|
74
74
|
"@types/jest": "^29.5.13",
|
|
75
|
-
"@types/react": "^
|
|
75
|
+
"@types/react": "^19.1.0",
|
|
76
76
|
"@types/react-native": "0.73.0",
|
|
77
77
|
"@types/react-native-video": "^5.0.18",
|
|
78
78
|
"babel-plugin-module-resolver": "^5.0.0",
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"lint-staged": "^15.2.0",
|
|
87
87
|
"pod-install": "^0.1.0",
|
|
88
88
|
"prettier": "2.8.8",
|
|
89
|
-
"react": "
|
|
90
|
-
"react-native": "0.
|
|
89
|
+
"react": "19.1.0",
|
|
90
|
+
"react-native": "0.80.1",
|
|
91
91
|
"react-native-builder-bob": "^0.20.0",
|
|
92
92
|
"react-native-compressor": "^1.13.0",
|
|
93
93
|
"react-native-fs": "2.20.0",
|
|
@@ -95,12 +95,12 @@
|
|
|
95
95
|
"react-native-get-random-values": "^1.11.0",
|
|
96
96
|
"react-native-image-picker": "^8.2.1",
|
|
97
97
|
"react-native-linear-gradient": "^2.8.3",
|
|
98
|
-
"react-native-safe-area-context": "5.2
|
|
99
|
-
"react-native-screens": "4.
|
|
100
|
-
"react-native-svg": "15.
|
|
101
|
-
"react-native-video": "^6.
|
|
98
|
+
"react-native-safe-area-context": "^5.6.2",
|
|
99
|
+
"react-native-screens": "^4.18.0",
|
|
100
|
+
"react-native-svg": "^15.15.1",
|
|
101
|
+
"react-native-video": "^6.18.0",
|
|
102
102
|
"react-native-video-controls": "^2.8.1",
|
|
103
|
-
"react-native-vision-camera": "^4.7.
|
|
103
|
+
"react-native-vision-camera": "^4.7.3",
|
|
104
104
|
"release-it": "^15.0.0",
|
|
105
105
|
"turbo": "^1.10.7",
|
|
106
106
|
"typescript": "^5.2.2"
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"*.{json,md}": "prettier --write"
|
|
111
111
|
},
|
|
112
112
|
"resolutions": {
|
|
113
|
-
"@types/react": "
|
|
113
|
+
"@types/react": "^19.1.0"
|
|
114
114
|
},
|
|
115
115
|
"peerDependencies": {
|
|
116
116
|
"@amityco/ts-sdk-react-native": "^7.9.2",
|
|
@@ -130,11 +130,11 @@
|
|
|
130
130
|
"react-native-image-picker": "^8.2.1",
|
|
131
131
|
"react-native-linear-gradient": "^2.8.3",
|
|
132
132
|
"react-native-netinfo": "^1.1.0",
|
|
133
|
-
"react-native-safe-area-context": "^5.2
|
|
134
|
-
"react-native-screens": "^4.
|
|
135
|
-
"react-native-svg": "^15.
|
|
136
|
-
"react-native-video": "^6.
|
|
137
|
-
"react-native-vision-camera": "^4.7.
|
|
133
|
+
"react-native-safe-area-context": "^5.6.2",
|
|
134
|
+
"react-native-screens": "^4.18.0",
|
|
135
|
+
"react-native-svg": "^15.15.1",
|
|
136
|
+
"react-native-video": "^6.18.0",
|
|
137
|
+
"react-native-vision-camera": "^4.7.3"
|
|
138
138
|
},
|
|
139
139
|
"engines": {
|
|
140
140
|
"node": ">= 18.0.0"
|
|
@@ -218,7 +218,7 @@
|
|
|
218
218
|
"@hookform/resolvers": "^5.2.1",
|
|
219
219
|
"@reduxjs/toolkit": "^1.9.7",
|
|
220
220
|
"@tanstack/react-query": "^5.85.5",
|
|
221
|
-
"@types/react-dom": "^
|
|
221
|
+
"@types/react-dom": "^19.1.0",
|
|
222
222
|
"dayjs": "^1.11.10",
|
|
223
223
|
"html-entities": "^2.5.2",
|
|
224
224
|
"i18next": "22.4.10",
|
|
@@ -9,10 +9,13 @@ interface CustomTextProps {
|
|
|
9
9
|
ellipsizeMode?: 'tail' | 'head' | 'middle' | 'clip' | undefined;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
const CustomText: React.FC<CustomTextProps> = (
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
const CustomText: React.FC<CustomTextProps> = ({
|
|
13
|
+
children,
|
|
14
|
+
style,
|
|
15
|
+
numberOfLines,
|
|
16
|
+
ellipsizeMode = 'tail',
|
|
17
|
+
...props
|
|
18
|
+
}: CustomTextProps) => {
|
|
16
19
|
return (
|
|
17
20
|
<Text
|
|
18
21
|
{...props}
|
|
@@ -27,7 +27,7 @@ const RenderTextWithMention: React.FC<IrenderTextWithMention> = ({
|
|
|
27
27
|
});
|
|
28
28
|
};
|
|
29
29
|
let currentPosition = 0;
|
|
30
|
-
const result: (string | JSX.Element)[][] = mentionPositionArr.map(
|
|
30
|
+
const result: (string | React.JSX.Element)[][] = mentionPositionArr.map(
|
|
31
31
|
({ index, length, userId }, i) => {
|
|
32
32
|
// Add non-highlighted text before the mention
|
|
33
33
|
const nonHighlightedText = textPost.slice(currentPosition, index);
|
|
@@ -45,7 +45,7 @@ export const Story = ({
|
|
|
45
45
|
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
|
46
46
|
const [currentPage, setCurrentPage] = useState<number>(0);
|
|
47
47
|
const [selectedData, setSelectedData] = useState<IUserStory[]>([]);
|
|
48
|
-
const cube = useRef<CubeNavigationHorizontal | AndroidCubeEffect>();
|
|
48
|
+
const cube = useRef<CubeNavigationHorizontal | AndroidCubeEffect>(null);
|
|
49
49
|
|
|
50
50
|
// Component Functions
|
|
51
51
|
const _handleStoryItemPress = (item: IUserStory, index?: number) => {
|
|
@@ -101,7 +101,7 @@ export const StoryListItem = ({
|
|
|
101
101
|
);
|
|
102
102
|
|
|
103
103
|
useEffect(() => {
|
|
104
|
-
let isPrevious = !!prevCurrentPage && prevCurrentPage > currentPage;
|
|
104
|
+
let isPrevious = !!prevCurrentPage && +prevCurrentPage > +currentPage;
|
|
105
105
|
if (isPrevious) {
|
|
106
106
|
setCurrent(content.length - 1);
|
|
107
107
|
} else {
|
|
@@ -129,12 +129,12 @@ export const StoryListItem = ({
|
|
|
129
129
|
if (!isNullOrWhitespace(prevCurrent)) {
|
|
130
130
|
if (prevCurrent) {
|
|
131
131
|
if (
|
|
132
|
-
current > prevCurrent &&
|
|
132
|
+
+current > +prevCurrent &&
|
|
133
133
|
content[current - 1].story_image == content[current].story_image
|
|
134
134
|
) {
|
|
135
135
|
start();
|
|
136
136
|
} else if (
|
|
137
|
-
current < prevCurrent &&
|
|
137
|
+
+current < +prevCurrent &&
|
|
138
138
|
content[current + 1].story_image == content[current].story_image
|
|
139
139
|
) {
|
|
140
140
|
start();
|
package/src/index.tsx
CHANGED
|
@@ -99,7 +99,7 @@ import {
|
|
|
99
99
|
AmityPostComposerMode,
|
|
100
100
|
mediaAttachment,
|
|
101
101
|
} from './v4/PublicApi/types';
|
|
102
|
-
import {
|
|
102
|
+
import { AmityGlobalStoryTabWrapper } from './v4/component/MyStories';
|
|
103
103
|
|
|
104
104
|
const LINKING_ERROR =
|
|
105
105
|
`The package 'amity-react-native-social-ui-kit' doesn't seem to be linked. Make sure: \n\n` +
|
|
@@ -191,5 +191,5 @@ export {
|
|
|
191
191
|
AmityCommunityLivestreamsNotificationSettingPage,
|
|
192
192
|
AmityCommunityPinnedPostComponent,
|
|
193
193
|
AmityPendingPostListComponent,
|
|
194
|
-
|
|
194
|
+
AmityGlobalStoryTabWrapper,
|
|
195
195
|
};
|
|
@@ -144,7 +144,7 @@ export default function AmityUiKitProvider({
|
|
|
144
144
|
|
|
145
145
|
return (
|
|
146
146
|
<QueryClientProvider client={queryClient}>
|
|
147
|
-
<Provider store={store} context={AmityUIKitReduxContext}>
|
|
147
|
+
<Provider store={store} context={AmityUIKitReduxContext as any}>
|
|
148
148
|
<AuthContextProvider
|
|
149
149
|
userId={userId}
|
|
150
150
|
displayName={displayName || userId}
|
|
@@ -4,14 +4,14 @@ import { RootState, useUIKitDispatch, useUIKitSelector } from '../store';
|
|
|
4
4
|
|
|
5
5
|
export interface BottomSheetState {
|
|
6
6
|
open: boolean;
|
|
7
|
-
content: JSX.Element | null;
|
|
7
|
+
content: React.JSX.Element | null;
|
|
8
8
|
height?: number;
|
|
9
9
|
pageId?: PageID;
|
|
10
10
|
componentId?: ComponentID;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
type OpenBottomSheetPayload = {
|
|
14
|
-
content: JSX.Element;
|
|
14
|
+
content: React.JSX.Element;
|
|
15
15
|
height?: number;
|
|
16
16
|
};
|
|
17
17
|
|
package/src/redux/store/index.ts
CHANGED
|
@@ -10,13 +10,21 @@ import {
|
|
|
10
10
|
createStoreHook,
|
|
11
11
|
createDispatchHook,
|
|
12
12
|
createSelectorHook,
|
|
13
|
+
ReactReduxContextValue,
|
|
13
14
|
} from 'react-redux';
|
|
15
|
+
import { AnyAction } from 'redux';
|
|
14
16
|
|
|
15
|
-
export const AmityUIKitReduxContext = createContext
|
|
17
|
+
export const AmityUIKitReduxContext = createContext<
|
|
18
|
+
ReactReduxContextValue<any, AnyAction>
|
|
19
|
+
>(null as any);
|
|
16
20
|
|
|
17
|
-
export const useUIKitStore = createStoreHook(AmityUIKitReduxContext);
|
|
18
|
-
export const useUIKitDispatch = createDispatchHook(
|
|
19
|
-
|
|
21
|
+
export const useUIKitStore = createStoreHook(AmityUIKitReduxContext as any);
|
|
22
|
+
export const useUIKitDispatch = createDispatchHook(
|
|
23
|
+
AmityUIKitReduxContext as any
|
|
24
|
+
);
|
|
25
|
+
export const useUIKitSelector = createSelectorHook(
|
|
26
|
+
AmityUIKitReduxContext as any
|
|
27
|
+
);
|
|
20
28
|
|
|
21
29
|
export const store: Store = configureStore({
|
|
22
30
|
reducer: {
|
package/src/v4/PublicApi/Components/AmityCreatePostMenuComponent/AmityCreatePostMenuComponent.tsx
CHANGED
|
@@ -17,7 +17,7 @@ interface AmityCreatePostMenuComponentProps {
|
|
|
17
17
|
const AmityCreatePostMenuComponent = ({
|
|
18
18
|
pageId = PageID.WildCardPage,
|
|
19
19
|
componentId = ComponentID.WildCardComponent,
|
|
20
|
-
}: AmityCreatePostMenuComponentProps): JSX.Element => {
|
|
20
|
+
}: AmityCreatePostMenuComponentProps): React.JSX.Element => {
|
|
21
21
|
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>();
|
|
22
22
|
const { themeStyles } = useAmityComponent({ pageId, componentId });
|
|
23
23
|
|
|
@@ -48,7 +48,7 @@ type AmityPostCommentComponentType = {
|
|
|
48
48
|
disabledInteraction?: boolean;
|
|
49
49
|
setReplyUserName?: (arg: string) => void;
|
|
50
50
|
setReplyCommentId?: (arg: string) => void;
|
|
51
|
-
ListHeaderComponent?: JSX.Element;
|
|
51
|
+
ListHeaderComponent?: React.JSX.Element;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
const commentListLimit = 10;
|
package/src/v4/PublicApi/Components/AmityThumbnailActionComponent/AmityThumbnailActionComponent.tsx
CHANGED
|
@@ -16,7 +16,7 @@ const AmityThumbnailActionComponent = ({
|
|
|
16
16
|
onChangeThumbnail,
|
|
17
17
|
onDeleteThumbnail,
|
|
18
18
|
pageId = PageID.WildCardPage,
|
|
19
|
-
}: AmityThumbnailActionComponentProps): JSX.Element => {
|
|
19
|
+
}: AmityThumbnailActionComponentProps): React.JSX.Element => {
|
|
20
20
|
const componentId = ComponentID.thumbnail_action;
|
|
21
21
|
const { themeStyles } = useAmityComponent({ pageId, componentId });
|
|
22
22
|
const styles = useStyles(themeStyles);
|
|
@@ -24,7 +24,7 @@ const StoryTargetView: FC<IStorytargetView> = ({
|
|
|
24
24
|
setViewStory,
|
|
25
25
|
onClose,
|
|
26
26
|
}) => {
|
|
27
|
-
const cube = useRef<CubeNavigationHorizontal | AndroidCubeEffect>();
|
|
27
|
+
const cube = useRef<CubeNavigationHorizontal | AndroidCubeEffect>(null);
|
|
28
28
|
const communityId = globalStoryTargets[currentCommunityIndex].targetId;
|
|
29
29
|
const hasStoryPermission = useStoryPermission(communityId);
|
|
30
30
|
|
|
@@ -8,6 +8,7 @@ import Modal from 'react-native-modalbox';
|
|
|
8
8
|
import StoryTargetView from './StoryTargetView';
|
|
9
9
|
import { useTheme } from 'react-native-paper';
|
|
10
10
|
import { MyMD3Theme } from '../../../providers/amity-ui-kit-provider';
|
|
11
|
+
import useAuth from '../../../hooks/useAuth';
|
|
11
12
|
|
|
12
13
|
export interface IStoryItems {
|
|
13
14
|
communityId: string;
|
|
@@ -112,5 +113,25 @@ const MyStories = () => {
|
|
|
112
113
|
|
|
113
114
|
return null;
|
|
114
115
|
};
|
|
116
|
+
export const AmityGlobalStoryTabWrapper = ({ children }) => {
|
|
117
|
+
const { globalStoryTargets, getGlobalStoryTargets } = useGlobalStory();
|
|
118
|
+
|
|
119
|
+
const { sessionState } = useAuth();
|
|
120
|
+
|
|
121
|
+
useEffect(() => {
|
|
122
|
+
if (sessionState === 'established') {
|
|
123
|
+
getGlobalStoryTargets();
|
|
124
|
+
}
|
|
125
|
+
}, [sessionState, getGlobalStoryTargets]);
|
|
126
|
+
return (
|
|
127
|
+
<View
|
|
128
|
+
style={{
|
|
129
|
+
height: globalStoryTargets.length > 0 ? 113 : 0,
|
|
130
|
+
}}
|
|
131
|
+
>
|
|
132
|
+
{children}
|
|
133
|
+
</View>
|
|
134
|
+
);
|
|
135
|
+
};
|
|
115
136
|
|
|
116
137
|
export default memo(MyStories);
|
|
@@ -82,7 +82,7 @@ const RenderTextWithMention: React.FC<IrenderTextWithMention> = ({
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
let currentPosition = 0;
|
|
85
|
-
const result: (string | JSX.Element)[][] = heightlightTextPositions.map(
|
|
85
|
+
const result: (string | React.JSX.Element)[][] = heightlightTextPositions.map(
|
|
86
86
|
({ index, length, userId, link }, i) => {
|
|
87
87
|
// Add non-highlighted text before the mention
|
|
88
88
|
const nonHighlightedText = textPost.slice(currentPosition, index);
|
|
@@ -22,7 +22,7 @@ export const Story = ({
|
|
|
22
22
|
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
|
23
23
|
const [currentPage, setCurrentPage] = useState<number>(0);
|
|
24
24
|
const [selectedData, setSelectedData] = useState<IUserStory[]>([]);
|
|
25
|
-
const cube = useRef<CubeNavigationHorizontal | AndroidCubeEffect>();
|
|
25
|
+
const cube = useRef<CubeNavigationHorizontal | AndroidCubeEffect>(null);
|
|
26
26
|
// Component Functions
|
|
27
27
|
const _handleStoryItemPress = (item: IUserStory, index?: number) => {
|
|
28
28
|
if (item?.stories?.length === 0) return;
|
|
@@ -152,7 +152,7 @@ export const StoryListItem = ({
|
|
|
152
152
|
}, [myReactions, reactionCounts]);
|
|
153
153
|
|
|
154
154
|
useEffect(() => {
|
|
155
|
-
let isPrevious = !!prevCurrentPage && prevCurrentPage > currentPage;
|
|
155
|
+
let isPrevious = !!prevCurrentPage && +prevCurrentPage > +currentPage;
|
|
156
156
|
if (isPrevious) {
|
|
157
157
|
setCurrent(content.length - 1);
|
|
158
158
|
} else {
|
|
@@ -180,12 +180,12 @@ export const StoryListItem = ({
|
|
|
180
180
|
if (!isNullOrWhitespace(prevCurrent)) {
|
|
181
181
|
if (prevCurrent) {
|
|
182
182
|
if (
|
|
183
|
-
current > prevCurrent &&
|
|
183
|
+
+current > +prevCurrent &&
|
|
184
184
|
content[current - 1].story_image === content[current].story_image
|
|
185
185
|
) {
|
|
186
186
|
start();
|
|
187
187
|
} else if (
|
|
188
|
-
current < prevCurrent &&
|
|
188
|
+
+current < +prevCurrent &&
|
|
189
189
|
content[current + 1].story_image === content[current].story_image
|
|
190
190
|
) {
|
|
191
191
|
start();
|
|
@@ -16,7 +16,7 @@ const ChangeThumbnailButton = ({
|
|
|
16
16
|
pageId = PageID.WildCardPage,
|
|
17
17
|
componentId = ComponentID.WildCardComponent,
|
|
18
18
|
...props
|
|
19
|
-
}: ChangeThumbnailButtonProps): JSX.Element => {
|
|
19
|
+
}: ChangeThumbnailButtonProps): React.JSX.Element => {
|
|
20
20
|
const { themeStyles, config } = useAmityElement({
|
|
21
21
|
pageId,
|
|
22
22
|
componentId,
|
|
@@ -16,7 +16,7 @@ const ChangeThumbnailButton = ({
|
|
|
16
16
|
pageId = PageID.WildCardPage,
|
|
17
17
|
componentId = ComponentID.WildCardComponent,
|
|
18
18
|
...props
|
|
19
|
-
}: ChangeThumbnailButtonProps): JSX.Element => {
|
|
19
|
+
}: ChangeThumbnailButtonProps): React.JSX.Element => {
|
|
20
20
|
const { themeStyles, config } = useAmityElement({
|
|
21
21
|
pageId,
|
|
22
22
|
componentId,
|
|
@@ -84,7 +84,7 @@ export default function PageRenderer({ children }: PageRendererProps) {
|
|
|
84
84
|
screenOptions={{
|
|
85
85
|
headerShadowVisible: false,
|
|
86
86
|
contentStyle: {
|
|
87
|
-
backgroundColor:
|
|
87
|
+
backgroundColor: theme.colors.background,
|
|
88
88
|
},
|
|
89
89
|
headerStyle: {
|
|
90
90
|
backgroundColor: theme.colors.background,
|
|
@@ -32,11 +32,32 @@ const CreateStoryScreen = ({ navigation, route }) => {
|
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
const handleCreateStory = () => {
|
|
36
|
+
const state = navigation.getState();
|
|
37
|
+
const routes = state.routes;
|
|
38
|
+
const currentIndex = state.index;
|
|
39
|
+
|
|
40
|
+
if (currentIndex > 0) {
|
|
41
|
+
const previousRoute = routes[currentIndex - 1];
|
|
42
|
+
const previousRouteName = previousRoute.name;
|
|
43
|
+
|
|
44
|
+
if (
|
|
45
|
+
previousRouteName === 'ViewStory' ||
|
|
46
|
+
previousRouteName === 'StoryTargetSelection'
|
|
47
|
+
) {
|
|
48
|
+
navigation.pop(2);
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
navigation.goBack();
|
|
54
|
+
};
|
|
55
|
+
|
|
35
56
|
return (
|
|
36
57
|
<AmityCreateStoryPage
|
|
37
58
|
targetId={targetId}
|
|
38
59
|
targetType={targetType}
|
|
39
|
-
onCreateStory={
|
|
60
|
+
onCreateStory={handleCreateStory}
|
|
40
61
|
/>
|
|
41
62
|
);
|
|
42
63
|
};
|