analytica-frontend-lib 1.1.63 → 1.1.65

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.
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
2
+ import { ReactNode, Dispatch, SetStateAction } from 'react';
3
3
 
4
4
  /**
5
5
  * Types for notification system
@@ -200,6 +200,11 @@ interface NotificationApiClient {
200
200
  }>;
201
201
  }
202
202
 
203
+ /**
204
+ * Synchronizes notification state when dropdown closes externally
205
+ * This ensures the notification icon state matches the dropdown state
206
+ */
207
+ declare const syncNotificationState: (open: boolean, isNotificationActive: boolean, setActiveStates: Dispatch<SetStateAction<Record<string, boolean>>>, key?: string) => void;
203
208
  interface NotificationItem extends Omit<Notification, 'createdAt'> {
204
209
  time: string;
205
210
  createdAt: string | Date;
@@ -414,4 +419,4 @@ declare const NotificationCard: (props: NotificationCardProps) => react_jsx_runt
414
419
  */
415
420
  declare const LegacyNotificationCard: (props: LegacyNotificationCardProps) => react_jsx_runtime.JSX.Element;
416
421
 
417
- export { type BackendNotification as B, type FetchNotificationsParams as F, type LegacyNotificationCardProps as L, type NotificationApiClient as N, type Notification as a, type NotificationGroup as b, NotificationEntityType as c, type NotificationType as d, NotificationCard as e, type NotificationItem as f, type BackendNotificationsResponse as g, type NotificationsResponse as h, type NotificationCardProps as i, LegacyNotificationCard as j };
422
+ export { type BackendNotification as B, type FetchNotificationsParams as F, type LegacyNotificationCardProps as L, type NotificationApiClient as N, type Notification as a, type NotificationGroup as b, NotificationEntityType as c, type NotificationType as d, NotificationCard as e, type NotificationItem as f, type BackendNotificationsResponse as g, type NotificationsResponse as h, type NotificationCardProps as i, LegacyNotificationCard as j, syncNotificationState as s };
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { ReactNode } from 'react';
2
+ import { ReactNode, Dispatch, SetStateAction } from 'react';
3
3
 
4
4
  /**
5
5
  * Types for notification system
@@ -200,6 +200,11 @@ interface NotificationApiClient {
200
200
  }>;
201
201
  }
202
202
 
203
+ /**
204
+ * Synchronizes notification state when dropdown closes externally
205
+ * This ensures the notification icon state matches the dropdown state
206
+ */
207
+ declare const syncNotificationState: (open: boolean, isNotificationActive: boolean, setActiveStates: Dispatch<SetStateAction<Record<string, boolean>>>, key?: string) => void;
203
208
  interface NotificationItem extends Omit<Notification, 'createdAt'> {
204
209
  time: string;
205
210
  createdAt: string | Date;
@@ -414,4 +419,4 @@ declare const NotificationCard: (props: NotificationCardProps) => react_jsx_runt
414
419
  */
415
420
  declare const LegacyNotificationCard: (props: LegacyNotificationCardProps) => react_jsx_runtime.JSX.Element;
416
421
 
417
- export { type BackendNotification as B, type FetchNotificationsParams as F, type LegacyNotificationCardProps as L, type NotificationApiClient as N, type Notification as a, type NotificationGroup as b, NotificationEntityType as c, type NotificationType as d, NotificationCard as e, type NotificationItem as f, type BackendNotificationsResponse as g, type NotificationsResponse as h, type NotificationCardProps as i, LegacyNotificationCard as j };
422
+ export { type BackendNotification as B, type FetchNotificationsParams as F, type LegacyNotificationCardProps as L, type NotificationApiClient as N, type Notification as a, type NotificationGroup as b, NotificationEntityType as c, type NotificationType as d, NotificationCard as e, type NotificationItem as f, type BackendNotificationsResponse as g, type NotificationsResponse as h, type NotificationCardProps as i, LegacyNotificationCard as j, syncNotificationState as s };
@@ -1,43 +1,40 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import * as react from 'react';
2
3
  import { ReactNode } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { Question } from './useQuizStore/index.mjs';
4
+ import { QUIZ_TYPE } from './useQuizStore/index.mjs';
5
5
  import 'zustand';
6
6
 
7
- declare const getStatusBadge: (status?: "correct" | "incorrect") => react_jsx_runtime.JSX.Element | null;
8
- declare const getStatusStyles: (variantCorrect?: string) => "bg-success-background border-success-300" | "bg-error-background border-error-300" | undefined;
7
+ declare const getQuizTypeConfig: (type: QUIZ_TYPE) => {
8
+ readonly label: "Simulado";
9
+ readonly article: "o";
10
+ readonly preposition: "do";
11
+ } | {
12
+ readonly label: "Questionário";
13
+ readonly article: "o";
14
+ readonly preposition: "do";
15
+ } | {
16
+ readonly label: "Atividade";
17
+ readonly article: "a";
18
+ readonly preposition: "da";
19
+ };
20
+ declare const getTypeLabel: (type: QUIZ_TYPE) => "Simulado" | "Questionário" | "Atividade";
21
+ declare const getQuizArticle: (type: QUIZ_TYPE) => "a" | "o";
22
+ declare const getQuizPreposition: (type: QUIZ_TYPE) => "do" | "da";
23
+ declare const getCompletionTitle: (type: QUIZ_TYPE) => string;
24
+ declare const getExitConfirmationText: (type: QUIZ_TYPE) => string;
25
+ declare const getFinishConfirmationText: (type: QUIZ_TYPE) => string;
9
26
  declare const Quiz: react.ForwardRefExoticComponent<{
10
27
  children: ReactNode;
11
28
  className?: string;
12
29
  variant?: "result" | "default";
13
30
  } & react.RefAttributes<HTMLDivElement>>;
14
- declare const QuizHeaderResult: react.ForwardRefExoticComponent<{
15
- className?: string;
16
- } & react.RefAttributes<HTMLDivElement>>;
17
31
  declare const QuizTitle: react.ForwardRefExoticComponent<{
18
32
  className?: string;
19
33
  } & react.RefAttributes<HTMLDivElement>>;
20
- declare const QuizSubTitle: react.ForwardRefExoticComponent<{
21
- subTitle: string;
22
- } & react.RefAttributes<HTMLDivElement>>;
23
34
  declare const QuizHeader: () => react_jsx_runtime.JSX.Element;
24
- declare const QuizContainer: react.ForwardRefExoticComponent<{
25
- children: ReactNode;
26
- className?: string;
27
- } & react.RefAttributes<HTMLDivElement>>;
28
35
  declare const QuizContent: react.ForwardRefExoticComponent<{
29
36
  paddingBottom?: string;
30
37
  } & react.RefAttributes<HTMLDivElement>>;
31
- interface QuizVariantInterface {
32
- paddingBottom?: string;
33
- }
34
- declare const QuizAlternative: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
35
- declare const QuizMultipleChoice: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
36
- declare const QuizDissertative: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
37
- declare const QuizTrueOrFalse: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
38
- declare const QuizConnectDots: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
39
- declare const QuizFill: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
40
- declare const QuizImageQuestion: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
41
38
  declare const QuizQuestionList: ({ filterType, onQuestionClick, }?: {
42
39
  filterType?: string;
43
40
  onQuestionClick?: () => void;
@@ -47,22 +44,11 @@ declare const QuizFooter: react.ForwardRefExoticComponent<{
47
44
  onGoToSimulated?: () => void;
48
45
  onDetailResult?: () => void;
49
46
  handleFinishSimulated?: () => void;
47
+ onGoToNextModule?: () => void;
48
+ onRepeat?: () => void;
49
+ onTryLater?: () => void;
50
50
  resultImageComponent?: ReactNode;
51
+ resultIncorrectImageComponent?: ReactNode;
51
52
  } & react.RefAttributes<HTMLDivElement>>;
52
- declare const QuizResultHeaderTitle: react.ForwardRefExoticComponent<{
53
- className?: string;
54
- } & react.RefAttributes<HTMLDivElement>>;
55
- declare const QuizResultTitle: react.ForwardRefExoticComponent<{
56
- className?: string;
57
- } & react.RefAttributes<HTMLParagraphElement>>;
58
- declare const QuizResultPerformance: react.ForwardRefExoticComponent<react.RefAttributes<HTMLDivElement>>;
59
- declare const QuizListResult: react.ForwardRefExoticComponent<{
60
- className?: string;
61
- onSubjectClick?: (subject: string) => void;
62
- } & react.RefAttributes<HTMLDivElement>>;
63
- declare const QuizListResultByMateria: ({ subject, onQuestionClick, }: {
64
- subject: string;
65
- onQuestionClick: (question: Question) => void;
66
- }) => react_jsx_runtime.JSX.Element;
67
53
 
68
- export { Quiz, QuizAlternative, QuizConnectDots, QuizContainer, QuizContent, QuizDissertative, QuizFill, QuizFooter, QuizHeader, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizSubTitle, QuizTitle, QuizTrueOrFalse, getStatusBadge, getStatusStyles };
54
+ export { Quiz, QuizContent, QuizFooter, QuizHeader, QuizQuestionList, QuizTitle, getCompletionTitle, getExitConfirmationText, getFinishConfirmationText, getQuizArticle, getQuizPreposition, getQuizTypeConfig, getTypeLabel };
@@ -1,43 +1,40 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
1
2
  import * as react from 'react';
2
3
  import { ReactNode } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { Question } from './useQuizStore/index.js';
4
+ import { QUIZ_TYPE } from './useQuizStore/index.js';
5
5
  import 'zustand';
6
6
 
7
- declare const getStatusBadge: (status?: "correct" | "incorrect") => react_jsx_runtime.JSX.Element | null;
8
- declare const getStatusStyles: (variantCorrect?: string) => "bg-success-background border-success-300" | "bg-error-background border-error-300" | undefined;
7
+ declare const getQuizTypeConfig: (type: QUIZ_TYPE) => {
8
+ readonly label: "Simulado";
9
+ readonly article: "o";
10
+ readonly preposition: "do";
11
+ } | {
12
+ readonly label: "Questionário";
13
+ readonly article: "o";
14
+ readonly preposition: "do";
15
+ } | {
16
+ readonly label: "Atividade";
17
+ readonly article: "a";
18
+ readonly preposition: "da";
19
+ };
20
+ declare const getTypeLabel: (type: QUIZ_TYPE) => "Simulado" | "Questionário" | "Atividade";
21
+ declare const getQuizArticle: (type: QUIZ_TYPE) => "a" | "o";
22
+ declare const getQuizPreposition: (type: QUIZ_TYPE) => "do" | "da";
23
+ declare const getCompletionTitle: (type: QUIZ_TYPE) => string;
24
+ declare const getExitConfirmationText: (type: QUIZ_TYPE) => string;
25
+ declare const getFinishConfirmationText: (type: QUIZ_TYPE) => string;
9
26
  declare const Quiz: react.ForwardRefExoticComponent<{
10
27
  children: ReactNode;
11
28
  className?: string;
12
29
  variant?: "result" | "default";
13
30
  } & react.RefAttributes<HTMLDivElement>>;
14
- declare const QuizHeaderResult: react.ForwardRefExoticComponent<{
15
- className?: string;
16
- } & react.RefAttributes<HTMLDivElement>>;
17
31
  declare const QuizTitle: react.ForwardRefExoticComponent<{
18
32
  className?: string;
19
33
  } & react.RefAttributes<HTMLDivElement>>;
20
- declare const QuizSubTitle: react.ForwardRefExoticComponent<{
21
- subTitle: string;
22
- } & react.RefAttributes<HTMLDivElement>>;
23
34
  declare const QuizHeader: () => react_jsx_runtime.JSX.Element;
24
- declare const QuizContainer: react.ForwardRefExoticComponent<{
25
- children: ReactNode;
26
- className?: string;
27
- } & react.RefAttributes<HTMLDivElement>>;
28
35
  declare const QuizContent: react.ForwardRefExoticComponent<{
29
36
  paddingBottom?: string;
30
37
  } & react.RefAttributes<HTMLDivElement>>;
31
- interface QuizVariantInterface {
32
- paddingBottom?: string;
33
- }
34
- declare const QuizAlternative: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
35
- declare const QuizMultipleChoice: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
36
- declare const QuizDissertative: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
37
- declare const QuizTrueOrFalse: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
38
- declare const QuizConnectDots: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
39
- declare const QuizFill: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
40
- declare const QuizImageQuestion: ({ paddingBottom }: QuizVariantInterface) => react_jsx_runtime.JSX.Element;
41
38
  declare const QuizQuestionList: ({ filterType, onQuestionClick, }?: {
42
39
  filterType?: string;
43
40
  onQuestionClick?: () => void;
@@ -47,22 +44,11 @@ declare const QuizFooter: react.ForwardRefExoticComponent<{
47
44
  onGoToSimulated?: () => void;
48
45
  onDetailResult?: () => void;
49
46
  handleFinishSimulated?: () => void;
47
+ onGoToNextModule?: () => void;
48
+ onRepeat?: () => void;
49
+ onTryLater?: () => void;
50
50
  resultImageComponent?: ReactNode;
51
+ resultIncorrectImageComponent?: ReactNode;
51
52
  } & react.RefAttributes<HTMLDivElement>>;
52
- declare const QuizResultHeaderTitle: react.ForwardRefExoticComponent<{
53
- className?: string;
54
- } & react.RefAttributes<HTMLDivElement>>;
55
- declare const QuizResultTitle: react.ForwardRefExoticComponent<{
56
- className?: string;
57
- } & react.RefAttributes<HTMLParagraphElement>>;
58
- declare const QuizResultPerformance: react.ForwardRefExoticComponent<react.RefAttributes<HTMLDivElement>>;
59
- declare const QuizListResult: react.ForwardRefExoticComponent<{
60
- className?: string;
61
- onSubjectClick?: (subject: string) => void;
62
- } & react.RefAttributes<HTMLDivElement>>;
63
- declare const QuizListResultByMateria: ({ subject, onQuestionClick, }: {
64
- subject: string;
65
- onQuestionClick: (question: Question) => void;
66
- }) => react_jsx_runtime.JSX.Element;
67
53
 
68
- export { Quiz, QuizAlternative, QuizConnectDots, QuizContainer, QuizContent, QuizDissertative, QuizFill, QuizFooter, QuizHeader, QuizHeaderResult, QuizImageQuestion, QuizListResult, QuizListResultByMateria, QuizMultipleChoice, QuizQuestionList, QuizResultHeaderTitle, QuizResultPerformance, QuizResultTitle, QuizSubTitle, QuizTitle, QuizTrueOrFalse, getStatusBadge, getStatusStyles };
54
+ export { Quiz, QuizContent, QuizFooter, QuizHeader, QuizQuestionList, QuizTitle, getCompletionTitle, getExitConfirmationText, getFinishConfirmationText, getQuizArticle, getQuizPreposition, getQuizTypeConfig, getTypeLabel };