analytica-frontend-lib 1.2.51 → 1.2.52

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 (91) hide show
  1. package/dist/ActivitiesHistory/index.css +19387 -0
  2. package/dist/ActivitiesHistory/index.css.map +1 -0
  3. package/dist/ActivitiesHistory/index.d.ts +2 -0
  4. package/dist/ActivitiesHistory/index.d.ts.map +1 -0
  5. package/dist/ActivitiesHistory/index.js +7381 -0
  6. package/dist/ActivitiesHistory/index.js.map +1 -0
  7. package/dist/ActivitiesHistory/index.mjs +7424 -0
  8. package/dist/ActivitiesHistory/index.mjs.map +1 -0
  9. package/dist/ActivityCardQuestionBanks/index.css +13 -0
  10. package/dist/ActivityCardQuestionBanks/index.css.map +1 -1
  11. package/dist/ActivityCardQuestionPreview/index.css +13 -0
  12. package/dist/ActivityCardQuestionPreview/index.css.map +1 -1
  13. package/dist/ActivityDetails/index.css +13 -0
  14. package/dist/ActivityDetails/index.css.map +1 -1
  15. package/dist/ActivityFilters/index.css +13 -0
  16. package/dist/ActivityFilters/index.css.map +1 -1
  17. package/dist/ActivityPreview/index.css +13 -0
  18. package/dist/ActivityPreview/index.css.map +1 -1
  19. package/dist/AlertManager/index.css +13 -0
  20. package/dist/AlertManager/index.css.map +1 -1
  21. package/dist/RecommendedLessonsHistory/index.css +13 -0
  22. package/dist/RecommendedLessonsHistory/index.css.map +1 -1
  23. package/dist/RecommendedLessonsHistory/index.js +10 -2
  24. package/dist/RecommendedLessonsHistory/index.js.map +1 -1
  25. package/dist/RecommendedLessonsHistory/index.mjs +10 -2
  26. package/dist/RecommendedLessonsHistory/index.mjs.map +1 -1
  27. package/dist/SendActivityModal/SendActivityModal.css +13 -0
  28. package/dist/SendActivityModal/SendActivityModal.css.map +1 -1
  29. package/dist/SendActivityModal/index.css +13 -0
  30. package/dist/SendActivityModal/index.css.map +1 -1
  31. package/dist/TableProvider/index.css +13 -0
  32. package/dist/TableProvider/index.css.map +1 -1
  33. package/dist/hooks/useActivitiesHistory/index.d.ts +210 -0
  34. package/dist/hooks/useActivitiesHistory/index.d.ts.map +1 -0
  35. package/dist/hooks/useActivitiesHistory/index.js +181 -0
  36. package/dist/hooks/useActivitiesHistory/index.js.map +1 -0
  37. package/dist/hooks/useActivitiesHistory/index.mjs +141 -0
  38. package/dist/hooks/useActivitiesHistory/index.mjs.map +1 -0
  39. package/dist/hooks/useActivitiesHistory.d.ts +210 -0
  40. package/dist/hooks/useActivitiesHistory.d.ts.map +1 -0
  41. package/dist/hooks/useActivityModels/index.d.ts +220 -0
  42. package/dist/hooks/useActivityModels/index.d.ts.map +1 -0
  43. package/dist/hooks/useActivityModels/index.js +186 -0
  44. package/dist/hooks/useActivityModels/index.js.map +1 -0
  45. package/dist/hooks/useActivityModels/index.mjs +146 -0
  46. package/dist/hooks/useActivityModels/index.mjs.map +1 -0
  47. package/dist/hooks/useActivityModels.d.ts +220 -0
  48. package/dist/hooks/useActivityModels.d.ts.map +1 -0
  49. package/dist/index.css +13 -0
  50. package/dist/index.css.map +1 -1
  51. package/dist/index.d.ts +8 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +1069 -23
  54. package/dist/index.js.map +1 -1
  55. package/dist/index.mjs +1049 -23
  56. package/dist/index.mjs.map +1 -1
  57. package/dist/styles.css +13 -0
  58. package/dist/styles.css.map +1 -1
  59. package/dist/types/activitiesHistory/index.d.ts +196 -0
  60. package/dist/types/activitiesHistory/index.d.ts.map +1 -0
  61. package/dist/types/activitiesHistory/index.js +92 -0
  62. package/dist/types/activitiesHistory/index.js.map +1 -0
  63. package/dist/types/activitiesHistory/index.mjs +59 -0
  64. package/dist/types/activitiesHistory/index.mjs.map +1 -0
  65. package/dist/types/activitiesHistory.d.ts +196 -0
  66. package/dist/types/activitiesHistory.d.ts.map +1 -0
  67. package/dist/types/common.d.ts +44 -0
  68. package/dist/types/common.d.ts.map +1 -0
  69. package/dist/types/recommendedLessons/index.d.ts +10 -18
  70. package/dist/types/recommendedLessons/index.d.ts.map +1 -1
  71. package/dist/types/recommendedLessons/index.js +27 -22
  72. package/dist/types/recommendedLessons/index.js.map +1 -1
  73. package/dist/types/recommendedLessons/index.mjs +26 -23
  74. package/dist/types/recommendedLessons/index.mjs.map +1 -1
  75. package/dist/types/recommendedLessons.d.ts +10 -18
  76. package/dist/types/recommendedLessons.d.ts.map +1 -1
  77. package/dist/utils/hookErrorHandler.d.ts +24 -0
  78. package/dist/utils/hookErrorHandler.d.ts.map +1 -0
  79. package/package.json +7 -1
  80. package/dist/RecommendedLessonDetails/index.d.ts +0 -5
  81. package/dist/RecommendedLessonDetails/index.d.ts.map +0 -1
  82. package/dist/RecommendedLessonDetails/index.js +0 -4854
  83. package/dist/RecommendedLessonDetails/index.js.map +0 -1
  84. package/dist/RecommendedLessonDetails/index.mjs +0 -4872
  85. package/dist/RecommendedLessonDetails/index.mjs.map +0 -1
  86. package/dist/hooks/useRecommendedLessonDetails/index.d.ts +0 -780
  87. package/dist/hooks/useRecommendedLessonDetails/index.d.ts.map +0 -1
  88. package/dist/hooks/useRecommendedLessonDetails/index.js +0 -204
  89. package/dist/hooks/useRecommendedLessonDetails/index.js.map +0 -1
  90. package/dist/hooks/useRecommendedLessonDetails/index.mjs +0 -174
  91. package/dist/hooks/useRecommendedLessonDetails/index.mjs.map +0 -1
@@ -2,30 +2,22 @@
2
2
  * Recommended Lessons / Goals (Aulas Recomendadas) Type Definitions
3
3
  * Based on /recommended-class/history endpoint
4
4
  */
5
+ import { GenericApiStatus, GenericDisplayStatus, BadgeActionType } from './common';
5
6
  /**
6
7
  * Goal status from backend API
8
+ * Re-exported from common for backward compatibility
7
9
  */
8
- export declare enum GoalApiStatus {
9
- A_VENCER = "A_VENCER",
10
- VENCIDA = "VENCIDA",
11
- CONCLUIDA = "CONCLUIDA"
12
- }
10
+ export { GenericApiStatus as GoalApiStatus } from './common';
13
11
  /**
14
12
  * Goal status for display in UI (Badge component)
13
+ * Re-exported from common for backward compatibility
15
14
  */
16
- export declare enum GoalDisplayStatus {
17
- ATIVA = "ATIVA",
18
- VENCIDA = "VENCIDA",
19
- CONCLUIDA = "CONCLU\u00CDDA"
20
- }
15
+ export { GenericDisplayStatus as GoalDisplayStatus } from './common';
21
16
  /**
22
17
  * Badge action types for goal status visualization
18
+ * Re-exported from common for backward compatibility
23
19
  */
24
- export declare enum GoalBadgeActionType {
25
- SUCCESS = "success",
26
- WARNING = "warning",
27
- ERROR = "error"
28
- }
20
+ export { BadgeActionType as GoalBadgeActionType } from './common';
29
21
  /**
30
22
  * Subject info from API response
31
23
  */
@@ -93,7 +85,7 @@ export interface GoalTableItem extends Record<string, unknown> {
93
85
  year: string;
94
86
  subject: string;
95
87
  class: string;
96
- status: GoalDisplayStatus;
88
+ status: GenericDisplayStatus;
97
89
  completionPercentage: number;
98
90
  }
99
91
  /**
@@ -112,7 +104,7 @@ export interface GoalsHistoryApiResponse {
112
104
  export interface GoalHistoryFilters {
113
105
  page?: number;
114
106
  limit?: number;
115
- status?: GoalApiStatus;
107
+ status?: GenericApiStatus;
116
108
  search?: string;
117
109
  startDate?: string;
118
110
  finalDate?: string;
@@ -170,7 +162,7 @@ export interface GoalUserFilterData {
170
162
  * @param status - Goal display status
171
163
  * @returns Badge action type for styling
172
164
  */
173
- export declare const getGoalStatusBadgeAction: (status: GoalDisplayStatus) => GoalBadgeActionType;
165
+ export declare const getGoalStatusBadgeAction: (status: GenericDisplayStatus) => BadgeActionType;
174
166
  /**
175
167
  * Goal status options for filter (Vencida and Ativa)
176
168
  */
@@ -1 +1 @@
1
- {"version":3,"file":"recommendedLessons.d.ts","sourceRoot":"","sources":["../../src/types/recommendedLessons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,OAAO,YAAY;IAC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;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,IAAI,EAAE,YAAY,CAAC;IACnB,uCAAuC;IACvC,OAAO,EAAE,eAAe,CAAC;IACzB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B"}
1
+ {"version":3,"file":"recommendedLessons.d.ts","sourceRoot":"","sources":["../../src/types/recommendedLessons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EAEhB,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,OAAO,EAAE,gBAAgB,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AAE7D;;;GAGG;AACH,OAAO,EAAE,oBAAoB,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAErE;;;GAGG;AACH,OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE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pB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,kBAAkB,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;CACpB;AAMD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,IAAI,EAAE,YAAY,CAAC;IACnB,uCAAuC;IACvC,OAAO,EAAE,eAAe,CAAC;IACzB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B"}
@@ -22,9 +22,9 @@ var recommendedLessons_exports = {};
22
22
  __export(recommendedLessons_exports, {
23
23
  GOAL_FILTER_STATUS_OPTIONS: () => GOAL_FILTER_STATUS_OPTIONS,
24
24
  GOAL_STATUS_OPTIONS: () => GOAL_STATUS_OPTIONS,
25
- GoalApiStatus: () => GoalApiStatus,
26
- GoalBadgeActionType: () => GoalBadgeActionType,
27
- GoalDisplayStatus: () => GoalDisplayStatus,
25
+ GoalApiStatus: () => GenericApiStatus,
26
+ GoalBadgeActionType: () => BadgeActionType,
27
+ GoalDisplayStatus: () => GenericDisplayStatus,
28
28
  StudentLessonStatus: () => StudentLessonStatus,
29
29
  deriveStudentStatus: () => deriveStudentStatus,
30
30
  formatDaysToComplete: () => formatDaysToComplete,
@@ -33,25 +33,27 @@ __export(recommendedLessons_exports, {
33
33
  isDeadlinePassed: () => isDeadlinePassed
34
34
  });
35
35
  module.exports = __toCommonJS(recommendedLessons_exports);
36
- var GoalApiStatus = /* @__PURE__ */ ((GoalApiStatus2) => {
37
- GoalApiStatus2["A_VENCER"] = "A_VENCER";
38
- GoalApiStatus2["VENCIDA"] = "VENCIDA";
39
- GoalApiStatus2["CONCLUIDA"] = "CONCLUIDA";
40
- return GoalApiStatus2;
41
- })(GoalApiStatus || {});
42
- var GoalDisplayStatus = /* @__PURE__ */ ((GoalDisplayStatus2) => {
43
- GoalDisplayStatus2["ATIVA"] = "ATIVA";
44
- GoalDisplayStatus2["VENCIDA"] = "VENCIDA";
45
- GoalDisplayStatus2["CONCLUIDA"] = "CONCLU\xCDDA";
46
- return GoalDisplayStatus2;
47
- })(GoalDisplayStatus || {});
48
- var GoalBadgeActionType = /* @__PURE__ */ ((GoalBadgeActionType2) => {
49
- GoalBadgeActionType2["SUCCESS"] = "success";
50
- GoalBadgeActionType2["WARNING"] = "warning";
51
- GoalBadgeActionType2["ERROR"] = "error";
52
- return GoalBadgeActionType2;
53
- })(GoalBadgeActionType || {});
54
- var getGoalStatusBadgeAction = (status) => {
36
+
37
+ // src/types/common.ts
38
+ var GenericApiStatus = /* @__PURE__ */ ((GenericApiStatus2) => {
39
+ GenericApiStatus2["A_VENCER"] = "A_VENCER";
40
+ GenericApiStatus2["VENCIDA"] = "VENCIDA";
41
+ GenericApiStatus2["CONCLUIDA"] = "CONCLUIDA";
42
+ return GenericApiStatus2;
43
+ })(GenericApiStatus || {});
44
+ var GenericDisplayStatus = /* @__PURE__ */ ((GenericDisplayStatus3) => {
45
+ GenericDisplayStatus3["ATIVA"] = "ATIVA";
46
+ GenericDisplayStatus3["VENCIDA"] = "VENCIDA";
47
+ GenericDisplayStatus3["CONCLUIDA"] = "CONCLU\xCDDA";
48
+ return GenericDisplayStatus3;
49
+ })(GenericDisplayStatus || {});
50
+ var BadgeActionType = /* @__PURE__ */ ((BadgeActionType3) => {
51
+ BadgeActionType3["SUCCESS"] = "success";
52
+ BadgeActionType3["WARNING"] = "warning";
53
+ BadgeActionType3["ERROR"] = "error";
54
+ return BadgeActionType3;
55
+ })(BadgeActionType || {});
56
+ var getStatusBadgeAction = (status) => {
55
57
  const actionMap = {
56
58
  ["CONCLU\xCDDA" /* CONCLUIDA */]: "success" /* SUCCESS */,
57
59
  ["ATIVA" /* ATIVA */]: "warning" /* WARNING */,
@@ -59,6 +61,9 @@ var getGoalStatusBadgeAction = (status) => {
59
61
  };
60
62
  return actionMap[status] ?? "warning" /* WARNING */;
61
63
  };
64
+
65
+ // src/types/recommendedLessons.ts
66
+ var getGoalStatusBadgeAction = (status) => getStatusBadgeAction(status);
62
67
  var GOAL_FILTER_STATUS_OPTIONS = [
63
68
  { id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
64
69
  { id: "A_VENCER" /* A_VENCER */, name: "Ativa" }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/types/recommendedLessons.ts"],"sourcesContent":["/**\n * Recommended Lessons / Goals (Aulas Recomendadas) Type Definitions\n * Based on /recommended-class/history endpoint\n */\n\n/**\n * Goal status from backend API\n */\nexport enum GoalApiStatus {\n A_VENCER = 'A_VENCER',\n VENCIDA = 'VENCIDA',\n CONCLUIDA = 'CONCLUIDA',\n}\n\n/**\n * Goal status for display in UI (Badge component)\n */\nexport enum GoalDisplayStatus {\n ATIVA = 'ATIVA',\n VENCIDA = 'VENCIDA',\n CONCLUIDA = 'CONCLUÍDA',\n}\n\n/**\n * Badge action types for goal status visualization\n */\nexport enum GoalBadgeActionType {\n SUCCESS = 'success',\n WARNING = 'warning',\n ERROR = 'error',\n}\n\n/**\n * Subject info from API response\n */\nexport interface GoalSubject {\n id: string;\n name: string;\n}\n\n/**\n * Creator info from API response\n */\nexport interface GoalCreator {\n id: string;\n name: string;\n}\n\n/**\n * Goal stats from API response\n */\nexport interface GoalStats {\n totalStudents: number;\n completedCount: number;\n completionPercentage: number;\n}\n\n/**\n * Class breakdown info from API response\n */\nexport interface GoalBreakdown {\n classId: string;\n className: string;\n schoolId: string;\n schoolName: string;\n studentCount: number;\n completedCount: number;\n}\n\n/**\n * Goal data from API response\n */\nexport interface GoalData {\n id: string;\n title: string;\n startDate: string | null;\n finalDate: string | null;\n createdAt: string;\n progress: number;\n totalLessons: number;\n}\n\n/**\n * Goal history item from /recommended-class/history endpoint\n */\nexport interface GoalHistoryItem {\n goal: GoalData;\n subject: GoalSubject | null;\n creator: GoalCreator | null;\n stats: GoalStats;\n breakdown: GoalBreakdown[];\n}\n\n/**\n * Goal table item interface for goals list table\n */\nexport interface GoalTableItem extends Record<string, unknown> {\n id: string;\n startDate: string | null;\n deadline: string | null;\n title: string;\n school: string;\n year: string;\n subject: string;\n class: string;\n status: GoalDisplayStatus;\n completionPercentage: number;\n}\n\n/**\n * Goals history API complete response from /recommended-class/history\n */\nexport interface GoalsHistoryApiResponse {\n message: string;\n data: {\n goals: GoalHistoryItem[];\n total: number;\n };\n}\n\n/**\n * Goal history filters for API query parameters\n */\nexport interface GoalHistoryFilters {\n page?: number;\n limit?: number;\n status?: GoalApiStatus;\n search?: string;\n startDate?: string;\n finalDate?: string;\n subjectId?: string;\n schoolId?: string;\n schoolIds?: string[];\n classId?: string;\n classIds?: string[];\n studentIds?: string[];\n sortBy?: 'createdAt' | 'finalDate' | 'title' | 'completionPercentage';\n sortOrder?: 'asc' | 'desc';\n}\n\n/**\n * Pagination info for goals history\n */\nexport interface GoalHistoryPagination {\n total: number;\n page: number;\n limit: number;\n totalPages: number;\n}\n\n/**\n * Filter option for dropdowns\n * Extends with index signature to be compatible with CheckBoxGroup Item type\n */\nexport interface GoalFilterOption {\n id: string;\n name: string;\n [key: string]: unknown;\n}\n\n/**\n * User data for filter options (schools, classes, subjects)\n */\nexport interface GoalUserFilterData {\n schools?: Array<{ id: string; name: string }>;\n classes?: Array<{ id: string; name: string; schoolId?: string }>;\n subjects?: Array<{ id: string; name: string }>;\n schoolYears?: Array<{ id: string; name: string }>;\n}\n\n/**\n * Get status badge action based on goal display status\n * @param status - Goal display status\n * @returns Badge action type for styling\n */\nexport const getGoalStatusBadgeAction = (\n status: GoalDisplayStatus\n): GoalBadgeActionType => {\n const actionMap: Record<GoalDisplayStatus, GoalBadgeActionType> = {\n [GoalDisplayStatus.CONCLUIDA]: GoalBadgeActionType.SUCCESS,\n [GoalDisplayStatus.ATIVA]: GoalBadgeActionType.WARNING,\n [GoalDisplayStatus.VENCIDA]: GoalBadgeActionType.ERROR,\n };\n return actionMap[status] ?? GoalBadgeActionType.WARNING;\n};\n\n/**\n * Goal status options for filter (Vencida and Ativa)\n */\nexport const GOAL_FILTER_STATUS_OPTIONS: GoalFilterOption[] = [\n { id: GoalApiStatus.VENCIDA, name: 'Vencida' },\n { id: GoalApiStatus.A_VENCER, name: 'Ativa' },\n];\n\n/**\n * All goal status options\n */\nexport const GOAL_STATUS_OPTIONS: GoalFilterOption[] = [\n { id: GoalApiStatus.A_VENCER, name: 'A Vencer' },\n { id: GoalApiStatus.VENCIDA, name: 'Vencida' },\n { id: GoalApiStatus.CONCLUIDA, name: 'Concluída' },\n];\n\n// ============================================\n// Recommended Lesson Details Types\n// Based on /goals/{id} and /goals/{id}/details endpoints\n// ============================================\n\n/**\n * Student status for display in UI\n */\nexport enum StudentLessonStatus {\n A_INICIAR = 'A INICIAR',\n EM_ANDAMENTO = 'EM ANDAMENTO',\n NAO_FINALIZADO = 'NÃO FINALIZADO',\n CONCLUIDO = 'CONCLUÍDO',\n}\n\n/**\n * Badge action type for student status\n */\nexport const getStudentStatusBadgeAction = (\n status: StudentLessonStatus\n): 'success' | 'warning' | 'error' | 'info' => {\n const actionMap: Record<\n StudentLessonStatus,\n 'success' | 'warning' | 'error' | 'info'\n > = {\n [StudentLessonStatus.CONCLUIDO]: 'success',\n [StudentLessonStatus.EM_ANDAMENTO]: 'info',\n [StudentLessonStatus.A_INICIAR]: 'warning',\n [StudentLessonStatus.NAO_FINALIZADO]: 'error',\n };\n return actionMap[status] ?? 'warning';\n};\n\n/**\n * Checks if a deadline has passed\n * @param deadline - ISO date string of the deadline\n * @returns true if deadline has passed, false otherwise\n */\nexport const isDeadlinePassed = (deadline: string | null): boolean => {\n if (!deadline) return false;\n return new Date(deadline) < new Date();\n};\n\n/**\n * Derives student display status from progress, completedAt, and deadline\n * @param progress - Student progress percentage (0-100)\n * @param completedAt - ISO date string when student completed, or null\n * @param deadline - ISO date string of the goal deadline, or null\n * @returns The appropriate StudentLessonStatus\n */\nexport const deriveStudentStatus = (\n progress: number,\n completedAt: string | null,\n deadline?: string | null\n): StudentLessonStatus => {\n // If completed (either by completedAt or 100% progress), it's CONCLUIDO\n if (completedAt) return StudentLessonStatus.CONCLUIDO;\n if (progress === 100) return StudentLessonStatus.CONCLUIDO;\n\n // If deadline passed and not completed, it's NAO_FINALIZADO\n if (isDeadlinePassed(deadline ?? null) && progress < 100) {\n return StudentLessonStatus.NAO_FINALIZADO;\n }\n\n // Otherwise, derive from progress\n if (progress === 0) return StudentLessonStatus.A_INICIAR;\n if (progress > 0) return StudentLessonStatus.EM_ANDAMENTO;\n return StudentLessonStatus.A_INICIAR;\n};\n\n/**\n * Formats days to complete as a readable string\n */\nexport const formatDaysToComplete = (\n daysToComplete: number | null\n): string | null => {\n if (daysToComplete === null) return null;\n if (daysToComplete === 1) return '1 dia';\n return `${daysToComplete} dias`;\n};\n\n// ============================================\n// API Response Types - /goals/{id}/details\n// ============================================\n\n/**\n * Student data from /goals/{id}/details endpoint\n */\nexport interface GoalDetailStudent {\n userInstitutionId: string;\n userId: string;\n name: string;\n progress: number;\n completedAt: string | null;\n avgScore: number | null;\n daysToComplete: number | null;\n}\n\n/**\n * Aggregated stats from /goals/{id}/details endpoint\n */\nexport interface GoalDetailAggregated {\n completionPercentage: number;\n avgScore: number | null;\n}\n\n/**\n * Content performance item from /goals/{id}/details endpoint\n */\nexport interface GoalDetailContentPerformanceItem {\n contentId: string;\n contentName: string;\n rate: number;\n}\n\n/**\n * Content performance from /goals/{id}/details endpoint\n */\nexport interface GoalDetailContentPerformance {\n best: GoalDetailContentPerformanceItem | null;\n worst: GoalDetailContentPerformanceItem | null;\n}\n\n/**\n * Response data from /goals/{id}/details endpoint\n */\nexport interface GoalDetailsData {\n students: GoalDetailStudent[];\n aggregated: GoalDetailAggregated;\n contentPerformance: GoalDetailContentPerformance;\n}\n\n/**\n * Full API response from /goals/{id}/details endpoint\n */\nexport interface GoalDetailsApiResponse {\n message: string;\n data: GoalDetailsData;\n}\n\n// ============================================\n// API Response Types - /goals/{id}\n// ============================================\n\n/**\n * Subject info from lesson in /goals/{id} response\n */\nexport interface GoalLessonSubject {\n id: string;\n name: string;\n color: string;\n icon: string;\n}\n\n/**\n * Lesson info from /goals/{id} response\n */\nexport interface GoalLesson {\n id: string;\n content: { id: string; name: string };\n subtopic: { id: string; name: string };\n topic: { id: string; name: string };\n subject: GoalLessonSubject;\n}\n\n/**\n * Lesson progress from /goals/{id} response\n */\nexport interface GoalLessonProgress {\n id: string;\n userId: string;\n lessonId: string;\n progress: number;\n lesson: GoalLesson;\n}\n\n/**\n * Lesson goal item from /goals/{id} response\n */\nexport interface GoalLessonGoalItem {\n goalId: string;\n supLessonsProgressId: string;\n supLessonsProgress: GoalLessonProgress;\n}\n\n/**\n * Goal metadata from /goals/{id} endpoint\n */\nexport interface GoalMetadata {\n id: string;\n title: string;\n startDate: string;\n finalDate: string;\n progress: number;\n lessonsGoals: GoalLessonGoalItem[];\n}\n\n/**\n * Full API response from /goals/{id} endpoint\n */\nexport interface GoalApiResponse {\n message: string;\n data: GoalMetadata;\n}\n\n// ============================================\n// Combined Data for Component\n// ============================================\n\n/**\n * Combined data structure for RecommendedLessonDetails component\n * Combines data from /goals/{id}, /goals/{id}/details, and breakdown info\n */\nexport interface LessonDetailsData {\n /** Goal metadata from /goals/{id} */\n goal: GoalMetadata;\n /** Details from /goals/{id}/details */\n details: GoalDetailsData;\n /** Optional breakdown info from /recommended-class/history */\n breakdown?: GoalBreakdown;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AA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AAG;AAAA,IACpC,CAAC,2BAA6B,GAAG;AAAA,IACjC,CAAC,wCAAkC,GAAG;AAAA,EACxC;AACA,SAAO,UAAU,MAAM,KAAK;AAC9B;AAOO,IAAM,mBAAmB,CAAC,aAAqC;AACpE,MAAI,CAAC,SAAU,QAAO;AACtB,SAAO,IAAI,KAAK,QAAQ,IAAI,oBAAI,KAAK;AACvC;AASO,IAAM,sBAAsB,CACjC,UACA,aACA,aACwB;AAExB,MAAI,YAAa,QAAO;AACxB,MAAI,aAAa,IAAK,QAAO;AAG7B,MAAI,iBAAiB,YAAY,IAAI,KAAK,WAAW,KAAK;AACxD,WAAO;AAAA,EACT;AAGA,MAAI,aAAa,EAAG,QAAO;AAC3B,MAAI,WAAW,EAAG,QAAO;AACzB,SAAO;AACT;AAKO,IAAM,uBAAuB,CAClC,mBACkB;AAClB,MAAI,mBAAmB,KAAM,QAAO;AACpC,MAAI,mBAAmB,EAAG,QAAO;AACjC,SAAO,GAAG,cAAc;AAC1B;","names":["GoalApiStatus","GoalDisplayStatus","GoalBadgeActionType","StudentLessonStatus"]}
1
+ {"version":3,"sources":["../../../src/types/recommendedLessons.ts","../../../src/types/common.ts"],"sourcesContent":["/**\n * Recommended Lessons / Goals (Aulas Recomendadas) Type Definitions\n * Based on /recommended-class/history endpoint\n */\n\nimport {\n GenericApiStatus,\n GenericDisplayStatus,\n BadgeActionType,\n getStatusBadgeAction,\n} from './common';\n\n/**\n * Goal status from backend API\n * Re-exported from common for backward compatibility\n */\nexport { GenericApiStatus as GoalApiStatus } from './common';\n\n/**\n * Goal status for display in UI (Badge component)\n * Re-exported from common for backward compatibility\n */\nexport { GenericDisplayStatus as GoalDisplayStatus } from './common';\n\n/**\n * Badge action types for goal status visualization\n * Re-exported from common for backward compatibility\n */\nexport { BadgeActionType as GoalBadgeActionType } from './common';\n\n/**\n * Subject info from API response\n */\nexport interface GoalSubject {\n id: string;\n name: string;\n}\n\n/**\n * Creator info from API response\n */\nexport interface GoalCreator {\n id: string;\n name: string;\n}\n\n/**\n * Goal stats from API response\n */\nexport interface GoalStats {\n totalStudents: number;\n completedCount: number;\n completionPercentage: number;\n}\n\n/**\n * Class breakdown info from API response\n */\nexport interface GoalBreakdown {\n classId: string;\n className: string;\n schoolId: string;\n schoolName: string;\n studentCount: number;\n completedCount: number;\n}\n\n/**\n * Goal data from API response\n */\nexport interface GoalData {\n id: string;\n title: string;\n startDate: string | null;\n finalDate: string | null;\n createdAt: string;\n progress: number;\n totalLessons: number;\n}\n\n/**\n * Goal history item from /recommended-class/history endpoint\n */\nexport interface GoalHistoryItem {\n goal: GoalData;\n subject: GoalSubject | null;\n creator: GoalCreator | null;\n stats: GoalStats;\n breakdown: GoalBreakdown[];\n}\n\n/**\n * Goal table item interface for goals list table\n */\nexport interface GoalTableItem extends Record<string, unknown> {\n id: string;\n startDate: string | null;\n deadline: string | null;\n title: string;\n school: string;\n year: string;\n subject: string;\n class: string;\n status: GenericDisplayStatus;\n completionPercentage: number;\n}\n\n/**\n * Goals history API complete response from /recommended-class/history\n */\nexport interface GoalsHistoryApiResponse {\n message: string;\n data: {\n goals: GoalHistoryItem[];\n total: number;\n };\n}\n\n/**\n * Goal history filters for API query parameters\n */\nexport interface GoalHistoryFilters {\n page?: number;\n limit?: number;\n status?: GenericApiStatus;\n search?: string;\n startDate?: string;\n finalDate?: string;\n subjectId?: string;\n schoolId?: string;\n schoolIds?: string[];\n classId?: string;\n classIds?: string[];\n studentIds?: string[];\n sortBy?: 'createdAt' | 'finalDate' | 'title' | 'completionPercentage';\n sortOrder?: 'asc' | 'desc';\n}\n\n/**\n * Pagination info for goals history\n */\nexport interface GoalHistoryPagination {\n total: number;\n page: number;\n limit: number;\n totalPages: number;\n}\n\n/**\n * Filter option for dropdowns\n * Extends with index signature to be compatible with CheckBoxGroup Item type\n */\nexport interface GoalFilterOption {\n id: string;\n name: string;\n [key: string]: unknown;\n}\n\n/**\n * User data for filter options (schools, classes, subjects)\n */\nexport interface GoalUserFilterData {\n schools?: Array<{ id: string; name: string }>;\n classes?: Array<{ id: string; name: string; schoolId?: string }>;\n subjects?: Array<{ id: string; name: string }>;\n schoolYears?: Array<{ id: string; name: string }>;\n}\n\n/**\n * Get status badge action based on goal display status\n * @param status - Goal display status\n * @returns Badge action type for styling\n */\nexport const getGoalStatusBadgeAction = (\n status: GenericDisplayStatus\n): BadgeActionType => getStatusBadgeAction(status);\n\n/**\n * Goal status options for filter (Vencida and Ativa)\n */\nexport const GOAL_FILTER_STATUS_OPTIONS: GoalFilterOption[] = [\n { id: GenericApiStatus.VENCIDA, name: 'Vencida' },\n { id: GenericApiStatus.A_VENCER, name: 'Ativa' },\n];\n\n/**\n * All goal status options\n */\nexport const GOAL_STATUS_OPTIONS: GoalFilterOption[] = [\n { id: GenericApiStatus.A_VENCER, name: 'A Vencer' },\n { id: GenericApiStatus.VENCIDA, name: 'Vencida' },\n { id: GenericApiStatus.CONCLUIDA, name: 'Concluída' },\n];\n\n// ============================================\n// Recommended Lesson Details Types\n// Based on /goals/{id} and /goals/{id}/details endpoints\n// ============================================\n\n/**\n * Student status for display in UI\n */\nexport enum StudentLessonStatus {\n A_INICIAR = 'A INICIAR',\n EM_ANDAMENTO = 'EM ANDAMENTO',\n NAO_FINALIZADO = 'NÃO FINALIZADO',\n CONCLUIDO = 'CONCLUÍDO',\n}\n\n/**\n * Badge action type for student status\n */\nexport const getStudentStatusBadgeAction = (\n status: StudentLessonStatus\n): 'success' | 'warning' | 'error' | 'info' => {\n const actionMap: Record<\n StudentLessonStatus,\n 'success' | 'warning' | 'error' | 'info'\n > = {\n [StudentLessonStatus.CONCLUIDO]: 'success',\n [StudentLessonStatus.EM_ANDAMENTO]: 'info',\n [StudentLessonStatus.A_INICIAR]: 'warning',\n [StudentLessonStatus.NAO_FINALIZADO]: 'error',\n };\n return actionMap[status] ?? 'warning';\n};\n\n/**\n * Checks if a deadline has passed\n * @param deadline - ISO date string of the deadline\n * @returns true if deadline has passed, false otherwise\n */\nexport const isDeadlinePassed = (deadline: string | null): boolean => {\n if (!deadline) return false;\n return new Date(deadline) < new Date();\n};\n\n/**\n * Derives student display status from progress, completedAt, and deadline\n * @param progress - Student progress percentage (0-100)\n * @param completedAt - ISO date string when student completed, or null\n * @param deadline - ISO date string of the goal deadline, or null\n * @returns The appropriate StudentLessonStatus\n */\nexport const deriveStudentStatus = (\n progress: number,\n completedAt: string | null,\n deadline?: string | null\n): StudentLessonStatus => {\n // If completed (either by completedAt or 100% progress), it's CONCLUIDO\n if (completedAt) return StudentLessonStatus.CONCLUIDO;\n if (progress === 100) return StudentLessonStatus.CONCLUIDO;\n\n // If deadline passed and not completed, it's NAO_FINALIZADO\n if (isDeadlinePassed(deadline ?? null) && progress < 100) {\n return StudentLessonStatus.NAO_FINALIZADO;\n }\n\n // Otherwise, derive from progress\n if (progress === 0) return StudentLessonStatus.A_INICIAR;\n if (progress > 0) return StudentLessonStatus.EM_ANDAMENTO;\n return StudentLessonStatus.A_INICIAR;\n};\n\n/**\n * Formats days to complete as a readable string\n */\nexport const formatDaysToComplete = (\n daysToComplete: number | null\n): string | null => {\n if (daysToComplete === null) return null;\n if (daysToComplete === 1) return '1 dia';\n return `${daysToComplete} dias`;\n};\n\n// ============================================\n// API Response Types - /goals/{id}/details\n// ============================================\n\n/**\n * Student data from /goals/{id}/details endpoint\n */\nexport interface GoalDetailStudent {\n userInstitutionId: string;\n userId: string;\n name: string;\n progress: number;\n completedAt: string | null;\n avgScore: number | null;\n daysToComplete: number | null;\n}\n\n/**\n * Aggregated stats from /goals/{id}/details endpoint\n */\nexport interface GoalDetailAggregated {\n completionPercentage: number;\n avgScore: number | null;\n}\n\n/**\n * Content performance item from /goals/{id}/details endpoint\n */\nexport interface GoalDetailContentPerformanceItem {\n contentId: string;\n contentName: string;\n rate: number;\n}\n\n/**\n * Content performance from /goals/{id}/details endpoint\n */\nexport interface GoalDetailContentPerformance {\n best: GoalDetailContentPerformanceItem | null;\n worst: GoalDetailContentPerformanceItem | null;\n}\n\n/**\n * Response data from /goals/{id}/details endpoint\n */\nexport interface GoalDetailsData {\n students: GoalDetailStudent[];\n aggregated: GoalDetailAggregated;\n contentPerformance: GoalDetailContentPerformance;\n}\n\n/**\n * Full API response from /goals/{id}/details endpoint\n */\nexport interface GoalDetailsApiResponse {\n message: string;\n data: GoalDetailsData;\n}\n\n// ============================================\n// API Response Types - /goals/{id}\n// ============================================\n\n/**\n * Subject info from lesson in /goals/{id} response\n */\nexport interface GoalLessonSubject {\n id: string;\n name: string;\n color: string;\n icon: string;\n}\n\n/**\n * Lesson info from /goals/{id} response\n */\nexport interface GoalLesson {\n id: string;\n content: { id: string; name: string };\n subtopic: { id: string; name: string };\n topic: { id: string; name: string };\n subject: GoalLessonSubject;\n}\n\n/**\n * Lesson progress from /goals/{id} response\n */\nexport interface GoalLessonProgress {\n id: string;\n userId: string;\n lessonId: string;\n progress: number;\n lesson: GoalLesson;\n}\n\n/**\n * Lesson goal item from /goals/{id} response\n */\nexport interface GoalLessonGoalItem {\n goalId: string;\n supLessonsProgressId: string;\n supLessonsProgress: GoalLessonProgress;\n}\n\n/**\n * Goal metadata from /goals/{id} endpoint\n */\nexport interface GoalMetadata {\n id: string;\n title: string;\n startDate: string;\n finalDate: string;\n progress: number;\n lessonsGoals: GoalLessonGoalItem[];\n}\n\n/**\n * Full API response from /goals/{id} endpoint\n */\nexport interface GoalApiResponse {\n message: string;\n data: GoalMetadata;\n}\n\n// ============================================\n// Combined Data for Component\n// ============================================\n\n/**\n * Combined data structure for RecommendedLessonDetails component\n * Combines data from /goals/{id}, /goals/{id}/details, and breakdown info\n */\nexport interface LessonDetailsData {\n /** Goal metadata from /goals/{id} */\n goal: GoalMetadata;\n /** Details from /goals/{id}/details */\n details: GoalDetailsData;\n /** Optional breakdown info from /recommended-class/history */\n breakdown?: GoalBreakdown;\n}\n","/**\n * Common Type Definitions\n * Shared types used across multiple features (activities, goals, etc.)\n */\n\n/**\n * Generic API status for activities and goals\n * Used by backend endpoints for status filtering\n */\nexport enum GenericApiStatus {\n A_VENCER = 'A_VENCER',\n VENCIDA = 'VENCIDA',\n CONCLUIDA = 'CONCLUIDA',\n}\n\n/**\n * Generic display status for UI components\n * Used for Badge and status display in tables\n */\nexport enum GenericDisplayStatus {\n ATIVA = 'ATIVA',\n VENCIDA = 'VENCIDA',\n CONCLUIDA = 'CONCLUÍDA',\n}\n\n/**\n * Badge action types for status visualization\n * Maps to Badge component action prop\n */\nexport enum BadgeActionType {\n SUCCESS = 'success',\n WARNING = 'warning',\n ERROR = 'error',\n}\n\n/**\n * Get badge action based on display status\n * @param status - Display status value\n * @returns Badge action type for styling\n */\nexport const getStatusBadgeAction = (\n status: GenericDisplayStatus\n): BadgeActionType => {\n const actionMap: Record<GenericDisplayStatus, BadgeActionType> = {\n [GenericDisplayStatus.CONCLUIDA]: BadgeActionType.SUCCESS,\n [GenericDisplayStatus.ATIVA]: BadgeActionType.WARNING,\n [GenericDisplayStatus.VENCIDA]: BadgeActionType.ERROR,\n };\n return actionMap[status] ?? BadgeActionType.WARNING;\n};\n\n/**\n * Map API status to display status\n * @param apiStatus - Status from backend API\n * @returns Formatted status for UI display\n */\nexport const mapApiStatusToDisplay = (\n apiStatus: GenericApiStatus\n): GenericDisplayStatus => {\n const statusMap: Record<GenericApiStatus, GenericDisplayStatus> = {\n [GenericApiStatus.A_VENCER]: GenericDisplayStatus.ATIVA,\n [GenericApiStatus.VENCIDA]: GenericDisplayStatus.VENCIDA,\n [GenericApiStatus.CONCLUIDA]: GenericDisplayStatus.CONCLUIDA,\n };\n return statusMap[apiStatus];\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACSO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,eAAY;AAHF,SAAAA;AAAA,GAAA;AAUL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tB,SAAO,IAAI,KAAK,QAAQ,IAAI,oBAAI,KAAK;AACvC;AASO,IAAM,sBAAsB,CACjC,UACA,aACA,aACwB;AAExB,MAAI,YAAa,QAAO;AACxB,MAAI,aAAa,IAAK,QAAO;AAG7B,MAAI,iBAAiB,YAAY,IAAI,KAAK,WAAW,KAAK;AACxD,WAAO;AAAA,EACT;AAGA,MAAI,aAAa,EAAG,QAAO;AAC3B,MAAI,WAAW,EAAG,QAAO;AACzB,SAAO;AACT;AAKO,IAAM,uBAAuB,CAClC,mBACkB;AAClB,MAAI,mBAAmB,KAAM,QAAO;AACpC,MAAI,mBAAmB,EAAG,QAAO;AACjC,SAAO,GAAG,cAAc;AAC1B;","names":["GenericApiStatus","GenericDisplayStatus","BadgeActionType","StudentLessonStatus"]}
@@ -1,23 +1,23 @@
1
- // src/types/recommendedLessons.ts
2
- var GoalApiStatus = /* @__PURE__ */ ((GoalApiStatus2) => {
3
- GoalApiStatus2["A_VENCER"] = "A_VENCER";
4
- GoalApiStatus2["VENCIDA"] = "VENCIDA";
5
- GoalApiStatus2["CONCLUIDA"] = "CONCLUIDA";
6
- return GoalApiStatus2;
7
- })(GoalApiStatus || {});
8
- var GoalDisplayStatus = /* @__PURE__ */ ((GoalDisplayStatus2) => {
9
- GoalDisplayStatus2["ATIVA"] = "ATIVA";
10
- GoalDisplayStatus2["VENCIDA"] = "VENCIDA";
11
- GoalDisplayStatus2["CONCLUIDA"] = "CONCLU\xCDDA";
12
- return GoalDisplayStatus2;
13
- })(GoalDisplayStatus || {});
14
- var GoalBadgeActionType = /* @__PURE__ */ ((GoalBadgeActionType2) => {
15
- GoalBadgeActionType2["SUCCESS"] = "success";
16
- GoalBadgeActionType2["WARNING"] = "warning";
17
- GoalBadgeActionType2["ERROR"] = "error";
18
- return GoalBadgeActionType2;
19
- })(GoalBadgeActionType || {});
20
- var getGoalStatusBadgeAction = (status) => {
1
+ // src/types/common.ts
2
+ var GenericApiStatus = /* @__PURE__ */ ((GenericApiStatus2) => {
3
+ GenericApiStatus2["A_VENCER"] = "A_VENCER";
4
+ GenericApiStatus2["VENCIDA"] = "VENCIDA";
5
+ GenericApiStatus2["CONCLUIDA"] = "CONCLUIDA";
6
+ return GenericApiStatus2;
7
+ })(GenericApiStatus || {});
8
+ var GenericDisplayStatus = /* @__PURE__ */ ((GenericDisplayStatus3) => {
9
+ GenericDisplayStatus3["ATIVA"] = "ATIVA";
10
+ GenericDisplayStatus3["VENCIDA"] = "VENCIDA";
11
+ GenericDisplayStatus3["CONCLUIDA"] = "CONCLU\xCDDA";
12
+ return GenericDisplayStatus3;
13
+ })(GenericDisplayStatus || {});
14
+ var BadgeActionType = /* @__PURE__ */ ((BadgeActionType3) => {
15
+ BadgeActionType3["SUCCESS"] = "success";
16
+ BadgeActionType3["WARNING"] = "warning";
17
+ BadgeActionType3["ERROR"] = "error";
18
+ return BadgeActionType3;
19
+ })(BadgeActionType || {});
20
+ var getStatusBadgeAction = (status) => {
21
21
  const actionMap = {
22
22
  ["CONCLU\xCDDA" /* CONCLUIDA */]: "success" /* SUCCESS */,
23
23
  ["ATIVA" /* ATIVA */]: "warning" /* WARNING */,
@@ -25,6 +25,9 @@ var getGoalStatusBadgeAction = (status) => {
25
25
  };
26
26
  return actionMap[status] ?? "warning" /* WARNING */;
27
27
  };
28
+
29
+ // src/types/recommendedLessons.ts
30
+ var getGoalStatusBadgeAction = (status) => getStatusBadgeAction(status);
28
31
  var GOAL_FILTER_STATUS_OPTIONS = [
29
32
  { id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
30
33
  { id: "A_VENCER" /* A_VENCER */, name: "Ativa" }
@@ -72,9 +75,9 @@ var formatDaysToComplete = (daysToComplete) => {
72
75
  export {
73
76
  GOAL_FILTER_STATUS_OPTIONS,
74
77
  GOAL_STATUS_OPTIONS,
75
- GoalApiStatus,
76
- GoalBadgeActionType,
77
- GoalDisplayStatus,
78
+ GenericApiStatus as GoalApiStatus,
79
+ BadgeActionType as GoalBadgeActionType,
80
+ GenericDisplayStatus as GoalDisplayStatus,
78
81
  StudentLessonStatus,
79
82
  deriveStudentStatus,
80
83
  formatDaysToComplete,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/types/recommendedLessons.ts"],"sourcesContent":["/**\n * Recommended Lessons / Goals (Aulas Recomendadas) Type Definitions\n * Based on /recommended-class/history endpoint\n */\n\n/**\n * Goal status from backend API\n */\nexport enum GoalApiStatus {\n A_VENCER = 'A_VENCER',\n VENCIDA = 'VENCIDA',\n CONCLUIDA = 'CONCLUIDA',\n}\n\n/**\n * Goal status for display in UI (Badge component)\n */\nexport enum GoalDisplayStatus {\n ATIVA = 'ATIVA',\n VENCIDA = 'VENCIDA',\n CONCLUIDA = 'CONCLUÍDA',\n}\n\n/**\n * Badge action types for goal status visualization\n */\nexport enum GoalBadgeActionType {\n SUCCESS = 'success',\n WARNING = 'warning',\n ERROR = 'error',\n}\n\n/**\n * Subject info from API response\n */\nexport interface GoalSubject {\n id: string;\n name: string;\n}\n\n/**\n * Creator info from API response\n */\nexport interface GoalCreator {\n id: string;\n name: string;\n}\n\n/**\n * Goal stats from API response\n */\nexport interface GoalStats {\n totalStudents: number;\n completedCount: number;\n completionPercentage: number;\n}\n\n/**\n * Class breakdown info from API response\n */\nexport interface GoalBreakdown {\n classId: string;\n className: string;\n schoolId: string;\n schoolName: string;\n studentCount: number;\n completedCount: number;\n}\n\n/**\n * Goal data from API response\n */\nexport interface GoalData {\n id: string;\n title: string;\n startDate: string | null;\n finalDate: string | null;\n createdAt: string;\n progress: number;\n totalLessons: number;\n}\n\n/**\n * Goal history item from /recommended-class/history endpoint\n */\nexport interface GoalHistoryItem {\n goal: GoalData;\n subject: GoalSubject | null;\n creator: GoalCreator | null;\n stats: GoalStats;\n breakdown: GoalBreakdown[];\n}\n\n/**\n * Goal table item interface for goals list table\n */\nexport interface GoalTableItem extends Record<string, unknown> {\n id: string;\n startDate: string | null;\n deadline: string | null;\n title: string;\n school: string;\n year: string;\n subject: string;\n class: string;\n status: GoalDisplayStatus;\n completionPercentage: number;\n}\n\n/**\n * Goals history API complete response from /recommended-class/history\n */\nexport interface GoalsHistoryApiResponse {\n message: string;\n data: {\n goals: GoalHistoryItem[];\n total: number;\n };\n}\n\n/**\n * Goal history filters for API query parameters\n */\nexport interface GoalHistoryFilters {\n page?: number;\n limit?: number;\n status?: GoalApiStatus;\n search?: string;\n startDate?: string;\n finalDate?: string;\n subjectId?: string;\n schoolId?: string;\n schoolIds?: string[];\n classId?: string;\n classIds?: string[];\n studentIds?: string[];\n sortBy?: 'createdAt' | 'finalDate' | 'title' | 'completionPercentage';\n sortOrder?: 'asc' | 'desc';\n}\n\n/**\n * Pagination info for goals history\n */\nexport interface GoalHistoryPagination {\n total: number;\n page: number;\n limit: number;\n totalPages: number;\n}\n\n/**\n * Filter option for dropdowns\n * Extends with index signature to be compatible with CheckBoxGroup Item type\n */\nexport interface GoalFilterOption {\n id: string;\n name: string;\n [key: string]: unknown;\n}\n\n/**\n * User data for filter options (schools, classes, subjects)\n */\nexport interface GoalUserFilterData {\n schools?: Array<{ id: string; name: string }>;\n classes?: Array<{ id: string; name: string; schoolId?: string }>;\n subjects?: Array<{ id: string; name: string }>;\n schoolYears?: Array<{ id: string; name: string }>;\n}\n\n/**\n * Get status badge action based on goal display status\n * @param status - Goal display status\n * @returns Badge action type for styling\n */\nexport const getGoalStatusBadgeAction = (\n status: GoalDisplayStatus\n): GoalBadgeActionType => {\n const actionMap: Record<GoalDisplayStatus, GoalBadgeActionType> = {\n [GoalDisplayStatus.CONCLUIDA]: GoalBadgeActionType.SUCCESS,\n [GoalDisplayStatus.ATIVA]: GoalBadgeActionType.WARNING,\n [GoalDisplayStatus.VENCIDA]: GoalBadgeActionType.ERROR,\n };\n return actionMap[status] ?? GoalBadgeActionType.WARNING;\n};\n\n/**\n * Goal status options for filter (Vencida and Ativa)\n */\nexport const GOAL_FILTER_STATUS_OPTIONS: GoalFilterOption[] = [\n { id: GoalApiStatus.VENCIDA, name: 'Vencida' },\n { id: GoalApiStatus.A_VENCER, name: 'Ativa' },\n];\n\n/**\n * All goal status options\n */\nexport const GOAL_STATUS_OPTIONS: GoalFilterOption[] = [\n { id: GoalApiStatus.A_VENCER, name: 'A Vencer' },\n { id: GoalApiStatus.VENCIDA, name: 'Vencida' },\n { id: GoalApiStatus.CONCLUIDA, name: 'Concluída' },\n];\n\n// ============================================\n// Recommended Lesson Details Types\n// Based on /goals/{id} and /goals/{id}/details endpoints\n// ============================================\n\n/**\n * Student status for display in UI\n */\nexport enum StudentLessonStatus {\n A_INICIAR = 'A INICIAR',\n EM_ANDAMENTO = 'EM ANDAMENTO',\n NAO_FINALIZADO = 'NÃO FINALIZADO',\n CONCLUIDO = 'CONCLUÍDO',\n}\n\n/**\n * Badge action type for student status\n */\nexport const getStudentStatusBadgeAction = (\n status: StudentLessonStatus\n): 'success' | 'warning' | 'error' | 'info' => {\n const actionMap: Record<\n StudentLessonStatus,\n 'success' | 'warning' | 'error' | 'info'\n > = {\n [StudentLessonStatus.CONCLUIDO]: 'success',\n [StudentLessonStatus.EM_ANDAMENTO]: 'info',\n [StudentLessonStatus.A_INICIAR]: 'warning',\n [StudentLessonStatus.NAO_FINALIZADO]: 'error',\n };\n return actionMap[status] ?? 'warning';\n};\n\n/**\n * Checks if a deadline has passed\n * @param deadline - ISO date string of the deadline\n * @returns true if deadline has passed, false otherwise\n */\nexport const isDeadlinePassed = (deadline: string | null): boolean => {\n if (!deadline) return false;\n return new Date(deadline) < new Date();\n};\n\n/**\n * Derives student display status from progress, completedAt, and deadline\n * @param progress - Student progress percentage (0-100)\n * @param completedAt - ISO date string when student completed, or null\n * @param deadline - ISO date string of the goal deadline, or null\n * @returns The appropriate StudentLessonStatus\n */\nexport const deriveStudentStatus = (\n progress: number,\n completedAt: string | null,\n deadline?: string | null\n): StudentLessonStatus => {\n // If completed (either by completedAt or 100% progress), it's CONCLUIDO\n if (completedAt) return StudentLessonStatus.CONCLUIDO;\n if (progress === 100) return StudentLessonStatus.CONCLUIDO;\n\n // If deadline passed and not completed, it's NAO_FINALIZADO\n if (isDeadlinePassed(deadline ?? null) && progress < 100) {\n return StudentLessonStatus.NAO_FINALIZADO;\n }\n\n // Otherwise, derive from progress\n if (progress === 0) return StudentLessonStatus.A_INICIAR;\n if (progress > 0) return StudentLessonStatus.EM_ANDAMENTO;\n return StudentLessonStatus.A_INICIAR;\n};\n\n/**\n * Formats days to complete as a readable string\n */\nexport const formatDaysToComplete = (\n daysToComplete: number | null\n): string | null => {\n if (daysToComplete === null) return null;\n if (daysToComplete === 1) return '1 dia';\n return `${daysToComplete} dias`;\n};\n\n// ============================================\n// API Response Types - /goals/{id}/details\n// ============================================\n\n/**\n * Student data from /goals/{id}/details endpoint\n */\nexport interface GoalDetailStudent {\n userInstitutionId: string;\n userId: string;\n name: string;\n progress: number;\n completedAt: string | null;\n avgScore: number | null;\n daysToComplete: number | null;\n}\n\n/**\n * Aggregated stats from /goals/{id}/details endpoint\n */\nexport interface GoalDetailAggregated {\n completionPercentage: number;\n avgScore: number | null;\n}\n\n/**\n * Content performance item from /goals/{id}/details endpoint\n */\nexport interface GoalDetailContentPerformanceItem {\n contentId: string;\n contentName: string;\n rate: number;\n}\n\n/**\n * Content performance from /goals/{id}/details endpoint\n */\nexport interface GoalDetailContentPerformance {\n best: GoalDetailContentPerformanceItem | null;\n worst: GoalDetailContentPerformanceItem | null;\n}\n\n/**\n * Response data from /goals/{id}/details endpoint\n */\nexport interface GoalDetailsData {\n students: GoalDetailStudent[];\n aggregated: GoalDetailAggregated;\n contentPerformance: GoalDetailContentPerformance;\n}\n\n/**\n * Full API response from /goals/{id}/details endpoint\n */\nexport interface GoalDetailsApiResponse {\n message: string;\n data: GoalDetailsData;\n}\n\n// ============================================\n// API Response Types - /goals/{id}\n// ============================================\n\n/**\n * Subject info from lesson in /goals/{id} response\n */\nexport interface GoalLessonSubject {\n id: string;\n name: string;\n color: string;\n icon: string;\n}\n\n/**\n * Lesson info from /goals/{id} response\n */\nexport interface GoalLesson {\n id: string;\n content: { id: string; name: string };\n subtopic: { id: string; name: string };\n topic: { id: string; name: string };\n subject: GoalLessonSubject;\n}\n\n/**\n * Lesson progress from /goals/{id} response\n */\nexport interface GoalLessonProgress {\n id: string;\n userId: string;\n lessonId: string;\n progress: number;\n lesson: GoalLesson;\n}\n\n/**\n * Lesson goal item from /goals/{id} response\n */\nexport interface GoalLessonGoalItem {\n goalId: string;\n supLessonsProgressId: string;\n supLessonsProgress: GoalLessonProgress;\n}\n\n/**\n * Goal metadata from /goals/{id} endpoint\n */\nexport interface GoalMetadata {\n id: string;\n title: string;\n startDate: string;\n finalDate: string;\n progress: number;\n lessonsGoals: GoalLessonGoalItem[];\n}\n\n/**\n * Full API response from /goals/{id} endpoint\n */\nexport interface GoalApiResponse {\n message: string;\n data: GoalMetadata;\n}\n\n// ============================================\n// Combined Data for Component\n// ============================================\n\n/**\n * Combined data structure for RecommendedLessonDetails component\n * Combines data from /goals/{id}, /goals/{id}/details, and breakdown info\n */\nexport interface LessonDetailsData {\n /** Goal metadata from /goals/{id} */\n goal: GoalMetadata;\n /** Details from /goals/{id}/details */\n details: GoalDetailsData;\n /** Optional breakdown info from /recommended-class/history */\n breakdown?: GoalBreakdown;\n}\n"],"mappings":";AAQO,IAAK,gBAAL,kBAAKA,mBAAL;AACL,EAAAA,eAAA,cAAW;AACX,EAAAA,eAAA,aAAU;AACV,EAAAA,eAAA,eAAY;AAHF,SAAAA;AAAA,GAAA;AASL,IAAK,oBAAL,kBAAKC,uBAAL;AACL,EAAAA,mBAAA,WAAQ;AACR,EAAAA,mBAAA,aAAU;AACV,EAAAA,mBAAA,eAAY;AAHF,SAAAA;AAAA,GAAA;AASL,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,aAAU;AACV,EAAAA,qBAAA,WAAQ;AAHE,SAAAA;AAAA,GAAA;AAqJL,IAAM,2BAA2B,CACtC,WACwB;AACxB,QAAM,YAA4D;AAAA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MAAI,mBAAmB,KAAM,QAAO;AACpC,MAAI,mBAAmB,EAAG,QAAO;AACjC,SAAO,GAAG,cAAc;AAC1B;","names":["GoalApiStatus","GoalDisplayStatus","GoalBadgeActionType","StudentLessonStatus"]}
1
+ {"version":3,"sources":["../../../src/types/common.ts","../../../src/types/recommendedLessons.ts"],"sourcesContent":["/**\n * Common Type Definitions\n * Shared types used across multiple features (activities, goals, etc.)\n */\n\n/**\n * Generic API status for activities and goals\n * Used by backend endpoints for status filtering\n */\nexport enum GenericApiStatus {\n A_VENCER = 'A_VENCER',\n VENCIDA = 'VENCIDA',\n CONCLUIDA = 'CONCLUIDA',\n}\n\n/**\n * Generic display status for UI components\n * Used for Badge and status display in tables\n */\nexport enum GenericDisplayStatus {\n ATIVA = 'ATIVA',\n VENCIDA = 'VENCIDA',\n CONCLUIDA = 'CONCLUÍDA',\n}\n\n/**\n * Badge action types for status visualization\n * Maps to Badge component action prop\n */\nexport enum BadgeActionType {\n SUCCESS = 'success',\n WARNING = 'warning',\n ERROR = 'error',\n}\n\n/**\n * Get badge action based on display status\n * @param status - Display status value\n * @returns Badge action type for styling\n */\nexport const getStatusBadgeAction = (\n status: GenericDisplayStatus\n): BadgeActionType => {\n const actionMap: Record<GenericDisplayStatus, BadgeActionType> = {\n [GenericDisplayStatus.CONCLUIDA]: BadgeActionType.SUCCESS,\n [GenericDisplayStatus.ATIVA]: BadgeActionType.WARNING,\n [GenericDisplayStatus.VENCIDA]: BadgeActionType.ERROR,\n };\n return actionMap[status] ?? BadgeActionType.WARNING;\n};\n\n/**\n * Map API status to display status\n * @param apiStatus - Status from backend API\n * @returns Formatted status for UI display\n */\nexport const mapApiStatusToDisplay = (\n apiStatus: GenericApiStatus\n): GenericDisplayStatus => {\n const statusMap: Record<GenericApiStatus, GenericDisplayStatus> = {\n [GenericApiStatus.A_VENCER]: GenericDisplayStatus.ATIVA,\n [GenericApiStatus.VENCIDA]: GenericDisplayStatus.VENCIDA,\n [GenericApiStatus.CONCLUIDA]: GenericDisplayStatus.CONCLUIDA,\n };\n return statusMap[apiStatus];\n};\n","/**\n * Recommended Lessons / Goals (Aulas Recomendadas) Type Definitions\n * Based on /recommended-class/history endpoint\n */\n\nimport {\n GenericApiStatus,\n GenericDisplayStatus,\n BadgeActionType,\n getStatusBadgeAction,\n} from './common';\n\n/**\n * Goal status from backend API\n * Re-exported from common for backward compatibility\n */\nexport { GenericApiStatus as GoalApiStatus } from './common';\n\n/**\n * Goal status for display in UI (Badge component)\n * Re-exported from common for backward compatibility\n */\nexport { GenericDisplayStatus as GoalDisplayStatus } from './common';\n\n/**\n * Badge action types for goal status visualization\n * Re-exported from common for backward compatibility\n */\nexport { BadgeActionType as GoalBadgeActionType } from './common';\n\n/**\n * Subject info from API response\n */\nexport interface GoalSubject {\n id: string;\n name: string;\n}\n\n/**\n * Creator info from API response\n */\nexport interface GoalCreator {\n id: string;\n name: string;\n}\n\n/**\n * Goal stats from API response\n */\nexport interface GoalStats {\n totalStudents: number;\n completedCount: number;\n completionPercentage: number;\n}\n\n/**\n * Class breakdown info from API response\n */\nexport interface GoalBreakdown {\n classId: string;\n className: string;\n schoolId: string;\n schoolName: string;\n studentCount: number;\n completedCount: number;\n}\n\n/**\n * Goal data from API response\n */\nexport interface GoalData {\n id: string;\n title: string;\n startDate: string | null;\n finalDate: string | null;\n createdAt: string;\n progress: number;\n totalLessons: number;\n}\n\n/**\n * Goal history item from /recommended-class/history endpoint\n */\nexport interface GoalHistoryItem {\n goal: GoalData;\n subject: GoalSubject | null;\n creator: GoalCreator | null;\n stats: GoalStats;\n breakdown: GoalBreakdown[];\n}\n\n/**\n * Goal table item interface for goals list table\n */\nexport interface GoalTableItem extends Record<string, unknown> {\n id: string;\n startDate: string | null;\n deadline: string | null;\n title: string;\n school: string;\n year: string;\n subject: string;\n class: string;\n status: GenericDisplayStatus;\n completionPercentage: number;\n}\n\n/**\n * Goals history API complete response from /recommended-class/history\n */\nexport interface GoalsHistoryApiResponse {\n message: string;\n data: {\n goals: GoalHistoryItem[];\n total: number;\n };\n}\n\n/**\n * Goal history filters for API query parameters\n */\nexport interface GoalHistoryFilters {\n page?: number;\n limit?: number;\n status?: GenericApiStatus;\n search?: string;\n startDate?: string;\n finalDate?: string;\n subjectId?: string;\n schoolId?: string;\n schoolIds?: string[];\n classId?: string;\n classIds?: string[];\n studentIds?: string[];\n sortBy?: 'createdAt' | 'finalDate' | 'title' | 'completionPercentage';\n sortOrder?: 'asc' | 'desc';\n}\n\n/**\n * Pagination info for goals history\n */\nexport interface GoalHistoryPagination {\n total: number;\n page: number;\n limit: number;\n totalPages: number;\n}\n\n/**\n * Filter option for dropdowns\n * Extends with index signature to be compatible with CheckBoxGroup Item type\n */\nexport interface GoalFilterOption {\n id: string;\n name: string;\n [key: string]: unknown;\n}\n\n/**\n * User data for filter options (schools, classes, subjects)\n */\nexport interface GoalUserFilterData {\n schools?: Array<{ id: string; name: string }>;\n classes?: Array<{ id: string; name: string; schoolId?: string }>;\n subjects?: Array<{ id: string; name: string }>;\n schoolYears?: Array<{ id: string; name: string }>;\n}\n\n/**\n * Get status badge action based on goal display status\n * @param status - Goal display status\n * @returns Badge action type for styling\n */\nexport const getGoalStatusBadgeAction = (\n status: GenericDisplayStatus\n): BadgeActionType => getStatusBadgeAction(status);\n\n/**\n * Goal status options for filter (Vencida and Ativa)\n */\nexport const GOAL_FILTER_STATUS_OPTIONS: GoalFilterOption[] = [\n { id: GenericApiStatus.VENCIDA, name: 'Vencida' },\n { id: GenericApiStatus.A_VENCER, name: 'Ativa' },\n];\n\n/**\n * All goal status options\n */\nexport const GOAL_STATUS_OPTIONS: GoalFilterOption[] = [\n { id: GenericApiStatus.A_VENCER, name: 'A Vencer' },\n { id: GenericApiStatus.VENCIDA, name: 'Vencida' },\n { id: GenericApiStatus.CONCLUIDA, name: 'Concluída' },\n];\n\n// ============================================\n// Recommended Lesson Details Types\n// Based on /goals/{id} and /goals/{id}/details endpoints\n// ============================================\n\n/**\n * Student status for display in UI\n */\nexport enum StudentLessonStatus {\n A_INICIAR = 'A INICIAR',\n EM_ANDAMENTO = 'EM ANDAMENTO',\n NAO_FINALIZADO = 'NÃO FINALIZADO',\n CONCLUIDO = 'CONCLUÍDO',\n}\n\n/**\n * Badge action type for student status\n */\nexport const getStudentStatusBadgeAction = (\n status: StudentLessonStatus\n): 'success' | 'warning' | 'error' | 'info' => {\n const actionMap: Record<\n StudentLessonStatus,\n 'success' | 'warning' | 'error' | 'info'\n > = {\n [StudentLessonStatus.CONCLUIDO]: 'success',\n [StudentLessonStatus.EM_ANDAMENTO]: 'info',\n [StudentLessonStatus.A_INICIAR]: 'warning',\n [StudentLessonStatus.NAO_FINALIZADO]: 'error',\n };\n return actionMap[status] ?? 'warning';\n};\n\n/**\n * Checks if a deadline has passed\n * @param deadline - ISO date string of the deadline\n * @returns true if deadline has passed, false otherwise\n */\nexport const isDeadlinePassed = (deadline: string | null): boolean => {\n if (!deadline) return false;\n return new Date(deadline) < new Date();\n};\n\n/**\n * Derives student display status from progress, completedAt, and deadline\n * @param progress - Student progress percentage (0-100)\n * @param completedAt - ISO date string when student completed, or null\n * @param deadline - ISO date string of the goal deadline, or null\n * @returns The appropriate StudentLessonStatus\n */\nexport const deriveStudentStatus = (\n progress: number,\n completedAt: string | null,\n deadline?: string | null\n): StudentLessonStatus => {\n // If completed (either by completedAt or 100% progress), it's CONCLUIDO\n if (completedAt) return StudentLessonStatus.CONCLUIDO;\n if (progress === 100) return StudentLessonStatus.CONCLUIDO;\n\n // If deadline passed and not completed, it's NAO_FINALIZADO\n if (isDeadlinePassed(deadline ?? null) && progress < 100) {\n return StudentLessonStatus.NAO_FINALIZADO;\n }\n\n // Otherwise, derive from progress\n if (progress === 0) return StudentLessonStatus.A_INICIAR;\n if (progress > 0) return StudentLessonStatus.EM_ANDAMENTO;\n return StudentLessonStatus.A_INICIAR;\n};\n\n/**\n * Formats days to complete as a readable string\n */\nexport const formatDaysToComplete = (\n daysToComplete: number | null\n): string | null => {\n if (daysToComplete === null) return null;\n if (daysToComplete === 1) return '1 dia';\n return `${daysToComplete} dias`;\n};\n\n// ============================================\n// API Response Types - /goals/{id}/details\n// ============================================\n\n/**\n * Student data from /goals/{id}/details endpoint\n */\nexport interface GoalDetailStudent {\n userInstitutionId: string;\n userId: string;\n name: string;\n progress: number;\n completedAt: string | null;\n avgScore: number | null;\n daysToComplete: number | null;\n}\n\n/**\n * Aggregated stats from /goals/{id}/details endpoint\n */\nexport interface GoalDetailAggregated {\n completionPercentage: number;\n avgScore: number | null;\n}\n\n/**\n * Content performance item from /goals/{id}/details endpoint\n */\nexport interface GoalDetailContentPerformanceItem {\n contentId: string;\n contentName: string;\n rate: number;\n}\n\n/**\n * Content performance from /goals/{id}/details endpoint\n */\nexport interface GoalDetailContentPerformance {\n best: GoalDetailContentPerformanceItem | null;\n worst: GoalDetailContentPerformanceItem | null;\n}\n\n/**\n * Response data from /goals/{id}/details endpoint\n */\nexport interface GoalDetailsData {\n students: GoalDetailStudent[];\n aggregated: GoalDetailAggregated;\n contentPerformance: GoalDetailContentPerformance;\n}\n\n/**\n * Full API response from /goals/{id}/details endpoint\n */\nexport interface GoalDetailsApiResponse {\n message: string;\n data: GoalDetailsData;\n}\n\n// ============================================\n// API Response Types - /goals/{id}\n// ============================================\n\n/**\n * Subject info from lesson in /goals/{id} response\n */\nexport interface GoalLessonSubject {\n id: string;\n name: string;\n color: string;\n icon: string;\n}\n\n/**\n * Lesson info from /goals/{id} response\n */\nexport interface GoalLesson {\n id: string;\n content: { id: string; name: string };\n subtopic: { id: string; name: string };\n topic: { id: string; name: string };\n subject: GoalLessonSubject;\n}\n\n/**\n * Lesson progress from /goals/{id} response\n */\nexport interface GoalLessonProgress {\n id: string;\n userId: string;\n lessonId: string;\n progress: number;\n lesson: GoalLesson;\n}\n\n/**\n * Lesson goal item from /goals/{id} response\n */\nexport interface GoalLessonGoalItem {\n goalId: string;\n supLessonsProgressId: string;\n supLessonsProgress: GoalLessonProgress;\n}\n\n/**\n * Goal metadata from /goals/{id} endpoint\n */\nexport interface GoalMetadata {\n id: string;\n title: string;\n startDate: string;\n finalDate: string;\n progress: number;\n lessonsGoals: GoalLessonGoalItem[];\n}\n\n/**\n * Full API response from /goals/{id} endpoint\n */\nexport interface GoalApiResponse {\n message: string;\n data: GoalMetadata;\n}\n\n// ============================================\n// Combined Data for Component\n// ============================================\n\n/**\n * Combined data structure for RecommendedLessonDetails component\n * Combines data from /goals/{id}, /goals/{id}/details, and breakdown info\n */\nexport interface LessonDetailsData {\n /** Goal metadata from /goals/{id} */\n goal: GoalMetadata;\n /** Details from /goals/{id}/details */\n details: GoalDetailsData;\n /** Optional breakdown info from /recommended-class/history */\n breakdown?: GoalBreakdown;\n}\n"],"mappings":";AASO,IAAK,mBAAL,kBAAKA,sBAAL;AACL,EAAAA,kBAAA,cAAW;AACX,EAAAA,kBAAA,aAAU;AACV,EAAAA,kBAAA,eAAY;AAHF,SAAAA;AAAA,GAAA;AAUL,IAAK,uBAAL,kBAAKC,0BAAL;AACL,EAAAA,sBAAA,WAAQ;AACR,EAAAA,sBAAA,aAAU;AACV,EAAAA,sBAAA,eAAY;AAHF,SAAAA;AAAA,GAAA;AAUL,IAAK,kBAAL,kBAAKC,qBAAL;AACL,EAAAA,iBAAA,aAAU;AACV,EAAAA,iBAAA,aAAU;AACV,EAAAA,iBAAA,WAAQ;AAHE,SAAAA;AAAA,GAAA;AAWL,IAAM,uBAAuB,CAClC,WACoB;AACpB,QAAM,YAA2D;AAAA,IAC/D,CAAC,8BAA8B,GAAG;AAAA,IAClC,CAAC,mBAA0B,GAAG;AAAA,IAC9B,CAAC,uBAA4B,GAAG;AAAA,EAClC;AACA,SAAO,UAAU,MAAM,KAAK;AAC9B;;;AC4HO,IAAM,2BAA2B,CACtC,WACoB,qBAAqB,MAAM;AAK1C,IAAM,6BAAiD;AAAA,EAC5D,EAAE,6BAA8B,MAAM,UAAU;AAAA,EAChD,EAAE,+BAA+B,MAAM,QAAQ;AACjD;AAKO,IAAM,sBAA0C;AAAA,EACrD,EAAE,+BAA+B,MAAM,WAAW;AAAA,EAClD,EAAE,6BAA8B,MAAM,UAAU;AAAA,EAChD,EAAE,iCAAgC,MAAM,eAAY;AACtD;AAUO,IAAK,sBAAL,kBAAKC,yBAAL;AACL,EAAAA,qBAAA,eAAY;AACZ,EAAAA,qBAAA,kBAAe;AACf,EAAAA,qBAAA,oBAAiB;AACjB,EAAAA,qBAAA,eAAY;AAJF,SAAAA;AAAA,GAAA;AAUL,IAAM,8BAA8B,CACzC,WAC6C;AAC7C,QAAM,YAGF;AAAA,IACF,CAAC,8BAA6B,GAAG;AAAA,IACjC,CAAC,iCAAgC,GAAG;AAAA,IACpC,CAAC,2BAA6B,GAAG;AAAA,IACjC,CAAC,wCAAkC,GAAG;AAAA,EACxC;AACA,SAAO,UAAU,MAAM,KAAK;AAC9B;AAOO,IAAM,mBAAmB,CAAC,aAAqC;AACpE,MAAI,CAAC,SAAU,QAAO;AACtB,SAAO,IAAI,KAAK,QAAQ,IAAI,oBAAI,KAAK;AACvC;AASO,IAAM,sBAAsB,CACjC,UACA,aACA,aACwB;AAExB,MAAI,YAAa,QAAO;AACxB,MAAI,aAAa,IAAK,QAAO;AAG7B,MAAI,iBAAiB,YAAY,IAAI,KAAK,WAAW,KAAK;AACxD,WAAO;AAAA,EACT;AAGA,MAAI,aAAa,EAAG,QAAO;AAC3B,MAAI,WAAW,EAAG,QAAO;AACzB,SAAO;AACT;AAKO,IAAM,uBAAuB,CAClC,mBACkB;AAClB,MAAI,mBAAmB,KAAM,QAAO;AACpC,MAAI,mBAAmB,EAAG,QAAO;AACjC,SAAO,GAAG,cAAc;AAC1B;","names":["GenericApiStatus","GenericDisplayStatus","BadgeActionType","StudentLessonStatus"]}
@@ -2,30 +2,22 @@
2
2
  * Recommended Lessons / Goals (Aulas Recomendadas) Type Definitions
3
3
  * Based on /recommended-class/history endpoint
4
4
  */
5
+ import { GenericApiStatus, GenericDisplayStatus, BadgeActionType } from './common';
5
6
  /**
6
7
  * Goal status from backend API
8
+ * Re-exported from common for backward compatibility
7
9
  */
8
- export declare enum GoalApiStatus {
9
- A_VENCER = "A_VENCER",
10
- VENCIDA = "VENCIDA",
11
- CONCLUIDA = "CONCLUIDA"
12
- }
10
+ export { GenericApiStatus as GoalApiStatus } from './common';
13
11
  /**
14
12
  * Goal status for display in UI (Badge component)
13
+ * Re-exported from common for backward compatibility
15
14
  */
16
- export declare enum GoalDisplayStatus {
17
- ATIVA = "ATIVA",
18
- VENCIDA = "VENCIDA",
19
- CONCLUIDA = "CONCLU\u00CDDA"
20
- }
15
+ export { GenericDisplayStatus as GoalDisplayStatus } from './common';
21
16
  /**
22
17
  * Badge action types for goal status visualization
18
+ * Re-exported from common for backward compatibility
23
19
  */
24
- export declare enum GoalBadgeActionType {
25
- SUCCESS = "success",
26
- WARNING = "warning",
27
- ERROR = "error"
28
- }
20
+ export { BadgeActionType as GoalBadgeActionType } from './common';
29
21
  /**
30
22
  * Subject info from API response
31
23
  */
@@ -93,7 +85,7 @@ export interface GoalTableItem extends Record<string, unknown> {
93
85
  year: string;
94
86
  subject: string;
95
87
  class: string;
96
- status: GoalDisplayStatus;
88
+ status: GenericDisplayStatus;
97
89
  completionPercentage: number;
98
90
  }
99
91
  /**
@@ -112,7 +104,7 @@ export interface GoalsHistoryApiResponse {
112
104
  export interface GoalHistoryFilters {
113
105
  page?: number;
114
106
  limit?: number;
115
- status?: GoalApiStatus;
107
+ status?: GenericApiStatus;
116
108
  search?: string;
117
109
  startDate?: string;
118
110
  finalDate?: string;
@@ -170,7 +162,7 @@ export interface GoalUserFilterData {
170
162
  * @param status - Goal display status
171
163
  * @returns Badge action type for styling
172
164
  */
173
- export declare const getGoalStatusBadgeAction: (status: GoalDisplayStatus) => GoalBadgeActionType;
165
+ export declare const getGoalStatusBadgeAction: (status: GenericDisplayStatus) => BadgeActionType;
174
166
  /**
175
167
  * Goal status options for filter (Vencida and Ativa)
176
168
  */
@@ -1 +1 @@
1
- {"version":3,"file":"recommendedLessons.d.ts","sourceRoot":"","sources":["../../src/types/recommendedLessons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,oBAAY,aAAa;IACvB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,oBAAY,iBAAiB;IAC3B,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,SAAS,mBAAc;CACxB;AAED;;GAEG;AACH,oBAAY,mBAAmB;IAC7B,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,KAAK,UAAU;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC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;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,kBAAkB,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;CACpB;AAMD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,IAAI,EAAE,YAAY,CAAC;IACnB,uCAAuC;IACvC,OAAO,EAAE,eAAe,CAAC;IACzB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B"}
1
+ {"version":3,"file":"recommendedLessons.d.ts","sourceRoot":"","sources":["../../src/types/recommendedLessons.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,eAAe,EAEhB,MAAM,UAAU,CAAC;AAElB;;;GAGG;AACH,OAAO,EAAE,gBAAgB,IAAI,aAAa,EAAE,MAAM,UAAU,CAAC;AAE7D;;;GAGG;AACH,OAAO,EAAE,oBAAoB,IAAI,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAErE;;;GAGG;AACH,OAAO,EAAE,eAAe,IAAI,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAElE;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE,MAAM,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CA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;KAAE,CAAC;IACpC,OAAO,EAAE,iBAAiB,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,UAAU,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB,EAAE,MAAM,CAAC;IAC7B,kBAAkB,EAAE,kBAAkB,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,kBAAkB,EAAE,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;CACpB;AAMD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,qCAAqC;IACrC,IAAI,EAAE,YAAY,CAAC;IACnB,uCAAuC;IACvC,OAAO,EAAE,eAAe,CAAC;IACzB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Factory function to create a fetch error handler
3
+ * This reduces code duplication across data fetching hooks
4
+ *
5
+ * @param validationErrorMessage - Message to display for Zod validation errors
6
+ * @param genericErrorMessage - Message to display for other errors
7
+ * @returns Error handler function that returns appropriate error message
8
+ *
9
+ * @example
10
+ * ```typescript
11
+ * const handleFetchError = createFetchErrorHandler(
12
+ * 'Erro ao validar dados',
13
+ * 'Erro ao carregar dados'
14
+ * );
15
+ *
16
+ * try {
17
+ * // fetch data
18
+ * } catch (error) {
19
+ * const errorMessage = handleFetchError(error);
20
+ * }
21
+ * ```
22
+ */
23
+ export declare const createFetchErrorHandler: (validationErrorMessage: string, genericErrorMessage: string) => (error: unknown) => string;
24
+ //# sourceMappingURL=hookErrorHandler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hookErrorHandler.d.ts","sourceRoot":"","sources":["../../src/utils/hookErrorHandler.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,uBAAuB,GACjC,wBAAwB,MAAM,EAAE,qBAAqB,MAAM,MAC3D,OAAO,OAAO,KAAG,MAQjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "analytica-frontend-lib",
3
- "version": "1.2.51",
3
+ "version": "1.2.52",
4
4
  "description": "Repositório público dos componentes utilizados nas plataformas da Analytica Ensino",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -21,6 +21,12 @@
21
21
  },
22
22
  "./styles.css": "./dist/styles.css",
23
23
  "./accordation": "./dist/Accordation/index.js",
24
+ "./activities-history": "./dist/ActivitiesHistory/index.js",
25
+ "./activities-history/filterbuilders": "./dist/ActivitiesHistory/filterBuilders/index.js",
26
+ "./activities-history/filteroptions": "./dist/ActivitiesHistory/filterOptions/index.js",
27
+ "./activities-history/index": "./dist/ActivitiesHistory/index/index.js",
28
+ "./activities-history/rendersubjectcell": "./dist/ActivitiesHistory/renderSubjectCell/index.js",
29
+ "./activities-history/rendertruncatedtext": "./dist/ActivitiesHistory/renderTruncatedText/index.js",
24
30
  "./activity-card-question-banks": "./dist/ActivityCardQuestionBanks/index.js",
25
31
  "./activity-card-question-preview": "./dist/ActivityCardQuestionPreview/index.js",
26
32
  "./activity-create": "./dist/ActivityCreate/index.js",
@@ -1,5 +0,0 @@
1
- export { default as RecommendedLessonDetails } from './RecommendedLessonDetails';
2
- export type { RecommendedLessonDetailsProps } from './RecommendedLessonDetails';
3
- export { StudentPerformanceModal, type StudentPerformanceModalProps, } from './components';
4
- export type { LessonDetailsLabels, BreadcrumbItem, DisplayStudent, StudentPerformanceData, StudentPerformanceLabels, LessonProgress, LessonQuestion, QuestionAlternative, } from './types';
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/RecommendedLessonDetails/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACjF,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EACL,uBAAuB,EACvB,KAAK,4BAA4B,GAClC,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,mBAAmB,EACnB,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,wBAAwB,EACxB,cAAc,EACd,cAAc,EACd,mBAAmB,GACpB,MAAM,SAAS,CAAC"}