analytica-frontend-lib 1.2.82 → 1.2.84

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 (45) hide show
  1. package/dist/ActivitiesHistory/index.js +156 -147
  2. package/dist/ActivitiesHistory/index.js.map +1 -1
  3. package/dist/ActivitiesHistory/index.mjs +155 -146
  4. package/dist/ActivitiesHistory/index.mjs.map +1 -1
  5. package/dist/ActivityCardQuestionBanks/index.d.ts +6 -4
  6. package/dist/ActivityCardQuestionBanks/index.d.ts.map +1 -1
  7. package/dist/ActivityCardQuestionBanks/index.js.map +1 -1
  8. package/dist/ActivityCardQuestionBanks/index.mjs.map +1 -1
  9. package/dist/RecommendedLessonsHistory/index.js +129 -127
  10. package/dist/RecommendedLessonsHistory/index.js.map +1 -1
  11. package/dist/RecommendedLessonsHistory/index.mjs +128 -126
  12. package/dist/RecommendedLessonsHistory/index.mjs.map +1 -1
  13. package/dist/hooks/useActivitiesHistory/index.js.map +1 -1
  14. package/dist/hooks/useActivitiesHistory/index.mjs.map +1 -1
  15. package/dist/hooks/useActivityModels/index.d.ts +1 -1
  16. package/dist/hooks/useActivityModels/index.d.ts.map +1 -1
  17. package/dist/hooks/useActivityModels/index.js +13 -2
  18. package/dist/hooks/useActivityModels/index.js.map +1 -1
  19. package/dist/hooks/useActivityModels/index.mjs +13 -2
  20. package/dist/hooks/useActivityModels/index.mjs.map +1 -1
  21. package/dist/hooks/useActivityModels.d.ts +1 -1
  22. package/dist/hooks/useActivityModels.d.ts.map +1 -1
  23. package/dist/hooks/useRecommendedLessonsPage/index.d.ts +218 -0
  24. package/dist/hooks/useRecommendedLessonsPage/index.d.ts.map +1 -0
  25. package/dist/hooks/useRecommendedLessonsPage/index.js +247 -0
  26. package/dist/hooks/useRecommendedLessonsPage/index.js.map +1 -0
  27. package/dist/hooks/useRecommendedLessonsPage/index.mjs +221 -0
  28. package/dist/hooks/useRecommendedLessonsPage/index.mjs.map +1 -0
  29. package/dist/hooks/useRecommendedLessonsPage.d.ts +218 -0
  30. package/dist/hooks/useRecommendedLessonsPage.d.ts.map +1 -0
  31. package/dist/index.d.ts +6 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +2226 -1017
  34. package/dist/index.js.map +1 -1
  35. package/dist/index.mjs +2216 -1011
  36. package/dist/index.mjs.map +1 -1
  37. package/dist/types/activitiesHistory/index.d.ts +11 -1
  38. package/dist/types/activitiesHistory/index.d.ts.map +1 -1
  39. package/dist/types/activitiesHistory/index.js.map +1 -1
  40. package/dist/types/activitiesHistory/index.mjs.map +1 -1
  41. package/dist/types/activitiesHistory.d.ts +11 -1
  42. package/dist/types/activitiesHistory.d.ts.map +1 -1
  43. package/dist/types/questions.d.ts +1 -0
  44. package/dist/types/questions.d.ts.map +1 -1
  45. package/package.json +3 -1
@@ -5511,6 +5511,120 @@ var getSubjectInfo = (subject) => {
5511
5511
  };
5512
5512
  };
5513
5513
 
5514
+ // src/components/shared/ModelsTabBase/createModelsTableColumnsBase.tsx
5515
+ import { Trash, PencilSimple, PaperPlaneTilt } from "phosphor-react";
5516
+
5517
+ // src/utils/renderSubjectCell.tsx
5518
+ import { jsx as jsx33, jsxs as jsxs22 } from "react/jsx-runtime";
5519
+ var renderSubjectCell = (subjectName, mapSubjectNameToEnum, showEmptyDash = false) => {
5520
+ if (!subjectName) {
5521
+ return showEmptyDash ? /* @__PURE__ */ jsx33(Text_default, { size: "sm", color: "text-text-400", children: "-" }) : null;
5522
+ }
5523
+ const subjectEnum = mapSubjectNameToEnum?.(subjectName);
5524
+ if (!subjectEnum) {
5525
+ return /* @__PURE__ */ jsx33(Text_default, { size: "sm", className: "truncate", title: subjectName, children: subjectName });
5526
+ }
5527
+ const subjectInfo = getSubjectInfo(subjectEnum);
5528
+ return /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", title: subjectName, children: [
5529
+ /* @__PURE__ */ jsx33(
5530
+ "span",
5531
+ {
5532
+ className: cn(
5533
+ "w-[21px] h-[21px] flex items-center justify-center rounded-sm text-text-950 shrink-0",
5534
+ subjectInfo.colorClass
5535
+ ),
5536
+ children: subjectInfo.icon
5537
+ }
5538
+ ),
5539
+ /* @__PURE__ */ jsx33(Text_default, { size: "sm", className: "truncate", children: subjectName })
5540
+ ] });
5541
+ };
5542
+
5543
+ // src/components/shared/ModelsTabBase/createModelsTableColumnsBase.tsx
5544
+ import { jsx as jsx34, jsxs as jsxs23 } from "react/jsx-runtime";
5545
+ var createModelsTableColumnsBase = (mapSubjectNameToEnum, onSend, onEdit, onDelete, config) => [
5546
+ {
5547
+ key: "title",
5548
+ label: "T\xEDtulo",
5549
+ sortable: true,
5550
+ className: "max-w-[400px]",
5551
+ render: (value) => {
5552
+ const title = typeof value === "string" ? value : "";
5553
+ return /* @__PURE__ */ jsx34(Text_default, { size: "sm", title, className: "truncate block", children: title });
5554
+ }
5555
+ },
5556
+ {
5557
+ key: "savedAt",
5558
+ label: "Salvo em",
5559
+ sortable: true,
5560
+ className: "w-[120px]"
5561
+ },
5562
+ {
5563
+ key: "subject",
5564
+ label: "Mat\xE9ria",
5565
+ sortable: true,
5566
+ className: "max-w-[160px]",
5567
+ render: (value) => {
5568
+ const subjectName = typeof value === "string" ? value : "";
5569
+ return renderSubjectCell(subjectName, mapSubjectNameToEnum, true);
5570
+ }
5571
+ },
5572
+ {
5573
+ key: "actions",
5574
+ label: "",
5575
+ sortable: false,
5576
+ className: "w-[220px]",
5577
+ render: (_value, row) => {
5578
+ const handleSend = (e) => {
5579
+ e.stopPropagation();
5580
+ onSend?.(row);
5581
+ };
5582
+ const handleEdit = (e) => {
5583
+ e.stopPropagation();
5584
+ onEdit?.(row);
5585
+ };
5586
+ const handleDelete = (e) => {
5587
+ e.stopPropagation();
5588
+ onDelete(row);
5589
+ };
5590
+ return /* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-2 justify-end", children: [
5591
+ onSend && /* @__PURE__ */ jsx34(
5592
+ Button_default,
5593
+ {
5594
+ variant: "outline",
5595
+ action: "primary",
5596
+ size: "small",
5597
+ iconLeft: /* @__PURE__ */ jsx34(PaperPlaneTilt, { size: 16 }),
5598
+ onClick: handleSend,
5599
+ "aria-label": config.sendButtonAriaLabel,
5600
+ children: config.sendButtonLabel
5601
+ }
5602
+ ),
5603
+ /* @__PURE__ */ jsx34(
5604
+ IconButton_default,
5605
+ {
5606
+ icon: /* @__PURE__ */ jsx34(Trash, { size: 20 }),
5607
+ size: "md",
5608
+ onClick: handleDelete,
5609
+ "aria-label": config.deleteButtonAriaLabel,
5610
+ className: "text-text-600 hover:text-error-500 hover:bg-transparent"
5611
+ }
5612
+ ),
5613
+ onEdit && /* @__PURE__ */ jsx34(
5614
+ IconButton_default,
5615
+ {
5616
+ icon: /* @__PURE__ */ jsx34(PencilSimple, { size: 20 }),
5617
+ size: "md",
5618
+ onClick: handleEdit,
5619
+ "aria-label": config.editButtonAriaLabel,
5620
+ className: "text-text-600 hover:text-primary-700 hover:bg-transparent"
5621
+ }
5622
+ )
5623
+ ] });
5624
+ }
5625
+ }
5626
+ ];
5627
+
5514
5628
  // src/types/common.ts
5515
5629
  var getStatusBadgeAction = (status) => {
5516
5630
  const actionMap = {
@@ -5804,39 +5918,13 @@ var createUseGoalModels = (fetchGoalModels, deleteGoalModel) => {
5804
5918
  };
5805
5919
 
5806
5920
  // src/components/ActivitiesHistory/components/ErrorDisplay.tsx
5807
- import { jsx as jsx33 } from "react/jsx-runtime";
5808
- var ErrorDisplay = ({ error }) => /* @__PURE__ */ jsx33("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ jsx33(Text_default, { size: "lg", color: "text-error-500", children: error }) });
5809
-
5810
- // src/utils/renderSubjectCell.tsx
5811
- import { jsx as jsx34, jsxs as jsxs22 } from "react/jsx-runtime";
5812
- var renderSubjectCell = (subjectName, mapSubjectNameToEnum, showEmptyDash = false) => {
5813
- if (!subjectName) {
5814
- return showEmptyDash ? /* @__PURE__ */ jsx34(Text_default, { size: "sm", color: "text-text-400", children: "-" }) : null;
5815
- }
5816
- const subjectEnum = mapSubjectNameToEnum?.(subjectName);
5817
- if (!subjectEnum) {
5818
- return /* @__PURE__ */ jsx34(Text_default, { size: "sm", className: "truncate", title: subjectName, children: subjectName });
5819
- }
5820
- const subjectInfo = getSubjectInfo(subjectEnum);
5821
- return /* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-2", title: subjectName, children: [
5822
- /* @__PURE__ */ jsx34(
5823
- "span",
5824
- {
5825
- className: cn(
5826
- "w-[21px] h-[21px] flex items-center justify-center rounded-sm text-text-950 shrink-0",
5827
- subjectInfo.colorClass
5828
- ),
5829
- children: subjectInfo.icon
5830
- }
5831
- ),
5832
- /* @__PURE__ */ jsx34(Text_default, { size: "sm", className: "truncate", children: subjectName })
5833
- ] });
5834
- };
5921
+ import { jsx as jsx35 } from "react/jsx-runtime";
5922
+ var ErrorDisplay = ({ error }) => /* @__PURE__ */ jsx35("div", { className: "flex items-center justify-center bg-background rounded-xl w-full min-h-[705px]", children: /* @__PURE__ */ jsx35(Text_default, { size: "lg", color: "text-error-500", children: error }) });
5835
5923
 
5836
5924
  // src/components/shared/ModelsTabBase/ModelsTabBase.tsx
5837
5925
  import { useState as useState13, useCallback as useCallback4, useMemo as useMemo4, useRef as useRef6, useEffect as useEffect13 } from "react";
5838
5926
  import { Plus } from "phosphor-react";
5839
- import { Fragment as Fragment7, jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
5927
+ import { Fragment as Fragment7, jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
5840
5928
  var ModelsTabBase = ({
5841
5929
  fetchModels: fetchModelsProp,
5842
5930
  deleteModel: deleteModelProp,
@@ -5928,9 +6016,9 @@ var ModelsTabBase = ({
5928
6016
  setDeleteDialogOpen(false);
5929
6017
  setModelToDelete(null);
5930
6018
  }, []);
5931
- return /* @__PURE__ */ jsxs23(Fragment7, { children: [
5932
- /* @__PURE__ */ jsx35(Toaster_default, {}),
5933
- modelsError ? /* @__PURE__ */ jsx35(ErrorDisplay, { error: modelsError }) : /* @__PURE__ */ jsx35("div", { className: "w-full", "data-testid": config.testId, children: /* @__PURE__ */ jsx35(
6019
+ return /* @__PURE__ */ jsxs24(Fragment7, { children: [
6020
+ /* @__PURE__ */ jsx36(Toaster_default, {}),
6021
+ modelsError ? /* @__PURE__ */ jsx36(ErrorDisplay, { error: modelsError }) : /* @__PURE__ */ jsx36("div", { className: "w-full", "data-testid": config.testId, children: /* @__PURE__ */ jsx36(
5934
6022
  TableProvider,
5935
6023
  {
5936
6024
  data: models,
@@ -5954,14 +6042,14 @@ var ModelsTabBase = ({
5954
6042
  image: noSearchImage
5955
6043
  },
5956
6044
  emptyState: {
5957
- component: /* @__PURE__ */ jsx35(
6045
+ component: /* @__PURE__ */ jsx36(
5958
6046
  EmptyState_default,
5959
6047
  {
5960
6048
  image: emptyStateImage,
5961
6049
  title: config.emptyStateTitle,
5962
6050
  description: config.emptyStateDescription,
5963
6051
  buttonText: "Criar modelo",
5964
- buttonIcon: /* @__PURE__ */ jsx35(Plus, { size: 18 }),
6052
+ buttonIcon: /* @__PURE__ */ jsx36(Plus, { size: 18 }),
5965
6053
  buttonVariant: "outline",
5966
6054
  buttonAction: "primary",
5967
6055
  onButtonClick: onCreateModel
@@ -5975,22 +6063,22 @@ var ModelsTabBase = ({
5975
6063
  table,
5976
6064
  pagination: paginationComponent
5977
6065
  } = renderProps;
5978
- return /* @__PURE__ */ jsxs23("div", { className: "space-y-4", children: [
5979
- /* @__PURE__ */ jsxs23("div", { className: "flex items-center justify-between gap-4", children: [
5980
- /* @__PURE__ */ jsx35(
6066
+ return /* @__PURE__ */ jsxs24("div", { className: "space-y-4", children: [
6067
+ /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between gap-4", children: [
6068
+ /* @__PURE__ */ jsx36(
5981
6069
  Button_default,
5982
6070
  {
5983
6071
  variant: "solid",
5984
6072
  action: "primary",
5985
6073
  size: "medium",
5986
6074
  onClick: onCreateModel,
5987
- iconLeft: /* @__PURE__ */ jsx35(Plus, { size: 18, weight: "bold" }),
6075
+ iconLeft: /* @__PURE__ */ jsx36(Plus, { size: 18, weight: "bold" }),
5988
6076
  children: "Criar modelo"
5989
6077
  }
5990
6078
  ),
5991
6079
  controls
5992
6080
  ] }),
5993
- /* @__PURE__ */ jsxs23("div", { className: "bg-background rounded-xl p-6 space-y-4", children: [
6081
+ /* @__PURE__ */ jsxs24("div", { className: "bg-background rounded-xl p-6 space-y-4", children: [
5994
6082
  table,
5995
6083
  paginationComponent
5996
6084
  ] })
@@ -5998,7 +6086,7 @@ var ModelsTabBase = ({
5998
6086
  }
5999
6087
  }
6000
6088
  ) }),
6001
- /* @__PURE__ */ jsx35(
6089
+ /* @__PURE__ */ jsx36(
6002
6090
  AlertDialog,
6003
6091
  {
6004
6092
  isOpen: deleteDialogOpen,
@@ -6014,92 +6102,6 @@ var ModelsTabBase = ({
6014
6102
  ] });
6015
6103
  };
6016
6104
 
6017
- // src/components/shared/ModelsTabBase/createModelsTableColumnsBase.tsx
6018
- import { Trash, PencilSimple, PaperPlaneTilt } from "phosphor-react";
6019
- import { jsx as jsx36, jsxs as jsxs24 } from "react/jsx-runtime";
6020
- var createModelsTableColumnsBase = (mapSubjectNameToEnum, onSend, onEdit, onDelete, config) => [
6021
- {
6022
- key: "title",
6023
- label: "T\xEDtulo",
6024
- sortable: true,
6025
- className: "max-w-[400px]",
6026
- render: (value) => {
6027
- const title = typeof value === "string" ? value : "";
6028
- return /* @__PURE__ */ jsx36(Text_default, { size: "sm", title, className: "truncate block", children: title });
6029
- }
6030
- },
6031
- {
6032
- key: "savedAt",
6033
- label: "Salvo em",
6034
- sortable: true,
6035
- className: "w-[120px]"
6036
- },
6037
- {
6038
- key: "subject",
6039
- label: "Mat\xE9ria",
6040
- sortable: true,
6041
- className: "max-w-[160px]",
6042
- render: (value) => {
6043
- const subjectName = typeof value === "string" ? value : "";
6044
- return renderSubjectCell(subjectName, mapSubjectNameToEnum, true);
6045
- }
6046
- },
6047
- {
6048
- key: "actions",
6049
- label: "",
6050
- sortable: false,
6051
- className: "w-[220px]",
6052
- render: (_value, row) => {
6053
- const handleSend = (e) => {
6054
- e.stopPropagation();
6055
- onSend?.(row);
6056
- };
6057
- const handleEdit = (e) => {
6058
- e.stopPropagation();
6059
- onEdit?.(row);
6060
- };
6061
- const handleDelete = (e) => {
6062
- e.stopPropagation();
6063
- onDelete(row);
6064
- };
6065
- return /* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-2 justify-end", children: [
6066
- onSend && /* @__PURE__ */ jsx36(
6067
- Button_default,
6068
- {
6069
- variant: "outline",
6070
- action: "primary",
6071
- size: "small",
6072
- iconLeft: /* @__PURE__ */ jsx36(PaperPlaneTilt, { size: 16 }),
6073
- onClick: handleSend,
6074
- "aria-label": config.sendButtonAriaLabel,
6075
- children: config.sendButtonLabel
6076
- }
6077
- ),
6078
- /* @__PURE__ */ jsx36(
6079
- IconButton_default,
6080
- {
6081
- icon: /* @__PURE__ */ jsx36(Trash, { size: 20 }),
6082
- size: "md",
6083
- onClick: handleDelete,
6084
- "aria-label": config.deleteButtonAriaLabel,
6085
- className: "text-text-600 hover:text-error-500 hover:bg-transparent"
6086
- }
6087
- ),
6088
- onEdit && /* @__PURE__ */ jsx36(
6089
- IconButton_default,
6090
- {
6091
- icon: /* @__PURE__ */ jsx36(PencilSimple, { size: 20 }),
6092
- size: "md",
6093
- onClick: handleEdit,
6094
- "aria-label": config.editButtonAriaLabel,
6095
- className: "text-text-600 hover:text-primary-700 hover:bg-transparent"
6096
- }
6097
- )
6098
- ] });
6099
- }
6100
- }
6101
- ];
6102
-
6103
6105
  // src/components/CheckBoxGroup/CheckBoxGroup.helpers.ts
6104
6106
  var areSelectedIdsEqual = (ids1, ids2) => {
6105
6107
  if (ids1 === ids2) return true;