-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add generativeDirectAnswer support (#441)
J=CLIP-1226 TEST=auto,manual added unit and visual regression test, ran and saw tests passed added GDA to test-site App and verified that the appropriate gda content shows up and the UI looks as expected
- Loading branch information
1 parent
c175279
commit 3f83773
Showing
39 changed files
with
3,597 additions
and
757 deletions.
There are no files selected for viewing
Binary file modified
BIN
+4.09 KB
(100%)
.storybook/snapshots/__snapshots__/mapboxmap--custom-pin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+4.09 KB
(100%)
.storybook/snapshots/__snapshots__/mapboxmap--custom-render-pin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
-3.86 KB
(100%)
.storybook/snapshots/__snapshots__/mapboxmap--multiple-pins.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationProps](./search-ui-react.citationprops.md) > [citation](./search-ui-react.citationprops.citation.md) | ||
|
||
## CitationProps.citation property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
citation: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationProps](./search-ui-react.citationprops.md) > [cssClasses](./search-ui-react.citationprops.cssclasses.md) | ||
|
||
## CitationProps.cssClasses property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
cssClasses: GenerativeDirectAnswerCssClasses; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationProps](./search-ui-react.citationprops.md) | ||
|
||
## CitationProps interface | ||
|
||
Props for citation card. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
interface CitationProps | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [citation](./search-ui-react.citationprops.citation.md) | | string | | | ||
| [cssClasses](./search-ui-react.citationprops.cssclasses.md) | | [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) | | | ||
| [searchResults](./search-ui-react.citationprops.searchresults.md) | | Result\[\] | | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationProps](./search-ui-react.citationprops.md) > [searchResults](./search-ui-react.citationprops.searchresults.md) | ||
|
||
## CitationProps.searchResults property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
searchResults: Result[]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [executeGenerativeDirectAnswer](./search-ui-react.executegenerativedirectanswer.md) | ||
|
||
## executeGenerativeDirectAnswer() function | ||
|
||
Executes a generative direct answer and return the corresponding response. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
declare function executeGenerativeDirectAnswer(searchActions: SearchActions): Promise<GenerativeDirectAnswerResponse | undefined>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| searchActions | SearchActions | | | ||
|
||
**Returns:** | ||
|
||
Promise<GenerativeDirectAnswerResponse \| undefined> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswer](./search-ui-react.generativedirectanswer.md) | ||
|
||
## GenerativeDirectAnswer() function | ||
|
||
Displays the AI generated answer of a generative direct answer. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
declare function GenerativeDirectAnswer({ customCssClasses, answerHeader, citationsHeader, CitationCard }: GenerativeDirectAnswerProps): JSX.Element | null; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| { customCssClasses, answerHeader, citationsHeader, CitationCard } | [GenerativeDirectAnswerProps](./search-ui-react.generativedirectanswerprops.md) | | | ||
|
||
**Returns:** | ||
|
||
JSX.Element \| null | ||
|
||
A React element for the generative direct answer, or null if there is no generated answer | ||
|
11 changes: 11 additions & 0 deletions
11
docs/search-ui-react.generativedirectanswercssclasses.answertext.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) > [answerText](./search-ui-react.generativedirectanswercssclasses.answertext.md) | ||
|
||
## GenerativeDirectAnswerCssClasses.answerText property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
answerText?: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/search-ui-react.generativedirectanswercssclasses.citation.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) > [citation](./search-ui-react.generativedirectanswercssclasses.citation.md) | ||
|
||
## GenerativeDirectAnswerCssClasses.citation property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
citation?: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/search-ui-react.generativedirectanswercssclasses.citationscontainer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) > [citationsContainer](./search-ui-react.generativedirectanswercssclasses.citationscontainer.md) | ||
|
||
## GenerativeDirectAnswerCssClasses.citationsContainer property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
citationsContainer?: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/search-ui-react.generativedirectanswercssclasses.citationsnippet.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) > [citationSnippet](./search-ui-react.generativedirectanswercssclasses.citationsnippet.md) | ||
|
||
## GenerativeDirectAnswerCssClasses.citationSnippet property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
citationSnippet?: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/search-ui-react.generativedirectanswercssclasses.citationtitle.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) > [citationTitle](./search-ui-react.generativedirectanswercssclasses.citationtitle.md) | ||
|
||
## GenerativeDirectAnswerCssClasses.citationTitle property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
citationTitle?: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/search-ui-react.generativedirectanswercssclasses.container.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) > [container](./search-ui-react.generativedirectanswercssclasses.container.md) | ||
|
||
## GenerativeDirectAnswerCssClasses.container property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
container?: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/search-ui-react.generativedirectanswercssclasses.divider.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) > [divider](./search-ui-react.generativedirectanswercssclasses.divider.md) | ||
|
||
## GenerativeDirectAnswerCssClasses.divider property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
divider?: string; | ||
``` |
11 changes: 11 additions & 0 deletions
11
docs/search-ui-react.generativedirectanswercssclasses.header.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) > [header](./search-ui-react.generativedirectanswercssclasses.header.md) | ||
|
||
## GenerativeDirectAnswerCssClasses.header property | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
header?: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) | ||
|
||
## GenerativeDirectAnswerCssClasses interface | ||
|
||
The CSS class interface used for [GenerativeDirectAnswer()](./search-ui-react.generativedirectanswer.md)<!-- -->. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
interface GenerativeDirectAnswerCssClasses | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [answerText?](./search-ui-react.generativedirectanswercssclasses.answertext.md) | | string | _(Optional)_ | | ||
| [citation?](./search-ui-react.generativedirectanswercssclasses.citation.md) | | string | _(Optional)_ | | ||
| [citationsContainer?](./search-ui-react.generativedirectanswercssclasses.citationscontainer.md) | | string | _(Optional)_ | | ||
| [citationSnippet?](./search-ui-react.generativedirectanswercssclasses.citationsnippet.md) | | string | _(Optional)_ | | ||
| [citationTitle?](./search-ui-react.generativedirectanswercssclasses.citationtitle.md) | | string | _(Optional)_ | | ||
| [container?](./search-ui-react.generativedirectanswercssclasses.container.md) | | string | _(Optional)_ | | ||
| [divider?](./search-ui-react.generativedirectanswercssclasses.divider.md) | | string | _(Optional)_ | | ||
| [header?](./search-ui-react.generativedirectanswercssclasses.header.md) | | string | _(Optional)_ | | ||
|
13 changes: 13 additions & 0 deletions
13
docs/search-ui-react.generativedirectanswerprops.answerheader.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerProps](./search-ui-react.generativedirectanswerprops.md) > [answerHeader](./search-ui-react.generativedirectanswerprops.answerheader.md) | ||
|
||
## GenerativeDirectAnswerProps.answerHeader property | ||
|
||
The header for the answer section of the generative direct answer. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
answerHeader?: string | JSX.Element; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/search-ui-react.generativedirectanswerprops.citationcard.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerProps](./search-ui-react.generativedirectanswerprops.md) > [CitationCard](./search-ui-react.generativedirectanswerprops.citationcard.md) | ||
|
||
## GenerativeDirectAnswerProps.CitationCard property | ||
|
||
The component for citation card | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
CitationCard?: (props: CitationProps) => JSX.Element | null; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/search-ui-react.generativedirectanswerprops.citationsheader.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerProps](./search-ui-react.generativedirectanswerprops.md) > [citationsHeader](./search-ui-react.generativedirectanswerprops.citationsheader.md) | ||
|
||
## GenerativeDirectAnswerProps.citationsHeader property | ||
|
||
The header for the citations section of the generative direct answer. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
citationsHeader?: string | JSX.Element; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/search-ui-react.generativedirectanswerprops.customcssclasses.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerProps](./search-ui-react.generativedirectanswerprops.md) > [customCssClasses](./search-ui-react.generativedirectanswerprops.customcssclasses.md) | ||
|
||
## GenerativeDirectAnswerProps.customCssClasses property | ||
|
||
CSS classes for customizing the component styling. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
customCssClasses?: GenerativeDirectAnswerCssClasses; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerProps](./search-ui-react.generativedirectanswerprops.md) | ||
|
||
## GenerativeDirectAnswerProps interface | ||
|
||
Props for [GenerativeDirectAnswer()](./search-ui-react.generativedirectanswer.md)<!-- -->. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
interface GenerativeDirectAnswerProps | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [answerHeader?](./search-ui-react.generativedirectanswerprops.answerheader.md) | | string \| JSX.Element | _(Optional)_ The header for the answer section of the generative direct answer. | | ||
| [CitationCard?](./search-ui-react.generativedirectanswerprops.citationcard.md) | | (props: [CitationProps](./search-ui-react.citationprops.md)<!-- -->) => JSX.Element \| null | _(Optional)_ The component for citation card | | ||
| [citationsHeader?](./search-ui-react.generativedirectanswerprops.citationsheader.md) | | string \| JSX.Element | _(Optional)_ The header for the citations section of the generative direct answer. | | ||
| [customCssClasses?](./search-ui-react.generativedirectanswerprops.customcssclasses.md) | | [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) | _(Optional)_ CSS classes for customizing the component styling. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.