robbyson-frontend-library 1.0.31 → 1.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.
@@ -13,11 +13,11 @@ export var TypeChat;
13
13
  TypeChat["GROUP"] = "group";
14
14
  TypeChat["CHATBOT"] = "chat-bot";
15
15
  })(TypeChat || (TypeChat = {}));
16
- var Classification;
17
- (function (Classification) {
18
- Classification["TREE_MESSAGE"] = "tree-message";
19
- Classification["ANGEL_FRIEND"] = "angel-friend";
20
- })(Classification || (Classification = {}));
16
+ export var ChatClassification;
17
+ (function (ChatClassification) {
18
+ ChatClassification["TREE_MESSAGE"] = "tree-message";
19
+ ChatClassification["ANGEL_FRIEND"] = "angel-friend";
20
+ })(ChatClassification || (ChatClassification = {}));
21
21
  var IMAGE_EXTENSIONS = ["jpg", "jpeg", "png", "gif"];
22
22
  var ALLOWED_EXTENSIONS = new Set(__spreadArray(__spreadArray([], IMAGE_EXTENSIONS, true), [
23
23
  "mp4",
@@ -31,7 +31,7 @@ var ALLOWED_EXTENSIONS = new Set(__spreadArray(__spreadArray([], IMAGE_EXTENSION
31
31
  ], false));
32
32
  export var ChatConstants = {
33
33
  TypeChat: TypeChat,
34
- Classification: Classification,
34
+ ChatClassification: ChatClassification,
35
35
  ALLOWED_EXTENSIONS: ALLOWED_EXTENSIONS,
36
- IMAGE_EXTENSIONS: IMAGE_EXTENSIONS
36
+ IMAGE_EXTENSIONS: IMAGE_EXTENSIONS,
37
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "robbyson-frontend-library",
3
- "version": "1.0.31",
3
+ "version": "1.0.33",
4
4
  "description": "Robbyson frontend Library",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT",
@@ -7,4 +7,5 @@ export interface ICheckboxProps<T> extends React.InputHTMLAttributes<T>, IBaseCo
7
7
  errorTextLocaleHandle?: string;
8
8
  hasError?: boolean;
9
9
  id: string;
10
+ preventPropagation?: boolean
10
11
  }
@@ -48,3 +48,8 @@ export type IHeaderContextMenuButtons =
48
48
  | "my_ead"
49
49
  | "all_courses"
50
50
  | "trail_courses";
51
+
52
+ export interface IShouldHandleButtonClick {
53
+ buttonName: string;
54
+ activeButton?: IHeaderContextMenuButtons;
55
+ }
@@ -18,6 +18,7 @@ interface Header {
18
18
  };
19
19
  element?: (props?: any) => React.ReactNode;
20
20
  onClickHeader?: () => void;
21
+ elementBody?: (props?: any) => React.ReactNode;
21
22
  isReactElement?: boolean;
22
23
  color: string;
23
24
  columnColor: string;
@@ -4,7 +4,7 @@ export enum TypeChat {
4
4
  CHATBOT = "chat-bot",
5
5
  }
6
6
 
7
- enum Classification {
7
+ export enum ChatClassification {
8
8
  TREE_MESSAGE = "tree-message",
9
9
  ANGEL_FRIEND = "angel-friend",
10
10
  }
@@ -23,10 +23,9 @@ const ALLOWED_EXTENSIONS = new Set([
23
23
  "pptx",
24
24
  ]);
25
25
 
26
-
27
26
  export const ChatConstants = {
28
27
  TypeChat,
29
- Classification,
28
+ ChatClassification,
30
29
  ALLOWED_EXTENSIONS,
31
- IMAGE_EXTENSIONS
30
+ IMAGE_EXTENSIONS,
32
31
  };
@@ -1,4 +1,4 @@
1
- import { TypeChat } from "../constants";
1
+ import { ChatClassification, TypeChat } from "../constants";
2
2
  import { UserListModel } from "./user-list.model";
3
3
 
4
4
  export class ChatModel {
@@ -22,6 +22,7 @@ export class ChatModel {
22
22
  admin?: boolean;
23
23
  active?: boolean;
24
24
  deleted?: boolean;
25
+ classification?: ChatClassification;
25
26
  }
26
27
 
27
28
  export class ChatUser {
@@ -1,10 +1,10 @@
1
1
  export class ProfileInfoModel {
2
2
  nickname: string;
3
3
  about: string;
4
- notAllowAngelFriend: boolean;
4
+ allowAngelFriend: boolean;
5
5
  currentPassword: string;
6
6
  newPassword: string;
7
- confirmPassword: string;
7
+ confirmationNewPassword: string;
8
8
  }
9
9
 
10
10
  export class ProfileImageModel {
@@ -1,5 +1,5 @@
1
1
  export class UpdatePasswordModel {
2
2
  currentPassword: string;
3
3
  newPassword: string;
4
- confirmPassword: string;
4
+ confirmationNewPassword: string;
5
5
  }
@@ -11,6 +11,10 @@ export interface IChatRepository {
11
11
  conversationId: string,
12
12
  params: ChatDTO.IUpdateGroupDTO
13
13
  ): Promise<void>;
14
+ updateClassification(
15
+ conversationId: string,
16
+ params: ChatDTO.IUpdateClassificationDTO
17
+ ): Promise<void>;
14
18
  addUsersToConversation(
15
19
  conversationId: string,
16
20
  users: UserDTO.GetUserDTO[]
@@ -45,7 +49,7 @@ export interface IChatRepository {
45
49
  id: number,
46
50
  user: UserDTO.GetUserDTO
47
51
  ): Promise<void>;
48
- readConversationMessages(conversationId: string): void;
52
+ readConversationMessages(conversationId: string): Promise<void>;
49
53
  sendBroadcast(body: {
50
54
  encryptionKey: string;
51
55
  message: string;
@@ -24,6 +24,7 @@ export interface IAngelFriendService {
24
24
  acceptGodfather(data: {
25
25
  _id: number | string;
26
26
  accepted: boolean;
27
+ lastConfigurationToAF?: string;
27
28
  }): Promise<string>;
28
29
  removeSponsorship(sponsorship_id: string): Promise<string>;
29
30
  answerSponsorship(
@@ -16,6 +16,10 @@ export interface IChatService {
16
16
  conversationId: string,
17
17
  parameters: ChatDTO.IUpdateGroupDTO
18
18
  ): Promise<void>;
19
+ updateClassification(
20
+ conversationId: string,
21
+ params: ChatDTO.IUpdateClassificationDTO
22
+ ): Promise<void>;
19
23
  addUsersToConversation(
20
24
  conversationId: string,
21
25
  users: UserDTO.GetUserDTO[]
@@ -1,4 +1,4 @@
1
- import { TypeChat } from "../../constants";
1
+ import { ChatClassification, TypeChat } from "../../constants";
2
2
  import { ChatModel, MessageModel, UserListModel } from "../../models";
3
3
  import { GetUserDTO } from "./user.dto";
4
4
 
@@ -22,6 +22,7 @@ export interface ICreateConversationDTO {
22
22
  temporary?: boolean;
23
23
  photo?: string;
24
24
  admin?: boolean;
25
+ classification?: ChatClassification;
25
26
  }
26
27
 
27
28
  export interface IUpdateGroupDTO {
@@ -30,6 +31,10 @@ export interface IUpdateGroupDTO {
30
31
  photo?: string;
31
32
  }
32
33
 
34
+ export interface IUpdateClassificationDTO {
35
+ classification: ChatClassification;
36
+ }
37
+
33
38
  export interface IChatPermissions {
34
39
  canCreateGroup: boolean;
35
40
  canReceive: boolean;
@@ -73,6 +78,7 @@ export interface IGetMessagesDTO {
73
78
  }
74
79
 
75
80
  export type MessageBotType =
81
+ | "table"
76
82
  | "text"
77
83
  | "image"
78
84
  | "button"
@@ -95,6 +101,15 @@ export interface IChatBotMessage {
95
101
  child: [];
96
102
  requestPayload?: RequestPayload;
97
103
  }[];
104
+ header?: { value: string }[];
105
+ };
106
+ }
107
+
108
+ export interface IChatBotTableMessage {
109
+ footer: string;
110
+ payload: {
111
+ content: { value: string }[][];
112
+ header: { value: string }[];
98
113
  };
99
114
  }
100
115
 
@@ -111,7 +111,7 @@ export interface ITreeApp {
111
111
  mediaResult: string;
112
112
  minResult: string;
113
113
  };
114
- recoveredDataTree: TreeModel;
114
+ recoveredDataTree: TreeModel["data"];
115
115
  sourceDataTree: TreeModel;
116
116
  };
117
117
  breadcrumb: [];