@bridgeline-digital/hawksearch-handlebars-ui 5.2.0 → 5.2.1

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 (88) hide show
  1. package/changelog.md +1 -1
  2. package/dist/components/base.component.d.ts +139 -0
  3. package/dist/components/content/content-types/base-content.component.d.ts +9 -0
  4. package/dist/components/content/content-types/custom-content/custom-content.component.d.ts +21 -0
  5. package/dist/components/content/content-types/featured-items-content/featured-items-content.component.d.ts +22 -0
  6. package/dist/components/content/content-types/featured-items-content-item/featured-items-content-item.component.d.ts +39 -0
  7. package/dist/components/content/content-types/image-content/image-content.component.d.ts +22 -0
  8. package/dist/components/content/content-types/index.d.ts +6 -0
  9. package/dist/components/content/content-types/popular-queries-content/popular-queries-content.component.d.ts +22 -0
  10. package/dist/components/content/content-zone/content-zone.component.d.ts +44 -0
  11. package/dist/components/content/index.d.ts +2 -0
  12. package/dist/components/general/date-picker/date-picker.component.d.ts +117 -0
  13. package/dist/components/general/icon/icon.component.d.ts +38 -0
  14. package/dist/components/general/index.d.ts +5 -0
  15. package/dist/components/general/range-slider/range-slider.component.d.ts +54 -0
  16. package/dist/components/general/rating/rating.component.d.ts +39 -0
  17. package/dist/components/general/tooltip/tooltip.component.d.ts +32 -0
  18. package/dist/components/index.d.ts +231 -0
  19. package/dist/components/landing-pages/index.d.ts +1 -0
  20. package/dist/components/landing-pages/landing-page/landing-page.component.d.ts +32 -0
  21. package/dist/components/recommendations/index.d.ts +2 -0
  22. package/dist/components/recommendations/recommendations/recommendations.component.d.ts +87 -0
  23. package/dist/components/recommendations/recommendations-item/recommendations-item.component.d.ts +40 -0
  24. package/dist/components/search/autocomplete/autocomplete.component.d.ts +59 -0
  25. package/dist/components/search/facet-types/base-facet.component.d.ts +44 -0
  26. package/dist/components/search/facet-types/checkbox-list-facet/checkbox-list-facet.component.d.ts +36 -0
  27. package/dist/components/search/facet-types/color-facet/color-facet.component.d.ts +24 -0
  28. package/dist/components/search/facet-types/date-range-facet/date-range-facet.component.d.ts +33 -0
  29. package/dist/components/search/facet-types/index.d.ts +11 -0
  30. package/dist/components/search/facet-types/linked-list-facet/link-list-facet.component.d.ts +24 -0
  31. package/dist/components/search/facet-types/numeric-range-facet/numeric-range-facet.component.d.ts +32 -0
  32. package/dist/components/search/facet-types/range-slider-facet/range-slider-facet.component.d.ts +34 -0
  33. package/dist/components/search/facet-types/recent-searches-facet/recent-searches-facet.component.d.ts +29 -0
  34. package/dist/components/search/facet-types/related-searches-facet/related-searches-facet.component.d.ts +29 -0
  35. package/dist/components/search/facet-types/search-within-facet/search-within-facet.component.d.ts +29 -0
  36. package/dist/components/search/facet-types/size-facet/size-facet.component.d.ts +24 -0
  37. package/dist/components/search/facet-wrapper/facet-wrapper.component.d.ts +47 -0
  38. package/dist/components/search/facets-list/facets-list.component.d.ts +32 -0
  39. package/dist/components/search/index.d.ts +15 -0
  40. package/dist/components/search/modified-query/modified-query.component.d.ts +32 -0
  41. package/dist/components/search/page-size/page-size.component.d.ts +32 -0
  42. package/dist/components/search/pagination/pagination.component.d.ts +43 -0
  43. package/dist/components/search/query-suggestions/query-suggestions.component.d.ts +38 -0
  44. package/dist/components/search/search-field/search-field.component.d.ts +39 -0
  45. package/dist/components/search/search-results/search-results.component.d.ts +34 -0
  46. package/dist/components/search/search-results-item/search-results-item.component.d.ts +38 -0
  47. package/dist/components/search/search-results-list/search-results-list.component.d.ts +23 -0
  48. package/dist/components/search/selected-facets/selected-facets.component.d.ts +31 -0
  49. package/dist/components/search/sorting/sorting.component.d.ts +30 -0
  50. package/dist/components/search/tabs/dist/tabs.component.spec.d.ts +1 -0
  51. package/dist/components/search/tabs/tabs.component.d.ts +30 -0
  52. package/dist/components/variants/index.d.ts +1 -0
  53. package/dist/components/variants/variant-selector/variant-selector.component.d.ts +23 -0
  54. package/dist/configuration/configuration.models.d.ts +602 -0
  55. package/dist/configuration/index.d.ts +4 -0
  56. package/dist/helpers/helpers.d.ts +221 -0
  57. package/dist/helpers/index.d.ts +4 -0
  58. package/dist/index.d.ts +1 -0
  59. package/dist/index.js +3 -0
  60. package/dist/index.js.LICENSE.txt +26 -0
  61. package/dist/index.js.map +1 -0
  62. package/dist/models/autocomplete.models.d.ts +85 -0
  63. package/dist/models/base.models.d.ts +50 -0
  64. package/dist/models/component.models.d.ts +453 -0
  65. package/dist/models/content.models.d.ts +94 -0
  66. package/dist/models/index.d.ts +11 -0
  67. package/dist/models/raw/index.d.ts +4 -0
  68. package/dist/models/raw/raw-autocomplete.models.d.ts +51 -0
  69. package/dist/models/raw/raw-base.models.d.ts +8 -0
  70. package/dist/models/raw/raw-recommendation.models.d.ts +39 -0
  71. package/dist/models/raw/raw-search.models.d.ts +191 -0
  72. package/dist/models/recommendation.models.d.ts +31 -0
  73. package/dist/models/search.models.d.ts +237 -0
  74. package/dist/models/tracking.models.d.ts +42 -0
  75. package/dist/placeholder.c99b7374b9bf579d0fd0.png +0 -0
  76. package/dist/services/autocomplete.service.d.ts +11 -0
  77. package/dist/services/base.service.d.ts +63 -0
  78. package/dist/services/index.d.ts +8 -0
  79. package/dist/services/recommendations.service.d.ts +10 -0
  80. package/dist/services/search.service.d.ts +53 -0
  81. package/dist/services/tracking.service.d.ts +29 -0
  82. package/dist/styles.65c0ab8e75ac4bcab10e99f66a160664.css +1 -0
  83. package/dist/utilities/colors.d.ts +1 -0
  84. package/dist/utilities/dates.d.ts +4 -0
  85. package/dist/utilities/decodes.d.ts +1 -0
  86. package/dist/utilities/formatters.d.ts +4 -0
  87. package/dist/utilities/index.d.ts +7 -0
  88. package/package.json +1 -1
@@ -0,0 +1,602 @@
1
+ import * as Handlebars from 'handlebars';
2
+ import { ItemType, RecommendationsResponse, SearchRequest, SearchResponse } from '@models';
3
+ import { AutocompleteService, RecommendationsService, SearchService, TrackingService } from '../services';
4
+ export interface BaseComponentConfig {
5
+ /**
6
+ * Specifies whether the component should be rendered in the [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM). This is highly recommended to avoid CSS conflicts.
7
+ *
8
+ * #### Default Value
9
+ * `true`
10
+ */
11
+ shadowDom?: boolean;
12
+ /**
13
+ * Specifies a custom template to be used instead of the default template.
14
+ *
15
+ * *For more information, see {@link Components}.*
16
+ */
17
+ template?: string;
18
+ }
19
+ export interface AutocompleteComponentConfig extends BaseComponentConfig {
20
+ }
21
+ export interface CheckboxListFacetComponentConfig extends BaseComponentConfig {
22
+ excludeEnabled?: boolean;
23
+ strings?: {
24
+ collapse?: string;
25
+ exclude?: string;
26
+ expand?: string;
27
+ include?: string;
28
+ showFewer?: string;
29
+ showMore?: string;
30
+ };
31
+ }
32
+ export interface ColorFacetComponentConfig extends BaseComponentConfig {
33
+ excludeEnabled?: boolean;
34
+ strings?: {
35
+ exclude?: string;
36
+ include?: string;
37
+ showFewer?: string;
38
+ showMore?: string;
39
+ };
40
+ }
41
+ export interface ContentZoneComponentConfig extends BaseComponentConfig {
42
+ }
43
+ export interface CustomContentComponentConfig extends BaseComponentConfig {
44
+ }
45
+ export interface DatePickerComponentConfig extends BaseComponentConfig {
46
+ strings?: {
47
+ defaultLabel?: string;
48
+ next?: string;
49
+ previous?: string;
50
+ selectMonth?: string;
51
+ viewCalendar?: string;
52
+ };
53
+ }
54
+ export interface DateRangeFacetComponentConfig extends BaseComponentConfig {
55
+ strings?: {
56
+ endDate?: string;
57
+ startDate?: string;
58
+ };
59
+ }
60
+ export interface FacetsListComponentConfig extends BaseComponentConfig {
61
+ strings?: {
62
+ heading?: string;
63
+ };
64
+ }
65
+ export interface FacetWrapperComponentConfig extends BaseComponentConfig {
66
+ }
67
+ export interface FeaturedItemsContentComponentConfig extends BaseComponentConfig {
68
+ }
69
+ export interface FeaturedItemsContentItemComponentConfig extends BaseComponentConfig {
70
+ strings?: {
71
+ sale?: string;
72
+ };
73
+ }
74
+ export interface IconComponentConfig extends BaseComponentConfig {
75
+ }
76
+ export interface ImageContentComponentConfig extends BaseComponentConfig {
77
+ }
78
+ export interface LandingPageComponentConfig extends BaseComponentConfig {
79
+ }
80
+ export interface LinkListFacetComponentConfig extends BaseComponentConfig {
81
+ strings?: {
82
+ showFewer?: string;
83
+ showMore?: string;
84
+ };
85
+ }
86
+ export interface ModifiedQueryComponentConfig extends BaseComponentConfig {
87
+ strings?: {
88
+ showingResultsFor?: string;
89
+ searchInsteadFor?: string;
90
+ };
91
+ }
92
+ export interface NumericRangeFacetComponentConfig extends BaseComponentConfig {
93
+ strings?: {
94
+ maximum?: string;
95
+ minimum?: string;
96
+ };
97
+ }
98
+ export interface PageSizeComponentConfig extends BaseComponentConfig {
99
+ }
100
+ export interface PaginationComponentConfig extends BaseComponentConfig {
101
+ strings?: {
102
+ first?: string;
103
+ last?: string;
104
+ next?: string;
105
+ previous?: string;
106
+ summary?: string;
107
+ };
108
+ }
109
+ export interface PopularQueriesContentComponentConfig extends BaseComponentConfig {
110
+ }
111
+ export interface QuerySuggestionsComponentConfig extends BaseComponentConfig {
112
+ strings?: {
113
+ orDelimeter?: string;
114
+ prompt?: string;
115
+ };
116
+ }
117
+ export interface RangeSliderComponentConfig extends BaseComponentConfig {
118
+ strings?: {
119
+ end?: string;
120
+ start?: string;
121
+ };
122
+ }
123
+ export interface RangeSliderFacetComponentConfig extends BaseComponentConfig {
124
+ strings?: {
125
+ maximum?: string;
126
+ minimum?: string;
127
+ };
128
+ }
129
+ export interface RatingComponentConfig extends BaseComponentConfig {
130
+ }
131
+ export interface RecentSearchesFacetComponentConfig extends BaseComponentConfig {
132
+ }
133
+ export interface RecommendationsItemComponentConfig extends BaseComponentConfig {
134
+ strings?: {
135
+ sale?: string;
136
+ };
137
+ }
138
+ export interface RecommendationsComponentConfig extends BaseComponentConfig {
139
+ carousel?: {
140
+ autorotation?: {
141
+ enabled?: boolean;
142
+ interval?: number;
143
+ };
144
+ buttonsEnabled?: boolean;
145
+ enabled?: boolean;
146
+ paginationEnabled?: boolean;
147
+ paginationSelectedCssClass?: string;
148
+ };
149
+ headingEnabled?: boolean;
150
+ itemsToDisplay?: Breakpoints<number>;
151
+ strings?: {
152
+ next?: string;
153
+ previous?: string;
154
+ };
155
+ }
156
+ export interface RelatedSearchesFacetComponentConfig extends BaseComponentConfig {
157
+ }
158
+ export interface SearchFieldComponentConfig extends BaseComponentConfig {
159
+ strings?: {
160
+ placeholder?: string;
161
+ };
162
+ }
163
+ export interface SearchResultsComponentConfig extends BaseComponentConfig {
164
+ }
165
+ export interface SearchResultsItemComponentConfig extends BaseComponentConfig {
166
+ strings?: {
167
+ sale?: string;
168
+ };
169
+ }
170
+ export interface SearchResultsListComponentConfig extends BaseComponentConfig {
171
+ }
172
+ export interface SearchWithinFacetComponentConfig extends BaseComponentConfig {
173
+ strings?: {
174
+ label?: string;
175
+ };
176
+ }
177
+ export interface SelectedFacetsComponentConfig extends BaseComponentConfig {
178
+ strings?: {
179
+ remove?: string;
180
+ };
181
+ }
182
+ export interface SizeFacetComponentConfig extends BaseComponentConfig {
183
+ excludeEnabled?: boolean;
184
+ strings?: {
185
+ exclude?: string;
186
+ include?: string;
187
+ showFewer?: string;
188
+ showMore?: string;
189
+ };
190
+ }
191
+ export interface SortingComponentConfig extends BaseComponentConfig {
192
+ }
193
+ export interface TabsComponentConfig extends BaseComponentConfig {
194
+ }
195
+ export interface TooltipComponentConfig extends BaseComponentConfig {
196
+ }
197
+ export interface VariantSelectorComponentConfig extends BaseComponentConfig {
198
+ }
199
+ export interface HawkSearchComponents {
200
+ 'autocomplete'?: AutocompleteComponentConfig;
201
+ 'checkbox-list-facet'?: CheckboxListFacetComponentConfig;
202
+ 'color-facet'?: ColorFacetComponentConfig;
203
+ 'content-zone'?: ContentZoneComponentConfig;
204
+ 'custom-content'?: CustomContentComponentConfig;
205
+ 'date-picker'?: DatePickerComponentConfig;
206
+ 'date-range-facet'?: DateRangeFacetComponentConfig;
207
+ 'facet-wrapper'?: FacetWrapperComponentConfig;
208
+ 'facets-list'?: FacetsListComponentConfig;
209
+ 'featured-items-content'?: FeaturedItemsContentComponentConfig;
210
+ 'featured-items-content-item'?: FeaturedItemsContentItemComponentConfig;
211
+ 'icon'?: IconComponentConfig;
212
+ 'image-content'?: ImageContentComponentConfig;
213
+ 'landing-page'?: LandingPageComponentConfig;
214
+ 'link-list-facet'?: LinkListFacetComponentConfig;
215
+ 'modified-query'?: ModifiedQueryComponentConfig;
216
+ 'numeric-range-facet'?: NumericRangeFacetComponentConfig;
217
+ 'page-size'?: PageSizeComponentConfig;
218
+ 'pagination'?: PaginationComponentConfig;
219
+ 'popular-queries-content'?: PopularQueriesContentComponentConfig;
220
+ 'query-suggestions'?: QuerySuggestionsComponentConfig;
221
+ 'range-slider'?: RangeSliderComponentConfig;
222
+ 'range-slider-facet'?: RangeSliderFacetComponentConfig;
223
+ 'rating'?: RatingComponentConfig;
224
+ 'recommendations'?: RecommendationsComponentConfig;
225
+ 'recommendations-item'?: RecommendationsItemComponentConfig;
226
+ 'recent-searches-facet'?: RecentSearchesFacetComponentConfig;
227
+ 'related-searches-facet'?: RelatedSearchesFacetComponentConfig;
228
+ 'search-field'?: SearchFieldComponentConfig;
229
+ 'search-results'?: SearchResultsComponentConfig;
230
+ 'search-results-item'?: SearchResultsItemComponentConfig;
231
+ 'search-results-list'?: SearchResultsListComponentConfig;
232
+ 'search-within-facet'?: SearchWithinFacetComponentConfig;
233
+ 'selected-facets'?: SelectedFacetsComponentConfig;
234
+ 'size-facet'?: SizeFacetComponentConfig;
235
+ 'sorting'?: SortingComponentConfig;
236
+ 'tabs'?: TabsComponentConfig;
237
+ 'tooltip'?: TooltipComponentConfig;
238
+ 'variant-selector'?: VariantSelectorComponentConfig;
239
+ }
240
+ export type DisplayType = 'mobile' | 'tablet' | 'desktop';
241
+ export interface Breakpoints<TValue> extends Record<DisplayType, TValue> {
242
+ }
243
+ export interface FieldMappings {
244
+ /**
245
+ * #### Default Value
246
+ * `['description', 'longdescription']`
247
+ */
248
+ description?: string | Array<string>;
249
+ /**
250
+ * #### Default Value
251
+ * `['imageurl', 'image']`
252
+ */
253
+ imageUrl?: string | Array<string>;
254
+ /**
255
+ * #### Default Value
256
+ * `'price'`
257
+ */
258
+ price?: string | Array<string>;
259
+ /**
260
+ * #### Default Value
261
+ * `'rating'`
262
+ */
263
+ rating?: string | Array<string>;
264
+ /**
265
+ * #### Default Value
266
+ * `['saleprice']`
267
+ */
268
+ salePrice?: string | Array<string>;
269
+ /**
270
+ * #### Default Value
271
+ * `['sku']`
272
+ */
273
+ sku?: string | Array<string>;
274
+ /**
275
+ * #### Default Value
276
+ * `['title', 'name', 'itemname']`
277
+ */
278
+ title?: string | Array<string>;
279
+ /**
280
+ * #### Default Value
281
+ * `'type'`
282
+ */
283
+ type?: string | Array<string>;
284
+ /**
285
+ * #### Default Value
286
+ * `'url'`
287
+ */
288
+ url?: string;
289
+ }
290
+ export interface VariantFieldMappings extends FieldMappings {
291
+ /**
292
+ * #### Default Value
293
+ * `['id']`
294
+ */
295
+ id?: string | Array<string>;
296
+ color?: {
297
+ /**
298
+ * #### Default Value
299
+ * `['colorname', 'color']`
300
+ */
301
+ name?: string | Array<string>;
302
+ /**
303
+ * #### Default Value
304
+ * `['colorhex', 'colorvalue']`
305
+ */
306
+ hex?: string | Array<string>;
307
+ /**
308
+ * #### Default Value
309
+ * `['colorimageurl', 'colorimage']`
310
+ */
311
+ imageUrl?: string | Array<string>;
312
+ };
313
+ }
314
+ export interface HawkSearchConfig {
315
+ /**
316
+ * The unique ID for your installation found in the HawkSearch admin
317
+ */
318
+ clientId: string;
319
+ /**
320
+ * Specify an index to query rather than the default
321
+ */
322
+ index?: string;
323
+ /**
324
+ * Map item attributes to common object properties
325
+ */
326
+ fieldMappings?: FieldMappings;
327
+ autocomplete?: {
328
+ /**
329
+ * The API used to retrieve search results
330
+ *
331
+ * #### Default Value
332
+ * `'https://searchapi-dev.hawksearch.net'`
333
+ */
334
+ endpointUrl?: string;
335
+ /**
336
+ * Specifies whether autocomplete recommendations (autocomplete without entering a query - "instant engage") is enabled
337
+ *
338
+ * #### Default Value
339
+ * `false`
340
+ */
341
+ recommendationsEnabled?: boolean;
342
+ /**
343
+ * Whether to automatically URI decode the search query value. Runs recursively until value is fully decoded. For example, `Test%2520Value` would become `Test Value`.
344
+ *
345
+ * #### Default Value
346
+ * `false`
347
+ */
348
+ decodeQuery?: boolean;
349
+ /**
350
+ * Specifies the minimum length for a query to trigger an autocomplete recommendations request
351
+ *
352
+ * #### Default Value
353
+ * `1`
354
+ */
355
+ minCharacterCount?: number;
356
+ };
357
+ search?: {
358
+ /**
359
+ * The API used to retrieve search results
360
+ *
361
+ * #### Default Value
362
+ * `'https://searchapi-dev.hawksearch.net'`
363
+ */
364
+ endpointUrl?: string;
365
+ /**
366
+ * The URL of your search results page. This is used to redirect users after performing a search.
367
+ *
368
+ * #### Default Value
369
+ * `'/search'`
370
+ */
371
+ url?: string;
372
+ /**
373
+ * The prefix for values sent to the API when excluding a facet. This is only modified in rare circumstances where the project has facet values starting with a hyphen.
374
+ *
375
+ * #### Default Value
376
+ * `'-'`
377
+ */
378
+ facetExclusionPrefix?: string;
379
+ /**
380
+ * Specifies how search results should be classified
381
+ */
382
+ itemTypes?: {
383
+ /**
384
+ * If the value a search result item is missing a value for the field mapped to {@link HawkSearchConfig.search | fieldMappings.type}, this value will be assumed.
385
+ *
386
+ * #### Default Value
387
+ * `'content'`
388
+ */
389
+ default: ItemType;
390
+ /**
391
+ * List of values that will be considered a `product` result.
392
+ *
393
+ * #### Default Value
394
+ * `['item', 'product']`
395
+ */
396
+ productValues?: Array<string>;
397
+ };
398
+ /**
399
+ * Specifies which query string parameters are used
400
+ */
401
+ queryStringMappings?: {
402
+ /**
403
+ * #### Default Value
404
+ * `'disableSpellcheck'`
405
+ */
406
+ disableSpellcheck?: string;
407
+ /**
408
+ * #### Default Value
409
+ * `'page'`
410
+ */
411
+ page?: string;
412
+ /**
413
+ * #### Default Value
414
+ * `'pageSize'`
415
+ */
416
+ pageSize?: string;
417
+ /**
418
+ * #### Default Value
419
+ * `'query'`
420
+ */
421
+ query?: string;
422
+ /**
423
+ * #### Default Value
424
+ * `'searchWithin'`
425
+ */
426
+ searchWithin?: string;
427
+ /**
428
+ * #### Default Value
429
+ * `'sort'`
430
+ */
431
+ sort?: string;
432
+ };
433
+ /**
434
+ * Whether to automatically URI decode the search query value. Runs recursively until value is fully decoded. For example, `Test%2520Value` would become `Test Value`.
435
+ *
436
+ * #### Default Value
437
+ * `false`
438
+ */
439
+ decodeQuery?: boolean;
440
+ /**
441
+ * Whether to automatically URI decode facet selection values. Runs recursively until value is fully decoded. For example, `Test%2520Value` would become `Test Value`.
442
+ *
443
+ * #### Default Value
444
+ * `false`
445
+ */
446
+ decodeFacetValues?: boolean;
447
+ };
448
+ recommendations?: {
449
+ /**
450
+ * The API used to retrieve product recommendations
451
+ *
452
+ * #### Default Value
453
+ * `'https://recs-dev.hawksearch.net'`
454
+ */
455
+ endpointUrl?: string;
456
+ };
457
+ tracking?: {
458
+ /**
459
+ * Specifies whether user actions should be tracked to provide valuable insights on your search engine performance
460
+ *
461
+ * #### Default Value
462
+ *
463
+ * `true`
464
+ */
465
+ enabled?: boolean;
466
+ /**
467
+ * The API used to track user interactions
468
+ *
469
+ * #### Default Value
470
+ * `'https://tracking-dev.hawksearch.net'`
471
+ */
472
+ endpointUrl?: string;
473
+ };
474
+ variants?: {
475
+ /**
476
+ * When `true`, specifies that facet counts should be calculated based on the number of child items rather than the number of parent items
477
+ *
478
+ * #### Default Value
479
+ *
480
+ * `false`
481
+ */
482
+ baseFacetCountOnVariants?: boolean;
483
+ /**
484
+ * Specifies whether variant logic should be used if data is available
485
+ *
486
+ * #### Default Value
487
+ *
488
+ * `true`
489
+ */
490
+ enabled?: boolean;
491
+ /**
492
+ * When specified, this prefix is removed from the `attributes` collection on variant items. For example, if a value of `'child_'` is used and HawkSearch returns a field named `'child_color'`, it will be transformed to `'color'`.
493
+ */
494
+ fieldPrefix?: string;
495
+ /**
496
+ * Map item attributes to common object properties
497
+ */
498
+ fieldMappings?: VariantFieldMappings;
499
+ /**
500
+ * When `true`, specifies that tracking should use the ID of the selected variant rather than the ID of the parent
501
+ *
502
+ * #### Default Value
503
+ *
504
+ * `false`
505
+ */
506
+ trackUsingVariant?: boolean;
507
+ };
508
+ /**
509
+ * Specifies the minimum window widths that correspond to each breakpoint. This is used determine when certain content items are displayed.
510
+ *
511
+ * #### Default Value
512
+ * ```js
513
+ * {
514
+ * mobile: undefined,
515
+ * tablet: 740,
516
+ * desktop: 990
517
+ * }
518
+ * ```
519
+ */
520
+ breakpoints?: Breakpoints<number>;
521
+ /**
522
+ * Specifies component-specific configuration options
523
+ */
524
+ components?: HawkSearchComponents;
525
+ /**
526
+ * Specifies which styles should be loaded for each component
527
+ */
528
+ css?: {
529
+ /**
530
+ * One or more style sets to be loaded. This can be either a URL to an external stylesheet, the ID of a `template` element wrapping around a `style` element, or a string containing CSS rules.
531
+ */
532
+ customStyles?: string | Array<string>;
533
+ /**
534
+ * Specifies whether the default stylesheet should be loaded. This should generally be true except for with completely custom interfaces.
535
+ */
536
+ defaultStyles?: boolean;
537
+ };
538
+ /**
539
+ * Specifies how values should be formatted for different cultures
540
+ */
541
+ formatting?: {
542
+ /**
543
+ * #### Default Value
544
+ * `'en-US'`
545
+ */
546
+ cultureIsoCode?: string;
547
+ /**
548
+ * #### Default Value
549
+ * `'USD'`
550
+ */
551
+ currencyIsoCode?: string;
552
+ };
553
+ /**
554
+ * The URL of an image to be loaded whenever an image fails to load for a search result item
555
+ */
556
+ placeholderImageUrl?: string;
557
+ seo?: {
558
+ title?: {
559
+ /**
560
+ * Value prepended to title returned from API
561
+ */
562
+ prefix?: string;
563
+ /**
564
+ * Value appended to title returned from API
565
+ */
566
+ suffix?: string;
567
+ };
568
+ };
569
+ /**
570
+ * Specifies whether components should be rendered in the [Shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM). This is highly recommended to avoid CSS conflicts.
571
+ *
572
+ * #### Default Value
573
+ * `true`
574
+ */
575
+ shadowDom?: boolean;
576
+ /**
577
+ * If your data contains relative URLs, these values can be prepended to the values to convert them to absolute URLs
578
+ */
579
+ urlPrefixes?: {
580
+ assets?: string;
581
+ content?: string;
582
+ };
583
+ }
584
+ export interface HawkSearchGlobal {
585
+ config: HawkSearchConfig;
586
+ handlebars: typeof Handlebars;
587
+ recommendationsResponses?: {
588
+ [widgetId: string]: RecommendationsResponse;
589
+ };
590
+ searchRequest?: SearchRequest;
591
+ searchResponse?: SearchResponse;
592
+ services?: {
593
+ autocomplete: AutocompleteService;
594
+ recommendations: RecommendationsService;
595
+ search: SearchService;
596
+ tracking: TrackingService;
597
+ };
598
+ }
599
+ export interface HawkSearchState {
600
+ searchRequest?: SearchRequest;
601
+ searchResponse: SearchResponse;
602
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * @module Configuration
3
+ */
4
+ export * from './configuration.models';