@imj_media/tareas 1.6.1 → 1.6.3

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 (51) hide show
  1. package/dist/src/components/atoms/InputSearch.d.ts +8 -3
  2. package/dist/src/components/lista-campania/ActionsTaskList.d.ts +3 -1
  3. package/dist/src/components/molecules/ButtonAssignUsers.d.ts +3 -1
  4. package/dist/src/components/organisms/ConfirmationModal.d.ts +1 -1
  5. package/dist/src/components/organisms/DetailsTask.d.ts +1 -1
  6. package/dist/src/components/organisms/Task.d.ts +1 -1
  7. package/dist/src/components/tasks/DifficultyButton.d.ts +10 -0
  8. package/dist/src/components/tasks/PriorityButton.d.ts +3 -1
  9. package/dist/src/components/templates/progress-modal/config/estadoTareaProgreso.config.d.ts +2 -2
  10. package/dist/src/core/actions/get_tasks_project.action.d.ts +9 -39
  11. package/dist/src/core/actions/get_tasks_response.action.d.ts +26 -3
  12. package/dist/src/core/actions/get_teams_project.action.d.ts +1 -1
  13. package/dist/src/hooks/useDoneTasks.d.ts +3 -3
  14. package/dist/src/hooks/useToDoTasks.d.ts +3 -3
  15. package/dist/src/hooks/useWorkingTasks.d.ts +3 -3
  16. package/dist/src/infraestructure/interfaces/atraso-reasons-response.d.ts +1 -1
  17. package/dist/src/infraestructure/interfaces/pause-reasons.d.ts +1 -1
  18. package/dist/src/infraestructure/interfaces/tasks-campania-response.d.ts +2 -1
  19. package/dist/src/infraestructure/interfaces/tasks-kanban-general.d.ts +3 -1
  20. package/dist/src/infraestructure/interfaces/tasks-reponse.d.ts +27 -4
  21. package/dist/src/infraestructure/mappers/pause-reasons.d.ts +1 -0
  22. package/dist/src/modules/teams/ui/atoms/TeamModalHeader.d.ts +2 -2
  23. package/dist/src/modules/teams/utils/teams.utils.d.ts +24 -1
  24. package/dist/src/modules/templates/components/organisms/AddTemplateModal.d.ts +1 -1
  25. package/dist/src/modules/templates/components/organisms/NewTaskDrawer.d.ts +1 -1
  26. package/dist/src/modules/templates/hooks/filters/useGetInputFiltersByPath.d.ts +2 -2
  27. package/dist/src/modules/templates/hooks/filters/useStaticFilters.d.ts +1 -1
  28. package/dist/src/modules/templates/hooks/states/useStates.d.ts +1 -1
  29. package/dist/src/modules/templates/hooks/useFetchGraphTemplates.d.ts +1 -1
  30. package/dist/src/modules/templates/hooks/useFlow.types.d.ts +9 -9
  31. package/dist/src/modules/templates/hooks/useFlowActions.d.ts +1 -1
  32. package/dist/src/modules/templates/hooks/useZoomAndCenter.d.ts +6 -1
  33. package/dist/src/modules/templates/infraestructure/interfaces/filter.types.d.ts +4 -3
  34. package/dist/src/modules/templates/store/useTemplateGrid.d.ts +11 -0
  35. package/dist/src/shared/store/useStore.d.ts +4 -2
  36. package/dist/src/types/index.d.ts +29 -3
  37. package/dist/src/utils/canEditTaskFields.d.ts +6 -0
  38. package/dist/src/utils/filters.functions.d.ts +1 -1
  39. package/dist/src/utils/flattenEquipoMiembros.d.ts +38 -0
  40. package/dist/src/utils/formats.d.ts +4 -18
  41. package/dist/src/utils/inputs.functions.d.ts +2 -2
  42. package/dist/src/utils/kanbanOwnerFilterPermissions.d.ts +7 -0
  43. package/dist/src/utils/mapListItemToDetailsTaskData.d.ts +6 -0
  44. package/dist/src/utils/tanstack.functions.d.ts +12 -1
  45. package/dist/src/utils/taskKanbanBulkEligibility.d.ts +8 -7
  46. package/dist/tareas.cjs +9 -9
  47. package/dist/tareas.css +1 -1
  48. package/dist/tareas.es.js +6626 -6322
  49. package/package.json +1 -1
  50. package/dist/src/components/atoms/Toast.d.ts +0 -1
  51. package/dist/src/context/toastContext.d.ts +0 -14
@@ -1,5 +1,10 @@
1
- declare const InputSearch: ({ options, onselect }: {
2
- options: any[];
3
- onselect: (option: any) => void;
1
+ type SearchOption = {
2
+ id?: string | number;
3
+ name: string;
4
+ image?: string;
5
+ };
6
+ declare const InputSearch: ({ options, onselect, }: {
7
+ options: SearchOption[];
8
+ onselect: (option: SearchOption) => void;
4
9
  }) => import("react/jsx-runtime").JSX.Element;
5
10
  export default InputSearch;
@@ -1,8 +1,10 @@
1
- declare const ActionsTaskList: ({ id, priority, difficulty, endDate, atraso }: {
1
+ declare const ActionsTaskList: ({ id, priority, difficulty, endDate, atraso, role, status, }: {
2
2
  id: number;
3
3
  priority: number;
4
4
  difficulty: any;
5
5
  endDate: any;
6
6
  atraso: any;
7
+ role?: string | null;
8
+ status: number;
7
9
  }) => import("react/jsx-runtime").JSX.Element;
8
10
  export default ActionsTaskList;
@@ -1,6 +1,8 @@
1
1
  import { IUsers } from '../../infraestructure/interfaces/users';
2
- declare const ButtonAssignUsers: ({ users, onClick, responsible, role, status, }: {
2
+ declare const ButtonAssignUsers: ({ users, responsibleCandidateIds, onClick, responsible, role, status, }: {
3
3
  users: IUsers[] | [];
4
+ /** IDs de usuarios vinculados a la tarea en kanban (mismo orden que `users` sin filtrar por responsable). */
5
+ responsibleCandidateIds?: number[];
4
6
  onClick: (idNewResponsible: number | undefined, typeOfSelect: string) => void;
5
7
  role: string;
6
8
  responsible: number | null;
@@ -9,5 +9,5 @@ interface ConfirmationModalProps {
9
9
  confirmLabel?: string;
10
10
  cancelLabel?: string;
11
11
  }
12
- export declare const ConfirmationModal: ({ open, handleChange, children, title, onConfirm, contentLabel, confirmLabel, cancelLabel, isLoading }: ConfirmationModalProps) => import("react/jsx-runtime").JSX.Element;
12
+ export declare const ConfirmationModal: ({ open, handleChange, children, title, onConfirm, contentLabel, confirmLabel: _confirmLabel, cancelLabel: _cancelLabel, isLoading: _isLoading, }: ConfirmationModalProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export {};
@@ -1,2 +1,2 @@
1
1
  import { DetailsTaskProps } from '../../types';
2
- export default function DetailsTask({ isOpen, setIsOpen, taskId }: DetailsTaskProps): import('react').ReactPortal;
2
+ export default function DetailsTask({ isOpen, setIsOpen, taskId, initialFromList, }: DetailsTaskProps): import('react').ReactPortal;
@@ -9,5 +9,5 @@ type TaskProps = TasksKanbanGeneral & {
9
9
  /** Columna no base durante una sesión masiva: sin interacción con las cards. */
10
10
  isBulkColumnLocked?: boolean;
11
11
  };
12
- declare const Task: ({ id, task, endDate, users, willBePaused, nameProject, comments, priority, difficulty, responsible, nameRequiredTask, nameRequiredTaskResponsible, statusRequiredTask, status, repeatsToDo, repeats, medioName, paused, idProject, atraso, categoria, cambio_arte, name_father_required_task, name_father_required_task_responsible, boardColumnTitle, isBulkColumnLocked, }: TaskProps) => import("react/jsx-runtime").JSX.Element;
12
+ declare const Task: ({ id, task, endDate, users, willBePaused, nameProject, comments, priority, difficulty, responsible, nameRequiredTask, nameRequiredTaskResponsible, statusRequiredTask, status, repeatsToDo, repeats, medioName, paused, idProject, atraso, categoria, cambio_arte, name_father_required_task, name_father_required_task_responsible, panelDataFromList, boardColumnTitle, isBulkColumnLocked, }: TaskProps) => import("react/jsx-runtime").JSX.Element;
13
13
  export default Task;
@@ -0,0 +1,10 @@
1
+ export interface DifficultyButtonProps {
2
+ difficulty: number | null | undefined;
3
+ id: number;
4
+ /** Show level title next to the icon (e.g. details drawer, same as `PriorityButton`). */
5
+ withLabel?: boolean;
6
+ /** When false, show read-only tooltip (same pattern as `PriorityButton`). */
7
+ canEdit?: boolean;
8
+ }
9
+ declare const DifficultyButton: ({ difficulty, id, withLabel, canEdit }: DifficultyButtonProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default DifficultyButton;
@@ -2,6 +2,8 @@ interface IPriorityButtonProps {
2
2
  priority: number;
3
3
  id: number;
4
4
  withLabel?: boolean;
5
+ /** When false, show read-only tooltip (aligned with `ButtonAssignUsers` / `canEditTaskFields`). */
6
+ canEdit?: boolean;
5
7
  }
6
- declare const PriorityButton: ({ priority, id, withLabel }: IPriorityButtonProps) => import("react/jsx-runtime").JSX.Element;
8
+ declare const PriorityButton: ({ priority, id, withLabel, canEdit }: IPriorityButtonProps) => import("react/jsx-runtime").JSX.Element;
7
9
  export default PriorityButton;
@@ -50,8 +50,8 @@ export declare const ESTADO_TAREA_PROGRESO_DEFS: readonly [{
50
50
  export type GraficoSerieNombreApi = (typeof ESTADO_TAREA_PROGRESO_DEFS)[number]['serieApiName'];
51
51
  /** Orden fijo de segmentos en la barra apilada (claves que envía / espera el API en `grafico`). */
52
52
  export declare const SERIE_API_NAMES_ORDER: GraficoSerieNombreApi[];
53
- /** Estado de fila que interpreta “Solo atrasadas en filtros del modal. */
54
- export declare const ESTADO_SINGULAR_BLOQUEADA: EstadoTareaProgreso;
53
+ /** Singulares que el toggle de demora del modal incluye (misma regla en cliente). */
54
+ export declare const ESTADOS_TOGGLE_DEMORA_SET: ReadonlySet<string>;
55
55
  export declare function getEstadoDefBySingular(estadoTrimmedLower: string): {
56
56
  readonly singular: "completada";
57
57
  readonly serieApiName: "completadas";
@@ -1,44 +1,14 @@
1
1
  import { AxiosInstance } from 'axios';
2
- export interface IFilters {
3
- owner: IOwner;
4
- taskName?: string;
5
- difficulty?: TDifficulty;
6
- priority?: TPriority;
7
- dependency?: IDependency;
8
- status?: TStatus;
9
- project?: IProject;
10
- salesman?: ISalesman;
11
- pagination?: IPagination;
12
- cancelada?: boolean;
13
- }
14
- interface IOwner {
15
- user: number;
16
- config?: TConfigs;
17
- }
18
- interface IProject {
19
- id?: number;
20
- name?: string;
21
- }
22
- interface ISalesman {
23
- id?: number;
24
- name?: string;
25
- }
26
- interface IPagination {
27
- page?: number;
28
- pageSize?: number;
29
- withCount?: boolean;
30
- }
31
- interface IGetTasksResponse {
2
+ import { IFilters } from './get_tasks_response.action';
3
+ export type { TConfigs, IFilters } from './get_tasks_response.action';
4
+ interface IGetTasksProjectParams {
32
5
  filters: IFilters;
33
- page?: number;
34
- limit?: number;
35
6
  tasks_api: AxiosInstance;
36
7
  project: number;
37
8
  }
38
- export type TConfigs = 'yo_y_mis_equipos' | 'mis_equipos' | 'yo' | 'todas';
39
- type TDifficulty = 'Muy facil' | 'Facil' | 'Media' | 'Dificil' | 'Muy dificil';
40
- type TPriority = 'Sin prioridad' | 'Prioridad Baja' | 'Prioridad Media' | 'Prioridad Alta';
41
- type IDependency = 'con' | 'sin';
42
- type TStatus = 'por_hacer' | 'trabajando' | 'completadas';
43
- export declare const getTasksProject: ({ filters, tasks_api, project }: IGetTasksResponse) => Promise<import('../../infraestructure/interfaces/tasks-campania').ITasksCampaign[]>;
44
- export {};
9
+ /**
10
+ * Tareas del kanban de **una campaña** (proyecto): mismo POST que el kanban general,
11
+ * con `project.id` fijado al proyecto actual e `includeAllTasks: true` (equivalente al antiguo `listado_tareas_flujo`).
12
+ * Pagina hasta cubrir `meta.pagination.total`.
13
+ */
14
+ export declare const getTasksProject: ({ filters, tasks_api, project }: IGetTasksProjectParams) => Promise<import('../../infraestructure/interfaces/tasks-campania').ITasksCampaign[]>;
@@ -1,4 +1,6 @@
1
+ import { TasksKanbanGeneral } from '../../infraestructure/interfaces/tasks-kanban-general';
1
2
  import { AxiosInstance } from 'axios';
3
+ /** Filtros compartidos entre el GET legacy `listado_tareas` (otros flujos) y el POST `listado-kanban-general`. */
2
4
  export interface IFilters {
3
5
  owner: IOwner;
4
6
  taskName?: string;
@@ -11,10 +13,15 @@ export interface IFilters {
11
13
  pagination?: IPagination;
12
14
  justProjects?: boolean;
13
15
  populate?: string[];
16
+ includeAllTasks?: boolean;
17
+ cancelada?: boolean | number | string;
18
+ taskType?: string;
14
19
  }
15
20
  interface IOwner {
16
21
  user: number;
17
22
  config?: TConfigs;
23
+ role?: string;
24
+ teamIds?: number[];
18
25
  }
19
26
  interface IProject {
20
27
  id?: number;
@@ -35,10 +42,26 @@ interface IGetTasksResponse {
35
42
  limit?: number;
36
43
  tasks_api: AxiosInstance;
37
44
  }
38
- type TConfigs = 'yo_y_mis_equipos' | 'mis_equipos' | 'yo';
45
+ export type TConfigs = 'yo_y_mis_equipos' | 'mis_equipos' | 'yo' | 'todas';
39
46
  type TDifficulty = 'Muy facil' | 'Facil' | 'Media' | 'Dificil' | 'Muy dificil';
40
47
  type TPriority = 'Sin prioridad' | 'Prioridad Baja' | 'Prioridad Media' | 'Prioridad Alta';
41
- type IDependency = 'con' | 'sin';
48
+ type IDependency = 'con' | 'sin' | 'ambas';
42
49
  type TStatus = 'por_hacer' | 'trabajando' | 'completadas';
43
- export declare const getTasksResponse: ({ filters, tasks_api }: IGetTasksResponse) => Promise<any>;
50
+ export interface GetTasksKanbanPage {
51
+ tasks: TasksKanbanGeneral[];
52
+ total: number;
53
+ }
54
+ /**
55
+ * POST `listado-kanban-general`: filas ya normalizadas (sin mapear a card kanban).
56
+ * Sirve para kanban general (`KanbanTasksMapper`) y kanban campaña (`CampaignTasksMapper`).
57
+ */
58
+ export declare function fetchListadoKanbanGeneralRaw({ filters, tasks_api, }: IGetTasksResponse): Promise<{
59
+ rows: unknown[];
60
+ total: number;
61
+ }>;
62
+ /**
63
+ * Listado kanban general vía POST acotado (`listado-kanban-general`).
64
+ * `id_t_requerida` ya viene con responsable/equipo en servidor: no se llama a `/api/tareas` por filas.
65
+ */
66
+ export declare const getTasksResponse: ({ filters, tasks_api, }: IGetTasksResponse) => Promise<GetTasksKanbanPage>;
44
67
  export {};
@@ -40,5 +40,5 @@ type TDifficulty = 'Muy facil' | 'Facil' | 'Media' | 'Dificil' | 'Muy dificil';
40
40
  type TPriority = 'Sin prioridad' | 'Prioridad Baja' | 'Prioridad Media' | 'Prioridad Alta';
41
41
  type IDependency = 'con' | 'sin';
42
42
  type TStatus = 'por_hacer' | 'trabajando' | 'completadas';
43
- export declare const getTeamsResponse: ({ filters, tasks_api }: IGetTasksResponse) => Promise<void>;
43
+ export declare const getTeamsResponse: ({ filters: _filters, tasks_api: _tasks_api }: IGetTasksResponse) => Promise<void>;
44
44
  export {};
@@ -1,13 +1,13 @@
1
1
  declare const useDoneTasks: () => {
2
- doneTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<any, unknown>, Error>;
2
+ doneTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<import('../core/actions/get_tasks_response.action').GetTasksKanbanPage, unknown>, Error>;
3
3
  total: number;
4
4
  filtersToSend: {
5
5
  owner: {
6
6
  user: number;
7
- config: any;
7
+ config: import('../core/actions/get_tasks_response.action').TConfigs;
8
8
  role: string;
9
9
  };
10
- status: string;
10
+ status: "completadas";
11
11
  };
12
12
  };
13
13
  export default useDoneTasks;
@@ -1,13 +1,13 @@
1
1
  declare const useToDoTasks: () => {
2
- toDoTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<any, unknown>, Error>;
2
+ toDoTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<import('../core/actions/get_tasks_response.action').GetTasksKanbanPage, unknown>, Error>;
3
3
  total: number;
4
4
  filtersToSend: {
5
5
  owner: {
6
6
  user: number;
7
- config: any;
7
+ config: import('../core/actions/get_tasks_response.action').TConfigs;
8
8
  role: string;
9
9
  };
10
- status: string;
10
+ status: "por_hacer";
11
11
  };
12
12
  };
13
13
  export default useToDoTasks;
@@ -1,13 +1,13 @@
1
1
  declare const useWorkingTasks: () => {
2
- workingTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<any, unknown>, Error>;
2
+ workingTasks: import('@tanstack/react-query').UseInfiniteQueryResult<import('@tanstack/query-core').InfiniteData<import('../core/actions/get_tasks_response.action').GetTasksKanbanPage, unknown>, Error>;
3
3
  total: number;
4
4
  filtersToSend: {
5
5
  owner: {
6
6
  user: number;
7
- config: any;
7
+ config: import('../core/actions/get_tasks_response.action').TConfigs;
8
8
  role: string;
9
9
  };
10
- status: string;
10
+ status: "trabajando";
11
11
  };
12
12
  };
13
13
  export default useWorkingTasks;
@@ -5,6 +5,6 @@ export interface IAtrasoReasonsResponse {
5
5
  motivo_cliente: string;
6
6
  createdAt: Date;
7
7
  updatedAt: Date;
8
- tipo: any;
8
+ tipo: unknown;
9
9
  categoria: ICategory | null;
10
10
  }
@@ -1,4 +1,4 @@
1
- interface IPauseReasons {
1
+ export interface IPauseReasons {
2
2
  id: number;
3
3
  motivo_imj: string;
4
4
  }
@@ -56,7 +56,8 @@ export interface Equipo {
56
56
  export interface Miembro {
57
57
  id: number;
58
58
  idUser: Responsable;
59
- userOBP: UserOBP;
59
+ userOBP?: UserOBP;
60
+ miembros?: Miembro[];
60
61
  }
61
62
  export interface Responsable {
62
63
  id: number;
@@ -1,4 +1,4 @@
1
- import { IAtrasoReason, ICategory } from '../../types';
1
+ import { DetailsTaskData, IAtrasoReason, ICategory } from '../../types';
2
2
  import { IUsers } from './users';
3
3
  export interface TasksKanbanGeneral {
4
4
  id: number;
@@ -30,4 +30,6 @@ export interface TasksKanbanGeneral {
30
30
  };
31
31
  name_father_required_task?: string;
32
32
  name_father_required_task_responsible?: string;
33
+ /** Snapshot para el panel lateral sin `GET /api/detalleTarea` cuando el listado ya trae los campos. */
34
+ panelDataFromList?: DetailsTaskData | null;
33
35
  }
@@ -1,7 +1,15 @@
1
1
  import { IAtrasoReason, ICategory } from '../../types';
2
+ /** Auditoría listado kanban (doc `ListadoKanbanUserAudit`). */
3
+ export interface TareaUserAudit {
4
+ id: number | null;
5
+ nombre: string | null;
6
+ email: string | null;
7
+ }
2
8
  export interface ITasksResponse {
3
9
  id: number;
4
10
  texto_corto: string;
11
+ /** Descripción larga cuando el listado acotado la incluye (panel lateral sin detalle). */
12
+ texto_largo?: string | null;
5
13
  orden: number;
6
14
  prioridad: null;
7
15
  estatus: number;
@@ -24,9 +32,18 @@ export interface ITasksResponse {
24
32
  equipo: Equipo | null;
25
33
  supervisor: null;
26
34
  id_t_requerida: IDTRequerida | null;
27
- ids_t_dependientes: IDTRequerida[];
28
- created_by: null;
29
- updated_by: Responsable | null;
35
+ ids_t_dependientes?: IDTRequerida[] | unknown[];
36
+ comentarios?: unknown[];
37
+ lista?: string | null;
38
+ f_inicio_estimada?: Date | string | null;
39
+ f_fin_estimada?: Date | string | null;
40
+ createdAt?: Date | string | null;
41
+ updatedAt?: Date | string | null;
42
+ /** Respuestas legacy / serialización snake_case. */
43
+ created_at?: Date | string | null;
44
+ updated_at?: Date | string | null;
45
+ created_by?: TareaUserAudit | null;
46
+ updated_by?: TareaUserAudit | null;
30
47
  nombre_medio: string | null;
31
48
  pausada: boolean;
32
49
  atraso: IAtrasoReason | null;
@@ -45,13 +62,19 @@ export interface Equipo {
45
62
  miembros: Miembro[];
46
63
  }
47
64
  export interface Miembro {
65
+ id?: number;
48
66
  idUser: User;
49
- userOBP: UserOBP;
67
+ /** Payload legacy: OBP a veces venía en la raíz del miembro. */
68
+ userOBP?: UserOBP | null;
69
+ /** Jerarquía de equipo (listado OBP): sub-miembros con la misma forma. */
70
+ miembros?: Miembro[];
50
71
  }
51
72
  interface User {
52
73
  id: number;
53
74
  nombre: string;
54
75
  email: string;
76
+ /** Imagen/rol OBP del usuario (listado kanban). */
77
+ userOBP?: UserOBP | null;
55
78
  }
56
79
  interface UserOBP {
57
80
  id: number;
@@ -1,4 +1,5 @@
1
1
  import { IPauseReasonsResponse } from '../interfaces/pause-reasons-response';
2
+ import { IPauseReasons } from '../interfaces/pause-reasons';
2
3
  export declare class PauseReasonsMapper {
3
4
  static toPauseReasons(pauseReason: IPauseReasonsResponse): IPauseReasons;
4
5
  }
@@ -2,7 +2,7 @@ import { IconType } from '@imj_media/ui';
2
2
  interface TeamModalHeaderProps {
3
3
  title: string;
4
4
  color?: IconType;
5
- icon: any;
5
+ icon: IconType;
6
6
  }
7
- export declare function TeamModalHeader({ title, color, icon }: TeamModalHeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function TeamModalHeader({ title, color: _color, icon }: TeamModalHeaderProps): import("react/jsx-runtime").JSX.Element;
8
8
  export {};
@@ -1,5 +1,28 @@
1
1
  import { generatePopulateStructure } from './populate.utils';
2
- import { TeamFilters } from '../infrastructure/interfaces/team';
2
+ import { MemberList, Team, TeamFilters } from '../infrastructure/interfaces/team';
3
+ /**
4
+ * Aplana hijos directos del primer raíz para la API (alta y edición).
5
+ *
6
+ * - El primer raíz se mantiene con su árbol anidado (no se mueve a otros hijos).
7
+ * - Cada hijo directo del principal se envía también como fila raíz hermana
8
+ * (`miembros: []`, `miembro_padre: null`, `esEncargado: false`), para quienes
9
+ * **aún no** tienen esa fila plana en `otherRoots` (mismo `idUser.id`).
10
+ * - Así, un colaborador nuevo bajo el principal (p. ej. `id: null`) aparece en raíz
11
+ * sin duplicar a Maria/Andre/Zeferino que ya vienen como hermanos desde el backend.
12
+ *
13
+ * No se fuerza encargado: se respeta `esEncargado` del primer raíz.
14
+ *
15
+ * @see POST /api/registrar-equipo-miembros
16
+ * @see PATCH /api/actualizar-equipo-miembros/:id
17
+ */
18
+ export declare function expandFirstRootDirectChildrenForTeamPayload(team: Team): Team;
19
+ /**
20
+ * Miembros raíz a mostrar en el modal de equipo: solo encargados (`esEncargado`) y,
21
+ * bajo ellos, el árbol que ya viene en `miembros`. Oculta hermanos planos del API
22
+ * que no son encargado. Si no hay ningún encargado en raíz (p. ej. alta nueva),
23
+ * se muestran todos los raíz para poder seguir editando.
24
+ */
25
+ export declare function getMembersForModalView(miembros: MemberList): MemberList;
3
26
  export declare const randomColor: () => string;
4
27
  /**
5
28
  * Construye el objeto filters para la API de equipos (Strapi).
@@ -16,5 +16,5 @@ interface TemplateAddProps {
16
16
  nodeDataType: NodeDataType;
17
17
  parentNodeInfo?: ParentNodeInfo;
18
18
  }
19
- export declare const TemplateAdd: ({ isOpen, onClose, onSuccess, nodeDataType, parentNodeInfo }: TemplateAddProps) => import("react/jsx-runtime").JSX.Element;
19
+ export declare const TemplateAdd: ({ isOpen, onClose, onSuccess, nodeDataType, parentNodeInfo: _parentNodeInfo, }: TemplateAddProps) => import("react/jsx-runtime").JSX.Element;
20
20
  export {};
@@ -26,5 +26,5 @@ interface TaskFormData {
26
26
  type: string;
27
27
  parent?: ParentNodeInfo;
28
28
  }
29
- export declare const NewTaskDrawer: ({ isOpen, onClose, onSuccess, nodeDataType, parentNodeInfo, editMode, taskToEdit, }: NewTaskDrawerProps) => import("react/jsx-runtime").JSX.Element;
29
+ export declare const NewTaskDrawer: ({ isOpen, onClose, onSuccess, nodeDataType: _nodeDataType, parentNodeInfo, editMode, taskToEdit, }: NewTaskDrawerProps) => import("react/jsx-runtime").JSX.Element;
30
30
  export {};
@@ -38,7 +38,7 @@ export declare const useGetInputFiltersByPath: (currentPath: string) => {
38
38
  options?: import('@imj_media/ui').DropdownOption[];
39
39
  placeholder?: string;
40
40
  clearText?: string;
41
- type?: "date" | "group" | "dropdown" | "input" | "textarea" | "multiple" | "dateRange";
41
+ type?: "date" | "multiple" | "group" | "dropdown" | "input" | "textarea" | "dateRange";
42
42
  title?: string;
43
43
  } | {
44
44
  options: any;
@@ -49,7 +49,7 @@ export declare const useGetInputFiltersByPath: (currentPath: string) => {
49
49
  onValueChange?: (value: import('@imj_media/ui').FilterChangeValue) => void;
50
50
  placeholder?: string;
51
51
  clearText?: string;
52
- type?: "date" | "group" | "dropdown" | "input" | "textarea" | "multiple" | "dateRange";
52
+ type?: "date" | "multiple" | "group" | "dropdown" | "input" | "textarea" | "dateRange";
53
53
  title?: string;
54
54
  })[];
55
55
  };
@@ -19,5 +19,5 @@
19
19
  * ```
20
20
  */
21
21
  export declare const useStaticFilters: (currentPath: string) => {
22
- inputFilters: import('../../infraestructure/interfaces/filter.types').KanbanGeneralFiltersConfig;
22
+ inputFilters: import('../../infraestructure/interfaces/filter.types').TemplateFiltersConfig | import('../../infraestructure/interfaces/filter.types').TeamsFiltersConfig | import('../../infraestructure/interfaces/filter.types').KanbanGeneralFiltersConfig;
23
23
  };
@@ -18,7 +18,7 @@ export declare const useStates: () => {
18
18
  templateId: number;
19
19
  id: unknown;
20
20
  }) => Promise<void>;
21
- updateNodeWithNewEdge: ({ templateId, edge, task }: {
21
+ updateNodeWithNewEdge: ({ templateId, edge: _edge, task }: {
22
22
  templateId: number;
23
23
  edge: any;
24
24
  task: RawTareaPlantilla;
@@ -3,7 +3,7 @@ import { AxiosInstance } from 'axios';
3
3
  import { ApiResponse, MetaData } from '../../../types/api.types';
4
4
  import { UseQueryProps } from '../../../types/interfaces';
5
5
  import { TemplateGraph } from '../types/template_graph';
6
- export declare const getAllTemplatesResponse: ({ tasks_api, page, pageSize, search }: {
6
+ export declare const getAllTemplatesResponse: ({ tasks_api: _tasks_api, page, pageSize, search: _search }: {
7
7
  tasks_api: AxiosInstance;
8
8
  page?: number;
9
9
  pageSize?: number;
@@ -1,4 +1,4 @@
1
- import { Node, Edge } from '@xyflow/react';
1
+ import { Node, Edge, Connection, EdgeChange, NodeChange } from '@xyflow/react';
2
2
  export declare const FLOW_CONSTANTS: {
3
3
  readonly DEFAULT_CHILD_WIDTH: 260;
4
4
  readonly DEFAULT_CHILD_HEIGHT: 80;
@@ -43,7 +43,7 @@ export interface ParentNodeInfo {
43
43
  label?: string;
44
44
  nodeType?: string;
45
45
  connectionType?: string;
46
- data: any;
46
+ data: Record<string, unknown>;
47
47
  }
48
48
  export interface TaskFormData {
49
49
  id?: number;
@@ -74,26 +74,26 @@ export interface UseFlowReturn {
74
74
  connectionPopup: ConnectionPopupState | null;
75
75
  setNodes: (nodes: Node[] | ((nodes: Node[]) => Node[])) => void;
76
76
  setEdges: (edges: Edge[] | ((edges: Edge[]) => Edge[])) => void;
77
- onEdgesChange: (changes: any[]) => void;
78
- onConnect: (params: any) => void;
79
- onConnectEnd: (event: any, connectionState: any) => void;
77
+ onEdgesChange: (changes: EdgeChange[]) => void;
78
+ onConnect: (params: Connection) => void;
79
+ onConnectEnd: (event: unknown, connectionState: unknown) => void;
80
80
  onDeleteNode: (deleted: Node[]) => void;
81
81
  onEdgesDelete: (deleted: Edge[]) => void;
82
82
  onBeforeDelete: (nodes: {
83
83
  nodes: Node[];
84
84
  }) => Promise<boolean>;
85
- handleNodesChange: (changes: any[]) => void;
85
+ handleNodesChange: (changes: NodeChange[]) => void;
86
86
  getParentNodeInfo: () => ParentNodeInfo | null;
87
87
  isProtectedConnection: (edge: Edge) => boolean;
88
88
  isStartNode: (nodeId: string) => boolean;
89
89
  createNodeFromPopup: (nodeType: string, connectionType: string, formData?: TaskFormData) => Promise<void>;
90
90
  updateNodeFromPopup: (updatedData: Partial<TaskFormData> | {
91
- templateData?: any;
92
- } | any) => Promise<void>;
91
+ templateData?: Record<string, unknown>;
92
+ } | Record<string, unknown>) => Promise<void>;
93
93
  closeNewNodePopup: () => void;
94
94
  createConnectionFromPopup: (nodeType: string, connectionType: string) => void;
95
95
  closeConnectionPopup: () => void;
96
- onDragEnd: (event: any, b: any, c: any) => void;
96
+ onDragEnd: (event: unknown, data: unknown, _pane: unknown) => void;
97
97
  }
98
98
  export type ConnectionType = 'dependiente' | 'hija';
99
99
  export type NodeType = 'main' | 'group' | 'start';
@@ -20,6 +20,6 @@ export declare const useFlowActions: ({ nodes, edges, setNodes, setEdges, newNod
20
20
  updateNodeFromPopup: (updatedData: Partial<TaskFormData> | {
21
21
  templateData?: any;
22
22
  } | any) => Promise<void>;
23
- updateAfterDeleted: (deletedNodeIds?: any[], edges?: any[], templateId?: number, deletedNodeId?: number) => Promise<void>;
23
+ updateAfterDeleted: (deletedNodeIds?: any[], _edges?: any[], templateId?: number, deletedNodeId?: number) => Promise<void>;
24
24
  };
25
25
  export {};
@@ -100,6 +100,11 @@ export interface UseZoomAndCenterParams {
100
100
  * Se usa para detectar nodo principal y calcular viewport inicial.
101
101
  */
102
102
  nodes: any[];
103
+ /**
104
+ * Al cambiar (p. ej. otra plantilla activa), se limpia el historial de zoom
105
+ * para no mezclar deshacer entre flujos distintos.
106
+ */
107
+ resetZoomHistoryKey?: number | null;
103
108
  }
104
109
  /**
105
110
  * @interface UseZoomAndCenterReturn
@@ -156,4 +161,4 @@ export interface UseZoomAndCenterReturn {
156
161
  * └── handleDoubleClick() // Undo zoom
157
162
  * ```
158
163
  */
159
- export declare function useZoomAndCenter({ reactFlowWrapper, nodes }: UseZoomAndCenterParams): UseZoomAndCenterReturn;
164
+ export declare function useZoomAndCenter({ reactFlowWrapper, nodes, resetZoomHistoryKey, }: UseZoomAndCenterParams): UseZoomAndCenterReturn;
@@ -12,9 +12,10 @@ export type TeamsFiltersConfig = {
12
12
  integrantes_min: Filter;
13
13
  integrantes_max: Filter;
14
14
  };
15
- export type KanbanGeneralFiltersConfig = {};
16
- export type KanbanCampaniaFiltersConfig = {};
17
- export type ListaCampaniasFiltersConfig = {};
15
+ /** Sin filtros adicionales en esta vista (evita `{}` como tipo “vacío”). */
16
+ export type KanbanGeneralFiltersConfig = Record<string, never>;
17
+ export type KanbanCampaniaFiltersConfig = Record<string, never>;
18
+ export type ListaCampaniasFiltersConfig = Record<string, never>;
18
19
  export type InputFiltersByPathType = {
19
20
  'templates-container': TemplateFiltersConfig;
20
21
  'teams-container': TeamsFiltersConfig;
@@ -27,6 +27,17 @@ interface TemplateGridStore {
27
27
  setViewMode: (templateId: number, viewMode: 'readonly' | 'edit') => void;
28
28
  getViewMode: (templateId: number) => 'readonly' | 'edit';
29
29
  clearViewMode: (templateId: number) => void;
30
+ /** Pan/zoom del lienzo por plantilla (sesión actual); independiente entre flujos */
31
+ flowViewportByTemplateId: Record<number, {
32
+ x: number;
33
+ y: number;
34
+ zoom: number;
35
+ }>;
36
+ setFlowViewportForTemplate: (templateId: number, viewport: {
37
+ x: number;
38
+ y: number;
39
+ zoom: number;
40
+ }) => void;
30
41
  expandedGroups: Set<string>;
31
42
  groupTemplateData: Record<string, any>;
32
43
  toggleGroupExpansion: (groupId: string) => void;
@@ -1,6 +1,8 @@
1
1
  import { Template } from '../../modules/templates/types/template_graph';
2
2
  import { ITemplateFormData, IDisableFields, IClaveParams, IParamsTipo } from '../../modules/templates/infraestructure/interfaces/templates';
3
3
  type TViewMode = 'list' | 'grid';
4
+ /** Refetch típico de React Query (lista plantillas / grid). */
5
+ type QueryRefetchFn = () => Promise<unknown>;
4
6
  interface Store {
5
7
  path: string;
6
8
  viewMode: TViewMode;
@@ -14,7 +16,7 @@ interface Store {
14
16
  isEditTemplate: boolean;
15
17
  openModalCreateTemplate: boolean;
16
18
  currentTemplateForEdit: Template | null;
17
- refetch: any;
19
+ refetch: QueryRefetchFn | null;
18
20
  openModalUnsavedChanges: boolean;
19
21
  isDuplicateTemplate: boolean;
20
22
  hasFormChanges: boolean;
@@ -42,7 +44,7 @@ interface Store {
42
44
  setIsEditTemplate: (isEditTemplate: boolean) => void;
43
45
  setOpenModalCreateTemplate: (open: boolean) => void;
44
46
  setCurrentTemplateForEdit: (template: Template | null) => void;
45
- setRefetch: (refetch: any) => void;
47
+ setRefetch: (refetch: QueryRefetchFn) => void;
46
48
  setOpenModalUnsavedChanges: (open: boolean) => void;
47
49
  setIsDuplicateTemplate: (isDuplicateTemplate: boolean) => void;
48
50
  setHasFormChanges: (hasChanges: boolean) => void;