@searchcraft/javascript-sdk 0.9.7 → 0.10.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/README.md +2 -2
- package/dist/components/defineCustomElements.js +6 -6
- package/dist/components/index.d.ts +2514 -68
- package/dist/components/index.js +45 -14
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-e55a7970.js → p-1adf78b9.js} +2 -2
- package/dist/components/p-1adf78b9.js.map +1 -0
- package/dist/components/{p-60f05735.js → p-34a32648.js} +4 -4
- package/dist/components/p-34a32648.js.map +1 -0
- package/dist/components/p-39e70a00.js +67 -0
- package/dist/components/p-39e70a00.js.map +1 -0
- package/dist/components/{p-e41b0f43.js → p-3f63fa14.js} +14 -21
- package/dist/components/p-3f63fa14.js.map +1 -0
- package/dist/components/{p-bf6a086a.js → p-73db9122.js} +3 -10
- package/dist/components/p-73db9122.js.map +1 -0
- package/dist/components/p-810a7850.js +17 -0
- package/dist/components/p-810a7850.js.map +1 -0
- package/dist/components/{p-8f854dec.js → p-8aa0fff5.js} +4 -3
- package/dist/components/p-8aa0fff5.js.map +1 -0
- package/dist/components/{p-5fdaf1e6.js → p-a64b4cba.js} +2 -145
- package/dist/components/p-a64b4cba.js.map +1 -0
- package/dist/components/{p-71cc28c1.js → p-acf23bab.js} +2 -2
- package/dist/components/p-acf23bab.js.map +1 -0
- package/dist/components/{p-bb12ab5a.js → p-bc9e0e40.js} +4 -3
- package/dist/components/p-bc9e0e40.js.map +1 -0
- package/dist/components/{p-4df578e4.js → p-c317a36a.js} +7 -7
- package/dist/components/p-c317a36a.js.map +1 -0
- package/dist/components/{p-e27a0dab.js → p-d361b781.js} +5 -7
- package/dist/components/p-d361b781.js.map +1 -0
- package/dist/components/p-e72d0167.js +147 -0
- package/dist/components/p-e72d0167.js.map +1 -0
- package/dist/components/{p-0e393fe1.js → p-f2585cdf.js} +3 -9
- package/dist/components/p-f2585cdf.js.map +1 -0
- package/dist/components/{p-580c09dc.js → p-f8df3d49.js} +143 -143
- package/dist/components/p-f8df3d49.js.map +1 -0
- package/dist/components/searchcraft-ad.js +1 -1
- package/dist/components/searchcraft-button.js +1 -1
- package/dist/components/searchcraft-error-message.js +1 -1
- package/dist/components/searchcraft-facet-list.js +1 -1
- package/dist/components/searchcraft-filter-panel.js +6 -5
- package/dist/components/searchcraft-filter-panel.js.map +1 -1
- package/dist/components/searchcraft-input-form.js +2 -2
- package/dist/components/searchcraft-input-label.js +1 -1
- package/dist/components/searchcraft-pagination.js +3 -9
- package/dist/components/searchcraft-pagination.js.map +1 -1
- package/dist/components/searchcraft-popover-button.js +2 -2
- package/dist/components/searchcraft-popover-button.js.map +1 -1
- package/dist/components/searchcraft-popover-form.js +14 -15
- package/dist/components/searchcraft-popover-form.js.map +1 -1
- package/dist/components/searchcraft-popover-list-item.js +1 -1
- package/dist/components/searchcraft-popover-list-view.js +1 -1
- package/dist/components/searchcraft-results-info.js +15 -19
- package/dist/components/searchcraft-results-info.js.map +1 -1
- package/dist/components/searchcraft-search-result.d.ts +11 -0
- package/dist/components/searchcraft-search-result.js +8 -0
- package/dist/components/searchcraft-search-result.js.map +1 -0
- package/dist/components/searchcraft-search-results-per-page.js +3 -10
- package/dist/components/searchcraft-search-results-per-page.js.map +1 -1
- package/dist/components/searchcraft-search-results.d.ts +11 -0
- package/dist/components/{searchcraft-base-search-results.js → searchcraft-search-results.js} +25 -71
- package/dist/components/searchcraft-search-results.js.map +1 -0
- package/dist/components/searchcraft-select.js +1 -1
- package/dist/components/searchcraft-slider.js +1 -1
- package/dist/components/searchcraft-theme.js +4 -42
- package/dist/components/searchcraft-theme.js.map +1 -1
- package/dist/components/searchcraft-toggle-button.js +1 -1
- package/dist/hydrate/index.d.ts +242 -0
- package/dist/hydrate/index.js +23290 -0
- package/dist/hydrate/index.mjs +23282 -0
- package/dist/hydrate/package.json +12 -0
- package/dist/types/components/searchcraft-ad/searchcraft-ad.d.ts +2 -0
- package/dist/types/components/searchcraft-button/searchcraft-button.d.ts +3 -2
- package/dist/types/components/searchcraft-error-message/searchcraft-error-message.d.ts +6 -7
- package/dist/types/components/searchcraft-facet-list/searchcraft-facet-list.d.ts +3 -1
- package/dist/types/components/searchcraft-filter-panel/searchcraft-filter-panel.d.ts +29 -1
- package/dist/types/components/searchcraft-input-form/searchcraft-input-form.d.ts +22 -14
- package/dist/types/components/searchcraft-input-label/searchcraft-input-label.d.ts +3 -2
- package/dist/types/components/searchcraft-pagination/searchcraft-pagination.d.ts +21 -8
- package/dist/types/components/searchcraft-popover-button/searchcraft-popover-button.d.ts +30 -0
- package/dist/types/components/searchcraft-popover-form/searchcraft-popover-form.d.ts +26 -15
- package/dist/types/components/searchcraft-popover-list-item/searchcraft-popover-list-item.d.ts +2 -0
- package/dist/types/components/searchcraft-popover-list-view/searchcraft-popover-list-view.d.ts +3 -2
- package/dist/types/components/searchcraft-results-info/searchcraft-results-info.d.ts +41 -15
- package/dist/types/components/searchcraft-search-result/searchcraft-search-result.d.ts +25 -0
- package/dist/types/components/searchcraft-search-results/searchcraft-search-results.d.ts +80 -0
- package/dist/types/components/searchcraft-search-results-per-page/searchcraft-search-results-per-page.d.ts +20 -5
- package/dist/types/components/searchcraft-select/searchcraft-select.d.ts +3 -5
- package/dist/types/components/searchcraft-slider/searchcraft-slider.d.ts +3 -3
- package/dist/types/components/searchcraft-theme/searchcraft-theme.d.ts +23 -16
- package/dist/types/components/searchcraft-toggle-button/searchcraft-toggle-button.d.ts +2 -1
- package/dist/types/components.d.ts +836 -612
- package/dist/types/index.d.ts +5 -4
- package/dist/types/utils/html.d.ts +6 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/package.json +9 -7
- package/dist/components/bundled.types.d.ts +0 -2275
- package/dist/components/p-0e393fe1.js.map +0 -1
- package/dist/components/p-19fe91f1.js +0 -136
- package/dist/components/p-19fe91f1.js.map +0 -1
- package/dist/components/p-4df578e4.js.map +0 -1
- package/dist/components/p-580c09dc.js.map +0 -1
- package/dist/components/p-5fdaf1e6.js.map +0 -1
- package/dist/components/p-60f05735.js.map +0 -1
- package/dist/components/p-71cc28c1.js.map +0 -1
- package/dist/components/p-8f854dec.js.map +0 -1
- package/dist/components/p-bb12ab5a.js.map +0 -1
- package/dist/components/p-bf6a086a.js.map +0 -1
- package/dist/components/p-d9551738.js +0 -25
- package/dist/components/p-d9551738.js.map +0 -1
- package/dist/components/p-e27a0dab.js.map +0 -1
- package/dist/components/p-e41b0f43.js.map +0 -1
- package/dist/components/p-e55a7970.js.map +0 -1
- package/dist/components/searchcraft-base-search-result.d.ts +0 -11
- package/dist/components/searchcraft-base-search-result.js +0 -8
- package/dist/components/searchcraft-base-search-result.js.map +0 -1
- package/dist/components/searchcraft-base-search-results.d.ts +0 -11
- package/dist/components/searchcraft-base-search-results.js.map +0 -1
- package/dist/types/components/searchcraft-base-search-result/searchcraft-base-search-result.d.ts +0 -55
- package/dist/types/components/searchcraft-base-search-results/searchcraft-base-search-results.d.ts +0 -89
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* It contains typing information for all components that exist in this project.
|
|
6
6
|
*/
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
-
import { AdClientResponseItem, FilterItem, PopoverResultMappings, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore,
|
|
8
|
+
import { AdClientResponseItem, FilterItem, PopoverResultMappings, ResultsInfoTemplate, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore, SearchResultTemplate, SearchResultTemplateData } from "@searchcraft/core";
|
|
9
9
|
import { SearchcraftSelectOption } from "./components/searchcraft-select/searchcraft-select";
|
|
10
|
-
export { AdClientResponseItem, FilterItem, PopoverResultMappings, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore,
|
|
10
|
+
export { AdClientResponseItem, FilterItem, PopoverResultMappings, ResultsInfoTemplate, SearchClientResponseItem, SearchcraftAdSource, SearchcraftCore, SearchResultTemplate, SearchResultTemplateData } from "@searchcraft/core";
|
|
11
11
|
export { SearchcraftSelectOption } from "./components/searchcraft-select/searchcraft-select";
|
|
12
12
|
export namespace Components {
|
|
13
13
|
/**
|
|
@@ -19,109 +19,8 @@ export namespace Components {
|
|
|
19
19
|
"adSource": SearchcraftAdSource;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
|
-
* This web component
|
|
23
|
-
* Once a query is submitted, the component formats and presents the result.
|
|
24
|
-
* It is consumed within the `searchcraft-base-search-results` component.
|
|
25
|
-
*/
|
|
26
|
-
interface SearchcraftBaseSearchResult {
|
|
27
|
-
/**
|
|
28
|
-
* The relationship between the current document and the link for the button rendered when containerHref is not present.
|
|
29
|
-
*/
|
|
30
|
-
"buttonRel"?: 'noreferrer' | 'noopener' | 'nofollow';
|
|
31
|
-
/**
|
|
32
|
-
* Where to open the link for the button rendered when containerHref is not present.
|
|
33
|
-
*/
|
|
34
|
-
"buttonTarget": '_blank' | '_self' | '_top' | '_parent';
|
|
35
|
-
/**
|
|
36
|
-
* The relationship between the current document and the link for the containing element.
|
|
37
|
-
*/
|
|
38
|
-
"containerRel"?: 'noreferrer' | 'noopener' | 'nofollow';
|
|
39
|
-
/**
|
|
40
|
-
* Where to open the link for the containing element.
|
|
41
|
-
*/
|
|
42
|
-
"containerTarget": '_blank' | '_self' | '_top' | '_parent';
|
|
43
|
-
/**
|
|
44
|
-
* A custom styles object.
|
|
45
|
-
*/
|
|
46
|
-
"customStyles"?: string;
|
|
47
|
-
/**
|
|
48
|
-
* The position in the document. Used with the "document_clicked" measure event.
|
|
49
|
-
*/
|
|
50
|
-
"documentPosition": number;
|
|
51
|
-
/**
|
|
52
|
-
* The placement of the image.
|
|
53
|
-
*/
|
|
54
|
-
"imagePlacement": 'left' | 'right';
|
|
55
|
-
"item"?: SearchClientResponseItem;
|
|
56
|
-
"searchResultMappings"?: SearchResultMappings;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* This web component is responsible for displaying the results of a search query.
|
|
60
|
-
* Once a query is submitted, the component formats and presents an ordered list of the results.
|
|
61
|
-
* ## Usage
|
|
62
|
-
* ```html
|
|
63
|
-
* <!-- index.html -->
|
|
64
|
-
* <searchcraft-base-search-results
|
|
65
|
-
* ad-interval="4"
|
|
66
|
-
* place-ad-at-start="false"
|
|
67
|
-
* result-image-placement="right"
|
|
68
|
-
* />
|
|
69
|
-
* ```
|
|
70
|
-
* ```js
|
|
71
|
-
* // index.js
|
|
72
|
-
* const baseSearchResults = document.querySelector('searchcraft-base-search-results');
|
|
73
|
-
* baseSearchResults.searchResultMappings = containerHref: {
|
|
74
|
-
* fieldNames: [
|
|
75
|
-
* {
|
|
76
|
-
* fieldName: 'canonical_link',
|
|
77
|
-
* dataType: 'text',
|
|
78
|
-
* },
|
|
79
|
-
* ],
|
|
80
|
-
* };
|
|
81
|
-
* baseSearchResults.addEventListener('noResults', () => {
|
|
82
|
-
* console.log('No search results found');
|
|
83
|
-
* });
|
|
84
|
-
* ```
|
|
85
|
-
*/
|
|
86
|
-
interface SearchcraftBaseSearchResults {
|
|
87
|
-
/**
|
|
88
|
-
* The label for the button rendered when containerHref is not present for each result.
|
|
89
|
-
*/
|
|
90
|
-
"buttonLabel"?: string;
|
|
91
|
-
/**
|
|
92
|
-
* The relationship between the current document and the link for the button rendered when containerHref is not present for each result.
|
|
93
|
-
*/
|
|
94
|
-
"buttonRel"?: 'noreferrer' | 'noopener' | 'nofollow';
|
|
95
|
-
/**
|
|
96
|
-
* Where to open the link for the button rendered when containerHref is not present for each result.
|
|
97
|
-
*/
|
|
98
|
-
"buttonTarget": '_blank' | '_self' | '_top' | '_parent';
|
|
99
|
-
/**
|
|
100
|
-
* The relationship between the current document and the link for the containing element for each result.
|
|
101
|
-
*/
|
|
102
|
-
"containerRel"?: 'noreferrer' | 'noopener' | 'nofollow';
|
|
103
|
-
/**
|
|
104
|
-
* Where to open the link for the containing element for each result.
|
|
105
|
-
*/
|
|
106
|
-
"containerTarget": '_blank' | '_self' | '_top' | '_parent';
|
|
107
|
-
/**
|
|
108
|
-
* A custom styles object.
|
|
109
|
-
*/
|
|
110
|
-
"customStylesForResults"?: | string
|
|
111
|
-
| Record<string, Record<string, string>>;
|
|
112
|
-
/**
|
|
113
|
-
* The placement of the image for each result.
|
|
114
|
-
*/
|
|
115
|
-
"resultImagePlacement": 'left' | 'right';
|
|
116
|
-
/**
|
|
117
|
-
* Formats the content rendered for each result.
|
|
118
|
-
*/
|
|
119
|
-
"searchResultMappings"?: SearchResultMappings;
|
|
120
|
-
}
|
|
121
|
-
/**
|
|
122
|
-
* This web component represents a button to be consumed within the `search-input-form` component.
|
|
22
|
+
* This web component represents a button.
|
|
123
23
|
* It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
|
|
124
|
-
* It is consumed within the `searchcraft-input-form` component.
|
|
125
24
|
*/
|
|
126
25
|
interface SearchcraftButton {
|
|
127
26
|
/**
|
|
@@ -155,23 +54,18 @@ export namespace Components {
|
|
|
155
54
|
}
|
|
156
55
|
/**
|
|
157
56
|
* This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
|
|
158
|
-
*
|
|
159
|
-
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
57
|
+
* @js-example ```html
|
|
58
|
+
* <searchcraft-error-message>
|
|
59
|
+
* No search results found for query
|
|
60
|
+
* </searchcraft-error-message>
|
|
162
61
|
* ```
|
|
163
62
|
*/
|
|
164
63
|
interface SearchcraftErrorMessage {
|
|
165
|
-
/**
|
|
166
|
-
* The error message.
|
|
167
|
-
*/
|
|
168
|
-
"errorMessage"?: string;
|
|
169
64
|
}
|
|
170
65
|
/**
|
|
171
66
|
* This web component is designed to display facets in a search interface, allowing users to refine their search results by applying filters based on various attributes.
|
|
172
67
|
* It is consumed within the `searchcraft-filter-panel`.
|
|
173
|
-
*
|
|
174
|
-
* ```html
|
|
68
|
+
* @js-example ```html
|
|
175
69
|
* <!-- index.html -->
|
|
176
70
|
* <searchcraft-facet-list field-name="title" />
|
|
177
71
|
* ```
|
|
@@ -191,11 +85,29 @@ export namespace Components {
|
|
|
191
85
|
}
|
|
192
86
|
/**
|
|
193
87
|
* This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
|
|
194
|
-
*
|
|
195
|
-
*
|
|
88
|
+
* @import ```jsx
|
|
89
|
+
* // react
|
|
90
|
+
* import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
|
|
91
|
+
* // vue
|
|
92
|
+
* import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
|
|
93
|
+
* ```
|
|
94
|
+
* @js-example ```html
|
|
196
95
|
* <!-- index.html -->
|
|
197
96
|
* <searchcraft-filter-panel />
|
|
198
97
|
* ```
|
|
98
|
+
* ```js
|
|
99
|
+
* // index.js
|
|
100
|
+
* const filterPanel = document.querySelector('searchcraft-filter-panel');
|
|
101
|
+
* if (filterPanel) {
|
|
102
|
+
* filterPanel.items = [];
|
|
103
|
+
* }
|
|
104
|
+
* ```
|
|
105
|
+
* @react-example ```jsx
|
|
106
|
+
* <SearchcraftFilterPanel items={[]} />
|
|
107
|
+
* ```
|
|
108
|
+
* @vue-example ```jsx
|
|
109
|
+
* <SearchcraftFilterPanel :items="[]" />
|
|
110
|
+
* ```
|
|
199
111
|
*/
|
|
200
112
|
interface SearchcraftFilterPanel {
|
|
201
113
|
/**
|
|
@@ -206,21 +118,27 @@ export namespace Components {
|
|
|
206
118
|
/**
|
|
207
119
|
* This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
|
|
208
120
|
* It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
121
|
+
* @import ```jsx
|
|
122
|
+
* // react
|
|
123
|
+
* import { SearchcraftInputForm } from "@searchcraft/react-sdk";
|
|
124
|
+
* // vue
|
|
125
|
+
* import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
|
|
213
126
|
* ```
|
|
214
|
-
* ```
|
|
215
|
-
*
|
|
216
|
-
*
|
|
127
|
+
* @js-example ```html
|
|
128
|
+
* <searchcraft-input-form auto-search />
|
|
129
|
+
* ```
|
|
130
|
+
* @react-example ```jsx
|
|
131
|
+
* <SearchcraftInputForm autoSearch />
|
|
132
|
+
* ```
|
|
133
|
+
* @vue-example ```jsx
|
|
134
|
+
* <SearchcraftInputForm autoSearch />
|
|
217
135
|
* ```
|
|
218
136
|
*/
|
|
219
137
|
interface SearchcraftInputForm {
|
|
220
138
|
/**
|
|
221
139
|
* Whether or not to automatically submit the search term when the input changes.
|
|
222
140
|
*/
|
|
223
|
-
"autoSearch"
|
|
141
|
+
"autoSearch"?: boolean;
|
|
224
142
|
/**
|
|
225
143
|
* The label for the submit button.
|
|
226
144
|
*/
|
|
@@ -228,12 +146,8 @@ export namespace Components {
|
|
|
228
146
|
/**
|
|
229
147
|
* Where to place the search button.
|
|
230
148
|
*/
|
|
231
|
-
"buttonPlacement"
|
|
149
|
+
"buttonPlacement"?: 'left' | 'right' | 'none';
|
|
232
150
|
"core"?: SearchcraftCore;
|
|
233
|
-
/**
|
|
234
|
-
* A custom styles object to be applied to the input element.
|
|
235
|
-
*/
|
|
236
|
-
"customStyles": string | Record<string, string>;
|
|
237
151
|
/**
|
|
238
152
|
* The label rendered above the input.
|
|
239
153
|
*/
|
|
@@ -241,13 +155,11 @@ export namespace Components {
|
|
|
241
155
|
/**
|
|
242
156
|
* The input element's placeholder value.
|
|
243
157
|
*/
|
|
244
|
-
"placeholderValue"
|
|
158
|
+
"placeholderValue"?: string;
|
|
245
159
|
}
|
|
246
160
|
/**
|
|
247
161
|
* This web component serves as the input label for the searchcraft-input-form component.
|
|
248
|
-
*
|
|
249
|
-
* ```html
|
|
250
|
-
* <!-- index.html -->
|
|
162
|
+
* @js-example ```html
|
|
251
163
|
* <searchcraft-input-label label="Search" />
|
|
252
164
|
* ```
|
|
253
165
|
*/
|
|
@@ -259,63 +171,92 @@ export namespace Components {
|
|
|
259
171
|
"label": string;
|
|
260
172
|
}
|
|
261
173
|
/**
|
|
262
|
-
* This web component is designed to facilitate pagination of search results.
|
|
263
|
-
*
|
|
264
|
-
*
|
|
265
|
-
*
|
|
266
|
-
*
|
|
174
|
+
* This web component is designed to facilitate pagination of search results. Once a query is submitted, calculates the number for pages.
|
|
175
|
+
* @import ```jsx
|
|
176
|
+
* // react
|
|
177
|
+
* import { SearchcraftPagination } from "@searchcraft/react-sdk";
|
|
178
|
+
* // vue
|
|
179
|
+
* import { SearchcraftPagination } from "@searchcraft/vue-sdk";
|
|
180
|
+
* ```
|
|
181
|
+
* @js-example ```html
|
|
267
182
|
* <searchcraft-pagination />
|
|
268
183
|
* ```
|
|
184
|
+
* @react-example ```jsx
|
|
185
|
+
* <SearchcraftPagination />
|
|
186
|
+
* ```
|
|
187
|
+
* @vue-example ```jsx
|
|
188
|
+
* <SearchcraftPagination />
|
|
189
|
+
* ```
|
|
269
190
|
*/
|
|
270
191
|
interface SearchcraftPagination {
|
|
271
|
-
/**
|
|
272
|
-
* The custom styles object.
|
|
273
|
-
*/
|
|
274
|
-
"customStyles"?: string;
|
|
275
192
|
}
|
|
276
193
|
/**
|
|
277
194
|
* Renders a button which, when clicked, turns on popover visibility.
|
|
195
|
+
* @import ```jsx
|
|
196
|
+
* // react
|
|
197
|
+
* import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
|
|
198
|
+
* // vue
|
|
199
|
+
* import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
|
|
200
|
+
* ```
|
|
201
|
+
* @js-example ```html
|
|
202
|
+
* <searchcraft-popover-button>
|
|
203
|
+
* Open popover
|
|
204
|
+
* </searchcraft-popover-button>
|
|
205
|
+
* ```
|
|
206
|
+
* @react-example ```jsx
|
|
207
|
+
* <SearchcraftPopoverButton>
|
|
208
|
+
* Open popover
|
|
209
|
+
* </SearchcraftPopoverButton>
|
|
210
|
+
* ```
|
|
211
|
+
* @vue-example ```jsx
|
|
212
|
+
* <SearchcraftPopoverButton>
|
|
213
|
+
* Open popover
|
|
214
|
+
* </SearchcraftPopoverButton>
|
|
215
|
+
* ```
|
|
278
216
|
*/
|
|
279
217
|
interface SearchcraftPopoverButton {
|
|
280
218
|
}
|
|
281
219
|
/**
|
|
282
220
|
* This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
|
|
283
|
-
*
|
|
284
|
-
*
|
|
221
|
+
* @import ```jsx
|
|
222
|
+
* // react
|
|
223
|
+
* import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
|
|
224
|
+
* // vue
|
|
225
|
+
* import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
|
|
226
|
+
* ```
|
|
227
|
+
* @js-example ```html
|
|
285
228
|
* <!-- index.html -->
|
|
286
|
-
* <searchcraft-popover-form type="
|
|
229
|
+
* <searchcraft-popover-form type="inline" />
|
|
287
230
|
* ```
|
|
288
231
|
* ```js
|
|
289
232
|
* // index.js
|
|
290
233
|
* const popoverForm = document.querySelector('searchcraft-popover-form');
|
|
291
|
-
* popoverForm.popoverResultMappings = {
|
|
292
|
-
*
|
|
293
|
-
*
|
|
294
|
-
*
|
|
295
|
-
*
|
|
296
|
-
*
|
|
297
|
-
*
|
|
298
|
-
* ],
|
|
299
|
-
* };
|
|
234
|
+
* popoverForm.popoverResultMappings = {};
|
|
235
|
+
* ```
|
|
236
|
+
* @react-example ```jsx
|
|
237
|
+
* <SearchcraftPopoverForm type="inline" popoverResultMappings={[]} />
|
|
238
|
+
* ```
|
|
239
|
+
* @vue-example ```jsx
|
|
240
|
+
* <SearchcraftPopoverForm type="inline" :popoverResultMappings="[]"" />
|
|
300
241
|
* ```
|
|
301
242
|
*/
|
|
302
243
|
interface SearchcraftPopoverForm {
|
|
303
244
|
/**
|
|
304
245
|
* The hotkey that activates the popover.
|
|
305
246
|
*/
|
|
306
|
-
"hotkey"
|
|
247
|
+
"hotkey"?: string;
|
|
307
248
|
/**
|
|
308
249
|
* The hotkey modifier that activates the popover. Used together with the `hotkey` prop.
|
|
309
250
|
*/
|
|
310
|
-
"hotkeyModifier"
|
|
251
|
+
"hotkeyModifier"?: 'ctrl' | 'meta' | 'alt' | 'option';
|
|
311
252
|
/**
|
|
312
253
|
* Formats the content rendered for each result.
|
|
313
254
|
*/
|
|
314
255
|
"popoverResultMappings"?: PopoverResultMappings;
|
|
315
256
|
/**
|
|
316
|
-
* The type of popover form to render.
|
|
257
|
+
* The type of popover form to render. - `inline` - Renders inline with the rest of the content on the page. The search results pop over the page content. - `fullscreen` - Renders in fullscreen view. Used together with the `searchcraft-popover-button` component. - `modal` - Renders in a modal view. Used together with the `searchcraft-popover-button` component.
|
|
317
258
|
*/
|
|
318
|
-
"type"
|
|
259
|
+
"type"?: 'inline' | 'fullscreen' | 'modal';
|
|
319
260
|
}
|
|
320
261
|
/**
|
|
321
262
|
* A single list item rendered in a searchcraft-popover-list-view.
|
|
@@ -331,9 +272,7 @@ export namespace Components {
|
|
|
331
272
|
/**
|
|
332
273
|
* This web component is designed to display a list of results within a popover interface.
|
|
333
274
|
* It is consumed within the `searchcraft-popover-form` component.
|
|
334
|
-
*
|
|
335
|
-
* ```html
|
|
336
|
-
* <!-- index.html -->
|
|
275
|
+
* @js-example ```html
|
|
337
276
|
* <searchcraft-popover-list-view />
|
|
338
277
|
* ```
|
|
339
278
|
*/
|
|
@@ -352,45 +291,128 @@ export namespace Components {
|
|
|
352
291
|
}
|
|
353
292
|
/**
|
|
354
293
|
* This web component is designed to display the number of results returned from a search query.
|
|
355
|
-
*
|
|
356
|
-
*
|
|
294
|
+
* @import ```jsx
|
|
295
|
+
* // react
|
|
296
|
+
* import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
|
|
297
|
+
* // vue
|
|
298
|
+
* import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
|
|
299
|
+
* ```
|
|
300
|
+
* @js-example ```html
|
|
357
301
|
* <!-- index.html -->
|
|
358
|
-
* <script>
|
|
359
|
-
* const resultsInfo = document.querySelector('searchcraft-results-info');
|
|
360
|
-
* resultsInfo.customFormatter = (range, count, responseTime) =>
|
|
361
|
-
* `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
|
|
362
|
-
* </script>
|
|
363
302
|
* <searchcraft-results-info />
|
|
364
303
|
* ```
|
|
304
|
+
* ```js
|
|
305
|
+
* // index.js
|
|
306
|
+
* const resultsInfo = document.querySelector('searchcraft-results-info');
|
|
307
|
+
* resultsInfo.template = (info, { html }) => html`
|
|
308
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
309
|
+
* `;
|
|
310
|
+
* ```
|
|
311
|
+
* @react-example ```jsx
|
|
312
|
+
* <SearchcraftResultsInfo
|
|
313
|
+
* template={(info, { html }) => html`
|
|
314
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
315
|
+
* `}
|
|
316
|
+
* />
|
|
317
|
+
* @vue-example ```jsx
|
|
318
|
+
* <SearchcraftResultsInfo
|
|
319
|
+
* :template={(info, { html }) => html`
|
|
320
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
321
|
+
* `}
|
|
322
|
+
* />
|
|
365
323
|
*/
|
|
366
324
|
interface SearchcraftResultsInfo {
|
|
367
325
|
/**
|
|
368
|
-
*
|
|
369
|
-
* @example ```ts resultsInfo.
|
|
326
|
+
* A callback function responsible for rendering the results info.
|
|
327
|
+
* @example ```ts resultsInfo.template = html` ${range[0]}-${range[1]} of ${count} results in ${responseTime}ms `; ```
|
|
328
|
+
*/
|
|
329
|
+
"template"?: ResultsInfoTemplate;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* This web component is designed to display detailed information for a single search result. Once a query is submitted, the component formats and presents the result.
|
|
333
|
+
*/
|
|
334
|
+
interface SearchcraftSearchResult {
|
|
335
|
+
/**
|
|
336
|
+
* The position in the document. Used with the "document_clicked" measure event.
|
|
370
337
|
*/
|
|
371
|
-
"
|
|
372
|
-
range: [string, string],
|
|
373
|
-
count: string,
|
|
374
|
-
responseTime: string,
|
|
375
|
-
) => void;
|
|
338
|
+
"documentPosition": number;
|
|
376
339
|
/**
|
|
377
|
-
* The
|
|
340
|
+
* The index.
|
|
378
341
|
*/
|
|
379
|
-
"
|
|
342
|
+
"index": number;
|
|
343
|
+
"item"?: SearchClientResponseItem;
|
|
344
|
+
/**
|
|
345
|
+
* A callback function responsible for rendering a result.
|
|
346
|
+
*/
|
|
347
|
+
"template"?: SearchResultTemplate<SearchResultTemplateData>;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* This web component is responsible for displaying the results of a search query. Once a query is submitted, the component formats and presents an ordered list of the results.
|
|
351
|
+
* @import ```jsx
|
|
352
|
+
* // react
|
|
353
|
+
* import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
|
|
354
|
+
* // vue
|
|
355
|
+
* import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
|
|
356
|
+
* ```
|
|
357
|
+
* @js-example ```html
|
|
358
|
+
* <!-- index.html -->
|
|
359
|
+
* <searchcraft-search-results
|
|
360
|
+
* ad-interval="4"
|
|
361
|
+
* place-ad-at-start="true"
|
|
362
|
+
* />
|
|
363
|
+
* ```
|
|
364
|
+
* ```js
|
|
365
|
+
* // index.js
|
|
366
|
+
* const searchResults = document.querySelector('searchcraft-search-results');
|
|
367
|
+
* searchResults.template = (item, index, { html }) => html`
|
|
368
|
+
* <h2>${item.title}</h2>
|
|
369
|
+
* `;
|
|
370
|
+
* ```
|
|
371
|
+
* @react-example ```jsx
|
|
372
|
+
* <SearchcraftSearchResults
|
|
373
|
+
* adInterval={4}
|
|
374
|
+
* placeAdAtState={true}
|
|
375
|
+
* template={(item, index, { html }) => html`
|
|
376
|
+
* <h2>${item.title}</h2>
|
|
377
|
+
* `}
|
|
378
|
+
* />
|
|
379
|
+
* ```
|
|
380
|
+
* @vue-example ```jsx
|
|
381
|
+
* <SearchcraftSearchResults
|
|
382
|
+
* adInterval={4}
|
|
383
|
+
* placeAdAtState={true}
|
|
384
|
+
* :template={(item, index, { html }) => html`
|
|
385
|
+
* <h2>${item.title}</h2>
|
|
386
|
+
* `}
|
|
387
|
+
* />
|
|
388
|
+
* ```
|
|
389
|
+
*/
|
|
390
|
+
interface SearchcraftSearchResults {
|
|
391
|
+
/**
|
|
392
|
+
* A callback function responsible for rendering a result. Passed to `searchcraft-search-result`.
|
|
393
|
+
*/
|
|
394
|
+
"template"?: SearchResultTemplate<SearchResultTemplateData>;
|
|
380
395
|
}
|
|
381
396
|
/**
|
|
382
397
|
* This web component is designed to choose the number of search results displayed.
|
|
383
|
-
*
|
|
384
|
-
*
|
|
398
|
+
* @import ```jsx
|
|
399
|
+
* // react
|
|
400
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
|
|
401
|
+
* // vue
|
|
402
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
|
|
403
|
+
* ```
|
|
404
|
+
* @js-example ```html
|
|
385
405
|
* <!-- index.html -->
|
|
386
406
|
* <searchcraft-search-results-per-page increment="20" />
|
|
387
407
|
* ```
|
|
408
|
+
* @react-example ```jsx
|
|
409
|
+
* <SearchcraftSearchResultsPerPage increment={20} />
|
|
410
|
+
* ```
|
|
411
|
+
* @vue-example ```jsx
|
|
412
|
+
* <SearchcraftSearchResultsPerPage increment="20" />
|
|
413
|
+
* ```
|
|
388
414
|
*/
|
|
389
415
|
interface SearchcraftSearchResultsPerPage {
|
|
390
|
-
/**
|
|
391
|
-
* The custom styles object.
|
|
392
|
-
*/
|
|
393
|
-
"customStyles"?: string;
|
|
394
416
|
/**
|
|
395
417
|
* The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]). The base value is defined by the `searchResultsPerPage` option in the configuration.
|
|
396
418
|
*/
|
|
@@ -398,8 +420,7 @@ export namespace Components {
|
|
|
398
420
|
}
|
|
399
421
|
/**
|
|
400
422
|
* This web component is designed to allow users to select between a group of options.
|
|
401
|
-
*
|
|
402
|
-
* ```html
|
|
423
|
+
* @js-example ```html
|
|
403
424
|
* <!-- index.html -->
|
|
404
425
|
* <searchcraft-select
|
|
405
426
|
* inputId="searchcraft-select"
|
|
@@ -413,10 +434,6 @@ export namespace Components {
|
|
|
413
434
|
* The caption displayed below the select input.
|
|
414
435
|
*/
|
|
415
436
|
"caption"?: string;
|
|
416
|
-
/**
|
|
417
|
-
* A custom styles object.
|
|
418
|
-
*/
|
|
419
|
-
"customStyles"?: string;
|
|
420
437
|
/**
|
|
421
438
|
* Whether the select input is disabled.
|
|
422
439
|
*/
|
|
@@ -443,9 +460,7 @@ export namespace Components {
|
|
|
443
460
|
"options": SearchcraftSelectOption[] | string;
|
|
444
461
|
}
|
|
445
462
|
/**
|
|
446
|
-
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
|
|
447
|
-
* The component renders a slider interface, which can be used to visually choose a value between two boundaries.
|
|
448
|
-
* It is consumed by the `searchcraft-filter-panel` component.
|
|
463
|
+
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value. The component renders a slider interface, which can be used to visually choose a value between two boundaries.
|
|
449
464
|
*/
|
|
450
465
|
interface SearchcraftSlider {
|
|
451
466
|
/**
|
|
@@ -466,27 +481,27 @@ export namespace Components {
|
|
|
466
481
|
"min": number;
|
|
467
482
|
}
|
|
468
483
|
/**
|
|
469
|
-
* This web component adds Searchcraft's built-in css theme to your page
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
*
|
|
473
|
-
*
|
|
474
|
-
*
|
|
484
|
+
* This web component adds Searchcraft's built-in css theme to your page. It does not render anything visible, its only function is to manage the css styles on the page.'
|
|
485
|
+
* @import ```jsx
|
|
486
|
+
* // react
|
|
487
|
+
* import { SearchcraftTheme } from "@searchcraft/react-sdk";
|
|
488
|
+
* // vue
|
|
489
|
+
* import { SearchcraftTheme } from "@searchcraft/vue-sdk";
|
|
490
|
+
* ```
|
|
491
|
+
* @js-example ```html
|
|
492
|
+
* <searchcraft-theme />
|
|
493
|
+
* ```
|
|
494
|
+
* @react-example ```jsx
|
|
495
|
+
* <SearchcraftTheme />
|
|
496
|
+
* ```
|
|
497
|
+
* @vue-example ```jsx
|
|
498
|
+
* <SearchcraftTheme />
|
|
475
499
|
* ```
|
|
476
500
|
*/
|
|
477
501
|
interface SearchcraftTheme {
|
|
478
|
-
/**
|
|
479
|
-
* The custom theme configuration object.
|
|
480
|
-
*/
|
|
481
|
-
"customTheme"?: string;
|
|
482
|
-
/**
|
|
483
|
-
* The name of the theme.
|
|
484
|
-
*/
|
|
485
|
-
"theme"?: string;
|
|
486
502
|
}
|
|
487
503
|
/**
|
|
488
504
|
* This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
|
|
489
|
-
* It is consumed within the `searchcraft-filter-panel` component.
|
|
490
505
|
*/
|
|
491
506
|
interface SearchcraftToggleButton {
|
|
492
507
|
/**
|
|
@@ -533,58 +548,12 @@ declare global {
|
|
|
533
548
|
prototype: HTMLSearchcraftAdElement;
|
|
534
549
|
new (): HTMLSearchcraftAdElement;
|
|
535
550
|
};
|
|
536
|
-
/**
|
|
537
|
-
* This web component is designed to display detailed information for a single search result.
|
|
538
|
-
* Once a query is submitted, the component formats and presents the result.
|
|
539
|
-
* It is consumed within the `searchcraft-base-search-results` component.
|
|
540
|
-
*/
|
|
541
|
-
interface HTMLSearchcraftBaseSearchResultElement extends Components.SearchcraftBaseSearchResult, HTMLStencilElement {
|
|
542
|
-
}
|
|
543
|
-
var HTMLSearchcraftBaseSearchResultElement: {
|
|
544
|
-
prototype: HTMLSearchcraftBaseSearchResultElement;
|
|
545
|
-
new (): HTMLSearchcraftBaseSearchResultElement;
|
|
546
|
-
};
|
|
547
|
-
/**
|
|
548
|
-
* This web component is responsible for displaying the results of a search query.
|
|
549
|
-
* Once a query is submitted, the component formats and presents an ordered list of the results.
|
|
550
|
-
* ## Usage
|
|
551
|
-
* ```html
|
|
552
|
-
* <!-- index.html -->
|
|
553
|
-
* <searchcraft-base-search-results
|
|
554
|
-
* ad-interval="4"
|
|
555
|
-
* place-ad-at-start="false"
|
|
556
|
-
* result-image-placement="right"
|
|
557
|
-
* />
|
|
558
|
-
* ```
|
|
559
|
-
* ```js
|
|
560
|
-
* // index.js
|
|
561
|
-
* const baseSearchResults = document.querySelector('searchcraft-base-search-results');
|
|
562
|
-
* baseSearchResults.searchResultMappings = containerHref: {
|
|
563
|
-
* fieldNames: [
|
|
564
|
-
* {
|
|
565
|
-
* fieldName: 'canonical_link',
|
|
566
|
-
* dataType: 'text',
|
|
567
|
-
* },
|
|
568
|
-
* ],
|
|
569
|
-
* };
|
|
570
|
-
* baseSearchResults.addEventListener('noResults', () => {
|
|
571
|
-
* console.log('No search results found');
|
|
572
|
-
* });
|
|
573
|
-
* ```
|
|
574
|
-
*/
|
|
575
|
-
interface HTMLSearchcraftBaseSearchResultsElement extends Components.SearchcraftBaseSearchResults, HTMLStencilElement {
|
|
576
|
-
}
|
|
577
|
-
var HTMLSearchcraftBaseSearchResultsElement: {
|
|
578
|
-
prototype: HTMLSearchcraftBaseSearchResultsElement;
|
|
579
|
-
new (): HTMLSearchcraftBaseSearchResultsElement;
|
|
580
|
-
};
|
|
581
551
|
interface HTMLSearchcraftButtonElementEventMap {
|
|
582
552
|
"buttonClick": void;
|
|
583
553
|
}
|
|
584
554
|
/**
|
|
585
|
-
* This web component represents a button
|
|
555
|
+
* This web component represents a button.
|
|
586
556
|
* It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
|
|
587
|
-
* It is consumed within the `searchcraft-input-form` component.
|
|
588
557
|
*/
|
|
589
558
|
interface HTMLSearchcraftButtonElement extends Components.SearchcraftButton, HTMLStencilElement {
|
|
590
559
|
addEventListener<K extends keyof HTMLSearchcraftButtonElementEventMap>(type: K, listener: (this: HTMLSearchcraftButtonElement, ev: SearchcraftButtonCustomEvent<HTMLSearchcraftButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -602,10 +571,10 @@ declare global {
|
|
|
602
571
|
};
|
|
603
572
|
/**
|
|
604
573
|
* This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
|
|
605
|
-
*
|
|
606
|
-
*
|
|
607
|
-
*
|
|
608
|
-
*
|
|
574
|
+
* @js-example ```html
|
|
575
|
+
* <searchcraft-error-message>
|
|
576
|
+
* No search results found for query
|
|
577
|
+
* </searchcraft-error-message>
|
|
609
578
|
* ```
|
|
610
579
|
*/
|
|
611
580
|
interface HTMLSearchcraftErrorMessageElement extends Components.SearchcraftErrorMessage, HTMLStencilElement {
|
|
@@ -620,8 +589,7 @@ declare global {
|
|
|
620
589
|
/**
|
|
621
590
|
* This web component is designed to display facets in a search interface, allowing users to refine their search results by applying filters based on various attributes.
|
|
622
591
|
* It is consumed within the `searchcraft-filter-panel`.
|
|
623
|
-
*
|
|
624
|
-
* ```html
|
|
592
|
+
* @js-example ```html
|
|
625
593
|
* <!-- index.html -->
|
|
626
594
|
* <searchcraft-facet-list field-name="title" />
|
|
627
595
|
* ```
|
|
@@ -649,11 +617,29 @@ declare global {
|
|
|
649
617
|
};
|
|
650
618
|
/**
|
|
651
619
|
* This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
|
|
652
|
-
*
|
|
653
|
-
*
|
|
620
|
+
* @import ```jsx
|
|
621
|
+
* // react
|
|
622
|
+
* import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
|
|
623
|
+
* // vue
|
|
624
|
+
* import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
|
|
625
|
+
* ```
|
|
626
|
+
* @js-example ```html
|
|
654
627
|
* <!-- index.html -->
|
|
655
628
|
* <searchcraft-filter-panel />
|
|
656
629
|
* ```
|
|
630
|
+
* ```js
|
|
631
|
+
* // index.js
|
|
632
|
+
* const filterPanel = document.querySelector('searchcraft-filter-panel');
|
|
633
|
+
* if (filterPanel) {
|
|
634
|
+
* filterPanel.items = [];
|
|
635
|
+
* }
|
|
636
|
+
* ```
|
|
637
|
+
* @react-example ```jsx
|
|
638
|
+
* <SearchcraftFilterPanel items={[]} />
|
|
639
|
+
* ```
|
|
640
|
+
* @vue-example ```jsx
|
|
641
|
+
* <SearchcraftFilterPanel :items="[]" />
|
|
642
|
+
* ```
|
|
657
643
|
*/
|
|
658
644
|
interface HTMLSearchcraftFilterPanelElement extends Components.SearchcraftFilterPanel, HTMLStencilElement {
|
|
659
645
|
}
|
|
@@ -669,14 +655,20 @@ declare global {
|
|
|
669
655
|
/**
|
|
670
656
|
* This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
|
|
671
657
|
* It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
|
|
672
|
-
*
|
|
673
|
-
*
|
|
674
|
-
*
|
|
675
|
-
*
|
|
658
|
+
* @import ```jsx
|
|
659
|
+
* // react
|
|
660
|
+
* import { SearchcraftInputForm } from "@searchcraft/react-sdk";
|
|
661
|
+
* // vue
|
|
662
|
+
* import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
|
|
676
663
|
* ```
|
|
677
|
-
* ```
|
|
678
|
-
*
|
|
679
|
-
*
|
|
664
|
+
* @js-example ```html
|
|
665
|
+
* <searchcraft-input-form auto-search />
|
|
666
|
+
* ```
|
|
667
|
+
* @react-example ```jsx
|
|
668
|
+
* <SearchcraftInputForm autoSearch />
|
|
669
|
+
* ```
|
|
670
|
+
* @vue-example ```jsx
|
|
671
|
+
* <SearchcraftInputForm autoSearch />
|
|
680
672
|
* ```
|
|
681
673
|
*/
|
|
682
674
|
interface HTMLSearchcraftInputFormElement extends Components.SearchcraftInputForm, HTMLStencilElement {
|
|
@@ -695,9 +687,7 @@ declare global {
|
|
|
695
687
|
};
|
|
696
688
|
/**
|
|
697
689
|
* This web component serves as the input label for the searchcraft-input-form component.
|
|
698
|
-
*
|
|
699
|
-
* ```html
|
|
700
|
-
* <!-- index.html -->
|
|
690
|
+
* @js-example ```html
|
|
701
691
|
* <searchcraft-input-label label="Search" />
|
|
702
692
|
* ```
|
|
703
693
|
*/
|
|
@@ -708,13 +698,22 @@ declare global {
|
|
|
708
698
|
new (): HTMLSearchcraftInputLabelElement;
|
|
709
699
|
};
|
|
710
700
|
/**
|
|
711
|
-
* This web component is designed to facilitate pagination of search results.
|
|
712
|
-
*
|
|
713
|
-
*
|
|
714
|
-
*
|
|
715
|
-
*
|
|
701
|
+
* This web component is designed to facilitate pagination of search results. Once a query is submitted, calculates the number for pages.
|
|
702
|
+
* @import ```jsx
|
|
703
|
+
* // react
|
|
704
|
+
* import { SearchcraftPagination } from "@searchcraft/react-sdk";
|
|
705
|
+
* // vue
|
|
706
|
+
* import { SearchcraftPagination } from "@searchcraft/vue-sdk";
|
|
707
|
+
* ```
|
|
708
|
+
* @js-example ```html
|
|
716
709
|
* <searchcraft-pagination />
|
|
717
710
|
* ```
|
|
711
|
+
* @react-example ```jsx
|
|
712
|
+
* <SearchcraftPagination />
|
|
713
|
+
* ```
|
|
714
|
+
* @vue-example ```jsx
|
|
715
|
+
* <SearchcraftPagination />
|
|
716
|
+
* ```
|
|
718
717
|
*/
|
|
719
718
|
interface HTMLSearchcraftPaginationElement extends Components.SearchcraftPagination, HTMLStencilElement {
|
|
720
719
|
}
|
|
@@ -724,6 +723,27 @@ declare global {
|
|
|
724
723
|
};
|
|
725
724
|
/**
|
|
726
725
|
* Renders a button which, when clicked, turns on popover visibility.
|
|
726
|
+
* @import ```jsx
|
|
727
|
+
* // react
|
|
728
|
+
* import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
|
|
729
|
+
* // vue
|
|
730
|
+
* import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
|
|
731
|
+
* ```
|
|
732
|
+
* @js-example ```html
|
|
733
|
+
* <searchcraft-popover-button>
|
|
734
|
+
* Open popover
|
|
735
|
+
* </searchcraft-popover-button>
|
|
736
|
+
* ```
|
|
737
|
+
* @react-example ```jsx
|
|
738
|
+
* <SearchcraftPopoverButton>
|
|
739
|
+
* Open popover
|
|
740
|
+
* </SearchcraftPopoverButton>
|
|
741
|
+
* ```
|
|
742
|
+
* @vue-example ```jsx
|
|
743
|
+
* <SearchcraftPopoverButton>
|
|
744
|
+
* Open popover
|
|
745
|
+
* </SearchcraftPopoverButton>
|
|
746
|
+
* ```
|
|
727
747
|
*/
|
|
728
748
|
interface HTMLSearchcraftPopoverButtonElement extends Components.SearchcraftPopoverButton, HTMLStencilElement {
|
|
729
749
|
}
|
|
@@ -733,23 +753,26 @@ declare global {
|
|
|
733
753
|
};
|
|
734
754
|
/**
|
|
735
755
|
* This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
|
|
736
|
-
*
|
|
737
|
-
*
|
|
756
|
+
* @import ```jsx
|
|
757
|
+
* // react
|
|
758
|
+
* import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
|
|
759
|
+
* // vue
|
|
760
|
+
* import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
|
|
761
|
+
* ```
|
|
762
|
+
* @js-example ```html
|
|
738
763
|
* <!-- index.html -->
|
|
739
|
-
* <searchcraft-popover-form type="
|
|
764
|
+
* <searchcraft-popover-form type="inline" />
|
|
740
765
|
* ```
|
|
741
766
|
* ```js
|
|
742
767
|
* // index.js
|
|
743
768
|
* const popoverForm = document.querySelector('searchcraft-popover-form');
|
|
744
|
-
* popoverForm.popoverResultMappings = {
|
|
745
|
-
*
|
|
746
|
-
*
|
|
747
|
-
*
|
|
748
|
-
*
|
|
749
|
-
*
|
|
750
|
-
*
|
|
751
|
-
* ],
|
|
752
|
-
* };
|
|
769
|
+
* popoverForm.popoverResultMappings = {};
|
|
770
|
+
* ```
|
|
771
|
+
* @react-example ```jsx
|
|
772
|
+
* <SearchcraftPopoverForm type="inline" popoverResultMappings={[]} />
|
|
773
|
+
* ```
|
|
774
|
+
* @vue-example ```jsx
|
|
775
|
+
* <SearchcraftPopoverForm type="inline" :popoverResultMappings="[]"" />
|
|
753
776
|
* ```
|
|
754
777
|
*/
|
|
755
778
|
interface HTMLSearchcraftPopoverFormElement extends Components.SearchcraftPopoverForm, HTMLStencilElement {
|
|
@@ -770,9 +793,7 @@ declare global {
|
|
|
770
793
|
/**
|
|
771
794
|
* This web component is designed to display a list of results within a popover interface.
|
|
772
795
|
* It is consumed within the `searchcraft-popover-form` component.
|
|
773
|
-
*
|
|
774
|
-
* ```html
|
|
775
|
-
* <!-- index.html -->
|
|
796
|
+
* @js-example ```html
|
|
776
797
|
* <searchcraft-popover-list-view />
|
|
777
798
|
* ```
|
|
778
799
|
*/
|
|
@@ -784,16 +805,35 @@ declare global {
|
|
|
784
805
|
};
|
|
785
806
|
/**
|
|
786
807
|
* This web component is designed to display the number of results returned from a search query.
|
|
787
|
-
*
|
|
788
|
-
*
|
|
808
|
+
* @import ```jsx
|
|
809
|
+
* // react
|
|
810
|
+
* import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
|
|
811
|
+
* // vue
|
|
812
|
+
* import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
|
|
813
|
+
* ```
|
|
814
|
+
* @js-example ```html
|
|
789
815
|
* <!-- index.html -->
|
|
790
|
-
* <script>
|
|
791
|
-
* const resultsInfo = document.querySelector('searchcraft-results-info');
|
|
792
|
-
* resultsInfo.customFormatter = (range, count, responseTime) =>
|
|
793
|
-
* `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
|
|
794
|
-
* </script>
|
|
795
816
|
* <searchcraft-results-info />
|
|
796
817
|
* ```
|
|
818
|
+
* ```js
|
|
819
|
+
* // index.js
|
|
820
|
+
* const resultsInfo = document.querySelector('searchcraft-results-info');
|
|
821
|
+
* resultsInfo.template = (info, { html }) => html`
|
|
822
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
823
|
+
* `;
|
|
824
|
+
* ```
|
|
825
|
+
* @react-example ```jsx
|
|
826
|
+
* <SearchcraftResultsInfo
|
|
827
|
+
* template={(info, { html }) => html`
|
|
828
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
829
|
+
* `}
|
|
830
|
+
* />
|
|
831
|
+
* @vue-example ```jsx
|
|
832
|
+
* <SearchcraftResultsInfo
|
|
833
|
+
* :template={(info, { html }) => html`
|
|
834
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
835
|
+
* `}
|
|
836
|
+
* />
|
|
797
837
|
*/
|
|
798
838
|
interface HTMLSearchcraftResultsInfoElement extends Components.SearchcraftResultsInfo, HTMLStencilElement {
|
|
799
839
|
}
|
|
@@ -801,13 +841,80 @@ declare global {
|
|
|
801
841
|
prototype: HTMLSearchcraftResultsInfoElement;
|
|
802
842
|
new (): HTMLSearchcraftResultsInfoElement;
|
|
803
843
|
};
|
|
844
|
+
/**
|
|
845
|
+
* This web component is designed to display detailed information for a single search result. Once a query is submitted, the component formats and presents the result.
|
|
846
|
+
*/
|
|
847
|
+
interface HTMLSearchcraftSearchResultElement extends Components.SearchcraftSearchResult, HTMLStencilElement {
|
|
848
|
+
}
|
|
849
|
+
var HTMLSearchcraftSearchResultElement: {
|
|
850
|
+
prototype: HTMLSearchcraftSearchResultElement;
|
|
851
|
+
new (): HTMLSearchcraftSearchResultElement;
|
|
852
|
+
};
|
|
853
|
+
/**
|
|
854
|
+
* This web component is responsible for displaying the results of a search query. Once a query is submitted, the component formats and presents an ordered list of the results.
|
|
855
|
+
* @import ```jsx
|
|
856
|
+
* // react
|
|
857
|
+
* import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
|
|
858
|
+
* // vue
|
|
859
|
+
* import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
|
|
860
|
+
* ```
|
|
861
|
+
* @js-example ```html
|
|
862
|
+
* <!-- index.html -->
|
|
863
|
+
* <searchcraft-search-results
|
|
864
|
+
* ad-interval="4"
|
|
865
|
+
* place-ad-at-start="true"
|
|
866
|
+
* />
|
|
867
|
+
* ```
|
|
868
|
+
* ```js
|
|
869
|
+
* // index.js
|
|
870
|
+
* const searchResults = document.querySelector('searchcraft-search-results');
|
|
871
|
+
* searchResults.template = (item, index, { html }) => html`
|
|
872
|
+
* <h2>${item.title}</h2>
|
|
873
|
+
* `;
|
|
874
|
+
* ```
|
|
875
|
+
* @react-example ```jsx
|
|
876
|
+
* <SearchcraftSearchResults
|
|
877
|
+
* adInterval={4}
|
|
878
|
+
* placeAdAtState={true}
|
|
879
|
+
* template={(item, index, { html }) => html`
|
|
880
|
+
* <h2>${item.title}</h2>
|
|
881
|
+
* `}
|
|
882
|
+
* />
|
|
883
|
+
* ```
|
|
884
|
+
* @vue-example ```jsx
|
|
885
|
+
* <SearchcraftSearchResults
|
|
886
|
+
* adInterval={4}
|
|
887
|
+
* placeAdAtState={true}
|
|
888
|
+
* :template={(item, index, { html }) => html`
|
|
889
|
+
* <h2>${item.title}</h2>
|
|
890
|
+
* `}
|
|
891
|
+
* />
|
|
892
|
+
* ```
|
|
893
|
+
*/
|
|
894
|
+
interface HTMLSearchcraftSearchResultsElement extends Components.SearchcraftSearchResults, HTMLStencilElement {
|
|
895
|
+
}
|
|
896
|
+
var HTMLSearchcraftSearchResultsElement: {
|
|
897
|
+
prototype: HTMLSearchcraftSearchResultsElement;
|
|
898
|
+
new (): HTMLSearchcraftSearchResultsElement;
|
|
899
|
+
};
|
|
804
900
|
/**
|
|
805
901
|
* This web component is designed to choose the number of search results displayed.
|
|
806
|
-
*
|
|
807
|
-
*
|
|
902
|
+
* @import ```jsx
|
|
903
|
+
* // react
|
|
904
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
|
|
905
|
+
* // vue
|
|
906
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
|
|
907
|
+
* ```
|
|
908
|
+
* @js-example ```html
|
|
808
909
|
* <!-- index.html -->
|
|
809
910
|
* <searchcraft-search-results-per-page increment="20" />
|
|
810
911
|
* ```
|
|
912
|
+
* @react-example ```jsx
|
|
913
|
+
* <SearchcraftSearchResultsPerPage increment={20} />
|
|
914
|
+
* ```
|
|
915
|
+
* @vue-example ```jsx
|
|
916
|
+
* <SearchcraftSearchResultsPerPage increment="20" />
|
|
917
|
+
* ```
|
|
811
918
|
*/
|
|
812
919
|
interface HTMLSearchcraftSearchResultsPerPageElement extends Components.SearchcraftSearchResultsPerPage, HTMLStencilElement {
|
|
813
920
|
}
|
|
@@ -820,8 +927,7 @@ declare global {
|
|
|
820
927
|
}
|
|
821
928
|
/**
|
|
822
929
|
* This web component is designed to allow users to select between a group of options.
|
|
823
|
-
*
|
|
824
|
-
* ```html
|
|
930
|
+
* @js-example ```html
|
|
825
931
|
* <!-- index.html -->
|
|
826
932
|
* <searchcraft-select
|
|
827
933
|
* inputId="searchcraft-select"
|
|
@@ -848,9 +954,7 @@ declare global {
|
|
|
848
954
|
"rangeChanged": any;
|
|
849
955
|
}
|
|
850
956
|
/**
|
|
851
|
-
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
|
|
852
|
-
* The component renders a slider interface, which can be used to visually choose a value between two boundaries.
|
|
853
|
-
* It is consumed by the `searchcraft-filter-panel` component.
|
|
957
|
+
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value. The component renders a slider interface, which can be used to visually choose a value between two boundaries.
|
|
854
958
|
*/
|
|
855
959
|
interface HTMLSearchcraftSliderElement extends Components.SearchcraftSlider, HTMLStencilElement {
|
|
856
960
|
addEventListener<K extends keyof HTMLSearchcraftSliderElementEventMap>(type: K, listener: (this: HTMLSearchcraftSliderElement, ev: SearchcraftSliderCustomEvent<HTMLSearchcraftSliderElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -867,12 +971,21 @@ declare global {
|
|
|
867
971
|
new (): HTMLSearchcraftSliderElement;
|
|
868
972
|
};
|
|
869
973
|
/**
|
|
870
|
-
* This web component adds Searchcraft's built-in css theme to your page
|
|
871
|
-
*
|
|
872
|
-
*
|
|
873
|
-
*
|
|
874
|
-
*
|
|
875
|
-
*
|
|
974
|
+
* This web component adds Searchcraft's built-in css theme to your page. It does not render anything visible, its only function is to manage the css styles on the page.'
|
|
975
|
+
* @import ```jsx
|
|
976
|
+
* // react
|
|
977
|
+
* import { SearchcraftTheme } from "@searchcraft/react-sdk";
|
|
978
|
+
* // vue
|
|
979
|
+
* import { SearchcraftTheme } from "@searchcraft/vue-sdk";
|
|
980
|
+
* ```
|
|
981
|
+
* @js-example ```html
|
|
982
|
+
* <searchcraft-theme />
|
|
983
|
+
* ```
|
|
984
|
+
* @react-example ```jsx
|
|
985
|
+
* <SearchcraftTheme />
|
|
986
|
+
* ```
|
|
987
|
+
* @vue-example ```jsx
|
|
988
|
+
* <SearchcraftTheme />
|
|
876
989
|
* ```
|
|
877
990
|
*/
|
|
878
991
|
interface HTMLSearchcraftThemeElement extends Components.SearchcraftTheme, HTMLStencilElement {
|
|
@@ -886,7 +999,6 @@ declare global {
|
|
|
886
999
|
}
|
|
887
1000
|
/**
|
|
888
1001
|
* This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
|
|
889
|
-
* It is consumed within the `searchcraft-filter-panel` component.
|
|
890
1002
|
*/
|
|
891
1003
|
interface HTMLSearchcraftToggleButtonElement extends Components.SearchcraftToggleButton, HTMLStencilElement {
|
|
892
1004
|
addEventListener<K extends keyof HTMLSearchcraftToggleButtonElementEventMap>(type: K, listener: (this: HTMLSearchcraftToggleButtonElement, ev: SearchcraftToggleButtonCustomEvent<HTMLSearchcraftToggleButtonElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
|
|
@@ -904,8 +1016,6 @@ declare global {
|
|
|
904
1016
|
};
|
|
905
1017
|
interface HTMLElementTagNameMap {
|
|
906
1018
|
"searchcraft-ad": HTMLSearchcraftAdElement;
|
|
907
|
-
"searchcraft-base-search-result": HTMLSearchcraftBaseSearchResultElement;
|
|
908
|
-
"searchcraft-base-search-results": HTMLSearchcraftBaseSearchResultsElement;
|
|
909
1019
|
"searchcraft-button": HTMLSearchcraftButtonElement;
|
|
910
1020
|
"searchcraft-error-message": HTMLSearchcraftErrorMessageElement;
|
|
911
1021
|
"searchcraft-facet-list": HTMLSearchcraftFacetListElement;
|
|
@@ -918,6 +1028,8 @@ declare global {
|
|
|
918
1028
|
"searchcraft-popover-list-item": HTMLSearchcraftPopoverListItemElement;
|
|
919
1029
|
"searchcraft-popover-list-view": HTMLSearchcraftPopoverListViewElement;
|
|
920
1030
|
"searchcraft-results-info": HTMLSearchcraftResultsInfoElement;
|
|
1031
|
+
"searchcraft-search-result": HTMLSearchcraftSearchResultElement;
|
|
1032
|
+
"searchcraft-search-results": HTMLSearchcraftSearchResultsElement;
|
|
921
1033
|
"searchcraft-search-results-per-page": HTMLSearchcraftSearchResultsPerPageElement;
|
|
922
1034
|
"searchcraft-select": HTMLSearchcraftSelectElement;
|
|
923
1035
|
"searchcraft-slider": HTMLSearchcraftSliderElement;
|
|
@@ -935,109 +1047,8 @@ declare namespace LocalJSX {
|
|
|
935
1047
|
"adSource"?: SearchcraftAdSource;
|
|
936
1048
|
}
|
|
937
1049
|
/**
|
|
938
|
-
* This web component
|
|
939
|
-
* Once a query is submitted, the component formats and presents the result.
|
|
940
|
-
* It is consumed within the `searchcraft-base-search-results` component.
|
|
941
|
-
*/
|
|
942
|
-
interface SearchcraftBaseSearchResult {
|
|
943
|
-
/**
|
|
944
|
-
* The relationship between the current document and the link for the button rendered when containerHref is not present.
|
|
945
|
-
*/
|
|
946
|
-
"buttonRel"?: 'noreferrer' | 'noopener' | 'nofollow';
|
|
947
|
-
/**
|
|
948
|
-
* Where to open the link for the button rendered when containerHref is not present.
|
|
949
|
-
*/
|
|
950
|
-
"buttonTarget"?: '_blank' | '_self' | '_top' | '_parent';
|
|
951
|
-
/**
|
|
952
|
-
* The relationship between the current document and the link for the containing element.
|
|
953
|
-
*/
|
|
954
|
-
"containerRel"?: 'noreferrer' | 'noopener' | 'nofollow';
|
|
955
|
-
/**
|
|
956
|
-
* Where to open the link for the containing element.
|
|
957
|
-
*/
|
|
958
|
-
"containerTarget"?: '_blank' | '_self' | '_top' | '_parent';
|
|
959
|
-
/**
|
|
960
|
-
* A custom styles object.
|
|
961
|
-
*/
|
|
962
|
-
"customStyles"?: string;
|
|
963
|
-
/**
|
|
964
|
-
* The position in the document. Used with the "document_clicked" measure event.
|
|
965
|
-
*/
|
|
966
|
-
"documentPosition"?: number;
|
|
967
|
-
/**
|
|
968
|
-
* The placement of the image.
|
|
969
|
-
*/
|
|
970
|
-
"imagePlacement"?: 'left' | 'right';
|
|
971
|
-
"item"?: SearchClientResponseItem;
|
|
972
|
-
"searchResultMappings"?: SearchResultMappings;
|
|
973
|
-
}
|
|
974
|
-
/**
|
|
975
|
-
* This web component is responsible for displaying the results of a search query.
|
|
976
|
-
* Once a query is submitted, the component formats and presents an ordered list of the results.
|
|
977
|
-
* ## Usage
|
|
978
|
-
* ```html
|
|
979
|
-
* <!-- index.html -->
|
|
980
|
-
* <searchcraft-base-search-results
|
|
981
|
-
* ad-interval="4"
|
|
982
|
-
* place-ad-at-start="false"
|
|
983
|
-
* result-image-placement="right"
|
|
984
|
-
* />
|
|
985
|
-
* ```
|
|
986
|
-
* ```js
|
|
987
|
-
* // index.js
|
|
988
|
-
* const baseSearchResults = document.querySelector('searchcraft-base-search-results');
|
|
989
|
-
* baseSearchResults.searchResultMappings = containerHref: {
|
|
990
|
-
* fieldNames: [
|
|
991
|
-
* {
|
|
992
|
-
* fieldName: 'canonical_link',
|
|
993
|
-
* dataType: 'text',
|
|
994
|
-
* },
|
|
995
|
-
* ],
|
|
996
|
-
* };
|
|
997
|
-
* baseSearchResults.addEventListener('noResults', () => {
|
|
998
|
-
* console.log('No search results found');
|
|
999
|
-
* });
|
|
1000
|
-
* ```
|
|
1001
|
-
*/
|
|
1002
|
-
interface SearchcraftBaseSearchResults {
|
|
1003
|
-
/**
|
|
1004
|
-
* The label for the button rendered when containerHref is not present for each result.
|
|
1005
|
-
*/
|
|
1006
|
-
"buttonLabel"?: string;
|
|
1007
|
-
/**
|
|
1008
|
-
* The relationship between the current document and the link for the button rendered when containerHref is not present for each result.
|
|
1009
|
-
*/
|
|
1010
|
-
"buttonRel"?: 'noreferrer' | 'noopener' | 'nofollow';
|
|
1011
|
-
/**
|
|
1012
|
-
* Where to open the link for the button rendered when containerHref is not present for each result.
|
|
1013
|
-
*/
|
|
1014
|
-
"buttonTarget"?: '_blank' | '_self' | '_top' | '_parent';
|
|
1015
|
-
/**
|
|
1016
|
-
* The relationship between the current document and the link for the containing element for each result.
|
|
1017
|
-
*/
|
|
1018
|
-
"containerRel"?: 'noreferrer' | 'noopener' | 'nofollow';
|
|
1019
|
-
/**
|
|
1020
|
-
* Where to open the link for the containing element for each result.
|
|
1021
|
-
*/
|
|
1022
|
-
"containerTarget"?: '_blank' | '_self' | '_top' | '_parent';
|
|
1023
|
-
/**
|
|
1024
|
-
* A custom styles object.
|
|
1025
|
-
*/
|
|
1026
|
-
"customStylesForResults"?: | string
|
|
1027
|
-
| Record<string, Record<string, string>>;
|
|
1028
|
-
/**
|
|
1029
|
-
* The placement of the image for each result.
|
|
1030
|
-
*/
|
|
1031
|
-
"resultImagePlacement"?: 'left' | 'right';
|
|
1032
|
-
/**
|
|
1033
|
-
* Formats the content rendered for each result.
|
|
1034
|
-
*/
|
|
1035
|
-
"searchResultMappings"?: SearchResultMappings;
|
|
1036
|
-
}
|
|
1037
|
-
/**
|
|
1038
|
-
* This web component represents a button to be consumed within the `search-input-form` component.
|
|
1050
|
+
* This web component represents a button.
|
|
1039
1051
|
* It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
|
|
1040
|
-
* It is consumed within the `searchcraft-input-form` component.
|
|
1041
1052
|
*/
|
|
1042
1053
|
interface SearchcraftButton {
|
|
1043
1054
|
/**
|
|
@@ -1075,23 +1086,18 @@ declare namespace LocalJSX {
|
|
|
1075
1086
|
}
|
|
1076
1087
|
/**
|
|
1077
1088
|
* This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
|
|
1078
|
-
*
|
|
1079
|
-
*
|
|
1080
|
-
*
|
|
1081
|
-
*
|
|
1089
|
+
* @js-example ```html
|
|
1090
|
+
* <searchcraft-error-message>
|
|
1091
|
+
* No search results found for query
|
|
1092
|
+
* </searchcraft-error-message>
|
|
1082
1093
|
* ```
|
|
1083
1094
|
*/
|
|
1084
1095
|
interface SearchcraftErrorMessage {
|
|
1085
|
-
/**
|
|
1086
|
-
* The error message.
|
|
1087
|
-
*/
|
|
1088
|
-
"errorMessage"?: string;
|
|
1089
1096
|
}
|
|
1090
1097
|
/**
|
|
1091
1098
|
* This web component is designed to display facets in a search interface, allowing users to refine their search results by applying filters based on various attributes.
|
|
1092
1099
|
* It is consumed within the `searchcraft-filter-panel`.
|
|
1093
|
-
*
|
|
1094
|
-
* ```html
|
|
1100
|
+
* @js-example ```html
|
|
1095
1101
|
* <!-- index.html -->
|
|
1096
1102
|
* <searchcraft-facet-list field-name="title" />
|
|
1097
1103
|
* ```
|
|
@@ -1115,11 +1121,29 @@ declare namespace LocalJSX {
|
|
|
1115
1121
|
}
|
|
1116
1122
|
/**
|
|
1117
1123
|
* This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
|
|
1118
|
-
*
|
|
1119
|
-
*
|
|
1124
|
+
* @import ```jsx
|
|
1125
|
+
* // react
|
|
1126
|
+
* import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
|
|
1127
|
+
* // vue
|
|
1128
|
+
* import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
|
|
1129
|
+
* ```
|
|
1130
|
+
* @js-example ```html
|
|
1120
1131
|
* <!-- index.html -->
|
|
1121
1132
|
* <searchcraft-filter-panel />
|
|
1122
1133
|
* ```
|
|
1134
|
+
* ```js
|
|
1135
|
+
* // index.js
|
|
1136
|
+
* const filterPanel = document.querySelector('searchcraft-filter-panel');
|
|
1137
|
+
* if (filterPanel) {
|
|
1138
|
+
* filterPanel.items = [];
|
|
1139
|
+
* }
|
|
1140
|
+
* ```
|
|
1141
|
+
* @react-example ```jsx
|
|
1142
|
+
* <SearchcraftFilterPanel items={[]} />
|
|
1143
|
+
* ```
|
|
1144
|
+
* @vue-example ```jsx
|
|
1145
|
+
* <SearchcraftFilterPanel :items="[]" />
|
|
1146
|
+
* ```
|
|
1123
1147
|
*/
|
|
1124
1148
|
interface SearchcraftFilterPanel {
|
|
1125
1149
|
/**
|
|
@@ -1130,14 +1154,20 @@ declare namespace LocalJSX {
|
|
|
1130
1154
|
/**
|
|
1131
1155
|
* This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
|
|
1132
1156
|
* It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
|
|
1133
|
-
*
|
|
1134
|
-
*
|
|
1135
|
-
*
|
|
1136
|
-
*
|
|
1157
|
+
* @import ```jsx
|
|
1158
|
+
* // react
|
|
1159
|
+
* import { SearchcraftInputForm } from "@searchcraft/react-sdk";
|
|
1160
|
+
* // vue
|
|
1161
|
+
* import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
|
|
1137
1162
|
* ```
|
|
1138
|
-
* ```
|
|
1139
|
-
*
|
|
1140
|
-
*
|
|
1163
|
+
* @js-example ```html
|
|
1164
|
+
* <searchcraft-input-form auto-search />
|
|
1165
|
+
* ```
|
|
1166
|
+
* @react-example ```jsx
|
|
1167
|
+
* <SearchcraftInputForm autoSearch />
|
|
1168
|
+
* ```
|
|
1169
|
+
* @vue-example ```jsx
|
|
1170
|
+
* <SearchcraftInputForm autoSearch />
|
|
1141
1171
|
* ```
|
|
1142
1172
|
*/
|
|
1143
1173
|
interface SearchcraftInputForm {
|
|
@@ -1154,10 +1184,6 @@ declare namespace LocalJSX {
|
|
|
1154
1184
|
*/
|
|
1155
1185
|
"buttonPlacement"?: 'left' | 'right' | 'none';
|
|
1156
1186
|
"core"?: SearchcraftCore;
|
|
1157
|
-
/**
|
|
1158
|
-
* A custom styles object to be applied to the input element.
|
|
1159
|
-
*/
|
|
1160
|
-
"customStyles"?: string | Record<string, string>;
|
|
1161
1187
|
/**
|
|
1162
1188
|
* The label rendered above the input.
|
|
1163
1189
|
*/
|
|
@@ -1181,9 +1207,7 @@ declare namespace LocalJSX {
|
|
|
1181
1207
|
}
|
|
1182
1208
|
/**
|
|
1183
1209
|
* This web component serves as the input label for the searchcraft-input-form component.
|
|
1184
|
-
*
|
|
1185
|
-
* ```html
|
|
1186
|
-
* <!-- index.html -->
|
|
1210
|
+
* @js-example ```html
|
|
1187
1211
|
* <searchcraft-input-label label="Search" />
|
|
1188
1212
|
* ```
|
|
1189
1213
|
*/
|
|
@@ -1195,44 +1219,73 @@ declare namespace LocalJSX {
|
|
|
1195
1219
|
"label"?: string;
|
|
1196
1220
|
}
|
|
1197
1221
|
/**
|
|
1198
|
-
* This web component is designed to facilitate pagination of search results.
|
|
1199
|
-
*
|
|
1200
|
-
*
|
|
1201
|
-
*
|
|
1202
|
-
*
|
|
1222
|
+
* This web component is designed to facilitate pagination of search results. Once a query is submitted, calculates the number for pages.
|
|
1223
|
+
* @import ```jsx
|
|
1224
|
+
* // react
|
|
1225
|
+
* import { SearchcraftPagination } from "@searchcraft/react-sdk";
|
|
1226
|
+
* // vue
|
|
1227
|
+
* import { SearchcraftPagination } from "@searchcraft/vue-sdk";
|
|
1228
|
+
* ```
|
|
1229
|
+
* @js-example ```html
|
|
1203
1230
|
* <searchcraft-pagination />
|
|
1204
1231
|
* ```
|
|
1232
|
+
* @react-example ```jsx
|
|
1233
|
+
* <SearchcraftPagination />
|
|
1234
|
+
* ```
|
|
1235
|
+
* @vue-example ```jsx
|
|
1236
|
+
* <SearchcraftPagination />
|
|
1237
|
+
* ```
|
|
1205
1238
|
*/
|
|
1206
1239
|
interface SearchcraftPagination {
|
|
1207
|
-
/**
|
|
1208
|
-
* The custom styles object.
|
|
1209
|
-
*/
|
|
1210
|
-
"customStyles"?: string;
|
|
1211
1240
|
}
|
|
1212
1241
|
/**
|
|
1213
1242
|
* Renders a button which, when clicked, turns on popover visibility.
|
|
1243
|
+
* @import ```jsx
|
|
1244
|
+
* // react
|
|
1245
|
+
* import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
|
|
1246
|
+
* // vue
|
|
1247
|
+
* import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
|
|
1248
|
+
* ```
|
|
1249
|
+
* @js-example ```html
|
|
1250
|
+
* <searchcraft-popover-button>
|
|
1251
|
+
* Open popover
|
|
1252
|
+
* </searchcraft-popover-button>
|
|
1253
|
+
* ```
|
|
1254
|
+
* @react-example ```jsx
|
|
1255
|
+
* <SearchcraftPopoverButton>
|
|
1256
|
+
* Open popover
|
|
1257
|
+
* </SearchcraftPopoverButton>
|
|
1258
|
+
* ```
|
|
1259
|
+
* @vue-example ```jsx
|
|
1260
|
+
* <SearchcraftPopoverButton>
|
|
1261
|
+
* Open popover
|
|
1262
|
+
* </SearchcraftPopoverButton>
|
|
1263
|
+
* ```
|
|
1214
1264
|
*/
|
|
1215
1265
|
interface SearchcraftPopoverButton {
|
|
1216
1266
|
}
|
|
1217
1267
|
/**
|
|
1218
1268
|
* This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
|
|
1219
|
-
*
|
|
1220
|
-
*
|
|
1269
|
+
* @import ```jsx
|
|
1270
|
+
* // react
|
|
1271
|
+
* import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
|
|
1272
|
+
* // vue
|
|
1273
|
+
* import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
|
|
1274
|
+
* ```
|
|
1275
|
+
* @js-example ```html
|
|
1221
1276
|
* <!-- index.html -->
|
|
1222
|
-
* <searchcraft-popover-form type="
|
|
1277
|
+
* <searchcraft-popover-form type="inline" />
|
|
1223
1278
|
* ```
|
|
1224
1279
|
* ```js
|
|
1225
1280
|
* // index.js
|
|
1226
1281
|
* const popoverForm = document.querySelector('searchcraft-popover-form');
|
|
1227
|
-
* popoverForm.popoverResultMappings = {
|
|
1228
|
-
*
|
|
1229
|
-
*
|
|
1230
|
-
*
|
|
1231
|
-
*
|
|
1232
|
-
*
|
|
1233
|
-
*
|
|
1234
|
-
* ],
|
|
1235
|
-
* };
|
|
1282
|
+
* popoverForm.popoverResultMappings = {};
|
|
1283
|
+
* ```
|
|
1284
|
+
* @react-example ```jsx
|
|
1285
|
+
* <SearchcraftPopoverForm type="inline" popoverResultMappings={[]} />
|
|
1286
|
+
* ```
|
|
1287
|
+
* @vue-example ```jsx
|
|
1288
|
+
* <SearchcraftPopoverForm type="inline" :popoverResultMappings="[]"" />
|
|
1236
1289
|
* ```
|
|
1237
1290
|
*/
|
|
1238
1291
|
interface SearchcraftPopoverForm {
|
|
@@ -1249,7 +1302,7 @@ declare namespace LocalJSX {
|
|
|
1249
1302
|
*/
|
|
1250
1303
|
"popoverResultMappings"?: PopoverResultMappings;
|
|
1251
1304
|
/**
|
|
1252
|
-
* The type of popover form to render.
|
|
1305
|
+
* The type of popover form to render. - `inline` - Renders inline with the rest of the content on the page. The search results pop over the page content. - `fullscreen` - Renders in fullscreen view. Used together with the `searchcraft-popover-button` component. - `modal` - Renders in a modal view. Used together with the `searchcraft-popover-button` component.
|
|
1253
1306
|
*/
|
|
1254
1307
|
"type"?: 'inline' | 'fullscreen' | 'modal';
|
|
1255
1308
|
}
|
|
@@ -1267,9 +1320,7 @@ declare namespace LocalJSX {
|
|
|
1267
1320
|
/**
|
|
1268
1321
|
* This web component is designed to display a list of results within a popover interface.
|
|
1269
1322
|
* It is consumed within the `searchcraft-popover-form` component.
|
|
1270
|
-
*
|
|
1271
|
-
* ```html
|
|
1272
|
-
* <!-- index.html -->
|
|
1323
|
+
* @js-example ```html
|
|
1273
1324
|
* <searchcraft-popover-list-view />
|
|
1274
1325
|
* ```
|
|
1275
1326
|
*/
|
|
@@ -1288,45 +1339,128 @@ declare namespace LocalJSX {
|
|
|
1288
1339
|
}
|
|
1289
1340
|
/**
|
|
1290
1341
|
* This web component is designed to display the number of results returned from a search query.
|
|
1291
|
-
*
|
|
1292
|
-
*
|
|
1342
|
+
* @import ```jsx
|
|
1343
|
+
* // react
|
|
1344
|
+
* import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
|
|
1345
|
+
* // vue
|
|
1346
|
+
* import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
|
|
1347
|
+
* ```
|
|
1348
|
+
* @js-example ```html
|
|
1293
1349
|
* <!-- index.html -->
|
|
1294
|
-
* <script>
|
|
1295
|
-
* const resultsInfo = document.querySelector('searchcraft-results-info');
|
|
1296
|
-
* resultsInfo.customFormatter = (range, count, responseTime) =>
|
|
1297
|
-
* `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
|
|
1298
|
-
* </script>
|
|
1299
1350
|
* <searchcraft-results-info />
|
|
1300
1351
|
* ```
|
|
1352
|
+
* ```js
|
|
1353
|
+
* // index.js
|
|
1354
|
+
* const resultsInfo = document.querySelector('searchcraft-results-info');
|
|
1355
|
+
* resultsInfo.template = (info, { html }) => html`
|
|
1356
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
1357
|
+
* `;
|
|
1358
|
+
* ```
|
|
1359
|
+
* @react-example ```jsx
|
|
1360
|
+
* <SearchcraftResultsInfo
|
|
1361
|
+
* template={(info, { html }) => html`
|
|
1362
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
1363
|
+
* `}
|
|
1364
|
+
* />
|
|
1365
|
+
* @vue-example ```jsx
|
|
1366
|
+
* <SearchcraftResultsInfo
|
|
1367
|
+
* :template={(info, { html }) => html`
|
|
1368
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
1369
|
+
* `}
|
|
1370
|
+
* />
|
|
1301
1371
|
*/
|
|
1302
1372
|
interface SearchcraftResultsInfo {
|
|
1303
1373
|
/**
|
|
1304
|
-
*
|
|
1305
|
-
* @example ```ts resultsInfo.
|
|
1374
|
+
* A callback function responsible for rendering the results info.
|
|
1375
|
+
* @example ```ts resultsInfo.template = html` ${range[0]}-${range[1]} of ${count} results in ${responseTime}ms `; ```
|
|
1376
|
+
*/
|
|
1377
|
+
"template"?: ResultsInfoTemplate;
|
|
1378
|
+
}
|
|
1379
|
+
/**
|
|
1380
|
+
* This web component is designed to display detailed information for a single search result. Once a query is submitted, the component formats and presents the result.
|
|
1381
|
+
*/
|
|
1382
|
+
interface SearchcraftSearchResult {
|
|
1383
|
+
/**
|
|
1384
|
+
* The position in the document. Used with the "document_clicked" measure event.
|
|
1306
1385
|
*/
|
|
1307
|
-
"
|
|
1308
|
-
range: [string, string],
|
|
1309
|
-
count: string,
|
|
1310
|
-
responseTime: string,
|
|
1311
|
-
) => void;
|
|
1386
|
+
"documentPosition"?: number;
|
|
1312
1387
|
/**
|
|
1313
|
-
* The
|
|
1388
|
+
* The index.
|
|
1314
1389
|
*/
|
|
1315
|
-
"
|
|
1390
|
+
"index": number;
|
|
1391
|
+
"item"?: SearchClientResponseItem;
|
|
1392
|
+
/**
|
|
1393
|
+
* A callback function responsible for rendering a result.
|
|
1394
|
+
*/
|
|
1395
|
+
"template"?: SearchResultTemplate<SearchResultTemplateData>;
|
|
1396
|
+
}
|
|
1397
|
+
/**
|
|
1398
|
+
* This web component is responsible for displaying the results of a search query. Once a query is submitted, the component formats and presents an ordered list of the results.
|
|
1399
|
+
* @import ```jsx
|
|
1400
|
+
* // react
|
|
1401
|
+
* import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
|
|
1402
|
+
* // vue
|
|
1403
|
+
* import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
|
|
1404
|
+
* ```
|
|
1405
|
+
* @js-example ```html
|
|
1406
|
+
* <!-- index.html -->
|
|
1407
|
+
* <searchcraft-search-results
|
|
1408
|
+
* ad-interval="4"
|
|
1409
|
+
* place-ad-at-start="true"
|
|
1410
|
+
* />
|
|
1411
|
+
* ```
|
|
1412
|
+
* ```js
|
|
1413
|
+
* // index.js
|
|
1414
|
+
* const searchResults = document.querySelector('searchcraft-search-results');
|
|
1415
|
+
* searchResults.template = (item, index, { html }) => html`
|
|
1416
|
+
* <h2>${item.title}</h2>
|
|
1417
|
+
* `;
|
|
1418
|
+
* ```
|
|
1419
|
+
* @react-example ```jsx
|
|
1420
|
+
* <SearchcraftSearchResults
|
|
1421
|
+
* adInterval={4}
|
|
1422
|
+
* placeAdAtState={true}
|
|
1423
|
+
* template={(item, index, { html }) => html`
|
|
1424
|
+
* <h2>${item.title}</h2>
|
|
1425
|
+
* `}
|
|
1426
|
+
* />
|
|
1427
|
+
* ```
|
|
1428
|
+
* @vue-example ```jsx
|
|
1429
|
+
* <SearchcraftSearchResults
|
|
1430
|
+
* adInterval={4}
|
|
1431
|
+
* placeAdAtState={true}
|
|
1432
|
+
* :template={(item, index, { html }) => html`
|
|
1433
|
+
* <h2>${item.title}</h2>
|
|
1434
|
+
* `}
|
|
1435
|
+
* />
|
|
1436
|
+
* ```
|
|
1437
|
+
*/
|
|
1438
|
+
interface SearchcraftSearchResults {
|
|
1439
|
+
/**
|
|
1440
|
+
* A callback function responsible for rendering a result. Passed to `searchcraft-search-result`.
|
|
1441
|
+
*/
|
|
1442
|
+
"template"?: SearchResultTemplate<SearchResultTemplateData>;
|
|
1316
1443
|
}
|
|
1317
1444
|
/**
|
|
1318
1445
|
* This web component is designed to choose the number of search results displayed.
|
|
1319
|
-
*
|
|
1320
|
-
*
|
|
1446
|
+
* @import ```jsx
|
|
1447
|
+
* // react
|
|
1448
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
|
|
1449
|
+
* // vue
|
|
1450
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
|
|
1451
|
+
* ```
|
|
1452
|
+
* @js-example ```html
|
|
1321
1453
|
* <!-- index.html -->
|
|
1322
1454
|
* <searchcraft-search-results-per-page increment="20" />
|
|
1323
1455
|
* ```
|
|
1456
|
+
* @react-example ```jsx
|
|
1457
|
+
* <SearchcraftSearchResultsPerPage increment={20} />
|
|
1458
|
+
* ```
|
|
1459
|
+
* @vue-example ```jsx
|
|
1460
|
+
* <SearchcraftSearchResultsPerPage increment="20" />
|
|
1461
|
+
* ```
|
|
1324
1462
|
*/
|
|
1325
1463
|
interface SearchcraftSearchResultsPerPage {
|
|
1326
|
-
/**
|
|
1327
|
-
* The custom styles object.
|
|
1328
|
-
*/
|
|
1329
|
-
"customStyles"?: string;
|
|
1330
1464
|
/**
|
|
1331
1465
|
* The amount the options will increase (e.g. 20 = [20, 40, 60, 80, 100]). The base value is defined by the `searchResultsPerPage` option in the configuration.
|
|
1332
1466
|
*/
|
|
@@ -1334,8 +1468,7 @@ declare namespace LocalJSX {
|
|
|
1334
1468
|
}
|
|
1335
1469
|
/**
|
|
1336
1470
|
* This web component is designed to allow users to select between a group of options.
|
|
1337
|
-
*
|
|
1338
|
-
* ```html
|
|
1471
|
+
* @js-example ```html
|
|
1339
1472
|
* <!-- index.html -->
|
|
1340
1473
|
* <searchcraft-select
|
|
1341
1474
|
* inputId="searchcraft-select"
|
|
@@ -1349,10 +1482,6 @@ declare namespace LocalJSX {
|
|
|
1349
1482
|
* The caption displayed below the select input.
|
|
1350
1483
|
*/
|
|
1351
1484
|
"caption"?: string;
|
|
1352
|
-
/**
|
|
1353
|
-
* A custom styles object.
|
|
1354
|
-
*/
|
|
1355
|
-
"customStyles"?: string;
|
|
1356
1485
|
/**
|
|
1357
1486
|
* Whether the select input is disabled.
|
|
1358
1487
|
*/
|
|
@@ -1383,9 +1512,7 @@ declare namespace LocalJSX {
|
|
|
1383
1512
|
"options"?: SearchcraftSelectOption[] | string;
|
|
1384
1513
|
}
|
|
1385
1514
|
/**
|
|
1386
|
-
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
|
|
1387
|
-
* The component renders a slider interface, which can be used to visually choose a value between two boundaries.
|
|
1388
|
-
* It is consumed by the `searchcraft-filter-panel` component.
|
|
1515
|
+
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value. The component renders a slider interface, which can be used to visually choose a value between two boundaries.
|
|
1389
1516
|
*/
|
|
1390
1517
|
interface SearchcraftSlider {
|
|
1391
1518
|
/**
|
|
@@ -1410,27 +1537,27 @@ declare namespace LocalJSX {
|
|
|
1410
1537
|
"onRangeChanged"?: (event: SearchcraftSliderCustomEvent<any>) => void;
|
|
1411
1538
|
}
|
|
1412
1539
|
/**
|
|
1413
|
-
* This web component adds Searchcraft's built-in css theme to your page
|
|
1414
|
-
*
|
|
1415
|
-
*
|
|
1416
|
-
*
|
|
1417
|
-
*
|
|
1418
|
-
*
|
|
1540
|
+
* This web component adds Searchcraft's built-in css theme to your page. It does not render anything visible, its only function is to manage the css styles on the page.'
|
|
1541
|
+
* @import ```jsx
|
|
1542
|
+
* // react
|
|
1543
|
+
* import { SearchcraftTheme } from "@searchcraft/react-sdk";
|
|
1544
|
+
* // vue
|
|
1545
|
+
* import { SearchcraftTheme } from "@searchcraft/vue-sdk";
|
|
1546
|
+
* ```
|
|
1547
|
+
* @js-example ```html
|
|
1548
|
+
* <searchcraft-theme />
|
|
1549
|
+
* ```
|
|
1550
|
+
* @react-example ```jsx
|
|
1551
|
+
* <SearchcraftTheme />
|
|
1552
|
+
* ```
|
|
1553
|
+
* @vue-example ```jsx
|
|
1554
|
+
* <SearchcraftTheme />
|
|
1419
1555
|
* ```
|
|
1420
1556
|
*/
|
|
1421
1557
|
interface SearchcraftTheme {
|
|
1422
|
-
/**
|
|
1423
|
-
* The custom theme configuration object.
|
|
1424
|
-
*/
|
|
1425
|
-
"customTheme"?: string;
|
|
1426
|
-
/**
|
|
1427
|
-
* The name of the theme.
|
|
1428
|
-
*/
|
|
1429
|
-
"theme"?: string;
|
|
1430
1558
|
}
|
|
1431
1559
|
/**
|
|
1432
1560
|
* This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
|
|
1433
|
-
* It is consumed within the `searchcraft-filter-panel` component.
|
|
1434
1561
|
*/
|
|
1435
1562
|
interface SearchcraftToggleButton {
|
|
1436
1563
|
/**
|
|
@@ -1448,8 +1575,6 @@ declare namespace LocalJSX {
|
|
|
1448
1575
|
}
|
|
1449
1576
|
interface IntrinsicElements {
|
|
1450
1577
|
"searchcraft-ad": SearchcraftAd;
|
|
1451
|
-
"searchcraft-base-search-result": SearchcraftBaseSearchResult;
|
|
1452
|
-
"searchcraft-base-search-results": SearchcraftBaseSearchResults;
|
|
1453
1578
|
"searchcraft-button": SearchcraftButton;
|
|
1454
1579
|
"searchcraft-error-message": SearchcraftErrorMessage;
|
|
1455
1580
|
"searchcraft-facet-list": SearchcraftFacetList;
|
|
@@ -1462,6 +1587,8 @@ declare namespace LocalJSX {
|
|
|
1462
1587
|
"searchcraft-popover-list-item": SearchcraftPopoverListItem;
|
|
1463
1588
|
"searchcraft-popover-list-view": SearchcraftPopoverListView;
|
|
1464
1589
|
"searchcraft-results-info": SearchcraftResultsInfo;
|
|
1590
|
+
"searchcraft-search-result": SearchcraftSearchResult;
|
|
1591
|
+
"searchcraft-search-results": SearchcraftSearchResults;
|
|
1465
1592
|
"searchcraft-search-results-per-page": SearchcraftSearchResultsPerPage;
|
|
1466
1593
|
"searchcraft-select": SearchcraftSelect;
|
|
1467
1594
|
"searchcraft-slider": SearchcraftSlider;
|
|
@@ -1478,60 +1605,23 @@ declare module "@stencil/core" {
|
|
|
1478
1605
|
*/
|
|
1479
1606
|
"searchcraft-ad": LocalJSX.SearchcraftAd & JSXBase.HTMLAttributes<HTMLSearchcraftAdElement>;
|
|
1480
1607
|
/**
|
|
1481
|
-
* This web component
|
|
1482
|
-
* Once a query is submitted, the component formats and presents the result.
|
|
1483
|
-
* It is consumed within the `searchcraft-base-search-results` component.
|
|
1484
|
-
*/
|
|
1485
|
-
"searchcraft-base-search-result": LocalJSX.SearchcraftBaseSearchResult & JSXBase.HTMLAttributes<HTMLSearchcraftBaseSearchResultElement>;
|
|
1486
|
-
/**
|
|
1487
|
-
* This web component is responsible for displaying the results of a search query.
|
|
1488
|
-
* Once a query is submitted, the component formats and presents an ordered list of the results.
|
|
1489
|
-
* ## Usage
|
|
1490
|
-
* ```html
|
|
1491
|
-
* <!-- index.html -->
|
|
1492
|
-
* <searchcraft-base-search-results
|
|
1493
|
-
* ad-interval="4"
|
|
1494
|
-
* place-ad-at-start="false"
|
|
1495
|
-
* result-image-placement="right"
|
|
1496
|
-
* />
|
|
1497
|
-
* ```
|
|
1498
|
-
* ```js
|
|
1499
|
-
* // index.js
|
|
1500
|
-
* const baseSearchResults = document.querySelector('searchcraft-base-search-results');
|
|
1501
|
-
* baseSearchResults.searchResultMappings = containerHref: {
|
|
1502
|
-
* fieldNames: [
|
|
1503
|
-
* {
|
|
1504
|
-
* fieldName: 'canonical_link',
|
|
1505
|
-
* dataType: 'text',
|
|
1506
|
-
* },
|
|
1507
|
-
* ],
|
|
1508
|
-
* };
|
|
1509
|
-
* baseSearchResults.addEventListener('noResults', () => {
|
|
1510
|
-
* console.log('No search results found');
|
|
1511
|
-
* });
|
|
1512
|
-
* ```
|
|
1513
|
-
*/
|
|
1514
|
-
"searchcraft-base-search-results": LocalJSX.SearchcraftBaseSearchResults & JSXBase.HTMLAttributes<HTMLSearchcraftBaseSearchResultsElement>;
|
|
1515
|
-
/**
|
|
1516
|
-
* This web component represents a button to be consumed within the `search-input-form` component.
|
|
1608
|
+
* This web component represents a button.
|
|
1517
1609
|
* It provides a clear, interactive way for users to submit search queries or trigger actions in a search interface.
|
|
1518
|
-
* It is consumed within the `searchcraft-input-form` component.
|
|
1519
1610
|
*/
|
|
1520
1611
|
"searchcraft-button": LocalJSX.SearchcraftButton & JSXBase.HTMLAttributes<HTMLSearchcraftButtonElement>;
|
|
1521
1612
|
/**
|
|
1522
1613
|
* This web component is designed to display a user-friendly error message when a search query fails, providing clear feedback to users and enhancing their experience when an issue arises during the search process.
|
|
1523
|
-
*
|
|
1524
|
-
*
|
|
1525
|
-
*
|
|
1526
|
-
*
|
|
1614
|
+
* @js-example ```html
|
|
1615
|
+
* <searchcraft-error-message>
|
|
1616
|
+
* No search results found for query
|
|
1617
|
+
* </searchcraft-error-message>
|
|
1527
1618
|
* ```
|
|
1528
1619
|
*/
|
|
1529
1620
|
"searchcraft-error-message": LocalJSX.SearchcraftErrorMessage & JSXBase.HTMLAttributes<HTMLSearchcraftErrorMessageElement>;
|
|
1530
1621
|
/**
|
|
1531
1622
|
* This web component is designed to display facets in a search interface, allowing users to refine their search results by applying filters based on various attributes.
|
|
1532
1623
|
* It is consumed within the `searchcraft-filter-panel`.
|
|
1533
|
-
*
|
|
1534
|
-
* ```html
|
|
1624
|
+
* @js-example ```html
|
|
1535
1625
|
* <!-- index.html -->
|
|
1536
1626
|
* <searchcraft-facet-list field-name="title" />
|
|
1537
1627
|
* ```
|
|
@@ -1546,69 +1636,124 @@ declare module "@stencil/core" {
|
|
|
1546
1636
|
"searchcraft-facet-list": LocalJSX.SearchcraftFacetList & JSXBase.HTMLAttributes<HTMLSearchcraftFacetListElement>;
|
|
1547
1637
|
/**
|
|
1548
1638
|
* This web component represents a series of filters that allows users to refine and control their search queries by applying various filter criteria.
|
|
1549
|
-
*
|
|
1550
|
-
*
|
|
1639
|
+
* @import ```jsx
|
|
1640
|
+
* // react
|
|
1641
|
+
* import { SearchcraftFilterPanel } from "@searchcraft/react-sdk";
|
|
1642
|
+
* // vue
|
|
1643
|
+
* import { SearchcraftFilterPanel } from "@searchcraft/vue-sdk";
|
|
1644
|
+
* ```
|
|
1645
|
+
* @js-example ```html
|
|
1551
1646
|
* <!-- index.html -->
|
|
1552
1647
|
* <searchcraft-filter-panel />
|
|
1553
1648
|
* ```
|
|
1649
|
+
* ```js
|
|
1650
|
+
* // index.js
|
|
1651
|
+
* const filterPanel = document.querySelector('searchcraft-filter-panel');
|
|
1652
|
+
* if (filterPanel) {
|
|
1653
|
+
* filterPanel.items = [];
|
|
1654
|
+
* }
|
|
1655
|
+
* ```
|
|
1656
|
+
* @react-example ```jsx
|
|
1657
|
+
* <SearchcraftFilterPanel items={[]} />
|
|
1658
|
+
* ```
|
|
1659
|
+
* @vue-example ```jsx
|
|
1660
|
+
* <SearchcraftFilterPanel :items="[]" />
|
|
1661
|
+
* ```
|
|
1554
1662
|
*/
|
|
1555
1663
|
"searchcraft-filter-panel": LocalJSX.SearchcraftFilterPanel & JSXBase.HTMLAttributes<HTMLSearchcraftFilterPanelElement>;
|
|
1556
1664
|
/**
|
|
1557
1665
|
* This web component provides a user-friendly interface for querying an indexed dataset, enabling users to easily search large collections of data.
|
|
1558
1666
|
* It abstracts the complexities of index-based searching, making it accessible to users of all technical levels.
|
|
1559
|
-
*
|
|
1560
|
-
*
|
|
1561
|
-
*
|
|
1562
|
-
*
|
|
1667
|
+
* @import ```jsx
|
|
1668
|
+
* // react
|
|
1669
|
+
* import { SearchcraftInputForm } from "@searchcraft/react-sdk";
|
|
1670
|
+
* // vue
|
|
1671
|
+
* import { SearchcraftInputForm } from "@searchcraft/vue-sdk";
|
|
1563
1672
|
* ```
|
|
1564
|
-
* ```
|
|
1565
|
-
*
|
|
1566
|
-
*
|
|
1673
|
+
* @js-example ```html
|
|
1674
|
+
* <searchcraft-input-form auto-search />
|
|
1675
|
+
* ```
|
|
1676
|
+
* @react-example ```jsx
|
|
1677
|
+
* <SearchcraftInputForm autoSearch />
|
|
1678
|
+
* ```
|
|
1679
|
+
* @vue-example ```jsx
|
|
1680
|
+
* <SearchcraftInputForm autoSearch />
|
|
1567
1681
|
* ```
|
|
1568
1682
|
*/
|
|
1569
1683
|
"searchcraft-input-form": LocalJSX.SearchcraftInputForm & JSXBase.HTMLAttributes<HTMLSearchcraftInputFormElement>;
|
|
1570
1684
|
/**
|
|
1571
1685
|
* This web component serves as the input label for the searchcraft-input-form component.
|
|
1572
|
-
*
|
|
1573
|
-
* ```html
|
|
1574
|
-
* <!-- index.html -->
|
|
1686
|
+
* @js-example ```html
|
|
1575
1687
|
* <searchcraft-input-label label="Search" />
|
|
1576
1688
|
* ```
|
|
1577
1689
|
*/
|
|
1578
1690
|
"searchcraft-input-label": LocalJSX.SearchcraftInputLabel & JSXBase.HTMLAttributes<HTMLSearchcraftInputLabelElement>;
|
|
1579
1691
|
/**
|
|
1580
|
-
* This web component is designed to facilitate pagination of search results.
|
|
1581
|
-
*
|
|
1582
|
-
*
|
|
1583
|
-
*
|
|
1584
|
-
*
|
|
1692
|
+
* This web component is designed to facilitate pagination of search results. Once a query is submitted, calculates the number for pages.
|
|
1693
|
+
* @import ```jsx
|
|
1694
|
+
* // react
|
|
1695
|
+
* import { SearchcraftPagination } from "@searchcraft/react-sdk";
|
|
1696
|
+
* // vue
|
|
1697
|
+
* import { SearchcraftPagination } from "@searchcraft/vue-sdk";
|
|
1698
|
+
* ```
|
|
1699
|
+
* @js-example ```html
|
|
1585
1700
|
* <searchcraft-pagination />
|
|
1586
1701
|
* ```
|
|
1702
|
+
* @react-example ```jsx
|
|
1703
|
+
* <SearchcraftPagination />
|
|
1704
|
+
* ```
|
|
1705
|
+
* @vue-example ```jsx
|
|
1706
|
+
* <SearchcraftPagination />
|
|
1707
|
+
* ```
|
|
1587
1708
|
*/
|
|
1588
1709
|
"searchcraft-pagination": LocalJSX.SearchcraftPagination & JSXBase.HTMLAttributes<HTMLSearchcraftPaginationElement>;
|
|
1589
1710
|
/**
|
|
1590
1711
|
* Renders a button which, when clicked, turns on popover visibility.
|
|
1712
|
+
* @import ```jsx
|
|
1713
|
+
* // react
|
|
1714
|
+
* import { SearchcraftPopoverButton } from "@searchcraft/react-sdk";
|
|
1715
|
+
* // vue
|
|
1716
|
+
* import { SearchcraftPopoverButton } from "@searchcraft/vue-sdk";
|
|
1717
|
+
* ```
|
|
1718
|
+
* @js-example ```html
|
|
1719
|
+
* <searchcraft-popover-button>
|
|
1720
|
+
* Open popover
|
|
1721
|
+
* </searchcraft-popover-button>
|
|
1722
|
+
* ```
|
|
1723
|
+
* @react-example ```jsx
|
|
1724
|
+
* <SearchcraftPopoverButton>
|
|
1725
|
+
* Open popover
|
|
1726
|
+
* </SearchcraftPopoverButton>
|
|
1727
|
+
* ```
|
|
1728
|
+
* @vue-example ```jsx
|
|
1729
|
+
* <SearchcraftPopoverButton>
|
|
1730
|
+
* Open popover
|
|
1731
|
+
* </SearchcraftPopoverButton>
|
|
1732
|
+
* ```
|
|
1591
1733
|
*/
|
|
1592
1734
|
"searchcraft-popover-button": LocalJSX.SearchcraftPopoverButton & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverButtonElement>;
|
|
1593
1735
|
/**
|
|
1594
1736
|
* This web component is designed to display search results in a popover container that dynamically appears when the user interacts with a search input field, or when a popover-button is pressed.
|
|
1595
|
-
*
|
|
1596
|
-
*
|
|
1737
|
+
* @import ```jsx
|
|
1738
|
+
* // react
|
|
1739
|
+
* import { SearchcraftPopoverForm } from "@searchcraft/react-sdk";
|
|
1740
|
+
* // vue
|
|
1741
|
+
* import { SearchcraftPopoverForm } from "@searchcraft/vue-sdk";
|
|
1742
|
+
* ```
|
|
1743
|
+
* @js-example ```html
|
|
1597
1744
|
* <!-- index.html -->
|
|
1598
|
-
* <searchcraft-popover-form type="
|
|
1745
|
+
* <searchcraft-popover-form type="inline" />
|
|
1599
1746
|
* ```
|
|
1600
1747
|
* ```js
|
|
1601
1748
|
* // index.js
|
|
1602
1749
|
* const popoverForm = document.querySelector('searchcraft-popover-form');
|
|
1603
|
-
* popoverForm.popoverResultMappings = {
|
|
1604
|
-
*
|
|
1605
|
-
*
|
|
1606
|
-
*
|
|
1607
|
-
*
|
|
1608
|
-
*
|
|
1609
|
-
*
|
|
1610
|
-
* ],
|
|
1611
|
-
* };
|
|
1750
|
+
* popoverForm.popoverResultMappings = {};
|
|
1751
|
+
* ```
|
|
1752
|
+
* @react-example ```jsx
|
|
1753
|
+
* <SearchcraftPopoverForm type="inline" popoverResultMappings={[]} />
|
|
1754
|
+
* ```
|
|
1755
|
+
* @vue-example ```jsx
|
|
1756
|
+
* <SearchcraftPopoverForm type="inline" :popoverResultMappings="[]"" />
|
|
1612
1757
|
* ```
|
|
1613
1758
|
*/
|
|
1614
1759
|
"searchcraft-popover-form": LocalJSX.SearchcraftPopoverForm & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverFormElement>;
|
|
@@ -1619,40 +1764,113 @@ declare module "@stencil/core" {
|
|
|
1619
1764
|
/**
|
|
1620
1765
|
* This web component is designed to display a list of results within a popover interface.
|
|
1621
1766
|
* It is consumed within the `searchcraft-popover-form` component.
|
|
1622
|
-
*
|
|
1623
|
-
* ```html
|
|
1624
|
-
* <!-- index.html -->
|
|
1767
|
+
* @js-example ```html
|
|
1625
1768
|
* <searchcraft-popover-list-view />
|
|
1626
1769
|
* ```
|
|
1627
1770
|
*/
|
|
1628
1771
|
"searchcraft-popover-list-view": LocalJSX.SearchcraftPopoverListView & JSXBase.HTMLAttributes<HTMLSearchcraftPopoverListViewElement>;
|
|
1629
1772
|
/**
|
|
1630
1773
|
* This web component is designed to display the number of results returned from a search query.
|
|
1631
|
-
*
|
|
1632
|
-
*
|
|
1774
|
+
* @import ```jsx
|
|
1775
|
+
* // react
|
|
1776
|
+
* import { SearchcraftResultsInfo } from "@searchcraft/react-sdk";
|
|
1777
|
+
* // vue
|
|
1778
|
+
* import { SearchcraftResultsInfo } from "@searchcraft/vue-sdk";
|
|
1779
|
+
* ```
|
|
1780
|
+
* @js-example ```html
|
|
1633
1781
|
* <!-- index.html -->
|
|
1634
|
-
* <script>
|
|
1635
|
-
* const resultsInfo = document.querySelector('searchcraft-results-info');
|
|
1636
|
-
* resultsInfo.customFormatter = (range, count, responseTime) =>
|
|
1637
|
-
* `${range[0]}-${range[1]} of ${count} results in ${responseTime}ms`;
|
|
1638
|
-
* </script>
|
|
1639
1782
|
* <searchcraft-results-info />
|
|
1640
1783
|
* ```
|
|
1784
|
+
* ```js
|
|
1785
|
+
* // index.js
|
|
1786
|
+
* const resultsInfo = document.querySelector('searchcraft-results-info');
|
|
1787
|
+
* resultsInfo.template = (info, { html }) => html`
|
|
1788
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
1789
|
+
* `;
|
|
1790
|
+
* ```
|
|
1791
|
+
* @react-example ```jsx
|
|
1792
|
+
* <SearchcraftResultsInfo
|
|
1793
|
+
* template={(info, { html }) => html`
|
|
1794
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
1795
|
+
* `}
|
|
1796
|
+
* />
|
|
1797
|
+
* @vue-example ```jsx
|
|
1798
|
+
* <SearchcraftResultsInfo
|
|
1799
|
+
* :template={(info, { html }) => html`
|
|
1800
|
+
* ${info.range[0]}-${info.range[1]} of ${info.count} results in ${info.responseTime}ms
|
|
1801
|
+
* `}
|
|
1802
|
+
* />
|
|
1641
1803
|
*/
|
|
1642
1804
|
"searchcraft-results-info": LocalJSX.SearchcraftResultsInfo & JSXBase.HTMLAttributes<HTMLSearchcraftResultsInfoElement>;
|
|
1805
|
+
/**
|
|
1806
|
+
* This web component is designed to display detailed information for a single search result. Once a query is submitted, the component formats and presents the result.
|
|
1807
|
+
*/
|
|
1808
|
+
"searchcraft-search-result": LocalJSX.SearchcraftSearchResult & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultElement>;
|
|
1809
|
+
/**
|
|
1810
|
+
* This web component is responsible for displaying the results of a search query. Once a query is submitted, the component formats and presents an ordered list of the results.
|
|
1811
|
+
* @import ```jsx
|
|
1812
|
+
* // react
|
|
1813
|
+
* import { SearchcraftSearchResults } from "@searchcraft/react-sdk";
|
|
1814
|
+
* // vue
|
|
1815
|
+
* import { SearchcraftSearchResults } from "@searchcraft/vue-sdk";
|
|
1816
|
+
* ```
|
|
1817
|
+
* @js-example ```html
|
|
1818
|
+
* <!-- index.html -->
|
|
1819
|
+
* <searchcraft-search-results
|
|
1820
|
+
* ad-interval="4"
|
|
1821
|
+
* place-ad-at-start="true"
|
|
1822
|
+
* />
|
|
1823
|
+
* ```
|
|
1824
|
+
* ```js
|
|
1825
|
+
* // index.js
|
|
1826
|
+
* const searchResults = document.querySelector('searchcraft-search-results');
|
|
1827
|
+
* searchResults.template = (item, index, { html }) => html`
|
|
1828
|
+
* <h2>${item.title}</h2>
|
|
1829
|
+
* `;
|
|
1830
|
+
* ```
|
|
1831
|
+
* @react-example ```jsx
|
|
1832
|
+
* <SearchcraftSearchResults
|
|
1833
|
+
* adInterval={4}
|
|
1834
|
+
* placeAdAtState={true}
|
|
1835
|
+
* template={(item, index, { html }) => html`
|
|
1836
|
+
* <h2>${item.title}</h2>
|
|
1837
|
+
* `}
|
|
1838
|
+
* />
|
|
1839
|
+
* ```
|
|
1840
|
+
* @vue-example ```jsx
|
|
1841
|
+
* <SearchcraftSearchResults
|
|
1842
|
+
* adInterval={4}
|
|
1843
|
+
* placeAdAtState={true}
|
|
1844
|
+
* :template={(item, index, { html }) => html`
|
|
1845
|
+
* <h2>${item.title}</h2>
|
|
1846
|
+
* `}
|
|
1847
|
+
* />
|
|
1848
|
+
* ```
|
|
1849
|
+
*/
|
|
1850
|
+
"searchcraft-search-results": LocalJSX.SearchcraftSearchResults & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultsElement>;
|
|
1643
1851
|
/**
|
|
1644
1852
|
* This web component is designed to choose the number of search results displayed.
|
|
1645
|
-
*
|
|
1646
|
-
*
|
|
1853
|
+
* @import ```jsx
|
|
1854
|
+
* // react
|
|
1855
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/react-sdk";
|
|
1856
|
+
* // vue
|
|
1857
|
+
* import { SearchcraftSearchResultsPerPage } from "@searchcraft/vue-sdk";
|
|
1858
|
+
* ```
|
|
1859
|
+
* @js-example ```html
|
|
1647
1860
|
* <!-- index.html -->
|
|
1648
1861
|
* <searchcraft-search-results-per-page increment="20" />
|
|
1649
1862
|
* ```
|
|
1863
|
+
* @react-example ```jsx
|
|
1864
|
+
* <SearchcraftSearchResultsPerPage increment={20} />
|
|
1865
|
+
* ```
|
|
1866
|
+
* @vue-example ```jsx
|
|
1867
|
+
* <SearchcraftSearchResultsPerPage increment="20" />
|
|
1868
|
+
* ```
|
|
1650
1869
|
*/
|
|
1651
1870
|
"searchcraft-search-results-per-page": LocalJSX.SearchcraftSearchResultsPerPage & JSXBase.HTMLAttributes<HTMLSearchcraftSearchResultsPerPageElement>;
|
|
1652
1871
|
/**
|
|
1653
1872
|
* This web component is designed to allow users to select between a group of options.
|
|
1654
|
-
*
|
|
1655
|
-
* ```html
|
|
1873
|
+
* @js-example ```html
|
|
1656
1874
|
* <!-- index.html -->
|
|
1657
1875
|
* <searchcraft-select
|
|
1658
1876
|
* inputId="searchcraft-select"
|
|
@@ -1663,24 +1881,30 @@ declare module "@stencil/core" {
|
|
|
1663
1881
|
*/
|
|
1664
1882
|
"searchcraft-select": LocalJSX.SearchcraftSelect & JSXBase.HTMLAttributes<HTMLSearchcraftSelectElement>;
|
|
1665
1883
|
/**
|
|
1666
|
-
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value.
|
|
1667
|
-
* The component renders a slider interface, which can be used to visually choose a value between two boundaries.
|
|
1668
|
-
* It is consumed by the `searchcraft-filter-panel` component.
|
|
1884
|
+
* This web component is designed to allow users to select a value from a range defined by a minimum and maximum value. The component renders a slider interface, which can be used to visually choose a value between two boundaries.
|
|
1669
1885
|
*/
|
|
1670
1886
|
"searchcraft-slider": LocalJSX.SearchcraftSlider & JSXBase.HTMLAttributes<HTMLSearchcraftSliderElement>;
|
|
1671
1887
|
/**
|
|
1672
|
-
* This web component adds Searchcraft's built-in css theme to your page
|
|
1673
|
-
*
|
|
1674
|
-
*
|
|
1675
|
-
*
|
|
1676
|
-
*
|
|
1677
|
-
*
|
|
1888
|
+
* This web component adds Searchcraft's built-in css theme to your page. It does not render anything visible, its only function is to manage the css styles on the page.'
|
|
1889
|
+
* @import ```jsx
|
|
1890
|
+
* // react
|
|
1891
|
+
* import { SearchcraftTheme } from "@searchcraft/react-sdk";
|
|
1892
|
+
* // vue
|
|
1893
|
+
* import { SearchcraftTheme } from "@searchcraft/vue-sdk";
|
|
1894
|
+
* ```
|
|
1895
|
+
* @js-example ```html
|
|
1896
|
+
* <searchcraft-theme />
|
|
1897
|
+
* ```
|
|
1898
|
+
* @react-example ```jsx
|
|
1899
|
+
* <SearchcraftTheme />
|
|
1900
|
+
* ```
|
|
1901
|
+
* @vue-example ```jsx
|
|
1902
|
+
* <SearchcraftTheme />
|
|
1678
1903
|
* ```
|
|
1679
1904
|
*/
|
|
1680
1905
|
"searchcraft-theme": LocalJSX.SearchcraftTheme & JSXBase.HTMLAttributes<HTMLSearchcraftThemeElement>;
|
|
1681
1906
|
/**
|
|
1682
1907
|
* This web component simulates a light switch functionality, providing a simple and intuitive toggle between two states—on and off.
|
|
1683
|
-
* It is consumed within the `searchcraft-filter-panel` component.
|
|
1684
1908
|
*/
|
|
1685
1909
|
"searchcraft-toggle-button": LocalJSX.SearchcraftToggleButton & JSXBase.HTMLAttributes<HTMLSearchcraftToggleButtonElement>;
|
|
1686
1910
|
}
|