@searchstax-inc/searchstudio-ux-react 1.0.49 → 4.1.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.
Files changed (23) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +1307 -706
  3. package/README.mustache +590 -0
  4. package/dist/@searchstax-inc/components/SearchstaxAnswerWidget.d.ts +1 -1
  5. package/dist/@searchstax-inc/components/SearchstaxResultWidget.d.ts +1 -0
  6. package/dist/@searchstax-inc/components/templates/SearchstaxAnswerWidgetTemplate.d.ts +3 -0
  7. package/dist/@searchstax-inc/components/templates/SearchstaxExternalPromotionsWidgetTemplate.d.ts +3 -0
  8. package/dist/@searchstax-inc/components/templates/SearchstaxFacetsWidgetTemplate.d.ts +8 -0
  9. package/dist/@searchstax-inc/components/templates/SearchstaxInputWidgetTemplate.d.ts +4 -0
  10. package/dist/@searchstax-inc/components/templates/SearchstaxLocationWidgetTemplate.d.ts +3 -0
  11. package/dist/@searchstax-inc/components/templates/SearchstaxLocationWidgetTemplateConfig.d.ts +13 -0
  12. package/dist/@searchstax-inc/components/templates/SearchstaxOverviewWidgetTemplate.d.ts +3 -0
  13. package/dist/@searchstax-inc/components/templates/SearchstaxPaginationWidgetTemplate.d.ts +4 -0
  14. package/dist/@searchstax-inc/components/templates/SearchstaxRelatedSearchesWidgetTemplate.d.ts +3 -0
  15. package/dist/@searchstax-inc/components/templates/SearchstaxResultWidgetTemplate.d.ts +4 -0
  16. package/dist/@searchstax-inc/components/templates/SearchstaxSortingWidgetTemplate.d.ts +3 -0
  17. package/dist/@searchstax-inc/main.d.ts +1 -12
  18. package/dist/@searchstax-inc/searchstudio-ux-react.cjs +62 -70
  19. package/dist/@searchstax-inc/searchstudio-ux-react.d.cts +1 -12
  20. package/dist/@searchstax-inc/searchstudio-ux-react.iife.js +62 -70
  21. package/dist/@searchstax-inc/searchstudio-ux-react.mjs +2540 -2704
  22. package/dist/main.d.ts +12 -0
  23. package/package.json +12 -7
@@ -0,0 +1,590 @@
1
+ # sitesearch-ux-react
2
+
3
+ Library to build Site Search page
4
+
5
+ ## Installation
6
+ npm install following package
7
+ `npm install --save @searchstax-inc/searchstudio-ux-react`
8
+
9
+
10
+ ## Usage
11
+
12
+ Add the following code to <head>:
13
+
14
+ ```
15
+ <script type="text/javascript">
16
+ var _msq = _msq || []; //declare object
17
+ var analyticsBaseUrl = '<https://analytics-us-east.searchstax.co>';
18
+ (function () {
19
+ var ms = document.createElement('script');
20
+ ms.type = 'text/javascript';
21
+ ms.src = '<https://static.searchstax.co/studio-js/v3/js/studio-analytics.js>';
22
+ var s = document.getElementsByTagName('script')[0];
23
+ s.parentNode.insertBefore(ms, s);
24
+ })();
25
+ </script>
26
+ ```
27
+
28
+ ## Initialization
29
+ sampleConfig object needs to be of type: `ISearchstaxConfig`
30
+ ```
31
+ const sampleConfig = {
32
+ language: 'en',
33
+ searchURL: '',
34
+ suggesterURL: '',
35
+ trackApiKey: '',
36
+ searchAuth: '',
37
+ authType: 'basic',
38
+ router: {
39
+ enabled: true,
40
+ routeName: 'searchstax',
41
+ title: (result) => `Search results for: ${result.query}`,
42
+ ignoredKeys: []
43
+ },
44
+ hooks: {
45
+ beforeSearch: (props) => {
46
+ // modify props
47
+ return props;
48
+ },
49
+ afterSearch: (results) => {
50
+ // modify results
51
+ return results;
52
+ }
53
+ }
54
+ };
55
+
56
+ <SearchstaxWrapper
57
+ language={sampleConfig.language}
58
+ searchURL={sampleConfig.searchURL}
59
+ suggesterURL={sampleConfig.suggesterURL}
60
+ trackApiKey={sampleConfig.trackApiKey}
61
+ searchAuth={sampleConfig.searchAuth}
62
+ authType={sampleConfig.authType}
63
+ router={sampleConfig.router}
64
+ beforeSearch={sampleConfig.hooks.beforeSearch}
65
+ afterSearch={sampleConfig.hooks.afterSearch}
66
+ >
67
+ </SearchstaxWrapper>
68
+
69
+
70
+ ```
71
+
72
+ ## Initial layout
73
+ Add any other Site Search components as needed:
74
+ ```
75
+ <SearchstaxWrapper>
76
+
77
+ <SearchstaxInputWidget />
78
+
79
+ <SearchstaxResultsWidget />
80
+
81
+ {/* Other components */}
82
+
83
+ </SearchstaxWrapper>
84
+ ```
85
+
86
+ ### widgets
87
+ Following widgets are available:
88
+
89
+ [Answer Widget](#answer-widget)
90
+
91
+ [Input Widget](#input-widget)
92
+
93
+ [Location Widget](#location-widget)
94
+
95
+ [Result Widget](#result-widget)
96
+
97
+ [Facets Widget](#facets-widget)
98
+
99
+ [Pagination Widget](#pagination-widget)
100
+
101
+ [SearchFeedback Widget](#searchfeedback-widget)
102
+
103
+ [RelatedSearches Widget](#relatedsearches-widget)
104
+
105
+ [ExternalPromotions Widget](#externalpromotions-widget)
106
+
107
+ [sorting Widget](#sorting-widget)
108
+
109
+ ### Answer Widget ###
110
+ SearchStax Site Search solution offers React and Next.js widgets to assist in building your custom search page.
111
+
112
+ The SearchstaxAnswerWidget component provides a React and Next.js AI answer widget for your searches.
113
+
114
+ **Usage**
115
+
116
+ ```
117
+ <SearchstaxAnswerWidget
118
+ showMoreAfterWordCount={100}
119
+ feedbackwidget={feedbackConfig}
120
+ ></SearchstaxAnswerWidget>
121
+ ```
122
+
123
+ **Props**
124
+
125
+ - showMoreAfterWordCount - number(default 100) determining after how many symbols UI will show “Read More” view.
126
+ - feedbackWidget – an optional object that configures thumbs-up and thumbs-down feedback functionality.
127
+ - searchAnswerTemplate - template override for answers widget
128
+
129
+ Example of feedbackWidget config:
130
+ ```
131
+ const feedbackConfig = {
132
+ renderFeedbackWidget: true,
133
+ emailOverride: searchstaxEmailOverride,
134
+ thumbsUpValue: 10,
135
+ thumbsDownValue: 0
136
+ }
137
+ ```
138
+
139
+
140
+ **searchAnswerTemplate**
141
+
142
+ The templates prop allows customizing the answer UI.
143
+
144
+ It receives the following props:
145
+
146
+ - shouldShowAnswer – boolean
147
+ - answerErrorMessage – string
148
+ - fullAnswerFormatted – string
149
+ - showMoreButtonVisible – boolean
150
+ - answerLoading – boolean
151
+
152
+ **Example**
153
+
154
+ ```
155
+ {{&SearchstaxAnswerWidget}}
156
+ <SearchstaxAnswerWidget
157
+ searchAnswerTemplate={answerTemplate}
158
+ showMoreAfterWordCount={100}
159
+ ></SearchstaxAnswerWidget>
160
+ ```
161
+
162
+ ### Input Widget ###
163
+
164
+ SearchStax Site Search solution provides React and Next.js widgets to help you build your custom search page.
165
+
166
+ The SearchstaxInputWidget component provides a search input with autosuggest/autocomplete functionality.
167
+
168
+ **Usage**
169
+ ```
170
+ <SearchstaxInputWidget
171
+ suggestAfterMinChars={3}
172
+ afterAutosuggest={afterAutosuggest}
173
+ beforeAutosuggest={beforeAutosuggest}
174
+ ></SearchstaxInputWidget>
175
+ ```
176
+
177
+ **Props**
178
+
179
+ - suggestAfterMinChars - default 3. Number of characters needed for autosuggest to start triggering
180
+ - beforeAutosuggest - callback function that gets called before firing autosuggest. autosuggestProps are being passed as a property and can be modified, if passed along further search will execute with modified properties, if null is returned then event gets canceled and search never fires.
181
+ - afterAutosuggest - callback function that gets called after autosuggest has values but before rendering. It needs to return same type of data but it can be modified.
182
+ - inputTemplate - template override. look at examples below
183
+
184
+
185
+ **inputWidgetTemplate**
186
+
187
+ The inputTemplate prop allows customizing the input UI.
188
+
189
+ It receives the following props:
190
+
191
+ - locationEnabled – boolean
192
+
193
+ **example**
194
+ ```
195
+ {{&SearchstaxLocationWidgetConfig}}
196
+ {{&SearchstaxLocationWidget}}
197
+ {{&SearchstaxInputWidget}}
198
+
199
+ <SearchstaxInputWidget
200
+ afterAutosuggest={afterAutosuggest}
201
+ beforeAutosuggest={beforeAutosuggest}
202
+ inputTemplate={InputTemplate}
203
+ ></SearchstaxInputWidget>
204
+ ```
205
+ ### Location Widget ###
206
+
207
+ SearchStax Site Search solution offers a React search-location widget to assist with your custom search page.
208
+
209
+ The SearchstaxLocationWidget provides a location search input with location-based search functionality.
210
+
211
+ **Usage**
212
+
213
+ ```
214
+ {{&SearchstaxLocationWidgetConfig}}
215
+ <SearchstaxLocationWidget hooks={ {locationDecode: locationDecodeFunction, locationDecodeCoordinatesToAddress: locationDecodeCoordinatesToAddress} } />
216
+ ```
217
+
218
+ **Props**
219
+
220
+ - locationDecode - callback function to override location decoding
221
+ - locationDecodeCoordinatesToAddress - callback function to override location decoding
222
+ - searchLocationTemplate - template override for location widget
223
+
224
+ **Template Override**
225
+
226
+ The searchLocationTemplate prop allows customizing the location input UI.
227
+
228
+ It receives the following props:
229
+
230
+ - locationSearchDistanceValues – location distance values
231
+ - shouldShowLocationDistanceDropdown – boolean determining if distance dropdown should be shown
232
+
233
+
234
+ **Example**
235
+
236
+ ```
237
+ {{&SearchstaxLocationWidgetConfig}}
238
+ {{&SearchstaxLocationWidget}}
239
+ <SearchstaxLocationWidget searchLocationTemplate={LocationTemplate} hooks={ {locationDecode:locationDecode, locationDecodeCoordinatesToAddress: locationDecodeCoordinatesToAddress} } />
240
+ ```
241
+
242
+ ### Result Widget ###
243
+
244
+ The SearchStax Site Search solution provides a React and Next.js results widget to support your custom search page.
245
+
246
+ The SearchstaxResultsWidget displays the search results.
247
+
248
+ **Usage**
249
+
250
+ ```
251
+ <SearchstaxResultWidget
252
+ afterLinkClick={afterLinkClick}
253
+ renderMethod={'pagination'}
254
+ resultsPerPage={10}
255
+ ></SearchstaxResultWidget>
256
+ ```
257
+
258
+ **Props**
259
+
260
+ - renderMethod – either “pagination” or “infiniteScroll”.
261
+ - resultsPerPage – number of results on a page.
262
+ - afterLinkClick – Callback function invoked when a result link is clicked. Allows modifying the result object.
263
+ - resultsTemplate - template override for result view
264
+ - noResultTemplate - template override for no results view
265
+
266
+
267
+ **Result Template Override**
268
+
269
+ The resultsTemplate prop allows customizing the result UI.
270
+
271
+ It receives no props:
272
+ - custom?: any - custom properties that may be added through aftersearchHook
273
+ - ribbon: string | null
274
+ - paths: string | null;
275
+ - url: string | null;
276
+ - title: string | null;
277
+ - titleTracking: string | null;
278
+ - promoted: boolean | null;
279
+ - thumbnail: string | null;
280
+ - date: string | null;
281
+ - snippet: string | null;
282
+ - description: string | null;
283
+ - uniqueId: string;
284
+ - position: number;
285
+ - distance: number | null;
286
+ - unit: string | null;
287
+ - unmappedFields: {
288
+ key: string;
289
+ value: string | string[] | boolean;
290
+ isImage?: boolean;
291
+ }[] - fields that were not mapped.
292
+ - allFields: { key: string; value: string | string[] | boolean }[] - all fields
293
+
294
+
295
+ **No Results Template Override**
296
+
297
+ The noResultTemplate prop allows customizing the result UI.
298
+
299
+ It receives following props:
300
+
301
+ - spellingSuggestion - suggestion of corrected spelling
302
+ - searchExecuted - boolean if search was executed
303
+ - searchTerm - term that was searched
304
+
305
+ **Example of default render method**
306
+ ```
307
+
308
+ ```
309
+
310
+ **Example of infinite scroll and pagination render methods**
311
+ ```
312
+ {{&SearchstaxResultWidget}}
313
+ <SearchstaxResultWidget
314
+ afterLinkClick={afterLinkClick}
315
+ noResultTemplate={noResultTemplate}
316
+ resultsTemplate={resultsTemplate}
317
+ renderMethod={'pagination'}
318
+ ></SearchstaxResultWidget>
319
+ // Infinite scroll
320
+
321
+ <SearchstaxResultWidget
322
+ afterLinkClick={afterLinkClick}
323
+ noResultTemplate={noResultTemplate}
324
+ resultsTemplate={resultsTemplate}
325
+ renderMethod={'infiniteScroll'}
326
+ ></SearchstaxResultWidget>
327
+
328
+ ```
329
+
330
+ ### Pagination Widget ###
331
+
332
+ The SearchStax Site Search solution offers a pagination widget for React and Next.js search pages.
333
+
334
+ The SearchstaxPaginationWidget displays pagination controls for search results.
335
+
336
+ **Usage**
337
+
338
+ ```
339
+ <SearchstaxPaginationWidget></SearchstaxPaginationWidget>
340
+ ```
341
+
342
+ **Props**
343
+ - paginationTemplate - template override for pagination widget
344
+
345
+ **Main Template Override**
346
+
347
+ Main template for the pagination controls.
348
+
349
+ It receives following props:
350
+
351
+ - nextPageLink - link of next page;
352
+ - previousPageLink - link of previous page;
353
+
354
+
355
+ **Infinite Scroll Template Override**
356
+
357
+ Main template for the pagination controls in infinite scroll mode.
358
+
359
+ It receives following props:
360
+ - isLastPage - boolean, true if its last page
361
+ - results - results.length can be used if there are results
362
+
363
+ **Example**
364
+
365
+ ```
366
+ {{&SearchstaxPaginationWidget}}
367
+ <SearchstaxPaginationWidget paginationTemplate={paginationTemplate}></SearchstaxPaginationWidget>
368
+ // example of pagination widget for infinite scroll
369
+ <SearchstaxPaginationWidget infiniteScrollTemplate={infiniteScrollTemplate}></SearchstaxPaginationWidget>
370
+ ```
371
+
372
+ ### Facets Widget ###
373
+
374
+ The SearchStax Site Search solution offers a SearchstaxFacetsWidget component for React and Next.js. This widget displays the search facets.
375
+
376
+ **Facet Selection and Order**
377
+
378
+ Facet lists are configured and ordered on the Site Search [Faceting Tab](https://www.searchstax.com/docs/searchstudio/faceting-tab/).
379
+
380
+ **Usage**
381
+
382
+ ```
383
+ <SearchstaxFacetsWidget
384
+ facetingType="and"
385
+ itemsPerPageDesktop={2}
386
+ itemsPerPageMobile={3}
387
+ specificFacets={undefined}
388
+ ></SearchstaxFacetsWidget>
389
+ ```
390
+
391
+ **Props**
392
+
393
+ - facetingType: "and" | "or" | "showUnavailable" | "tabs"; // type that determines how facets will behave
394
+ - specificFacets?: string[]; // optional array of facet names that if provided will only render those facets
395
+ - itemsPerPageDesktop: number; // default expanded facets for desktop
396
+ - itemsPerPageMobile: number; // default expanded facets for mobile
397
+ - facetsTemplateDesktop - template override for desktop view
398
+ - facetsTemplateMobile - template override for mobile view
399
+
400
+
401
+ **Main Template Desktop Override**
402
+
403
+ Main wrapper template for desktop facets display.
404
+
405
+ It receives following props from [IFacetsTemplateData](https://www.searchstax.com/docs/searchstudio/interfaces/#h-facets-interfaces)
406
+
407
+
408
+ **Main Template Mobile Override**
409
+
410
+ Main wrapper template for mobile facets display.
411
+
412
+ It receives following props from [IFacetsTemplateData](https://www.searchstax.com/docs/searchstudio/interfaces/#h-facets-interfaces)
413
+
414
+
415
+ **Example**
416
+ ```
417
+ {{&SearchstaxFacetsWidget}}
418
+ <SearchstaxFacetsWidget
419
+ facetingType="and"
420
+ itemsPerPageDesktop={2}
421
+ itemsPerPageMobile={3}
422
+ specificFacets={undefined}
423
+ facetsTemplateDesktop={facetsTemplateDesktop}
424
+ facetsTemplateMobile={facetsTemplateMobile}
425
+ ></SearchstaxFacetsWidget>
426
+ ```
427
+
428
+ ### SearchFeedback Widget ###
429
+
430
+ The SearchStax Site Search solution provides a search feedback widget to support your React and Next.js search pages.
431
+
432
+ The SearchstaxFeedbackWidget displays search feedback and stats.
433
+
434
+ **Usage**
435
+
436
+ ```
437
+ <SearchstaxOverviewWidget></SearchstaxOverviewWidget>
438
+ ```
439
+
440
+ **Props**
441
+
442
+ - searchOverviewTemplate - template override for search overview
443
+
444
+ **Main Template Override**
445
+
446
+ Main template for the search feedback message.
447
+
448
+ It receives following props:
449
+ - searchExecuted - boolean, true if search was executed
450
+ - hasResults - boolean, true if search has results
451
+ - startResultIndex - number, start of page results
452
+ - endResultIndex - number, end of page results
453
+ - totalResults - number, total results
454
+ - searchTerm - term that was searched
455
+ - autoCorrectedQuery - query that search was autocorrected to
456
+ - originalQuery - original query
457
+
458
+ **Example**
459
+ ```
460
+ {{&SearchstaxOverviewWidget}}
461
+ <SearchstaxOverviewWidget searchOverviewTemplate={searchOverviewTemplate}></SearchstaxOverviewWidget>
462
+ ```
463
+
464
+ ### RelatedSearches widget ###
465
+
466
+ The SearchStax Site Search solution offers a related-searches widget for React and Next.js search pages.
467
+
468
+ The SearchstaxRelatedSearchesWidget displays related searches.
469
+
470
+ **Usage**
471
+ ```
472
+ <SearchstaxRelatedSearchesWidget
473
+ relatedSearchesURL={config.relatedSearchesURL}
474
+ relatedSearchesAPIKey={config.relatedSearchesAPIKey}
475
+ ></SearchstaxRelatedSearchesWidget>
476
+ ```
477
+
478
+ **Props**
479
+
480
+ - relatedSearchesURL: // : An endpoint from the Discovery tab of the App Settings > All APls screen.
481
+ - relatedSearchesAPIKey?: The Discovery API key from the Discovery tab of the App Settings > All
482
+ - searchRelatedSearchesTemplate - template override for related searches
483
+
484
+ **Main Template Override**
485
+
486
+ Main template for related searches.
487
+
488
+ It receives following props:
489
+
490
+ - hasRelatedSearches - boolean, true if has related searches
491
+ - relatedSearches - array of related searches
492
+ - related_search - string, related searc
493
+ - last - boolean, true if last related search
494
+
495
+ **Example**
496
+
497
+ ```
498
+ {{&SearchstaxRelatedSearchesWidget}}
499
+ <SearchstaxRelatedSearchesWidget
500
+ relatedSearchesURL={config.relatedSearchesURL}
501
+ relatedSearchesAPIKey={config.relatedSearchesAPIKey}
502
+ searchRelatedSearchesTemplate={searchRelatedSearchesTemplate}
503
+ ></SearchstaxRelatedSearchesWidget>
504
+ ```
505
+
506
+ ### ExternalPromotions widget ###
507
+
508
+ The SearchStax Site Search solution offers an external-promotions widget to assist with your React and Next.js custom search pages.
509
+
510
+ The SearchstaxExternalPromotionsWidget displays external promotions fetched from the API.
511
+
512
+ **Usage**
513
+
514
+ ```
515
+ <SearchstaxExternalPromotionsWidget></SearchstaxExternalPromotionsWidget>
516
+ ```
517
+
518
+ **Props**
519
+
520
+ - searchExternalPromotionsTemplate - template override for external promotions widget
521
+
522
+ **Main Template Override**
523
+
524
+ Main template for external promotions.
525
+
526
+ It receives following props:
527
+
528
+ - hasExternalPromotions - boolean, true if has external promotions
529
+ - url - url of external promotion
530
+ - uniqueId - unique id
531
+ - name - name of promotion
532
+ - description - description
533
+
534
+ **Example**
535
+ ```
536
+ {{&SearchstaxExternalPromotionsWidget}}
537
+ <SearchstaxExternalPromotionsWidget
538
+ searchExternalPromotionsTemplate={searchExternalPromotionsTemplate}
539
+ ></SearchstaxExternalPromotionsWidget>
540
+ ```
541
+
542
+
543
+ ### Sorting Widget ###
544
+
545
+ The SearchStax Site Search solution offers a sorting widget for your React or Next.js custom search page.
546
+
547
+ The SearchstaxSortingWidget displays sorting options for search results.
548
+
549
+ **Usage**
550
+
551
+ ```
552
+ <SearchstaxSortingWidget></SearchstaxSortingWidget>
553
+ ```
554
+
555
+ **Props**
556
+
557
+ - searchSortingTemplate - template override for sorting widget
558
+
559
+ **Main Template Override**
560
+
561
+ Main template for sorting widget.
562
+
563
+ It receives following props:
564
+
565
+ - searchExecuted - boolean, true if search was executed
566
+ - hasResultsOrExternalPromotions - boolean, true if there are results or external promotions
567
+ - sortOptions - array of sort options, has key/value
568
+
569
+ **Example**
570
+
571
+ ```
572
+ {{&SearchstaxSortingWidget}}
573
+ <SearchstaxSortingWidget searchSortingTemplate={searchSortingTemplate}></SearchstaxSortingWidget>
574
+ ```
575
+
576
+
577
+ ## Template overrides
578
+ Templates use relatedsearches templating.
579
+
580
+ ## STYLING
581
+
582
+ scss styles can be imported from searchstudio-ux-js
583
+ ```
584
+ @import './../node_modules/@searchstax-inc/searchstudio-ux-js/dist/styles/scss/mainTheme.scss';
585
+ ```
586
+ css can be taken from
587
+
588
+ ```
589
+ ./../node_modules/@searchstax-inc/searchstudio-ux-js/dist/styles/mainTheme.css
590
+ ```
@@ -2,6 +2,6 @@ import type { IFeedbackWidgetProperties, ISearchstaxAnswerData } from "@searchst
2
2
  declare function SearchstaxAnswerWidget(props: {
3
3
  searchAnswerTemplate?: (answerData: null | ISearchstaxAnswerData, showMore: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void) => React.ReactElement;
4
4
  feedbackwidget?: IFeedbackWidgetProperties;
5
- showShowMoreAfterWordCount?: number;
5
+ showMoreAfterWordCount?: number;
6
6
  }): import("react/jsx-runtime").JSX.Element;
7
7
  export default SearchstaxAnswerWidget;
@@ -2,6 +2,7 @@ import type { ISearchstaxParsedResult, ISearchstaxSearchMetadata } from "@search
2
2
  declare function SearchstaxResultWidget(props: {
3
3
  afterLinkClick: (results: ISearchstaxParsedResult) => ISearchstaxParsedResult;
4
4
  renderMethod?: "infiniteScroll" | "pagination";
5
+ resultsPerPage?: number;
5
6
  noResultTemplate?: (searchTerm: string, metaData: ISearchstaxSearchMetadata | null, executeSearch: (searchTerm: string) => void) => React.ReactElement;
6
7
  resultsTemplate?: (results: ISearchstaxParsedResult[], resultClicked: (result: ISearchstaxParsedResult, event: any) => any) => React.ReactElement;
7
8
  }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,3 @@
1
+ import { ISearchstaxAnswerData } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare function answerTemplate(answerData: null | ISearchstaxAnswerData, showMore: (e: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void): import("react/jsx-runtime").JSX.Element;
3
+ export { answerTemplate };
@@ -0,0 +1,3 @@
1
+ import { IExternalPromotion, ISearchstaxExternalPromotionsData } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare function searchExternalPromotionsTemplate(externalPromotionsData: null | ISearchstaxExternalPromotionsData, trackClick: (externalPromotion: IExternalPromotion, event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void): import("react/jsx-runtime").JSX.Element;
3
+ export { searchExternalPromotionsTemplate };
@@ -0,0 +1,8 @@
1
+ import { IFacetData, IFacetValue, IFacetValueData, IFacetsTemplateData } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare function facetsTemplateDesktop(facetsTemplateDataDesktop: IFacetsTemplateData | null, facetContainers: {
3
+ [key: string]: React.LegacyRef<HTMLDivElement> | undefined;
4
+ }, isNotDeactivated: (name: string) => boolean, toggleFacetGroup: (name: string) => void, selectFacet: (index: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetValueData, isInput: boolean) => void, isChecked: (facetValue: IFacetValueData) => boolean | undefined, showMoreLessDesktop: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetData) => void): import("react/jsx-runtime").JSX.Element;
5
+ declare function facetsTemplateMobile(facetsTemplateDataMobile: IFacetsTemplateData | null, selectedFacetsCheckboxes: IFacetValue[], facetContainers: {
6
+ [key: string]: React.LegacyRef<HTMLDivElement> | undefined;
7
+ }, isNotDeactivated: (name: string) => boolean, toggleFacetGroup: (name: string) => void, selectFacet: (index: string, event: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetValueData, isInput: boolean, isMobile?: boolean) => void, isChecked: (facetValue: IFacetValueData) => boolean | undefined, unselectFacet: (facet: IFacetValue) => void, showMoreLessMobile: (e: React.MouseEvent<HTMLDivElement, MouseEvent>, data: IFacetData) => void, openOverlay: () => void, closeOverlay: () => void, unselectAll: () => void): import("react/jsx-runtime").JSX.Element;
8
+ export { facetsTemplateDesktop, facetsTemplateMobile };
@@ -0,0 +1,4 @@
1
+ import { ISearchstaxSuggestion } from "@searchstax-inc/searchstudio-ux-js";
2
+ import { locationWidgetConfig } from "./SearchstaxLocationWidgetTemplateConfig.js";
3
+ declare function InputTemplate(suggestions: ISearchstaxSuggestion[], onMouseLeave: () => void, onMouseOver: (suggestion: ISearchstaxSuggestion) => void, onMouseClick: () => void): React.ReactElement;
4
+ export { InputTemplate, locationWidgetConfig };
@@ -0,0 +1,3 @@
1
+ import { ISearchstaxLocationRenderData } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare function LocationTemplate(locationData: null | ISearchstaxLocationRenderData, locationChange: (value: string) => void, locationBlur: (value: string) => void, radiusChange: (value: string | number) => void, getCurrentLocation: () => void, inputValue?: string | null, selectValue?: string | number | undefined, locationError?: boolean): React.ReactElement;
3
+ export { LocationTemplate };
@@ -0,0 +1,13 @@
1
+ import { ISearchstaxLocation } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare const locationWidgetConfig: {
3
+ locationDecode: (term: string) => Promise<ISearchstaxLocation>;
4
+ locationDecodeCoordinatesToAddress: (lat: string, lon: string) => Promise<ISearchstaxLocation>;
5
+ locationSearchEnabled: boolean;
6
+ locationValuesOverride: {
7
+ locationDistanceEnabled: boolean;
8
+ filterValues: string[];
9
+ filterUnit: string;
10
+ locationFilterDefaultValue: string;
11
+ };
12
+ };
13
+ export { locationWidgetConfig };
@@ -0,0 +1,3 @@
1
+ import { ISearchstaxSearchFeedbackData } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare function searchOverviewTemplate(searchFeedbackData: null | ISearchstaxSearchFeedbackData, onOriginalQueryClick: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void): import("react/jsx-runtime").JSX.Element;
3
+ export { searchOverviewTemplate };
@@ -0,0 +1,4 @@
1
+ import { IPaginationData } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare function paginationTemplate(paginationData: IPaginationData | null, nextPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void, previousPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void): import("react/jsx-runtime").JSX.Element;
3
+ declare function infiniteScrollTemplate(paginationData: IPaginationData | null, nextPage: (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => void): import("react/jsx-runtime").JSX.Element;
4
+ export { paginationTemplate, infiniteScrollTemplate };
@@ -0,0 +1,3 @@
1
+ import { ISearchstaxRelatedSearchResult, ISearchstaxRelatedSearchesData } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare function searchRelatedSearchesTemplate(relatedData: null | ISearchstaxRelatedSearchesData, executeSearch: (result: ISearchstaxRelatedSearchResult) => void): import("react/jsx-runtime").JSX.Element;
3
+ export { searchRelatedSearchesTemplate };
@@ -0,0 +1,4 @@
1
+ import { ISearchstaxParsedResult, ISearchstaxSearchMetadata } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare function noResultTemplate(searchTerm: string, metaData: ISearchstaxSearchMetadata | null, executeSearch: (searchTerm: string) => void): React.ReactElement;
3
+ declare function resultsTemplate(searchResults: ISearchstaxParsedResult[], resultClicked: (results: ISearchstaxParsedResult, event: any) => void): React.ReactElement;
4
+ export { noResultTemplate, resultsTemplate };
@@ -0,0 +1,3 @@
1
+ import { ISearchstaxSearchSortingData } from "@searchstax-inc/searchstudio-ux-js";
2
+ declare function searchSortingTemplate(sortingData: null | ISearchstaxSearchSortingData, orderChange: (value: string) => void, selectedSorting: string): import("react/jsx-runtime").JSX.Element;
3
+ export { searchSortingTemplate };