@tylertech/forge-ai-react 0.5.0 → 0.6.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/ForgeAiChatHeader.d.ts +3 -0
- package/dist/ForgeAiChatbot.d.ts +3 -0
- package/dist/ForgeAiChatbot.js +2 -0
- package/dist/ForgeAiChatbotToolCall.d.ts +3 -0
- package/dist/ForgeAiChatbotToolCall.js +3 -1
- package/dist/ForgeAiDropdownMenu.d.ts +4 -6
- package/dist/ForgeAiDropdownMenuItem.d.ts +1 -3
- package/dist/ForgeAiEventStreamViewer.d.ts +48 -0
- package/dist/ForgeAiEventStreamViewer.js +18 -0
- package/dist/ForgeAiFilePicker.d.ts +0 -4
- package/dist/ForgeAiIconButton.d.ts +51 -0
- package/dist/ForgeAiIconButton.js +21 -0
- package/dist/ForgeAiMessageThread.d.ts +3 -0
- package/dist/ForgeAiMessageThread.js +8 -1
- package/dist/ForgeAiOverlay.d.ts +4 -6
- package/dist/ForgeAiOverlay.js +2 -0
- package/dist/ForgeAiPaginator.d.ts +66 -0
- package/dist/ForgeAiPaginator.js +36 -0
- package/dist/ForgeAiPopover.d.ts +4 -6
- package/dist/ForgeAiPopover.js +2 -0
- package/dist/ForgeAiPrompt.d.ts +27 -4
- package/dist/ForgeAiPrompt.js +18 -1
- package/dist/ForgeAiResponseMessage.d.ts +3 -0
- package/dist/ForgeAiResponseMessage.js +2 -1
- package/dist/ForgeAiSlashCommandMenu.d.ts +68 -0
- package/dist/ForgeAiSlashCommandMenu.js +44 -0
- package/dist/ForgeAiSuggestions.d.ts +3 -0
- package/dist/ForgeAiThinkingIndicator.d.ts +9 -0
- package/dist/ForgeAiThinkingIndicator.js +6 -1
- package/dist/ForgeAiToolDataTable.d.ts +51 -0
- package/dist/ForgeAiToolDataTable.js +33 -0
- package/dist/ForgeAiTooltip.d.ts +2 -2
- package/dist/index.d.ts +11 -6
- package/dist/index.js +11 -6
- package/package.json +31 -31
|
@@ -96,6 +96,9 @@ export interface ForgeAiChatHeaderProps extends Pick<
|
|
|
96
96
|
* - **forge-ai-chat-header-expand** - Fired when the expand button is clicked
|
|
97
97
|
* - **forge-ai-chat-header-minimize** - Fired when the minimize button is clicked
|
|
98
98
|
*
|
|
99
|
+
* ### **Methods:**
|
|
100
|
+
* - **showAgentInfo(): _void_** - Shows the agent info modal
|
|
101
|
+
*
|
|
99
102
|
* ### **Slots:**
|
|
100
103
|
* - **icon** - Slot for custom icon (default: forge-ai-icon)
|
|
101
104
|
*/
|
package/dist/ForgeAiChatbot.d.ts
CHANGED
package/dist/ForgeAiChatbot.js
CHANGED
|
@@ -9,6 +9,7 @@ export const ForgeAiChatbot = forwardRef((props, forwardedRef) => {
|
|
|
9
9
|
showMinimizeButton,
|
|
10
10
|
expanded,
|
|
11
11
|
enableReactions,
|
|
12
|
+
debugMode,
|
|
12
13
|
fileUpload,
|
|
13
14
|
voiceInput,
|
|
14
15
|
placeholder,
|
|
@@ -85,6 +86,7 @@ export const ForgeAiChatbot = forwardRef((props, forwardedRef) => {
|
|
|
85
86
|
"show-minimize-button": props.showMinimizeButton ? true : undefined,
|
|
86
87
|
expanded: props.expanded ? true : undefined,
|
|
87
88
|
"enable-reactions": props.enableReactions ? true : undefined,
|
|
89
|
+
"debug-mode": props.debugMode ? true : undefined,
|
|
88
90
|
style: { ...props.style },
|
|
89
91
|
},
|
|
90
92
|
props.children,
|
|
@@ -21,6 +21,9 @@ export interface ForgeAiChatbotToolCallProps extends Pick<
|
|
|
21
21
|
| "onFocus"
|
|
22
22
|
| "onBlur"
|
|
23
23
|
> {
|
|
24
|
+
/** undefined */
|
|
25
|
+
debugMode?: boolean;
|
|
26
|
+
|
|
24
27
|
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
25
28
|
className?: string;
|
|
26
29
|
|
|
@@ -4,6 +4,7 @@ import { useEventListener } from "./react-utils.js";
|
|
|
4
4
|
|
|
5
5
|
export const ForgeAiChatbotToolCall = forwardRef((props, forwardedRef) => {
|
|
6
6
|
const ref = useRef(null);
|
|
7
|
+
const { debugMode, ...filteredProps } = props;
|
|
7
8
|
|
|
8
9
|
/** Event listeners - run once */
|
|
9
10
|
useEventListener(
|
|
@@ -23,12 +24,13 @@ export const ForgeAiChatbotToolCall = forwardRef((props, forwardedRef) => {
|
|
|
23
24
|
forwardedRef.current = node;
|
|
24
25
|
}
|
|
25
26
|
},
|
|
26
|
-
...
|
|
27
|
+
...filteredProps,
|
|
27
28
|
class: props.className,
|
|
28
29
|
exportparts: props.exportparts,
|
|
29
30
|
for: props.htmlFor,
|
|
30
31
|
part: props.part,
|
|
31
32
|
tabindex: props.tabIndex,
|
|
33
|
+
"debug-mode": props.debugMode ? true : undefined,
|
|
32
34
|
style: { ...props.style },
|
|
33
35
|
},
|
|
34
36
|
props.children,
|
|
@@ -92,11 +92,9 @@ Only applies to root-level menus; submenus always use 'right-start'. */
|
|
|
92
92
|
* - **end** - The end icon slot for additional trigger button content.
|
|
93
93
|
*
|
|
94
94
|
* ### **CSS Properties:**
|
|
95
|
-
* - **--ai-dropdown-menu-min-width** - Minimum width of the dropdown menu. _(default: undefined)_
|
|
96
|
-
* - **--ai-dropdown-menu-max-width** - Maximum width of the dropdown menu. _(default: undefined)_
|
|
97
|
-
* - **--ai-dropdown-menu-max-height** - Maximum height of the dropdown menu. _(default: undefined)_
|
|
98
|
-
* - **--ai-dropdown-menu-padding** - Padding inside the dropdown menu. _(default: undefined)_
|
|
99
|
-
* - **--ai-dropdown-menu-trigger-width** - The width of the trigger button. _(default: undefined)_
|
|
100
|
-
* - **--ai-dropdown-menu-trigger-height** - The height of the trigger button. _(default: undefined)_
|
|
95
|
+
* - **--forge-ai-dropdown-menu-min-width** - Minimum width of the dropdown menu. _(default: undefined)_
|
|
96
|
+
* - **--forge-ai-dropdown-menu-max-width** - Maximum width of the dropdown menu. _(default: undefined)_
|
|
97
|
+
* - **--forge-ai-dropdown-menu-max-height** - Maximum height of the dropdown menu. _(default: undefined)_
|
|
98
|
+
* - **--forge-ai-dropdown-menu-padding** - Padding inside the dropdown menu. _(default: undefined)_
|
|
101
99
|
*/
|
|
102
100
|
export const ForgeAiDropdownMenu: React.ForwardRefExoticComponent<ForgeAiDropdownMenuProps>;
|
|
@@ -81,8 +81,6 @@ This is typically set by the parent dropdown menu component. */
|
|
|
81
81
|
* - **submenu** - The slot for nested dropdown menu components.
|
|
82
82
|
*
|
|
83
83
|
* ### **CSS Properties:**
|
|
84
|
-
* - **--ai-dropdown-menu-item-
|
|
85
|
-
* - **--ai-dropdown-menu-item-submenu-close-delay** - Delay before closing submenu when mouse leaves. _(default: undefined)_
|
|
86
|
-
* - **--ai-dropdown-menu-item-selection-icon-size** - Size of selection and submenu icons. _(default: undefined)_
|
|
84
|
+
* - **--forge-ai-dropdown-menu-item-selection-icon-size** - Size of selection and submenu icons. _(default: undefined)_
|
|
87
85
|
*/
|
|
88
86
|
export const ForgeAiDropdownMenuItem: React.ForwardRefExoticComponent<ForgeAiDropdownMenuItemProps>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ForgeAiEventStreamViewer as ForgeAiEventStreamViewerElement } from "@tylertech/forge-ai/ai-event-stream-viewer";
|
|
3
|
+
|
|
4
|
+
export type { ForgeAiEventStreamViewerElement };
|
|
5
|
+
|
|
6
|
+
export interface ForgeAiEventStreamViewerProps extends Pick<
|
|
7
|
+
React.AllHTMLAttributes<HTMLElement>,
|
|
8
|
+
| "children"
|
|
9
|
+
| "dir"
|
|
10
|
+
| "hidden"
|
|
11
|
+
| "id"
|
|
12
|
+
| "lang"
|
|
13
|
+
| "slot"
|
|
14
|
+
| "style"
|
|
15
|
+
| "title"
|
|
16
|
+
| "translate"
|
|
17
|
+
| "onClick"
|
|
18
|
+
| "onFocus"
|
|
19
|
+
| "onBlur"
|
|
20
|
+
> {
|
|
21
|
+
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
22
|
+
className?: string;
|
|
23
|
+
|
|
24
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
25
|
+
exportparts?: string;
|
|
26
|
+
|
|
27
|
+
/** Used for labels to link them with their inputs (using input id). */
|
|
28
|
+
htmlFor?: string;
|
|
29
|
+
|
|
30
|
+
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
31
|
+
key?: number | string;
|
|
32
|
+
|
|
33
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
34
|
+
part?: string;
|
|
35
|
+
|
|
36
|
+
/** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
|
|
37
|
+
ref?: any;
|
|
38
|
+
|
|
39
|
+
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
40
|
+
tabIndex?: number;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Displays a timeline of adapter events with expandable JSON data.
|
|
45
|
+
* ---
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
export const ForgeAiEventStreamViewer: React.ForwardRefExoticComponent<ForgeAiEventStreamViewerProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import "@tylertech/forge-ai/ai-event-stream-viewer";
|
|
3
|
+
|
|
4
|
+
export const ForgeAiEventStreamViewer = forwardRef((props, forwardedRef) => {
|
|
5
|
+
return React.createElement(
|
|
6
|
+
"forge-ai-event-stream-viewer",
|
|
7
|
+
{
|
|
8
|
+
...props,
|
|
9
|
+
class: props.className,
|
|
10
|
+
exportparts: props.exportparts,
|
|
11
|
+
for: props.htmlFor,
|
|
12
|
+
part: props.part,
|
|
13
|
+
tabindex: props.tabIndex,
|
|
14
|
+
style: { ...props.style },
|
|
15
|
+
},
|
|
16
|
+
props.children,
|
|
17
|
+
);
|
|
18
|
+
});
|
|
@@ -81,9 +81,5 @@ export interface ForgeAiFilePickerProps extends Pick<
|
|
|
81
81
|
* ### **Slots:**
|
|
82
82
|
* - _default_ - The default slot for button content when no file is selected.
|
|
83
83
|
* - **icon** - The icon slot for icon-button variant.
|
|
84
|
-
*
|
|
85
|
-
* ### **CSS Properties:**
|
|
86
|
-
* - **--ai-file-picker-width** - The width of the file picker button. _(default: undefined)_
|
|
87
|
-
* - **--ai-file-picker-height** - The height of the file picker button. _(default: undefined)_
|
|
88
84
|
*/
|
|
89
85
|
export const ForgeAiFilePicker: React.ForwardRefExoticComponent<ForgeAiFilePickerProps>;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ForgeAiIconButton as ForgeAiIconButtonElement } from "@tylertech/forge-ai/ai-icon-button";
|
|
3
|
+
|
|
4
|
+
export type { ForgeAiIconButtonElement };
|
|
5
|
+
|
|
6
|
+
export interface ForgeAiIconButtonProps extends Pick<
|
|
7
|
+
React.AllHTMLAttributes<HTMLElement>,
|
|
8
|
+
| "children"
|
|
9
|
+
| "dir"
|
|
10
|
+
| "hidden"
|
|
11
|
+
| "id"
|
|
12
|
+
| "lang"
|
|
13
|
+
| "slot"
|
|
14
|
+
| "style"
|
|
15
|
+
| "title"
|
|
16
|
+
| "translate"
|
|
17
|
+
| "onClick"
|
|
18
|
+
| "onFocus"
|
|
19
|
+
| "onBlur"
|
|
20
|
+
> {
|
|
21
|
+
/** Whether the button is disabled */
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
|
|
24
|
+
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
25
|
+
className?: string;
|
|
26
|
+
|
|
27
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
28
|
+
exportparts?: string;
|
|
29
|
+
|
|
30
|
+
/** Used for labels to link them with their inputs (using input id). */
|
|
31
|
+
htmlFor?: string;
|
|
32
|
+
|
|
33
|
+
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
34
|
+
key?: number | string;
|
|
35
|
+
|
|
36
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
37
|
+
part?: string;
|
|
38
|
+
|
|
39
|
+
/** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
|
|
40
|
+
ref?: any;
|
|
41
|
+
|
|
42
|
+
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
43
|
+
tabIndex?: number;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* ---
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export const ForgeAiIconButton: React.ForwardRefExoticComponent<ForgeAiIconButtonProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { forwardRef } from "react";
|
|
2
|
+
import "@tylertech/forge-ai/ai-icon-button";
|
|
3
|
+
|
|
4
|
+
export const ForgeAiIconButton = forwardRef((props, forwardedRef) => {
|
|
5
|
+
const { disabled, ...filteredProps } = props;
|
|
6
|
+
|
|
7
|
+
return React.createElement(
|
|
8
|
+
"forge-ai-icon-button",
|
|
9
|
+
{
|
|
10
|
+
...filteredProps,
|
|
11
|
+
class: props.className,
|
|
12
|
+
exportparts: props.exportparts,
|
|
13
|
+
for: props.htmlFor,
|
|
14
|
+
part: props.part,
|
|
15
|
+
tabindex: props.tabIndex,
|
|
16
|
+
disabled: props.disabled ? true : undefined,
|
|
17
|
+
style: { ...props.style },
|
|
18
|
+
},
|
|
19
|
+
props.children,
|
|
20
|
+
);
|
|
21
|
+
});
|
|
@@ -4,7 +4,13 @@ import { useEventListener } from "./react-utils.js";
|
|
|
4
4
|
|
|
5
5
|
export const ForgeAiMessageThread = forwardRef((props, forwardedRef) => {
|
|
6
6
|
const ref = useRef(null);
|
|
7
|
-
const {
|
|
7
|
+
const {
|
|
8
|
+
enableReactions,
|
|
9
|
+
showThinking,
|
|
10
|
+
debugMode,
|
|
11
|
+
autoScroll,
|
|
12
|
+
...filteredProps
|
|
13
|
+
} = props;
|
|
8
14
|
|
|
9
15
|
/** Event listeners - run once */
|
|
10
16
|
useEventListener(
|
|
@@ -48,6 +54,7 @@ export const ForgeAiMessageThread = forwardRef((props, forwardedRef) => {
|
|
|
48
54
|
tabindex: props.tabIndex,
|
|
49
55
|
"enable-reactions": props.enableReactions ? true : undefined,
|
|
50
56
|
"show-thinking": props.showThinking ? true : undefined,
|
|
57
|
+
"debug-mode": props.debugMode ? true : undefined,
|
|
51
58
|
style: { ...props.style },
|
|
52
59
|
},
|
|
53
60
|
props.children,
|
package/dist/ForgeAiOverlay.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ export interface ForgeAiOverlayProps extends Pick<
|
|
|
36
36
|
/** The arrow element to position relative to the overlay. */
|
|
37
37
|
arrowElement?: ForgeAiOverlayElement["arrowElement"];
|
|
38
38
|
|
|
39
|
+
/** The offset of the overlay from the anchor element.
|
|
40
|
+
Can be a number (main axis offset) or an object with mainAxis, crossAxis, and alignmentAxis properties. */
|
|
41
|
+
offset?: ForgeAiOverlayElement["offset"];
|
|
42
|
+
|
|
39
43
|
/** The dismiss mode for the overlay.
|
|
40
44
|
- 'auto': Automatically closes on outside clicks and Escape key
|
|
41
45
|
- 'manual': Requires manual control to close */
|
|
@@ -70,11 +74,5 @@ export interface ForgeAiOverlayProps extends Pick<
|
|
|
70
74
|
*
|
|
71
75
|
* ### **Slots:**
|
|
72
76
|
* - _default_ - The default slot for overlay content.
|
|
73
|
-
*
|
|
74
|
-
* ### **CSS Properties:**
|
|
75
|
-
* - **--ai-overlay-max-width** - The maximum width of the overlay. _(default: undefined)_
|
|
76
|
-
* - **--ai-overlay-max-height** - The maximum height of the overlay. _(default: undefined)_
|
|
77
|
-
* - **--ai-overlay-min-width** - The minimum width of the overlay. _(default: undefined)_
|
|
78
|
-
* - **--ai-overlay-min-height** - The minimum height of the overlay. _(default: undefined)_
|
|
79
77
|
*/
|
|
80
78
|
export const ForgeAiOverlay: React.ForwardRefExoticComponent<ForgeAiOverlayProps>;
|
package/dist/ForgeAiOverlay.js
CHANGED
|
@@ -9,6 +9,7 @@ export const ForgeAiOverlay = forwardRef((props, forwardedRef) => {
|
|
|
9
9
|
anchor,
|
|
10
10
|
placement,
|
|
11
11
|
arrowElement,
|
|
12
|
+
offset,
|
|
12
13
|
dismissMode,
|
|
13
14
|
...filteredProps
|
|
14
15
|
} = props;
|
|
@@ -20,6 +21,7 @@ export const ForgeAiOverlay = forwardRef((props, forwardedRef) => {
|
|
|
20
21
|
anchor: props.anchor,
|
|
21
22
|
placement: props.placement,
|
|
22
23
|
arrowElement: props.arrowElement,
|
|
24
|
+
offset: props.offset,
|
|
23
25
|
"dismiss-mode": props.dismissMode || props["dismiss-mode"],
|
|
24
26
|
class: props.className,
|
|
25
27
|
exportparts: props.exportparts,
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import {
|
|
3
|
+
ForgeAiPaginator as ForgeAiPaginatorElement,
|
|
4
|
+
CustomEvent,
|
|
5
|
+
} from "@tylertech/forge-ai/tools/ai-paginator";
|
|
6
|
+
|
|
7
|
+
export type { ForgeAiPaginatorElement, CustomEvent };
|
|
8
|
+
|
|
9
|
+
export interface ForgeAiPaginatorProps extends Pick<
|
|
10
|
+
React.AllHTMLAttributes<HTMLElement>,
|
|
11
|
+
| "children"
|
|
12
|
+
| "dir"
|
|
13
|
+
| "hidden"
|
|
14
|
+
| "id"
|
|
15
|
+
| "lang"
|
|
16
|
+
| "slot"
|
|
17
|
+
| "style"
|
|
18
|
+
| "title"
|
|
19
|
+
| "translate"
|
|
20
|
+
| "onClick"
|
|
21
|
+
| "onFocus"
|
|
22
|
+
| "onBlur"
|
|
23
|
+
> {
|
|
24
|
+
/** undefined */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
|
|
27
|
+
/** undefined */
|
|
28
|
+
currentPage?: ForgeAiPaginatorElement["currentPage"];
|
|
29
|
+
|
|
30
|
+
/** undefined */
|
|
31
|
+
totalPages?: ForgeAiPaginatorElement["totalPages"];
|
|
32
|
+
|
|
33
|
+
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
34
|
+
className?: string;
|
|
35
|
+
|
|
36
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
37
|
+
exportparts?: string;
|
|
38
|
+
|
|
39
|
+
/** Used for labels to link them with their inputs (using input id). */
|
|
40
|
+
htmlFor?: string;
|
|
41
|
+
|
|
42
|
+
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
43
|
+
key?: number | string;
|
|
44
|
+
|
|
45
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
46
|
+
part?: string;
|
|
47
|
+
|
|
48
|
+
/** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
|
|
49
|
+
ref?: any;
|
|
50
|
+
|
|
51
|
+
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
52
|
+
tabIndex?: number;
|
|
53
|
+
|
|
54
|
+
/** undefined */
|
|
55
|
+
onPageChange?: (event: CustomEvent) => void;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* ---
|
|
61
|
+
*
|
|
62
|
+
*
|
|
63
|
+
* ### **Events:**
|
|
64
|
+
* - **page-change**
|
|
65
|
+
*/
|
|
66
|
+
export const ForgeAiPaginator: React.ForwardRefExoticComponent<ForgeAiPaginatorProps>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
2
|
+
import "@tylertech/forge-ai/tools/ai-paginator";
|
|
3
|
+
import { useEventListener } from "./react-utils.js";
|
|
4
|
+
|
|
5
|
+
export const ForgeAiPaginator = forwardRef((props, forwardedRef) => {
|
|
6
|
+
const ref = useRef(null);
|
|
7
|
+
const { disabled, currentPage, totalPages, ...filteredProps } = props;
|
|
8
|
+
|
|
9
|
+
/** Event listeners - run once */
|
|
10
|
+
useEventListener(ref, "page-change", props.onPageChange);
|
|
11
|
+
|
|
12
|
+
return React.createElement(
|
|
13
|
+
"forge-ai-paginator",
|
|
14
|
+
{
|
|
15
|
+
ref: (node) => {
|
|
16
|
+
ref.current = node;
|
|
17
|
+
if (typeof forwardedRef === "function") {
|
|
18
|
+
forwardedRef(node);
|
|
19
|
+
} else if (forwardedRef) {
|
|
20
|
+
forwardedRef.current = node;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
...filteredProps,
|
|
24
|
+
"current-page": props.currentPage || props["current-page"],
|
|
25
|
+
"total-pages": props.totalPages || props["total-pages"],
|
|
26
|
+
class: props.className,
|
|
27
|
+
exportparts: props.exportparts,
|
|
28
|
+
for: props.htmlFor,
|
|
29
|
+
part: props.part,
|
|
30
|
+
tabindex: props.tabIndex,
|
|
31
|
+
disabled: props.disabled ? true : undefined,
|
|
32
|
+
style: { ...props.style },
|
|
33
|
+
},
|
|
34
|
+
props.children,
|
|
35
|
+
);
|
|
36
|
+
});
|
package/dist/ForgeAiPopover.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ export interface ForgeAiPopoverProps extends Pick<
|
|
|
36
36
|
/** The placement of the popover relative to the anchor. */
|
|
37
37
|
placement?: ForgeAiPopoverElement["placement"];
|
|
38
38
|
|
|
39
|
+
/** The offset of the popover from the anchor element.
|
|
40
|
+
Can be a number (main axis offset) or an object with mainAxis, crossAxis, and alignmentAxis properties. */
|
|
41
|
+
offset?: ForgeAiPopoverElement["offset"];
|
|
42
|
+
|
|
39
43
|
/** The dismiss mode for the popover.
|
|
40
44
|
- 'auto': Automatically closes on outside clicks and Escape key
|
|
41
45
|
- 'manual': Requires manual control to close */
|
|
@@ -70,11 +74,5 @@ export interface ForgeAiPopoverProps extends Pick<
|
|
|
70
74
|
*
|
|
71
75
|
* ### **Slots:**
|
|
72
76
|
* - _default_ - The default slot for popover content.
|
|
73
|
-
*
|
|
74
|
-
* ### **CSS Properties:**
|
|
75
|
-
* - **--ai-popover-max-width** - The maximum width of the popover. _(default: undefined)_
|
|
76
|
-
* - **--ai-popover-max-height** - The maximum height of the popover. _(default: undefined)_
|
|
77
|
-
* - **--ai-popover-min-width** - The minimum width of the popover. _(default: undefined)_
|
|
78
|
-
* - **--ai-popover-min-height** - The minimum height of the popover. _(default: undefined)_
|
|
79
77
|
*/
|
|
80
78
|
export const ForgeAiPopover: React.ForwardRefExoticComponent<ForgeAiPopoverProps>;
|
package/dist/ForgeAiPopover.js
CHANGED
|
@@ -9,6 +9,7 @@ export const ForgeAiPopover = forwardRef((props, forwardedRef) => {
|
|
|
9
9
|
arrow,
|
|
10
10
|
anchor,
|
|
11
11
|
placement,
|
|
12
|
+
offset,
|
|
12
13
|
dismissMode,
|
|
13
14
|
...filteredProps
|
|
14
15
|
} = props;
|
|
@@ -19,6 +20,7 @@ export const ForgeAiPopover = forwardRef((props, forwardedRef) => {
|
|
|
19
20
|
...filteredProps,
|
|
20
21
|
anchor: props.anchor,
|
|
21
22
|
placement: props.placement,
|
|
23
|
+
offset: props.offset,
|
|
22
24
|
"dismiss-mode": props.dismissMode || props["dismiss-mode"],
|
|
23
25
|
class: props.className,
|
|
24
26
|
exportparts: props.exportparts,
|
package/dist/ForgeAiPrompt.d.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
ForgeAiPrompt as ForgeAiPromptElement,
|
|
4
|
+
Event,
|
|
5
|
+
CustomEvent,
|
|
6
|
+
} from "@tylertech/forge-ai/ai-prompt";
|
|
3
7
|
|
|
4
|
-
export type { ForgeAiPromptElement };
|
|
8
|
+
export type { ForgeAiPromptElement, Event, CustomEvent };
|
|
5
9
|
|
|
6
10
|
export interface ForgeAiPromptProps extends Pick<
|
|
7
11
|
React.AllHTMLAttributes<HTMLElement>,
|
|
@@ -33,6 +37,9 @@ export interface ForgeAiPromptProps extends Pick<
|
|
|
33
37
|
/** Whether the component is in running state (shows stop button instead of send button) */
|
|
34
38
|
running?: boolean;
|
|
35
39
|
|
|
40
|
+
/** Whether debug mode is active (shows debug icon button) */
|
|
41
|
+
debugMode?: boolean;
|
|
42
|
+
|
|
36
43
|
/** Placeholder text for the textarea field */
|
|
37
44
|
placeholder?: ForgeAiPromptElement["placeholder"];
|
|
38
45
|
|
|
@@ -63,6 +70,15 @@ export interface ForgeAiPromptProps extends Pick<
|
|
|
63
70
|
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
64
71
|
tabIndex?: number;
|
|
65
72
|
|
|
73
|
+
/** Available slash commands */
|
|
74
|
+
slashCommands?: ForgeAiPromptElement["slashCommands"];
|
|
75
|
+
|
|
76
|
+
/** undefined */
|
|
77
|
+
onInput?: (event: CustomEvent) => void;
|
|
78
|
+
|
|
79
|
+
/** undefined */
|
|
80
|
+
onForgeAiPromptCommand?: (event: CustomEvent) => void;
|
|
81
|
+
|
|
66
82
|
/** Fired when the send button is clicked or Enter is pressed (without Shift). Cancelable - if cancelled, running state is not set and input is not cleared. */
|
|
67
83
|
onForgeAiPromptSend?: (
|
|
68
84
|
event: CustomEvent<CustomEvent<ForgeAiPromptSendEventData>>,
|
|
@@ -78,6 +94,9 @@ export interface ForgeAiPromptProps extends Pick<
|
|
|
78
94
|
|
|
79
95
|
/** Fired when the stop button is clicked. Cancelable - if cancelled, running state remains true. */
|
|
80
96
|
onForgeAiPromptStop?: (event: CustomEvent<CustomEvent<void>>) => void;
|
|
97
|
+
|
|
98
|
+
/** Fired when the debug icon button is clicked. */
|
|
99
|
+
onForgeAiPromptDebugToggle?: (event: CustomEvent<CustomEvent<void>>) => void;
|
|
81
100
|
}
|
|
82
101
|
|
|
83
102
|
/**
|
|
@@ -86,13 +105,17 @@ export interface ForgeAiPromptProps extends Pick<
|
|
|
86
105
|
*
|
|
87
106
|
*
|
|
88
107
|
* ### **Events:**
|
|
89
|
-
* - **
|
|
108
|
+
* - **input**
|
|
109
|
+
* - **forge-ai-prompt-command**
|
|
110
|
+
* - **forge-ai-prompt-send** - Fired when the send button is clicked or Enter is pressed (without Shift). Cancelable - if cancelled, running state is not set and input is not cleared.
|
|
90
111
|
* - **forge-ai-prompt-cancel** - Fired when the Escape key is pressed (if cancelOnEscape is true).
|
|
91
112
|
* - **forge-ai-prompt-attachment** - Fired when files are pasted into the textarea.
|
|
92
113
|
* - **forge-ai-prompt-stop** - Fired when the stop button is clicked. Cancelable - if cancelled, running state remains true.
|
|
114
|
+
* - **forge-ai-prompt-debug-toggle** - Fired when the debug icon button is clicked.
|
|
93
115
|
*
|
|
94
116
|
* ### **Methods:**
|
|
95
|
-
* - **
|
|
117
|
+
* - **closeSlashMenu(): _void_** - Closes the slash command menu
|
|
118
|
+
* - **focus(): _void_** - Focuses the textarea element
|
|
96
119
|
*
|
|
97
120
|
* ### **Slots:**
|
|
98
121
|
* - **actions** - Slot for action components that are hidden in inline mode (voice input, file picker, model selectors, web search, etc.)
|
package/dist/ForgeAiPrompt.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef, useRef, useEffect } from "react";
|
|
2
2
|
import "@tylertech/forge-ai/ai-prompt";
|
|
3
|
-
import { useEventListener } from "./react-utils.js";
|
|
3
|
+
import { useEventListener, useProperties } from "./react-utils.js";
|
|
4
4
|
|
|
5
5
|
export const ForgeAiPrompt = forwardRef((props, forwardedRef) => {
|
|
6
6
|
const ref = useRef(null);
|
|
@@ -10,13 +10,21 @@ export const ForgeAiPrompt = forwardRef((props, forwardedRef) => {
|
|
|
10
10
|
inputDisabled,
|
|
11
11
|
cancelOnEscape,
|
|
12
12
|
running,
|
|
13
|
+
debugMode,
|
|
13
14
|
placeholder,
|
|
14
15
|
value,
|
|
15
16
|
variant,
|
|
17
|
+
slashCommands,
|
|
16
18
|
...filteredProps
|
|
17
19
|
} = props;
|
|
18
20
|
|
|
19
21
|
/** Event listeners - run once */
|
|
22
|
+
useEventListener(ref, "input", props.onInput);
|
|
23
|
+
useEventListener(
|
|
24
|
+
ref,
|
|
25
|
+
"forge-ai-prompt-command",
|
|
26
|
+
props.onForgeAiPromptCommand,
|
|
27
|
+
);
|
|
20
28
|
useEventListener(ref, "forge-ai-prompt-send", props.onForgeAiPromptSend);
|
|
21
29
|
useEventListener(ref, "forge-ai-prompt-cancel", props.onForgeAiPromptCancel);
|
|
22
30
|
useEventListener(
|
|
@@ -25,6 +33,14 @@ export const ForgeAiPrompt = forwardRef((props, forwardedRef) => {
|
|
|
25
33
|
props.onForgeAiPromptAttachment,
|
|
26
34
|
);
|
|
27
35
|
useEventListener(ref, "forge-ai-prompt-stop", props.onForgeAiPromptStop);
|
|
36
|
+
useEventListener(
|
|
37
|
+
ref,
|
|
38
|
+
"forge-ai-prompt-debug-toggle",
|
|
39
|
+
props.onForgeAiPromptDebugToggle,
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
/** Properties - run whenever a property has changed */
|
|
43
|
+
useProperties(ref, "slashCommands", props.slashCommands);
|
|
28
44
|
|
|
29
45
|
return React.createElement(
|
|
30
46
|
"forge-ai-prompt",
|
|
@@ -51,6 +67,7 @@ export const ForgeAiPrompt = forwardRef((props, forwardedRef) => {
|
|
|
51
67
|
"input-disabled": props.inputDisabled ? true : undefined,
|
|
52
68
|
"cancel-on-escape": props.cancelOnEscape ? true : undefined,
|
|
53
69
|
running: props.running ? true : undefined,
|
|
70
|
+
"debug-mode": props.debugMode ? true : undefined,
|
|
54
71
|
style: { ...props.style },
|
|
55
72
|
},
|
|
56
73
|
props.children,
|
|
@@ -24,6 +24,9 @@ export interface ForgeAiResponseMessageProps extends Pick<
|
|
|
24
24
|
/** undefined */
|
|
25
25
|
enableReactions?: boolean;
|
|
26
26
|
|
|
27
|
+
/** undefined */
|
|
28
|
+
hasDebugData?: boolean;
|
|
29
|
+
|
|
27
30
|
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
28
31
|
className?: string;
|
|
29
32
|
|
|
@@ -4,7 +4,7 @@ import { useEventListener } from "./react-utils.js";
|
|
|
4
4
|
|
|
5
5
|
export const ForgeAiResponseMessage = forwardRef((props, forwardedRef) => {
|
|
6
6
|
const ref = useRef(null);
|
|
7
|
-
const { complete, enableReactions, ...filteredProps } = props;
|
|
7
|
+
const { complete, enableReactions, hasDebugData, ...filteredProps } = props;
|
|
8
8
|
|
|
9
9
|
/** Event listeners - run once */
|
|
10
10
|
useEventListener(
|
|
@@ -47,6 +47,7 @@ export const ForgeAiResponseMessage = forwardRef((props, forwardedRef) => {
|
|
|
47
47
|
tabindex: props.tabIndex,
|
|
48
48
|
complete: props.complete ? true : undefined,
|
|
49
49
|
"enable-reactions": props.enableReactions ? true : undefined,
|
|
50
|
+
"has-debug-data": props.hasDebugData ? true : undefined,
|
|
50
51
|
style: { ...props.style },
|
|
51
52
|
},
|
|
52
53
|
props.children,
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ForgeAiSlashCommandMenu as ForgeAiSlashCommandMenuElement } from "@tylertech/forge-ai/ai-slash-command-menu";
|
|
3
|
+
|
|
4
|
+
export type { ForgeAiSlashCommandMenuElement };
|
|
5
|
+
|
|
6
|
+
export interface ForgeAiSlashCommandMenuProps extends Pick<
|
|
7
|
+
React.AllHTMLAttributes<HTMLElement>,
|
|
8
|
+
| "children"
|
|
9
|
+
| "dir"
|
|
10
|
+
| "hidden"
|
|
11
|
+
| "id"
|
|
12
|
+
| "lang"
|
|
13
|
+
| "slot"
|
|
14
|
+
| "style"
|
|
15
|
+
| "title"
|
|
16
|
+
| "translate"
|
|
17
|
+
| "onClick"
|
|
18
|
+
| "onFocus"
|
|
19
|
+
| "onBlur"
|
|
20
|
+
> {
|
|
21
|
+
/** undefined */
|
|
22
|
+
open?: boolean;
|
|
23
|
+
|
|
24
|
+
/** undefined */
|
|
25
|
+
filterQuery?: ForgeAiSlashCommandMenuElement["filterQuery"];
|
|
26
|
+
|
|
27
|
+
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
28
|
+
className?: string;
|
|
29
|
+
|
|
30
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
31
|
+
exportparts?: string;
|
|
32
|
+
|
|
33
|
+
/** Used for labels to link them with their inputs (using input id). */
|
|
34
|
+
htmlFor?: string;
|
|
35
|
+
|
|
36
|
+
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
37
|
+
key?: number | string;
|
|
38
|
+
|
|
39
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
40
|
+
part?: string;
|
|
41
|
+
|
|
42
|
+
/** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
|
|
43
|
+
ref?: any;
|
|
44
|
+
|
|
45
|
+
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
46
|
+
tabIndex?: number;
|
|
47
|
+
|
|
48
|
+
/** Fired when a command is selected. */
|
|
49
|
+
onForgeAiSlashCommandMenuSelect?: (
|
|
50
|
+
event: CustomEvent<CustomEvent<ForgeAiSlashCommandMenuSelectEventData>>,
|
|
51
|
+
) => void;
|
|
52
|
+
|
|
53
|
+
/** Fired when the menu should close. */
|
|
54
|
+
onForgeAiSlashCommandMenuClose?: (
|
|
55
|
+
event: CustomEvent<CustomEvent<void>>,
|
|
56
|
+
) => void;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
* ---
|
|
62
|
+
*
|
|
63
|
+
*
|
|
64
|
+
* ### **Events:**
|
|
65
|
+
* - **forge-ai-slash-command-menu-select** - Fired when a command is selected.
|
|
66
|
+
* - **forge-ai-slash-command-menu-close** - Fired when the menu should close.
|
|
67
|
+
*/
|
|
68
|
+
export const ForgeAiSlashCommandMenu: React.ForwardRefExoticComponent<ForgeAiSlashCommandMenuProps>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
2
|
+
import "@tylertech/forge-ai/ai-slash-command-menu";
|
|
3
|
+
import { useEventListener } from "./react-utils.js";
|
|
4
|
+
|
|
5
|
+
export const ForgeAiSlashCommandMenu = forwardRef((props, forwardedRef) => {
|
|
6
|
+
const ref = useRef(null);
|
|
7
|
+
const { open, filterQuery, ...filteredProps } = props;
|
|
8
|
+
|
|
9
|
+
/** Event listeners - run once */
|
|
10
|
+
useEventListener(
|
|
11
|
+
ref,
|
|
12
|
+
"forge-ai-slash-command-menu-select",
|
|
13
|
+
props.onForgeAiSlashCommandMenuSelect,
|
|
14
|
+
);
|
|
15
|
+
useEventListener(
|
|
16
|
+
ref,
|
|
17
|
+
"forge-ai-slash-command-menu-close",
|
|
18
|
+
props.onForgeAiSlashCommandMenuClose,
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
return React.createElement(
|
|
22
|
+
"forge-ai-slash-command-menu",
|
|
23
|
+
{
|
|
24
|
+
ref: (node) => {
|
|
25
|
+
ref.current = node;
|
|
26
|
+
if (typeof forwardedRef === "function") {
|
|
27
|
+
forwardedRef(node);
|
|
28
|
+
} else if (forwardedRef) {
|
|
29
|
+
forwardedRef.current = node;
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
...filteredProps,
|
|
33
|
+
"filter-query": props.filterQuery || props["filter-query"],
|
|
34
|
+
class: props.className,
|
|
35
|
+
exportparts: props.exportparts,
|
|
36
|
+
for: props.htmlFor,
|
|
37
|
+
part: props.part,
|
|
38
|
+
tabindex: props.tabIndex,
|
|
39
|
+
open: props.open ? true : undefined,
|
|
40
|
+
style: { ...props.style },
|
|
41
|
+
},
|
|
42
|
+
props.children,
|
|
43
|
+
);
|
|
44
|
+
});
|
|
@@ -58,5 +58,8 @@ export interface ForgeAiSuggestionsProps extends Pick<
|
|
|
58
58
|
*
|
|
59
59
|
* ### **Events:**
|
|
60
60
|
* - **forge-ai-suggestions-select** - Fired when a suggestion is selected.
|
|
61
|
+
*
|
|
62
|
+
* ### **CSS Properties:**
|
|
63
|
+
* - **--forge-ai-suggestion-max-width** - The maximum width of the suggestion buttons in inline layout. _(default: undefined)_
|
|
61
64
|
*/
|
|
62
65
|
export const ForgeAiSuggestions: React.ForwardRefExoticComponent<ForgeAiSuggestionsProps>;
|
|
@@ -18,6 +18,15 @@ export interface ForgeAiThinkingIndicatorProps extends Pick<
|
|
|
18
18
|
| "onFocus"
|
|
19
19
|
| "onBlur"
|
|
20
20
|
> {
|
|
21
|
+
/** undefined */
|
|
22
|
+
showText?: boolean;
|
|
23
|
+
|
|
24
|
+
/** undefined */
|
|
25
|
+
initialDelay?: ForgeAiThinkingIndicatorElement["initialDelay"];
|
|
26
|
+
|
|
27
|
+
/** undefined */
|
|
28
|
+
cycleInterval?: ForgeAiThinkingIndicatorElement["cycleInterval"];
|
|
29
|
+
|
|
21
30
|
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
22
31
|
className?: string;
|
|
23
32
|
|
|
@@ -2,15 +2,20 @@ import React, { forwardRef } from "react";
|
|
|
2
2
|
import "@tylertech/forge-ai/ai-thinking-indicator";
|
|
3
3
|
|
|
4
4
|
export const ForgeAiThinkingIndicator = forwardRef((props, forwardedRef) => {
|
|
5
|
+
const { showText, initialDelay, cycleInterval, ...filteredProps } = props;
|
|
6
|
+
|
|
5
7
|
return React.createElement(
|
|
6
8
|
"forge-ai-thinking-indicator",
|
|
7
9
|
{
|
|
8
|
-
...
|
|
10
|
+
...filteredProps,
|
|
11
|
+
"initial-delay": props.initialDelay || props["initial-delay"],
|
|
12
|
+
"cycle-interval": props.cycleInterval || props["cycle-interval"],
|
|
9
13
|
class: props.className,
|
|
10
14
|
exportparts: props.exportparts,
|
|
11
15
|
for: props.htmlFor,
|
|
12
16
|
part: props.part,
|
|
13
17
|
tabindex: props.tabIndex,
|
|
18
|
+
"show-text": props.showText ? true : undefined,
|
|
14
19
|
style: { ...props.style },
|
|
15
20
|
},
|
|
16
21
|
props.children,
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ForgeAiToolDataTable as ForgeAiToolDataTableElement } from "@tylertech/forge-ai/tools/ai-data-table";
|
|
3
|
+
|
|
4
|
+
export type { ForgeAiToolDataTableElement };
|
|
5
|
+
|
|
6
|
+
export interface ForgeAiToolDataTableProps extends Pick<
|
|
7
|
+
React.AllHTMLAttributes<HTMLElement>,
|
|
8
|
+
| "children"
|
|
9
|
+
| "dir"
|
|
10
|
+
| "hidden"
|
|
11
|
+
| "id"
|
|
12
|
+
| "lang"
|
|
13
|
+
| "slot"
|
|
14
|
+
| "style"
|
|
15
|
+
| "title"
|
|
16
|
+
| "translate"
|
|
17
|
+
| "onClick"
|
|
18
|
+
| "onFocus"
|
|
19
|
+
| "onBlur"
|
|
20
|
+
> {
|
|
21
|
+
/** A space-separated list of the classes of the element. Classes allows CSS and JavaScript to select and access specific elements via the class selectors or functions like the method `Document.getElementsByClassName()`. */
|
|
22
|
+
className?: string;
|
|
23
|
+
|
|
24
|
+
/** Contains a space-separated list of the part names of the element that should be exposed on the host element. */
|
|
25
|
+
exportparts?: string;
|
|
26
|
+
|
|
27
|
+
/** Used for labels to link them with their inputs (using input id). */
|
|
28
|
+
htmlFor?: string;
|
|
29
|
+
|
|
30
|
+
/** Used to help React identify which items have changed, are added, or are removed within a list. */
|
|
31
|
+
key?: number | string;
|
|
32
|
+
|
|
33
|
+
/** Contains a space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the ::part pseudo-element. */
|
|
34
|
+
part?: string;
|
|
35
|
+
|
|
36
|
+
/** A mutable ref object whose `.current` property is initialized to the passed argument (`initialValue`). The returned object will persist for the full lifetime of the component. */
|
|
37
|
+
ref?: any;
|
|
38
|
+
|
|
39
|
+
/** Allows developers to make HTML elements focusable, allow or prevent them from being sequentially focusable (usually with the `Tab` key, hence the name) and determine their relative ordering for sequential focus navigation. */
|
|
40
|
+
tabIndex?: number;
|
|
41
|
+
|
|
42
|
+
/** Tool call data containing table configuration and data */
|
|
43
|
+
toolCall?: ForgeAiToolDataTableElement["toolCall"];
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Data table component tool renderer for displaying tabular data with pagination and filtering.
|
|
48
|
+
* ---
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export const ForgeAiToolDataTable: React.ForwardRefExoticComponent<ForgeAiToolDataTableProps>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { forwardRef, useRef, useEffect } from "react";
|
|
2
|
+
import "@tylertech/forge-ai/tools/ai-data-table";
|
|
3
|
+
import { useProperties } from "./react-utils.js";
|
|
4
|
+
|
|
5
|
+
export const ForgeAiToolDataTable = forwardRef((props, forwardedRef) => {
|
|
6
|
+
const ref = useRef(null);
|
|
7
|
+
const { toolCall, ...filteredProps } = props;
|
|
8
|
+
|
|
9
|
+
/** Properties - run whenever a property has changed */
|
|
10
|
+
useProperties(ref, "toolCall", props.toolCall);
|
|
11
|
+
|
|
12
|
+
return React.createElement(
|
|
13
|
+
"forge-ai-tool-data-table",
|
|
14
|
+
{
|
|
15
|
+
ref: (node) => {
|
|
16
|
+
ref.current = node;
|
|
17
|
+
if (typeof forwardedRef === "function") {
|
|
18
|
+
forwardedRef(node);
|
|
19
|
+
} else if (forwardedRef) {
|
|
20
|
+
forwardedRef.current = node;
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
...filteredProps,
|
|
24
|
+
class: props.className,
|
|
25
|
+
exportparts: props.exportparts,
|
|
26
|
+
for: props.htmlFor,
|
|
27
|
+
part: props.part,
|
|
28
|
+
tabindex: props.tabIndex,
|
|
29
|
+
style: { ...props.style },
|
|
30
|
+
},
|
|
31
|
+
props.children,
|
|
32
|
+
);
|
|
33
|
+
});
|
package/dist/ForgeAiTooltip.d.ts
CHANGED
|
@@ -72,7 +72,7 @@ export interface ForgeAiTooltipProps extends Pick<
|
|
|
72
72
|
* - _default_ - The default slot for tooltip content.
|
|
73
73
|
*
|
|
74
74
|
* ### **CSS Properties:**
|
|
75
|
-
* - **--ai-tooltip-max-width** - The maximum width of the tooltip. _(default: undefined)_
|
|
76
|
-
* - **--ai-tooltip-z-index** - The z-index of the tooltip overlay. _(default: undefined)_
|
|
75
|
+
* - **--forge-ai-tooltip-max-width** - The maximum width of the tooltip. _(default: undefined)_
|
|
76
|
+
* - **--forge-ai-tooltip-z-index** - The z-index of the tooltip overlay. _(default: undefined)_
|
|
77
77
|
*/
|
|
78
78
|
export const ForgeAiTooltip: React.ForwardRefExoticComponent<ForgeAiTooltipProps>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ export * from "./ForgeAiActionsToolbar.js";
|
|
|
2
2
|
export * from "./ForgeAiAgentInfo.js";
|
|
3
3
|
export * from "./ForgeAiArtifact.js";
|
|
4
4
|
export * from "./ForgeAiAttachment.js";
|
|
5
|
-
export * from "./ForgeAiButton.js";
|
|
6
5
|
export * from "./ForgeAiChainOfThought.js";
|
|
6
|
+
export * from "./ForgeAiButton.js";
|
|
7
7
|
export * from "./ForgeAiChatHeader.js";
|
|
8
8
|
export * from "./ForgeAiChatInterface.js";
|
|
9
9
|
export * from "./ForgeAiChatbotToolCall.js";
|
|
@@ -17,31 +17,36 @@ export * from "./ForgeAiDropdownMenu.js";
|
|
|
17
17
|
export * from "./ForgeAiEmbeddedChat.js";
|
|
18
18
|
export * from "./ForgeAiEmptyState.js";
|
|
19
19
|
export * from "./ForgeAiErrorMessage.js";
|
|
20
|
+
export * from "./ForgeAiEventStreamViewer.js";
|
|
20
21
|
export * from "./ForgeAiFab.js";
|
|
21
22
|
export * from "./ForgeAiFilePicker.js";
|
|
22
23
|
export * from "./ForgeAiFloatingChat.js";
|
|
23
24
|
export * from "./ForgeAiGradientContainer.js";
|
|
24
25
|
export * from "./ForgeAiIcon.js";
|
|
26
|
+
export * from "./ForgeAiIconButton.js";
|
|
25
27
|
export * from "./ForgeAiMessageThread.js";
|
|
26
28
|
export * from "./ForgeAiModal.js";
|
|
27
29
|
export * from "./ForgeAiPrompt.js";
|
|
28
30
|
export * from "./ForgeAiReasoning.js";
|
|
29
|
-
export * from "./ForgeAiReasoningHeader.js";
|
|
30
31
|
export * from "./ForgeAiResponseMessage.js";
|
|
32
|
+
export * from "./ForgeAiSlashCommandMenu.js";
|
|
33
|
+
export * from "./ForgeAiReasoningHeader.js";
|
|
31
34
|
export * from "./ForgeAiSidebar.js";
|
|
32
|
-
export * from "./ForgeAiSidebarChat.js";
|
|
33
35
|
export * from "./ForgeAiSpinner.js";
|
|
36
|
+
export * from "./ForgeAiSidebarChat.js";
|
|
34
37
|
export * from "./ForgeAiSuggestions.js";
|
|
35
38
|
export * from "./ForgeAiThinkingIndicator.js";
|
|
36
39
|
export * from "./ForgeAiThreads.js";
|
|
37
40
|
export * from "./ForgeAiUserMessage.js";
|
|
38
41
|
export * from "./ForgeAiVoiceInput.js";
|
|
39
|
-
export * from "./ForgeAiThoughtBase.js";
|
|
40
42
|
export * from "./ForgeAiThoughtDetail.js";
|
|
43
|
+
export * from "./ForgeAiThoughtBase.js";
|
|
41
44
|
export * from "./ForgeAiThoughtImage.js";
|
|
42
45
|
export * from "./ForgeAiThoughtSearchResult.js";
|
|
43
|
-
export * from "./ForgePromptButton.js";
|
|
44
46
|
export * from "./ForgeAiReasoningContent.js";
|
|
47
|
+
export * from "./ForgePromptButton.js";
|
|
48
|
+
export * from "./ForgeAiPopover.js";
|
|
45
49
|
export * from "./ForgeAiOverlay.js";
|
|
46
50
|
export * from "./ForgeAiTooltip.js";
|
|
47
|
-
export * from "./
|
|
51
|
+
export * from "./ForgeAiToolDataTable.js";
|
|
52
|
+
export * from "./ForgeAiPaginator.js";
|
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@ export * from "./ForgeAiActionsToolbar.js";
|
|
|
2
2
|
export * from "./ForgeAiAgentInfo.js";
|
|
3
3
|
export * from "./ForgeAiArtifact.js";
|
|
4
4
|
export * from "./ForgeAiAttachment.js";
|
|
5
|
-
export * from "./ForgeAiButton.js";
|
|
6
5
|
export * from "./ForgeAiChainOfThought.js";
|
|
6
|
+
export * from "./ForgeAiButton.js";
|
|
7
7
|
export * from "./ForgeAiChatHeader.js";
|
|
8
8
|
export * from "./ForgeAiChatInterface.js";
|
|
9
9
|
export * from "./ForgeAiChatbotToolCall.js";
|
|
@@ -17,31 +17,36 @@ export * from "./ForgeAiDropdownMenu.js";
|
|
|
17
17
|
export * from "./ForgeAiEmbeddedChat.js";
|
|
18
18
|
export * from "./ForgeAiEmptyState.js";
|
|
19
19
|
export * from "./ForgeAiErrorMessage.js";
|
|
20
|
+
export * from "./ForgeAiEventStreamViewer.js";
|
|
20
21
|
export * from "./ForgeAiFab.js";
|
|
21
22
|
export * from "./ForgeAiFilePicker.js";
|
|
22
23
|
export * from "./ForgeAiFloatingChat.js";
|
|
23
24
|
export * from "./ForgeAiGradientContainer.js";
|
|
24
25
|
export * from "./ForgeAiIcon.js";
|
|
26
|
+
export * from "./ForgeAiIconButton.js";
|
|
25
27
|
export * from "./ForgeAiMessageThread.js";
|
|
26
28
|
export * from "./ForgeAiModal.js";
|
|
27
29
|
export * from "./ForgeAiPrompt.js";
|
|
28
30
|
export * from "./ForgeAiReasoning.js";
|
|
29
|
-
export * from "./ForgeAiReasoningHeader.js";
|
|
30
31
|
export * from "./ForgeAiResponseMessage.js";
|
|
32
|
+
export * from "./ForgeAiSlashCommandMenu.js";
|
|
33
|
+
export * from "./ForgeAiReasoningHeader.js";
|
|
31
34
|
export * from "./ForgeAiSidebar.js";
|
|
32
|
-
export * from "./ForgeAiSidebarChat.js";
|
|
33
35
|
export * from "./ForgeAiSpinner.js";
|
|
36
|
+
export * from "./ForgeAiSidebarChat.js";
|
|
34
37
|
export * from "./ForgeAiSuggestions.js";
|
|
35
38
|
export * from "./ForgeAiThinkingIndicator.js";
|
|
36
39
|
export * from "./ForgeAiThreads.js";
|
|
37
40
|
export * from "./ForgeAiUserMessage.js";
|
|
38
41
|
export * from "./ForgeAiVoiceInput.js";
|
|
39
|
-
export * from "./ForgeAiThoughtBase.js";
|
|
40
42
|
export * from "./ForgeAiThoughtDetail.js";
|
|
43
|
+
export * from "./ForgeAiThoughtBase.js";
|
|
41
44
|
export * from "./ForgeAiThoughtImage.js";
|
|
42
45
|
export * from "./ForgeAiThoughtSearchResult.js";
|
|
43
|
-
export * from "./ForgePromptButton.js";
|
|
44
46
|
export * from "./ForgeAiReasoningContent.js";
|
|
47
|
+
export * from "./ForgePromptButton.js";
|
|
48
|
+
export * from "./ForgeAiPopover.js";
|
|
45
49
|
export * from "./ForgeAiOverlay.js";
|
|
46
50
|
export * from "./ForgeAiTooltip.js";
|
|
47
|
-
export * from "./
|
|
51
|
+
export * from "./ForgeAiToolDataTable.js";
|
|
52
|
+
export * from "./ForgeAiPaginator.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tylertech/forge-ai-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "A React adapter for Tyler Forge™ AI Web Components.",
|
|
5
5
|
"repository": "tyler-technologies-oss/forge-ai",
|
|
6
6
|
"author": "Tyler Technologies, Inc.",
|
|
@@ -11,52 +11,52 @@
|
|
|
11
11
|
"files": [
|
|
12
12
|
"dist"
|
|
13
13
|
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"predev": "pnpm run build",
|
|
16
|
+
"dev": "vite",
|
|
17
|
+
"build:demo": "vite build",
|
|
18
|
+
"serve:demo": "vite preview",
|
|
19
|
+
"clean": "rimraf dist/",
|
|
20
|
+
"prebuild": "pnpm run clean",
|
|
21
|
+
"build": "pnpm run generate-proxies",
|
|
22
|
+
"lint": "eslint .",
|
|
23
|
+
"format": "prettier --write .",
|
|
24
|
+
"format:check": "prettier --check .",
|
|
25
|
+
"generate-proxies": "node scripts/generate-proxies.mjs"
|
|
26
|
+
},
|
|
14
27
|
"dependencies": {
|
|
15
|
-
"tslib": "
|
|
28
|
+
"tslib": "catalog:"
|
|
16
29
|
},
|
|
17
30
|
"peerDependencies": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
31
|
+
"@tylertech/forge-ai": "workspace:^",
|
|
32
|
+
"react": ">=17.0.0"
|
|
20
33
|
},
|
|
21
34
|
"devDependencies": {
|
|
22
|
-
"@repo/prettier-config": "",
|
|
23
|
-
"@tylertech-eslint/eslint-plugin": "
|
|
24
|
-
"@tylertech/forge": "
|
|
35
|
+
"@repo/prettier-config": "workspace:",
|
|
36
|
+
"@tylertech-eslint/eslint-plugin": "catalog:",
|
|
37
|
+
"@tylertech/forge": "catalog:",
|
|
38
|
+
"@tylertech/forge-ai": "workspace:^",
|
|
25
39
|
"@tylertech/forge-react": "^3.2.0",
|
|
26
|
-
"@tylertech/tyler-icons": "
|
|
27
|
-
"@types/node": "
|
|
28
|
-
"@types/react": "^18.3.
|
|
40
|
+
"@tylertech/tyler-icons": "catalog:",
|
|
41
|
+
"@types/node": "catalog:",
|
|
42
|
+
"@types/react": "^18.3.27",
|
|
29
43
|
"@types/react-dom": "^18.3.7",
|
|
30
44
|
"@types/react-router": "^5.1.20",
|
|
31
45
|
"@types/react-router-dom": "^5.3.3",
|
|
32
46
|
"@vitejs/plugin-react": "^4.7.0",
|
|
33
47
|
"change-case": "^5.4.4",
|
|
34
48
|
"custom-element-react-wrappers": "^1.7.3",
|
|
35
|
-
"eslint": "
|
|
36
|
-
"eslint-plugin-prettier": "
|
|
49
|
+
"eslint": "catalog:",
|
|
50
|
+
"eslint-plugin-prettier": "catalog:",
|
|
37
51
|
"react": "^17.0.2",
|
|
38
52
|
"react-dom": "^17.0.2",
|
|
39
53
|
"react-error-overlay": "^6.1.0",
|
|
40
54
|
"react-router": "^5.3.4",
|
|
41
55
|
"react-router-dom": "^5.3.4",
|
|
42
|
-
"rimraf": "
|
|
43
|
-
"sass": "
|
|
56
|
+
"rimraf": "catalog:",
|
|
57
|
+
"sass": "catalog:",
|
|
44
58
|
"typescript": "~5.8.3",
|
|
45
|
-
"vite": "
|
|
46
|
-
"vite-tsconfig-paths": "
|
|
47
|
-
"@tylertech/forge-ai": "^0.5.0"
|
|
48
|
-
},
|
|
49
|
-
"scripts": {
|
|
50
|
-
"predev": "pnpm run build",
|
|
51
|
-
"dev": "vite",
|
|
52
|
-
"build:demo": "vite build",
|
|
53
|
-
"serve:demo": "vite preview",
|
|
54
|
-
"clean": "rimraf dist/",
|
|
55
|
-
"prebuild": "pnpm run clean",
|
|
56
|
-
"build": "pnpm run generate-proxies",
|
|
57
|
-
"lint": "eslint .",
|
|
58
|
-
"format": "prettier --write .",
|
|
59
|
-
"format:check": "prettier --check .",
|
|
60
|
-
"generate-proxies": "node scripts/generate-proxies.mjs"
|
|
59
|
+
"vite": "catalog:",
|
|
60
|
+
"vite-tsconfig-paths": "catalog:"
|
|
61
61
|
}
|
|
62
|
-
}
|
|
62
|
+
}
|