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.
Files changed (35) 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/QuestionBank/components/CheckboxCellRenderer.d.ts +3 -0
  25. package/dist/containers/QuestionBank/configs/type.d.ts +10 -0
  26. package/dist/containers/QuestionBank/hooks/useQuestionSurveyList.d.ts +7 -1
  27. package/dist/index.css +12 -0
  28. package/dist/index.js +305 -79
  29. package/dist/index.js.map +1 -1
  30. package/dist/index.modern.js +305 -79
  31. package/dist/index.modern.js.map +1 -1
  32. package/dist/services/dashboardService.d.ts +1 -0
  33. package/dist/services/geminiAiService.d.ts +8 -0
  34. package/dist/services/questionService.d.ts +2 -0
  35. package/package.json +2 -2
@@ -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;
@@ -0,0 +1,3 @@
1
+ import { ICheckboxCellRenderer } from "../configs/type";
2
+ declare const CheckboxCellRenderer: ({ checked, onChange }: ICheckboxCellRenderer) => JSX.Element;
3
+ export default CheckboxCellRenderer;
@@ -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;