@vlprojects-chat/chat 0.0.29 → 0.0.33
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/LoadingStatus/LoadingStatus.d.ts +6 -0
- package/dist/components/LoadingStatus/index.d.ts +1 -0
- package/dist/components/LoadingStatus/styles.d.ts +2 -0
- package/dist/components/MessageList/components/SystemMessage/components/ChangedChannel/ChangedChannel.d.ts +2 -1
- package/dist/components/MessageList/components/SystemMessage/components/UserChanged/UserChanged.d.ts +2 -2
- package/dist/components/MessageList/components/SystemMessage/components/UserChangedChannel/UserChangedChannel.d.ts +2 -2
- package/dist/components/MessageList/components/SystemMessage/components/UserJoined/UserJoined.d.ts +5 -4
- package/dist/index.es.js +141 -105
- package/dist/index.js +130 -108
- package/dist/keystone/chat/message.d.ts +33 -0
- package/dist/keystone/ui.d.ts +0 -3
- package/dist/locales/index.d.ts +8 -0
- package/package.json +2 -1
|
@@ -1,6 +1,35 @@
|
|
|
1
1
|
import { Ref } from 'mobx-keystone';
|
|
2
2
|
import { MessageTypeEnum } from '../../types/enums';
|
|
3
3
|
import User from './user';
|
|
4
|
+
import { Root } from '../index';
|
|
5
|
+
export declare enum SystemMessageEnum {
|
|
6
|
+
UserJoinedEvent = "user-joined",
|
|
7
|
+
UserChangedEvent = "user-changed",
|
|
8
|
+
UserChangedChannelEvent = "user-changed-channel",
|
|
9
|
+
ChangedChannelEvent = "changed-channel"
|
|
10
|
+
}
|
|
11
|
+
export interface SystemData {
|
|
12
|
+
event: SystemMessageEnum;
|
|
13
|
+
whoJoined?: Ref<User>;
|
|
14
|
+
whoRenamedChannel?: Ref<User>;
|
|
15
|
+
oldDisplayName?: string;
|
|
16
|
+
newDisplayName?: string;
|
|
17
|
+
newName?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface UserJoinedPayload {
|
|
20
|
+
userId: string;
|
|
21
|
+
}
|
|
22
|
+
export interface UserChangedPayload {
|
|
23
|
+
oldDisplayName: string;
|
|
24
|
+
newDisplayName: string;
|
|
25
|
+
}
|
|
26
|
+
export interface UserChangedChannelPayload {
|
|
27
|
+
userId: string;
|
|
28
|
+
newName: string;
|
|
29
|
+
}
|
|
30
|
+
export interface ChangedChannelEventPayload {
|
|
31
|
+
newName: string;
|
|
32
|
+
}
|
|
4
33
|
declare const Message_base: import("mobx-keystone")._Model<unknown, {
|
|
5
34
|
id: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
6
35
|
text: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
@@ -8,6 +37,7 @@ declare const Message_base: import("mobx-keystone")._Model<unknown, {
|
|
|
8
37
|
user: import("mobx-keystone").MaybeOptionalModelProp<Ref<User> | null>;
|
|
9
38
|
createdAt: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
10
39
|
meta: import("mobx-keystone").MaybeOptionalModelProp<Record<string, unknown>>;
|
|
40
|
+
systemData: import("mobx-keystone").MaybeOptionalModelProp<SystemData | null>;
|
|
11
41
|
}, import("mobx-keystone").SnapshotInOfObject<import("mobx-keystone").ModelPropsToCreationData<{
|
|
12
42
|
id: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
13
43
|
text: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
@@ -15,6 +45,7 @@ declare const Message_base: import("mobx-keystone")._Model<unknown, {
|
|
|
15
45
|
user: import("mobx-keystone").MaybeOptionalModelProp<Ref<User> | null>;
|
|
16
46
|
createdAt: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
17
47
|
meta: import("mobx-keystone").MaybeOptionalModelProp<Record<string, unknown>>;
|
|
48
|
+
systemData: import("mobx-keystone").MaybeOptionalModelProp<SystemData | null>;
|
|
18
49
|
}>>, import("mobx-keystone").SnapshotOutOfObject<import("mobx-keystone").ModelPropsToData<{
|
|
19
50
|
id: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
20
51
|
text: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
@@ -22,8 +53,10 @@ declare const Message_base: import("mobx-keystone")._Model<unknown, {
|
|
|
22
53
|
user: import("mobx-keystone").MaybeOptionalModelProp<Ref<User> | null>;
|
|
23
54
|
createdAt: import("mobx-keystone").MaybeOptionalModelProp<string>;
|
|
24
55
|
meta: import("mobx-keystone").MaybeOptionalModelProp<Record<string, unknown>>;
|
|
56
|
+
systemData: import("mobx-keystone").MaybeOptionalModelProp<SystemData | null>;
|
|
25
57
|
}>>>;
|
|
26
58
|
export default class Message extends Message_base {
|
|
27
59
|
get getUser(): User | undefined;
|
|
60
|
+
loadSystemData(root: Root, event: SystemMessageEnum, data: unknown): void;
|
|
28
61
|
}
|
|
29
62
|
export {};
|
package/dist/keystone/ui.d.ts
CHANGED
|
@@ -2,19 +2,16 @@ 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
|
-
initialized: import("mobx-keystone").ModelProp<boolean, boolean | null | undefined, boolean, boolean | null | undefined, string, false, string>;
|
|
6
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>;
|
|
7
6
|
}, import("mobx-keystone").SnapshotInOfObject<import("mobx-keystone").ModelPropsToCreationData<{
|
|
8
7
|
route: import("mobx-keystone").OptionalModelProp<string>;
|
|
9
8
|
channelId: import("mobx-keystone").ModelProp<string, string | null | undefined, string, string | null | undefined, string, false, string>;
|
|
10
9
|
params: import("mobx-keystone").ModelProp<Record<string, unknown>, Record<string, unknown> | null | undefined, Record<string, unknown>, Record<string, unknown> | null | undefined, string, false, string>;
|
|
11
|
-
initialized: import("mobx-keystone").ModelProp<boolean, boolean | null | undefined, boolean, boolean | null | undefined, string, false, string>;
|
|
12
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>;
|
|
13
11
|
}>>, import("mobx-keystone").SnapshotOutOfObject<import("mobx-keystone").ModelPropsToData<{
|
|
14
12
|
route: import("mobx-keystone").OptionalModelProp<string>;
|
|
15
13
|
channelId: import("mobx-keystone").ModelProp<string, string | null | undefined, string, string | null | undefined, string, false, string>;
|
|
16
14
|
params: import("mobx-keystone").ModelProp<Record<string, unknown>, Record<string, unknown> | null | undefined, Record<string, unknown>, Record<string, unknown> | null | undefined, string, false, string>;
|
|
17
|
-
initialized: import("mobx-keystone").ModelProp<boolean, boolean | null | undefined, boolean, boolean | null | undefined, string, false, string>;
|
|
18
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>;
|
|
19
16
|
}>>>;
|
|
20
17
|
export default class UI extends UI_base {
|
package/dist/locales/index.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
en: {
|
|
3
|
+
loadingSocket: string;
|
|
4
|
+
loadingInitial: string;
|
|
5
|
+
loadingSettings: string;
|
|
6
|
+
globalError: string;
|
|
3
7
|
messageInputPlaceholder: string;
|
|
4
8
|
channelName: string;
|
|
5
9
|
newChannel: string;
|
|
@@ -64,6 +68,10 @@ declare const _default: {
|
|
|
64
68
|
systemMessageChangedChannelName: string;
|
|
65
69
|
};
|
|
66
70
|
ru: {
|
|
71
|
+
loadingSocket: string;
|
|
72
|
+
loadingInitial: string;
|
|
73
|
+
loadingSettings: string;
|
|
74
|
+
globalError: string;
|
|
67
75
|
messageInputPlaceholder: string;
|
|
68
76
|
channelName: string;
|
|
69
77
|
newChannel: string;
|
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.33",
|
|
5
5
|
"description": "chat",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "dist/index.js",
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"mobx-utils": "^6.0.4",
|
|
53
53
|
"notistack": "^2.0.2",
|
|
54
54
|
"qs": "^6.10.1",
|
|
55
|
+
"react-error-boundary": "^3.1.4",
|
|
55
56
|
"react-final-form": "^6.5.7",
|
|
56
57
|
"react-final-form-arrays": "^3.1.3",
|
|
57
58
|
"react-intersection-observer": "^8.33.0",
|