@vlprojects-chat/chat 0.0.38 → 0.0.42
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/dist/components/DirectList/components/DirectListRow/DirectListRow.d.ts +11 -0
- package/dist/components/DirectList/components/DirectListRow/index.d.ts +1 -0
- package/dist/components/DirectList/{styles.d.ts → components/DirectListRow/styles.d.ts} +1 -1
- package/dist/components/MessageInput/index.d.ts +1 -0
- package/dist/components/MessageList/MessageList.d.ts +1 -2
- package/dist/components/MessageList/components/MessageRow/MessageRow.d.ts +4 -1
- package/dist/components/MessageList/components/UserMessage/UserMessage.d.ts +3 -0
- package/dist/components/MessageList/components/UserMessage/components/UserMessageDisplayName/UserMessageDisplayName.d.ts +8 -0
- package/dist/components/MessageList/components/UserMessage/components/UserMessageDisplayName/index.d.ts +1 -0
- package/dist/components/MessageList/components/UserMessage/components/UserMessageDisplayName/styles.d.ts +2 -0
- package/dist/components/MessageList/components/UserMessage/styles.d.ts +1 -1
- package/dist/containers/ChannelPage/components/ChannelPageHeader/ChannelPageHeader.d.ts +8 -0
- package/dist/containers/ChannelPage/components/ChannelPageHeader/index.d.ts +1 -0
- package/dist/containers/Channels/Channels.d.ts +3 -2
- package/dist/containers/Channels/components/ChannelsHeader/ChannelsHeader.d.ts +6 -0
- package/dist/containers/Channels/components/ChannelsHeader/index.d.ts +1 -0
- package/dist/containers/Channels/{styles.d.ts → components/ChannelsHeader/styles.d.ts} +0 -0
- package/dist/containers/CreatePollPage/components/CreatePollForm/CreatePollForm.d.ts +2 -0
- package/dist/containers/CreatePollPage/components/ErrorMessage/ErrorMesage.d.ts +2 -2
- package/dist/containers/CreatePollPage/components/SelectPollType/SelectPollType.d.ts +7 -0
- package/dist/containers/CreatePollPage/components/SelectPollType/index.d.ts +1 -0
- package/dist/containers/CreatePollPage/components/SelectPollType/styles.d.ts +2 -0
- package/dist/containers/CreatePollPage/services.d.ts +2 -0
- package/dist/containers/CreatePollPage/styles.d.ts +1 -1
- package/dist/containers/CreatePollPage/types.d.ts +23 -3
- package/dist/containers/PollListPage/components/PollCard/styles.d.ts +1 -1
- package/dist/containers/PollListPage/services.d.ts +5 -4
- package/dist/containers/PollPortal/components/Textarea/Textarea.d.ts +6 -0
- package/dist/containers/PollPortal/components/Textarea/index.d.ts +1 -0
- package/dist/containers/PollPortal/components/Textarea/styles.d.ts +2 -0
- package/dist/containers/PollPortal/services.d.ts +3 -1
- package/dist/containers/PollResultDetailPage/PollResultDetailPage.d.ts +3 -0
- package/dist/containers/PollResultDetailPage/components/PollDetailOpenEnded/PollDetailOpenEnded.d.ts +7 -0
- package/dist/containers/PollResultDetailPage/components/PollDetailOpenEnded/index.d.ts +1 -0
- package/dist/containers/PollResultDetailPage/components/PollDetailOpenEnded/styles.d.ts +2 -0
- package/dist/containers/PollResultDetailPage/index.d.ts +1 -0
- package/dist/containers/PollResultDetailPage/styles.d.ts +2 -0
- package/dist/containers/UsersListPage/services.d.ts +1 -1
- package/dist/index.es.js +117 -29
- package/dist/index.js +116 -28
- package/dist/keystone/chat/channel.d.ts +5 -5
- package/dist/keystone/chat/poll.d.ts +9 -0
- package/dist/keystone/service.d.ts +4 -1
- package/dist/keystone/ui.d.ts +2 -3
- package/dist/locales/index.d.ts +32 -1
- package/dist/routes.d.ts +2 -1
- package/dist/theme/consts.d.ts +6 -0
- package/dist/types/centrifugeEvents.d.ts +2 -1
- package/dist/types/serverResponses.d.ts +1 -7
- package/dist/ui-kit/icons/CheckDoubleIcon.d.ts +10 -0
- package/dist/ui-kit/icons/CheckIcon.d.ts +10 -0
- package/dist/ui-kit/icons/EmptyPollIcon.d.ts +10 -0
- package/dist/ui-kit/icons/MoreHoriz.d.ts +10 -0
- package/dist/ui-kit/icons/TalkIcon.d.ts +10 -0
- package/dist/utils/consts.d.ts +2 -0
- package/dist/utils/date.d.ts +4 -0
- package/package.json +3 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import Channel from 'keystone/chat/channel';
|
|
2
|
+
import User from 'keystone/chat/user';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
interface IProps {
|
|
5
|
+
channel: Channel;
|
|
6
|
+
user: User;
|
|
7
|
+
clickRowHandler: (id: string) => void;
|
|
8
|
+
directChannelName: string;
|
|
9
|
+
}
|
|
10
|
+
declare const _default: React.FunctionComponent<IProps>;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DirectListRow';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"row" | "
|
|
1
|
+
declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"row" | "badge">;
|
|
2
2
|
export default _default;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import Message from 'keystone/chat/message';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
interface IProps {
|
|
4
|
-
|
|
4
|
+
message: Message;
|
|
5
|
+
short: boolean;
|
|
6
|
+
last: boolean;
|
|
7
|
+
showLineTime: boolean;
|
|
5
8
|
index: number;
|
|
6
9
|
}
|
|
7
10
|
declare const _default: React.FunctionComponent<IProps>;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import Message from 'keystone/chat/message';
|
|
2
|
+
import User from 'keystone/chat/user';
|
|
2
3
|
import { FC } from 'react';
|
|
3
4
|
export interface IProps {
|
|
4
5
|
index: number;
|
|
5
6
|
message: Message;
|
|
7
|
+
user?: User;
|
|
6
8
|
short?: boolean;
|
|
9
|
+
showLineTime: boolean;
|
|
7
10
|
}
|
|
8
11
|
declare const UserMessage: FC<IProps>;
|
|
9
12
|
export default UserMessage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './UserMessageDisplayName';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import User from 'keystone/chat/user';
|
|
2
2
|
declare const _default: (props: {
|
|
3
3
|
user?: User | undefined;
|
|
4
|
-
}) => import("@mui/styles").ClassNameMap<"otherUserMessage" | "
|
|
4
|
+
}) => import("@mui/styles").ClassNameMap<"otherUserMessage" | "icon" | "tooltip" | "ownMessage" | "message">;
|
|
5
5
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ChannelPageHeader';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Routes from 'routes';
|
|
3
|
-
|
|
3
|
+
export interface IProps {
|
|
4
4
|
channelTabType: Routes.Channels | Routes.Direct;
|
|
5
|
-
}
|
|
5
|
+
}
|
|
6
|
+
declare const _default: React.FunctionComponent<IProps>;
|
|
6
7
|
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './ChannelsHeader';
|
|
File without changes
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import Channel from '../../../../keystone/chat/channel';
|
|
3
|
+
import { PollTypeEnum } from '../../types';
|
|
3
4
|
interface IProps {
|
|
4
5
|
channel: Channel;
|
|
6
|
+
selectedPollType: PollTypeEnum;
|
|
5
7
|
}
|
|
6
8
|
declare const CreatePollForm: FC<IProps>;
|
|
7
9
|
export default CreatePollForm;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { FC, HTMLAttributes } from 'react';
|
|
2
2
|
interface IProps {
|
|
3
3
|
message?: string;
|
|
4
4
|
}
|
|
5
|
-
declare const ErrorMessage: FC<IProps
|
|
5
|
+
declare const ErrorMessage: FC<IProps & HTMLAttributes<HTMLDivElement>>;
|
|
6
6
|
export default ErrorMessage;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './SelectPollType';
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { ICreatePollForm, IServerPoll } from './types';
|
|
2
|
+
import Poll from '../../keystone/chat/poll';
|
|
2
3
|
export declare const createPoll: (payload: ICreatePollForm, channelId: number) => Promise<IServerPoll>;
|
|
4
|
+
export declare const getFormatMessagePollType: (poll: Poll) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<
|
|
1
|
+
declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"headerText" | "gridContainer">;
|
|
2
2
|
export default _default;
|
|
@@ -1,26 +1,46 @@
|
|
|
1
1
|
import { IPollStatus } from '../../types/types';
|
|
2
2
|
export interface ICreatePollForm {
|
|
3
|
-
channelId
|
|
3
|
+
channelId?: string;
|
|
4
4
|
question: string;
|
|
5
5
|
withAnswer: boolean;
|
|
6
|
+
isOpenEnded: boolean;
|
|
6
7
|
options: string[];
|
|
7
8
|
validOptions: string[];
|
|
9
|
+
templateId?: number | null;
|
|
8
10
|
}
|
|
9
11
|
export interface IServerPollVote {
|
|
10
12
|
id: number;
|
|
11
|
-
userId
|
|
13
|
+
userId?: number;
|
|
14
|
+
answer?: string;
|
|
15
|
+
user: IServerPollVotesUser;
|
|
12
16
|
}
|
|
13
17
|
export interface IServerPollOption {
|
|
14
18
|
id: number;
|
|
15
19
|
option: string;
|
|
16
20
|
valid: boolean;
|
|
17
21
|
votesCount: number;
|
|
18
|
-
pollVotes
|
|
22
|
+
pollVotes?: IServerPollVote[];
|
|
19
23
|
isVoted?: boolean;
|
|
20
24
|
}
|
|
21
25
|
export interface IServerPoll {
|
|
22
26
|
id: number;
|
|
27
|
+
channelId: number;
|
|
23
28
|
question: string;
|
|
29
|
+
isVoted: boolean | null;
|
|
30
|
+
withAnswer: boolean;
|
|
31
|
+
isOpenEnded: boolean;
|
|
24
32
|
status: IPollStatus;
|
|
25
33
|
options: IServerPollOption[];
|
|
34
|
+
votes?: IServerPollVote[];
|
|
35
|
+
templateId?: number | null;
|
|
36
|
+
}
|
|
37
|
+
export interface IServerPollVotesUser {
|
|
38
|
+
id: number;
|
|
39
|
+
username: string;
|
|
40
|
+
displayName: string;
|
|
41
|
+
}
|
|
42
|
+
export declare enum PollTypeEnum {
|
|
43
|
+
OneAnswer = "one_answer",
|
|
44
|
+
MultipleAnswer = "multiple_answer",
|
|
45
|
+
OpenEndedAnswer = "open_ended_answer"
|
|
26
46
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"root"
|
|
1
|
+
declare const _default: (props?: any) => import("@mui/styles").ClassNameMap<"root">;
|
|
2
2
|
export default _default;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { IServerPoll } from '../CreatePollPage/types';
|
|
2
|
-
export declare const getPollListForChannel: (channelId: number) => Promise<IServerPoll[]>;
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
2
|
+
export declare const getPollListForChannel: (channelId: number) => Promise<IServerPoll[] | undefined>;
|
|
3
|
+
export declare const getPollById: (pollId: number) => Promise<IServerPoll | undefined>;
|
|
4
|
+
export declare const deletePoll: (pollId: number) => Promise<void | undefined>;
|
|
5
|
+
export declare const startPoll: (pollId: number) => Promise<IServerPoll | undefined>;
|
|
6
|
+
export declare const stopPoll: (pollId: number) => Promise<IServerPoll | undefined>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Textarea';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PollDetailOpenEnded';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './PollResultDetailPage';
|
|
@@ -2,6 +2,6 @@ import { Root } from 'keystone/index';
|
|
|
2
2
|
import Channel from '../../keystone/chat/channel';
|
|
3
3
|
import User from '../../keystone/chat/user';
|
|
4
4
|
import { IRChannel } from '../../types/serverResponses';
|
|
5
|
-
export declare const createNewDirectChannel: (root: Root, chatWithUser: User) => Promise<IRChannel>;
|
|
5
|
+
export declare const createNewDirectChannel: (root: Root, chatWithUser: User) => Promise<IRChannel | undefined>;
|
|
6
6
|
export declare const searchDirectChannelWithUser: (root: Root, chatWithUser: User) => Channel | undefined;
|
|
7
7
|
export declare const createOrOpenDirectChat: (root: Root, chatWithUser: User) => Promise<void>;
|