@nlxai/touchpoint-ui 1.0.5-alpha.10 → 1.0.5-alpha.12
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/analyzePageForms.d.ts +31 -0
- package/lib/components/FullscreenVoice.d.ts +2 -0
- package/lib/components/Header.d.ts +6 -1
- package/lib/components/ui/CustomCard.d.ts +8 -0
- package/lib/index.d.ts +12 -1
- package/lib/index.js +7047 -6220
- package/lib/index.umd.js +49 -49
- package/lib/types.d.ts +5 -1
- package/package.json +4 -3
- package/tailwind.config.js +1 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accessibility information
|
|
3
|
+
*/
|
|
4
|
+
export type AccessibilityInformation = Record<string, any>;
|
|
5
|
+
/**
|
|
6
|
+
* Accessibility information with ID
|
|
7
|
+
*/
|
|
8
|
+
export interface InteractiveElementInfo extends AccessibilityInformation {
|
|
9
|
+
/**
|
|
10
|
+
* Form element ID (assigned by the analysis logic, not necessarily equal to the DOM ID)
|
|
11
|
+
*/
|
|
12
|
+
id: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Page forms with elements
|
|
16
|
+
*/
|
|
17
|
+
export interface PageForms {
|
|
18
|
+
/**
|
|
19
|
+
* Page context
|
|
20
|
+
*/
|
|
21
|
+
context: InteractiveElementInfo[];
|
|
22
|
+
/**
|
|
23
|
+
* Form element references
|
|
24
|
+
*/
|
|
25
|
+
formElements: Record<string, Element>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Analyze page forms
|
|
29
|
+
* @returns pageForms
|
|
30
|
+
*/
|
|
31
|
+
export declare const analyzePageForms: () => PageForms;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
1
|
+
import { SetStateAction, Dispatch, FC } from 'react';
|
|
2
2
|
import { WindowSize, ColorMode } from '../types';
|
|
3
3
|
interface HeaderProps {
|
|
4
4
|
windowSize: WindowSize | "embedded";
|
|
5
5
|
colorMode: ColorMode;
|
|
6
|
+
errorThemedCloseButton?: boolean;
|
|
7
|
+
speakerControls?: {
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
setEnabled: Dispatch<SetStateAction<boolean>>;
|
|
10
|
+
};
|
|
6
11
|
brandIcon?: string;
|
|
7
12
|
renderCollapse: boolean;
|
|
8
13
|
collapse: (event: Event) => void;
|
|
@@ -16,6 +16,14 @@ export interface CustomCardProps {
|
|
|
16
16
|
* Handler function for when the card is clicked
|
|
17
17
|
*/
|
|
18
18
|
onClick?: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Transform the card into an anchor tag with the href specified
|
|
21
|
+
*/
|
|
22
|
+
href?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Specify whether the URL should take the user to a new tab
|
|
25
|
+
*/
|
|
26
|
+
newTab?: boolean;
|
|
19
27
|
}
|
|
20
28
|
export declare const CustomCard: FC<CustomCardProps>;
|
|
21
29
|
export declare const CustomCardImageRow: FC<{
|
package/lib/index.d.ts
CHANGED
|
@@ -7,6 +7,17 @@ import { Carousel } from './components/ui/Carousel';
|
|
|
7
7
|
import { DateInput } from './components/ui/DateInput';
|
|
8
8
|
import { TouchpointConfiguration } from './types';
|
|
9
9
|
import * as Icons from "./components/ui/Icons";
|
|
10
|
+
export { analyzePageForms, type InteractiveElementInfo, type PageForms, type AccessibilityInformation, } from './analyzePageForms';
|
|
11
|
+
/**
|
|
12
|
+
* If you wish to build custom modalities using JSX, you will want to
|
|
13
|
+
*
|
|
14
|
+
* ```javascript
|
|
15
|
+
* import { React } from "@nlx/touchpoint-ui";
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* instead of importing from "react" directly. This ensures that the custom modalities will
|
|
19
|
+
* be running in the same React context as the Touchpoint UI using the correct version of React.
|
|
20
|
+
*/
|
|
10
21
|
export { default as React } from 'react';
|
|
11
22
|
export declare const html: (strings: TemplateStringsArray, ...values: any[]) => unknown;
|
|
12
23
|
export { TextButton, IconButton, BaseText, SmallText, DateInput, Carousel, CustomCard, CustomCardRow, CustomCardImageRow, Icons, };
|
|
@@ -14,7 +25,7 @@ export { type CustomCardProps, type CustomCardRowProps, } from './components/ui/
|
|
|
14
25
|
export { type DateInputProps } from './components/ui/DateInput';
|
|
15
26
|
export { type IconButtonProps, type IconButtonType, } from './components/ui/IconButton';
|
|
16
27
|
export { type TextButtonProps } from './components/ui/TextButton';
|
|
17
|
-
export { type InitializeConversation, type ColorMode, type Theme, type WindowSize, type CustomModalityComponent, type TouchpointConfiguration, } from './types';
|
|
28
|
+
export { type InitializeConversation, type ColorMode, type Input, type Theme, type WindowSize, type CustomModalityComponent, type TouchpointConfiguration, } from './types';
|
|
18
29
|
/**
|
|
19
30
|
* Instance of a Touchpoint UI component
|
|
20
31
|
*/
|