@trii/components 3.1.8 → 3.1.11
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.
- package/dist/cjs/index.js +199 -45
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/theme.js +84 -5
- package/dist/cjs/theme.js.map +1 -1
- package/dist/esm/index.js +200 -46
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/theme.js +84 -5
- package/dist/esm/theme.js.map +1 -1
- package/dist/index.d.ts +30 -2
- package/dist/integration-button-icons-build.log +36 -0
- package/dist/integration-button-icons-bundle.log +24 -0
- package/dist/integration-button-icons-types.log +29 -0
- package/dist/sidebar-fixes-all-tests.log +261 -0
- package/dist/sidebar-fixes-baseline.log +29 -0
- package/dist/sidebar-fixes-build.log +32 -0
- package/dist/sidebar-fixes-tests.log +57 -0
- package/dist/sidebar-fixes-types.log +4 -0
- package/dist/sidebar-panel-tests.log +356 -0
- package/dist/tab-scroll-build.log +32 -0
- package/dist/tab-scroll-tests.log +58 -0
- package/dist/tabs-all-tests.log +330 -0
- package/dist/tabs-build.log +32 -0
- package/dist/tabs-format.log +24 -0
- package/dist/tabs-tests.log +85 -0
- package/dist/tabs-types.log +4 -0
- package/dist/tabs-ui-tests.log +84 -0
- package/dist/types/asyncState/__tests__/asyncState.test.d.ts +1 -0
- package/dist/types/asyncState/__tests__/useAsyncData.test.d.ts +1 -0
- package/dist/types/components/AsyncContent/__tests__/AsyncContent.test.d.ts +1 -0
- package/dist/types/components/AsyncContent/__tests__/AsyncContentI18n.test.d.ts +1 -0
- package/dist/types/components/ContactInfoPopup/ContactInfoPopup.stories.d.ts +9 -0
- package/dist/types/components/ContactSidebar/ContactSidebar.stories.d.ts +58 -0
- package/dist/types/components/ContactSidebar/SidebarContent.d.ts +2 -2
- package/dist/types/components/ContactSidebar/components/MediaViewer/MediaViewer.d.ts +2 -1
- package/dist/types/components/ContactSidebar/components/PanelView/PanelView.d.ts +2 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/BotsInfo.d.ts +2 -2
- package/dist/types/components/ContactSidebar/components/PanelView/components/BotsInfo/components/DataItem/DataItem.d.ts +3 -3
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/ButtonsListItem/ButtonsListItem.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactButton/components/TemplateRenderer/TemplateRenderer.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactConversation/styles.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/AddressCard.d.ts +19 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/Contact.d.ts +3 -2
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Contact/CopyAddress.d.ts +3 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactData/components/Properties/Properties.d.ts +2 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactDataDetails/ContactDataDetails.d.ts +1 -4
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactEvent/components/AddEvent/styles.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/ContactMedia.d.ts +2 -3
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/AudioMessage.d.ts +5 -7
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/AudioMessage/utils/getNewWaveSurfer.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/components/Image/Image.d.ts +5 -10
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactMedia/mediaEntries.d.ts +10 -0
- package/dist/types/components/ContactSidebar/components/PanelView/components/ContactTask/components/AddTask/styles.d.ts +1 -1
- package/dist/types/components/ContactSidebar/components/PanelView/components/IntegrationButtonSearch/IntegrationButtonSearch.d.ts +4 -0
- package/dist/types/components/ContactSidebar/components/SidebarLoadError.d.ts +3 -0
- package/dist/types/components/ContactSidebar/components/referencePanelStyles.d.ts +4 -0
- package/dist/types/components/ContactSidebar/components/verticalTabsStyles.d.ts +11 -0
- package/dist/types/components/ContactSidebar/context/MediaViewerContext.d.ts +1 -1
- package/dist/types/components/ContactSidebar/context/SidebarDataContext.d.ts +6 -15
- package/dist/types/components/ContactSidebar/context/SidebarPropsContext.d.ts +2 -0
- package/dist/types/components/ContactSidebar/hooks/useConversationHistory.d.ts +16 -0
- package/dist/types/components/ContactSidebar/hooks/useSidebarScope.d.ts +5 -0
- package/dist/types/components/ContactSidebar/i18n/useMediaText.d.ts +2 -0
- package/dist/types/components/ContactSidebar/i18n/useReferenceText.d.ts +3 -0
- package/dist/types/components/ContactSidebar/services/buttonsApi.d.ts +1 -1
- package/dist/types/components/ContactSidebar/utils/contactChannels.d.ts +52 -0
- package/dist/types/components/ContactSidebar/utils/conversationPresentation.d.ts +8 -0
- package/dist/types/components/EditContactModal/EditContactModal.stories.d.ts +9 -0
- package/dist/types/components/EditContactModal/components/SearchLocation/SearchLocationEditor.d.ts +2 -1
- package/dist/types/components/EditContactModal/components/Section/AddressInformation/AddressInformation.d.ts +2 -3
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/ContactMethod.d.ts +5 -8
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/ContactMethod/SubscriptionDialog.d.ts +11 -0
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemContainer/style.d.ts +5 -3
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/InformationItemInputsContainer/style.d.ts +11 -3
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/NoteDeleteButton/style.d.ts +5 -5
- package/dist/types/components/EditContactModal/components/Section/ContactInformation/components/EditModal/shared/SubsectionBodyContainer/style.d.ts +3 -6
- package/dist/types/components/EditContactModal/components/TagsEditor/TagsEditor.d.ts +6 -6
- package/dist/types/components/EditContactModal/context/EditContactApiContext.d.ts +8 -0
- package/dist/types/components/EditContactModal/layout/EditorSections.d.ts +16 -0
- package/dist/types/components/EditContactModal/services/api.d.ts +2 -0
- package/dist/types/components/EventsDialog/components/LinkContactsSelect/styles.d.ts +6 -0
- package/dist/types/components/EventsDialog/components/LocationTextField/MapLocationPicker.d.ts +8 -0
- package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/GoogleMap/index.d.ts +1 -0
- package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/components/index.d.ts +1 -0
- package/dist/types/components/EventsDialog/components/LocationTextField/SendLocation/index.d.ts +3 -0
- package/dist/types/components/EventsDialog/hooks/index.d.ts +9 -0
- package/dist/types/components/EventsDialog/hooks/useSelect.d.ts +14 -0
- package/dist/types/components/EventsDialog/utils/eventValidation.d.ts +37 -0
- package/dist/types/components/EventsDialog/utils/googleMapsUtils.d.ts +5 -0
- package/dist/types/components/EventsDialog/utils/keyboardNavigation.d.ts +24 -0
- package/dist/types/components/IntegrationButtonIcon/IntegrationButtonIcon.d.ts +8 -0
- package/dist/types/components/IntegrationButtonIcon/catalog.d.ts +14 -0
- package/dist/types/components/IntegrationButtonIcon/colors.d.ts +5 -0
- package/dist/types/components/IntegrationButtonIcon/index.d.ts +6 -0
- package/dist/types/components/PanelErrorBoundary/__tests__/PanelErrorBoundary.test.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/theme/MuiComponentsConfig.test.d.ts +1 -0
- package/dist/types/theme/selectThemeComponents.d.ts +3 -0
- package/dist/types/theme/themePreference.test.d.ts +1 -0
- package/dist/types/theme/themeProvider.test.d.ts +1 -0
- package/dist/types/utils/contactOwner.d.ts +3 -0
- package/package.json +3 -2
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: {
|
|
2
2
|
container: {
|
|
3
3
|
display: string;
|
|
4
4
|
width: string;
|
|
5
5
|
alignItems: string;
|
|
6
|
-
|
|
6
|
+
gap: number;
|
|
7
7
|
};
|
|
8
8
|
noteTextField: {
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
flex: number;
|
|
10
|
+
minWidth: number;
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
|
-
export default
|
|
13
|
+
export default _default;
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const _default: {
|
|
2
2
|
container: {
|
|
3
3
|
width: string;
|
|
4
|
-
borderRadius: number;
|
|
5
|
-
px: number;
|
|
6
|
-
py: number;
|
|
7
4
|
display: string;
|
|
8
5
|
flexDirection: string;
|
|
9
6
|
gap: number;
|
|
7
|
+
py: number;
|
|
10
8
|
overflow: string;
|
|
11
|
-
maxHeight: string;
|
|
12
9
|
};
|
|
13
10
|
};
|
|
14
|
-
export default
|
|
11
|
+
export default _default;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ILabel } from '@trii/types/dist/Contacts';
|
|
2
|
-
type
|
|
1
|
+
import type { ILabel } from '@trii/types/dist/Contacts';
|
|
2
|
+
type Props = {
|
|
3
3
|
value: ILabel[];
|
|
4
4
|
options: ILabel[];
|
|
5
5
|
onChange: (value: ILabel[]) => void;
|
|
6
6
|
onBack: () => void;
|
|
7
|
-
onSave: () => void
|
|
7
|
+
onSave: () => void | Promise<void>;
|
|
8
8
|
isSaving: boolean;
|
|
9
|
-
onCreateNew: (name: string) => void
|
|
9
|
+
onCreateNew: (name: string) => void | Promise<void>;
|
|
10
10
|
isCreatingNew: boolean;
|
|
11
11
|
popperContainer?: HTMLElement | null;
|
|
12
12
|
};
|
|
13
|
-
|
|
14
|
-
export
|
|
13
|
+
export default function TagsEditor({ value, options, onChange, onBack, onSave, isSaving, onCreateNew, isCreatingNew, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
export declare const EditContactApiProvider: import("react").Provider<{
|
|
3
|
+
fetchSubscriptions: ({ signal }?: {
|
|
4
|
+
signal?: AbortSignal;
|
|
5
|
+
}) => Promise<unknown[]>;
|
|
6
|
+
unsubscribeAddress: (contactAddressId: string, subscriptionId: string, signal?: AbortSignal) => Promise<unknown>;
|
|
3
7
|
fetchLabels: ({ signal }?: {
|
|
4
8
|
signal?: AbortSignal;
|
|
5
9
|
}) => Promise<import("@trii/types/dist/Contacts").ILabel[]>;
|
|
@@ -101,6 +105,10 @@ export declare const EditContactApiProvider: import("react").Provider<{
|
|
|
101
105
|
}) => Promise<string>;
|
|
102
106
|
}>;
|
|
103
107
|
export declare const useEditContactApi: () => {
|
|
108
|
+
fetchSubscriptions: ({ signal }?: {
|
|
109
|
+
signal?: AbortSignal;
|
|
110
|
+
}) => Promise<unknown[]>;
|
|
111
|
+
unsubscribeAddress: (contactAddressId: string, subscriptionId: string, signal?: AbortSignal) => Promise<unknown>;
|
|
104
112
|
fetchLabels: ({ signal }?: {
|
|
105
113
|
signal?: AbortSignal;
|
|
106
114
|
}) => Promise<import("@trii/types/dist/Contacts").ILabel[]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export declare function CustomFields({ fields, currentUser, baseUrl, spaceId, onEntityUpdated, }: {
|
|
3
|
+
fields: import('@trii/types/dist/Contacts').IContactField[];
|
|
4
|
+
currentUser?: import('@trii/types/dist/Users').UserTrii | null;
|
|
5
|
+
baseUrl?: string;
|
|
6
|
+
spaceId?: string;
|
|
7
|
+
onEntityUpdated?: (entity: unknown) => void;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function EditorSections({ general, channels, addresses, fields, tagsEditor, mode, }: {
|
|
10
|
+
general: ReactNode;
|
|
11
|
+
channels: ReactNode;
|
|
12
|
+
addresses: ReactNode;
|
|
13
|
+
fields: ReactNode;
|
|
14
|
+
tagsEditor?: ReactNode;
|
|
15
|
+
mode?: 'modal' | 'card';
|
|
16
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -175,6 +175,8 @@ type UpdateContactAddressBoundArgs = WithSignal & {
|
|
|
175
175
|
data: UpdateContactAddressData;
|
|
176
176
|
};
|
|
177
177
|
export declare const createEditContactApi: (baseUrl: string, spaceId: string) => {
|
|
178
|
+
fetchSubscriptions: ({ signal }?: WithSignal) => Promise<unknown[]>;
|
|
179
|
+
unsubscribeAddress: (contactAddressId: string, subscriptionId: string, signal?: AbortSignal) => Promise<unknown>;
|
|
178
180
|
fetchLabels: ({ signal }?: WithSignal) => Promise<ILabel[]>;
|
|
179
181
|
createLabel: ({ name, signal }: CreateLabelBoundArgs) => Promise<ILabel>;
|
|
180
182
|
fetchContact: ({ contactId, signal }: FetchContactBoundArgs) => Promise<IContact | IBusiness>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const SelectPrimaryContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/system").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
2
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
3
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/system").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
|
|
4
|
+
export declare const SelectSecondaryContainer: import("@emotion/styled").StyledComponent<import("@mui/system").BoxOwnProps<import("@mui/system").Theme> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
5
|
+
ref?: ((instance: HTMLDivElement | null) => void | import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof import("react").DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | import("react").RefObject<HTMLDivElement> | null | undefined;
|
|
6
|
+
}, keyof import("@mui/system").BoxOwnProps<import("@mui/system").Theme>> & import("@mui/system").MUIStyledCommonProps<import("@mui/system").Theme>, {}, {}>;
|
package/dist/types/components/EventsDialog/components/LocationTextField/MapLocationPicker.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface MapLocationPickerProps {
|
|
3
|
+
onLocationSelect: (address: string, lat: number, lng: number) => void;
|
|
4
|
+
initialAddress?: string;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const MapLocationPicker: React.FC<MapLocationPickerProps>;
|
|
8
|
+
export default MapLocationPicker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './GoogleMapStandalone';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as GoogleMapStandalone } from './GoogleMap/GoogleMapStandalone';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { default as useField, useFieldInitialState, type UseFieldType } from './useField';
|
|
2
|
+
export { default as useSelect, type UseSelect } from './useSelect';
|
|
3
|
+
export { default as useDialog, useDialogInitialState, type UseDialog } from './useDialog';
|
|
4
|
+
export { default as useEvent, useEventInitialState, type UseEvent, type UseDateState, type UseLinkContact, } from './useEvent';
|
|
5
|
+
export { type UseNotificationsType } from './useNotifications';
|
|
6
|
+
export { default as useTask, useTaskInitialState, type UseTask } from './useTask';
|
|
7
|
+
export { default as useCalendar, useCalendarInitialState, type UseCalendarType, } from './useCalendar';
|
|
8
|
+
export { default as useCalendarEvents, useCalendarEventsInitialState, type UseCalendarEventsType, type CalendarEvent, } from './useCalendarEvents';
|
|
9
|
+
export { default as useCalendarTasks, useCalendarTasksInitialState, type UseCalendarTasksType, type CalendarTask, } from './useCalendarTasks';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { SelectChangeEvent } from '@mui/material';
|
|
3
|
+
export interface UseSelect {
|
|
4
|
+
actions: {
|
|
5
|
+
resetValue: () => void;
|
|
6
|
+
changeValue: (newValue: string | number) => void;
|
|
7
|
+
};
|
|
8
|
+
attributes: {
|
|
9
|
+
value: string | number;
|
|
10
|
+
onChange: (event: SelectChangeEvent<string>, child: ReactNode) => void;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
declare const useSelect: (initialValue: string | number) => UseSelect;
|
|
14
|
+
export default useSelect;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilidades para validación de eventos del calendario
|
|
3
|
+
*/
|
|
4
|
+
export interface CalendarItem {
|
|
5
|
+
id?: string;
|
|
6
|
+
start: Date | string;
|
|
7
|
+
end: Date | string;
|
|
8
|
+
title?: string;
|
|
9
|
+
kind?: 'event' | 'task';
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Verifica si dos eventos se solapan en el tiempo
|
|
13
|
+
*/
|
|
14
|
+
export declare const eventsOverlap: (event1: CalendarItem, event2: CalendarItem) => boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Encuentra todos los eventos que se solapan con un evento dado
|
|
17
|
+
*/
|
|
18
|
+
export declare const findOverlappingEvents: (targetEvent: CalendarItem, allEvents: CalendarItem[]) => CalendarItem[];
|
|
19
|
+
/**
|
|
20
|
+
* Valida que un evento tenga fechas válidas
|
|
21
|
+
*/
|
|
22
|
+
export declare const validateEventDates: (event: CalendarItem) => {
|
|
23
|
+
isValid: boolean;
|
|
24
|
+
error?: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Genera un mensaje descriptivo sobre eventos solapados
|
|
28
|
+
*/
|
|
29
|
+
export declare const getOverlapWarningMessage: (overlappingEvents: CalendarItem[]) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Calcula la duración de un evento en minutos
|
|
32
|
+
*/
|
|
33
|
+
export declare const getEventDuration: (event: CalendarItem) => number;
|
|
34
|
+
/**
|
|
35
|
+
* Verifica si un evento es de todo el día
|
|
36
|
+
*/
|
|
37
|
+
export declare const isAllDayEvent: (event: CalendarItem) => boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Re-exportaciones de googleMapsLoader para mantener compatibilidad
|
|
3
|
+
* Este archivo actúa como alias para las funciones de Google Maps
|
|
4
|
+
*/
|
|
5
|
+
export { GOOGLE_MAPS_CONFIG, GOOGLE_MAPS_SCRIPT_CONFIG, useGoogleMapsLoader, loadGoogleMapsAsync, getStaticMapUrl, geocodeAddress, } from './googleMapsLoader';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utilidades para navegación por teclado en el calendario
|
|
3
|
+
*/
|
|
4
|
+
type View = 'month' | 'week' | 'day' | 'work_week' | 'agenda';
|
|
5
|
+
export interface KeyboardNavigationConfig {
|
|
6
|
+
onNavigate: (action: 'PREV' | 'NEXT' | 'TODAY' | 'DATE', date?: Date) => void;
|
|
7
|
+
onViewChange: (view: View) => void;
|
|
8
|
+
onCreateEvent?: () => void;
|
|
9
|
+
currentDate: Date;
|
|
10
|
+
currentView: View;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Maneja los eventos de teclado para el calendario
|
|
14
|
+
*/
|
|
15
|
+
export declare const handleCalendarKeyDown: (event: KeyboardEvent, config: KeyboardNavigationConfig) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Genera el mensaje de ayuda para atajos de teclado
|
|
18
|
+
*/
|
|
19
|
+
export declare const getKeyboardShortcutsHelp: () => string;
|
|
20
|
+
/**
|
|
21
|
+
* Genera los atributos ARIA para el calendario
|
|
22
|
+
*/
|
|
23
|
+
export declare const getCalendarAriaAttributes: (currentView: View, currentDate: Date) => Record<string, string>;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { IIntegrationButton } from '@trii/types/dist/Contacts';
|
|
2
|
+
export type IntegrationButtonIconProps = {
|
|
3
|
+
button: Pick<IIntegrationButton, 'icon_class' | 'icon_color_mode' | 'icon_color_light' | 'icon_color_dark'>;
|
|
4
|
+
size?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
};
|
|
7
|
+
/** Decorative icon: its accessible name comes from the surrounding button/tab. */
|
|
8
|
+
export default function IntegrationButtonIcon({ button, size, className }: IntegrationButtonIconProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { LucideIcon } from "lucide-react";
|
|
2
|
+
export type ButtonIconCategory = "general" | "people" | "documents" | "finance" | "communication" | "operations" | "technology";
|
|
3
|
+
export type ButtonIconDefinition = {
|
|
4
|
+
id: `lucide:${string}`;
|
|
5
|
+
name: string;
|
|
6
|
+
category: ButtonIconCategory;
|
|
7
|
+
Component: LucideIcon;
|
|
8
|
+
keywords: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const BUTTON_ICON_CATEGORIES: ButtonIconCategory[];
|
|
11
|
+
export declare const BUTTON_ICONS: ButtonIconDefinition[];
|
|
12
|
+
export declare const DEFAULT_BUTTON_ICON = "lucide:mouse-pointer-click";
|
|
13
|
+
export declare const findButtonIcon: (id: string | null | undefined) => ButtonIconDefinition;
|
|
14
|
+
export declare const normalizeIconSearch: (value: string) => string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { IIntegrationButton } from "@trii/types/dist/Contacts";
|
|
2
|
+
export type ButtonIconColors = Pick<IIntegrationButton, "icon_color_mode" | "icon_color_light" | "icon_color_dark">;
|
|
3
|
+
export declare const DEFAULT_LIGHT_ICON_COLOR = "#334155";
|
|
4
|
+
export declare const DEFAULT_DARK_ICON_COLOR = "#e2e8f0";
|
|
5
|
+
export declare function resolveButtonIconColor(colors: ButtonIconColors, mode: "light" | "dark"): string | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as IntegrationButtonIcon } from './IntegrationButtonIcon';
|
|
2
|
+
export type { IntegrationButtonIconProps } from './IntegrationButtonIcon';
|
|
3
|
+
export { BUTTON_ICONS, BUTTON_ICON_CATEGORIES, DEFAULT_BUTTON_ICON, findButtonIcon, normalizeIconSearch } from './catalog';
|
|
4
|
+
export type { ButtonIconDefinition, ButtonIconCategory } from './catalog';
|
|
5
|
+
export { resolveButtonIconColor, DEFAULT_LIGHT_ICON_COLOR, DEFAULT_DARK_ICON_COLOR } from './colors';
|
|
6
|
+
export type { ButtonIconColors } from './colors';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -14,3 +14,4 @@ export { default as PanelErrorBoundary } from './PanelErrorBoundary';
|
|
|
14
14
|
export type { PanelErrorBoundaryProps } from './PanelErrorBoundary';
|
|
15
15
|
export { default as ContactSidebar } from './ContactSidebar';
|
|
16
16
|
export type { ContactSidebarProps, SidebarChatIntegration, StartConversationTarget, } from './ContactSidebar';
|
|
17
|
+
export * from './IntegrationButtonIcon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trii/components",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.11",
|
|
4
4
|
"description": "Trii components package",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -180,9 +180,10 @@
|
|
|
180
180
|
"dependencies": {
|
|
181
181
|
"@mdi/js": "^7.4.47",
|
|
182
182
|
"@mdi/react": "^1.6.1",
|
|
183
|
-
"@trii/types": "^2.10.
|
|
183
|
+
"@trii/types": "^2.10.790",
|
|
184
184
|
"date-fns": "^2.30.0",
|
|
185
185
|
"dompurify": "^2.5.8",
|
|
186
|
+
"lucide-react": "^1.61.0",
|
|
186
187
|
"markdown-it": "^14.1.0",
|
|
187
188
|
"markdown-it-emoji": "^3.0.0",
|
|
188
189
|
"react-file-icon": "^1.6.0",
|