[ACS-6644] review search documentation and examples for adf (#9518)

* ACS-6644 review search docs and examples

* ACS-6644 change widget description to more precise

* ACS-6644 small formatting fix, add new component links to main connected pages

* [ACS-6644] trigger codeQL job
This commit is contained in:
Grzegorz Jaśkowski
2024-04-11 15:33:59 +02:00
committed by GitHub
parent 5e886e29d1
commit 96be5a543c
10 changed files with 49 additions and 53 deletions

View File

@@ -57,7 +57,7 @@ This configuration considered for searching in the application.
]
},
{
"name": "Customer payout",
"name": "Customer payout",
"query": [
{ "query": "TYPE:'cm:folder' OR TYPE:'cm:content'" }
{ "query": "-TYPE:'st:site' AND -ASPECT:'st:siteContainer' AND -ASPECT:'sys:hidden'" }
@@ -290,11 +290,9 @@ The interface above also describes entries in the `search.query.categories` sect
> **Note:** you must provide at least one category field in order to execute the query,
> so that filters and selected facets are applied.
The Search Filter supports a number of widgets out of the box, each implemented
by an ADF component. The `selector` property specifies which [widget](../../lib/content-services/src/lib/search/models/search-widget.interface.ts) is used for
a category:
The Search Filter supports a number of components out of the box, each implementing an ADF [search widget interface](../../lib/content-services/src/lib/search/models/search-widget.interface.ts). The `selector` property specifies which widget is used for a category:
| [`Widget`](../../lib/content-services/src/lib/search/models/search-widget.interface.ts) name | Selector | Description |
| Widget name | Selector | Description |
|----------------------------------------------------------------------------------------------| -------- |------------------------------------------------------------------------------|
| [Check List](../content-services/components/search-check-list.component.md) | `check-list` | Toggles individual query fragments for the search |
| [Date Range](../content-services/components/search-date-range.component.md) | `date-range` | Specifies a varities of options for selecting dates that a field may contain |
@@ -303,18 +301,14 @@ a category:
| [Slider](../content-services/components/search-slider.component.md) | `slider` | Selects a single numeric value in a given range that a field may contain |
| [Text](../content-services/components/search-text.component.md) | `text` | Specifies a text value that a field may contain |
See the individual [Search Widget](../interfaces/search-widget.interface.md) pages for full details of their usage and settings.
You can also implement your own custom search widgets. See the [Search Widget Interface](../interfaces/search-widget.interface.md) interface
page for full details of how to do this.
You can also implement your own custom search widgets. See the [Search Widget Interface](../content-services/interfaces/search-widget.interface.md) page for full details of how to do this.
#### Widget settings
Each type of [widget](../../lib/content-services/src/lib/search/models/search-widget.interface.ts) has its own settings.
Each type of widget has its own settings.
For example Number editors may parse minimum and maximum values, while Text editors can support value formats or length constraints.
You can use `component.settings` to pass any information to a [widget](../../lib/testing/src/lib/core/pages/form/widgets/widget.ts) using the
[`SearchWidgetSettings`](../../lib/content-services/src/lib/search/models/search-widget-settings.interface.ts) interface:
You can use `component.settings` to pass any information to a widget using the [`SearchWidgetSettings`](../../lib/content-services/src/lib/search/models/search-widget-settings.interface.ts) interface:
```ts
export interface SearchWidgetSettings {
@@ -327,6 +321,11 @@ export interface SearchWidgetSettings {
unit?: string;
/* describes query format */
format?: string;
/* allow the user to search only within predefined options */
allowOnlyPredefinedValues?: boolean;
/* allow the user to predefine autocomplete options */
autocompleteOptions?: AutocompleteOption[];
[indexer: string]: any;
}
```
@@ -594,3 +593,4 @@ then be added in each node entry response. An example partial response is shown
- [Search radio component](../content-services/components/search-radio.component.md)
- [Search slider component](../content-services/components/search-slider.component.md)
- [Search text component](../content-services/components/search-text.component.md)
- [Search input component](../components/search-input.component.md)