mario-education 2.4.487-feedback → 2.4.488-ai

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.
Files changed (36) hide show
  1. package/dist/components/icons/ArrowBackIcon.d.ts +4 -0
  2. package/dist/components/icons/ArrowRightIcon.d.ts +2 -0
  3. package/dist/components/icons/DarkIcon.d.ts +4 -0
  4. package/dist/components/icons/IdentifyIcon.d.ts +2 -0
  5. package/dist/components/icons/LightIcon.d.ts +4 -0
  6. package/dist/components/icons/MarioAIIcon.d.ts +2 -0
  7. package/dist/components/icons/MoreIcon.d.ts +2 -0
  8. package/dist/components/icons/SummarizeIcon.d.ts +2 -0
  9. package/dist/components/icons/UnderstandIcon.d.ts +2 -0
  10. package/dist/containers/MarioAi/cofigs/constants.d.ts +14 -1
  11. package/dist/containers/MarioAi/cofigs/type.d.ts +94 -0
  12. package/dist/containers/MarioAi/components/CardHeader.d.ts +4 -0
  13. package/dist/containers/MarioAi/components/ChatContent.d.ts +9 -0
  14. package/dist/containers/MarioAi/components/ChatHeader.d.ts +10 -0
  15. package/dist/containers/MarioAi/components/ChatMessage.d.ts +8 -0
  16. package/dist/containers/MarioAi/components/HeaderAI.d.ts +3 -0
  17. package/dist/containers/MarioAi/components/ListPrompts.d.ts +17 -0
  18. package/dist/containers/MarioAi/hooks/useAIChat.d.ts +12 -0
  19. package/dist/containers/MarioAi/hooks/useAIMario.d.ts +19 -0
  20. package/dist/containers/MarioAi/hooks/useHistoryPrompt.d.ts +10 -0
  21. package/dist/containers/MarioAi/views/AIMario.d.ts +2 -0
  22. package/dist/containers/MarioAi/views/ChatWithAI.d.ts +2 -0
  23. package/dist/containers/MarioAi/views/ViewHistoryPrompt.d.ts +2 -0
  24. package/dist/containers/SurveyDashboard/hooks/useListSurvey.d.ts +1 -4
  25. package/dist/containers/TemplateSurvey/hooks/useTemplateCateDetail.d.ts +0 -2
  26. package/dist/containers/TemplateSurvey/hooks/useTemplateCateList.d.ts +1 -1
  27. package/dist/index.css +478 -475
  28. package/dist/index.d.ts +5 -2
  29. package/dist/index.js +1321 -407
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.modern.js +1318 -407
  32. package/dist/index.modern.js.map +1 -1
  33. package/dist/services/dashboardService.d.ts +0 -1
  34. package/dist/services/geminiAiService.d.ts +8 -0
  35. package/dist/services/questionCategoryService.d.ts +1 -1
  36. package/package.json +5 -3
@@ -0,0 +1,4 @@
1
+ declare const ArrowBackIcon: ({ color }: {
2
+ color?: string | undefined;
3
+ }) => JSX.Element;
4
+ export default ArrowBackIcon;
@@ -0,0 +1,2 @@
1
+ declare const ArrowRightIcon: () => JSX.Element;
2
+ export default ArrowRightIcon;
@@ -0,0 +1,4 @@
1
+ declare const DarkIcon: ({ color }: {
2
+ color?: string | undefined;
3
+ }) => JSX.Element;
4
+ export default DarkIcon;
@@ -0,0 +1,2 @@
1
+ declare const IdentifyIcon: () => JSX.Element;
2
+ export default IdentifyIcon;
@@ -0,0 +1,4 @@
1
+ declare const LightIcon: ({ color }: {
2
+ color?: string | undefined;
3
+ }) => JSX.Element;
4
+ export default LightIcon;
@@ -0,0 +1,2 @@
1
+ declare const MarioAIIcon: () => JSX.Element;
2
+ export default MarioAIIcon;
@@ -0,0 +1,2 @@
1
+ declare const MoreIcon: () => JSX.Element;
2
+ export default MoreIcon;
@@ -0,0 +1,2 @@
1
+ declare const SummarizeIcon: () => JSX.Element;
2
+ export default SummarizeIcon;
@@ -0,0 +1,2 @@
1
+ declare const UnderstandIcon: () => JSX.Element;
2
+ export default UnderstandIcon;
@@ -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,4 @@
1
+ import { FC } from 'react';
2
+ import { ICardHeader } from '../cofigs/type';
3
+ declare const CardHeader: FC<ICardHeader>;
4
+ export default CardHeader;
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ import { IChat } from '../cofigs/type';
3
+ interface ChatContentProps {
4
+ theme: string;
5
+ chats: IChat[];
6
+ onSelectTime?: Function;
7
+ }
8
+ declare const ChatContent: FC<ChatContentProps>;
9
+ export default ChatContent;
@@ -0,0 +1,10 @@
1
+ import { FC } from 'react';
2
+ interface ChatHeaderProps {
3
+ theme: string;
4
+ setTheme: (theme: string) => void;
5
+ goBack: () => void;
6
+ isOpenSideBar: boolean;
7
+ name: string;
8
+ }
9
+ declare const ChatHeader: FC<ChatHeaderProps>;
10
+ export default ChatHeader;
@@ -0,0 +1,8 @@
1
+ interface IChatMessage {
2
+ isUser: boolean;
3
+ message: string;
4
+ options?: string[];
5
+ time?: string;
6
+ }
7
+ declare const ChatMessage: ({ isUser, message, options, time }: IChatMessage) => JSX.Element;
8
+ export default ChatMessage;
@@ -0,0 +1,3 @@
1
+ import { IHeaderAi } from '../cofigs/type';
2
+ declare const HeaderAI: ({ prompts, goToChat, generateIcons }: IHeaderAi) => JSX.Element;
3
+ export default HeaderAI;
@@ -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;
@@ -0,0 +1,2 @@
1
+ declare const AIMario: () => JSX.Element;
2
+ export default AIMario;
@@ -0,0 +1,2 @@
1
+ declare const ChatWithAI: () => JSX.Element;
2
+ export default ChatWithAI;
@@ -0,0 +1,2 @@
1
+ declare const ViewHistoryPrompt: () => JSX.Element;
2
+ export default ViewHistoryPrompt;
@@ -2,7 +2,7 @@
2
2
  import { FILTER_SURVEY, SURVEY_RESPONSE, TOTAL_TYPE } from "../configs/types";
3
3
  import { TYPE_SURVEY_OPTION } from "../configs/constants";
4
4
  import { MaterialUiPickersDate } from "@material-ui/pickers/typings/date";
5
- declare const useListSurvey: (pageSize?: number | undefined) => {
5
+ declare const useListSurvey: () => {
6
6
  itemSelectedId: number;
7
7
  itemSelectedStudentId: number;
8
8
  changeFilters: (updatedFilters: any) => void;
@@ -44,8 +44,5 @@ declare const useListSurvey: (pageSize?: number | undefined) => {
44
44
  handleCloseModelLink: () => void;
45
45
  handleCopyToClipboard: (text: string) => void;
46
46
  linkAnonymousSurvey: string;
47
- goToTemplateSurvey: () => void;
48
- goToDashboardSurvey: () => void;
49
- goToSurveyList: () => void;
50
47
  };
51
48
  export default useListSurvey;
@@ -1,8 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  declare type questionCateDetail = {
3
3
  name: string;
4
- description?: string;
5
- isFavorite?: boolean;
6
4
  questionIds?: number[];
7
5
  };
8
6
  declare type TemplateQuestion = {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- declare const useTemplateCateList: (isFavorite?: boolean | undefined) => {
2
+ declare const useTemplateCateList: () => {
3
3
  questionCateList: any;
4
4
  totalItems: any;
5
5
  filters: import("mario-core").Filter;