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.mjs CHANGED
@@ -7247,6 +7247,9 @@ var ProfileMenuInfo = forwardRef10(
7247
7247
  store: _store,
7248
7248
  ...props
7249
7249
  }, ref) => {
7250
+ if (!schoolName && !classYearName && !schoolYearName) {
7251
+ return null;
7252
+ }
7250
7253
  return /* @__PURE__ */ jsxs23(
7251
7254
  "div",
7252
7255
  {
@@ -7257,11 +7260,11 @@ var ProfileMenuInfo = forwardRef10(
7257
7260
  children: [
7258
7261
  /* @__PURE__ */ jsx30("span", { className: "w-16 h-16" }),
7259
7262
  /* @__PURE__ */ jsxs23("div", { className: "flex flex-col ", children: [
7260
- /* @__PURE__ */ jsx30(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
7261
- /* @__PURE__ */ jsxs23("span", { className: "flex flex-row items-center gap-2", children: [
7262
- /* @__PURE__ */ jsx30(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
7263
- /* @__PURE__ */ jsx30("p", { className: "text-text-600 text-xs align-middle", children: "\u25CF" }),
7264
- /* @__PURE__ */ jsx30(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
7263
+ schoolName && /* @__PURE__ */ jsx30(Text_default, { size: "md", color: "text-text-600", children: schoolName }),
7264
+ (classYearName || schoolYearName) && /* @__PURE__ */ jsxs23("span", { className: "flex flex-row items-center gap-2", children: [
7265
+ classYearName && /* @__PURE__ */ jsx30(Text_default, { size: "md", color: "text-text-600", children: classYearName }),
7266
+ classYearName && schoolYearName && /* @__PURE__ */ jsx30(Text_default, { size: "md", color: "text-text-600", children: "\u25CF" }),
7267
+ schoolYearName && /* @__PURE__ */ jsx30(Text_default, { size: "md", color: "text-text-600", children: schoolYearName })
7265
7268
  ] })
7266
7269
  ] })
7267
7270
  ]
@@ -8525,7 +8528,8 @@ var TablePagination = ({
8525
8528
  className,
8526
8529
  ...props
8527
8530
  }) => {
8528
- const startItem = (currentPage - 1) * itemsPerPage + 1;
8531
+ const startItem = totalItems === 0 ? 0 : (currentPage - 1) * itemsPerPage + 1;
8532
+ const endItem = totalItems === 0 ? 0 : Math.min(currentPage * itemsPerPage, totalItems);
8529
8533
  const handlePrevious = () => {
8530
8534
  if (currentPage > 1) {
8531
8535
  onPageChange(currentPage - 1);
@@ -8555,6 +8559,8 @@ var TablePagination = ({
8555
8559
  children: [
8556
8560
  /* @__PURE__ */ jsxs31("span", { className: "font-normal text-xs leading-[14px] text-text-800", children: [
8557
8561
  startItem,
8562
+ " - ",
8563
+ endItem,
8558
8564
  " de ",
8559
8565
  totalItems,
8560
8566
  " ",
@@ -42442,22 +42448,6 @@ function buildStudentHoursSlices(hoursByItem) {
42442
42448
  }
42443
42449
  ];
42444
42450
  }
42445
- function buildProfessionalHoursSlices(hoursByItem) {
42446
- return [
42447
- {
42448
- label: "Atividades",
42449
- value: hoursByItem.activities.percentage,
42450
- colorClass: "bg-success-700",
42451
- color: "var(--Success-success700, #206F3E)"
42452
- },
42453
- {
42454
- label: "Aulas recomendadas",
42455
- value: hoursByItem.recommendedLessons.percentage,
42456
- colorClass: "bg-indicator-positive",
42457
- color: "var(--Indicator-Indicator-Positive, #F8CC2E)"
42458
- }
42459
- ];
42460
- }
42461
42451
  var ReportContentLayout = ({
42462
42452
  user,
42463
42453
  metricBoxes,
@@ -42519,40 +42509,48 @@ var StudentModalContent2 = ({ data }) => /* @__PURE__ */ jsx174(
42519
42509
  );
42520
42510
  var ProfessionalModalContent2 = ({
42521
42511
  data
42522
- }) => /* @__PURE__ */ jsx174(
42523
- ReportContentLayout,
42524
- {
42525
- user: data.user,
42526
- platformSlices: buildPlatformSlices(data.accessByPlatform),
42527
- hoursSlices: buildProfessionalHoursSlices(data.hoursByItem),
42528
- metricBoxes: /* @__PURE__ */ jsxs140(Fragment40, { children: [
42529
- /* @__PURE__ */ jsx174(MetricBox, { label: "Tempo total", value: data.accessData.totalTime }),
42530
- /* @__PURE__ */ jsx174(MetricBox, { label: "Atividades", value: data.accessData.activitiesTime }),
42531
- /* @__PURE__ */ jsx174(
42532
- MetricBox,
42533
- {
42534
- label: "Aulas recomendadas",
42535
- value: data.accessData.recommendedLessonsTime
42536
- }
42537
- ),
42538
- /* @__PURE__ */ jsx174(
42539
- MetricBox,
42540
- {
42541
- label: "Quantidade de acessos",
42542
- value: data.accessData.accessCount
42543
- }
42544
- ),
42545
- /* @__PURE__ */ jsx174(
42546
- MetricBox,
42547
- {
42548
- label: "\xDAltimo acesso",
42549
- value: data.accessData.lastAccess ?? "\u2014"
42550
- }
42551
- )
42552
- ] })
42553
- }
42554
- );
42555
- var LoadingSkeleton8 = ({ metricCount }) => /* @__PURE__ */ jsxs140("div", { className: "flex flex-col gap-4 animate-pulse", children: [
42512
+ }) => /* @__PURE__ */ jsxs140("div", { className: "flex flex-col gap-6", children: [
42513
+ /* @__PURE__ */ jsx174(
42514
+ UserHeader,
42515
+ {
42516
+ name: data.user.name,
42517
+ school: data.user.school,
42518
+ className: data.user.class ?? "",
42519
+ year: data.user.year
42520
+ }
42521
+ ),
42522
+ /* @__PURE__ */ jsxs140("div", { className: "grid grid-cols-2 gap-3 sm:grid-cols-3", children: [
42523
+ /* @__PURE__ */ jsx174(
42524
+ MetricBox,
42525
+ {
42526
+ label: "Tempo na plataforma",
42527
+ value: data.accessData.totalTime
42528
+ }
42529
+ ),
42530
+ /* @__PURE__ */ jsx174(
42531
+ MetricBox,
42532
+ {
42533
+ label: "Quantidade de acessos",
42534
+ value: data.accessData.accessCount
42535
+ }
42536
+ ),
42537
+ /* @__PURE__ */ jsx174(
42538
+ MetricBox,
42539
+ {
42540
+ label: "\xDAltimo acesso",
42541
+ value: data.accessData.lastAccess ?? "\u2014"
42542
+ }
42543
+ )
42544
+ ] }),
42545
+ /* @__PURE__ */ jsxs140("div", { className: "flex flex-col gap-3", children: [
42546
+ /* @__PURE__ */ jsx174(SectionTitle, { children: "Plataforma de acesso" }),
42547
+ /* @__PURE__ */ jsx174(LegendPieCard, { slices: buildPlatformSlices(data.accessByPlatform) })
42548
+ ] })
42549
+ ] });
42550
+ var LoadingSkeleton8 = ({
42551
+ metricCount,
42552
+ showSecondaryChart = true
42553
+ }) => /* @__PURE__ */ jsxs140("div", { className: "flex flex-col gap-4 animate-pulse", children: [
42556
42554
  /* @__PURE__ */ jsx174("div", { className: "grid grid-cols-2 gap-3 sm:grid-cols-3", children: Array.from({ length: metricCount }, (_, i) => /* @__PURE__ */ jsx174(
42557
42555
  "div",
42558
42556
  {
@@ -42562,8 +42560,10 @@ var LoadingSkeleton8 = ({ metricCount }) => /* @__PURE__ */ jsxs140("div", { cla
42562
42560
  )) }),
42563
42561
  /* @__PURE__ */ jsx174("div", { className: "h-5 bg-background-200 rounded w-40 mt-2" }),
42564
42562
  /* @__PURE__ */ jsx174("div", { className: "h-32 bg-background-200 rounded-xl" }),
42565
- /* @__PURE__ */ jsx174("div", { className: "h-5 bg-background-200 rounded w-32" }),
42566
- /* @__PURE__ */ jsx174("div", { className: "h-32 bg-background-200 rounded-xl" })
42563
+ showSecondaryChart && /* @__PURE__ */ jsxs140(Fragment40, { children: [
42564
+ /* @__PURE__ */ jsx174("div", { className: "h-5 bg-background-200 rounded w-32" }),
42565
+ /* @__PURE__ */ jsx174("div", { className: "h-32 bg-background-200 rounded-xl" })
42566
+ ] })
42567
42567
  ] });
42568
42568
  var AccessReportModal = ({
42569
42569
  isOpen,
@@ -42574,9 +42574,17 @@ var AccessReportModal = ({
42574
42574
  ...variantProps
42575
42575
  }) => {
42576
42576
  let content;
42577
- const metricCount = variantProps.variant === "student" /* STUDENT */ ? 6 : 5;
42577
+ const isStudent = variantProps.variant === "student" /* STUDENT */;
42578
+ const metricCount = isStudent ? 6 : 3;
42579
+ const showSecondaryChart = isStudent;
42578
42580
  if (loading) {
42579
- content = /* @__PURE__ */ jsx174(LoadingSkeleton8, { metricCount });
42581
+ content = /* @__PURE__ */ jsx174(
42582
+ LoadingSkeleton8,
42583
+ {
42584
+ metricCount,
42585
+ showSecondaryChart
42586
+ }
42587
+ );
42580
42588
  } else if (error) {
42581
42589
  content = /* @__PURE__ */ jsx174(ErrorContent5, { message: error });
42582
42590
  } else if (variantProps.data === null) {