@vlprojects-chat/chat 0.0.39 → 0.0.43
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 -3
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'mobx-keystone';
|
|
2
|
-
import { IServerPoll } from '../../containers/CreatePollPage/types';
|
|
2
|
+
import { IServerPoll, IServerPollOption } from '../../containers/CreatePollPage/types';
|
|
3
3
|
import { ChannelTypeEnum } from '../../types/enums';
|
|
4
4
|
import { IRChannelMessage, IRPinnedMessage } from '../../types/serverResponses';
|
|
5
5
|
import Message from './message';
|
|
@@ -38,13 +38,12 @@ declare const Channel_base: import("mobx-keystone")._Model<unknown, {
|
|
|
38
38
|
pinnedMessages: import("mobx-keystone").OptionalModelProp<PinnedMessage[]>;
|
|
39
39
|
}>>>;
|
|
40
40
|
export default class Channel extends Channel_base {
|
|
41
|
-
addMessages(messages: IRChannelMessage[]):
|
|
42
|
-
addUsers(userIds: string[]): void;
|
|
41
|
+
addMessages(messages: IRChannelMessage[]): number;
|
|
43
42
|
setPollList(items: IServerPoll[]): void;
|
|
44
|
-
addPoll(poll: IServerPoll):
|
|
43
|
+
addPoll(poll: IServerPoll): Poll;
|
|
45
44
|
deletePoll(poll: Poll): void;
|
|
46
45
|
startPoll(poll: Poll): void;
|
|
47
|
-
setPollVoted(payload: string[]): void;
|
|
46
|
+
setPollVoted(payload: string[], options: IServerPollOption[]): void;
|
|
48
47
|
updateVotesCounter(ids: number[]): void;
|
|
49
48
|
stopPoll(poll: Poll): void;
|
|
50
49
|
closePollPortal(): void;
|
|
@@ -54,6 +53,7 @@ export default class Channel extends Channel_base {
|
|
|
54
53
|
deleteMessages(ids: number[]): void;
|
|
55
54
|
get sortedMessages(): Message[];
|
|
56
55
|
findLastMessageForUser(msgIdx: number): Message | undefined;
|
|
56
|
+
get lastMessage(): Message | undefined;
|
|
57
57
|
get messagesCount(): number;
|
|
58
58
|
get userList(): User[];
|
|
59
59
|
get getActivePoll(): Poll | undefined;
|
|
@@ -3,23 +3,32 @@ import { IPollStatus } from '../../types/types';
|
|
|
3
3
|
declare const Poll_base: import("mobx-keystone")._Model<unknown, {
|
|
4
4
|
id: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
5
5
|
question: import("mobx-keystone").OptionalModelProp<string>;
|
|
6
|
+
isOpenEnded: import("mobx-keystone").OptionalModelProp<boolean>;
|
|
6
7
|
withAnswer: import("mobx-keystone").OptionalModelProp<boolean>;
|
|
8
|
+
isVoted: import("mobx-keystone").OptionalModelProp<boolean>;
|
|
7
9
|
options: import("mobx-keystone").OptionalModelProp<IServerPollOption[]>;
|
|
8
10
|
validOptions: import("mobx-keystone").OptionalModelProp<string[]>;
|
|
11
|
+
templateId: import("mobx-keystone").MaybeOptionalModelProp<number | null | undefined>;
|
|
9
12
|
status: import("mobx-keystone").OptionalModelProp<IPollStatus>;
|
|
10
13
|
}, import("mobx-keystone").SnapshotInOfObject<import("mobx-keystone").ModelPropsToCreationData<{
|
|
11
14
|
id: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
12
15
|
question: import("mobx-keystone").OptionalModelProp<string>;
|
|
16
|
+
isOpenEnded: import("mobx-keystone").OptionalModelProp<boolean>;
|
|
13
17
|
withAnswer: import("mobx-keystone").OptionalModelProp<boolean>;
|
|
18
|
+
isVoted: import("mobx-keystone").OptionalModelProp<boolean>;
|
|
14
19
|
options: import("mobx-keystone").OptionalModelProp<IServerPollOption[]>;
|
|
15
20
|
validOptions: import("mobx-keystone").OptionalModelProp<string[]>;
|
|
21
|
+
templateId: import("mobx-keystone").MaybeOptionalModelProp<number | null | undefined>;
|
|
16
22
|
status: import("mobx-keystone").OptionalModelProp<IPollStatus>;
|
|
17
23
|
}>>, import("mobx-keystone").SnapshotOutOfObject<import("mobx-keystone").ModelPropsToData<{
|
|
18
24
|
id: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
19
25
|
question: import("mobx-keystone").OptionalModelProp<string>;
|
|
26
|
+
isOpenEnded: import("mobx-keystone").OptionalModelProp<boolean>;
|
|
20
27
|
withAnswer: import("mobx-keystone").OptionalModelProp<boolean>;
|
|
28
|
+
isVoted: import("mobx-keystone").OptionalModelProp<boolean>;
|
|
21
29
|
options: import("mobx-keystone").OptionalModelProp<IServerPollOption[]>;
|
|
22
30
|
validOptions: import("mobx-keystone").OptionalModelProp<string[]>;
|
|
31
|
+
templateId: import("mobx-keystone").MaybeOptionalModelProp<number | null | undefined>;
|
|
23
32
|
status: import("mobx-keystone").OptionalModelProp<IPollStatus>;
|
|
24
33
|
}>>>;
|
|
25
34
|
export default class Poll extends Poll_base {
|
|
@@ -3,9 +3,12 @@ export declare const getInitialData: (root: Root) => Promise<void>;
|
|
|
3
3
|
export declare const login: (root: Root, username: string, password?: string | undefined) => Promise<void>;
|
|
4
4
|
export declare const signup: (root: Root, username: string, password?: string | undefined) => Promise<void>;
|
|
5
5
|
export declare const saveProfile: (root: Root, displayName: string, avatar?: string | undefined) => Promise<void>;
|
|
6
|
-
export declare const loadChannelPolls: (root: Root, channelId: string) => Promise<void>;
|
|
7
6
|
export declare const joinChannel: (root: Root, id: string) => Promise<void>;
|
|
8
7
|
export declare const joinChannelByExternalId: (root: Root, externalId: string) => Promise<void>;
|
|
8
|
+
export declare const fetchMessagesBefore: (root: Root, channelId: number, messageId: number, options?: {
|
|
9
|
+
limit?: number | undefined;
|
|
10
|
+
until?: number | undefined;
|
|
11
|
+
} | undefined) => Promise<number>;
|
|
9
12
|
export declare const redirectToInitial: (root: Root) => Promise<void> | void;
|
|
10
13
|
export declare const sendMessage: (root: Root, channelId: string, text: string) => Promise<void>;
|
|
11
14
|
export declare const getSettings: (root: Root, appId: string) => Promise<void>;
|
package/dist/keystone/ui.d.ts
CHANGED
|
@@ -2,19 +2,18 @@ declare const UI_base: import("mobx-keystone")._Model<unknown, {
|
|
|
2
2
|
route: import("mobx-keystone").OptionalModelProp<string>;
|
|
3
3
|
channelId: import("mobx-keystone").ModelProp<string, string | null | undefined, string, string | null | undefined, string, false, string>;
|
|
4
4
|
params: import("mobx-keystone").ModelProp<Record<string, unknown>, Record<string, unknown> | null | undefined, Record<string, unknown>, Record<string, unknown> | null | undefined, string, false, string>;
|
|
5
|
-
pinnedMessageIdx: import("mobx-keystone").ModelProp<Record<string, number>, Record<string, number> | null | undefined, Record<string, number>, Record<string, number> | null | undefined, string, false, string>;
|
|
6
5
|
}, import("mobx-keystone").SnapshotInOfObject<import("mobx-keystone").ModelPropsToCreationData<{
|
|
7
6
|
route: import("mobx-keystone").OptionalModelProp<string>;
|
|
8
7
|
channelId: import("mobx-keystone").ModelProp<string, string | null | undefined, string, string | null | undefined, string, false, string>;
|
|
9
8
|
params: import("mobx-keystone").ModelProp<Record<string, unknown>, Record<string, unknown> | null | undefined, Record<string, unknown>, Record<string, unknown> | null | undefined, string, false, string>;
|
|
10
|
-
pinnedMessageIdx: import("mobx-keystone").ModelProp<Record<string, number>, Record<string, number> | null | undefined, Record<string, number>, Record<string, number> | null | undefined, string, false, string>;
|
|
11
9
|
}>>, import("mobx-keystone").SnapshotOutOfObject<import("mobx-keystone").ModelPropsToData<{
|
|
12
10
|
route: import("mobx-keystone").OptionalModelProp<string>;
|
|
13
11
|
channelId: import("mobx-keystone").ModelProp<string, string | null | undefined, string, string | null | undefined, string, false, string>;
|
|
14
12
|
params: import("mobx-keystone").ModelProp<Record<string, unknown>, Record<string, unknown> | null | undefined, Record<string, unknown>, Record<string, unknown> | null | undefined, string, false, string>;
|
|
15
|
-
pinnedMessageIdx: import("mobx-keystone").ModelProp<Record<string, number>, Record<string, number> | null | undefined, Record<string, number>, Record<string, number> | null | undefined, string, false, string>;
|
|
16
13
|
}>>>;
|
|
17
14
|
export default class UI extends UI_base {
|
|
15
|
+
jumpToMessage: (index: number) => void;
|
|
16
|
+
setJumpToMessage(handler: (index: number) => void): void;
|
|
18
17
|
routeHistory: string[];
|
|
19
18
|
setRoute(route: string): void;
|
|
20
19
|
back(): void;
|
package/dist/locales/index.d.ts
CHANGED
|
@@ -65,7 +65,23 @@ declare const _default: {
|
|
|
65
65
|
deleteAllMessage: string;
|
|
66
66
|
systemMessageChangedName: string;
|
|
67
67
|
systemMessageUserChangedChannelName: string;
|
|
68
|
+
selectPollType: string;
|
|
69
|
+
multipleAnswerOptions: string;
|
|
70
|
+
pollOpenEnded: string;
|
|
71
|
+
thanks: string;
|
|
72
|
+
answerAccepted: string;
|
|
73
|
+
listEmpty: string;
|
|
74
|
+
results: string;
|
|
68
75
|
systemMessageChangedChannelName: string;
|
|
76
|
+
"menu.direct": string;
|
|
77
|
+
"time.dayBefore": string;
|
|
78
|
+
"time.yesterday": string;
|
|
79
|
+
pollValidateAnswerLongerLetters: string;
|
|
80
|
+
pollValidateAnswerNotLongerLetters: string;
|
|
81
|
+
restart: string;
|
|
82
|
+
edit: string;
|
|
83
|
+
delete: string;
|
|
84
|
+
templates: string;
|
|
69
85
|
};
|
|
70
86
|
ru: {
|
|
71
87
|
loadingSocket: string;
|
|
@@ -108,7 +124,6 @@ declare const _default: {
|
|
|
108
124
|
startPoll: string;
|
|
109
125
|
completePoll: string;
|
|
110
126
|
seeResults: string;
|
|
111
|
-
deletePoll: string;
|
|
112
127
|
newPoll: string;
|
|
113
128
|
reply: string;
|
|
114
129
|
username: string;
|
|
@@ -133,7 +148,23 @@ declare const _default: {
|
|
|
133
148
|
deleteAllMessage: string;
|
|
134
149
|
systemMessageChangedName: string;
|
|
135
150
|
systemMessageUserChangedChannelName: string;
|
|
151
|
+
selectPollType: string;
|
|
152
|
+
multipleAnswerOptions: string;
|
|
153
|
+
pollOpenEnded: string;
|
|
154
|
+
thanks: string;
|
|
155
|
+
answerAccepted: string;
|
|
156
|
+
listEmpty: string;
|
|
157
|
+
results: string;
|
|
136
158
|
systemMessageChangedChannelName: string;
|
|
159
|
+
"menu.direct": string;
|
|
160
|
+
"time.dayBefore": string;
|
|
161
|
+
"time.yesterday": string;
|
|
162
|
+
pollValidateAnswerLongerLetters: string;
|
|
163
|
+
pollValidateAnswerNotLongerLetters: string;
|
|
164
|
+
restart: string;
|
|
165
|
+
edit: string;
|
|
166
|
+
delete: string;
|
|
167
|
+
templates: string;
|
|
137
168
|
};
|
|
138
169
|
};
|
|
139
170
|
export default _default;
|
package/dist/routes.d.ts
CHANGED
package/dist/theme/consts.d.ts
CHANGED
|
@@ -22,15 +22,21 @@ export declare const COLOURS: {
|
|
|
22
22
|
BLACK_03: string;
|
|
23
23
|
WHITE: string;
|
|
24
24
|
BLACK: string;
|
|
25
|
+
GREY: string;
|
|
25
26
|
POLL_TEXT_PRIMARY: string;
|
|
26
27
|
POLL_TEXT_SECONDARY: string;
|
|
27
28
|
SURFACE_PRIMARY: string;
|
|
28
29
|
SURFACE_SECONDARY: string;
|
|
30
|
+
MESSAGE_DATE_COLOR_OWN: string;
|
|
31
|
+
MESSAGE_DATE_COLOR: string;
|
|
29
32
|
BG_FOR_SLOT: string;
|
|
30
33
|
LIGHT_01: string;
|
|
31
34
|
LIGHT_02: string;
|
|
32
35
|
LIGHT_03: string;
|
|
33
36
|
LIGHT_04: string;
|
|
37
|
+
LIGHT_05: string;
|
|
38
|
+
BLUE_01: string;
|
|
39
|
+
BLUE_02: string;
|
|
34
40
|
BLUE: string;
|
|
35
41
|
AVATAR1_BURGUNDY: string;
|
|
36
42
|
AVATAR2_RED: string;
|
|
@@ -19,10 +19,6 @@ export interface ISEMessage {
|
|
|
19
19
|
channelId: string;
|
|
20
20
|
message: IRChannelMessage;
|
|
21
21
|
}
|
|
22
|
-
export interface ISENewChannelUser {
|
|
23
|
-
channelId: string;
|
|
24
|
-
userId: string;
|
|
25
|
-
}
|
|
26
22
|
export interface IRChannel {
|
|
27
23
|
id: string;
|
|
28
24
|
name: string;
|
|
@@ -30,6 +26,7 @@ export interface IRChannel {
|
|
|
30
26
|
type: ChannelTypeEnum;
|
|
31
27
|
userIds: string[];
|
|
32
28
|
messages: IRChannelMessage[];
|
|
29
|
+
polls: IServerPoll[];
|
|
33
30
|
}
|
|
34
31
|
export interface IRPub {
|
|
35
32
|
id: string;
|
|
@@ -41,9 +38,6 @@ export interface IRGetInitial {
|
|
|
41
38
|
user: IRUser;
|
|
42
39
|
users: IRUser[];
|
|
43
40
|
settings: Record<string, unknown>;
|
|
44
|
-
polls: (IServerPoll & {
|
|
45
|
-
channelId: number;
|
|
46
|
-
})[];
|
|
47
41
|
}
|
|
48
42
|
export interface IRLogin {
|
|
49
43
|
access_token: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
fill?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: (props: IProps) => ReactElement;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
fill?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: (props: IProps) => ReactElement;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
fill?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: (props: IProps) => ReactElement;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
fill?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: (props: IProps) => ReactElement;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CSSProperties, ReactElement } from 'react';
|
|
2
|
+
interface IProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
fill?: string;
|
|
7
|
+
style?: CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
declare const _default: (props: IProps) => ReactElement;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare const formatDate: (date?: string | null | undefined, formatString?: string) => string;
|
|
2
|
+
export declare const checkDayInterval: (dateLeft: string, dateRight: string) => number;
|
|
3
|
+
export declare const checkDateWhen: (date: string, when: 'today' | 'yesterday' | 'year') => boolean;
|
|
4
|
+
export declare const getPreparedDate: (date?: string | undefined) => string | JSX.Element | null;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vlprojects-chat/chat",
|
|
3
3
|
"author": "vlprojects",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.43",
|
|
5
5
|
"description": "chat",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
"development": ["last 1 chrome version", "last 1 firefox version", "last 1 safari version"]
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@sentry/react": "^6.17.7",
|
|
34
|
+
"@sentry/tracing": "^6.17.7",
|
|
33
35
|
"@emotion/react": "^11.5.0",
|
|
34
36
|
"@emotion/styled": "^11.3.0",
|
|
35
37
|
"@mui/icons-material": "^5.0.4",
|