@cometchat/chat-uikit-react 5.0.1 → 5.0.3

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.
@@ -75,11 +75,9 @@
75
75
  flex-shrink: 0;
76
76
  width: 48px;
77
77
  height: 48px;
78
- border-radius: var(--cometchat-radius-max,1000px);
79
- background: var(
80
- --cometchat-shimmer-gradient-color,
81
- linear-gradient(90deg, #e0e0e0 0%, #eee 100%)
82
- );
78
+ border-radius: var(--cometchat-radius-max, 1000px);
79
+ background: var(--cometchat-shimmer-gradient-color,
80
+ linear-gradient(90deg, #e0e0e0 0%, #eee 100%));
83
81
  }
84
82
 
85
83
  .cometchat-users__shimmer-item-body {
@@ -95,23 +93,19 @@
95
93
  height: 22px;
96
94
  flex-shrink: 0;
97
95
  border-radius: var(--cometchat-radius-2, 8px);
98
- background: var(
99
- --cometchat-shimmer-gradient-color,
100
- linear-gradient(90deg, #e0e0e0 0%, #eee 100%)
101
- );
96
+ background: var(--cometchat-shimmer-gradient-color,
97
+ linear-gradient(90deg, #e0e0e0 0%, #eee 100%));
102
98
  animation: shimmerAnimation 1.5s infinite linear;
103
99
 
104
100
  }
105
101
 
106
102
  .cometchat-users__shimmer-item-body-subtitle {
107
- width:25%;
103
+ width: 25%;
108
104
  height: 12px;
109
105
  flex-shrink: 0;
110
106
  border-radius: var(--cometchat-radius-2, 8px);
111
- background: var(
112
- --cometchat-shimmer-gradient-color,
113
- linear-gradient(90deg, #e0e0e0 0%, #eee 100%)
114
- );
107
+ background: var(--cometchat-shimmer-gradient-color,
108
+ linear-gradient(90deg, #e0e0e0 0%, #eee 100%));
115
109
  animation: shimmerAnimation 1.5s infinite linear;
116
110
 
117
111
  }
@@ -124,21 +118,22 @@
124
118
  top: 20px;
125
119
  right: 15px;
126
120
  border-radius: var(--cometchat-radius-max, 1000px);
127
- background: var(--cometchat-success-color,#09C26F);
121
+ background: var(--cometchat-success-color, #09C26F);
128
122
  min-width: 14px;
129
- border: 2px solid var(--cometchat-neutral-color-50,#FFFFFF);
123
+ border: 2px solid var(--cometchat-neutral-color-50, #FFFFFF);
130
124
  display: flex;
131
125
  align-items: center;
132
126
  justify-content: center;
133
127
  }
134
128
 
135
- .cometchat-users__list-item-active .cometchat-list-item{
136
- background-color:var(--cometchat-white-pressed,#E8E8E8)
129
+ .cometchat-users__list-item-active .cometchat-list-item {
130
+ background-color: var(--cometchat-white-pressed, #E8E8E8)
137
131
  }
138
132
 
139
- .cometchat-users__list-item {
133
+ .cometchat-users__list-item {
140
134
  cursor: pointer;
141
135
  }
136
+
142
137
  .cometchat-users__list-item .cometchat-avatar {
143
138
  width: 40px;
144
139
  height: 40px;
@@ -155,11 +150,11 @@
155
150
  }
156
151
 
157
152
  @keyframes shimmerAnimation {
158
- 0% {
159
- background-position: -468px 0;
160
- }
161
-
162
- 100% {
163
- background-position: 468px 0;
164
- }
153
+ 0% {
154
+ background-position: -468px 0;
155
+ }
156
+
157
+ 100% {
158
+ background-position: 468px 0;
165
159
  }
160
+ }
@@ -75,11 +75,9 @@
75
75
  flex-shrink: 0;
76
76
  width: 48px;
77
77
  height: 48px;
78
- border-radius: var(--cometchat-radius-max,1000px);
79
- background: var(
80
- --cometchat-shimmer-gradient-color,
81
- linear-gradient(90deg, #e0e0e0 0%, #eee 100%)
82
- );
78
+ border-radius: var(--cometchat-radius-max, 1000px);
79
+ background: var(--cometchat-shimmer-gradient-color,
80
+ linear-gradient(90deg, #e0e0e0 0%, #eee 100%));
83
81
  }
84
82
 
85
83
  .cometchat-users__shimmer-item-body {
@@ -95,23 +93,19 @@
95
93
  height: 22px;
96
94
  flex-shrink: 0;
97
95
  border-radius: var(--cometchat-radius-2, 8px);
98
- background: var(
99
- --cometchat-shimmer-gradient-color,
100
- linear-gradient(90deg, #e0e0e0 0%, #eee 100%)
101
- );
96
+ background: var(--cometchat-shimmer-gradient-color,
97
+ linear-gradient(90deg, #e0e0e0 0%, #eee 100%));
102
98
  animation: shimmerAnimation 1.5s infinite linear;
103
99
 
104
100
  }
105
101
 
106
102
  .cometchat-users__shimmer-item-body-subtitle {
107
- width:25%;
103
+ width: 25%;
108
104
  height: 12px;
109
105
  flex-shrink: 0;
110
106
  border-radius: var(--cometchat-radius-2, 8px);
111
- background: var(
112
- --cometchat-shimmer-gradient-color,
113
- linear-gradient(90deg, #e0e0e0 0%, #eee 100%)
114
- );
107
+ background: var(--cometchat-shimmer-gradient-color,
108
+ linear-gradient(90deg, #e0e0e0 0%, #eee 100%));
115
109
  animation: shimmerAnimation 1.5s infinite linear;
116
110
 
117
111
  }
@@ -124,21 +118,22 @@
124
118
  top: 20px;
125
119
  right: 15px;
126
120
  border-radius: var(--cometchat-radius-max, 1000px);
127
- background: var(--cometchat-success-color,#09C26F);
121
+ background: var(--cometchat-success-color, #09C26F);
128
122
  min-width: 14px;
129
- border: 2px solid var(--cometchat-neutral-color-50,#FFFFFF);
123
+ border: 2px solid var(--cometchat-neutral-color-50, #FFFFFF);
130
124
  display: flex;
131
125
  align-items: center;
132
126
  justify-content: center;
133
127
  }
134
128
 
135
- .cometchat-users__list-item-active .cometchat-list-item{
136
- background-color:var(--cometchat-white-pressed,#E8E8E8)
129
+ .cometchat-users__list-item-active .cometchat-list-item {
130
+ background-color: var(--cometchat-white-pressed, #E8E8E8)
137
131
  }
138
132
 
139
- .cometchat-users__list-item {
133
+ .cometchat-users__list-item {
140
134
  cursor: pointer;
141
135
  }
136
+
142
137
  .cometchat-users__list-item .cometchat-avatar {
143
138
  width: 40px;
144
139
  height: 40px;
@@ -155,11 +150,11 @@
155
150
  }
156
151
 
157
152
  @keyframes shimmerAnimation {
158
- 0% {
159
- background-position: -468px 0;
160
- }
161
-
162
- 100% {
163
- background-position: 468px 0;
164
- }
153
+ 0% {
154
+ background-position: -468px 0;
155
+ }
156
+
157
+ 100% {
158
+ background-position: 468px 0;
165
159
  }
160
+ }
@@ -1,9 +1,11 @@
1
+ /// <reference types="react" />
1
2
  import { CometChatEmoji, CometChatEmojiCategory } from "./CometChatEmoji";
2
3
  export declare const useCometChatEmojiKeyboard: ({ emojiData, }: {
3
4
  emojiData: CometChatEmojiCategory[];
4
5
  }) => {
5
6
  emojiDataState: CometChatEmojiCategory[];
6
- activeCategory: string;
7
+ activeCategory: string | undefined;
8
+ setActiveCategory: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
7
9
  searchEmojiData: {
8
10
  [key: string]: CometChatEmoji;
9
11
  };
@@ -3,8 +3,15 @@ import React from 'react';
3
3
  * Props for the CometChatFullScreenViewer component.
4
4
  */
5
5
  interface FullScreenViewerProps {
6
- /** URL of the image to be displayed */
6
+ /**
7
+ * @deprecated
8
+ * Use 'url' prop instead. This prop is deprecated and will be removed in future versions.
9
+ * */
7
10
  URL?: string;
11
+ /**
12
+ * URL of the image to be displayed
13
+ */
14
+ url?: string;
8
15
  /** Placeholder image URL */
9
16
  placeholderImage?: string;
10
17
  /** Callback function when the close button is clicked */
@@ -1,5 +1,5 @@
1
1
  import { JSX } from "react";
2
- import { States, TitleAlignment } from "../../../Enums/Enums";
2
+ import { States } from "../../../Enums/Enums";
3
3
  export type DivElementRef = HTMLDivElement | null;
4
4
  interface ListProps<T> {
5
5
  /**
@@ -8,12 +8,6 @@ interface ListProps<T> {
8
8
  * @defaultValue `""`
9
9
  */
10
10
  headerView?: JSX.Element;
11
- /**
12
- * Alignment of the `title` text
13
- *
14
- * @defaultValue `TitleAlignment.left`
15
- */
16
- titleAlignment?: TitleAlignment;
17
11
  /**
18
12
  * Hide the search bar
19
13
  *
@@ -33,10 +27,6 @@ interface ListProps<T> {
33
27
  * This function will only be called after 500ms of the search input text change
34
28
  */
35
29
  onSearch?: (searchStr: string) => void;
36
- /**
37
- * Image URL for the search icon to use in the search bar
38
- */
39
- searchIconURL?: string;
40
30
  /**
41
31
  * Text to be displayed when the search input has no value
42
32
  *
@@ -91,10 +81,6 @@ interface ListProps<T> {
91
81
  * Custom view for the loading state of the component
92
82
  */
93
83
  loadingView?: JSX.Element;
94
- /**
95
- * Image URL for the default loading view
96
- */
97
- loadingIconURL?: string;
98
84
  /**
99
85
  * Hide error view
100
86
  *
@@ -108,22 +94,10 @@ interface ListProps<T> {
108
94
  * Custom view for the error state of the component
109
95
  */
110
96
  errorView?: JSX.Element;
111
- /**
112
- * Text to display in the default error view
113
- *
114
- * @defaultValue `"ERROR"`
115
- */
116
- errorStateText?: string;
117
97
  /**
118
98
  * Custom view for the empty state of the component
119
99
  */
120
100
  emptyView?: JSX.Element;
121
- /**
122
- * Text to display in the default empty view
123
- *
124
- * @defaultValue `"EMPTY"`
125
- */
126
- emptyStateText?: string;
127
101
  /**
128
102
  * Set the scrollbar to the bottom-most position of the scrollable list
129
103
  *
@@ -1,4 +1,4 @@
1
- import { ReactNode, CSSProperties } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  export declare enum Placement {
3
3
  top = "top",
4
4
  right = "right",
@@ -12,10 +12,8 @@ interface PopoverProps {
12
12
  debounceOnHover?: number;
13
13
  children: ReactNode;
14
14
  content: ReactNode;
15
- hasToolTip?: boolean;
16
15
  childClickHandler?: (openContent: Function, event: Event) => void;
17
16
  onOutsideClick?: () => void;
18
- overrideStyleProps?: CSSProperties;
19
17
  }
20
18
  declare const CometChatPopover: import("react").ForwardRefExoticComponent<PopoverProps & import("react").RefAttributes<{
21
19
  openPopover: () => void;
@@ -1,21 +1,15 @@
1
- import { CSSProperties } from 'react';
1
+ /// <reference types="react" />
2
2
  import { UserMemberListType } from '../../Enums/Enums';
3
3
  export interface MentionsProps {
4
4
  userMemberListType?: UserMemberListType;
5
5
  onItemClick?: (user: CometChat.User | CometChat.GroupMember) => void;
6
- listItemView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element;
7
- statusIndicatorStyle?: CSSProperties;
6
+ itemView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element;
8
7
  searchKeyword?: string;
9
8
  group?: CometChat.Group;
10
9
  subtitleView?: (item?: CometChat.User | CometChat.GroupMember) => JSX.Element;
11
10
  usersRequestBuilder?: CometChat.UsersRequestBuilder;
12
- disableUsersPresence?: boolean;
13
- hideSeparator?: boolean;
14
- loadingStateView?: JSX.Element;
15
11
  onEmpty?: () => void;
16
12
  groupMemberRequestBuilder?: CometChat.GroupMembersRequestBuilder;
17
- loadingIconUrl?: string;
18
- disableLoadingState?: boolean;
19
13
  onError?: () => void;
20
14
  }
21
15
  export declare function CometChatUserMemberWrapper(props: MentionsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,9 +1,17 @@
1
1
  import { MessageBubbleAlignment } from "../../../Enums/Enums";
2
+ export interface PollOptions {
3
+ id: string;
4
+ selectedByLoggedInUser?: boolean;
5
+ text: string;
6
+ votersObj?: CometChat.User[];
7
+ count: number;
8
+ percent: string;
9
+ }
2
10
  interface PollsBubbleProps {
3
11
  /**
4
12
  * Array of options for the poll.
5
13
  */
6
- options?: any[];
14
+ options?: PollOptions[];
7
15
  /**
8
16
  * The question being asked in the poll.
9
17
  */
@@ -136,4 +136,11 @@ export declare class CometChatUIKitConstants {
136
136
  usersLimit: 30;
137
137
  groupsLimit: 30;
138
138
  }>;
139
+ static radioNames: Readonly<{
140
+ conversations: "conversations";
141
+ users: "users";
142
+ groups: "groups";
143
+ changeScope: "changeScope";
144
+ groupMembers: "groupMembers";
145
+ }>;
139
146
  }
@@ -21,6 +21,7 @@ export { MessageTranslationExtensionDecorator } from './components/Extensions/Me
21
21
  export { PollsConfiguration } from './components/Extensions/Polls/PollsConfiguration';
22
22
  export { PollsExtension } from './components/Extensions/Polls/PollsExtension';
23
23
  export { PollsExtensionDecorator } from './components/Extensions/Polls/PollsExtensionDecorator';
24
+ export type { PollOptions } from './components/Extensions/Polls/PollsBubble';
24
25
  export { StickersExtension } from './components/Extensions/Stickers/StickersExtension';
25
26
  export { StickersExtensionDecorator } from './components/Extensions/Stickers/StickersExtensionDecorator';
26
27
  export { ThumbnailGenerationExtension } from './components/Extensions/ThumbnailGeneration/ThumbnailGenerationExtension';
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@cometchat/chat-uikit-react",
3
- "version": "5.0.1",
3
+ "version": "5.0.3",
4
4
  "description": "Ready-to-use Chat UI Components for React(Javascript/Web)",
5
5
  "author": "CometChat",
6
6
  "dependencies": {
7
7
  "@cometchat/chat-sdk-javascript": "^4.0.10",
8
8
  "@rollup/plugin-json": "^6.1.0",
9
+ "postcss": "^8.5.2",
9
10
  "rxjs": "^7.8.1"
10
11
  },
11
12
  "scripts": {
@@ -31,7 +32,7 @@
31
32
  "react-dom": "^18.2.0",
32
33
  "rollup": "^3.23.0",
33
34
  "rollup-plugin-copy": "^3.4.0",
34
- "rollup-plugin-dts": "^5.3.1",
35
+ "rollup-plugin-dts": "^6.1.1",
35
36
  "rollup-plugin-postcss": "^4.0.2",
36
37
  "rollup-plugin-sourcemaps": "^0.6.3",
37
38
  "tslib": "^2.5.2",
@@ -67,4 +68,4 @@
67
68
  "bugs": {
68
69
  "url": "https://help.cometchat.com/hc/en-us"
69
70
  }
70
- }
71
+ }