@trii/components 3.1.6 → 3.1.8

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 (117) hide show
  1. package/dist/cjs/index.js +44 -43
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/theme.js +643 -1
  4. package/dist/cjs/theme.js.map +1 -1
  5. package/dist/esm/index.js +43 -42
  6. package/dist/esm/index.js.map +1 -1
  7. package/dist/esm/theme.js +604 -1
  8. package/dist/esm/theme.js.map +1 -1
  9. package/dist/index.d.ts +10 -0
  10. package/dist/types/components/ContactInfoPopup/components/BusinessSection/BusinessSection.d.ts +1 -1
  11. package/dist/types/components/ContactInfoPopup/components/ContactMethod/ContactMethod.d.ts +1 -0
  12. package/dist/types/components/ContactInfoPopup/components/LabelsSection/LabelsSection.d.ts +1 -1
  13. package/dist/types/components/ContactInfoPopup/components/MembersSection/MembersSection.d.ts +1 -1
  14. package/dist/types/components/ContactSidebar/ChatDetailsSidebar.d.ts +10 -0
  15. package/dist/types/components/ContactSidebar/components/CombineContactsModal/CombineContactsModal.d.ts +1 -1
  16. package/dist/types/components/ContactSidebar/components/MediaViewer/MediaViewer.d.ts +1 -1
  17. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/ContactButton.d.ts +1 -0
  18. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/ExternalLink/ExternalLink.d.ts +1 -0
  19. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactConversation/ContactConversation.d.ts +1 -0
  20. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactConversation/styles.d.ts +2 -1
  21. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/ContactData.d.ts +1 -0
  22. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Properties/Properties.d.ts +1 -1
  23. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/styles.d.ts +2 -1
  24. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactDataDetails/ContactDataDetails.d.ts +1 -0
  25. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/ContactEvent.d.ts +1 -0
  26. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/components/AddEvent/styles.d.ts +2 -1
  27. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/components/DatePicker/styles.d.ts +4 -3
  28. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/components/LocationTextField/SendLocation/components/GoogleMap/components/LocationSearch/locationSearch.d.ts +1 -0
  29. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/layout/BasicInputContainer/styles.d.ts +3 -2
  30. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactFiles/ContactFiles.d.ts +1 -0
  31. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactHistory/ContactHistory.d.ts +1 -0
  32. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactNotes/ContactNotes.d.ts +1 -0
  33. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactNotes/components/AddNote/AddNote.d.ts +1 -1
  34. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactNotes/context/NotesCardContext.d.ts +1 -0
  35. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactPanelShop/ContactPanelShop.d.ts +1 -0
  36. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactRelations/ContactRelations.d.ts +1 -0
  37. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTask/ContactTask.d.ts +1 -0
  38. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTask/components/AddTask/styles.d.ts +2 -1
  39. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/ContactTickets.d.ts +12 -0
  40. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/components/ContactTicketItem.d.ts +11 -0
  41. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/components/ContactTicketsSection.d.ts +18 -0
  42. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/components/RelativeTime.d.ts +11 -0
  43. package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTickets/index.d.ts +1 -0
  44. package/dist/types/components/ContactSidebar/components/PanelView/components/GroupData/GroupData.d.ts +1 -0
  45. package/dist/types/components/ContactSidebar/components/PanelView/components/GroupData/components/GroupDataContent/components/InformationBox/InformationBox.d.ts +1 -0
  46. package/dist/types/components/ContactSidebar/components/PanelView/components/index.d.ts +1 -0
  47. package/dist/types/components/ContactSidebar/components/tabIndexes.d.ts +7 -0
  48. package/dist/types/components/ContactSidebar/context/ActivitiesCardContext.d.ts +1 -0
  49. package/dist/types/components/ContactSidebar/context/SidebarPropsContext.d.ts +9 -1
  50. package/dist/types/components/ContactSidebar/context/types/TabName.d.ts +1 -1
  51. package/dist/types/components/ContactSidebar/hooks/useActivityDate.d.ts +2 -2
  52. package/dist/types/components/ContactSidebar/hooks/useContactTickets.d.ts +30 -0
  53. package/dist/types/components/ContactSidebar/hooks/useCreateActivity.d.ts +9 -8
  54. package/dist/types/components/ContactSidebar/hooks/useLinkContacts.d.ts +2 -2
  55. package/dist/types/components/ContactSidebar/hooks/useMultipleSelect.d.ts +1 -0
  56. package/dist/types/components/ContactSidebar/hooks/useNotifications.d.ts +1 -1
  57. package/dist/types/components/ContactSidebar/hooks/useNow.d.ts +2 -0
  58. package/dist/types/components/ContactSidebar/hooks/useShareWithUsers.d.ts +2 -2
  59. package/dist/types/components/ContactSidebar/hooks/useSidebarAudioControl.d.ts +1 -0
  60. package/dist/types/components/ContactSidebar/hooks/useTicketStatuses.d.ts +8 -0
  61. package/dist/types/components/ContactSidebar/services/ticketsApi.d.ts +29 -0
  62. package/dist/types/components/ContactSidebar/services/urls.d.ts +1 -0
  63. package/dist/types/components/ContactSidebar/types/tickets.d.ts +60 -0
  64. package/dist/types/components/ContactSidebar/utils/formatRelativeTime.d.ts +9 -0
  65. package/dist/types/components/ContactSidebar/utils/googleMapsUtils.d.ts +1 -1
  66. package/dist/types/components/ContactSidebar/utils/markdown/Markdown.d.ts +1 -1
  67. package/dist/types/components/ContactSidebar/utils/minuteTicker.d.ts +3 -0
  68. package/dist/types/components/EditContactModal/components/SearchLocation/googleMapsUtils.d.ts +1 -1
  69. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/EditModal.d.ts +1 -0
  70. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/layout/WarningsDisplay/components/Warning/hooks/useContactInfoPopup.d.ts +2 -2
  71. package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/StatusAdornment/components/Adornment/Adornment.d.ts +1 -1
  72. package/dist/types/components/EditContactModal/components/Section/General/components/BusinessGeneral.d.ts +1 -1
  73. package/dist/types/components/EditContactModal/components/Section/General/components/ContactGeneral.d.ts +1 -1
  74. package/dist/types/components/EditContactModal/components/Section/utils/resolveUserLabel.d.ts +1 -1
  75. package/dist/types/components/EditContactModal/context/EditContactApiContext.d.ts +9 -8
  76. package/dist/types/components/EditContactModal/context/EditContactViewContext.d.ts +2 -1
  77. package/dist/types/components/EditContactModal/hooks/useEditContactModalController.d.ts +1 -1
  78. package/dist/types/components/EditContactModal/hooks/utils/editContactHelper.d.ts +1 -1
  79. package/dist/types/components/EventsDialog/components/ConfirmDeleteDialog/ConfirmDeleteDialog.d.ts +1 -0
  80. package/dist/types/components/EventsDialog/components/DatePicker/styles.d.ts +3 -4
  81. package/dist/types/components/EventsDialog/components/DeleteRecurringEventDialog/DeleteRecurringEventDialog.d.ts +1 -0
  82. package/dist/types/components/EventsDialog/components/EditRecurringEventDialog/EditRecurringEventDialog.d.ts +1 -0
  83. package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/GoogleMap/components/LocationSearch/locationSearch.d.ts +1 -0
  84. package/dist/types/components/EventsDialog/components/ReminderNotifications/components/ReminderItem/style.d.ts +10 -7
  85. package/dist/types/components/EventsDialog/components/ReminderNotifications/styles.d.ts +2 -3
  86. package/dist/types/components/EventsDialog/context/CalendarContextProvider.d.ts +1 -0
  87. package/dist/types/components/EventsDialog/context/EventsDialogApiContext.d.ts +4 -3
  88. package/dist/types/components/EventsDialog/hooks/useCalendarEvents.d.ts +1 -0
  89. package/dist/types/components/EventsDialog/hooks/useCalendarTasks.d.ts +1 -0
  90. package/dist/types/components/EventsDialog/hooks/useNotifications.d.ts +1 -1
  91. package/dist/types/components/EventsDialog/layout/BasicInputContainer/styles.d.ts +2 -3
  92. package/dist/types/components/EventsDialog/utils/googleMapsLoader.d.ts +1 -1
  93. package/dist/types/theme/themeActionTypes.d.ts +1 -1
  94. package/dist/types/theme/themePersistence.d.ts +1 -1
  95. package/dist/types/theme/themeSlice.d.ts +1 -1
  96. package/package.json +2 -2
  97. package/dist/types/asyncState/__tests__/asyncState.test.d.ts +0 -1
  98. package/dist/types/asyncState/__tests__/useAsyncData.test.d.ts +0 -1
  99. package/dist/types/components/AsyncContent/__tests__/AsyncContent.test.d.ts +0 -1
  100. package/dist/types/components/AsyncContent/__tests__/AsyncContentI18n.test.d.ts +0 -1
  101. package/dist/types/components/ContactInfoPopup/ContactInfoPopup.stories.d.ts +0 -9
  102. package/dist/types/components/ContactSidebar/ContactSidebar.stories.d.ts +0 -58
  103. package/dist/types/components/EditContactModal/EditContactModal.stories.d.ts +0 -9
  104. package/dist/types/components/EventsDialog/components/LinkContactsSelect/styles.d.ts +0 -6
  105. package/dist/types/components/EventsDialog/components/LocationTextField/MapLocationPicker.d.ts +0 -8
  106. package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/GoogleMap/index.d.ts +0 -1
  107. package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/index.d.ts +0 -1
  108. package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/index.d.ts +0 -3
  109. package/dist/types/components/EventsDialog/hooks/index.d.ts +0 -9
  110. package/dist/types/components/EventsDialog/hooks/useSelect.d.ts +0 -14
  111. package/dist/types/components/EventsDialog/utils/eventValidation.d.ts +0 -37
  112. package/dist/types/components/EventsDialog/utils/googleMapsUtils.d.ts +0 -5
  113. package/dist/types/components/EventsDialog/utils/keyboardNavigation.d.ts +0 -24
  114. package/dist/types/components/PanelErrorBoundary/__tests__/PanelErrorBoundary.test.d.ts +0 -1
  115. package/dist/types/theme/MuiComponentsConfig.test.d.ts +0 -1
  116. package/dist/types/theme/themePreference.test.d.ts +0 -1
  117. package/dist/types/theme/themeProvider.test.d.ts +0 -1
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IConversation } from '@trii/types/dist/Conversations';
2
3
  import { IBusiness, IContact, IContactAddress } from '@trii/types/dist/Contacts';
3
4
  import { ChannelType } from '@trii/types/dist/Common/Channels';
@@ -54,6 +55,13 @@ export interface SidebarProps {
54
55
  * destinos son rutas de otro microfront, no internas del sidebar.
55
56
  */
56
57
  navigate?: (path: string) => void;
58
+ /** Ticket que se está viendo en el host: el tab Tickets lo lista marcado y sin click. */
59
+ currentTicketId?: string;
60
+ /**
61
+ * Abrir un ticket del contacto. Sin ella el tab Tickets navega a
62
+ * /a/tickets/detail/{id} con `navigate` (o window.location.assign).
63
+ */
64
+ onOpenTicket?: (ticketId: string) => void;
57
65
  /** Abrir/cambiar a una conversación del contacto en el inbox. */
58
66
  onOpenConversation: (conversation: IConversation) => Promise<void> | void;
59
67
  /** Navegar/scrollear a un mensaje en el body del chat. */
@@ -76,5 +84,5 @@ export interface StartConversationTarget {
76
84
  address: IContactAddress | undefined;
77
85
  addressList: IContactAddress[];
78
86
  }
79
- export declare const SidebarPropsProvider: import("react").Provider<SidebarProps | null>;
87
+ export declare const SidebarPropsProvider: import("react").Provider<SidebarProps>;
80
88
  export declare function useSidebarProps(): SidebarProps;
@@ -1 +1 @@
1
- export type TabName = 'contactConversation' | 'contactData' | 'contactEvent' | 'contactFiles' | 'contactHistory' | 'contactNotes' | 'contactRepairs' | 'contactTicket' | 'contactButtons' | 'contactPanelShop' | 'contactGroupData' | string;
1
+ export type TabName = 'contactConversation' | 'contactData' | 'contactEvent' | 'contactFiles' | 'contactHistory' | 'contactNotes' | 'contactRepairs' | 'contactTicket' | 'contactButtons' | 'contactPanelShop' | 'contactGroupData' | 'contactTickets' | string;
@@ -3,8 +3,8 @@ import { Dayjs } from 'dayjs';
3
3
  export declare const useActivityDateInitialDef: {
4
4
  state: {
5
5
  error: boolean;
6
- selectedStartDate: null;
7
- selectedEndDate: null;
6
+ selectedStartDate: any;
7
+ selectedEndDate: any;
8
8
  };
9
9
  action: {
10
10
  setError: () => void;
@@ -0,0 +1,30 @@
1
+ import type { AsyncStatus } from '../../../asyncState';
2
+ import { SidebarApiConfig } from '../context/SidebarPropsContext';
3
+ import { ContactTicket, TicketStage } from '../types/tickets';
4
+ interface UseContactTicketsOptions {
5
+ api: SidebarApiConfig;
6
+ contactId: string | null | undefined;
7
+ stages: TicketStage[];
8
+ /** La primera página se pide recién cuando esto es true (secciones lazy). */
9
+ enabled: boolean;
10
+ }
11
+ /**
12
+ * Tickets del contacto en los `stages` dados, acumulados página a página por
13
+ * cursor (versión reducida del useCursorPager de tickets-front).
14
+ *
15
+ * - Guard de carrera: cada carga inicial incrementa `seq` y aborta la anterior;
16
+ * solo el request vigente escribe estado.
17
+ * - Deshabilitado (o sin contacto) queda "idle" y no pide nada.
18
+ * - Un resultado vacío termina en "succeeded", así que no re-fetchea en loop.
19
+ * - Colapsar la sección no desmonta el hook: los items se conservan.
20
+ */
21
+ export declare function useContactTickets({ api, contactId, stages, enabled, }: UseContactTicketsOptions): {
22
+ items: ContactTicket[];
23
+ status: AsyncStatus;
24
+ hasMore: boolean;
25
+ loadMore: () => Promise<void>;
26
+ loadingMore: boolean;
27
+ loadMoreError: boolean;
28
+ retry: () => Promise<void>;
29
+ };
30
+ export {};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { UseFieldType } from './useField';
2
3
  import { UseActivityDateType } from './useActivityDate';
3
4
  import { UseNotificationsType } from './useNotifications';
@@ -10,8 +11,8 @@ export declare const useCreateActivityInitialDef: {
10
11
  date: {
11
12
  state: {
12
13
  error: boolean;
13
- selectedStartDate: null;
14
- selectedEndDate: null;
14
+ selectedStartDate: any;
15
+ selectedEndDate: any;
15
16
  };
16
17
  action: {
17
18
  setError: () => void;
@@ -22,7 +23,7 @@ export declare const useCreateActivityInitialDef: {
22
23
  };
23
24
  };
24
25
  notifications: {
25
- notifications: never[];
26
+ notifications: any[];
26
27
  action: {
27
28
  addNotification: () => void;
28
29
  deleteNotification: (notificationId: string) => void;
@@ -33,9 +34,9 @@ export declare const useCreateActivityInitialDef: {
33
34
  };
34
35
  };
35
36
  shareWithUsers: {
36
- users: never[];
37
+ users: any[];
37
38
  field: {
38
- userIds: never[];
39
+ userIds: any[];
39
40
  handleChange: (event: import("@mui/material").SelectChangeEvent<string[]>) => void;
40
41
  };
41
42
  action: {
@@ -46,16 +47,16 @@ export declare const useCreateActivityInitialDef: {
46
47
  linkContact: {
47
48
  state: {
48
49
  isLoading: boolean;
49
- contactSelectedId: null;
50
+ contactSelectedId: any;
50
51
  search: string;
51
52
  };
52
53
  action: {
53
54
  resetField: () => void;
54
55
  handleSearch: (value: string) => void;
55
- handleScroll: (e: import("react").UIEvent<HTMLElement>) => void;
56
+ handleScroll: (e: import("react").UIEvent<HTMLElement, UIEvent>) => void;
56
57
  handleSelectContact: (contact: import("@trii/types/dist/Contacts").IContact) => void;
57
58
  };
58
- contactList: never[];
59
+ contactList: any[];
59
60
  };
60
61
  };
61
62
  action: {
@@ -3,7 +3,7 @@ import { UIEvent } from 'react';
3
3
  export declare const useLinkContactsInitialDef: {
4
4
  state: {
5
5
  isLoading: boolean;
6
- contactSelectedId: null;
6
+ contactSelectedId: any;
7
7
  search: string;
8
8
  };
9
9
  action: {
@@ -12,7 +12,7 @@ export declare const useLinkContactsInitialDef: {
12
12
  handleScroll: (e: UIEvent<HTMLElement>) => void;
13
13
  handleSelectContact: (contact: IContact) => void;
14
14
  };
15
- contactList: never[];
15
+ contactList: any[];
16
16
  };
17
17
  export type UseLinkContactsType = {
18
18
  state: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export type UseMultipleSelectReturnType<T> = {
2
3
  attributes: {
3
4
  value: T;
@@ -3,7 +3,7 @@ import { EventNotificationFront } from '../types/activities';
3
3
  import { IEventNotification } from '@trii/types/dist/Calendar';
4
4
  import { SelectChangeEvent } from '@mui/material';
5
5
  export declare const useNotificationsInitialDef: {
6
- notifications: never[];
6
+ notifications: any[];
7
7
  action: {
8
8
  addNotification: () => void;
9
9
  deleteNotification: (notificationId: string) => void;
@@ -0,0 +1,2 @@
1
+ /** Hora actual en ms, refrescada una vez por minuto por el ticker compartido. */
2
+ export declare function useNow(): number;
@@ -1,9 +1,9 @@
1
1
  import { SelectChangeEvent } from '@mui/material';
2
2
  import { UserInfo } from '@trii/types/dist/Users';
3
3
  export declare const useShareWithUsersInitialDef: {
4
- users: never[];
4
+ users: any[];
5
5
  field: {
6
- userIds: never[];
6
+ userIds: any[];
7
7
  handleChange: (event: SelectChangeEvent<string[]>) => void;
8
8
  };
9
9
  action: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * Exclusión mutua de reproducción de audio, sin Redux.
3
4
  *
@@ -0,0 +1,8 @@
1
+ import { SidebarApiConfig } from '../context/SidebarPropsContext';
2
+ import { TicketStatusInfo } from '../types/tickets';
3
+ /**
4
+ * Estados de tickets del espacio indexados por id (incluye deshabilitados,
5
+ * para nombrar tickets viejos). El request se cachea en el service; si falla,
6
+ * el mapa queda vacío y las filas caen a la etiqueta del stage.
7
+ */
8
+ export declare function useTicketStatuses({ baseUrl, spaceId, }: SidebarApiConfig): Map<string, TicketStatusInfo>;
@@ -0,0 +1,29 @@
1
+ import { SidebarApiConfig } from '../context/SidebarPropsContext';
2
+ import { ContactTicket, TicketCursorResponse, TicketStage, TicketStatusInfo } from '../types/tickets';
3
+ /**
4
+ * Service del tab "Tickets del contacto" (API de tickets). Mismo patrón que
5
+ * contactApi: fetch pelado vía requestJson, el token lo inyecta el host.
6
+ */
7
+ export declare const CONTACT_TICKETS_PAGE_SIZE = 20;
8
+ type ApiArgs = SidebarApiConfig & {
9
+ signal?: AbortSignal;
10
+ };
11
+ export interface SearchContactTicketsArgs extends ApiArgs {
12
+ contactId: string;
13
+ stages: TicketStage[];
14
+ cursor?: string;
15
+ }
16
+ /**
17
+ * Una página de tickets del contacto en `stages`, de cualquier responsable,
18
+ * los actualizados más recientemente primero.
19
+ *
20
+ * Límite del backend: los tickets finalizados que pasaron los `visible_days`
21
+ * de su estado quedan fuera de la búsqueda, así que el historial puede estar
22
+ * incompleto.
23
+ */
24
+ export declare function searchContactTickets({ baseUrl, spaceId, contactId, stages, cursor, signal, }: SearchContactTicketsArgs): Promise<TicketCursorResponse<ContactTicket>>;
25
+ /** Todos los estados de tickets del espacio, incluidos los deshabilitados. */
26
+ export declare function fetchTicketStatuses(api: SidebarApiConfig): Promise<TicketStatusInfo[]>;
27
+ /** Solo para tests: descarta los estados cacheados entre casos. */
28
+ export declare function __resetTicketStatusesCache(): void;
29
+ export {};
@@ -11,6 +11,7 @@ export interface SidebarApiUrls {
11
11
  CALENDAR: string;
12
12
  LOGS: string;
13
13
  SETTINGS: string;
14
+ TICKETS: string;
14
15
  }
15
16
  export declare function getApiUrls(baseUrl: string, spaceId: string): SidebarApiUrls;
16
17
  export declare function joinUrl(base: string, path: string): string;
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Tipos mínimos de tickets que consume el tab "Tickets del contacto".
3
+ *
4
+ * La versión de @trii/types fijada en el paquete no garantiza el namespace
5
+ * Tickets, así que se replican acá solo los campos usados. Los valores son los
6
+ * mismos literales que los enums de @trii/types (Tickets.TicketStage, etc.),
7
+ * así que un ITicket del backend encaja tal cual.
8
+ */
9
+ export declare const TicketStage: {
10
+ readonly NEW: "NEW";
11
+ readonly ACTIVE: "ACTIVE";
12
+ readonly RESOLVED: "RESOLVED";
13
+ readonly CLOSED: "CLOSED";
14
+ readonly CANCELLED: "CANCELLED";
15
+ };
16
+ export type TicketStage = (typeof TicketStage)[keyof typeof TicketStage];
17
+ export declare const TicketPriority: {
18
+ readonly LOW: "LOW";
19
+ readonly MEDIUM: "MEDIUM";
20
+ readonly HIGH: "HIGH";
21
+ readonly URGENT: "URGENT";
22
+ };
23
+ export type TicketPriority = (typeof TicketPriority)[keyof typeof TicketPriority];
24
+ export declare const TicketSortDirection: {
25
+ readonly ASC: "ASC";
26
+ readonly DESC: "DESC";
27
+ };
28
+ export type TicketSortDirection = (typeof TicketSortDirection)[keyof typeof TicketSortDirection];
29
+ export interface ContactTicket {
30
+ id: string;
31
+ number: number;
32
+ title: string;
33
+ statusId: string;
34
+ stage: TicketStage;
35
+ priority: TicketPriority;
36
+ createdAt?: string;
37
+ updatedAt?: string;
38
+ }
39
+ export interface TicketStatusInfo {
40
+ id: string;
41
+ name: string;
42
+ color?: string;
43
+ }
44
+ export interface TicketSearchQuery {
45
+ filter: {
46
+ contactIds: string[];
47
+ stages: TicketStage[];
48
+ };
49
+ sort: {
50
+ fieldNameKey: string;
51
+ direction: TicketSortDirection;
52
+ }[];
53
+ limit: number;
54
+ cursor?: string;
55
+ }
56
+ export interface TicketCursorResponse<T> {
57
+ items: T[];
58
+ nextCursor?: string;
59
+ hasMore: boolean;
60
+ }
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Relative label ('hace 5 min', 'in 2 hr.') between `at` and `now`.
3
+ *
4
+ * `now` is an explicit parameter so the rule stays pure and testable; callers feed it from the
5
+ * shared minute ticker. The value is truncated (never rounded up) so 59.9 minutes never reads as
6
+ * '60 min' and a due time never looks later than it is. Under a minute collapses to the locale's
7
+ * own 'now' word. Returns an empty string for an unparseable date.
8
+ */
9
+ export declare function formatRelativeTime(at: string | Date, now: number, locale: string): string;
@@ -30,7 +30,7 @@ export declare const GOOGLE_MAPS_SCRIPT_CONFIG: {
30
30
  */
31
31
  export declare const useGoogleMapsLoader: () => {
32
32
  isLoaded: boolean;
33
- error: Error | null;
33
+ error: Error;
34
34
  };
35
35
  /**
36
36
  * Carga la API de Google Maps de manera asincrónica
@@ -75,4 +75,4 @@ export declare const MarkdownWithOptions: (text: string, options?: MarkdownOptio
75
75
  * @param options - Opciones de configuración
76
76
  * @returns HTML string con elementos de bloque
77
77
  */
78
- export declare const MarkdownBlock: (text: string, options?: Omit<MarkdownOptions, "extendedSyntax">) => string;
78
+ export declare const MarkdownBlock: (text: string, options?: Omit<MarkdownOptions, 'extendedSyntax'>) => string;
@@ -0,0 +1,3 @@
1
+ export declare function subscribeToMinuteTicker(listener: () => void): () => void;
2
+ /** Stable between ticks, as `useSyncExternalStore` requires. */
3
+ export declare function getNowSnapshot(): number;
@@ -3,5 +3,5 @@ export declare const waitForGoogleMaps: (maxWaitTime?: number) => Promise<boolea
3
3
  export declare const useGoogleMapsStatus: () => {
4
4
  isLoaded: boolean;
5
5
  isLoading: boolean;
6
- error: string | null;
6
+ error: string;
7
7
  };
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface EditModalProps {
2
3
  open: boolean;
3
4
  onClose: () => void;
@@ -1,8 +1,8 @@
1
1
  import { MouseEvent } from 'react';
2
2
  import type { IContact, IBusiness } from '@trii/types/dist/Contacts';
3
3
  export declare const useContactInfoPopup: (contactId: string | null) => {
4
- contactData: IContact | IBusiness | null;
5
- anchorEl: HTMLElement | null;
4
+ contactData: IContact | IBusiness;
5
+ anchorEl: HTMLElement;
6
6
  isOpen: boolean;
7
7
  isLoading: boolean;
8
8
  openPopup: (event: MouseEvent<HTMLElement>) => Promise<void>;
@@ -1,5 +1,5 @@
1
1
  import { AdornmentStatus } from '../../StatusAdornment';
2
2
  declare const Adornment: ({ status }: {
3
3
  status: AdornmentStatus;
4
- }) => import("react/jsx-runtime").JSX.Element | null;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
5
  export default Adornment;
@@ -4,5 +4,5 @@ export type BusinessGeneralProps = Omit<GeneralProps, 'entityData' | 'entityType
4
4
  entityType: 'business';
5
5
  entityData: IBusiness;
6
6
  };
7
- declare const BusinessGeneral: (props: BusinessGeneralProps) => import("react/jsx-runtime").JSX.Element | null;
7
+ declare const BusinessGeneral: (props: BusinessGeneralProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export default BusinessGeneral;
@@ -4,5 +4,5 @@ export type ContactGeneralProps = Omit<GeneralProps, 'entityData' | 'entityType'
4
4
  entityType: 'contact';
5
5
  entityData: IContact;
6
6
  };
7
- declare const ContactGeneral: (props: ContactGeneralProps) => import("react/jsx-runtime").JSX.Element | null;
7
+ declare const ContactGeneral: (props: ContactGeneralProps) => import("react/jsx-runtime").JSX.Element;
8
8
  export default ContactGeneral;
@@ -3,4 +3,4 @@ export declare const resolveUserLabel: ({ userId, users, currentUser, }: {
3
3
  userId?: string;
4
4
  users: UserInfo[];
5
5
  currentUser?: UserTrii | null;
6
- }) => string | null;
6
+ }) => string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const EditContactApiProvider: import("react").Provider<{
2
3
  fetchLabels: ({ signal }?: {
3
4
  signal?: AbortSignal;
@@ -30,12 +31,12 @@ export declare const EditContactApiProvider: import("react").Provider<{
30
31
  fetchContactFields: ({ forType, signal }: {
31
32
  signal?: AbortSignal;
32
33
  } & {
33
- forType: "contact" | "business";
34
+ forType: "business" | "contact";
34
35
  }) => Promise<import("@trii/types/dist/Contacts").IContactField[]>;
35
36
  updateEntity: ({ entityType, entityId, body, signal }: {
36
37
  signal?: AbortSignal;
37
38
  } & {
38
- entityType: "contact" | "business";
39
+ entityType: "business" | "contact";
39
40
  entityId: string;
40
41
  body: Partial<import("@trii/types/dist/Contacts").IContact> | Partial<import("@trii/types/dist/Contacts").IBusiness> | {
41
42
  tags: import("@trii/types/dist/Contacts").IContactTag[];
@@ -69,7 +70,7 @@ export declare const EditContactApiProvider: import("react").Provider<{
69
70
  }) => Promise<{
70
71
  success: boolean;
71
72
  warnings: string[];
72
- contactId?: string | null;
73
+ contactId?: string;
73
74
  }>;
74
75
  setContactAddress: ({ data, signal }: {
75
76
  signal?: AbortSignal;
@@ -98,7 +99,7 @@ export declare const EditContactApiProvider: import("react").Provider<{
98
99
  contactId: string;
99
100
  file: File;
100
101
  }) => Promise<string>;
101
- } | null>;
102
+ }>;
102
103
  export declare const useEditContactApi: () => {
103
104
  fetchLabels: ({ signal }?: {
104
105
  signal?: AbortSignal;
@@ -131,12 +132,12 @@ export declare const useEditContactApi: () => {
131
132
  fetchContactFields: ({ forType, signal }: {
132
133
  signal?: AbortSignal;
133
134
  } & {
134
- forType: "contact" | "business";
135
+ forType: "business" | "contact";
135
136
  }) => Promise<import("@trii/types/dist/Contacts").IContactField[]>;
136
137
  updateEntity: ({ entityType, entityId, body, signal }: {
137
138
  signal?: AbortSignal;
138
139
  } & {
139
- entityType: "contact" | "business";
140
+ entityType: "business" | "contact";
140
141
  entityId: string;
141
142
  body: Partial<import("@trii/types/dist/Contacts").IContact> | Partial<import("@trii/types/dist/Contacts").IBusiness> | {
142
143
  tags: import("@trii/types/dist/Contacts").IContactTag[];
@@ -170,7 +171,7 @@ export declare const useEditContactApi: () => {
170
171
  }) => Promise<{
171
172
  success: boolean;
172
173
  warnings: string[];
173
- contactId?: string | null;
174
+ contactId?: string;
174
175
  }>;
175
176
  setContactAddress: ({ data, signal }: {
176
177
  signal?: AbortSignal;
@@ -199,4 +200,4 @@ export declare const useEditContactApi: () => {
199
200
  contactId: string;
200
201
  file: File;
201
202
  }) => Promise<string>;
202
- } | null;
203
+ };
@@ -1,7 +1,8 @@
1
+ /// <reference types="react" />
1
2
  export type EditContactView = 'main' | 'tags' | 'searchLocation' | 'businessSelect' | 'businessMembers';
2
3
  export type EditContactViewContextValue = {
3
4
  view: EditContactView;
4
5
  setView: (view: EditContactView) => void;
5
6
  };
6
- export declare const EditContactViewProvider: import("react").Provider<EditContactViewContextValue | null>;
7
+ export declare const EditContactViewProvider: import("react").Provider<EditContactViewContextValue>;
7
8
  export declare const useEditContactView: () => EditContactViewContextValue;
@@ -38,7 +38,7 @@ export declare function useEditContactModalController({ open, baseUrl, spaceId,
38
38
  tags: IContactTag[];
39
39
  labels: ILabel[];
40
40
  contactFields: IContactField[];
41
- userTrii: UserTrii | null;
41
+ userTrii: UserTrii;
42
42
  userLoading: boolean;
43
43
  userError: unknown;
44
44
  };
@@ -1,6 +1,6 @@
1
1
  import { IContactAddress } from '@trii/types/dist/Contacts';
2
2
  declare const _default: {
3
- getEditedField: (key: string, originalValue: string | number | null, editedValue: string | number) => Record<string, string | number> | null;
3
+ getEditedField: (key: string, originalValue: string | number, editedValue: string | number) => Record<string, string | number>;
4
4
  getAddressesWithUpdatedValues: (newValue: string, newValueAddressId: string, addresses: IContactAddress[]) => IContactAddress[];
5
5
  };
6
6
  export default _default;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface ConfirmDeleteDialogProps {
2
3
  open: boolean;
3
4
  onClose: () => void;
@@ -1,4 +1,3 @@
1
- import { Box, Typography } from '@mui/material';
2
- export declare const StyledDatePickerContainer: typeof Box;
3
- export declare const StyledPickersContainer: typeof Box;
4
- export declare const StyledPickersDivider: typeof Typography;
1
+ export declare const StyledDatePickerContainer: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
2
+ export declare const StyledPickersContainer: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
3
+ export declare const StyledPickersDivider: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").TypographyTypeMap<{}, "span">>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface DeleteRecurringEventDialogProps {
2
3
  open: boolean;
3
4
  onClose: () => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface EditRecurringEventDialogProps {
2
3
  open: boolean;
3
4
  onClose: () => void;
@@ -1,3 +1,4 @@
1
+ /// <reference types="@types/google.maps" />
1
2
  interface Props {
2
3
  onPlaceSelected: (location: google.maps.LatLngLiteral, address?: string) => void;
3
4
  }
@@ -1,8 +1,11 @@
1
- import { Box, Select, TextField, IconButton } from '@mui/material';
2
- export declare const StyledReminderItemContainer: typeof Box;
3
- export declare const StyledReminderItemViewContainer: typeof Box;
4
- export declare const StyledReminderInputsContainer: typeof Box;
1
+ /// <reference types="react" />
2
+ import { TextField } from '@mui/material';
3
+ export declare const StyledReminderItemContainer: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
4
+ export declare const StyledReminderItemViewContainer: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
5
+ export declare const StyledReminderInputsContainer: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
5
6
  export declare const StyledReminderTextField: typeof TextField;
6
- export declare const StyledReminderSelect: typeof Select;
7
- export declare const StyledReminderActionsContainer: typeof Box;
8
- export declare const StyledReminderDeleteIconButton: typeof IconButton;
7
+ export declare const StyledReminderSelect: (<Value = unknown>(props: import("@mui/material").SelectProps<Value>) => import("react").JSX.Element) & {
8
+ muiName: string;
9
+ };
10
+ export declare const StyledReminderActionsContainer: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
11
+ export declare const StyledReminderDeleteIconButton: import("@mui/material").ExtendButtonBase<import("@mui/material").IconButtonTypeMap<{}, "button">>;
@@ -1,3 +1,2 @@
1
- import { Box } from '@mui/material';
2
- export declare const ReminderNotificationsContainer: typeof Box;
3
- export declare const HeaderContainer: typeof Box;
1
+ export declare const ReminderNotificationsContainer: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
2
+ export declare const HeaderContainer: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { Mode } from './types/Mode';
2
3
  interface Props {
3
4
  children: React.ReactNode;
@@ -1,8 +1,9 @@
1
+ /// <reference types="react" />
1
2
  export interface EventsDialogApi {
2
3
  baseUrl: string;
3
4
  spaceId: string;
4
5
  }
5
- declare const EventsDialogApiContext: import("react").Context<EventsDialogApi | null>;
6
- export declare const EventsDialogApiProvider: import("react").Provider<EventsDialogApi | null>;
7
- export declare const useEventsDialogApi: () => EventsDialogApi | null;
6
+ declare const EventsDialogApiContext: import("react").Context<EventsDialogApi>;
7
+ export declare const EventsDialogApiProvider: import("react").Provider<EventsDialogApi>;
8
+ export declare const useEventsDialogApi: () => EventsDialogApi;
8
9
  export default EventsDialogApiContext;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IEvent } from '@trii/types/dist/Calendar';
2
3
  export interface CalendarEvent {
3
4
  id: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface CalendarTask {
2
3
  id: string;
3
4
  title: string;
@@ -3,7 +3,7 @@ import { IEventNotification } from '@trii/types/dist/Calendar';
3
3
  import { SelectChangeEvent } from '@mui/material';
4
4
  import { EventNotificationFront } from '../types';
5
5
  export declare const useNotificationsInitialDef: {
6
- notifications: never[];
6
+ notifications: any[];
7
7
  action: {
8
8
  addNotification: () => void;
9
9
  deleteNotification: (_notificationId: string) => void;
@@ -1,3 +1,2 @@
1
- import { Box } from '@mui/material';
2
- export declare const StyledBoxContainer: typeof Box;
3
- export declare const StyledDialogContextText: typeof Box;
1
+ export declare const StyledBoxContainer: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
2
+ export declare const StyledDialogContextText: import("@mui/types").OverridableComponent<import("@mui/system").BoxTypeMap<{}, "div", import("@mui/material").Theme>>;
@@ -19,7 +19,7 @@ export declare const GOOGLE_MAPS_SCRIPT_CONFIG: {
19
19
  */
20
20
  export declare const useGoogleMapsLoader: () => {
21
21
  isLoaded: boolean;
22
- error: Error | null;
22
+ error: Error;
23
23
  };
24
24
  /**
25
25
  * Carga la API de Google Maps de manera asincrónica
@@ -1,5 +1,5 @@
1
1
  import type { ThemeName } from './themePreference';
2
2
  export declare const UPDATE_THEME_TYPE = "Theme/updateTheme";
3
- export declare const themeUpdateFulfilled: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
3
+ export declare const themeUpdateFulfilled: import("@reduxjs/toolkit").ActionCreatorWithOptionalPayload<{
4
4
  theme: ThemeName;
5
5
  }, string>;