analytica-frontend-lib 1.2.86 → 1.2.88

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 (84) hide show
  1. package/dist/ActivitiesHistory/index.js.map +1 -1
  2. package/dist/ActivitiesHistory/index.mjs.map +1 -1
  3. package/dist/NotificationCard/index.js +1 -1
  4. package/dist/NotificationCard/index.js.map +1 -1
  5. package/dist/NotificationCard/index.mjs +1 -1
  6. package/dist/NotificationCard/index.mjs.map +1 -1
  7. package/dist/QuestionsData/index.d.ts +26 -1
  8. package/dist/QuestionsData/index.d.ts.map +1 -1
  9. package/dist/QuestionsData/index.js.map +1 -1
  10. package/dist/QuestionsData/index.mjs.map +1 -1
  11. package/dist/RecommendedLessonsHistory/index.d.ts +1 -1
  12. package/dist/RecommendedLessonsHistory/index.d.ts.map +1 -1
  13. package/dist/RecommendedLessonsHistory/index.js +148 -142
  14. package/dist/RecommendedLessonsHistory/index.js.map +1 -1
  15. package/dist/RecommendedLessonsHistory/index.mjs +147 -141
  16. package/dist/RecommendedLessonsHistory/index.mjs.map +1 -1
  17. package/dist/StudentRanking/index.d.ts +33 -9
  18. package/dist/StudentRanking/index.d.ts.map +1 -1
  19. package/dist/StudentRanking/index.js.map +1 -1
  20. package/dist/StudentRanking/index.mjs.map +1 -1
  21. package/dist/hooks/useActivitiesHistory/index.js.map +1 -1
  22. package/dist/hooks/useActivitiesHistory/index.mjs.map +1 -1
  23. package/dist/hooks/useNotifications.d.ts +2 -2
  24. package/dist/hooks/useNotifications.d.ts.map +1 -1
  25. package/dist/hooks/useQuestionsData.d.ts +218 -0
  26. package/dist/hooks/useQuestionsData.d.ts.map +1 -0
  27. package/dist/hooks/useRecommendedClassDrafts/index.d.ts +57 -0
  28. package/dist/hooks/useRecommendedClassDrafts/index.d.ts.map +1 -0
  29. package/dist/hooks/{useGoalDrafts → useRecommendedClassDrafts}/index.js +40 -40
  30. package/dist/hooks/useRecommendedClassDrafts/index.js.map +1 -0
  31. package/dist/hooks/{useGoalDrafts → useRecommendedClassDrafts}/index.mjs +33 -33
  32. package/dist/hooks/useRecommendedClassDrafts/index.mjs.map +1 -0
  33. package/dist/hooks/useRecommendedClassDrafts.d.ts +57 -0
  34. package/dist/hooks/useRecommendedClassDrafts.d.ts.map +1 -0
  35. package/dist/hooks/{useGoalModels.d.ts → useRecommendedClassModels.d.ts} +32 -32
  36. package/dist/hooks/useRecommendedClassModels.d.ts.map +1 -0
  37. package/dist/hooks/useRecommendedLessonDetails.d.ts +44 -44
  38. package/dist/hooks/useRecommendedLessonDetails.d.ts.map +1 -1
  39. package/dist/hooks/useRecommendedLessons/index.d.ts +35 -35
  40. package/dist/hooks/useRecommendedLessons/index.d.ts.map +1 -1
  41. package/dist/hooks/useRecommendedLessons/index.js +41 -41
  42. package/dist/hooks/useRecommendedLessons/index.js.map +1 -1
  43. package/dist/hooks/useRecommendedLessons/index.mjs +37 -37
  44. package/dist/hooks/useRecommendedLessons/index.mjs.map +1 -1
  45. package/dist/hooks/useRecommendedLessons.d.ts +35 -35
  46. package/dist/hooks/useRecommendedLessons.d.ts.map +1 -1
  47. package/dist/hooks/useRecommendedLessonsPage/index.d.ts +21 -21
  48. package/dist/hooks/useRecommendedLessonsPage/index.d.ts.map +1 -1
  49. package/dist/hooks/useRecommendedLessonsPage/index.js +39 -33
  50. package/dist/hooks/useRecommendedLessonsPage/index.js.map +1 -1
  51. package/dist/hooks/useRecommendedLessonsPage/index.mjs +39 -33
  52. package/dist/hooks/useRecommendedLessonsPage/index.mjs.map +1 -1
  53. package/dist/hooks/useRecommendedLessonsPage.d.ts +21 -21
  54. package/dist/hooks/useRecommendedLessonsPage.d.ts.map +1 -1
  55. package/dist/hooks/useStudentsHighlight.d.ts +275 -0
  56. package/dist/hooks/useStudentsHighlight.d.ts.map +1 -0
  57. package/dist/index.d.ts +15 -11
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +570 -351
  60. package/dist/index.js.map +1 -1
  61. package/dist/index.mjs +516 -308
  62. package/dist/index.mjs.map +1 -1
  63. package/dist/store/notificationStore.d.ts.map +1 -1
  64. package/dist/types/activitiesHistory/index.js.map +1 -1
  65. package/dist/types/activitiesHistory/index.mjs.map +1 -1
  66. package/dist/types/common.d.ts +2 -2
  67. package/dist/types/notifications.d.ts +5 -5
  68. package/dist/types/notifications.d.ts.map +1 -1
  69. package/dist/types/recommendedLessons/index.d.ts +112 -112
  70. package/dist/types/recommendedLessons/index.d.ts.map +1 -1
  71. package/dist/types/recommendedLessons/index.js +25 -25
  72. package/dist/types/recommendedLessons/index.js.map +1 -1
  73. package/dist/types/recommendedLessons/index.mjs +17 -17
  74. package/dist/types/recommendedLessons/index.mjs.map +1 -1
  75. package/dist/types/recommendedLessons.d.ts +112 -112
  76. package/dist/types/recommendedLessons.d.ts.map +1 -1
  77. package/package.json +1 -1
  78. package/dist/hooks/useGoalDrafts/index.d.ts +0 -57
  79. package/dist/hooks/useGoalDrafts/index.d.ts.map +0 -1
  80. package/dist/hooks/useGoalDrafts/index.js.map +0 -1
  81. package/dist/hooks/useGoalDrafts/index.mjs.map +0 -1
  82. package/dist/hooks/useGoalDrafts.d.ts +0 -57
  83. package/dist/hooks/useGoalDrafts.d.ts.map +0 -1
  84. package/dist/hooks/useGoalModels.d.ts.map +0 -1
@@ -30,7 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
30
30
  // src/components/RecommendedLessonsHistory/index.ts
31
31
  var RecommendedLessonsHistory_exports = {};
32
32
  __export(RecommendedLessonsHistory_exports, {
33
- GoalPageTab: () => GoalPageTab,
33
+ RecommendedClassPageTab: () => RecommendedClassPageTab,
34
34
  RecommendedLessonsHistory: () => RecommendedLessonsHistory,
35
35
  default: () => RecommendedLessonsHistory_default
36
36
  });
@@ -5594,40 +5594,40 @@ var getStatusBadgeAction = (status) => {
5594
5594
  };
5595
5595
 
5596
5596
  // src/types/recommendedLessons.ts
5597
- var getGoalStatusBadgeAction = (status) => getStatusBadgeAction(status);
5598
- var GOAL_FILTER_STATUS_OPTIONS = [
5597
+ var getRecommendedClassStatusBadgeAction = (status) => getStatusBadgeAction(status);
5598
+ var RECOMMENDED_CLASS_FILTER_STATUS_OPTIONS = [
5599
5599
  { id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
5600
5600
  { id: "A_VENCER" /* A_VENCER */, name: "Ativa" }
5601
5601
  ];
5602
- var GOAL_STATUS_OPTIONS = [
5602
+ var RECOMMENDED_CLASS_STATUS_OPTIONS = [
5603
5603
  { id: "A_VENCER" /* A_VENCER */, name: "A Vencer" },
5604
5604
  { id: "VENCIDA" /* VENCIDA */, name: "Vencida" },
5605
5605
  { id: "CONCLUIDA" /* CONCLUIDA */, name: "Conclu\xEDda" }
5606
5606
  ];
5607
- var GoalDraftType = /* @__PURE__ */ ((GoalDraftType2) => {
5608
- GoalDraftType2["MODELO"] = "MODELO";
5609
- GoalDraftType2["RASCUNHO"] = "RASCUNHO";
5610
- return GoalDraftType2;
5611
- })(GoalDraftType || {});
5607
+ var RecommendedClassDraftType = /* @__PURE__ */ ((RecommendedClassDraftType2) => {
5608
+ RecommendedClassDraftType2["MODELO"] = "MODELO";
5609
+ RecommendedClassDraftType2["RASCUNHO"] = "RASCUNHO";
5610
+ return RecommendedClassDraftType2;
5611
+ })(RecommendedClassDraftType || {});
5612
5612
 
5613
5613
  // src/hooks/useRecommendedLessons.ts
5614
5614
  var import_react18 = require("react");
5615
5615
  var import_zod = require("zod");
5616
5616
  var import_dayjs = __toESM(require("dayjs"));
5617
- var goalSubjectSchema = import_zod.z.object({
5617
+ var recommendedClassSubjectSchema = import_zod.z.object({
5618
5618
  id: import_zod.z.string().uuid(),
5619
5619
  name: import_zod.z.string()
5620
5620
  }).nullable();
5621
- var goalCreatorSchema = import_zod.z.object({
5621
+ var recommendedClassCreatorSchema = import_zod.z.object({
5622
5622
  id: import_zod.z.string().uuid(),
5623
5623
  name: import_zod.z.string()
5624
5624
  }).nullable();
5625
- var goalStatsSchema = import_zod.z.object({
5625
+ var recommendedClassStatsSchema = import_zod.z.object({
5626
5626
  totalStudents: import_zod.z.number(),
5627
5627
  completedCount: import_zod.z.number(),
5628
5628
  completionPercentage: import_zod.z.number()
5629
5629
  });
5630
- var goalBreakdownSchema = import_zod.z.object({
5630
+ var recommendedClassBreakdownSchema = import_zod.z.object({
5631
5631
  classId: import_zod.z.string().uuid(),
5632
5632
  className: import_zod.z.string(),
5633
5633
  schoolId: import_zod.z.string(),
@@ -5635,7 +5635,7 @@ var goalBreakdownSchema = import_zod.z.object({
5635
5635
  studentCount: import_zod.z.number(),
5636
5636
  completedCount: import_zod.z.number()
5637
5637
  });
5638
- var goalDataSchema = import_zod.z.object({
5638
+ var recommendedClassDataSchema = import_zod.z.object({
5639
5639
  id: import_zod.z.string().uuid(),
5640
5640
  title: import_zod.z.string(),
5641
5641
  startDate: import_zod.z.string().nullable(),
@@ -5644,21 +5644,21 @@ var goalDataSchema = import_zod.z.object({
5644
5644
  progress: import_zod.z.number(),
5645
5645
  totalLessons: import_zod.z.number()
5646
5646
  });
5647
- var goalHistoryItemSchema = import_zod.z.object({
5648
- goal: goalDataSchema,
5649
- subject: goalSubjectSchema,
5650
- creator: goalCreatorSchema,
5651
- stats: goalStatsSchema,
5652
- breakdown: import_zod.z.array(goalBreakdownSchema)
5647
+ var recommendedClassHistoryItemSchema = import_zod.z.object({
5648
+ recommendedClass: recommendedClassDataSchema,
5649
+ subject: recommendedClassSubjectSchema,
5650
+ creator: recommendedClassCreatorSchema,
5651
+ stats: recommendedClassStatsSchema,
5652
+ breakdown: import_zod.z.array(recommendedClassBreakdownSchema)
5653
5653
  });
5654
- var goalsHistoryApiResponseSchema = import_zod.z.object({
5654
+ var recommendedClassHistoryApiResponseSchema = import_zod.z.object({
5655
5655
  message: import_zod.z.string(),
5656
5656
  data: import_zod.z.object({
5657
- goals: import_zod.z.array(goalHistoryItemSchema),
5657
+ recommendedClass: import_zod.z.array(recommendedClassHistoryItemSchema),
5658
5658
  total: import_zod.z.number()
5659
5659
  })
5660
5660
  });
5661
- var determineGoalStatus = (finalDate, completionPercentage) => {
5661
+ var determineRecommendedClassStatus = (finalDate, completionPercentage) => {
5662
5662
  if (completionPercentage === 100) {
5663
5663
  return "CONCLU\xCDDA" /* CONCLUIDA */;
5664
5664
  }
@@ -5671,29 +5671,29 @@ var determineGoalStatus = (finalDate, completionPercentage) => {
5671
5671
  }
5672
5672
  return "ATIVA" /* ATIVA */;
5673
5673
  };
5674
- var transformGoalToTableItem = (item) => {
5674
+ var transformRecommendedClassToTableItem = (item) => {
5675
5675
  const firstBreakdown = item.breakdown[0];
5676
5676
  const schoolName = firstBreakdown?.schoolName || "-";
5677
5677
  const className = firstBreakdown?.className || "-";
5678
5678
  const classDisplay = item.breakdown.length > 1 ? `${item.breakdown.length} turmas` : className;
5679
5679
  return {
5680
- id: item.goal.id,
5681
- startDate: item.goal.startDate ? (0, import_dayjs.default)(item.goal.startDate).format("DD/MM") : "-",
5682
- deadline: item.goal.finalDate ? (0, import_dayjs.default)(item.goal.finalDate).format("DD/MM") : "-",
5683
- title: item.goal.title,
5680
+ id: item.recommendedClass.id,
5681
+ startDate: item.recommendedClass.startDate ? (0, import_dayjs.default)(item.recommendedClass.startDate).format("DD/MM") : "-",
5682
+ deadline: item.recommendedClass.finalDate ? (0, import_dayjs.default)(item.recommendedClass.finalDate).format("DD/MM") : "-",
5683
+ title: item.recommendedClass.title,
5684
5684
  school: schoolName,
5685
5685
  year: "-",
5686
5686
  // API doesn't provide year directly
5687
5687
  subject: item.subject?.name || "-",
5688
5688
  class: classDisplay,
5689
- status: determineGoalStatus(
5690
- item.goal.finalDate,
5689
+ status: determineRecommendedClassStatus(
5690
+ item.recommendedClass.finalDate,
5691
5691
  item.stats.completionPercentage
5692
5692
  ),
5693
5693
  completionPercentage: item.stats.completionPercentage
5694
5694
  };
5695
5695
  };
5696
- var handleGoalFetchError = (error) => {
5696
+ var handleRecommendedClassFetchError = (error) => {
5697
5697
  if (error instanceof import_zod.z.ZodError) {
5698
5698
  console.error("Erro ao validar dados de hist\xF3rico de aulas:", error);
5699
5699
  return "Erro ao validar dados de hist\xF3rico de aulas";
@@ -5701,10 +5701,10 @@ var handleGoalFetchError = (error) => {
5701
5701
  console.error("Erro ao carregar hist\xF3rico de aulas:", error);
5702
5702
  return "Erro ao carregar hist\xF3rico de aulas";
5703
5703
  };
5704
- var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
5704
+ var createUseRecommendedLessonsHistory = (fetchRecommendedClassHistory) => {
5705
5705
  return () => {
5706
5706
  const [state, setState] = (0, import_react18.useState)({
5707
- goals: [],
5707
+ recommendedClass: [],
5708
5708
  loading: false,
5709
5709
  error: null,
5710
5710
  pagination: {
@@ -5714,21 +5714,21 @@ var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
5714
5714
  totalPages: 0
5715
5715
  }
5716
5716
  });
5717
- const fetchGoals = (0, import_react18.useCallback)(
5717
+ const fetchRecommendedClass = (0, import_react18.useCallback)(
5718
5718
  async (filters) => {
5719
5719
  setState((prev) => ({ ...prev, loading: true, error: null }));
5720
5720
  try {
5721
- const responseData = await fetchGoalsHistory(filters);
5722
- const validatedData = goalsHistoryApiResponseSchema.parse(responseData);
5723
- const tableItems = validatedData.data.goals.map(
5724
- transformGoalToTableItem
5721
+ const responseData = await fetchRecommendedClassHistory(filters);
5722
+ const validatedData = recommendedClassHistoryApiResponseSchema.parse(responseData);
5723
+ const tableItems = validatedData.data.recommendedClass.map(
5724
+ transformRecommendedClassToTableItem
5725
5725
  );
5726
5726
  const page = filters?.page || 1;
5727
5727
  const limit = filters?.limit || 10;
5728
5728
  const total = validatedData.data.total;
5729
5729
  const totalPages = Math.ceil(total / limit);
5730
5730
  setState({
5731
- goals: tableItems,
5731
+ recommendedClass: tableItems,
5732
5732
  loading: false,
5733
5733
  error: null,
5734
5734
  pagination: {
@@ -5739,7 +5739,7 @@ var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
5739
5739
  }
5740
5740
  });
5741
5741
  } catch (error) {
5742
- const errorMessage = handleGoalFetchError(error);
5742
+ const errorMessage = handleRecommendedClassFetchError(error);
5743
5743
  setState((prev) => ({
5744
5744
  ...prev,
5745
5745
  loading: false,
@@ -5747,16 +5747,16 @@ var createUseRecommendedLessonsHistory = (fetchGoalsHistory) => {
5747
5747
  }));
5748
5748
  }
5749
5749
  },
5750
- [fetchGoalsHistory]
5750
+ [fetchRecommendedClassHistory]
5751
5751
  );
5752
5752
  return {
5753
5753
  ...state,
5754
- fetchGoals
5754
+ fetchRecommendedClass
5755
5755
  };
5756
5756
  };
5757
5757
  };
5758
5758
 
5759
- // src/hooks/useGoalModels.ts
5759
+ // src/hooks/useRecommendedClassModels.ts
5760
5760
  var import_react19 = require("react");
5761
5761
  var import_zod3 = require("zod");
5762
5762
  var import_dayjs2 = __toESM(require("dayjs"));
@@ -5772,10 +5772,10 @@ var createFetchErrorHandler = (validationErrorMessage, genericErrorMessage) => (
5772
5772
  return genericErrorMessage;
5773
5773
  };
5774
5774
 
5775
- // src/hooks/useGoalModels.ts
5776
- var goalModelResponseSchema = import_zod3.z.object({
5775
+ // src/hooks/useRecommendedClassModels.ts
5776
+ var recommendedClassModelResponseSchema = import_zod3.z.object({
5777
5777
  id: import_zod3.z.string().uuid(),
5778
- type: import_zod3.z.nativeEnum(GoalDraftType),
5778
+ type: import_zod3.z.nativeEnum(RecommendedClassDraftType),
5779
5779
  title: import_zod3.z.string(),
5780
5780
  description: import_zod3.z.string().nullable(),
5781
5781
  creatorUserInstitutionId: import_zod3.z.string().uuid(),
@@ -5785,20 +5785,20 @@ var goalModelResponseSchema = import_zod3.z.object({
5785
5785
  createdAt: import_zod3.z.string(),
5786
5786
  updatedAt: import_zod3.z.string()
5787
5787
  });
5788
- var goalModelsApiResponseSchema = import_zod3.z.object({
5788
+ var recommendedClassModelsApiResponseSchema = import_zod3.z.object({
5789
5789
  message: import_zod3.z.string(),
5790
5790
  data: import_zod3.z.object({
5791
- drafts: import_zod3.z.array(goalModelResponseSchema),
5791
+ drafts: import_zod3.z.array(recommendedClassModelResponseSchema),
5792
5792
  total: import_zod3.z.number()
5793
5793
  })
5794
5794
  });
5795
- var DEFAULT_GOAL_MODELS_PAGINATION = {
5795
+ var DEFAULT_RECOMMENDED_CLASS_MODELS_PAGINATION = {
5796
5796
  total: 0,
5797
5797
  page: 1,
5798
5798
  limit: 10,
5799
5799
  totalPages: 0
5800
5800
  };
5801
- var transformGoalModelToTableItem = (model, subjectsMap) => {
5801
+ var transformRecommendedClassModelToTableItem = (model, subjectsMap) => {
5802
5802
  const subjectName = model.subjectId ? subjectsMap?.get(model.subjectId) || "" : "";
5803
5803
  return {
5804
5804
  id: model.id,
@@ -5808,26 +5808,26 @@ var transformGoalModelToTableItem = (model, subjectsMap) => {
5808
5808
  subjectId: model.subjectId
5809
5809
  };
5810
5810
  };
5811
- var handleGoalModelFetchError = createFetchErrorHandler(
5811
+ var handleRecommendedClassModelFetchError = createFetchErrorHandler(
5812
5812
  "Erro ao validar dados de modelos de aulas",
5813
5813
  "Erro ao carregar modelos de aulas"
5814
5814
  );
5815
- var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
5815
+ var createUseRecommendedClassModels = (fetchRecommendedClassModels, deleteRecommendedClassModel) => {
5816
5816
  return () => {
5817
5817
  const [state, setState] = (0, import_react19.useState)({
5818
5818
  models: [],
5819
5819
  loading: false,
5820
5820
  error: null,
5821
- pagination: DEFAULT_GOAL_MODELS_PAGINATION
5821
+ pagination: DEFAULT_RECOMMENDED_CLASS_MODELS_PAGINATION
5822
5822
  });
5823
5823
  const fetchModels = (0, import_react19.useCallback)(
5824
5824
  async (filters, subjectsMap) => {
5825
5825
  setState((prev) => ({ ...prev, loading: true, error: null }));
5826
5826
  try {
5827
- const responseData = await fetchGoalModels(filters);
5828
- const validatedData = goalModelsApiResponseSchema.parse(responseData);
5827
+ const responseData = await fetchRecommendedClassModels(filters);
5828
+ const validatedData = recommendedClassModelsApiResponseSchema.parse(responseData);
5829
5829
  const tableItems = validatedData.data.drafts.map(
5830
- (model) => transformGoalModelToTableItem(model, subjectsMap)
5830
+ (model) => transformRecommendedClassModelToTableItem(model, subjectsMap)
5831
5831
  );
5832
5832
  const limit = filters?.limit || 10;
5833
5833
  const page = filters?.page || 1;
@@ -5845,7 +5845,7 @@ var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
5845
5845
  }
5846
5846
  });
5847
5847
  } catch (error) {
5848
- const errorMessage = handleGoalModelFetchError(error);
5848
+ const errorMessage = handleRecommendedClassModelFetchError(error);
5849
5849
  setState((prev) => ({
5850
5850
  ...prev,
5851
5851
  loading: false,
@@ -5853,19 +5853,19 @@ var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
5853
5853
  }));
5854
5854
  }
5855
5855
  },
5856
- [fetchGoalModels]
5856
+ [fetchRecommendedClassModels]
5857
5857
  );
5858
5858
  const deleteModel = (0, import_react19.useCallback)(
5859
5859
  async (id) => {
5860
5860
  try {
5861
- await deleteGoalModel(id);
5861
+ await deleteRecommendedClassModel(id);
5862
5862
  return true;
5863
5863
  } catch (error) {
5864
5864
  console.error("Erro ao deletar modelo:", error);
5865
5865
  return false;
5866
5866
  }
5867
5867
  },
5868
- [deleteGoalModel]
5868
+ [deleteRecommendedClassModel]
5869
5869
  );
5870
5870
  return {
5871
5871
  ...state,
@@ -5875,34 +5875,34 @@ var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
5875
5875
  };
5876
5876
  };
5877
5877
 
5878
- // src/hooks/useGoalDrafts.ts
5878
+ // src/hooks/useRecommendedClassDrafts.ts
5879
5879
  var import_react20 = require("react");
5880
- var DEFAULT_GOAL_DRAFTS_PAGINATION = {
5880
+ var DEFAULT_RECOMMENDED_CLASS_DRAFTS_PAGINATION = {
5881
5881
  total: 0,
5882
5882
  page: 1,
5883
5883
  limit: 10,
5884
5884
  totalPages: 0
5885
5885
  };
5886
- var handleGoalDraftFetchError = createFetchErrorHandler(
5886
+ var handleRecommendedClassDraftFetchError = createFetchErrorHandler(
5887
5887
  "Erro ao validar dados de rascunhos de aulas",
5888
5888
  "Erro ao carregar rascunhos de aulas"
5889
5889
  );
5890
- var createUseGoalDrafts = (fetchGoalDrafts, deleteGoalDraft) => {
5890
+ var createUseRecommendedClassDrafts = (fetchRecommendedClassDrafts, deleteRecommendedClassDraft) => {
5891
5891
  return () => {
5892
5892
  const [state, setState] = (0, import_react20.useState)({
5893
5893
  models: [],
5894
5894
  loading: false,
5895
5895
  error: null,
5896
- pagination: DEFAULT_GOAL_DRAFTS_PAGINATION
5896
+ pagination: DEFAULT_RECOMMENDED_CLASS_DRAFTS_PAGINATION
5897
5897
  });
5898
5898
  const fetchModels = (0, import_react20.useCallback)(
5899
5899
  async (filters, subjectsMap) => {
5900
5900
  setState((prev) => ({ ...prev, loading: true, error: null }));
5901
5901
  try {
5902
- const responseData = await fetchGoalDrafts(filters);
5903
- const validatedData = goalModelsApiResponseSchema.parse(responseData);
5902
+ const responseData = await fetchRecommendedClassDrafts(filters);
5903
+ const validatedData = recommendedClassModelsApiResponseSchema.parse(responseData);
5904
5904
  const tableItems = validatedData.data.drafts.map(
5905
- (draft) => transformGoalModelToTableItem(draft, subjectsMap)
5905
+ (draft) => transformRecommendedClassModelToTableItem(draft, subjectsMap)
5906
5906
  );
5907
5907
  const limit = filters?.limit || 10;
5908
5908
  const page = filters?.page || 1;
@@ -5920,7 +5920,7 @@ var createUseGoalDrafts = (fetchGoalDrafts, deleteGoalDraft) => {
5920
5920
  }
5921
5921
  });
5922
5922
  } catch (error) {
5923
- const errorMessage = handleGoalDraftFetchError(error);
5923
+ const errorMessage = handleRecommendedClassDraftFetchError(error);
5924
5924
  setState((prev) => ({
5925
5925
  ...prev,
5926
5926
  loading: false,
@@ -5928,19 +5928,19 @@ var createUseGoalDrafts = (fetchGoalDrafts, deleteGoalDraft) => {
5928
5928
  }));
5929
5929
  }
5930
5930
  },
5931
- [fetchGoalDrafts]
5931
+ [fetchRecommendedClassDrafts]
5932
5932
  );
5933
5933
  const deleteModel = (0, import_react20.useCallback)(
5934
5934
  async (id) => {
5935
5935
  try {
5936
- await deleteGoalDraft(id);
5936
+ await deleteRecommendedClassDraft(id);
5937
5937
  return true;
5938
5938
  } catch (error) {
5939
5939
  console.error("Erro ao deletar rascunho:", error);
5940
5940
  return false;
5941
5941
  }
5942
5942
  },
5943
- [deleteGoalDraft]
5943
+ [deleteRecommendedClassDraft]
5944
5944
  );
5945
5945
  return {
5946
5946
  ...state,
@@ -6145,7 +6145,7 @@ var getSubjectOptions = (data) => {
6145
6145
  name: subject.name
6146
6146
  }));
6147
6147
  };
6148
- var createGoalDraftsFiltersConfig = (userData) => [
6148
+ var createRecommendedClassDraftsFiltersConfig = (userData) => [
6149
6149
  {
6150
6150
  key: "content",
6151
6151
  label: "CONTE\xDADO",
@@ -6161,7 +6161,7 @@ var createGoalDraftsFiltersConfig = (userData) => [
6161
6161
  ];
6162
6162
 
6163
6163
  // src/components/RecommendedLessonsHistory/utils/filterBuilders.ts
6164
- var buildGoalModelsFiltersFromParams = (params) => {
6164
+ var buildRecommendedClassModelsFiltersFromParams = (params) => {
6165
6165
  const filters = {
6166
6166
  page: params.page,
6167
6167
  limit: params.limit
@@ -6177,23 +6177,23 @@ var buildGoalModelsFiltersFromParams = (params) => {
6177
6177
 
6178
6178
  // src/components/RecommendedLessonsHistory/tabs/DraftsTab.tsx
6179
6179
  var import_jsx_runtime37 = require("react/jsx-runtime");
6180
- var GOAL_DRAFTS_CONFIG = {
6180
+ var RECOMMENDED_CLASS_DRAFTS_CONFIG = {
6181
6181
  entityName: "rascunho",
6182
6182
  entityNamePlural: "rascunhos",
6183
- testId: "goal-drafts-tab",
6183
+ testId: "recommendedClass-drafts-tab",
6184
6184
  emptyStateTitle: "Voc\xEA n\xE3o tem aulas recomendadas em rascunho",
6185
6185
  emptyStateDescription: "As aulas recomendadas que voc\xEA come\xE7ar a criar, aparecer\xE3o aqui automaticamente como rascunhos. Tudo \xE9 salvo enquanto voc\xEA cria, continue de onde parou quando quiser!",
6186
6186
  searchPlaceholder: "Buscar rascunho"
6187
6187
  };
6188
- var GOAL_DRAFTS_COLUMNS_CONFIG = {
6188
+ var RECOMMENDED_CLASS_DRAFTS_COLUMNS_CONFIG = {
6189
6189
  sendButtonLabel: "Enviar aula",
6190
6190
  sendButtonAriaLabel: "Enviar rascunho",
6191
6191
  deleteButtonAriaLabel: "Deletar rascunho",
6192
6192
  editButtonAriaLabel: "Editar rascunho"
6193
6193
  };
6194
- var GoalDraftsTab = ({
6195
- fetchGoalDrafts,
6196
- deleteGoalDraft,
6194
+ var RecommendedClassDraftsTab = ({
6195
+ fetchRecommendedClassDrafts,
6196
+ deleteRecommendedClassDraft,
6197
6197
  onCreateDraft,
6198
6198
  onSendDraft,
6199
6199
  onEditDraft,
@@ -6205,8 +6205,8 @@ var GoalDraftsTab = ({
6205
6205
  }) => /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
6206
6206
  ModelsTabBase,
6207
6207
  {
6208
- fetchModels: fetchGoalDrafts,
6209
- deleteModel: deleteGoalDraft,
6208
+ fetchModels: fetchRecommendedClassDrafts,
6209
+ deleteModel: deleteRecommendedClassDraft,
6210
6210
  onCreateModel: onCreateDraft,
6211
6211
  onSend: onSendDraft,
6212
6212
  onEditModel: onEditDraft,
@@ -6215,17 +6215,17 @@ var GoalDraftsTab = ({
6215
6215
  mapSubjectNameToEnum,
6216
6216
  userFilterData,
6217
6217
  subjectsMap,
6218
- config: GOAL_DRAFTS_CONFIG,
6218
+ config: RECOMMENDED_CLASS_DRAFTS_CONFIG,
6219
6219
  createTableColumns: (mapSubject, send, edit, del) => createModelsTableColumnsBase(
6220
6220
  mapSubject,
6221
6221
  send,
6222
6222
  edit,
6223
6223
  del,
6224
- GOAL_DRAFTS_COLUMNS_CONFIG
6224
+ RECOMMENDED_CLASS_DRAFTS_COLUMNS_CONFIG
6225
6225
  ),
6226
- createFiltersConfig: createGoalDraftsFiltersConfig,
6227
- buildFiltersFromParams: buildGoalModelsFiltersFromParams,
6228
- createUseModels: createUseGoalDrafts
6226
+ createFiltersConfig: createRecommendedClassDraftsFiltersConfig,
6227
+ buildFiltersFromParams: buildRecommendedClassModelsFiltersFromParams,
6228
+ createUseModels: createUseRecommendedClassDrafts
6229
6229
  }
6230
6230
  );
6231
6231
 
@@ -7207,7 +7207,7 @@ var getSubjectOptions2 = (data) => {
7207
7207
  name: subject.name
7208
7208
  }));
7209
7209
  };
7210
- var createGoalModelsFiltersConfig = (userData) => [
7210
+ var createRecommendedClassModelsFiltersConfig = (userData) => [
7211
7211
  {
7212
7212
  key: "content",
7213
7213
  label: "CONTE\xDADO",
@@ -7224,23 +7224,23 @@ var createGoalModelsFiltersConfig = (userData) => [
7224
7224
 
7225
7225
  // src/components/RecommendedLessonsHistory/tabs/ModelsTab.tsx
7226
7226
  var import_jsx_runtime41 = require("react/jsx-runtime");
7227
- var GOAL_MODELS_CONFIG = {
7227
+ var RECOMMENDED_CLASS_MODELS_CONFIG = {
7228
7228
  entityName: "aula",
7229
7229
  entityNamePlural: "aulas",
7230
- testId: "goal-models-tab",
7230
+ testId: "recommendedClass-models-tab",
7231
7231
  emptyStateTitle: "Crie modelos para agilizar suas aulas",
7232
7232
  emptyStateDescription: "Salve modelos de aulas recomendadas para reutilizar e enviar rapidamente para suas turmas!",
7233
7233
  searchPlaceholder: "Buscar modelo"
7234
7234
  };
7235
- var GOAL_COLUMNS_CONFIG = {
7235
+ var RECOMMENDED_CLASS_COLUMNS_CONFIG = {
7236
7236
  sendButtonLabel: "Enviar aula",
7237
7237
  sendButtonAriaLabel: "Enviar aula",
7238
7238
  deleteButtonAriaLabel: "Deletar modelo",
7239
7239
  editButtonAriaLabel: "Editar modelo"
7240
7240
  };
7241
- var GoalModelsTab = ({
7242
- fetchGoalModels,
7243
- deleteGoalModel,
7241
+ var RecommendedClassModelsTab = ({
7242
+ fetchRecommendedClassModels,
7243
+ deleteRecommendedClassModel,
7244
7244
  onCreateModel,
7245
7245
  onSendLesson,
7246
7246
  onEditModel,
@@ -7252,8 +7252,8 @@ var GoalModelsTab = ({
7252
7252
  }) => /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
7253
7253
  ModelsTabBase,
7254
7254
  {
7255
- fetchModels: fetchGoalModels,
7256
- deleteModel: deleteGoalModel,
7255
+ fetchModels: fetchRecommendedClassModels,
7256
+ deleteModel: deleteRecommendedClassModel,
7257
7257
  onCreateModel,
7258
7258
  onSend: onSendLesson,
7259
7259
  onEditModel,
@@ -7262,28 +7262,28 @@ var GoalModelsTab = ({
7262
7262
  mapSubjectNameToEnum,
7263
7263
  userFilterData,
7264
7264
  subjectsMap,
7265
- config: GOAL_MODELS_CONFIG,
7265
+ config: RECOMMENDED_CLASS_MODELS_CONFIG,
7266
7266
  createTableColumns: (mapSubject, send, edit, del) => createModelsTableColumnsBase(
7267
7267
  mapSubject,
7268
7268
  send,
7269
7269
  edit,
7270
7270
  del,
7271
- GOAL_COLUMNS_CONFIG
7271
+ RECOMMENDED_CLASS_COLUMNS_CONFIG
7272
7272
  ),
7273
- createFiltersConfig: createGoalModelsFiltersConfig,
7274
- buildFiltersFromParams: buildGoalModelsFiltersFromParams,
7275
- createUseModels: createUseGoalModels
7273
+ createFiltersConfig: createRecommendedClassModelsFiltersConfig,
7274
+ buildFiltersFromParams: buildRecommendedClassModelsFiltersFromParams,
7275
+ createUseModels: createUseRecommendedClassModels
7276
7276
  }
7277
7277
  );
7278
7278
 
7279
7279
  // src/components/RecommendedLessonsHistory/RecommendedLessonsHistory.tsx
7280
7280
  var import_jsx_runtime42 = require("react/jsx-runtime");
7281
- var GoalPageTab = /* @__PURE__ */ ((GoalPageTab2) => {
7282
- GoalPageTab2["HISTORY"] = "history";
7283
- GoalPageTab2["DRAFTS"] = "drafts";
7284
- GoalPageTab2["MODELS"] = "models";
7285
- return GoalPageTab2;
7286
- })(GoalPageTab || {});
7281
+ var RecommendedClassPageTab = /* @__PURE__ */ ((RecommendedClassPageTab2) => {
7282
+ RecommendedClassPageTab2["HISTORY"] = "history";
7283
+ RecommendedClassPageTab2["DRAFTS"] = "drafts";
7284
+ RecommendedClassPageTab2["MODELS"] = "models";
7285
+ return RecommendedClassPageTab2;
7286
+ })(RecommendedClassPageTab || {});
7287
7287
  var extractFilterValue = (param) => {
7288
7288
  if (!Array.isArray(param) || param.length === 0) return {};
7289
7289
  return param.length === 1 ? { single: param[0] } : { multiple: param };
@@ -7344,7 +7344,7 @@ var getClassOptions = (data) => {
7344
7344
  name: cls.name
7345
7345
  }));
7346
7346
  };
7347
- var createGoalFiltersConfig = (userData) => [
7347
+ var createRecommendedClassFiltersConfig = (userData) => [
7348
7348
  {
7349
7349
  key: "academic",
7350
7350
  label: "DADOS ACAD\xCAMICOS",
@@ -7419,12 +7419,12 @@ var createGoalFiltersConfig = (userData) => [
7419
7419
  key: "status",
7420
7420
  label: "Status",
7421
7421
  selectedIds: [],
7422
- itens: GOAL_FILTER_STATUS_OPTIONS
7422
+ itens: RECOMMENDED_CLASS_FILTER_STATUS_OPTIONS
7423
7423
  }
7424
7424
  ]
7425
7425
  }
7426
7426
  ];
7427
- var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
7427
+ var createTableColumns = (mapSubjectNameToEnum, onDeleteRecommendedClass, onEditRecommendedClass) => [
7428
7428
  {
7429
7429
  key: "startDate",
7430
7430
  label: "In\xEDcio",
@@ -7505,7 +7505,9 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
7505
7505
  Badge_default,
7506
7506
  {
7507
7507
  variant: "solid",
7508
- action: getGoalStatusBadgeAction(status),
7508
+ action: getRecommendedClassStatusBadgeAction(
7509
+ status
7510
+ ),
7509
7511
  size: "small",
7510
7512
  children: status
7511
7513
  }
@@ -7536,11 +7538,11 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
7536
7538
  render: (_value, row) => {
7537
7539
  const handleDelete = (e) => {
7538
7540
  e.stopPropagation();
7539
- onDeleteGoal?.(row.id);
7541
+ onDeleteRecommendedClass?.(row.id);
7540
7542
  };
7541
7543
  const handleEdit = (e) => {
7542
7544
  e.stopPropagation();
7543
- onEditGoal?.(row.id);
7545
+ onEditRecommendedClass?.(row.id);
7544
7546
  };
7545
7547
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)("div", { className: "flex justify-center gap-2", children: [
7546
7548
  /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
@@ -7573,11 +7575,11 @@ var createTableColumns = (mapSubjectNameToEnum, onDeleteGoal, onEditGoal) => [
7573
7575
  }
7574
7576
  ];
7575
7577
  var RecommendedLessonsHistory = ({
7576
- fetchGoalsHistory,
7578
+ fetchRecommendedClassHistory,
7577
7579
  onCreateLesson,
7578
7580
  onRowClick,
7579
- onDeleteGoal,
7580
- onEditGoal,
7581
+ onDeleteRecommendedClass,
7582
+ onEditRecommendedClass,
7581
7583
  emptyStateImage,
7582
7584
  noSearchImage,
7583
7585
  mapSubjectNameToEnum,
@@ -7585,14 +7587,14 @@ var RecommendedLessonsHistory = ({
7585
7587
  title = "Hist\xF3rico de aulas recomendadas",
7586
7588
  createButtonText = "Criar aula",
7587
7589
  searchPlaceholder = "Buscar aula",
7588
- fetchGoalModels,
7589
- deleteGoalModel,
7590
+ fetchRecommendedClassModels,
7591
+ deleteRecommendedClassModel,
7590
7592
  onCreateModel,
7591
7593
  onSendLesson,
7592
7594
  onEditModel,
7593
7595
  subjectsMap,
7594
- fetchGoalDrafts,
7595
- deleteGoalDraft,
7596
+ fetchRecommendedClassDrafts,
7597
+ deleteRecommendedClassDraft,
7596
7598
  onSendDraft,
7597
7599
  onEditDraft,
7598
7600
  defaultTab,
@@ -7614,35 +7616,39 @@ var RecommendedLessonsHistory = ({
7614
7616
  },
7615
7617
  [onTabChange]
7616
7618
  );
7617
- const fetchGoalsHistoryRef = (0, import_react24.useRef)(fetchGoalsHistory);
7618
- fetchGoalsHistoryRef.current = fetchGoalsHistory;
7619
- const useGoalsHistory = (0, import_react24.useMemo)(
7619
+ const fetchRecommendedClassHistoryRef = (0, import_react24.useRef)(fetchRecommendedClassHistory);
7620
+ fetchRecommendedClassHistoryRef.current = fetchRecommendedClassHistory;
7621
+ const useRecommendedClassHistory = (0, import_react24.useMemo)(
7620
7622
  () => createUseRecommendedLessonsHistory(
7621
- (filters) => fetchGoalsHistoryRef.current(filters)
7623
+ (filters) => fetchRecommendedClassHistoryRef.current(filters)
7622
7624
  ),
7623
7625
  []
7624
7626
  );
7625
7627
  const {
7626
- goals,
7628
+ recommendedClass,
7627
7629
  loading,
7628
7630
  error,
7629
7631
  pagination,
7630
- fetchGoals
7631
- } = useGoalsHistory();
7632
+ fetchRecommendedClass
7633
+ } = useRecommendedClassHistory();
7632
7634
  const initialFilterConfigs = (0, import_react24.useMemo)(
7633
- () => createGoalFiltersConfig(userFilterData),
7635
+ () => createRecommendedClassFiltersConfig(userFilterData),
7634
7636
  [userFilterData]
7635
7637
  );
7636
7638
  const tableColumns = (0, import_react24.useMemo)(
7637
- () => createTableColumns(mapSubjectNameToEnum, onDeleteGoal, onEditGoal),
7638
- [mapSubjectNameToEnum, onDeleteGoal, onEditGoal]
7639
+ () => createTableColumns(
7640
+ mapSubjectNameToEnum,
7641
+ onDeleteRecommendedClass,
7642
+ onEditRecommendedClass
7643
+ ),
7644
+ [mapSubjectNameToEnum, onDeleteRecommendedClass, onEditRecommendedClass]
7639
7645
  );
7640
7646
  const handleParamsChange = (0, import_react24.useCallback)(
7641
7647
  (params) => {
7642
7648
  const filters = buildFiltersFromParams(params);
7643
- fetchGoals(filters);
7649
+ fetchRecommendedClass(filters);
7644
7650
  },
7645
- [fetchGoals]
7651
+ [fetchRecommendedClass]
7646
7652
  );
7647
7653
  return /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
7648
7654
  "div",
@@ -7716,7 +7722,7 @@ var RecommendedLessonsHistory = ({
7716
7722
  activeTab === "history" /* HISTORY */ && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_jsx_runtime42.Fragment, { children: error ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text_default, { size: "lg", color: "text-error-500", children: error }) }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)("div", { className: "w-full", children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7717
7723
  TableProvider,
7718
7724
  {
7719
- data: goals,
7725
+ data: recommendedClass,
7720
7726
  headers: tableColumns,
7721
7727
  loading,
7722
7728
  variant: "borderless",
@@ -7783,11 +7789,11 @@ var RecommendedLessonsHistory = ({
7783
7789
  }
7784
7790
  }
7785
7791
  ) }) }),
7786
- activeTab === "drafts" /* DRAFTS */ && fetchGoalDrafts && deleteGoalDraft && onCreateLesson && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7787
- GoalDraftsTab,
7792
+ activeTab === "drafts" /* DRAFTS */ && fetchRecommendedClassDrafts && deleteRecommendedClassDraft && onCreateLesson && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7793
+ RecommendedClassDraftsTab,
7788
7794
  {
7789
- fetchGoalDrafts,
7790
- deleteGoalDraft,
7795
+ fetchRecommendedClassDrafts,
7796
+ deleteRecommendedClassDraft,
7791
7797
  onCreateDraft: onCreateLesson,
7792
7798
  onSendDraft,
7793
7799
  onEditDraft,
@@ -7798,11 +7804,11 @@ var RecommendedLessonsHistory = ({
7798
7804
  subjectsMap
7799
7805
  }
7800
7806
  ),
7801
- activeTab === "models" /* MODELS */ && fetchGoalModels && deleteGoalModel && onCreateModel && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7802
- GoalModelsTab,
7807
+ activeTab === "models" /* MODELS */ && fetchRecommendedClassModels && deleteRecommendedClassModel && onCreateModel && /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
7808
+ RecommendedClassModelsTab,
7803
7809
  {
7804
- fetchGoalModels,
7805
- deleteGoalModel,
7810
+ fetchRecommendedClassModels,
7811
+ deleteRecommendedClassModel,
7806
7812
  onCreateModel,
7807
7813
  onSendLesson,
7808
7814
  onEditModel,
@@ -7822,7 +7828,7 @@ var RecommendedLessonsHistory = ({
7822
7828
  var RecommendedLessonsHistory_default = RecommendedLessonsHistory;
7823
7829
  // Annotate the CommonJS export names for ESM import in node:
7824
7830
  0 && (module.exports = {
7825
- GoalPageTab,
7831
+ RecommendedClassPageTab,
7826
7832
  RecommendedLessonsHistory
7827
7833
  });
7828
7834
  //# sourceMappingURL=index.js.map