@amityco/ulta-ui-kit 1.0.0-alpha.3 → 1.0.0-alpha.31

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.
Files changed (116) hide show
  1. package/dist/CircularStd-Black-EL754VZN.eot +0 -0
  2. package/dist/CircularStd-Black-M6FYDJME.woff2 +0 -0
  3. package/dist/CircularStd-Black-PNLLRW5C.woff +0 -0
  4. package/dist/CircularStd-Black-YMQQKCA3.ttf +0 -0
  5. package/dist/CircularStd-BlackItalic-BWOJUVN3.ttf +0 -0
  6. package/dist/CircularStd-BlackItalic-G62XUQUP.woff2 +0 -0
  7. package/dist/CircularStd-BlackItalic-MBNBDZUU.eot +0 -0
  8. package/dist/CircularStd-BlackItalic-NVQVXG5L.woff +0 -0
  9. package/dist/CircularStd-Bold-3YZD2D54.woff +0 -0
  10. package/dist/CircularStd-Bold-OBIX2X7G.woff2 +0 -0
  11. package/dist/CircularStd-Bold-QHAMEMSL.eot +0 -0
  12. package/dist/CircularStd-Bold-UGQNNLCJ.ttf +0 -0
  13. package/dist/CircularStd-BoldItalic-53VUNMNP.ttf +0 -0
  14. package/dist/CircularStd-BoldItalic-7MYBAB7V.woff2 +0 -0
  15. package/dist/CircularStd-BoldItalic-A6ZIS4PA.eot +0 -0
  16. package/dist/CircularStd-BoldItalic-S4EXYNAA.woff +0 -0
  17. package/dist/CircularStd-Book-JPHT3EYH.eot +0 -0
  18. package/dist/CircularStd-Book-QH24MWNT.woff2 +0 -0
  19. package/dist/CircularStd-Book-WO57ECZG.woff +0 -0
  20. package/dist/CircularStd-Book-X7C7G6T7.ttf +0 -0
  21. package/dist/CircularStd-BookItalic-FKVXO6VC.woff +0 -0
  22. package/dist/CircularStd-BookItalic-JMRK2M3F.ttf +0 -0
  23. package/dist/CircularStd-BookItalic-LYDC7HJ5.eot +0 -0
  24. package/dist/CircularStd-BookItalic-N7R5KSUJ.woff2 +0 -0
  25. package/dist/CircularStd-Medium-27RJ4G7E.woff +0 -0
  26. package/dist/CircularStd-Medium-CYDQT5MI.eot +0 -0
  27. package/dist/CircularStd-Medium-MVVUHW3Z.woff2 +0 -0
  28. package/dist/CircularStd-Medium-TPGRKUIA.ttf +0 -0
  29. package/dist/CircularStd-MediumItalic-6VIHMKHS.woff +0 -0
  30. package/dist/CircularStd-MediumItalic-MGFTUSP5.woff2 +0 -0
  31. package/dist/CircularStd-MediumItalic-PWSPA5NY.ttf +0 -0
  32. package/dist/CircularStd-MediumItalic-QZO45QYZ.eot +0 -0
  33. package/dist/esm/CircularStd-Black-EL754VZN.eot +0 -0
  34. package/dist/esm/CircularStd-Black-M6FYDJME.woff2 +0 -0
  35. package/dist/esm/CircularStd-Black-PNLLRW5C.woff +0 -0
  36. package/dist/esm/CircularStd-Black-YMQQKCA3.ttf +0 -0
  37. package/dist/esm/CircularStd-BlackItalic-BWOJUVN3.ttf +0 -0
  38. package/dist/esm/CircularStd-BlackItalic-G62XUQUP.woff2 +0 -0
  39. package/dist/esm/CircularStd-BlackItalic-MBNBDZUU.eot +0 -0
  40. package/dist/esm/CircularStd-BlackItalic-NVQVXG5L.woff +0 -0
  41. package/dist/esm/CircularStd-Bold-3YZD2D54.woff +0 -0
  42. package/dist/esm/CircularStd-Bold-OBIX2X7G.woff2 +0 -0
  43. package/dist/esm/CircularStd-Bold-QHAMEMSL.eot +0 -0
  44. package/dist/esm/CircularStd-Bold-UGQNNLCJ.ttf +0 -0
  45. package/dist/esm/CircularStd-BoldItalic-53VUNMNP.ttf +0 -0
  46. package/dist/esm/CircularStd-BoldItalic-7MYBAB7V.woff2 +0 -0
  47. package/dist/esm/CircularStd-BoldItalic-A6ZIS4PA.eot +0 -0
  48. package/dist/esm/CircularStd-BoldItalic-S4EXYNAA.woff +0 -0
  49. package/dist/esm/CircularStd-Book-JPHT3EYH.eot +0 -0
  50. package/dist/esm/CircularStd-Book-QH24MWNT.woff2 +0 -0
  51. package/dist/esm/CircularStd-Book-WO57ECZG.woff +0 -0
  52. package/dist/esm/CircularStd-Book-X7C7G6T7.ttf +0 -0
  53. package/dist/esm/CircularStd-BookItalic-FKVXO6VC.woff +0 -0
  54. package/dist/esm/CircularStd-BookItalic-JMRK2M3F.ttf +0 -0
  55. package/dist/esm/CircularStd-BookItalic-LYDC7HJ5.eot +0 -0
  56. package/dist/esm/CircularStd-BookItalic-N7R5KSUJ.woff2 +0 -0
  57. package/dist/esm/CircularStd-Medium-27RJ4G7E.woff +0 -0
  58. package/dist/esm/CircularStd-Medium-CYDQT5MI.eot +0 -0
  59. package/dist/esm/CircularStd-Medium-MVVUHW3Z.woff2 +0 -0
  60. package/dist/esm/CircularStd-Medium-TPGRKUIA.ttf +0 -0
  61. package/dist/esm/CircularStd-MediumItalic-6VIHMKHS.woff +0 -0
  62. package/dist/esm/CircularStd-MediumItalic-MGFTUSP5.woff2 +0 -0
  63. package/dist/esm/CircularStd-MediumItalic-PWSPA5NY.ttf +0 -0
  64. package/dist/esm/CircularStd-MediumItalic-QZO45QYZ.eot +0 -0
  65. package/dist/esm/index.css +1 -1
  66. package/dist/esm/index.js +2797 -1844
  67. package/dist/index.css +1 -1
  68. package/dist/index.d.mts +246 -283
  69. package/dist/index.d.ts +246 -283
  70. package/dist/index.js +2876 -1918
  71. package/dist/metafile-cjs.json +1 -1
  72. package/dist/metafile-esm.json +1 -1
  73. package/package.json +4 -5
  74. package/readme.md +130 -10
  75. package/dist/Inter-Black-PFV6RWF7.woff2 +0 -0
  76. package/dist/Inter-BlackItalic-OUXR4CVK.woff2 +0 -0
  77. package/dist/Inter-Bold-K6PA7FOK.woff2 +0 -0
  78. package/dist/Inter-BoldItalic-QKFESTQE.woff2 +0 -0
  79. package/dist/Inter-ExtraBold-2ZPQFALF.woff2 +0 -0
  80. package/dist/Inter-ExtraBoldItalic-RR7KYXHD.woff2 +0 -0
  81. package/dist/Inter-ExtraLight-NASBO7I6.woff2 +0 -0
  82. package/dist/Inter-ExtraLightItalic-AUJY3XPT.woff2 +0 -0
  83. package/dist/Inter-Italic-2WJ2RX3Z.woff2 +0 -0
  84. package/dist/Inter-Light-E4ED7JRX.woff2 +0 -0
  85. package/dist/Inter-LightItalic-BJ4DXCNT.woff2 +0 -0
  86. package/dist/Inter-Medium-3R4SWUEO.woff2 +0 -0
  87. package/dist/Inter-MediumItalic-QTJUSOU7.woff2 +0 -0
  88. package/dist/Inter-Regular-6HYMGWZS.woff2 +0 -0
  89. package/dist/Inter-SemiBold-7SYQBR3A.woff2 +0 -0
  90. package/dist/Inter-SemiBoldItalic-3EHSSXIM.woff2 +0 -0
  91. package/dist/Inter-Thin-3L5KITMZ.woff2 +0 -0
  92. package/dist/Inter-ThinItalic-J7DGFM6P.woff2 +0 -0
  93. package/dist/Inter-italic.var-SWFAXF2C.woff2 +0 -0
  94. package/dist/Inter-roman.var-WIJJYAE4.woff2 +0 -0
  95. package/dist/Inter.var-OMHIC2JW.woff2 +0 -0
  96. package/dist/esm/Inter-Black-PFV6RWF7.woff2 +0 -0
  97. package/dist/esm/Inter-BlackItalic-OUXR4CVK.woff2 +0 -0
  98. package/dist/esm/Inter-Bold-K6PA7FOK.woff2 +0 -0
  99. package/dist/esm/Inter-BoldItalic-QKFESTQE.woff2 +0 -0
  100. package/dist/esm/Inter-ExtraBold-2ZPQFALF.woff2 +0 -0
  101. package/dist/esm/Inter-ExtraBoldItalic-RR7KYXHD.woff2 +0 -0
  102. package/dist/esm/Inter-ExtraLight-NASBO7I6.woff2 +0 -0
  103. package/dist/esm/Inter-ExtraLightItalic-AUJY3XPT.woff2 +0 -0
  104. package/dist/esm/Inter-Italic-2WJ2RX3Z.woff2 +0 -0
  105. package/dist/esm/Inter-Light-E4ED7JRX.woff2 +0 -0
  106. package/dist/esm/Inter-LightItalic-BJ4DXCNT.woff2 +0 -0
  107. package/dist/esm/Inter-Medium-3R4SWUEO.woff2 +0 -0
  108. package/dist/esm/Inter-MediumItalic-QTJUSOU7.woff2 +0 -0
  109. package/dist/esm/Inter-Regular-6HYMGWZS.woff2 +0 -0
  110. package/dist/esm/Inter-SemiBold-7SYQBR3A.woff2 +0 -0
  111. package/dist/esm/Inter-SemiBoldItalic-3EHSSXIM.woff2 +0 -0
  112. package/dist/esm/Inter-Thin-3L5KITMZ.woff2 +0 -0
  113. package/dist/esm/Inter-ThinItalic-J7DGFM6P.woff2 +0 -0
  114. package/dist/esm/Inter-italic.var-SWFAXF2C.woff2 +0 -0
  115. package/dist/esm/Inter-roman.var-WIJJYAE4.woff2 +0 -0
  116. package/dist/esm/Inter.var-OMHIC2JW.woff2 +0 -0
package/dist/index.d.mts CHANGED
@@ -1,153 +1,35 @@
1
1
  import React, { ReactNode, RefObject } from 'react';
2
+ import { PostContentType } from '@amityco/ts-sdk';
2
3
  import * as styled_components_dist_types from 'styled-components/dist/types';
3
4
  import * as styled_components from 'styled-components';
4
5
 
5
- type AmityReactionType = {
6
- name: string;
7
- image: string;
8
- };
6
+ type CustomComponentName = 'Avatar' | 'CategoryHeader' | 'CategorySelector' | 'Chat' | 'ChatDetails' | 'ChatHeader' | 'ChatItem' | 'Comment' | 'CommentComposerBar' | 'CommentLikeButton' | 'CommunityCreatedModel' | 'CommunityCreationModal' | 'CommunityForm' | 'CommunityItem' | 'CommunityMembers' | 'CommunityName' | 'CommunityPermissions' | 'EmptyFeed' | 'EngagementBar' | 'Feed' | 'FeedHeaderTabs' | 'File' | 'Image' | 'ImageGallery' | 'Images' | 'Layout' | 'MediaGallery' | 'MenuTab' | 'Message' | 'MessageComposerBar' | 'MessageList' | 'NickNameCreationModal' | 'Post' | 'PostLikeButton' | 'PostTargetSelector' | 'ProfileSettings' | 'ProfileSettingsTabs' | 'RecentChat' | 'SideNavBar' | 'SocialSearch' | 'Tabs' | 'UICategoryCard' | 'UICommunityCard' | 'UICommunityHeader' | 'UICommunityInfo' | 'UIEngagementBar' | 'UIPostHeader' | 'UITextContent' | 'UITrendingItem' | 'UIUserInfo' | 'UserChip' | 'UserHeader' | 'UserSelector';
7
+ type CustomComponentType = Partial<Record<CustomComponentName, <TProps>(props: TProps) => React.ReactElement<TProps>>>;
9
8
 
10
- type ThemeValue = {
11
- primary_color: string;
12
- secondary_color: string;
13
- secondary_shade1_color: string;
14
- secondary_shade2_color: string;
15
- secondary_shade3_color: string;
16
- secondary_shade4_color: string;
17
- base_color: string;
18
- base_shade1_color: string;
19
- base_shade2_color: string;
20
- base_shade3_color: string;
21
- base_shade4_color: string;
22
- base_shade5_color: string;
23
- alert_color: string;
24
- background_color: string;
25
- base_inverse_color: string;
26
- };
27
- type Theme = {
28
- light: ThemeValue;
29
- dark: ThemeValue;
30
- };
31
- type ThemeConfiguration = {
32
- preferred_theme?: 'light' | 'dark' | 'default';
33
- theme?: {
34
- light?: Partial<Theme['light']>;
35
- dark?: Partial<Theme['dark']>;
36
- };
37
- };
38
- interface Config {
39
- preferred_theme?: 'light' | 'dark' | 'default';
40
- theme?: {
41
- light?: Theme['light'];
42
- dark?: Theme['dark'];
43
- };
44
- excludes?: string[];
45
- message_reactions?: AmityReactionType[];
46
- customizations?: {
47
- [key: string]: IconConfiguration & TextConfiguration & ThemeConfiguration & CustomConfiguration;
48
- };
49
- }
50
- type IconConfiguration = {
51
- icon?: string;
52
- image?: string;
53
- };
54
- type TextConfiguration = {
55
- text?: string;
56
- };
57
- type CustomConfiguration = {
58
- [key: string]: string | undefined | boolean | Array<string> | number | Record<string, unknown>;
9
+ type PostRendererProps = {
10
+ childrenPosts?: Amity.Post[];
11
+ className?: string;
12
+ currentUserId?: string;
13
+ handleDeletePost?: (postId: string) => void;
14
+ handleReportPost?: () => void;
15
+ handleUnreportPost?: () => void;
16
+ handleApprovePost?: () => void;
17
+ handleDeclinePost?: () => void;
18
+ handleClosePoll?: () => void;
19
+ poll?: Amity.Poll | null;
20
+ isPollClosed?: boolean;
21
+ hidePostTarget?: boolean;
22
+ isFlaggedByMe?: boolean;
23
+ readonly?: boolean;
24
+ post?: Amity.Post;
25
+ user?: Amity.User | null;
26
+ userRoles?: string[];
27
+ loading?: boolean;
28
+ avatarFileUrl?: string;
59
29
  };
30
+ type PostRendererConfigType = Record<ValueOf<typeof PostContentType> | string, (props: PostRendererProps) => ReactNode>;
60
31
 
61
- declare enum Mode {
62
- CREATE = "create",
63
- EDIT = "edit"
64
- }
65
- interface AmityPostComposerEditOptions {
66
- mode: Mode.EDIT;
67
- post: Amity.Post;
68
- }
69
- interface AmityPostComposerCreateOptions {
70
- mode: Mode.CREATE;
71
- targetId: string | null;
72
- targetType: 'community' | 'user';
73
- community?: Amity.Community;
74
- }
75
- type PostComposerPageProps = AmityPostComposerCreateOptions | AmityPostComposerEditOptions;
76
- declare function PostComposerPage(props: PostComposerPageProps): React.JSX.Element;
77
-
78
- interface PageBehavior {
79
- AmityStoryViewPageBehavior?: {
80
- onCloseAction?(): void;
81
- hyperLinkAction?(context: Record<string, unknown>): void;
82
- };
83
- AmityDraftStoryPageBehavior?: {
84
- onCloseAction?(): void;
85
- };
86
- onClickHyperLink?(): void;
87
- AmitySocialHomePageBehavior?: Record<string, unknown>;
88
- AmityGlobalFeedComponentBehavior?: {
89
- goToPostDetailPage?: (context: {
90
- postId: string;
91
- }) => void;
92
- goToViewStoryPage?: (context: {
93
- targetId: string;
94
- targetType: Amity.StoryTargetType;
95
- storyType: 'communityFeed' | 'globalFeed';
96
- targetIds?: string[];
97
- }) => void;
98
- };
99
- AmityPostDetailPageBehavior?: Record<string, unknown>;
100
- AmityPostContentComponentBehavior?: {
101
- goToCommunityProfilePage?: (context: {
102
- communityId: string;
103
- }) => void;
104
- goToUserProfilePage?: (context: {
105
- userId: string;
106
- }) => void;
107
- goToPostComposerPage?: (context: {
108
- mode: Mode.EDIT;
109
- post: Amity.Post;
110
- }) => void;
111
- };
112
- AmitySocialGlobalSearchPageBehavior?: Record<string, unknown>;
113
- AmityCommunitySearchResultComponentBehavior?: {
114
- goToCommunityProfilePage?: (context: {
115
- communityId: string;
116
- }) => void;
117
- };
118
- AmityCreatePostMenuComponentBehavior?: {
119
- goToSelectPostTargetPage?(): void;
120
- goToStoryTargetSelectionPage?(): void;
121
- };
122
- AmityPostTargetSelectionPage?: {
123
- goToPostComposerPage?: (context: {
124
- mode: Mode.CREATE;
125
- targetId: string | null;
126
- targetType: 'community' | 'user';
127
- community?: Amity.Community;
128
- }) => void;
129
- };
130
- AmityStoryTargetSelectionPage?: {
131
- goToStoryCreationPage?(context: {
132
- targetId: string | null;
133
- targetType: Amity.StoryTargetType;
134
- mediaType: {
135
- type: 'image';
136
- url: string;
137
- } | {
138
- type: 'video';
139
- url: string;
140
- };
141
- storyType: 'communityFeed' | 'globalFeed';
142
- }): void;
143
- };
144
- AmityPostComposerPageBehavior?: {
145
- goToSocialHomePage?(): void;
146
- };
147
- }
148
-
149
- type AmityUIKitConfig = Config;
150
- interface AmityUIKitProviderProps {
32
+ interface UiKitProviderProps {
151
33
  apiKey: string;
152
34
  apiRegion: string;
153
35
  apiEndpoint?: {
@@ -155,11 +37,11 @@ interface AmityUIKitProviderProps {
155
37
  mqtt?: string;
156
38
  };
157
39
  userId: string;
158
- displayName: string;
159
- postRendererConfig?: any;
40
+ displayName?: string;
41
+ customComponents?: CustomComponentType;
42
+ postRendererConfig?: PostRendererConfigType;
160
43
  theme?: Record<string, unknown>;
161
44
  children?: React.ReactNode;
162
- socialCommunityCreationButtonVisible?: boolean;
163
45
  actionHandlers?: {
164
46
  onChangePage?: (data: {
165
47
  type: string;
@@ -174,15 +56,16 @@ interface AmityUIKitProviderProps {
174
56
  }) => void;
175
57
  onEditUser?: (userId: string) => void;
176
58
  onMessageUser?: (userId: string) => void;
59
+ onBack?: () => void;
177
60
  };
178
- pageBehavior?: PageBehavior;
61
+ socialCommunityCreationButtonVisible?: boolean;
179
62
  onConnectionStatusChange?: (state: Amity.SessionStates) => void;
180
63
  onConnected?: () => void;
181
64
  onDisconnected?: () => void;
65
+ pageBehavior?: Record<string, unknown>;
182
66
  getAuthToken?: () => Promise<string>;
183
- configs?: AmityUIKitConfig;
184
67
  }
185
- declare const AmityUIKitProvider: React.FC<AmityUIKitProviderProps>;
68
+ declare const UiKitProvider: ({ apiKey, apiRegion, apiEndpoint, userId, displayName, customComponents, postRendererConfig, theme, children, socialCommunityCreationButtonVisible, actionHandlers, onConnectionStatusChange, onDisconnected, getAuthToken, }: UiKitProviderProps) => React.JSX.Element;
186
69
 
187
70
  interface FeedProps {
188
71
  className?: string;
@@ -195,7 +78,7 @@ interface FeedProps {
195
78
  readonly?: boolean;
196
79
  isHiddenProfile?: boolean;
197
80
  }
198
- declare const _default$2: React.MemoExoticComponent<(props: FeedProps) => React.JSX.Element>;
81
+ declare const _default$3: (props: FeedProps) => React.JSX.Element;
199
82
 
200
83
  declare const Community: () => React.JSX.Element;
201
84
 
@@ -219,6 +102,15 @@ interface ExplorePageProps {
219
102
  }
220
103
  declare const ExplorePage: ({ isOpen, toggleOpen, hideSideMenu }: ExplorePageProps) => React.JSX.Element;
221
104
 
105
+ interface PostProps {
106
+ postId: string;
107
+ className?: string;
108
+ hidePostTarget?: boolean;
109
+ readonly?: boolean;
110
+ onDeleted?: (postId: string) => void;
111
+ }
112
+ declare const _default$2: React.MemoExoticComponent<(props: PostProps) => React.JSX.Element>;
113
+
222
114
  declare const addChatMembers: (channelId: string, userIds: string[]) => Promise<boolean>;
223
115
 
224
116
  declare const removeChatMembers: (channelId: string, userIds: string[]) => Promise<boolean>;
@@ -233,8 +125,10 @@ declare const enum PageTypes {
233
125
  CommunityFeed = "communityfeed",
234
126
  CommunityEdit = "communityedit",
235
127
  UserEdit = "useredit",
128
+ PostDetail = "postdetail",
236
129
  ViewStory = "viewstory",
237
- DraftPage = "draftpage"
130
+ DraftPage = "draftpage",
131
+ MyCommunities = "mycommunities"
238
132
  }
239
133
 
240
134
  type AmityStoryMediaType$1 = {
@@ -284,6 +178,14 @@ type Page = {
284
178
  targetId: string;
285
179
  targetType: Amity.StoryTargetType;
286
180
  storyType: 'communityFeed' | 'globalFeed';
181
+ } | {
182
+ type: PageTypes.MyCommunities;
183
+ communityId?: string;
184
+ } | {
185
+ type: PageTypes.PostDetail;
186
+ communityId?: string;
187
+ targetId?: string;
188
+ targetType?: string;
287
189
  };
288
190
  type ContextValue = {
289
191
  page: Page;
@@ -304,6 +206,7 @@ type ContextValue = {
304
206
  okText: ReactNode;
305
207
  onOk?: () => void;
306
208
  } | null | undefined) => void;
209
+ onClickNoti: (targetId: string, targetType: string) => void;
307
210
  };
308
211
  declare const useNavigation: () => ContextValue;
309
212
 
@@ -409,7 +312,15 @@ declare class AmityUIKitManager {
409
312
  * @param onConnected - The callback function to be called when connected.
410
313
  * @param onDisconnected - The callback function to be called when disconnected.
411
314
  */
412
- static registerDevice(userId: string, displayName: string, sessionHandler: SessionHandler, authToken?: string, onConnectionStatusChange?: (state: Amity.SessionStates) => void, onConnected?: () => void, onDisconnected?: () => void): Promise<void>;
315
+ static registerDevice({ userId, displayName, sessionHandler, authToken, onConnectionStatusChange, onConnected, onDisconnected, }: {
316
+ userId: string;
317
+ displayName?: string;
318
+ sessionHandler: SessionHandler;
319
+ authToken?: string;
320
+ onConnectionStatusChange?: (state: Amity.SessionStates) => void;
321
+ onConnected?: () => void;
322
+ onDisconnected?: () => void;
323
+ }): Promise<void>;
413
324
  /**
414
325
  * Sets the AmityClient instance to be used by the AmityUIKitManager.
415
326
  * This method is useful when sharing the AmityClient instance between different parts of the application.
@@ -439,135 +350,6 @@ declare class AmityUIKitManager {
439
350
  isClientConnected(): boolean;
440
351
  }
441
352
 
442
- interface CommentTrayProps {
443
- referenceType: Amity.CommentReferenceType;
444
- referenceId: string;
445
- community: Amity.Community;
446
- shouldAllowInteraction: boolean;
447
- shouldAllowCreation?: boolean;
448
- pageId?: string;
449
- }
450
- declare const CommentTray: ({ pageId, referenceType, referenceId, community, shouldAllowInteraction, shouldAllowCreation, }: CommentTrayProps) => React.JSX.Element;
451
-
452
- interface ReactionListProps$1 {
453
- pageId: string;
454
- referenceId: string;
455
- referenceType: Amity.ReactableType;
456
- }
457
- declare const ReactionList: ({ pageId, referenceId, referenceType }: ReactionListProps$1) => React.JSX.Element | null;
458
-
459
- interface ReactionListProps {
460
- referenceId: string;
461
- referenceType: Amity.ReactableType;
462
- }
463
-
464
- type StoryTabProps = ({
465
- type: 'communityFeed';
466
- communityId: string;
467
- } | {
468
- type: 'globalFeed';
469
- }) & {
470
- pageId?: string;
471
- };
472
- declare const StoryTab: React.FC<StoryTabProps>;
473
-
474
- interface CreatePostMenuProps {
475
- pageId: string;
476
- }
477
- declare function CreatePostMenu({ pageId }: CreatePostMenuProps): React.JSX.Element;
478
-
479
- interface MediaAttachmentProps {
480
- pageId: string;
481
- uploadLoading?: boolean;
482
- isVisibleCamera: boolean;
483
- isVisibleImage: boolean;
484
- isVisibleVideo: boolean;
485
- onVideoFileChange?: (files: File[]) => void;
486
- onImageFileChange?: (files: File[]) => void;
487
- }
488
- declare function MediaAttachment({ pageId, isVisibleCamera, isVisibleImage, isVisibleVideo, onVideoFileChange, onImageFileChange, }: MediaAttachmentProps): React.JSX.Element | null;
489
-
490
- interface DetailedMediaAttachmentProps {
491
- pageId: string;
492
- isVisibleCamera: boolean;
493
- isVisibleImage: boolean;
494
- isVisibleVideo: boolean;
495
- onVideoFileChange?: (files: File[]) => void;
496
- onImageFileChange?: (files: File[]) => void;
497
- }
498
- declare function DetailedMediaAttachment({ pageId, isVisibleCamera, isVisibleImage, isVisibleVideo, onVideoFileChange, onImageFileChange, }: DetailedMediaAttachmentProps): React.JSX.Element | null;
499
-
500
- interface UserSearchResultProps {
501
- pageId?: string;
502
- userCollection: Amity.User[];
503
- isLoading: boolean;
504
- onLoadMore: () => void;
505
- }
506
- declare const UserSearchResult: ({ pageId, userCollection, isLoading, onLoadMore, }: UserSearchResultProps) => React.JSX.Element;
507
-
508
- interface CommunitySearchResultProps {
509
- pageId?: string;
510
- communityCollection: Amity.Community[];
511
- isLoading: boolean;
512
- onLoadMore: () => void;
513
- }
514
- declare const CommunitySearchResult: ({ pageId, communityCollection, isLoading, onLoadMore, }: CommunitySearchResultProps) => React.JSX.Element;
515
-
516
- interface TopSearchBarProps {
517
- pageId?: string;
518
- search: (keyword: string) => void;
519
- }
520
- declare function TopSearchBar({ pageId, search }: TopSearchBarProps): React.JSX.Element | null;
521
-
522
- interface PostContentProps {
523
- pageId?: string;
524
- post: Amity.Post;
525
- type: 'feed' | 'detail';
526
- drawerRef?: React.RefObject<HTMLDivElement>;
527
- onClick?: () => void;
528
- onPostDeleted?: (post: Amity.Post) => void;
529
- }
530
- declare const PostContent: ({ pageId, post: initialPost, type, drawerRef, onClick, onPostDeleted, }: PostContentProps) => React.JSX.Element;
531
-
532
- interface MyCommunitiesProps {
533
- pageId?: string;
534
- }
535
- declare const MyCommunities: ({ pageId }: MyCommunitiesProps) => React.JSX.Element;
536
-
537
- interface GlobalFeedProps {
538
- pageId?: string;
539
- componentId?: string;
540
- items: Array<Amity.Post | Amity.Ad>;
541
- isLoading: boolean;
542
- onFeedReachBottom: () => void;
543
- onPostDeleted?: (post: Amity.Post) => void;
544
- }
545
- declare const GlobalFeed: ({ pageId, componentId, items, isLoading, onFeedReachBottom, onPostDeleted, }: GlobalFeedProps) => React.JSX.Element;
546
-
547
- interface EmptyNewsfeedProps {
548
- pageId?: string;
549
- }
550
- declare function EmptyNewsfeed({ pageId }: EmptyNewsfeedProps): React.JSX.Element | null;
551
-
552
- interface NewsfeedProps {
553
- pageId?: string;
554
- }
555
- declare const Newsfeed: ({ pageId }: NewsfeedProps) => React.JSX.Element;
556
-
557
- declare enum HomePageTab {
558
- Newsfeed = "Newsfeed",
559
- Explore = "Explore",
560
- MyCommunities = "My communities"
561
- }
562
- declare function SocialHomePage(): React.JSX.Element;
563
-
564
- interface TopNavigationProps {
565
- pageId?: string;
566
- selectedTab?: HomePageTab;
567
- onClickPostCreationButton?: () => void;
568
- }
569
- declare function TopNavigation({ pageId, selectedTab, onClickPostCreationButton, }: TopNavigationProps): React.JSX.Element | null;
570
-
571
353
  interface ChatHeaderProps {
572
354
  channel: Amity.Channel | null;
573
355
  pageId?: string;
@@ -624,6 +406,18 @@ type MessageActionType = {
624
406
  onMention?: () => void;
625
407
  };
626
408
 
409
+ interface ReactionListProps$1 {
410
+ pageId: string;
411
+ referenceId: string;
412
+ referenceType: Amity.ReactableType;
413
+ }
414
+ declare const ReactionList: ({ pageId, referenceId, referenceType }: ReactionListProps$1) => React.JSX.Element | null;
415
+
416
+ interface ReactionListProps {
417
+ referenceId: string;
418
+ referenceType: Amity.ReactableType;
419
+ }
420
+
627
421
  interface LiveChatProps {
628
422
  channelId: Amity.Channel['channelId'];
629
423
  }
@@ -684,15 +478,184 @@ declare const ViewStoryPage: React.FC<AmityViewStoryPageProps>;
684
478
 
685
479
  declare function StoryTargetSelectionPage(): React.JSX.Element;
686
480
 
481
+ declare enum HomePageTab {
482
+ Newsfeed = "Newsfeed",
483
+ Explore = "Explore",
484
+ MyCommunities = "My communities"
485
+ }
486
+ declare function SocialHomePage(): React.JSX.Element;
487
+
488
+ declare enum Mode {
489
+ CREATE = "create",
490
+ EDIT = "edit"
491
+ }
492
+ interface AmityPostComposerEditOptions {
493
+ mode: Mode.EDIT;
494
+ post: Amity.Post;
495
+ }
496
+ interface AmityPostComposerCreateOptions {
497
+ mode: Mode.CREATE;
498
+ targetId: string | null;
499
+ targetType: 'community' | 'user';
500
+ community?: Amity.Community;
501
+ }
502
+ type PostComposerPageProps = AmityPostComposerCreateOptions | AmityPostComposerEditOptions;
503
+ declare function PostComposerPage(props: PostComposerPageProps): React.JSX.Element;
504
+
687
505
  declare function SelectPostTargetPage(): React.JSX.Element;
688
506
 
689
507
  declare function MyCommunitiesSearchPage(): React.JSX.Element;
690
508
 
691
509
  declare function SocialGlobalSearchPage(): React.JSX.Element;
692
510
 
511
+ declare enum AmityPostContentComponentStyle {
512
+ FEED = "feed",
513
+ DETAIL = "detail"
514
+ }
515
+ declare enum AmityPostCategory {
516
+ GENERAL = "general",
517
+ ANNOUNCEMENT = "announcement",
518
+ PIN = "pin"
519
+ }
520
+ interface PostContentProps {
521
+ post: Amity.Post;
522
+ onClick?: () => void;
523
+ onPostDeleted?: (post: Amity.Post) => void;
524
+ style: AmityPostContentComponentStyle;
525
+ category: AmityPostCategory;
526
+ hideMenu?: boolean;
527
+ hideTarget?: boolean;
528
+ pageId?: string;
529
+ }
530
+ declare const PostContent: ({ pageId, post: initialPost, onClick, onPostDeleted, category, hideMenu, hideTarget, style, }: PostContentProps) => React.JSX.Element;
531
+
693
532
  interface PostDetailPageProps {
694
533
  id: string;
534
+ hideTarget?: boolean;
535
+ category?: AmityPostCategory;
536
+ }
537
+ declare function PostDetailPage({ id, hideTarget, category }: PostDetailPageProps): React.JSX.Element;
538
+
539
+ interface CommunityProfileProps {
540
+ communityId: string;
541
+ }
542
+ declare const CommunityProfilePage: React.FC<CommunityProfileProps>;
543
+
544
+ interface CommentTrayProps {
545
+ referenceType: Amity.CommentReferenceType;
546
+ referenceId: string;
547
+ community: Amity.Community;
548
+ shouldAllowInteraction: boolean;
549
+ shouldAllowCreation?: boolean;
550
+ pageId?: string;
551
+ }
552
+ declare const CommentTray: ({ pageId, referenceType, referenceId, community, shouldAllowInteraction, shouldAllowCreation, }: CommentTrayProps) => React.JSX.Element;
553
+
554
+ type StoryTabProps = ({
555
+ type: 'communityFeed';
556
+ communityId: string;
557
+ } | {
558
+ type: 'globalFeed';
559
+ }) & {
560
+ pageId?: string;
561
+ };
562
+ declare const StoryTab: React.FC<StoryTabProps>;
563
+
564
+ interface CreatePostMenuProps {
565
+ pageId: string;
566
+ }
567
+ declare function CreatePostMenu({ pageId }: CreatePostMenuProps): React.JSX.Element;
568
+
569
+ interface MediaAttachmentProps {
570
+ pageId: string;
571
+ uploadLoading?: boolean;
572
+ isVisibleCamera: boolean;
573
+ isVisibleImage: boolean;
574
+ isVisibleVideo: boolean;
575
+ onVideoFileChange?: (files: File[]) => void;
576
+ onImageFileChange?: (files: File[]) => void;
577
+ }
578
+ declare function MediaAttachment({ pageId, isVisibleCamera, isVisibleImage, isVisibleVideo, onVideoFileChange, onImageFileChange, }: MediaAttachmentProps): React.JSX.Element | null;
579
+
580
+ interface DetailedMediaAttachmentProps {
581
+ pageId: string;
582
+ isVisibleCamera: boolean;
583
+ isVisibleImage: boolean;
584
+ isVisibleVideo: boolean;
585
+ onVideoFileChange?: (files: File[]) => void;
586
+ onImageFileChange?: (files: File[]) => void;
587
+ }
588
+ declare function DetailedMediaAttachment({ pageId, isVisibleCamera, isVisibleImage, isVisibleVideo, onVideoFileChange, onImageFileChange, }: DetailedMediaAttachmentProps): React.JSX.Element | null;
589
+
590
+ interface UserSearchResultProps {
591
+ pageId?: string;
592
+ userCollection: Amity.User[];
593
+ isLoading: boolean;
594
+ onLoadMore: () => void;
595
+ }
596
+ declare const UserSearchResult: ({ pageId, userCollection, isLoading, onLoadMore, }: UserSearchResultProps) => React.JSX.Element;
597
+
598
+ interface CommunitySearchResultProps {
599
+ pageId?: string;
600
+ communityCollection: Amity.Community[];
601
+ isLoading: boolean;
602
+ onLoadMore: () => void;
603
+ }
604
+ declare const CommunitySearchResult: ({ pageId, communityCollection, isLoading, onLoadMore, }: CommunitySearchResultProps) => React.JSX.Element;
605
+
606
+ interface TopSearchBarProps {
607
+ pageId?: string;
608
+ search: (keyword: string) => void;
609
+ }
610
+ declare function TopSearchBar({ pageId, search }: TopSearchBarProps): React.JSX.Element | null;
611
+
612
+ interface MyCommunitiesProps {
613
+ pageId?: string;
614
+ }
615
+ declare const MyCommunities: ({ pageId }: MyCommunitiesProps) => React.JSX.Element;
616
+
617
+ interface GlobalFeedProps {
618
+ pageId?: string;
619
+ componentId?: string;
620
+ items: Array<Amity.Post | Amity.Ad>;
621
+ isLoading: boolean;
622
+ onFeedReachBottom: () => void;
623
+ onPostDeleted?: (post: Amity.Post) => void;
624
+ }
625
+ declare const GlobalFeed: ({ pageId, componentId, items, isLoading, onFeedReachBottom, onPostDeleted, }: GlobalFeedProps) => React.JSX.Element;
626
+
627
+ interface EmptyNewsfeedProps {
628
+ pageId?: string;
629
+ }
630
+ declare function EmptyNewsfeed({ pageId }: EmptyNewsfeedProps): React.JSX.Element | null;
631
+
632
+ interface NewsfeedProps {
633
+ pageId?: string;
634
+ }
635
+ declare const Newsfeed: ({ pageId }: NewsfeedProps) => React.JSX.Element;
636
+
637
+ interface TopNavigationProps {
638
+ pageId?: string;
639
+ selectedTab?: HomePageTab;
640
+ onClickPostCreationButton?: () => void;
641
+ }
642
+ declare function TopNavigation({ pageId, selectedTab, onClickPostCreationButton, }: TopNavigationProps): React.JSX.Element | null;
643
+
644
+ interface CommunityProfileHeaderProps {
645
+ pageId?: string;
646
+ community: Amity.Community;
647
+ }
648
+ declare const CommunityHeader: React.FC<CommunityProfileHeaderProps>;
649
+
650
+ interface CommunityFeedProps {
651
+ communityId: string;
652
+ pageId?: string;
653
+ }
654
+ declare const CommunityFeed: ({ pageId, communityId }: CommunityFeedProps) => React.JSX.Element | null;
655
+
656
+ interface CommunityPinnedPostProps {
657
+ communityId?: string;
695
658
  }
696
- declare function PostDetailPage({ id }: PostDetailPageProps): React.JSX.Element;
659
+ declare const CommunityPinnedPost: ({ communityId }: CommunityPinnedPostProps) => React.JSX.Element;
697
660
 
698
- export { _default$1 as AmityAvatar, CommentTray as AmityCommentTrayComponent, CommunitySearchResult as AmityCommunitySearchResultComponent, CreatePostMenu as AmityCreatePostMenuComponent, DetailedMediaAttachment as AmityDetailedMediaAttachmentComponent, AmityDraftStoryPage, EmptyNewsfeed as AmityEmptyNewsFeedComponent, CommentText as AmityExpandableText, GlobalFeed as AmityGlobalFeedComponent, ChatHeader as AmityLiveChatHeader, MessageComposer as AmityLiveChatMessageComposeBar, MessageList as AmityLiveChatMessageList, MessageQuickReaction as AmityLiveChatMessageQuickReaction, MessageReactionPicker as AmityLiveChatMessageReactionPicker, MessageReactionPreview as AmityLiveChatMessageReactionPreview, LiveChat as AmityLiveChatPage, MediaAttachment as AmityMediaAttachmentComponent, type MessageActionType as AmityMessageActionType, MyCommunities as AmityMyCommunitiesComponent, MyCommunitiesSearchPage as AmityMyCommunitiesSearchPage, Newsfeed as AmityNewsFeedComponent, PostComposerPage as AmityPostComposerPage, PostContainer as AmityPostContainer, PostContent as AmityPostContentComponent, PostDetailPage as AmityPostDetailPage, _default as AmityPostEngagementBar, SelectPostTargetPage as AmityPostTargetSelectionPage, ReactionList as AmityReactionListComponent, type ReactionListProps as AmityReactionListProps, SocialGlobalSearchPage as AmitySocialGlobalSearchPage, SocialHomePage as AmitySocialHomePage, HomePageTab as AmitySocialHomePageTab, TopNavigation as AmitySocialHomeTopNavigationComponent, StoryPreview as AmityStoryPreview, StoryPreviewThumbnail as AmityStoryPreviewThumbnail, StoryTab as AmityStoryTabComponent, StoryTargetSelectionPage as AmityStoryTargetSelectionPage, TopSearchBar as AmityTopSearchBarComponent, AmityUIKitManager, ChatApplication as AmityUiKitChat, _default$2 as AmityUiKitFeed, AmityUIKitProvider as AmityUiKitProvider, Community as AmityUiKitSocial, UserSearchResult as AmityUserSearchResultComponent, ViewStoryPage as AmityViewStoryPage, ExplorePage, addChatMembers as amityAddChatMembers, removeChatMembers as amityRemoveChatMembers, useNavigation as useAmityNavigation, useSDK as useAmitySDK, useUser as useAmityUser };
661
+ export { _default$1 as AmityAvatar, CommentTray as AmityCommentTrayComponent, CommunityFeed as AmityCommunityFeedComponent, CommunityHeader as AmityCommunityHeaderComponent, CommunityPinnedPost as AmityCommunityPinnedPostComponent, CommunityProfilePage as AmityCommunityProfilePage, CommunitySearchResult as AmityCommunitySearchResultComponent, CreatePostMenu as AmityCreatePostMenuComponent, DetailedMediaAttachment as AmityDetailedMediaAttachmentComponent, AmityDraftStoryPage, EmptyNewsfeed as AmityEmptyNewsFeedComponent, CommentText as AmityExpandableText, GlobalFeed as AmityGlobalFeedComponent, ChatHeader as AmityLiveChatHeader, MessageComposer as AmityLiveChatMessageComposeBar, MessageList as AmityLiveChatMessageList, MessageQuickReaction as AmityLiveChatMessageQuickReaction, MessageReactionPicker as AmityLiveChatMessageReactionPicker, MessageReactionPreview as AmityLiveChatMessageReactionPreview, LiveChat as AmityLiveChatPage, MediaAttachment as AmityMediaAttachmentComponent, type MessageActionType as AmityMessageActionType, MyCommunities as AmityMyCommunitiesComponent, MyCommunitiesSearchPage as AmityMyCommunitiesSearchPage, Newsfeed as AmityNewsFeedComponent, PostComposerPage as AmityPostComposerPage, PostContainer as AmityPostContainer, PostContent as AmityPostContentComponent, _default$2 as AmityPostDetail, PostDetailPage as AmityPostDetailPage, _default as AmityPostEngagementBar, SelectPostTargetPage as AmityPostTargetSelectionPage, ReactionList as AmityReactionListComponent, type ReactionListProps as AmityReactionListProps, SocialGlobalSearchPage as AmitySocialGlobalSearchPage, SocialHomePage as AmitySocialHomePage, HomePageTab as AmitySocialHomePageTab, TopNavigation as AmitySocialHomeTopNavigationComponent, StoryPreview as AmityStoryPreview, StoryPreviewThumbnail as AmityStoryPreviewThumbnail, StoryTab as AmityStoryTabComponent, StoryTargetSelectionPage as AmityStoryTargetSelectionPage, TopSearchBar as AmityTopSearchBarComponent, AmityUIKitManager, ChatApplication as AmityUiKitChat, _default$3 as AmityUiKitFeed, UiKitProvider as AmityUiKitProvider, Community as AmityUiKitSocial, UserSearchResult as AmityUserSearchResultComponent, ViewStoryPage as AmityViewStoryPage, ExplorePage, addChatMembers as amityAddChatMembers, removeChatMembers as amityRemoveChatMembers, useNavigation as useAmityNavigation, useSDK as useAmitySDK, useUser as useAmityUser };