@imj_media/tareas 1.4.6 → 1.5.0

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 (59) hide show
  1. package/dist/packages/tareas/src/components/atoms/BasicLoading.d.ts +12 -0
  2. package/dist/packages/tareas/src/components/atoms/ButtonTooltip.d.ts +11 -0
  3. package/dist/packages/tareas/src/components/molecules/Pagination.d.ts +16 -0
  4. package/dist/packages/tareas/src/components/molecules/PickerColor.d.ts +8 -0
  5. package/dist/packages/tareas/src/components/organisms/ConfirmationModal.d.ts +13 -0
  6. package/dist/packages/tareas/src/components/organisms/Paginator.d.ts +16 -0
  7. package/dist/packages/tareas/src/components/organisms/modal/Modal.d.ts +20 -0
  8. package/dist/packages/tareas/src/constants/animation.d.ts +4 -0
  9. package/dist/packages/tareas/src/core/actions/get_all_users.action.d.ts +5 -1
  10. package/dist/packages/tareas/src/core/actions/get_teams_project.action.d.ts +44 -0
  11. package/dist/packages/tareas/src/core/actions/user_task/get_all_users.action.d.ts +5 -0
  12. package/dist/packages/tareas/src/hooks/useAllUsersOBP.d.ts +1 -1
  13. package/dist/packages/tareas/src/hooks/useAllUsersWithIndex.d.ts +5 -0
  14. package/dist/packages/tareas/src/hooks/useApiError.d.ts +3 -0
  15. package/dist/packages/tareas/src/hooks/useUsers.d.ts +5 -0
  16. package/dist/packages/tareas/src/infraestructure/interfaces/users-mt-response.d.ts +59 -0
  17. package/dist/packages/tareas/src/infraestructure/interfaces/users-mt.d.ts +6 -0
  18. package/dist/packages/tareas/src/infraestructure/interfaces/users.d.ts +7 -0
  19. package/dist/packages/tareas/src/infraestructure/mappers/all-users-obp.d.ts +3 -1
  20. package/dist/packages/tareas/src/infraestructure/mappers/all-users.d.ts +5 -0
  21. package/dist/packages/tareas/src/modules/teams/constants/const.d.ts +3 -0
  22. package/dist/packages/tareas/src/modules/teams/hooks/index.d.ts +2 -0
  23. package/dist/packages/tareas/src/modules/teams/hooks/useTeamMutations.d.ts +21 -0
  24. package/dist/packages/tareas/src/modules/teams/hooks/useTeams.d.ts +16 -0
  25. package/dist/packages/tareas/src/modules/teams/infrastructure/interfaces/populate.d.ts +34 -0
  26. package/dist/packages/tareas/src/modules/teams/infrastructure/interfaces/team.d.ts +62 -0
  27. package/dist/packages/tareas/src/modules/teams/infrastructure/mappers/teams.d.ts +21 -0
  28. package/dist/packages/tareas/src/modules/teams/ui/atoms/TeamModalFooter.d.ts +7 -0
  29. package/dist/packages/tareas/src/modules/teams/ui/atoms/TeamModalHeader.d.ts +7 -0
  30. package/dist/packages/tareas/src/modules/teams/ui/atoms/TeamNameInput.d.ts +6 -0
  31. package/dist/packages/tareas/src/modules/teams/ui/atoms/TeamNode.d.ts +9 -0
  32. package/dist/packages/tareas/src/modules/teams/ui/atoms/index.d.ts +4 -0
  33. package/dist/packages/tareas/src/modules/teams/ui/index.d.ts +3 -0
  34. package/dist/packages/tareas/src/modules/teams/ui/molecules/TeamsModal.d.ts +8 -0
  35. package/dist/packages/tareas/src/modules/teams/ui/molecules/TeamsOrganigram.d.ts +6 -0
  36. package/dist/packages/tareas/src/modules/teams/ui/molecules/createUpdate/MemberActions.d.ts +12 -0
  37. package/dist/packages/tareas/src/modules/teams/ui/molecules/createUpdate/MemberItem.d.ts +5 -0
  38. package/dist/packages/tareas/src/modules/teams/ui/molecules/createUpdate/MemberNode.d.ts +8 -0
  39. package/dist/packages/tareas/src/modules/teams/ui/molecules/createUpdate/MembersList.d.ts +8 -0
  40. package/dist/packages/tareas/src/modules/teams/ui/molecules/createUpdate/index.d.ts +4 -0
  41. package/dist/packages/tareas/src/modules/teams/ui/molecules/index.d.ts +3 -0
  42. package/dist/packages/tareas/src/modules/teams/ui/molecules/temporal/Dropdown.d.ts +45 -0
  43. package/dist/packages/tareas/src/modules/teams/ui/molecules/temporal/Tooltip.d.ts +21 -0
  44. package/dist/packages/tareas/src/modules/teams/ui/organisms/TeamsContainer.d.ts +2 -0
  45. package/dist/packages/tareas/src/modules/teams/ui/organisms/TeamsGrid.d.ts +4 -0
  46. package/dist/packages/tareas/src/modules/teams/ui/organisms/TeamsGridSkeleton.d.ts +4 -0
  47. package/dist/packages/tareas/src/modules/teams/ui/organisms/index.d.ts +3 -0
  48. package/dist/packages/tareas/src/modules/teams/utils/populate.utils.d.ts +2 -0
  49. package/dist/packages/tareas/src/modules/teams/utils/teams.utils.d.ts +3 -0
  50. package/dist/packages/tareas/src/pages/App.d.ts +1 -1
  51. package/dist/packages/tareas/src/types/api.types.d.ts +12 -0
  52. package/dist/packages/tareas/src/types/interfaces.d.ts +6 -0
  53. package/dist/packages/tareas/src/types/layout.types.d.ts +4 -2
  54. package/dist/packages/tareas/src/utils/filters.functions.d.ts +8 -0
  55. package/dist/packages/tareas/src/utils/formats.d.ts +4 -0
  56. package/dist/tareas.cjs +69 -24
  57. package/dist/tareas.css +1 -1
  58. package/dist/tareas.es.js +3211 -1419
  59. package/package.json +4 -2
@@ -0,0 +1,12 @@
1
+ interface LoadingStyle {
2
+ size: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
+ borderStyle: 'solid' | 'dotted' | 'dashed';
4
+ borderWidth: 'thin' | 'normal' | 'thick';
5
+ color: 'primary' | 'silver' | 'black' | 'white' | 'danger' | 'success' | 'warning' | 'info';
6
+ speed: 'slow' | 'normal' | 'fast';
7
+ }
8
+ interface BasicLoadingProps {
9
+ style?: Partial<LoadingStyle>;
10
+ }
11
+ declare function BasicLoading({ style }: BasicLoadingProps): import("react/jsx-runtime").JSX.Element;
12
+ export default BasicLoading;
@@ -0,0 +1,11 @@
1
+ import { Icons } from '@imj_media/tasks-modules';
2
+ type TOptionsIcons = Parameters<typeof Icons>[0]['icon'];
3
+ interface ButtonTooltipProps {
4
+ icon: TOptionsIcons;
5
+ label: string;
6
+ variant?: 'primary' | 'success' | 'danger' | 'warning';
7
+ onClick?: () => void;
8
+ disabled?: boolean;
9
+ }
10
+ export declare const ButtonTooltip: ({ icon, label, variant, onClick, disabled }: ButtonTooltipProps) => import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,16 @@
1
+ declare const OPTIONS: number[];
2
+ interface PaginationProps {
3
+ currentPage: number;
4
+ pageCount: number;
5
+ elementsOfText?: string;
6
+ pageSize?: (typeof OPTIONS)[number];
7
+ pageSizeText?: string;
8
+ total?: number;
9
+ optionsSize?: number[];
10
+ onPageChange: (page: number) => void;
11
+ handlePageSize?: (pageSize: number) => void;
12
+ className?: string;
13
+ maxVisiblePages?: number;
14
+ }
15
+ export declare const Pagination: ({ currentPage, pageCount, pageSize, total, pageSizeText, elementsOfText, optionsSize, onPageChange, handlePageSize, className, maxVisiblePages, }: PaginationProps) => import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,8 @@
1
+ interface PickerColorProps {
2
+ color: string;
3
+ setColor: (color: string) => void;
4
+ label?: string;
5
+ className?: string;
6
+ }
7
+ export declare function ColorPicker({ color, setColor, label, className, }: PickerColorProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,13 @@
1
+ interface ConfirmationModalProps {
2
+ open: boolean;
3
+ handleChange: (open: boolean) => void;
4
+ onConfirm: () => void;
5
+ children?: React.ReactNode;
6
+ title?: string;
7
+ isLoading?: boolean;
8
+ contentLabel?: string;
9
+ confirmLabel?: string;
10
+ cancelLabel?: string;
11
+ }
12
+ export declare const ConfirmationModal: ({ open, handleChange, children, title, onConfirm, contentLabel, confirmLabel, cancelLabel, isLoading }: ConfirmationModalProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,16 @@
1
+ import { default as React } from 'react';
2
+ import { UseQueryResult } from '@tanstack/react-query';
3
+ import { ApiResponse } from '../../types/api.types';
4
+ import { UseQueryProps } from '../../types/interfaces';
5
+ interface PaginatorProps<T, U> {
6
+ children: (data: T[], isFetching: boolean) => React.ReactNode;
7
+ pageSize?: number;
8
+ Loading?: React.ReactElement;
9
+ loadingText?: string;
10
+ queryHook: (params: UseQueryProps<U>) => UseQueryResult<ApiResponse<T>, unknown>;
11
+ searchTerm?: string;
12
+ filters?: U;
13
+ }
14
+ declare function PaginatorComponent<T, U>({ children, queryHook, pageSize, Loading, loadingText, searchTerm, filters, }: PaginatorProps<T, U>): import("react/jsx-runtime").JSX.Element;
15
+ export declare const Paginator: typeof PaginatorComponent;
16
+ export {};
@@ -0,0 +1,20 @@
1
+ import { default as React } from 'react';
2
+ type CloseIconsType = 'default' | 'circle';
3
+ type Sizes = 'sm' | 'md' | 'lg' | 'xl' | 'full';
4
+ interface Props {
5
+ open: boolean;
6
+ handleChange: (open: boolean) => void;
7
+ children: React.ReactNode;
8
+ size?: Sizes;
9
+ title?: string;
10
+ isButtonClose?: boolean;
11
+ closeIcon?: CloseIconsType;
12
+ dialogClassName?: string;
13
+ contentClassName?: string;
14
+ headerClassName?: string;
15
+ noMinHeight?: boolean;
16
+ titleClassName?: string;
17
+ descriptionClassName?: string;
18
+ }
19
+ export declare function Modal({ handleChange, open, size, title, children, noMinHeight, dialogClassName, contentClassName, headerClassName, titleClassName, isButtonClose, descriptionClassName, closeIcon, }: Props): import("react/jsx-runtime").JSX.Element;
20
+ export {};
@@ -0,0 +1,4 @@
1
+ export declare const ANIMATION: {
2
+ 'spin-slow': string;
3
+ 'spin-fast': string;
4
+ };
@@ -1,5 +1,6 @@
1
1
  import { AxiosInstance } from 'axios';
2
- import { IUsers } from '../../infraestructure/interfaces/users';
2
+ import { IUsers, IndexUsers } from '../../infraestructure/interfaces/users';
3
+ import { IUsersResponseOBP } from '../../infraestructure/interfaces/users-mt-response';
3
4
  /**
4
5
  * Obtiene los usuarios que son miembros de un equipo
5
6
  * @param tasks_api - AxiosInstance
@@ -8,3 +9,6 @@ import { IUsers } from '../../infraestructure/interfaces/users';
8
9
  export declare const getAllUSersResponse: ({ tasks_api, }: {
9
10
  tasks_api: AxiosInstance;
10
11
  }) => Promise<IUsers[]>;
12
+ export declare const getAllUserWithIndexResponse: ({ users }: {
13
+ users: IUsersResponseOBP[];
14
+ }) => Promise<IndexUsers>;
@@ -0,0 +1,44 @@
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
+ justProjects?: boolean;
13
+ populate?: string[];
14
+ }
15
+ interface IOwner {
16
+ user: number;
17
+ config?: TConfigs;
18
+ }
19
+ interface IProject {
20
+ id?: number;
21
+ name?: string;
22
+ }
23
+ interface ISalesman {
24
+ id?: number;
25
+ name?: string;
26
+ }
27
+ interface IPagination {
28
+ page?: number;
29
+ pageSize?: number;
30
+ withCount?: boolean;
31
+ }
32
+ interface IGetTasksResponse {
33
+ filters: IFilters;
34
+ page?: number;
35
+ limit?: number;
36
+ tasks_api: AxiosInstance;
37
+ }
38
+ type TConfigs = 'yo_y_mis_equipos' | 'mis_equipos' | 'yo';
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 getTeamsResponse: ({ filters, tasks_api }: IGetTasksResponse) => Promise<void>;
44
+ export {};
@@ -0,0 +1,5 @@
1
+ import { AxiosInstance } from 'axios';
2
+ import { IUsers } from '../../../infraestructure/interfaces/users-mt';
3
+ export declare const getAllUsersResponse: ({ tasks_api, }: {
4
+ tasks_api: AxiosInstance;
5
+ }) => Promise<IUsers[]>;
@@ -1,4 +1,4 @@
1
1
  declare const useAllUsers: () => {
2
- users: import('@tanstack/react-query').UseQueryResult<any, Error>;
2
+ users: import('@tanstack/react-query').UseQueryResult<import('../infraestructure/interfaces/users-mt-response').IUsersResponseOBP[], Error>;
3
3
  };
4
4
  export default useAllUsers;
@@ -0,0 +1,5 @@
1
+ declare const useAllUsersWithIndex: () => {
2
+ users: import('../infraestructure/interfaces/users').IndexUsers;
3
+ isLoading: boolean;
4
+ };
5
+ export default useAllUsersWithIndex;
@@ -0,0 +1,3 @@
1
+ export declare const useApiError: () => {
2
+ handleApiError: (error: unknown) => string;
3
+ };
@@ -0,0 +1,5 @@
1
+ declare const useUsers: () => {
2
+ isLoading: boolean;
3
+ users: import('../infraestructure/interfaces/users-mt').IUsers[];
4
+ };
5
+ export default useUsers;
@@ -0,0 +1,59 @@
1
+ export interface IUsersResponse {
2
+ id: number;
3
+ image?: string;
4
+ email: string;
5
+ nombre: string;
6
+ provider: string;
7
+ confirmed: boolean;
8
+ blocked: boolean;
9
+ createdAt: string;
10
+ updatedAt: string;
11
+ username: string;
12
+ }
13
+ type ImageFormat = {
14
+ ext: string;
15
+ url: string;
16
+ hash: string;
17
+ mime: string;
18
+ name: string;
19
+ path: string | null;
20
+ size: number;
21
+ width: number;
22
+ height: number;
23
+ };
24
+ export interface IUsersResponseOBP {
25
+ id: number;
26
+ nombre: string;
27
+ username: string;
28
+ email: string;
29
+ blocked: boolean;
30
+ siglas: string;
31
+ role: {
32
+ id: number;
33
+ name: string;
34
+ };
35
+ imagen: {
36
+ id: number;
37
+ name: string;
38
+ formats: {
39
+ large: ImageFormat;
40
+ small: ImageFormat;
41
+ medium: ImageFormat;
42
+ thumbnail: ImageFormat;
43
+ };
44
+ };
45
+ tasksUser: {
46
+ id: number;
47
+ nombre: string;
48
+ email: string;
49
+ };
50
+ esMiembroEquipo: {
51
+ id: number;
52
+ idUser: {
53
+ id: number;
54
+ nombre: string;
55
+ email: string;
56
+ };
57
+ };
58
+ }
59
+ export {};
@@ -0,0 +1,6 @@
1
+ export interface IUsers {
2
+ id: number;
3
+ name: string;
4
+ image?: string;
5
+ email?: string;
6
+ }
@@ -7,4 +7,11 @@ export interface IUsers {
7
7
  id: number;
8
8
  nombre: string;
9
9
  };
10
+ role: {
11
+ id: number;
12
+ name: string;
13
+ };
14
+ }
15
+ export interface IndexUsers {
16
+ [key: string]: IUsers;
10
17
  }
@@ -1,5 +1,7 @@
1
+ import { IUsersResponseOBP } from '../interfaces/users-mt-response';
2
+ import { IUsers, IndexUsers } from '../interfaces/users';
1
3
  import { IAllUsersOBPResponse } from '../interfaces/users-obp-response';
2
- import { IUsers } from '../interfaces/users';
3
4
  export declare class AllUsersOBPMapper {
4
5
  static toUsers(user: IAllUsersOBPResponse): IUsers;
6
+ static toUsersWithIndex(users: IUsersResponseOBP[]): IndexUsers;
5
7
  }
@@ -0,0 +1,5 @@
1
+ import { IUsersResponse } from '../interfaces/users-mt-response';
2
+ import { IUsers } from '../interfaces/users-mt';
3
+ export declare class AllUsersMapper {
4
+ static toUsers(user: IUsersResponse): IUsers;
5
+ }
@@ -0,0 +1,3 @@
1
+ import { Member } from '../infrastructure/interfaces/team';
2
+ export declare const INITIAL_MEMBER: Member;
3
+ export declare const MANAGER_ROLE = "Project Manager";
@@ -0,0 +1,2 @@
1
+ export * from './useTeams';
2
+ export * from './useTeamMutations';
@@ -0,0 +1,21 @@
1
+ import { AxiosError } from 'axios';
2
+ import { ApiResponse } from '../../../types/api.types';
3
+ import { Team, Member } from '../infrastructure/interfaces/team';
4
+ type UpdateTeamParams = {
5
+ teamId: number;
6
+ data: Team;
7
+ };
8
+ type UpdateMemberParams<T extends keyof Member> = {
9
+ memberId: number;
10
+ field: T;
11
+ value: Member[T];
12
+ };
13
+ export declare const useTeamMutations: () => {
14
+ addTeamHandler: import('@tanstack/react-query').UseMutateAsyncFunction<any, AxiosError<unknown, any>, Team, void>;
15
+ deleteTeamHandler: import('@tanstack/react-query').UseMutateAsyncFunction<ApiResponse<Team>, Error, number, unknown>;
16
+ updateTeamHandler: import('@tanstack/react-query').UseMutateAsyncFunction<ApiResponse<Team>, Error, UpdateTeamParams, unknown>;
17
+ updateMemberHandler: import('@tanstack/react-query').UseMutateAsyncFunction<ApiResponse<Member>, Error, UpdateMemberParams<keyof Member>, unknown>;
18
+ invalidateTeams: () => void;
19
+ isLoadingDeleteTeam: boolean;
20
+ };
21
+ export {};
@@ -0,0 +1,16 @@
1
+ import { UseQueryResult } from '@tanstack/react-query';
2
+ import { AxiosInstance } from 'axios';
3
+ import { ApiResponse, MetaData } from '../../../types/api.types';
4
+ import { Team, TeamFilters } from '../infrastructure/interfaces/team';
5
+ import { UseQueryProps } from '../../../types/interfaces';
6
+ export declare const getAllTeamsResponse: ({ tasks_api, page, pageSize, search, filters }: {
7
+ tasks_api: AxiosInstance;
8
+ page?: number;
9
+ pageSize?: number;
10
+ search?: string;
11
+ filters?: TeamFilters;
12
+ }) => Promise<{
13
+ data: Team[];
14
+ meta: MetaData;
15
+ }>;
16
+ export declare const useTeams: ({ page, pageSize, search, filters }: UseQueryProps<TeamFilters>) => UseQueryResult<ApiResponse<Team>, unknown>;
@@ -0,0 +1,34 @@
1
+ type BaseFields = {
2
+ miembro_padre: {
3
+ fields: string[];
4
+ };
5
+ idUser: {
6
+ populate: string;
7
+ };
8
+ miembros: {
9
+ populate: BaseFields | {
10
+ populate: string;
11
+ };
12
+ filters: {
13
+ idUser: {
14
+ blocked: boolean;
15
+ };
16
+ };
17
+ };
18
+ };
19
+ export type NestedStructure = BaseFields | {
20
+ populate: string;
21
+ };
22
+ export interface PopulateStructure {
23
+ miembros: {
24
+ populate: BaseFields | {
25
+ populate: string;
26
+ };
27
+ filters: {
28
+ idUser: {
29
+ blocked: boolean;
30
+ };
31
+ };
32
+ };
33
+ }
34
+ export {};
@@ -0,0 +1,62 @@
1
+ export interface User {
2
+ id: number;
3
+ username: string;
4
+ email: string;
5
+ provider: string;
6
+ confirmed: boolean;
7
+ blocked: boolean;
8
+ createdAt: string;
9
+ updatedAt: string;
10
+ nombre: string;
11
+ image?: string;
12
+ }
13
+ export interface Member {
14
+ id: number | null;
15
+ uid: number;
16
+ esEncargado: boolean;
17
+ idUser: User;
18
+ miembros: MemberList | null;
19
+ miembro_padre: Member | null;
20
+ createdAt?: string;
21
+ updatedAt?: string;
22
+ }
23
+ export type EmptyMember = Omit<Member, 'createdAt' | 'updatedAt' | 'idUser' | 'miembro_padre'> & {
24
+ idUser: {
25
+ id: number;
26
+ nombre?: string;
27
+ email?: string;
28
+ image?: string;
29
+ };
30
+ miembros: MemberList;
31
+ miembro_padre: {
32
+ id?: number | null;
33
+ uid?: number | null;
34
+ idUser?: {
35
+ id?: number;
36
+ nombre?: string;
37
+ email?: string;
38
+ image?: string;
39
+ };
40
+ };
41
+ };
42
+ export type MemberListToUpdate = {
43
+ miembro_id: number;
44
+ user_id: number;
45
+ };
46
+ export interface Team {
47
+ id: number;
48
+ nombre: string;
49
+ color: string;
50
+ createdAt?: string;
51
+ updatedAt?: string;
52
+ miembros: MemberList;
53
+ miembros_eliminar: number[];
54
+ miembros_actualizar: MemberListToUpdate[];
55
+ miembros_planos: MemberList;
56
+ integrantes: number;
57
+ }
58
+ export type MemberList = (Member | EmptyMember)[];
59
+ export type MemberObject = Member | EmptyMember;
60
+ export interface TeamFilters {
61
+ nombre?: string;
62
+ }
@@ -0,0 +1,21 @@
1
+ import { MemberList, Team } from '../interfaces/team';
2
+ export declare const setMembersHierarchy: ({ items }: {
3
+ items: MemberList;
4
+ }) => {
5
+ members: MemberList;
6
+ allMembers: MemberList;
7
+ };
8
+ export declare const mapperDataTeams: ({ items }: {
9
+ items: Team[];
10
+ }) => {
11
+ integrantes: number;
12
+ miembros: MemberList;
13
+ miembros_planos: MemberList;
14
+ miembros_eliminar: any[];
15
+ miembros_actualizar: any[];
16
+ id: number;
17
+ nombre: string;
18
+ color: string;
19
+ createdAt?: string;
20
+ updatedAt?: string;
21
+ }[];
@@ -0,0 +1,7 @@
1
+ interface TeamModalFooterProps {
2
+ onCancel: () => void;
3
+ onSave: () => void;
4
+ isLoading: boolean;
5
+ }
6
+ export declare function TeamModalFooter({ onCancel, onSave, isLoading }: TeamModalFooterProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Icons } from '@imj_media/tasks-modules';
2
+ interface TeamModalHeaderProps {
3
+ title: string;
4
+ icon: Parameters<typeof Icons>[0]['icon'];
5
+ }
6
+ export declare function TeamModalHeader({ title, icon }: TeamModalHeaderProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,6 @@
1
+ interface TeamNameInputProps {
2
+ value: string;
3
+ onChange: (value: string) => void;
4
+ }
5
+ export declare function TeamNameInput({ value, onChange }: TeamNameInputProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,9 @@
1
+ interface TeamNodeProps {
2
+ data: {
3
+ name: string;
4
+ image?: string;
5
+ job?: string;
6
+ };
7
+ }
8
+ export declare function TeamNode({ data }: TeamNodeProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,4 @@
1
+ export { TeamModalFooter } from './TeamModalFooter';
2
+ export { TeamModalHeader } from './TeamModalHeader';
3
+ export { TeamNameInput } from './TeamNameInput';
4
+ export { TeamNode } from './TeamNode';
@@ -0,0 +1,3 @@
1
+ export * from './atoms';
2
+ export * from './molecules';
3
+ export * from './organisms';
@@ -0,0 +1,8 @@
1
+ import { Team } from '../../infrastructure/interfaces/team';
2
+ interface TeamsModalProps {
3
+ open: boolean;
4
+ handleChange: (open: boolean) => void;
5
+ team?: Team;
6
+ }
7
+ export declare function TeamsModal({ open, handleChange, team }: TeamsModalProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,6 @@
1
+ import { MemberList } from '../../infrastructure/interfaces/team';
2
+ export declare function TeamsOrganigram({ open, handleChange, members, }: {
3
+ open: boolean;
4
+ handleChange: (open: boolean) => void;
5
+ members?: MemberList;
6
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { MemberListToUpdate, MemberObject } from '../../../infrastructure/interfaces/team';
2
+ type MemberActionsProps = {
3
+ member: MemberObject;
4
+ level: number;
5
+ isUpdate?: boolean;
6
+ addHandler: (member: MemberObject) => void;
7
+ updateHandler: (member: MemberObject) => void;
8
+ removeHandler: (member: MemberObject) => void;
9
+ updateMemberHandler: (list: MemberListToUpdate) => void;
10
+ };
11
+ export declare const MemberActions: ({ member, level, isUpdate, addHandler, updateHandler, removeHandler, updateMemberHandler, }: MemberActionsProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,5 @@
1
+ import { Member } from '../../../infrastructure/interfaces/team';
2
+ export declare const MemberItem: ({ member, removeHandler, }: {
3
+ member: Member;
4
+ removeHandler: (member: Member) => void;
5
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { MemberObject, Team } from '../../../infrastructure/interfaces/team';
3
+ export declare const MemberNode: ({ member, level, isUpdate, setData, }: {
4
+ member: MemberObject;
5
+ level: number;
6
+ isUpdate?: boolean;
7
+ setData: Dispatch<SetStateAction<Team>>;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Dispatch, SetStateAction } from 'react';
2
+ import { MemberList, Team } from '../../../infrastructure/interfaces/team';
3
+ export declare const MembersList: ({ members, level, isUpdate, setData, }: {
4
+ members: MemberList;
5
+ level?: number;
6
+ isUpdate?: boolean;
7
+ setData?: Dispatch<SetStateAction<Team>>;
8
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export { MemberActions } from './MemberActions';
2
+ export { MemberItem } from './MemberItem';
3
+ export { MemberNode } from './MemberNode';
4
+ export { MembersList } from './MembersList';
@@ -0,0 +1,3 @@
1
+ export { TeamsModal } from './TeamsModal';
2
+ export { TeamsOrganigram } from './TeamsOrganigram';
3
+ export { MemberActions, MemberItem, MemberNode, MembersList } from './createUpdate';
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Componente de búsqueda con dropdown que permite seleccionar opciones de una lista
3
+ * @param {boolean} isOpen - Controla si el dropdown está abierto o cerrado
4
+ * @param {string} [initialValue] - Valor inicial del dropdown
5
+ * @param {() => void} [onClose] - Función opcional que se ejecuta cuando se cierra el dropdown
6
+ * @param {string[] | Record<string, any>[]} options - Lista de opciones a mostrar en el dropdown
7
+ * @param {(option: any) => void} onSelect - Función que se ejecuta cuando se selecciona una opción
8
+ * @param {string} [placeholderDropdown] - Texto de placeholder para el botón del dropdown
9
+ * @param {string} [placeholderInput] - Texto de placeholder para el input de búsqueda
10
+ * @param {string} [className] - Clases CSS adicionales para el contenedor principal
11
+ * @param {string} [selectClassName] - Clases CSS adicionales para el botón de selección
12
+ * @param {string} [containerOptionsClassName] - Clases CSS adicionales para el contenedor de opciones
13
+ * @param {string} [optionClassName] - Clases CSS adicionales para cada opción del dropdown
14
+ * @param {{ id: string; nombre: string }} [fields] - Campos personalizados para los objetos en options
15
+ */
16
+ export type DropDownSearchProps = {
17
+ isOpen: boolean;
18
+ initialValue?: string | Record<string, any>;
19
+ onClose?: () => void;
20
+ options: string[] | Record<string, any>[];
21
+ onSelect: (option: any) => void;
22
+ placeholderDropdown?: string;
23
+ placeholderInput?: string;
24
+ className?: string;
25
+ selectClassName?: string;
26
+ containerOptionsClassName?: string;
27
+ optionClassName?: string;
28
+ fields?: {
29
+ id: string;
30
+ nombre: string;
31
+ };
32
+ };
33
+ /**
34
+ * Componente de búsqueda con dropdown que permite seleccionar opciones de una lista
35
+ * @example
36
+ * ```tsx
37
+ * <DropDownSearch
38
+ * isOpen={true}
39
+ * options={['Opción 1', 'Opción 2']}
40
+ * onSelect={(option, id, index) => console.log(option)}
41
+ * placeholderDropdown="Seleccione una opción"
42
+ * />
43
+ * ```
44
+ */
45
+ export declare const DropDownSearch: ({ isOpen, initialValue, onClose, options, onSelect, placeholderDropdown, placeholderInput, className, selectClassName, containerOptionsClassName, optionClassName, fields, }: DropDownSearchProps) => import("react/jsx-runtime").JSX.Element;