@aircall/blocks 0.10.1 → 0.11.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.
- package/dist/globals.css +1 -1
- package/dist/index.d.ts +40 -4
- package/dist/index.js +527 -111
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -121,6 +121,33 @@ declare function ChatbotResponseBlock({
|
|
|
121
121
|
className
|
|
122
122
|
}: ChatbotResponseBlockProps): react_jsx_runtime0.JSX.Element;
|
|
123
123
|
//#endregion
|
|
124
|
+
//#region src/components/chatbot-response-loading.d.ts
|
|
125
|
+
interface ChatbotResponseLoadingProps {
|
|
126
|
+
/**
|
|
127
|
+
* Text shown next to the animation while the response is being generated.
|
|
128
|
+
* Defaults to the i18n translation of "Thinking...".
|
|
129
|
+
*/
|
|
130
|
+
text?: string;
|
|
131
|
+
className?: string;
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Loading indicator rendered inside `ChatbotPageConversation` while the backend
|
|
135
|
+
* is still streaming a response. Shows the Aircall animated logo next to a
|
|
136
|
+
* customisable shimmer text label.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```tsx
|
|
140
|
+
* <ChatbotPageConversation>
|
|
141
|
+
* <ChatbotUserMessage>How do I set my phone line?</ChatbotUserMessage>
|
|
142
|
+
* {isLoading && <ChatbotResponseLoading text="Thinking..." />}
|
|
143
|
+
* </ChatbotPageConversation>
|
|
144
|
+
* ```
|
|
145
|
+
*/
|
|
146
|
+
declare function ChatbotResponseLoading({
|
|
147
|
+
text,
|
|
148
|
+
className
|
|
149
|
+
}: ChatbotResponseLoadingProps): react_jsx_runtime0.JSX.Element;
|
|
150
|
+
//#endregion
|
|
124
151
|
//#region src/components/chatbot-page.d.ts
|
|
125
152
|
declare const ChatbotPage: React$1.ForwardRefExoticComponent<ChatbotPageProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
126
153
|
interface ChatbotPageProps {
|
|
@@ -224,7 +251,12 @@ declare namespace ChatbotPageFooter {
|
|
|
224
251
|
* ```
|
|
225
252
|
*/
|
|
226
253
|
declare const ChatbotPageConversation: React$1.ForwardRefExoticComponent<Omit<ChatbotPageConversationProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
227
|
-
interface ChatbotPageConversationProps extends React$1.ComponentProps<'div'> {
|
|
254
|
+
interface ChatbotPageConversationProps extends React$1.ComponentProps<'div'> {
|
|
255
|
+
/** When true, renders the animated loading indicator after the last message. */
|
|
256
|
+
loading?: boolean;
|
|
257
|
+
/** Label shown next to the loading animation. Defaults to "Thinking…". */
|
|
258
|
+
loadingText?: string;
|
|
259
|
+
}
|
|
228
260
|
declare namespace ChatbotPageConversation {
|
|
229
261
|
type Props = ChatbotPageConversationProps;
|
|
230
262
|
}
|
|
@@ -627,8 +659,11 @@ type ChatbotPanelProps = Omit<React$1.ComponentProps<'div'>, 'title' | 'onSubmit
|
|
|
627
659
|
inputValue?: string; /** Fires as the composer value changes. */
|
|
628
660
|
onInputValueChange?: (value: string) => void; /** Fires when the composer is submitted (Enter or send button). */
|
|
629
661
|
onSubmit?: (value: string) => void; /** Fires when the stop button is pressed while `loading`. */
|
|
630
|
-
onStop?: () => void;
|
|
631
|
-
|
|
662
|
+
onStop?: () => void;
|
|
663
|
+
/** Shows the stop button instead of send and renders the loading indicator
|
|
664
|
+
* at the bottom of the active conversation. */
|
|
665
|
+
loading?: boolean; /** Label shown next to the loading animation. Defaults to "Thinking…". */
|
|
666
|
+
loadingText?: string; /** Composer placeholder. */
|
|
632
667
|
placeholder?: string;
|
|
633
668
|
/**
|
|
634
669
|
* Focus the composer when the panel mounts. Use this when the panel is
|
|
@@ -662,6 +697,7 @@ declare function ChatbotPanel({
|
|
|
662
697
|
onSubmit,
|
|
663
698
|
onStop,
|
|
664
699
|
loading,
|
|
700
|
+
loadingText,
|
|
665
701
|
placeholder,
|
|
666
702
|
autoFocus,
|
|
667
703
|
disclaimer,
|
|
@@ -2131,4 +2167,4 @@ declare namespace DashboardSidebarSubmenuSeparator {
|
|
|
2131
2167
|
type Props = DashboardSidebarSubmenuSeparatorProps;
|
|
2132
2168
|
}
|
|
2133
2169
|
//#endregion
|
|
2134
|
-
export { type ArrayField, type ArrayItem, BetaBadge, type BoundForm, CardSaveBar, type CardSaveBarProps, ChatbotExpandSuggestion, type ChatbotExpandSuggestionProps, ChatbotInput, type ChatbotInputProps, ChatbotPage, ChatbotPageBody, type ChatbotPageBodyProps, ChatbotPageContent, type ChatbotPageContentProps, ChatbotPageConversation, type ChatbotPageConversationProps, ChatbotPageFooter, type ChatbotPageFooterProps, ChatbotPageHeading, type ChatbotPageHeadingProps, ChatbotPageInputBar, type ChatbotPageInputBarProps, type ChatbotPageProps, ChatbotPanel, ChatbotPanelHeader, type ChatbotPanelHeaderProps, type ChatbotPanelProps, ChatbotPanelSuggestion, type ChatbotPanelSuggestionItem, type ChatbotPanelSuggestionProps, ChatbotPanelTrigger, type ChatbotPanelTriggerProps, ChatbotResponseBlock, type ChatbotResponseBlockFeedback, type ChatbotResponseBlockProps, ChatbotSidebar, type ChatbotSidebarConversation, ChatbotUserMessage, type ChatbotUserMessageProps, type ComboboxControl, ComingSoonDescription, ComingSoonEmptyState, ComingSoonMedia, ComingSoonTitle, CommonForm, CopyButton, CopyButtonIcon, CopyButtonLabel, DashboardPage, DashboardPageBanner, DashboardPageContent, DashboardPageHeader, DashboardPageHeaderAction, DashboardPageHeaderActions, DashboardPageHeaderDescription, DashboardPageHeaderNav, DashboardPageHeaderNavBack, DashboardPageHeaderPrefix, DashboardPageHeaderSubtitle, DashboardPageHeaderTitle, DashboardPageHeaderTitleGroup, DashboardPageMain, DashboardPageTabs, DashboardSidebar, DashboardSidebarContent, DashboardSidebarFooter, DashboardSidebarGroup, DashboardSidebarGroupLabel, DashboardSidebarHeader, DashboardSidebarMenu, DashboardSidebarMenuBadge, DashboardSidebarMenuButton, DashboardSidebarMenuItem, DashboardSidebarNav, type DashboardSidebarNavGroup, type DashboardSidebarNavItem, type DashboardSidebarNavItemAction, type DashboardSidebarNavItemLink, type DashboardSidebarNavItemSubmenu, type DashboardSidebarNavSubmenuItem, DashboardSidebarProvider, DashboardSidebarSubmenu, DashboardSidebarSubmenuItem, DashboardSidebarSubmenuSeparator, DashboardSidebarTrigger, DashboardStandalonePage, DashboardStandalonePageAction, DashboardStandalonePageActions, DashboardStandalonePageContent, DashboardStandalonePageHeader, DashboardStandalonePageTitle, DeprecatedBadge, EmptyState, EmptyStateActions, EmptyStateButton, EmptyStateDescription, EmptyStateExternalLink, EmptyStateHeader, EmptyStateMedia, EmptyStateTitle, type FieldBindingProps, FormArrayField, type FormArrayFieldProps, FormComboboxField, type FormComboboxFieldProps, FormFieldBase, FormFieldShell, type FormFieldShellProps, type FormFieldValidators, FormInputField, type FormInputFieldProps, FormMultiComboboxField, type FormMultiComboboxFieldProps, FormNumericField, type FormNumericFieldProps, FormOTPField, type FormOTPFieldProps, FormRadioGroupField, type FormRadioGroupFieldProps, FormSelectField, type FormSelectFieldProps, FormSliderField, type FormSliderFieldProps, FormSwitchField, type FormSwitchFieldProps, FormTextareaField, type FormTextareaFieldProps, FormToggleGroupField, type FormToggleGroupFieldProps, type InputControl, type MultiComboboxControl, type NecessityProps, NewBadge, NoDataDescription, NoDataEmptyState, NoDataMedia, NoDataTitle, NoSupportDescription, NoSupportEmptyState, NoSupportMedia, NoSupportTitle, NotFoundDescription, NotFoundEmptyState, NotFoundMedia, NotFoundTitle, type NumericControl, type OTPControl, ProfessionalBadge, type RadioGroupControl, RestrictedAccessDescription, RestrictedAccessEmptyState, RestrictedAccessMedia, RestrictedAccessTitle, RoleBadge, type RoleBadgeRole, SaveBar, type SaveBarProps, type SelectControl, type SliderControl, SubmitButton, type SubmitButtonProps, type SwitchControl, type TextareaControl, type ToggleGroupControl, TrialBadge, type TypedField, UnknownErrorDescription, UnknownErrorEmptyState, UnknownErrorMedia, UnknownErrorTitle, fieldContext, formContext, toFieldErrors, useCopyToClipboard, useSidebar as useDashboardSidebar, useFieldContext, useForm, useFormContext, withFieldGroup, withForm };
|
|
2170
|
+
export { type ArrayField, type ArrayItem, BetaBadge, type BoundForm, CardSaveBar, type CardSaveBarProps, ChatbotExpandSuggestion, type ChatbotExpandSuggestionProps, ChatbotInput, type ChatbotInputProps, ChatbotPage, ChatbotPageBody, type ChatbotPageBodyProps, ChatbotPageContent, type ChatbotPageContentProps, ChatbotPageConversation, type ChatbotPageConversationProps, ChatbotPageFooter, type ChatbotPageFooterProps, ChatbotPageHeading, type ChatbotPageHeadingProps, ChatbotPageInputBar, type ChatbotPageInputBarProps, type ChatbotPageProps, ChatbotPanel, ChatbotPanelHeader, type ChatbotPanelHeaderProps, type ChatbotPanelProps, ChatbotPanelSuggestion, type ChatbotPanelSuggestionItem, type ChatbotPanelSuggestionProps, ChatbotPanelTrigger, type ChatbotPanelTriggerProps, ChatbotResponseBlock, type ChatbotResponseBlockFeedback, type ChatbotResponseBlockProps, ChatbotResponseLoading, type ChatbotResponseLoadingProps, ChatbotSidebar, type ChatbotSidebarConversation, ChatbotUserMessage, type ChatbotUserMessageProps, type ComboboxControl, ComingSoonDescription, ComingSoonEmptyState, ComingSoonMedia, ComingSoonTitle, CommonForm, CopyButton, CopyButtonIcon, CopyButtonLabel, DashboardPage, DashboardPageBanner, DashboardPageContent, DashboardPageHeader, DashboardPageHeaderAction, DashboardPageHeaderActions, DashboardPageHeaderDescription, DashboardPageHeaderNav, DashboardPageHeaderNavBack, DashboardPageHeaderPrefix, DashboardPageHeaderSubtitle, DashboardPageHeaderTitle, DashboardPageHeaderTitleGroup, DashboardPageMain, DashboardPageTabs, DashboardSidebar, DashboardSidebarContent, DashboardSidebarFooter, DashboardSidebarGroup, DashboardSidebarGroupLabel, DashboardSidebarHeader, DashboardSidebarMenu, DashboardSidebarMenuBadge, DashboardSidebarMenuButton, DashboardSidebarMenuItem, DashboardSidebarNav, type DashboardSidebarNavGroup, type DashboardSidebarNavItem, type DashboardSidebarNavItemAction, type DashboardSidebarNavItemLink, type DashboardSidebarNavItemSubmenu, type DashboardSidebarNavSubmenuItem, DashboardSidebarProvider, DashboardSidebarSubmenu, DashboardSidebarSubmenuItem, DashboardSidebarSubmenuSeparator, DashboardSidebarTrigger, DashboardStandalonePage, DashboardStandalonePageAction, DashboardStandalonePageActions, DashboardStandalonePageContent, DashboardStandalonePageHeader, DashboardStandalonePageTitle, DeprecatedBadge, EmptyState, EmptyStateActions, EmptyStateButton, EmptyStateDescription, EmptyStateExternalLink, EmptyStateHeader, EmptyStateMedia, EmptyStateTitle, type FieldBindingProps, FormArrayField, type FormArrayFieldProps, FormComboboxField, type FormComboboxFieldProps, FormFieldBase, FormFieldShell, type FormFieldShellProps, type FormFieldValidators, FormInputField, type FormInputFieldProps, FormMultiComboboxField, type FormMultiComboboxFieldProps, FormNumericField, type FormNumericFieldProps, FormOTPField, type FormOTPFieldProps, FormRadioGroupField, type FormRadioGroupFieldProps, FormSelectField, type FormSelectFieldProps, FormSliderField, type FormSliderFieldProps, FormSwitchField, type FormSwitchFieldProps, FormTextareaField, type FormTextareaFieldProps, FormToggleGroupField, type FormToggleGroupFieldProps, type InputControl, type MultiComboboxControl, type NecessityProps, NewBadge, NoDataDescription, NoDataEmptyState, NoDataMedia, NoDataTitle, NoSupportDescription, NoSupportEmptyState, NoSupportMedia, NoSupportTitle, NotFoundDescription, NotFoundEmptyState, NotFoundMedia, NotFoundTitle, type NumericControl, type OTPControl, ProfessionalBadge, type RadioGroupControl, RestrictedAccessDescription, RestrictedAccessEmptyState, RestrictedAccessMedia, RestrictedAccessTitle, RoleBadge, type RoleBadgeRole, SaveBar, type SaveBarProps, type SelectControl, type SliderControl, SubmitButton, type SubmitButtonProps, type SwitchControl, type TextareaControl, type ToggleGroupControl, TrialBadge, type TypedField, UnknownErrorDescription, UnknownErrorEmptyState, UnknownErrorMedia, UnknownErrorTitle, fieldContext, formContext, toFieldErrors, useCopyToClipboard, useSidebar as useDashboardSidebar, useFieldContext, useForm, useFormContext, withFieldGroup, withForm };
|