analytica-frontend-lib 1.3.69 → 1.3.71

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 (63) hide show
  1. package/dist/ActivitiesHistory/index.js +12 -6
  2. package/dist/ActivitiesHistory/index.js.map +1 -1
  3. package/dist/ActivitiesHistory/index.mjs +12 -6
  4. package/dist/ActivitiesHistory/index.mjs.map +1 -1
  5. package/dist/ActivityDetails/index.js +12 -6
  6. package/dist/ActivityDetails/index.js.map +1 -1
  7. package/dist/ActivityDetails/index.mjs +12 -6
  8. package/dist/ActivityDetails/index.mjs.map +1 -1
  9. package/dist/ActivityFilters/index.js +8 -5
  10. package/dist/ActivityFilters/index.js.map +1 -1
  11. package/dist/ActivityFilters/index.mjs +8 -5
  12. package/dist/ActivityFilters/index.mjs.map +1 -1
  13. package/dist/ActivityPageLayout/index.js +12 -6
  14. package/dist/ActivityPageLayout/index.js.map +1 -1
  15. package/dist/ActivityPageLayout/index.mjs +12 -6
  16. package/dist/ActivityPageLayout/index.mjs.map +1 -1
  17. package/dist/AlertManager/index.js +8 -5
  18. package/dist/AlertManager/index.js.map +1 -1
  19. package/dist/AlertManager/index.mjs +8 -5
  20. package/dist/AlertManager/index.mjs.map +1 -1
  21. package/dist/DropdownMenu/index.d.ts.map +1 -1
  22. package/dist/DropdownMenu/index.js +8 -5
  23. package/dist/DropdownMenu/index.js.map +1 -1
  24. package/dist/DropdownMenu/index.mjs +8 -5
  25. package/dist/DropdownMenu/index.mjs.map +1 -1
  26. package/dist/NotificationCard/index.js +8 -5
  27. package/dist/NotificationCard/index.js.map +1 -1
  28. package/dist/NotificationCard/index.mjs +8 -5
  29. package/dist/NotificationCard/index.mjs.map +1 -1
  30. package/dist/RecommendedLessonsHistory/index.js +12 -6
  31. package/dist/RecommendedLessonsHistory/index.js.map +1 -1
  32. package/dist/RecommendedLessonsHistory/index.mjs +12 -6
  33. package/dist/RecommendedLessonsHistory/index.mjs.map +1 -1
  34. package/dist/Search/index.js +8 -5
  35. package/dist/Search/index.js.map +1 -1
  36. package/dist/Search/index.mjs +8 -5
  37. package/dist/Search/index.mjs.map +1 -1
  38. package/dist/SendActivityModal/SendActivityModal.js +8 -5
  39. package/dist/SendActivityModal/SendActivityModal.js.map +1 -1
  40. package/dist/SendActivityModal/SendActivityModal.mjs +8 -5
  41. package/dist/SendActivityModal/SendActivityModal.mjs.map +1 -1
  42. package/dist/SendActivityModal/index.js +8 -5
  43. package/dist/SendActivityModal/index.js.map +1 -1
  44. package/dist/SendActivityModal/index.mjs +8 -5
  45. package/dist/SendActivityModal/index.mjs.map +1 -1
  46. package/dist/Table/TablePagination/index.d.ts.map +1 -1
  47. package/dist/Table/TablePagination/index.js +4 -1
  48. package/dist/Table/TablePagination/index.js.map +1 -1
  49. package/dist/Table/TablePagination/index.mjs +4 -1
  50. package/dist/Table/TablePagination/index.mjs.map +1 -1
  51. package/dist/Table/index.js +4 -1
  52. package/dist/Table/index.js.map +1 -1
  53. package/dist/Table/index.mjs +4 -1
  54. package/dist/Table/index.mjs.map +1 -1
  55. package/dist/TableProvider/index.js +12 -6
  56. package/dist/TableProvider/index.js.map +1 -1
  57. package/dist/TableProvider/index.mjs +12 -6
  58. package/dist/TableProvider/index.mjs.map +1 -1
  59. package/dist/index.js +68 -60
  60. package/dist/index.js.map +1 -1
  61. package/dist/index.mjs +68 -60
  62. package/dist/index.mjs.map +1 -1
  63. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7602,6 +7602,9 @@ var ProfileMenuInfo = (0, import_react22.forwardRef)(
7602
7602
  store: _store,
7603
7603
  ...props
7604
7604
  }, ref) => {
7605
+ if (!schoolName && !classYearName && !schoolYearName) {
7606
+ return null;
7607
+ }
7605
7608
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
7606
7609
  "div",
7607
7610
  {
@@ -7612,11 +7615,11 @@ var ProfileMenuInfo = (0, import_react22.forwardRef)(
7612
7615
  children: [
7613
7616
  /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("span", { className: "w-16 h-16" }),
7614
7617
  /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { className: "flex flex-col ", children: [
7615
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
7616
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "flex flex-row items-center gap-2", children: [
7617
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
7618
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("p", { className: "text-text-600 text-xs align-middle", children: "\u25CF" }),
7619
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
7618
+ schoolName && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
7619
+ (classYearName || schoolYearName) && /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("span", { className: "flex flex-row items-center gap-2", children: [
7620
+ classYearName && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
7621
+ classYearName && schoolYearName && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text_default, { size: "md", color: "text-text-600", children: "\u25CF" }),
7622
+ schoolYearName && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
7620
7623
  ] })
7621
7624
  ] })
7622
7625
  ]
@@ -8869,7 +8872,8 @@ var TablePagination = ({
8869
8872
  className,
8870
8873
  ...props
8871
8874
  }) => {
8872
- const startItem = (currentPage - 1) * itemsPerPage + 1;
8875
+ const startItem = totalItems === 0 ? 0 : (currentPage - 1) * itemsPerPage + 1;
8876
+ const endItem = totalItems === 0 ? 0 : Math.min(currentPage * itemsPerPage, totalItems);
8873
8877
  const handlePrevious = () => {
8874
8878
  if (currentPage > 1) {
8875
8879
  onPageChange(currentPage - 1);
@@ -8899,6 +8903,8 @@ var TablePagination = ({
8899
8903
  children: [
8900
8904
  /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { className: "font-normal text-xs leading-[14px] text-text-800", children: [
8901
8905
  startItem,
8906
+ " - ",
8907
+ endItem,
8902
8908
  " de ",
8903
8909
  totalItems,
8904
8910
  " ",
@@ -42611,22 +42617,6 @@ function buildStudentHoursSlices(hoursByItem) {
42611
42617
  }
42612
42618
  ];
42613
42619
  }
42614
- function buildProfessionalHoursSlices(hoursByItem) {
42615
- return [
42616
- {
42617
- label: "Atividades",
42618
- value: hoursByItem.activities.percentage,
42619
- colorClass: "bg-success-700",
42620
- color: "var(--Success-success700, #206F3E)"
42621
- },
42622
- {
42623
- label: "Aulas recomendadas",
42624
- value: hoursByItem.recommendedLessons.percentage,
42625
- colorClass: "bg-indicator-positive",
42626
- color: "var(--Indicator-Indicator-Positive, #F8CC2E)"
42627
- }
42628
- ];
42629
- }
42630
42620
  var ReportContentLayout = ({
42631
42621
  user,
42632
42622
  metricBoxes,
@@ -42688,40 +42678,48 @@ var StudentModalContent2 = ({ data }) => /* @__PURE__ */ (0, import_jsx_runtime1
42688
42678
  );
42689
42679
  var ProfessionalModalContent2 = ({
42690
42680
  data
42691
- }) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42692
- ReportContentLayout,
42693
- {
42694
- user: data.user,
42695
- platformSlices: buildPlatformSlices(data.accessByPlatform),
42696
- hoursSlices: buildProfessionalHoursSlices(data.hoursByItem),
42697
- metricBoxes: /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
42698
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(MetricBox, { label: "Tempo total", value: data.accessData.totalTime }),
42699
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(MetricBox, { label: "Atividades", value: data.accessData.activitiesTime }),
42700
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42701
- MetricBox,
42702
- {
42703
- label: "Aulas recomendadas",
42704
- value: data.accessData.recommendedLessonsTime
42705
- }
42706
- ),
42707
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42708
- MetricBox,
42709
- {
42710
- label: "Quantidade de acessos",
42711
- value: data.accessData.accessCount
42712
- }
42713
- ),
42714
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42715
- MetricBox,
42716
- {
42717
- label: "\xDAltimo acesso",
42718
- value: data.accessData.lastAccess ?? "\u2014"
42719
- }
42720
- )
42721
- ] })
42722
- }
42723
- );
42724
- var LoadingSkeleton8 = ({ metricCount }) => /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: "flex flex-col gap-4 animate-pulse", children: [
42681
+ }) => /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: "flex flex-col gap-6", children: [
42682
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42683
+ UserHeader,
42684
+ {
42685
+ name: data.user.name,
42686
+ school: data.user.school,
42687
+ className: data.user.class ?? "",
42688
+ year: data.user.year
42689
+ }
42690
+ ),
42691
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: "grid grid-cols-2 gap-3 sm:grid-cols-3", children: [
42692
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42693
+ MetricBox,
42694
+ {
42695
+ label: "Tempo na plataforma",
42696
+ value: data.accessData.totalTime
42697
+ }
42698
+ ),
42699
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42700
+ MetricBox,
42701
+ {
42702
+ label: "Quantidade de acessos",
42703
+ value: data.accessData.accessCount
42704
+ }
42705
+ ),
42706
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42707
+ MetricBox,
42708
+ {
42709
+ label: "\xDAltimo acesso",
42710
+ value: data.accessData.lastAccess ?? "\u2014"
42711
+ }
42712
+ )
42713
+ ] }),
42714
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: "flex flex-col gap-3", children: [
42715
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(SectionTitle, { children: "Plataforma de acesso" }),
42716
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(LegendPieCard, { slices: buildPlatformSlices(data.accessByPlatform) })
42717
+ ] })
42718
+ ] });
42719
+ var LoadingSkeleton8 = ({
42720
+ metricCount,
42721
+ showSecondaryChart = true
42722
+ }) => /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)("div", { className: "flex flex-col gap-4 animate-pulse", children: [
42725
42723
  /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "grid grid-cols-2 gap-3 sm:grid-cols-3", children: Array.from({ length: metricCount }, (_, i) => /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42726
42724
  "div",
42727
42725
  {
@@ -42731,8 +42729,10 @@ var LoadingSkeleton8 = ({ metricCount }) => /* @__PURE__ */ (0, import_jsx_runti
42731
42729
  )) }),
42732
42730
  /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "h-5 bg-background-200 rounded w-40 mt-2" }),
42733
42731
  /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "h-32 bg-background-200 rounded-xl" }),
42734
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "h-5 bg-background-200 rounded w-32" }),
42735
- /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "h-32 bg-background-200 rounded-xl" })
42732
+ showSecondaryChart && /* @__PURE__ */ (0, import_jsx_runtime174.jsxs)(import_jsx_runtime174.Fragment, { children: [
42733
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "h-5 bg-background-200 rounded w-32" }),
42734
+ /* @__PURE__ */ (0, import_jsx_runtime174.jsx)("div", { className: "h-32 bg-background-200 rounded-xl" })
42735
+ ] })
42736
42736
  ] });
42737
42737
  var AccessReportModal = ({
42738
42738
  isOpen,
@@ -42743,9 +42743,17 @@ var AccessReportModal = ({
42743
42743
  ...variantProps
42744
42744
  }) => {
42745
42745
  let content;
42746
- const metricCount = variantProps.variant === "student" /* STUDENT */ ? 6 : 5;
42746
+ const isStudent = variantProps.variant === "student" /* STUDENT */;
42747
+ const metricCount = isStudent ? 6 : 3;
42748
+ const showSecondaryChart = isStudent;
42747
42749
  if (loading) {
42748
- content = /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(LoadingSkeleton8, { metricCount });
42750
+ content = /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(
42751
+ LoadingSkeleton8,
42752
+ {
42753
+ metricCount,
42754
+ showSecondaryChart
42755
+ }
42756
+ );
42749
42757
  } else if (error) {
42750
42758
  content = /* @__PURE__ */ (0, import_jsx_runtime174.jsx)(ErrorContent5, { message: error });
42751
42759
  } else if (variantProps.data === null) {