Skip to content

Commit

Permalink
Merge 806c474 into 4245636
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilyZhang777 committed May 11, 2023
2 parents 4245636 + 806c474 commit 110f3f5
Show file tree
Hide file tree
Showing 31 changed files with 528 additions and 35 deletions.
15 changes: 15 additions & 0 deletions docs/search-ui-react.facetprops.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [FacetProps](./search-ui-react.facetprops.md)

## FacetProps type

Props for a single facet component.

<b>Signature:</b>

```typescript
export declare type FacetProps = StandardFacetProps;
```
<b>References:</b> [StandardFacetProps](./search-ui-react.standardfacetprops.md)

2 changes: 2 additions & 0 deletions docs/search-ui-react.facets.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ A React component for facets

This component is a quick way of getting facets on the page, and it will render standard facets, numerical facets, and hierarchical facets. The [StandardFacets()](./search-ui-react.standardfacets.md)<!-- -->, [NumericalFacets()](./search-ui-react.numericalfacets.md)<!-- -->, and [HierarchicalFacets()](./search-ui-react.hierarchicalfacets.md) components can be used instead for more control over facet configuration.

To override a single facet, use [StandardFacet()](./search-ui-react.standardfacet.md)<!-- -->.

11 changes: 11 additions & 0 deletions docs/search-ui-react.facetscssclasses.divider.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [FacetsCssClasses](./search-ui-react.facetscssclasses.md) &gt; [divider](./search-ui-react.facetscssclasses.divider.md)

## FacetsCssClasses.divider property

<b>Signature:</b>

```typescript
divider?: string;
```
1 change: 1 addition & 0 deletions docs/search-ui-react.facetscssclasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@ export interface FacetsCssClasses

| Property | Type | Description |
| --- | --- | --- |
| [divider?](./search-ui-react.facetscssclasses.divider.md) | string | <i>(Optional)</i> |
| [facetsContainer?](./search-ui-react.facetscssclasses.facetscontainer.md) | string | <i>(Optional)</i> |

18 changes: 18 additions & 0 deletions docs/search-ui-react.facetsprops.children.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [FacetsProps](./search-ui-react.facetsprops.md) &gt; [children](./search-ui-react.facetsprops.children.md)

## FacetsProps.children property

The custom facet components that will override the default rendering.

<b>Signature:</b>

```typescript
children?: ReactElement[] | ReactElement | undefined | null;
```

## Remarks

Supported components include [StandardFacet()](./search-ui-react.standardfacet.md)<!-- -->.

2 changes: 2 additions & 0 deletions docs/search-ui-react.facetsprops.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ export interface FacetsProps

| Property | Type | Description |
| --- | --- | --- |
| [children?](./search-ui-react.facetsprops.children.md) | ReactElement\[\] \| ReactElement \| undefined \| null | <i>(Optional)</i> The custom facet components that will override the default rendering. |
| [customCssClasses?](./search-ui-react.facetsprops.customcssclasses.md) | [FacetsCssClasses](./search-ui-react.facetscssclasses.md) | <i>(Optional)</i> CSS classes for customizing the component styling. |
| [searchOnChange?](./search-ui-react.facetsprops.searchonchange.md) | boolean | <i>(Optional)</i> Whether or not a search is automatically run when a filter is selected. Defaults to true. |

13 changes: 13 additions & 0 deletions docs/search-ui-react.facetsprops.searchonchange.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [FacetsProps](./search-ui-react.facetsprops.md) &gt; [searchOnChange](./search-ui-react.facetsprops.searchonchange.md)

## FacetsProps.searchOnChange property

Whether or not a search is automatically run when a filter is selected. Defaults to true.

<b>Signature:</b>

```typescript
searchOnChange?: boolean;
```
3 changes: 3 additions & 0 deletions docs/search-ui-react.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
| [SearchBar({ placeholder, geolocationOptions, hideRecentSearches, visualAutocompleteConfig, showVerticalLinks, onSelectVerticalLink, verticalKeyToLabel, recentSearchesLimit, customCssClasses, onSearch })](./search-ui-react.searchbar.md) | Renders a SearchBar that is hooked up with an InputDropdown component. |
| [SpellCheck({ customCssClasses, onClick })](./search-ui-react.spellcheck.md) | Renders a suggested query if the Search API provides one. |
| [StandardCard(props)](./search-ui-react.standardcard.md) | This Component renders the base result card. |
| [StandardFacet(props)](./search-ui-react.standardfacet.md) | A component that displays a single standard facet. Use this to override the default rendering. |
| [StandardFacets(props)](./search-ui-react.standardfacets.md) | A component that displays simple facets applicable to the current vertical search. |
| [StandardSection(props)](./search-ui-react.standardsection.md) | A component that displays all the results for a vertical using a standard section template. |
| [StaticFilters(props)](./search-ui-react.staticfilters.md) | A component that displays a group of user-configured field value filters that will be applied to the current vertical search. |
Expand Down Expand Up @@ -94,6 +95,7 @@
| [StandardCardCssClasses](./search-ui-react.standardcardcssclasses.md) | The CSS class interface used for the StandardCardDisplay. |
| [StandardCardData](./search-ui-react.standardcarddata.md) | The data used by the [StandardCard()](./search-ui-react.standardcard.md) and taken from the original Result. |
| [StandardCardProps](./search-ui-react.standardcardprops.md) | Props for a StandardCard. |
| [StandardFacetProps](./search-ui-react.standardfacetprops.md) | Props for the [StandardFacet()](./search-ui-react.standardfacet.md) component. |
| [StandardFacetsCssClasses](./search-ui-react.standardfacetscssclasses.md) | The CSS class interface for [StandardFacets()](./search-ui-react.standardfacets.md)<!-- -->. |
| [StandardFacetsProps](./search-ui-react.standardfacetsprops.md) | Props for the [StandardFacets()](./search-ui-react.standardfacets.md) component. |
| [StandardSectionCssClasses](./search-ui-react.standardsectioncssclasses.md) | The CSS class interface used for [StandardSection()](./search-ui-react.standardsection.md)<!-- -->. |
Expand Down Expand Up @@ -129,6 +131,7 @@
| [CoordinateGetter](./search-ui-react.coordinategetter.md) | A function use to derive a result's coordinate. |
| [DefaultRawDataType](./search-ui-react.defaultrawdatatype.md) | The default type for "rawData" field of type Result. |
| [DropdownItemProps](./search-ui-react.dropdownitemprops.md) | Props for the [DropdownItem()](./search-ui-react.dropdownitem.md)<!-- -->. |
| [FacetProps](./search-ui-react.facetprops.md) | Props for a single facet component. |
| [FeedbackType](./search-ui-react.feedbacktype.md) | Analytics event types for quality feedback. |
| [FocusedItemData](./search-ui-react.focuseditemdata.md) | The data associated with the currently focused item. |
| [OnDragHandler](./search-ui-react.ondraghandler.md) | A function which is called when user drag the map. |
Expand Down
26 changes: 26 additions & 0 deletions docs/search-ui-react.standardfacet.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacet](./search-ui-react.standardfacet.md)

## StandardFacet() function

A component that displays a single standard facet. Use this to override the default rendering.

<b>Signature:</b>

```typescript
export declare function StandardFacet(props: StandardFacetProps): null;
```

## Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| props | [StandardFacetProps](./search-ui-react.standardfacetprops.md) | [StandardFacetProps](./search-ui-react.standardfacetprops.md) |

<b>Returns:</b>

null

ReactElement

13 changes: 13 additions & 0 deletions docs/search-ui-react.standardfacetprops.collapsible.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacetProps](./search-ui-react.standardfacetprops.md) &gt; [collapsible](./search-ui-react.standardfacetprops.collapsible.md)

## StandardFacetProps.collapsible property

Whether or not the filter is collapsible. Defaults to true.

<b>Signature:</b>

```typescript
collapsible?: boolean;
```
13 changes: 13 additions & 0 deletions docs/search-ui-react.standardfacetprops.customcssclasses.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacetProps](./search-ui-react.standardfacetprops.md) &gt; [customCssClasses](./search-ui-react.standardfacetprops.customcssclasses.md)

## StandardFacetProps.customCssClasses property

CSS classes for customizing the component styling.

<b>Signature:</b>

```typescript
customCssClasses?: FilterGroupCssClasses;
```
13 changes: 13 additions & 0 deletions docs/search-ui-react.standardfacetprops.defaultexpanded.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacetProps](./search-ui-react.standardfacetprops.md) &gt; [defaultExpanded](./search-ui-react.standardfacetprops.defaultexpanded.md)

## StandardFacetProps.defaultExpanded property

If the filter group is collapsible, whether or not it should start out expanded. Defaults to true.

<b>Signature:</b>

```typescript
defaultExpanded?: boolean;
```
13 changes: 13 additions & 0 deletions docs/search-ui-react.standardfacetprops.fieldid.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacetProps](./search-ui-react.standardfacetprops.md) &gt; [fieldId](./search-ui-react.standardfacetprops.fieldid.md)

## StandardFacetProps.fieldId property

The fieldId corresponding to the facet

<b>Signature:</b>

```typescript
fieldId: string;
```
13 changes: 13 additions & 0 deletions docs/search-ui-react.standardfacetprops.label.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacetProps](./search-ui-react.standardfacetprops.md) &gt; [label](./search-ui-react.standardfacetprops.label.md)

## StandardFacetProps.label property

The label of the facet. Defaults to facet's displayName if not provided.

<b>Signature:</b>

```typescript
label?: string;
```
27 changes: 27 additions & 0 deletions docs/search-ui-react.standardfacetprops.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacetProps](./search-ui-react.standardfacetprops.md)

## StandardFacetProps interface

Props for the [StandardFacet()](./search-ui-react.standardfacet.md) component.

<b>Signature:</b>

```typescript
export interface StandardFacetProps
```

## Properties

| Property | Type | Description |
| --- | --- | --- |
| [collapsible?](./search-ui-react.standardfacetprops.collapsible.md) | boolean | <i>(Optional)</i> Whether or not the filter is collapsible. Defaults to true. |
| [customCssClasses?](./search-ui-react.standardfacetprops.customcssclasses.md) | [FilterGroupCssClasses](./search-ui-react.filtergroupcssclasses.md) | <i>(Optional)</i> CSS classes for customizing the component styling. |
| [defaultExpanded?](./search-ui-react.standardfacetprops.defaultexpanded.md) | boolean | <i>(Optional)</i> If the filter group is collapsible, whether or not it should start out expanded. Defaults to true. |
| [fieldId](./search-ui-react.standardfacetprops.fieldid.md) | string | The fieldId corresponding to the facet |
| [label?](./search-ui-react.standardfacetprops.label.md) | string | <i>(Optional)</i> The label of the facet. Defaults to facet's displayName if not provided. |
| [showMoreLimit?](./search-ui-react.standardfacetprops.showmorelimit.md) | number | <i>(Optional)</i> Limit on the number of options to be displayed. Defaults to 10. |
| [showOptionCounts?](./search-ui-react.standardfacetprops.showoptioncounts.md) | boolean | <i>(Optional)</i> Whether or not to show the option counts for each filter. Defaults to true. |
| [transformOptions?](./search-ui-react.standardfacetprops.transformoptions.md) | (options: DisplayableFacetOption\[\]) =&gt; DisplayableFacetOption\[\] | <i>(Optional)</i> A function to transform facet's options. |

13 changes: 13 additions & 0 deletions docs/search-ui-react.standardfacetprops.showmorelimit.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacetProps](./search-ui-react.standardfacetprops.md) &gt; [showMoreLimit](./search-ui-react.standardfacetprops.showmorelimit.md)

## StandardFacetProps.showMoreLimit property

Limit on the number of options to be displayed. Defaults to 10.

<b>Signature:</b>

```typescript
showMoreLimit?: number;
```
13 changes: 13 additions & 0 deletions docs/search-ui-react.standardfacetprops.showoptioncounts.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacetProps](./search-ui-react.standardfacetprops.md) &gt; [showOptionCounts](./search-ui-react.standardfacetprops.showoptioncounts.md)

## StandardFacetProps.showOptionCounts property

Whether or not to show the option counts for each filter. Defaults to true.

<b>Signature:</b>

```typescript
showOptionCounts?: boolean;
```
13 changes: 13 additions & 0 deletions docs/search-ui-react.standardfacetprops.transformoptions.md
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) &gt; [@yext/search-ui-react](./search-ui-react.md) &gt; [StandardFacetProps](./search-ui-react.standardfacetprops.md) &gt; [transformOptions](./search-ui-react.standardfacetprops.transformoptions.md)

## StandardFacetProps.transformOptions property

A function to transform facet's options.

<b>Signature:</b>

```typescript
transformOptions?: (options: DisplayableFacetOption[]) => DisplayableFacetOption[];
```
5 changes: 5 additions & 0 deletions docs/search-ui-react.standardfacets.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## StandardFacets() function

> Warning: This API is now obsolete.
>
> Use [Facets()](./search-ui-react.facets.md) instead.
>
A component that displays simple facets applicable to the current vertical search.

<b>Signature:</b>
Expand Down
5 changes: 5 additions & 0 deletions docs/search-ui-react.standardfacetscssclasses.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## StandardFacetsCssClasses interface

> Warning: This API is now obsolete.
>
> Use [Facets()](./search-ui-react.facets.md) instead.
>
The CSS class interface for [StandardFacets()](./search-ui-react.standardfacets.md)<!-- -->.

<b>Signature:</b>
Expand Down
5 changes: 5 additions & 0 deletions docs/search-ui-react.standardfacetsprops.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@

## StandardFacetsProps interface

> Warning: This API is now obsolete.
>
> Use [Facets()](./search-ui-react.facets.md) instead.
>
Props for the [StandardFacets()](./search-ui-react.standardfacets.md) component.

<b>Signature:</b>
Expand Down
28 changes: 26 additions & 2 deletions etc/search-ui-react.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { AnalyticsConfig } from '@yext/analytics';
import { AnalyticsService } from '@yext/analytics';
import { AutocompleteResponse } from '@yext/search-headless-react';
import { DirectAnswer as DirectAnswer_2 } from '@yext/search-headless-react';
import { DisplayableFacetOption } from '@yext/search-core';
import { FieldValueStaticFilter } from '@yext/search-headless-react';
import { FilterSearchResponse } from '@yext/search-headless-react';
import { HighlightedValue } from '@yext/search-headless-react';
Expand All @@ -21,6 +22,7 @@ import { Matcher } from '@yext/search-headless-react';
import { NumberRangeValue } from '@yext/search-headless-react';
import { PropsWithChildren } from 'react';
import { QuerySource } from '@yext/search-headless-react';
import { ReactElement } from 'react';
import { Result } from '@yext/search-headless-react';
import { SearchActions } from '@yext/search-headless-react';
import { SearchHeadless } from '@yext/search-headless-react';
Expand Down Expand Up @@ -200,18 +202,25 @@ export function executeAutocomplete(searchActions: SearchActions): Promise<Autoc
// @public
export function executeSearch(searchActions: SearchActions): Promise<void>;

// @public
export type FacetProps = StandardFacetProps;

// @public
export function Facets(props: FacetsProps): JSX.Element;

// @public
export interface FacetsCssClasses {
// (undocumented)
divider?: string;
// (undocumented)
facetsContainer?: string;
}

// @public
export interface FacetsProps {
children?: ReactElement[] | ReactElement | undefined | null;
customCssClasses?: FacetsCssClasses;
searchOnChange?: boolean;
}

// @public
Expand Down Expand Up @@ -682,17 +691,32 @@ export interface StandardCardProps<T = DefaultRawDataType> extends CardProps<T>
}

// @public
export function StandardFacets(props: StandardFacetsProps): JSX.Element;
export function StandardFacet(props: StandardFacetProps): null;

// @public
export interface StandardFacetProps {
collapsible?: boolean;
customCssClasses?: FilterGroupCssClasses;
defaultExpanded?: boolean;
fieldId: string;
label?: string;
showMoreLimit?: number;
showOptionCounts?: boolean;
transformOptions?: (options: DisplayableFacetOption[]) => DisplayableFacetOption[];
}

// @public @deprecated
export function StandardFacets(props: StandardFacetsProps): JSX.Element;

// @public @deprecated
export interface StandardFacetsCssClasses extends FilterGroupCssClasses {
// (undocumented)
divider?: string;
// (undocumented)
standardFacetsContainer?: string;
}

// @public
// @public @deprecated
export interface StandardFacetsProps {
collapsible?: boolean;
customCssClasses?: StandardFacetsCssClasses;
Expand Down
Loading

0 comments on commit 110f3f5

Please sign in to comment.