analytica-frontend-lib 1.2.47 → 1.2.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActivityCardQuestionBanks/index.css +28 -2
- package/dist/ActivityCardQuestionBanks/index.css.map +1 -1
- package/dist/ActivityCardQuestionPreview/index.css +28 -2
- package/dist/ActivityCardQuestionPreview/index.css.map +1 -1
- package/dist/ActivityDetails/index.css +28 -2
- package/dist/ActivityDetails/index.css.map +1 -1
- package/dist/ActivityFilters/index.css +28 -2
- package/dist/ActivityFilters/index.css.map +1 -1
- package/dist/ActivityPreview/index.css +28 -2
- package/dist/ActivityPreview/index.css.map +1 -1
- package/dist/AlertManager/index.css +28 -2
- package/dist/AlertManager/index.css.map +1 -1
- package/dist/ProgressCircle/index.d.ts.map +1 -1
- package/dist/ProgressCircle/index.js +8 -8
- package/dist/ProgressCircle/index.js.map +1 -1
- package/dist/ProgressCircle/index.mjs +8 -8
- package/dist/ProgressCircle/index.mjs.map +1 -1
- package/dist/RecommendedLessonDetails/index.d.ts +4 -0
- package/dist/RecommendedLessonDetails/index.d.ts.map +1 -0
- package/dist/RecommendedLessonDetails/index.js +2250 -0
- package/dist/RecommendedLessonDetails/index.js.map +1 -0
- package/dist/RecommendedLessonDetails/index.mjs +2242 -0
- package/dist/RecommendedLessonDetails/index.mjs.map +1 -0
- package/dist/RecommendedLessonsHistory/index.css +28 -2
- package/dist/RecommendedLessonsHistory/index.css.map +1 -1
- package/dist/RecommendedLessonsHistory/index.js +3 -5
- package/dist/RecommendedLessonsHistory/index.js.map +1 -1
- package/dist/RecommendedLessonsHistory/index.mjs +3 -5
- package/dist/RecommendedLessonsHistory/index.mjs.map +1 -1
- package/dist/SendActivityModal/SendActivityModal.css +19353 -0
- package/dist/SendActivityModal/SendActivityModal.css.map +1 -0
- package/dist/SendActivityModal/SendActivityModal.d.ts +12 -0
- package/dist/SendActivityModal/SendActivityModal.d.ts.map +1 -0
- package/dist/SendActivityModal/SendActivityModal.js +6446 -0
- package/dist/SendActivityModal/SendActivityModal.js.map +1 -0
- package/dist/SendActivityModal/SendActivityModal.mjs +6486 -0
- package/dist/SendActivityModal/SendActivityModal.mjs.map +1 -0
- package/dist/SendActivityModal/hooks/useSendActivityModal.d.ts +43 -0
- package/dist/SendActivityModal/hooks/useSendActivityModal.d.ts.map +1 -0
- package/dist/SendActivityModal/hooks/useSendActivityModal.js +269 -0
- package/dist/SendActivityModal/hooks/useSendActivityModal.js.map +1 -0
- package/dist/SendActivityModal/hooks/useSendActivityModal.mjs +243 -0
- package/dist/SendActivityModal/hooks/useSendActivityModal.mjs.map +1 -0
- package/dist/SendActivityModal/index.css +28 -2
- package/dist/SendActivityModal/index.css.map +1 -1
- package/dist/SendActivityModal/types.d.ts +95 -0
- package/dist/SendActivityModal/types.d.ts.map +1 -0
- package/dist/SendActivityModal/types.js +35 -0
- package/dist/SendActivityModal/types.js.map +1 -0
- package/dist/SendActivityModal/types.mjs +10 -0
- package/dist/SendActivityModal/types.mjs.map +1 -0
- package/dist/SendActivityModal/validation.d.ts +133 -0
- package/dist/SendActivityModal/validation.d.ts.map +1 -0
- package/dist/SendActivityModal/validation.js +178 -0
- package/dist/SendActivityModal/validation.js.map +1 -0
- package/dist/SendActivityModal/validation.mjs +144 -0
- package/dist/SendActivityModal/validation.mjs.map +1 -0
- package/dist/TableProvider/index.css +28 -2
- package/dist/TableProvider/index.css.map +1 -1
- package/dist/hooks/useRecommendedLessonDetails/index.d.ts +780 -0
- package/dist/hooks/useRecommendedLessonDetails/index.d.ts.map +1 -0
- package/dist/hooks/useRecommendedLessonDetails/index.js +204 -0
- package/dist/hooks/useRecommendedLessonDetails/index.js.map +1 -0
- package/dist/hooks/useRecommendedLessonDetails/index.mjs +174 -0
- package/dist/hooks/useRecommendedLessonDetails/index.mjs.map +1 -0
- package/dist/hooks/useRecommendedLessonDetails.d.ts +780 -0
- package/dist/hooks/useRecommendedLessonDetails.d.ts.map +1 -0
- package/dist/index.css +28 -2
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +657 -10
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +645 -10
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +28 -2
- package/dist/styles.css.map +1 -1
- package/dist/types/recommendedLessons/index.d.ts +156 -0
- package/dist/types/recommendedLessons/index.d.ts.map +1 -1
- package/dist/types/recommendedLessons/index.js +47 -2
- package/dist/types/recommendedLessons/index.js.map +1 -1
- package/dist/types/recommendedLessons/index.mjs +41 -1
- package/dist/types/recommendedLessons/index.mjs.map +1 -1
- package/dist/types/recommendedLessons.d.ts +156 -0
- package/dist/types/recommendedLessons.d.ts.map +1 -1
- package/package.json +3 -1
|
@@ -179,4 +179,160 @@ export declare const GOAL_FILTER_STATUS_OPTIONS: GoalFilterOption[];
|
|
|
179
179
|
* All goal status options
|
|
180
180
|
*/
|
|
181
181
|
export declare const GOAL_STATUS_OPTIONS: GoalFilterOption[];
|
|
182
|
+
/**
|
|
183
|
+
* Student status for display in UI
|
|
184
|
+
*/
|
|
185
|
+
export declare enum StudentLessonStatus {
|
|
186
|
+
A_INICIAR = "A INICIAR",
|
|
187
|
+
EM_ANDAMENTO = "EM ANDAMENTO",
|
|
188
|
+
NAO_FINALIZADO = "N\u00C3O FINALIZADO",
|
|
189
|
+
CONCLUIDO = "CONCLU\u00CDDO"
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Badge action type for student status
|
|
193
|
+
*/
|
|
194
|
+
export declare const getStudentStatusBadgeAction: (status: StudentLessonStatus) => "success" | "warning" | "error" | "info";
|
|
195
|
+
/**
|
|
196
|
+
* Checks if a deadline has passed
|
|
197
|
+
* @param deadline - ISO date string of the deadline
|
|
198
|
+
* @returns true if deadline has passed, false otherwise
|
|
199
|
+
*/
|
|
200
|
+
export declare const isDeadlinePassed: (deadline: string | null) => boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Derives student display status from progress, completedAt, and deadline
|
|
203
|
+
* @param progress - Student progress percentage (0-100)
|
|
204
|
+
* @param completedAt - ISO date string when student completed, or null
|
|
205
|
+
* @param deadline - ISO date string of the goal deadline, or null
|
|
206
|
+
* @returns The appropriate StudentLessonStatus
|
|
207
|
+
*/
|
|
208
|
+
export declare const deriveStudentStatus: (progress: number, completedAt: string | null, deadline?: string | null) => StudentLessonStatus;
|
|
209
|
+
/**
|
|
210
|
+
* Formats days to complete as a readable string
|
|
211
|
+
*/
|
|
212
|
+
export declare const formatDaysToComplete: (daysToComplete: number | null) => string | null;
|
|
213
|
+
/**
|
|
214
|
+
* Student data from /goals/{id}/details endpoint
|
|
215
|
+
*/
|
|
216
|
+
export interface GoalDetailStudent {
|
|
217
|
+
userInstitutionId: string;
|
|
218
|
+
userId: string;
|
|
219
|
+
name: string;
|
|
220
|
+
progress: number;
|
|
221
|
+
completedAt: string | null;
|
|
222
|
+
avgScore: number | null;
|
|
223
|
+
daysToComplete: number | null;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Aggregated stats from /goals/{id}/details endpoint
|
|
227
|
+
*/
|
|
228
|
+
export interface GoalDetailAggregated {
|
|
229
|
+
completionPercentage: number;
|
|
230
|
+
avgScore: number | null;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Content performance item from /goals/{id}/details endpoint
|
|
234
|
+
*/
|
|
235
|
+
export interface GoalDetailContentPerformanceItem {
|
|
236
|
+
contentId: string;
|
|
237
|
+
contentName: string;
|
|
238
|
+
rate: number;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Content performance from /goals/{id}/details endpoint
|
|
242
|
+
*/
|
|
243
|
+
export interface GoalDetailContentPerformance {
|
|
244
|
+
best: GoalDetailContentPerformanceItem | null;
|
|
245
|
+
worst: GoalDetailContentPerformanceItem | null;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Response data from /goals/{id}/details endpoint
|
|
249
|
+
*/
|
|
250
|
+
export interface GoalDetailsData {
|
|
251
|
+
students: GoalDetailStudent[];
|
|
252
|
+
aggregated: GoalDetailAggregated;
|
|
253
|
+
contentPerformance: GoalDetailContentPerformance;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Full API response from /goals/{id}/details endpoint
|
|
257
|
+
*/
|
|
258
|
+
export interface GoalDetailsApiResponse {
|
|
259
|
+
message: string;
|
|
260
|
+
data: GoalDetailsData;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Subject info from lesson in /goals/{id} response
|
|
264
|
+
*/
|
|
265
|
+
export interface GoalLessonSubject {
|
|
266
|
+
id: string;
|
|
267
|
+
name: string;
|
|
268
|
+
color: string;
|
|
269
|
+
icon: string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Lesson info from /goals/{id} response
|
|
273
|
+
*/
|
|
274
|
+
export interface GoalLesson {
|
|
275
|
+
id: string;
|
|
276
|
+
content: {
|
|
277
|
+
id: string;
|
|
278
|
+
name: string;
|
|
279
|
+
};
|
|
280
|
+
subtopic: {
|
|
281
|
+
id: string;
|
|
282
|
+
name: string;
|
|
283
|
+
};
|
|
284
|
+
topic: {
|
|
285
|
+
id: string;
|
|
286
|
+
name: string;
|
|
287
|
+
};
|
|
288
|
+
subject: GoalLessonSubject;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Lesson progress from /goals/{id} response
|
|
292
|
+
*/
|
|
293
|
+
export interface GoalLessonProgress {
|
|
294
|
+
id: string;
|
|
295
|
+
userId: string;
|
|
296
|
+
lessonId: string;
|
|
297
|
+
progress: number;
|
|
298
|
+
lesson: GoalLesson;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Lesson goal item from /goals/{id} response
|
|
302
|
+
*/
|
|
303
|
+
export interface GoalLessonGoalItem {
|
|
304
|
+
goalId: string;
|
|
305
|
+
supLessonsProgressId: string;
|
|
306
|
+
supLessonsProgress: GoalLessonProgress;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Goal metadata from /goals/{id} endpoint
|
|
310
|
+
*/
|
|
311
|
+
export interface GoalMetadata {
|
|
312
|
+
id: string;
|
|
313
|
+
title: string;
|
|
314
|
+
startDate: string;
|
|
315
|
+
finalDate: string;
|
|
316
|
+
progress: number;
|
|
317
|
+
lessonsGoals: GoalLessonGoalItem[];
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Full API response from /goals/{id} endpoint
|
|
321
|
+
*/
|
|
322
|
+
export interface GoalApiResponse {
|
|
323
|
+
message: string;
|
|
324
|
+
data: GoalMetadata;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Combined data structure for RecommendedLessonDetails component
|
|
328
|
+
* Combines data from /goals/{id}, /goals/{id}/details, and breakdown info
|
|
329
|
+
*/
|
|
330
|
+
export interface LessonDetailsData {
|
|
331
|
+
/** Goal metadata from /goals/{id} */
|
|
332
|
+
goal: GoalMetadata;
|
|
333
|
+
/** Details from /goals/{id}/details */
|
|
334
|
+
details: GoalDetailsData;
|
|
335
|
+
/** Optional breakdown info from /recommended-class/history */
|
|
336
|
+
breakdown?: GoalBreakdown;
|
|
337
|
+
}
|
|
182
338
|
//# sourceMappingURL=recommendedLessons.d.ts.map
|
|
@@ -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,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8DAA8D;IAC9D,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B"}
|
|
@@ -25,7 +25,12 @@ __export(recommendedLessons_exports, {
|
|
|
25
25
|
GoalApiStatus: () => GoalApiStatus,
|
|
26
26
|
GoalBadgeActionType: () => GoalBadgeActionType,
|
|
27
27
|
GoalDisplayStatus: () => GoalDisplayStatus,
|
|
28
|
-
|
|
28
|
+
StudentLessonStatus: () => StudentLessonStatus,
|
|
29
|
+
deriveStudentStatus: () => deriveStudentStatus,
|
|
30
|
+
formatDaysToComplete: () => formatDaysToComplete,
|
|
31
|
+
getGoalStatusBadgeAction: () => getGoalStatusBadgeAction,
|
|
32
|
+
getStudentStatusBadgeAction: () => getStudentStatusBadgeAction,
|
|
33
|
+
isDeadlinePassed: () => isDeadlinePassed
|
|
29
34
|
});
|
|
30
35
|
module.exports = __toCommonJS(recommendedLessons_exports);
|
|
31
36
|
var GoalApiStatus = /* @__PURE__ */ ((GoalApiStatus2) => {
|
|
@@ -63,6 +68,41 @@ var GOAL_STATUS_OPTIONS = [
|
|
|
63
68
|
{ id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
|
|
64
69
|
{ id: "CONCLUIDA" /* CONCLUIDA */, name: "Conclu\xEDda" }
|
|
65
70
|
];
|
|
71
|
+
var StudentLessonStatus = /* @__PURE__ */ ((StudentLessonStatus2) => {
|
|
72
|
+
StudentLessonStatus2["A_INICIAR"] = "A INICIAR";
|
|
73
|
+
StudentLessonStatus2["EM_ANDAMENTO"] = "EM ANDAMENTO";
|
|
74
|
+
StudentLessonStatus2["NAO_FINALIZADO"] = "N\xC3O FINALIZADO";
|
|
75
|
+
StudentLessonStatus2["CONCLUIDO"] = "CONCLU\xCDDO";
|
|
76
|
+
return StudentLessonStatus2;
|
|
77
|
+
})(StudentLessonStatus || {});
|
|
78
|
+
var getStudentStatusBadgeAction = (status) => {
|
|
79
|
+
const actionMap = {
|
|
80
|
+
["CONCLU\xCDDO" /* CONCLUIDO */]: "success",
|
|
81
|
+
["EM ANDAMENTO" /* EM_ANDAMENTO */]: "info",
|
|
82
|
+
["A INICIAR" /* A_INICIAR */]: "warning",
|
|
83
|
+
["N\xC3O FINALIZADO" /* NAO_FINALIZADO */]: "error"
|
|
84
|
+
};
|
|
85
|
+
return actionMap[status] ?? "warning";
|
|
86
|
+
};
|
|
87
|
+
var isDeadlinePassed = (deadline) => {
|
|
88
|
+
if (!deadline) return false;
|
|
89
|
+
return new Date(deadline) < /* @__PURE__ */ new Date();
|
|
90
|
+
};
|
|
91
|
+
var deriveStudentStatus = (progress, completedAt, deadline) => {
|
|
92
|
+
if (completedAt) return "CONCLU\xCDDO" /* CONCLUIDO */;
|
|
93
|
+
if (progress === 100) return "CONCLU\xCDDO" /* CONCLUIDO */;
|
|
94
|
+
if (isDeadlinePassed(deadline ?? null) && progress < 100) {
|
|
95
|
+
return "N\xC3O FINALIZADO" /* NAO_FINALIZADO */;
|
|
96
|
+
}
|
|
97
|
+
if (progress === 0) return "A INICIAR" /* A_INICIAR */;
|
|
98
|
+
if (progress > 0) return "EM ANDAMENTO" /* EM_ANDAMENTO */;
|
|
99
|
+
return "A INICIAR" /* A_INICIAR */;
|
|
100
|
+
};
|
|
101
|
+
var formatDaysToComplete = (daysToComplete) => {
|
|
102
|
+
if (daysToComplete === null) return null;
|
|
103
|
+
if (daysToComplete === 1) return "1 dia";
|
|
104
|
+
return `${daysToComplete} dias`;
|
|
105
|
+
};
|
|
66
106
|
// Annotate the CommonJS export names for ESM import in node:
|
|
67
107
|
0 && (module.exports = {
|
|
68
108
|
GOAL_FILTER_STATUS_OPTIONS,
|
|
@@ -70,6 +110,11 @@ var GOAL_STATUS_OPTIONS = [
|
|
|
70
110
|
GoalApiStatus,
|
|
71
111
|
GoalBadgeActionType,
|
|
72
112
|
GoalDisplayStatus,
|
|
73
|
-
|
|
113
|
+
StudentLessonStatus,
|
|
114
|
+
deriveStudentStatus,
|
|
115
|
+
formatDaysToComplete,
|
|
116
|
+
getGoalStatusBadgeAction,
|
|
117
|
+
getStudentStatusBadgeAction,
|
|
118
|
+
isDeadlinePassed
|
|
74
119
|
});
|
|
75
120
|
//# sourceMappingURL=index.js.map
|
|
@@ -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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,IAChE,CAAC,8BAA2B,GAAG;AAAA,IAC/B,CAAC,mBAAuB,GAAG;AAAA,IAC3B,CAAC,uBAAyB,GAAG;AAAA,EAC/B;AACA,SAAO,UAAU,MAAM,KAAK;AAC9B;AAKO,IAAM,6BAAiD;AAAA,EAC5D,EAAE,IAAI,yBAAuB,MAAM,UAAU;AAAA,EAC7C,EAAE,IAAI,2BAAwB,MAAM,QAAQ;AAC9C;AAKO,IAAM,sBAA0C;AAAA,EACrD,EAAE,IAAI,2BAAwB,MAAM,WAAW;AAAA,EAC/C,EAAE,IAAI,yBAAuB,MAAM,UAAU;AAAA,EAC7C,EAAE,IAAI,6BAAyB,MAAM,eAAY;AACnD;","names":["GoalApiStatus","GoalDisplayStatus","GoalBadgeActionType"]}
|
|
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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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,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I,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"]}
|
|
@@ -34,12 +34,52 @@ var GOAL_STATUS_OPTIONS = [
|
|
|
34
34
|
{ id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
|
|
35
35
|
{ id: "CONCLUIDA" /* CONCLUIDA */, name: "Conclu\xEDda" }
|
|
36
36
|
];
|
|
37
|
+
var StudentLessonStatus = /* @__PURE__ */ ((StudentLessonStatus2) => {
|
|
38
|
+
StudentLessonStatus2["A_INICIAR"] = "A INICIAR";
|
|
39
|
+
StudentLessonStatus2["EM_ANDAMENTO"] = "EM ANDAMENTO";
|
|
40
|
+
StudentLessonStatus2["NAO_FINALIZADO"] = "N\xC3O FINALIZADO";
|
|
41
|
+
StudentLessonStatus2["CONCLUIDO"] = "CONCLU\xCDDO";
|
|
42
|
+
return StudentLessonStatus2;
|
|
43
|
+
})(StudentLessonStatus || {});
|
|
44
|
+
var getStudentStatusBadgeAction = (status) => {
|
|
45
|
+
const actionMap = {
|
|
46
|
+
["CONCLU\xCDDO" /* CONCLUIDO */]: "success",
|
|
47
|
+
["EM ANDAMENTO" /* EM_ANDAMENTO */]: "info",
|
|
48
|
+
["A INICIAR" /* A_INICIAR */]: "warning",
|
|
49
|
+
["N\xC3O FINALIZADO" /* NAO_FINALIZADO */]: "error"
|
|
50
|
+
};
|
|
51
|
+
return actionMap[status] ?? "warning";
|
|
52
|
+
};
|
|
53
|
+
var isDeadlinePassed = (deadline) => {
|
|
54
|
+
if (!deadline) return false;
|
|
55
|
+
return new Date(deadline) < /* @__PURE__ */ new Date();
|
|
56
|
+
};
|
|
57
|
+
var deriveStudentStatus = (progress, completedAt, deadline) => {
|
|
58
|
+
if (completedAt) return "CONCLU\xCDDO" /* CONCLUIDO */;
|
|
59
|
+
if (progress === 100) return "CONCLU\xCDDO" /* CONCLUIDO */;
|
|
60
|
+
if (isDeadlinePassed(deadline ?? null) && progress < 100) {
|
|
61
|
+
return "N\xC3O FINALIZADO" /* NAO_FINALIZADO */;
|
|
62
|
+
}
|
|
63
|
+
if (progress === 0) return "A INICIAR" /* A_INICIAR */;
|
|
64
|
+
if (progress > 0) return "EM ANDAMENTO" /* EM_ANDAMENTO */;
|
|
65
|
+
return "A INICIAR" /* A_INICIAR */;
|
|
66
|
+
};
|
|
67
|
+
var formatDaysToComplete = (daysToComplete) => {
|
|
68
|
+
if (daysToComplete === null) return null;
|
|
69
|
+
if (daysToComplete === 1) return "1 dia";
|
|
70
|
+
return `${daysToComplete} dias`;
|
|
71
|
+
};
|
|
37
72
|
export {
|
|
38
73
|
GOAL_FILTER_STATUS_OPTIONS,
|
|
39
74
|
GOAL_STATUS_OPTIONS,
|
|
40
75
|
GoalApiStatus,
|
|
41
76
|
GoalBadgeActionType,
|
|
42
77
|
GoalDisplayStatus,
|
|
43
|
-
|
|
78
|
+
StudentLessonStatus,
|
|
79
|
+
deriveStudentStatus,
|
|
80
|
+
formatDaysToComplete,
|
|
81
|
+
getGoalStatusBadgeAction,
|
|
82
|
+
getStudentStatusBadgeAction,
|
|
83
|
+
isDeadlinePassed
|
|
44
84
|
};
|
|
45
85
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -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"],"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,IAChE,CAAC,8BAA2B,GAAG;AAAA,IAC/B,CAAC,mBAAuB,GAAG;AAAA,IAC3B,CAAC,uBAAyB,GAAG;AAAA,EAC/B;AACA,SAAO,UAAU,MAAM,KAAK;AAC9B;AAKO,IAAM,6BAAiD;AAAA,EAC5D,EAAE,IAAI,yBAAuB,MAAM,UAAU;AAAA,EAC7C,EAAE,IAAI,2BAAwB,MAAM,QAAQ;AAC9C;AAKO,IAAM,sBAA0C;AAAA,EACrD,EAAE,IAAI,2BAAwB,MAAM,WAAW;AAAA,EAC/C,EAAE,IAAI,yBAAuB,MAAM,UAAU;AAAA,EAC7C,EAAE,IAAI,6BAAyB,MAAM,eAAY;AACnD;","names":["GoalApiStatus","GoalDisplayStatus","GoalBadgeActionType"]}
|
|
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,IAChE,CAAC,8BAA2B,GAAG;AAAA,IAC/B,CAAC,mBAAuB,GAAG;AAAA,IAC3B,CAAC,uBAAyB,GAAG;AAAA,EAC/B;AACA,SAAO,UAAU,MAAM,KAAK;AAC9B;AAKO,IAAM,6BAAiD;AAAA,EAC5D,EAAE,IAAI,yBAAuB,MAAM,UAAU;AAAA,EAC7C,EAAE,IAAI,2BAAwB,MAAM,QAAQ;AAC9C;AAKO,IAAM,sBAA0C;AAAA,EACrD,EAAE,IAAI,2BAAwB,MAAM,WAAW;AAAA,EAC/C,EAAE,IAAI,yBAAuB,MAAM,UAAU;AAAA,EAC7C,EAAE,IAAI,6BAAyB,MAAM,eAAY;AACnD;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":["GoalApiStatus","GoalDisplayStatus","GoalBadgeActionType","StudentLessonStatus"]}
|
|
@@ -179,4 +179,160 @@ export declare const GOAL_FILTER_STATUS_OPTIONS: GoalFilterOption[];
|
|
|
179
179
|
* All goal status options
|
|
180
180
|
*/
|
|
181
181
|
export declare const GOAL_STATUS_OPTIONS: GoalFilterOption[];
|
|
182
|
+
/**
|
|
183
|
+
* Student status for display in UI
|
|
184
|
+
*/
|
|
185
|
+
export declare enum StudentLessonStatus {
|
|
186
|
+
A_INICIAR = "A INICIAR",
|
|
187
|
+
EM_ANDAMENTO = "EM ANDAMENTO",
|
|
188
|
+
NAO_FINALIZADO = "N\u00C3O FINALIZADO",
|
|
189
|
+
CONCLUIDO = "CONCLU\u00CDDO"
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Badge action type for student status
|
|
193
|
+
*/
|
|
194
|
+
export declare const getStudentStatusBadgeAction: (status: StudentLessonStatus) => "success" | "warning" | "error" | "info";
|
|
195
|
+
/**
|
|
196
|
+
* Checks if a deadline has passed
|
|
197
|
+
* @param deadline - ISO date string of the deadline
|
|
198
|
+
* @returns true if deadline has passed, false otherwise
|
|
199
|
+
*/
|
|
200
|
+
export declare const isDeadlinePassed: (deadline: string | null) => boolean;
|
|
201
|
+
/**
|
|
202
|
+
* Derives student display status from progress, completedAt, and deadline
|
|
203
|
+
* @param progress - Student progress percentage (0-100)
|
|
204
|
+
* @param completedAt - ISO date string when student completed, or null
|
|
205
|
+
* @param deadline - ISO date string of the goal deadline, or null
|
|
206
|
+
* @returns The appropriate StudentLessonStatus
|
|
207
|
+
*/
|
|
208
|
+
export declare const deriveStudentStatus: (progress: number, completedAt: string | null, deadline?: string | null) => StudentLessonStatus;
|
|
209
|
+
/**
|
|
210
|
+
* Formats days to complete as a readable string
|
|
211
|
+
*/
|
|
212
|
+
export declare const formatDaysToComplete: (daysToComplete: number | null) => string | null;
|
|
213
|
+
/**
|
|
214
|
+
* Student data from /goals/{id}/details endpoint
|
|
215
|
+
*/
|
|
216
|
+
export interface GoalDetailStudent {
|
|
217
|
+
userInstitutionId: string;
|
|
218
|
+
userId: string;
|
|
219
|
+
name: string;
|
|
220
|
+
progress: number;
|
|
221
|
+
completedAt: string | null;
|
|
222
|
+
avgScore: number | null;
|
|
223
|
+
daysToComplete: number | null;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Aggregated stats from /goals/{id}/details endpoint
|
|
227
|
+
*/
|
|
228
|
+
export interface GoalDetailAggregated {
|
|
229
|
+
completionPercentage: number;
|
|
230
|
+
avgScore: number | null;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Content performance item from /goals/{id}/details endpoint
|
|
234
|
+
*/
|
|
235
|
+
export interface GoalDetailContentPerformanceItem {
|
|
236
|
+
contentId: string;
|
|
237
|
+
contentName: string;
|
|
238
|
+
rate: number;
|
|
239
|
+
}
|
|
240
|
+
/**
|
|
241
|
+
* Content performance from /goals/{id}/details endpoint
|
|
242
|
+
*/
|
|
243
|
+
export interface GoalDetailContentPerformance {
|
|
244
|
+
best: GoalDetailContentPerformanceItem | null;
|
|
245
|
+
worst: GoalDetailContentPerformanceItem | null;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Response data from /goals/{id}/details endpoint
|
|
249
|
+
*/
|
|
250
|
+
export interface GoalDetailsData {
|
|
251
|
+
students: GoalDetailStudent[];
|
|
252
|
+
aggregated: GoalDetailAggregated;
|
|
253
|
+
contentPerformance: GoalDetailContentPerformance;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Full API response from /goals/{id}/details endpoint
|
|
257
|
+
*/
|
|
258
|
+
export interface GoalDetailsApiResponse {
|
|
259
|
+
message: string;
|
|
260
|
+
data: GoalDetailsData;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Subject info from lesson in /goals/{id} response
|
|
264
|
+
*/
|
|
265
|
+
export interface GoalLessonSubject {
|
|
266
|
+
id: string;
|
|
267
|
+
name: string;
|
|
268
|
+
color: string;
|
|
269
|
+
icon: string;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Lesson info from /goals/{id} response
|
|
273
|
+
*/
|
|
274
|
+
export interface GoalLesson {
|
|
275
|
+
id: string;
|
|
276
|
+
content: {
|
|
277
|
+
id: string;
|
|
278
|
+
name: string;
|
|
279
|
+
};
|
|
280
|
+
subtopic: {
|
|
281
|
+
id: string;
|
|
282
|
+
name: string;
|
|
283
|
+
};
|
|
284
|
+
topic: {
|
|
285
|
+
id: string;
|
|
286
|
+
name: string;
|
|
287
|
+
};
|
|
288
|
+
subject: GoalLessonSubject;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Lesson progress from /goals/{id} response
|
|
292
|
+
*/
|
|
293
|
+
export interface GoalLessonProgress {
|
|
294
|
+
id: string;
|
|
295
|
+
userId: string;
|
|
296
|
+
lessonId: string;
|
|
297
|
+
progress: number;
|
|
298
|
+
lesson: GoalLesson;
|
|
299
|
+
}
|
|
300
|
+
/**
|
|
301
|
+
* Lesson goal item from /goals/{id} response
|
|
302
|
+
*/
|
|
303
|
+
export interface GoalLessonGoalItem {
|
|
304
|
+
goalId: string;
|
|
305
|
+
supLessonsProgressId: string;
|
|
306
|
+
supLessonsProgress: GoalLessonProgress;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Goal metadata from /goals/{id} endpoint
|
|
310
|
+
*/
|
|
311
|
+
export interface GoalMetadata {
|
|
312
|
+
id: string;
|
|
313
|
+
title: string;
|
|
314
|
+
startDate: string;
|
|
315
|
+
finalDate: string;
|
|
316
|
+
progress: number;
|
|
317
|
+
lessonsGoals: GoalLessonGoalItem[];
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Full API response from /goals/{id} endpoint
|
|
321
|
+
*/
|
|
322
|
+
export interface GoalApiResponse {
|
|
323
|
+
message: string;
|
|
324
|
+
data: GoalMetadata;
|
|
325
|
+
}
|
|
326
|
+
/**
|
|
327
|
+
* Combined data structure for RecommendedLessonDetails component
|
|
328
|
+
* Combines data from /goals/{id}, /goals/{id}/details, and breakdown info
|
|
329
|
+
*/
|
|
330
|
+
export interface LessonDetailsData {
|
|
331
|
+
/** Goal metadata from /goals/{id} */
|
|
332
|
+
goal: GoalMetadata;
|
|
333
|
+
/** Details from /goals/{id}/details */
|
|
334
|
+
details: GoalDetailsData;
|
|
335
|
+
/** Optional breakdown info from /recommended-class/history */
|
|
336
|
+
breakdown?: GoalBreakdown;
|
|
337
|
+
}
|
|
182
338
|
//# sourceMappingURL=recommendedLessons.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"recommendedLessons.d.ts","sourceRoot":"","sources":["../../src/types/recommendedLessons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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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "analytica-frontend-lib",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.49",
|
|
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",
|
|
@@ -64,6 +64,8 @@
|
|
|
64
64
|
"./questions-pdf-generator": "./dist/QuestionsPdfGenerator/index.js",
|
|
65
65
|
"./quiz": "./dist/Quiz/index.js",
|
|
66
66
|
"./radio": "./dist/Radio/index.js",
|
|
67
|
+
"./recommended-lesson-details": "./dist/RecommendedLessonDetails/index.js",
|
|
68
|
+
"./recommended-lesson-details/lessondetailsutils": "./dist/RecommendedLessonDetails/lessonDetailsUtils/index.js",
|
|
67
69
|
"./recommended-lessons-history": "./dist/RecommendedLessonsHistory/index.js",
|
|
68
70
|
"./search": "./dist/Search/index.js",
|
|
69
71
|
"./select": "./dist/Select/index.js",
|