mario-education 2.4.490-prod → 2.4.490-release
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/icons/ArrowBackIcon.d.ts +4 -0
- package/dist/components/icons/ArrowRightIcon.d.ts +2 -0
- package/dist/components/icons/DarkIcon.d.ts +4 -0
- package/dist/components/icons/IdentifyIcon.d.ts +2 -0
- package/dist/components/icons/LightIcon.d.ts +4 -0
- package/dist/components/icons/MarioAIIcon.d.ts +2 -0
- package/dist/components/icons/MoreIcon.d.ts +2 -0
- package/dist/components/icons/SummarizeIcon.d.ts +2 -0
- package/dist/components/icons/UnderstandIcon.d.ts +2 -0
- package/dist/containers/MarioAi/cofigs/constants.d.ts +14 -1
- package/dist/containers/MarioAi/cofigs/type.d.ts +94 -0
- package/dist/containers/MarioAi/components/CardHeader.d.ts +4 -0
- package/dist/containers/MarioAi/components/ChatContent.d.ts +9 -0
- package/dist/containers/MarioAi/components/ChatHeader.d.ts +10 -0
- package/dist/containers/MarioAi/components/ChatMessage.d.ts +8 -0
- package/dist/containers/MarioAi/components/HeaderAI.d.ts +3 -0
- package/dist/containers/MarioAi/components/ListPrompts.d.ts +17 -0
- package/dist/containers/MarioAi/hooks/useAIChat.d.ts +12 -0
- package/dist/containers/MarioAi/hooks/useAIMario.d.ts +19 -0
- package/dist/containers/MarioAi/hooks/useHistoryPrompt.d.ts +10 -0
- package/dist/containers/MarioAi/views/AIMario.d.ts +2 -0
- package/dist/containers/MarioAi/views/ChatWithAI.d.ts +2 -0
- package/dist/containers/MarioAi/views/ViewHistoryPrompt.d.ts +2 -0
- package/dist/containers/QuestionBank/components/CheckboxCellRenderer.d.ts +3 -0
- package/dist/containers/QuestionBank/configs/type.d.ts +10 -0
- package/dist/containers/QuestionBank/hooks/useQuestionSurveyList.d.ts +7 -1
- package/dist/index.css +12 -0
- package/dist/index.js +305 -79
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +305 -79
- package/dist/index.modern.js.map +1 -1
- package/dist/services/dashboardService.d.ts +1 -0
- package/dist/services/geminiAiService.d.ts +8 -0
- package/dist/services/questionService.d.ts +2 -0
- package/package.json +2 -2
|
@@ -1,2 +1,15 @@
|
|
|
1
|
-
import { IOptionDate } from "./type";
|
|
1
|
+
import { ICardAI, IOptionDate } from "./type";
|
|
2
2
|
export declare const CALENDAR_OPTIONS: IOptionDate[];
|
|
3
|
+
export declare const promptIcons: (() => JSX.Element)[];
|
|
4
|
+
export declare const CARD_AI_HEADER: ICardAI[];
|
|
5
|
+
export declare const THEME: {
|
|
6
|
+
LIGHT: string;
|
|
7
|
+
DARK: string;
|
|
8
|
+
};
|
|
9
|
+
export declare enum MessageRole {
|
|
10
|
+
System = 0,
|
|
11
|
+
User = 1,
|
|
12
|
+
Model = 2
|
|
13
|
+
}
|
|
14
|
+
export declare const DEFAULT_START_DATE: number;
|
|
15
|
+
export declare const DEFAULT_END_DATE: number;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MessageRole } from "./constants";
|
|
1
2
|
export interface ISummarizeResponse {
|
|
2
3
|
studentName: string;
|
|
3
4
|
answer: string;
|
|
@@ -11,3 +12,96 @@ export interface IOptionDate {
|
|
|
11
12
|
startDate: number;
|
|
12
13
|
endDate: number;
|
|
13
14
|
}
|
|
15
|
+
export interface ICardAI {
|
|
16
|
+
title: string;
|
|
17
|
+
description: string;
|
|
18
|
+
icon: any;
|
|
19
|
+
link?: string;
|
|
20
|
+
id: number;
|
|
21
|
+
}
|
|
22
|
+
export interface ICardHeader {
|
|
23
|
+
id: number;
|
|
24
|
+
name: string;
|
|
25
|
+
description: string;
|
|
26
|
+
goToChat: Function;
|
|
27
|
+
icon: any;
|
|
28
|
+
}
|
|
29
|
+
export interface IChat {
|
|
30
|
+
message: string;
|
|
31
|
+
text?: string;
|
|
32
|
+
time: string;
|
|
33
|
+
isUser: boolean;
|
|
34
|
+
options?: IOptionDate[];
|
|
35
|
+
}
|
|
36
|
+
export interface IPrompt {
|
|
37
|
+
name: string;
|
|
38
|
+
description: string;
|
|
39
|
+
temperature: number;
|
|
40
|
+
maxOutputTokens: number;
|
|
41
|
+
stopSequences: string;
|
|
42
|
+
topP: number;
|
|
43
|
+
topK: number;
|
|
44
|
+
frequencyPenalty: number;
|
|
45
|
+
presencePenalty: number;
|
|
46
|
+
aiModel: string;
|
|
47
|
+
messages: IMessage[];
|
|
48
|
+
id: number;
|
|
49
|
+
instruction: instructionType;
|
|
50
|
+
sampleData: string;
|
|
51
|
+
question: string;
|
|
52
|
+
}
|
|
53
|
+
export interface IMessage {
|
|
54
|
+
role: MessageRole;
|
|
55
|
+
message: string;
|
|
56
|
+
}
|
|
57
|
+
export declare enum instructionType {
|
|
58
|
+
CheckIn = 0,
|
|
59
|
+
OneToOne = 1,
|
|
60
|
+
Conference = 2,
|
|
61
|
+
CheckInAndOneToOne = 3
|
|
62
|
+
}
|
|
63
|
+
export interface IHeaderAi {
|
|
64
|
+
prompts: IPrompt[];
|
|
65
|
+
goToChat: Function;
|
|
66
|
+
generateIcons: Function;
|
|
67
|
+
}
|
|
68
|
+
export interface IHistoryPrompt {
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
temperature: number;
|
|
72
|
+
maxOutputTokens: number;
|
|
73
|
+
stopSequences: string;
|
|
74
|
+
topP: number;
|
|
75
|
+
topK: number;
|
|
76
|
+
frequencyPenalty: number;
|
|
77
|
+
presencePenalty: number;
|
|
78
|
+
aiModel: string;
|
|
79
|
+
messages: IChat[];
|
|
80
|
+
id?: number;
|
|
81
|
+
instruction: instructionType;
|
|
82
|
+
question: string;
|
|
83
|
+
startTime?: number;
|
|
84
|
+
endTime?: number;
|
|
85
|
+
startDate?: string;
|
|
86
|
+
endDate?: string;
|
|
87
|
+
grade: string;
|
|
88
|
+
promptId: number;
|
|
89
|
+
output: string;
|
|
90
|
+
calendar: string;
|
|
91
|
+
createdAt: string;
|
|
92
|
+
}
|
|
93
|
+
export interface IPromptParams {
|
|
94
|
+
schoolId?: number;
|
|
95
|
+
startDate?: number;
|
|
96
|
+
endDate?: number;
|
|
97
|
+
grade?: string;
|
|
98
|
+
question?: string;
|
|
99
|
+
calendar?: string;
|
|
100
|
+
instruction?: instructionType;
|
|
101
|
+
}
|
|
102
|
+
export interface IAnswer {
|
|
103
|
+
answer: string;
|
|
104
|
+
fullName: string;
|
|
105
|
+
grade: string;
|
|
106
|
+
question: string;
|
|
107
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IHistoryPrompt } from '../cofigs/type';
|
|
3
|
+
interface IProps {
|
|
4
|
+
maxHeight: number;
|
|
5
|
+
historyPrompts: IHistoryPrompt[];
|
|
6
|
+
handleClickAction: Function;
|
|
7
|
+
handleCloseAction: Function;
|
|
8
|
+
anchorEl: HTMLButtonElement | null;
|
|
9
|
+
popoverId?: string;
|
|
10
|
+
openPopover: boolean;
|
|
11
|
+
removeData: Function;
|
|
12
|
+
selectId: number | null;
|
|
13
|
+
goToViewHistory: Function;
|
|
14
|
+
generateIcons: Function;
|
|
15
|
+
}
|
|
16
|
+
declare const ListPrompts: FC<IProps>;
|
|
17
|
+
export default ListPrompts;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IChat, IOptionDate, IPrompt } from "../cofigs/type";
|
|
3
|
+
declare const useAIChat: () => {
|
|
4
|
+
theme: string;
|
|
5
|
+
setTheme: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
6
|
+
goBack: () => void;
|
|
7
|
+
isOpenSideBar: any;
|
|
8
|
+
prompt: IPrompt | undefined;
|
|
9
|
+
chats: IChat[];
|
|
10
|
+
handleSelectTime: (value: IOptionDate) => void;
|
|
11
|
+
};
|
|
12
|
+
export default useAIChat;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IHistoryPrompt, IPrompt } from "../cofigs/type";
|
|
3
|
+
declare const useAIMario: () => {
|
|
4
|
+
handleClickAction: (event: React.MouseEvent<HTMLButtonElement>, id: number) => void;
|
|
5
|
+
handleCloseAction: () => void;
|
|
6
|
+
anchorEl: HTMLButtonElement | null;
|
|
7
|
+
popoverId: string | undefined;
|
|
8
|
+
openPopover: boolean;
|
|
9
|
+
goToChat: (id: number) => void;
|
|
10
|
+
isOpenSideBar: any;
|
|
11
|
+
height: number;
|
|
12
|
+
aiMarioRef: import("react").RefObject<HTMLDivElement>;
|
|
13
|
+
prompts: IPrompt[];
|
|
14
|
+
historyPrompts: IHistoryPrompt[];
|
|
15
|
+
removeData: (id: number) => Promise<void>;
|
|
16
|
+
selectId: number | null;
|
|
17
|
+
goToViewHistory: (id: number) => void;
|
|
18
|
+
};
|
|
19
|
+
export default useAIMario;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IHistoryPrompt } from "../cofigs/type";
|
|
3
|
+
declare const useHistoryPrompt: () => {
|
|
4
|
+
theme: string;
|
|
5
|
+
setTheme: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
6
|
+
goBack: () => void;
|
|
7
|
+
isOpenSideBar: any;
|
|
8
|
+
prompt: IHistoryPrompt | undefined;
|
|
9
|
+
};
|
|
10
|
+
export default useHistoryPrompt;
|
|
@@ -3,3 +3,13 @@ export interface IQuestionLabel {
|
|
|
3
3
|
fromLabels: string[];
|
|
4
4
|
toLabels: string[];
|
|
5
5
|
}
|
|
6
|
+
export interface ICheckboxCellRenderer {
|
|
7
|
+
checked: boolean;
|
|
8
|
+
onChange: Function;
|
|
9
|
+
}
|
|
10
|
+
export interface IQuestionChecked {
|
|
11
|
+
questionCheckedIds: number[];
|
|
12
|
+
questionIds: number[];
|
|
13
|
+
questionList: any[];
|
|
14
|
+
categoryId?: any;
|
|
15
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { IQuestionChecked } from "../configs/type";
|
|
2
3
|
declare const useQuestionSurveyList: (isDefaultQuestion: boolean, isDefaultClassReflection: boolean, isDefaultConference?: boolean | undefined, isDefaultSurvey?: boolean | undefined, categorySelected?: any, setHasChangeQuestion?: any, setMaxHeight?: any) => {
|
|
3
|
-
gridOptions: any;
|
|
4
4
|
setRef: (node: any) => any;
|
|
5
5
|
questionList: any;
|
|
6
6
|
totalItems: any;
|
|
@@ -17,5 +17,11 @@ declare const useQuestionSurveyList: (isDefaultQuestion: boolean, isDefaultClass
|
|
|
17
17
|
handleChangeInputSearch: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
18
18
|
inputSearch: import("react").MutableRefObject<any>;
|
|
19
19
|
goToDetailSurvey: (id?: number | undefined) => void;
|
|
20
|
+
columnDefs: any;
|
|
21
|
+
QuestionPreview: (props: any) => JSX.Element;
|
|
22
|
+
renderUserQuestion: (params: any) => JSX.Element;
|
|
23
|
+
questionSelected: IQuestionChecked;
|
|
24
|
+
handleSelectQuestion: (id: number, isSelectAll?: boolean | undefined) => boolean;
|
|
25
|
+
removeDataBulk: () => void;
|
|
20
26
|
};
|
|
21
27
|
export default useQuestionSurveyList;
|
package/dist/index.css
CHANGED
|
@@ -1817,6 +1817,18 @@ datalist option:focus {
|
|
|
1817
1817
|
font-size: 14px;
|
|
1818
1818
|
font-weight: 500; }
|
|
1819
1819
|
|
|
1820
|
+
._2l6KP {
|
|
1821
|
+
width: 18px;
|
|
1822
|
+
height: 18px;
|
|
1823
|
+
margin-left: 10px;
|
|
1824
|
+
cursor: pointer; }
|
|
1825
|
+
|
|
1826
|
+
._3ug2Y {
|
|
1827
|
+
height: 38px; }
|
|
1828
|
+
|
|
1829
|
+
._3X-y6 {
|
|
1830
|
+
font-weight: 500; }
|
|
1831
|
+
|
|
1820
1832
|
._1aeZm {
|
|
1821
1833
|
display: flex;
|
|
1822
1834
|
flex-direction: column;
|