@amityco/ulta-ui-kit 1.0.0-beta.9 → 1.1.1-beta01

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 (74) hide show
  1. package/dist/esm/index.css +1 -1
  2. package/dist/esm/index.js +1042 -945
  3. package/dist/index.css +1 -1
  4. package/dist/index.d.mts +20 -6
  5. package/dist/index.d.ts +20 -6
  6. package/dist/index.js +1118 -1021
  7. package/dist/metafile-cjs.json +1 -1
  8. package/dist/metafile-esm.json +1 -1
  9. package/package.json +6 -5
  10. package/readme.md +7 -1
  11. package/dist/CircularStd-Black-EL754VZN.eot +0 -0
  12. package/dist/CircularStd-Black-M6FYDJME.woff2 +0 -0
  13. package/dist/CircularStd-Black-PNLLRW5C.woff +0 -0
  14. package/dist/CircularStd-Black-YMQQKCA3.ttf +0 -0
  15. package/dist/CircularStd-BlackItalic-BWOJUVN3.ttf +0 -0
  16. package/dist/CircularStd-BlackItalic-G62XUQUP.woff2 +0 -0
  17. package/dist/CircularStd-BlackItalic-MBNBDZUU.eot +0 -0
  18. package/dist/CircularStd-BlackItalic-NVQVXG5L.woff +0 -0
  19. package/dist/CircularStd-Bold-3YZD2D54.woff +0 -0
  20. package/dist/CircularStd-Bold-OBIX2X7G.woff2 +0 -0
  21. package/dist/CircularStd-Bold-QHAMEMSL.eot +0 -0
  22. package/dist/CircularStd-Bold-UGQNNLCJ.ttf +0 -0
  23. package/dist/CircularStd-BoldItalic-53VUNMNP.ttf +0 -0
  24. package/dist/CircularStd-BoldItalic-7MYBAB7V.woff2 +0 -0
  25. package/dist/CircularStd-BoldItalic-A6ZIS4PA.eot +0 -0
  26. package/dist/CircularStd-BoldItalic-S4EXYNAA.woff +0 -0
  27. package/dist/CircularStd-Book-JPHT3EYH.eot +0 -0
  28. package/dist/CircularStd-Book-QH24MWNT.woff2 +0 -0
  29. package/dist/CircularStd-Book-WO57ECZG.woff +0 -0
  30. package/dist/CircularStd-Book-X7C7G6T7.ttf +0 -0
  31. package/dist/CircularStd-BookItalic-FKVXO6VC.woff +0 -0
  32. package/dist/CircularStd-BookItalic-JMRK2M3F.ttf +0 -0
  33. package/dist/CircularStd-BookItalic-LYDC7HJ5.eot +0 -0
  34. package/dist/CircularStd-BookItalic-N7R5KSUJ.woff2 +0 -0
  35. package/dist/CircularStd-Medium-27RJ4G7E.woff +0 -0
  36. package/dist/CircularStd-Medium-CYDQT5MI.eot +0 -0
  37. package/dist/CircularStd-Medium-MVVUHW3Z.woff2 +0 -0
  38. package/dist/CircularStd-Medium-TPGRKUIA.ttf +0 -0
  39. package/dist/CircularStd-MediumItalic-6VIHMKHS.woff +0 -0
  40. package/dist/CircularStd-MediumItalic-MGFTUSP5.woff2 +0 -0
  41. package/dist/CircularStd-MediumItalic-PWSPA5NY.ttf +0 -0
  42. package/dist/CircularStd-MediumItalic-QZO45QYZ.eot +0 -0
  43. package/dist/esm/CircularStd-Black-EL754VZN.eot +0 -0
  44. package/dist/esm/CircularStd-Black-M6FYDJME.woff2 +0 -0
  45. package/dist/esm/CircularStd-Black-PNLLRW5C.woff +0 -0
  46. package/dist/esm/CircularStd-Black-YMQQKCA3.ttf +0 -0
  47. package/dist/esm/CircularStd-BlackItalic-BWOJUVN3.ttf +0 -0
  48. package/dist/esm/CircularStd-BlackItalic-G62XUQUP.woff2 +0 -0
  49. package/dist/esm/CircularStd-BlackItalic-MBNBDZUU.eot +0 -0
  50. package/dist/esm/CircularStd-BlackItalic-NVQVXG5L.woff +0 -0
  51. package/dist/esm/CircularStd-Bold-3YZD2D54.woff +0 -0
  52. package/dist/esm/CircularStd-Bold-OBIX2X7G.woff2 +0 -0
  53. package/dist/esm/CircularStd-Bold-QHAMEMSL.eot +0 -0
  54. package/dist/esm/CircularStd-Bold-UGQNNLCJ.ttf +0 -0
  55. package/dist/esm/CircularStd-BoldItalic-53VUNMNP.ttf +0 -0
  56. package/dist/esm/CircularStd-BoldItalic-7MYBAB7V.woff2 +0 -0
  57. package/dist/esm/CircularStd-BoldItalic-A6ZIS4PA.eot +0 -0
  58. package/dist/esm/CircularStd-BoldItalic-S4EXYNAA.woff +0 -0
  59. package/dist/esm/CircularStd-Book-JPHT3EYH.eot +0 -0
  60. package/dist/esm/CircularStd-Book-QH24MWNT.woff2 +0 -0
  61. package/dist/esm/CircularStd-Book-WO57ECZG.woff +0 -0
  62. package/dist/esm/CircularStd-Book-X7C7G6T7.ttf +0 -0
  63. package/dist/esm/CircularStd-BookItalic-FKVXO6VC.woff +0 -0
  64. package/dist/esm/CircularStd-BookItalic-JMRK2M3F.ttf +0 -0
  65. package/dist/esm/CircularStd-BookItalic-LYDC7HJ5.eot +0 -0
  66. package/dist/esm/CircularStd-BookItalic-N7R5KSUJ.woff2 +0 -0
  67. package/dist/esm/CircularStd-Medium-27RJ4G7E.woff +0 -0
  68. package/dist/esm/CircularStd-Medium-CYDQT5MI.eot +0 -0
  69. package/dist/esm/CircularStd-Medium-MVVUHW3Z.woff2 +0 -0
  70. package/dist/esm/CircularStd-Medium-TPGRKUIA.ttf +0 -0
  71. package/dist/esm/CircularStd-MediumItalic-6VIHMKHS.woff +0 -0
  72. package/dist/esm/CircularStd-MediumItalic-MGFTUSP5.woff2 +0 -0
  73. package/dist/esm/CircularStd-MediumItalic-PWSPA5NY.ttf +0 -0
  74. package/dist/esm/CircularStd-MediumItalic-QZO45QYZ.eot +0 -0
package/dist/index.d.mts CHANGED
@@ -16,6 +16,7 @@ type PostRendererProps = {
16
16
  handleApprovePost?: () => void;
17
17
  handleDeclinePost?: () => void;
18
18
  handleClosePoll?: () => void;
19
+ handleUpdatePost?: (post: Amity.Post) => void;
19
20
  poll?: Amity.Poll | null;
20
21
  isPollClosed?: boolean;
21
22
  hidePostTarget?: boolean;
@@ -29,6 +30,14 @@ type PostRendererProps = {
29
30
  };
30
31
  type PostRendererConfigType = Record<ValueOf<typeof PostContentType> | string, (props: PostRendererProps) => ReactNode>;
31
32
 
33
+ interface UltaConfigContextProps {
34
+ newsCommunityId: string;
35
+ faqCommunityId: string;
36
+ defaultTab?: 'explore' | 'newsfeed';
37
+ termsAndConditionsUrl: string;
38
+ privacyAndPolicyUrl: string;
39
+ }
40
+
32
41
  interface UiKitProviderProps {
33
42
  apiKey: string;
34
43
  apiRegion: string;
@@ -64,8 +73,9 @@ interface UiKitProviderProps {
64
73
  onDisconnected?: () => void;
65
74
  pageBehavior?: Record<string, unknown>;
66
75
  getAuthToken?: () => Promise<string>;
76
+ ultaConfig: UltaConfigContextProps;
67
77
  }
68
- declare const UiKitProvider: ({ apiKey, apiRegion, apiEndpoint, userId, displayName, customComponents, postRendererConfig, theme, children, socialCommunityCreationButtonVisible, actionHandlers, onConnectionStatusChange, onDisconnected, getAuthToken, }: UiKitProviderProps) => React.JSX.Element;
78
+ declare const UiKitProvider: ({ apiKey, apiRegion, apiEndpoint, userId, displayName, customComponents, postRendererConfig, theme, children, socialCommunityCreationButtonVisible, actionHandlers, onConnectionStatusChange, onDisconnected, getAuthToken, ultaConfig, }: UiKitProviderProps) => React.JSX.Element;
69
79
 
70
80
  interface FeedProps {
71
81
  className?: string;
@@ -103,11 +113,12 @@ interface ExplorePageProps {
103
113
  declare const ExplorePage: ({ isOpen, toggleOpen, hideSideMenu }: ExplorePageProps) => React.JSX.Element;
104
114
 
105
115
  interface PostProps {
106
- postId: string;
116
+ post: Amity.Post;
107
117
  className?: string;
108
118
  hidePostTarget?: boolean;
109
119
  readonly?: boolean;
110
120
  onDeleted?: (postId: string) => void;
121
+ onUpdated?: (post: Amity.Post) => void;
111
122
  }
112
123
  declare const _default$2: React.MemoExoticComponent<(props: PostProps) => React.JSX.Element>;
113
124
 
@@ -188,7 +199,8 @@ type Page = {
188
199
  targetType?: string;
189
200
  };
190
201
  type ContextValue = {
191
- page: Page;
202
+ page: Page | null;
203
+ pages: Page[];
192
204
  onChangePage: (type: string) => void;
193
205
  onClickCategory: (categoryId: string) => void;
194
206
  onClickCommunity: (communityId: string) => void;
@@ -237,15 +249,16 @@ declare const PostContainer: styled_components_dist_types.IStyledComponentBase<"
237
249
  }) => React.JSX.Element, keyof React.Component<any, {}, any>>;
238
250
 
239
251
  type Mentioned = {
240
- userId: string;
252
+ userId?: string;
241
253
  length: number;
242
254
  index: number;
243
255
  type: string;
244
256
  };
245
257
 
246
258
  interface EngagementBarProps {
247
- postId: string;
259
+ post: Amity.Post;
248
260
  readonly?: boolean;
261
+ isClientCommunity?: boolean;
249
262
  }
250
263
 
251
264
  declare const _default: React.MemoExoticComponent<(props: EngagementBarProps) => React.JSX.Element>;
@@ -515,7 +528,8 @@ declare enum AmityPostContentComponentStyle {
515
528
  declare enum AmityPostCategory {
516
529
  GENERAL = "general",
517
530
  ANNOUNCEMENT = "announcement",
518
- PIN = "pin"
531
+ PIN = "pin",
532
+ PIN_AND_ANNOUNCEMENT = "pin_and_announcement"
519
533
  }
520
534
  interface PostContentProps {
521
535
  post: Amity.Post;
package/dist/index.d.ts CHANGED
@@ -16,6 +16,7 @@ type PostRendererProps = {
16
16
  handleApprovePost?: () => void;
17
17
  handleDeclinePost?: () => void;
18
18
  handleClosePoll?: () => void;
19
+ handleUpdatePost?: (post: Amity.Post) => void;
19
20
  poll?: Amity.Poll | null;
20
21
  isPollClosed?: boolean;
21
22
  hidePostTarget?: boolean;
@@ -29,6 +30,14 @@ type PostRendererProps = {
29
30
  };
30
31
  type PostRendererConfigType = Record<ValueOf<typeof PostContentType> | string, (props: PostRendererProps) => ReactNode>;
31
32
 
33
+ interface UltaConfigContextProps {
34
+ newsCommunityId: string;
35
+ faqCommunityId: string;
36
+ defaultTab?: 'explore' | 'newsfeed';
37
+ termsAndConditionsUrl: string;
38
+ privacyAndPolicyUrl: string;
39
+ }
40
+
32
41
  interface UiKitProviderProps {
33
42
  apiKey: string;
34
43
  apiRegion: string;
@@ -64,8 +73,9 @@ interface UiKitProviderProps {
64
73
  onDisconnected?: () => void;
65
74
  pageBehavior?: Record<string, unknown>;
66
75
  getAuthToken?: () => Promise<string>;
76
+ ultaConfig: UltaConfigContextProps;
67
77
  }
68
- declare const UiKitProvider: ({ apiKey, apiRegion, apiEndpoint, userId, displayName, customComponents, postRendererConfig, theme, children, socialCommunityCreationButtonVisible, actionHandlers, onConnectionStatusChange, onDisconnected, getAuthToken, }: UiKitProviderProps) => React.JSX.Element;
78
+ declare const UiKitProvider: ({ apiKey, apiRegion, apiEndpoint, userId, displayName, customComponents, postRendererConfig, theme, children, socialCommunityCreationButtonVisible, actionHandlers, onConnectionStatusChange, onDisconnected, getAuthToken, ultaConfig, }: UiKitProviderProps) => React.JSX.Element;
69
79
 
70
80
  interface FeedProps {
71
81
  className?: string;
@@ -103,11 +113,12 @@ interface ExplorePageProps {
103
113
  declare const ExplorePage: ({ isOpen, toggleOpen, hideSideMenu }: ExplorePageProps) => React.JSX.Element;
104
114
 
105
115
  interface PostProps {
106
- postId: string;
116
+ post: Amity.Post;
107
117
  className?: string;
108
118
  hidePostTarget?: boolean;
109
119
  readonly?: boolean;
110
120
  onDeleted?: (postId: string) => void;
121
+ onUpdated?: (post: Amity.Post) => void;
111
122
  }
112
123
  declare const _default$2: React.MemoExoticComponent<(props: PostProps) => React.JSX.Element>;
113
124
 
@@ -188,7 +199,8 @@ type Page = {
188
199
  targetType?: string;
189
200
  };
190
201
  type ContextValue = {
191
- page: Page;
202
+ page: Page | null;
203
+ pages: Page[];
192
204
  onChangePage: (type: string) => void;
193
205
  onClickCategory: (categoryId: string) => void;
194
206
  onClickCommunity: (communityId: string) => void;
@@ -237,15 +249,16 @@ declare const PostContainer: styled_components_dist_types.IStyledComponentBase<"
237
249
  }) => React.JSX.Element, keyof React.Component<any, {}, any>>;
238
250
 
239
251
  type Mentioned = {
240
- userId: string;
252
+ userId?: string;
241
253
  length: number;
242
254
  index: number;
243
255
  type: string;
244
256
  };
245
257
 
246
258
  interface EngagementBarProps {
247
- postId: string;
259
+ post: Amity.Post;
248
260
  readonly?: boolean;
261
+ isClientCommunity?: boolean;
249
262
  }
250
263
 
251
264
  declare const _default: React.MemoExoticComponent<(props: EngagementBarProps) => React.JSX.Element>;
@@ -515,7 +528,8 @@ declare enum AmityPostContentComponentStyle {
515
528
  declare enum AmityPostCategory {
516
529
  GENERAL = "general",
517
530
  ANNOUNCEMENT = "announcement",
518
- PIN = "pin"
531
+ PIN = "pin",
532
+ PIN_AND_ANNOUNCEMENT = "pin_and_announcement"
519
533
  }
520
534
  interface PostContentProps {
521
535
  post: Amity.Post;