@nlxai/touchpoint-ui 1.0.4-alpha.2 → 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 +14 -5
- package/lib/components/FullscreenError.d.ts +2 -0
- package/lib/components/{ChatHeader.d.ts → Header.d.ts} +4 -4
- package/lib/components/{ChatInput.d.ts → Input.d.ts} +3 -3
- package/lib/components/{ChatMessages.d.ts → Messages.d.ts} +2 -2
- package/lib/components/Settings.d.ts +9 -0
- package/lib/components/ui/Carousel.d.ts +4 -0
- package/lib/components/ui/CustomCard.d.ts +0 -3
- package/lib/components/ui/LaunchButton.d.ts +1 -0
- package/lib/index.d.ts +8 -7
- package/lib/index.js +3854 -3332
- package/lib/index.umd.js +44 -43
- package/lib/preview.d.ts +10 -0
- package/lib/types.d.ts +13 -5
- package/package.json +4 -4
- package/tailwind.config.js +2 -2
- package/lib/components/ChatSettings.d.ts +0 -12
- package/lib/context.d.ts +0 -6
package/lib/App.d.ts
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import { ConversationHandler, Config } from '@nlxai/chat-core';
|
|
2
|
-
import { ColorMode, WindowSize,
|
|
2
|
+
import { ColorMode, WindowSize, Theme, CustomModalityComponent } from './types';
|
|
3
3
|
export interface Props {
|
|
4
4
|
config: Config;
|
|
5
5
|
windowSize?: WindowSize;
|
|
6
6
|
colorMode?: ColorMode;
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* URL of icon used to display the brand in the chat header
|
|
9
|
+
*/
|
|
10
|
+
brandIcon?: string;
|
|
11
|
+
/**
|
|
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.
|
|
15
|
+
*/
|
|
16
|
+
launchIcon?: string | boolean;
|
|
8
17
|
theme?: Partial<Theme>;
|
|
9
18
|
customModalities?: Record<string, CustomModalityComponent<any>>;
|
|
10
19
|
}
|
|
11
20
|
export interface AppRef {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
getConversationHandler: () => ConversationHandler
|
|
21
|
+
setExpanded: (val: boolean) => void;
|
|
22
|
+
getExpanded: () => boolean;
|
|
23
|
+
getConversationHandler: () => ConversationHandler;
|
|
15
24
|
}
|
|
16
25
|
declare const App: import('react').ForwardRefExoticComponent<Props & import('react').RefAttributes<AppRef>>;
|
|
17
26
|
export default App;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
|
-
import { WindowSize,
|
|
3
|
-
interface
|
|
2
|
+
import { WindowSize, ColorMode } from '../types';
|
|
3
|
+
interface HeaderProps {
|
|
4
4
|
windowSize: WindowSize;
|
|
5
5
|
colorMode: ColorMode;
|
|
6
|
-
|
|
6
|
+
brandIcon?: string;
|
|
7
7
|
collapse: () => void;
|
|
8
8
|
reset: () => void;
|
|
9
9
|
toggleSettings?: () => void;
|
|
10
10
|
isSettingsOpen: boolean;
|
|
11
11
|
}
|
|
12
|
-
export declare const
|
|
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
|
|
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
|
|
15
|
-
export
|
|
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
|
|
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
|
|
21
|
+
export declare const Messages: FC<MessagesProps>;
|
|
@@ -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 {
|
|
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,
|
|
12
|
+
export { TextButton, IconButton, BaseText, SmallText, DateInput, Carousel, CustomCard, CustomCardRow, CustomCardImageRow, Icons, };
|
|
12
13
|
export interface TouchpointInstance {
|
|
13
|
-
|
|
14
|
-
|
|
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';
|