@nlxai/touchpoint-ui 1.0.4-alpha.3 → 1.0.4

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/lib/App.d.ts CHANGED
@@ -9,16 +9,18 @@ export interface Props {
9
9
  */
10
10
  brandIcon?: string;
11
11
  /**
12
- * URL of icon used on the launch icon in the bottom right when the experience is collapsed
12
+ * URL of icon used on the launch icon in the bottom right when the experience is collapsed.
13
+ *
14
+ * When set to `false`, no launch button is shown at all. When not set or set to `true`, the default launch icon is rendered.
13
15
  */
14
- launchIcon?: string;
16
+ launchIcon?: string | boolean;
15
17
  theme?: Partial<Theme>;
16
18
  customModalities?: Record<string, CustomModalityComponent<any>>;
17
19
  }
18
20
  export interface AppRef {
19
- expand: () => void;
20
- collapse: () => void;
21
- getConversationHandler: () => ConversationHandler | null;
21
+ setExpanded: (val: boolean) => void;
22
+ getExpanded: () => boolean;
23
+ getConversationHandler: () => ConversationHandler;
22
24
  }
23
25
  declare const App: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<AppRef>>;
24
26
  export default App;
@@ -0,0 +1,2 @@
1
+ import { FC } from 'react';
2
+ export declare const FullscreenError: FC<unknown>;
@@ -1,6 +1,6 @@
1
1
  import { FC } from 'react';
2
2
  import { WindowSize, ColorMode } from '../types';
3
- interface ChatHeaderProps {
3
+ interface HeaderProps {
4
4
  windowSize: WindowSize;
5
5
  colorMode: ColorMode;
6
6
  brandIcon?: string;
@@ -9,5 +9,5 @@ interface ChatHeaderProps {
9
9
  toggleSettings?: () => void;
10
10
  isSettingsOpen: boolean;
11
11
  }
12
- export declare const ChatHeader: FC<ChatHeaderProps>;
12
+ export declare const Header: FC<HeaderProps>;
13
13
  export {};
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { ConversationHandler, UploadUrl } from '@nlxai/chat-core';
3
3
  import { ChoiceMessage } from '../types';
4
- interface ChatInputProps {
4
+ interface InputProps {
5
5
  className?: string;
6
6
  handler: ConversationHandler;
7
7
  uploadUrl?: UploadUrl;
@@ -11,5 +11,5 @@ interface ChatInputProps {
11
11
  }) => void;
12
12
  choiceMessage?: ChoiceMessage;
13
13
  }
14
- declare const ChatInput: FC<ChatInputProps>;
15
- export default ChatInput;
14
+ export declare const Input: FC<InputProps>;
15
+ export {};
@@ -1,7 +1,7 @@
1
1
  import { FC } from 'react';
2
2
  import { Response, ConversationHandler, BotMessage } from '@nlxai/chat-core';
3
3
  import { CustomModalityComponent, ColorMode } from '../types';
4
- export interface ChatMessagesProps {
4
+ export interface MessagesProps {
5
5
  isWaiting: boolean;
6
6
  handler: ConversationHandler;
7
7
  responses: Response[];
@@ -18,4 +18,4 @@ export declare const MessageChoices: FC<{
18
18
  messageIndex: number;
19
19
  className?: string;
20
20
  }>;
21
- export declare const ChatMessages: FC<ChatMessagesProps>;
21
+ export declare const Messages: FC<MessagesProps>;
@@ -1,9 +1,9 @@
1
1
  import { FC } from 'react';
2
2
  import { ConversationHandler } from '@nlxai/chat-core';
3
- interface ChatSettingsProps {
3
+ interface SettingsProps {
4
4
  onClose: () => void;
5
5
  handler: ConversationHandler;
6
6
  className?: string;
7
7
  }
8
- export declare const ChatSettings: FC<ChatSettingsProps>;
8
+ export declare const Settings: FC<SettingsProps>;
9
9
  export {};
@@ -0,0 +1,4 @@
1
+ import { FC, ReactNode } from 'react';
2
+ export declare const Carousel: FC<{
3
+ children: ReactNode;
4
+ }>;
@@ -5,9 +5,6 @@ export interface CustomCardProps {
5
5
  selected?: boolean;
6
6
  onClick?: () => void;
7
7
  }
8
- export declare const CustomCards: FC<{
9
- children: ReactNode;
10
- }>;
11
8
  export declare const CustomCard: FC<CustomCardProps>;
12
9
  export declare const CustomCardImageRow: FC<{
13
10
  src: string;
package/lib/index.d.ts CHANGED
@@ -3,16 +3,17 @@ import { Props } from './App';
3
3
  import { TextButton } from './components/ui/TextButton';
4
4
  import { IconButton } from './components/ui/IconButton';
5
5
  import { BaseText, SmallText } from './components/ui/Typography';
6
- import { CustomCards, CustomCard, CustomCardRow, CustomCardImageRow } from './components/ui/CustomCard';
6
+ import { CustomCard, CustomCardRow, CustomCardImageRow } from './components/ui/CustomCard';
7
+ import { Carousel } from './components/ui/Carousel';
8
+ import { DateInput } from './components/ui/DateInput';
7
9
  import * as Icons from "./components/ui/Icons";
8
- export { useTouchpointContext } from './context';
9
10
  export { default as React } from 'react';
10
11
  export declare const html: (strings: TemplateStringsArray, ...values: any[]) => unknown;
11
- export { TextButton, IconButton, BaseText, SmallText, CustomCards, CustomCard, CustomCardRow, CustomCardImageRow, Icons, };
12
+ export { TextButton, IconButton, BaseText, SmallText, DateInput, Carousel, CustomCard, CustomCardRow, CustomCardImageRow, Icons, };
12
13
  export interface TouchpointInstance {
13
- expand: () => void;
14
- collapse: () => void;
15
- getConversationHandler: () => ConversationHandler | null;
14
+ expanded: boolean;
15
+ conversationHandler: ConversationHandler;
16
16
  teardown: () => void;
17
17
  }
18
- export declare const create: (props: Props) => TouchpointInstance;
18
+ export declare const create: (props: Props) => Promise<TouchpointInstance>;
19
+ export { Container as PreviewContainer } from './preview';