@bridgeline-digital/hawksearch-handlebars-ui 5.2.4 → 5.2.6

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 (92) hide show
  1. package/changelog.md +6 -0
  2. package/dist/hawksearch-handlebars-ui.cjs +10 -0
  3. package/dist/hawksearch-handlebars-ui.js +11623 -0
  4. package/dist/hawksearch-handlebars-ui.min.js +975 -0
  5. package/dist/hawksearch-handlebars-ui.umd.cjs +10 -0
  6. package/dist/index.d.ts +1438 -1
  7. package/package.json +1 -1
  8. package/dist/components/base.component.d.ts +0 -139
  9. package/dist/components/content/content-types/base-content.component.d.ts +0 -9
  10. package/dist/components/content/content-types/custom-content/custom-content.component.d.ts +0 -21
  11. package/dist/components/content/content-types/featured-items-content/featured-items-content.component.d.ts +0 -22
  12. package/dist/components/content/content-types/featured-items-content-item/featured-items-content-item.component.d.ts +0 -39
  13. package/dist/components/content/content-types/image-content/image-content.component.d.ts +0 -22
  14. package/dist/components/content/content-types/index.d.ts +0 -6
  15. package/dist/components/content/content-types/popular-queries-content/popular-queries-content.component.d.ts +0 -22
  16. package/dist/components/content/content-zone/content-zone.component.d.ts +0 -44
  17. package/dist/components/content/index.d.ts +0 -2
  18. package/dist/components/general/date-picker/date-picker.component.d.ts +0 -117
  19. package/dist/components/general/icon/icon.component.d.ts +0 -38
  20. package/dist/components/general/index.d.ts +0 -5
  21. package/dist/components/general/range-slider/range-slider.component.d.ts +0 -54
  22. package/dist/components/general/rating/rating.component.d.ts +0 -39
  23. package/dist/components/general/tooltip/tooltip.component.d.ts +0 -32
  24. package/dist/components/index.d.ts +0 -231
  25. package/dist/components/landing-pages/index.d.ts +0 -1
  26. package/dist/components/landing-pages/landing-page/landing-page.component.d.ts +0 -32
  27. package/dist/components/recommendations/index.d.ts +0 -2
  28. package/dist/components/recommendations/recommendations/recommendations.component.d.ts +0 -87
  29. package/dist/components/recommendations/recommendations-item/recommendations-item.component.d.ts +0 -40
  30. package/dist/components/search/autocomplete/autocomplete.component.d.ts +0 -59
  31. package/dist/components/search/facet-types/base-facet.component.d.ts +0 -44
  32. package/dist/components/search/facet-types/checkbox-list-facet/checkbox-list-facet.component.d.ts +0 -36
  33. package/dist/components/search/facet-types/color-facet/color-facet.component.d.ts +0 -24
  34. package/dist/components/search/facet-types/date-range-facet/date-range-facet.component.d.ts +0 -33
  35. package/dist/components/search/facet-types/index.d.ts +0 -11
  36. package/dist/components/search/facet-types/linked-list-facet/link-list-facet.component.d.ts +0 -24
  37. package/dist/components/search/facet-types/numeric-range-facet/numeric-range-facet.component.d.ts +0 -32
  38. package/dist/components/search/facet-types/range-slider-facet/range-slider-facet.component.d.ts +0 -34
  39. package/dist/components/search/facet-types/recent-searches-facet/recent-searches-facet.component.d.ts +0 -29
  40. package/dist/components/search/facet-types/related-searches-facet/related-searches-facet.component.d.ts +0 -29
  41. package/dist/components/search/facet-types/search-within-facet/search-within-facet.component.d.ts +0 -29
  42. package/dist/components/search/facet-types/size-facet/size-facet.component.d.ts +0 -24
  43. package/dist/components/search/facet-wrapper/facet-wrapper.component.d.ts +0 -47
  44. package/dist/components/search/facets-list/facets-list.component.d.ts +0 -32
  45. package/dist/components/search/index.d.ts +0 -15
  46. package/dist/components/search/modified-query/modified-query.component.d.ts +0 -32
  47. package/dist/components/search/page-size/page-size.component.d.ts +0 -32
  48. package/dist/components/search/pagination/pagination.component.d.ts +0 -43
  49. package/dist/components/search/query-suggestions/query-suggestions.component.d.ts +0 -38
  50. package/dist/components/search/search-field/search-field.component.d.ts +0 -40
  51. package/dist/components/search/search-results/search-results.component.d.ts +0 -34
  52. package/dist/components/search/search-results-item/search-results-item.component.d.ts +0 -38
  53. package/dist/components/search/search-results-list/search-results-list.component.d.ts +0 -23
  54. package/dist/components/search/selected-facets/selected-facets.component.d.ts +0 -31
  55. package/dist/components/search/sorting/sorting.component.d.ts +0 -30
  56. package/dist/components/search/tabs/dist/tabs.component.spec.d.ts +0 -1
  57. package/dist/components/search/tabs/tabs.component.d.ts +0 -30
  58. package/dist/components/variants/index.d.ts +0 -1
  59. package/dist/components/variants/variant-selector/variant-selector.component.d.ts +0 -23
  60. package/dist/configuration/configuration.models.d.ts +0 -609
  61. package/dist/configuration/index.d.ts +0 -4
  62. package/dist/helpers/helpers.d.ts +0 -221
  63. package/dist/helpers/index.d.ts +0 -4
  64. package/dist/index.js +0 -3
  65. package/dist/index.js.LICENSE.txt +0 -28
  66. package/dist/index.js.map +0 -1
  67. package/dist/models/autocomplete.models.d.ts +0 -85
  68. package/dist/models/base.models.d.ts +0 -50
  69. package/dist/models/component.models.d.ts +0 -453
  70. package/dist/models/content.models.d.ts +0 -94
  71. package/dist/models/index.d.ts +0 -11
  72. package/dist/models/raw/index.d.ts +0 -4
  73. package/dist/models/raw/raw-autocomplete.models.d.ts +0 -51
  74. package/dist/models/raw/raw-base.models.d.ts +0 -8
  75. package/dist/models/raw/raw-recommendation.models.d.ts +0 -39
  76. package/dist/models/raw/raw-search.models.d.ts +0 -191
  77. package/dist/models/recommendation.models.d.ts +0 -31
  78. package/dist/models/search.models.d.ts +0 -237
  79. package/dist/models/tracking.models.d.ts +0 -42
  80. package/dist/placeholder.c99b7374b9bf579d0fd0.png +0 -0
  81. package/dist/services/autocomplete.service.d.ts +0 -11
  82. package/dist/services/base.service.d.ts +0 -63
  83. package/dist/services/index.d.ts +0 -8
  84. package/dist/services/recommendations.service.d.ts +0 -10
  85. package/dist/services/search.service.d.ts +0 -53
  86. package/dist/services/tracking.service.d.ts +0 -29
  87. package/dist/styles.65c0ab8e75ac4bcab10e99f66a160664.css +0 -1
  88. package/dist/utilities/colors.d.ts +0 -1
  89. package/dist/utilities/dates.d.ts +0 -4
  90. package/dist/utilities/decodes.d.ts +0 -1
  91. package/dist/utilities/formatters.d.ts +0 -4
  92. package/dist/utilities/index.d.ts +0 -7
@@ -1,51 +0,0 @@
1
- import { RawSearchResultsItem } from './raw-search.models';
2
- export interface RawAutocompleteRequest {
3
- ClientGuid: string;
4
- IndexName?: string;
5
- Keyword?: string;
6
- DisplayFullResponse?: boolean;
7
- }
8
- export interface RawAutocompleteCategory {
9
- Url: string;
10
- Value: string;
11
- FieldQSName: string;
12
- FieldQSValue: string;
13
- }
14
- export interface RawAutocompleteContent {
15
- Value: string;
16
- Url: string;
17
- Results: RawSearchResultsItem;
18
- }
19
- export interface RawAutocompleteQuery {
20
- RawValue: string;
21
- Url: string;
22
- Value: string;
23
- }
24
- export interface RawAutocompleteProduct {
25
- ProductName: string;
26
- Sku: string;
27
- Thumb?: {
28
- AltText: string;
29
- Url: string;
30
- };
31
- Url: string;
32
- Results: RawSearchResultsItem;
33
- }
34
- export interface RawAutocompleteResponse {
35
- Categories: Array<RawAutocompleteCategory>;
36
- CategoryHeading: string;
37
- Content: Array<RawAutocompleteContent>;
38
- ContentCount: number;
39
- ContentHeading: string;
40
- Count: number;
41
- DYMContentHeading: string;
42
- DymContentSearch?: Array<RawAutocompleteQuery>;
43
- DYMProductHeading: string;
44
- DymProductsSearch?: Array<RawAutocompleteQuery>;
45
- Popular: Array<RawAutocompleteQuery>;
46
- PopularHeading: string;
47
- ProductHeading: string;
48
- ProductCount: number;
49
- Products: Array<RawAutocompleteProduct>;
50
- ViewAllButtonLabel: string;
51
- }
@@ -1,8 +0,0 @@
1
- export interface RawVariantDocument {
2
- hawk_child_attributes?: Array<Record<string, Array<string>>>;
3
- hawk_child_attributes_hits?: Array<{
4
- Items: Array<Record<string, Array<string>>>;
5
- NofPages: number;
6
- NofResults: number;
7
- }>;
8
- }
@@ -1,39 +0,0 @@
1
- import { RawVariantDocument } from './raw-base.models';
2
- export interface RawRecommendationsRequest {
3
- clientGuid: string;
4
- indexName?: string;
5
- landingPageUrl?: string;
6
- visitId: string;
7
- visitorId: string;
8
- renderHTML: boolean;
9
- widgetUids: Array<{
10
- widgetGuid: string;
11
- uniqueid?: string;
12
- }>;
13
- }
14
- export type RawRecommendationsItemCustomDict = Record<string, string | Array<string>> & RawVariantDocument;
15
- export interface RawRecommendationsItem extends Record<string, any> {
16
- customDict: RawRecommendationsItemCustomDict;
17
- id: string;
18
- imageUrl?: string;
19
- itemName: string;
20
- url: string;
21
- price?: string;
22
- rating?: string;
23
- salePrice?: string;
24
- shortDescription?: string;
25
- }
26
- export interface RawRecommendationsWidget {
27
- isCarousel: boolean;
28
- isVertical: boolean;
29
- itemsCount: number;
30
- recommendationItems?: Array<RawRecommendationsItem>;
31
- widgetCssClass: string;
32
- widgetGuid: string;
33
- widgetName: string;
34
- }
35
- export interface RawRecommendationsResponse {
36
- isSuccess: boolean;
37
- requestId: string;
38
- widgetItems?: Array<RawRecommendationsWidget>;
39
- }
@@ -1,191 +0,0 @@
1
- import { RawVariantDocument } from './raw-base.models';
2
- export interface RawFacetValue {
3
- Count: number;
4
- Label: string;
5
- Level?: number;
6
- Value: string;
7
- RangeEnd: string;
8
- RangeMax: string;
9
- RangeMin: string;
10
- RangeStart: string;
11
- Selected?: boolean;
12
- Children?: Array<RawFacetValue>;
13
- }
14
- export interface RawFacetRangeValue {
15
- AssetFullUrl: string;
16
- IsNumeric: boolean;
17
- LBound: string;
18
- Label: string;
19
- UBound: string;
20
- Value: string;
21
- }
22
- export interface RawFeaturedItem extends RawMerchandisingItem {
23
- FeaturedItems?: Array<RawSearchResultsItem>;
24
- Items?: Array<RawSearchResultsItem>;
25
- }
26
- export interface RawFeaturedItems {
27
- Items: Array<RawFeaturedItem>;
28
- }
29
- export interface RawFacetSwatchValue {
30
- Value: string;
31
- Color?: string;
32
- AssetName?: string;
33
- AssetUrl?: string;
34
- IsDefault: boolean;
35
- }
36
- export interface RawFacet {
37
- AlwaysVisible: boolean;
38
- CurrencySymbol: string;
39
- DataType: string;
40
- DisplayType: string;
41
- ExpandSelection: boolean;
42
- FacetId: number;
43
- FacetType: string;
44
- Field: string;
45
- FieldType: string;
46
- IsCollapsedDefault?: boolean;
47
- IsCollapsible?: boolean;
48
- IsCurrency: boolean;
49
- IsNumeric: boolean;
50
- IsSearch: boolean;
51
- IsVisible: boolean;
52
- Name: string;
53
- ParamName?: string;
54
- Ranges?: Array<RawFacetRangeValue>;
55
- ScrollHeight?: number;
56
- ScrollThreshold?: number;
57
- SearchThreshold?: number;
58
- ShowFacetCount?: boolean;
59
- ShowItemsCount?: boolean;
60
- Tooltip?: string;
61
- TruncateThreshold?: number;
62
- Values?: Array<RawFacetValue>;
63
- SwatchData?: Array<RawFacetSwatchValue>;
64
- }
65
- export interface RawMerchandisingItem {
66
- AltTag?: string;
67
- BannerId: number;
68
- CampaignId: number;
69
- ContentType: string;
70
- ForwardUrl?: string;
71
- Height?: number;
72
- ImageUrl?: string;
73
- IsMobile: boolean;
74
- IsTablet: boolean;
75
- IsTrackingEnabled?: boolean;
76
- MobileHeight?: number;
77
- MobileWidth?: number;
78
- Output?: any;
79
- TabletHeight?: number;
80
- TabletWidth?: number;
81
- Target: string;
82
- Title: string;
83
- WidgetType?: string;
84
- Width?: number;
85
- Zone: string;
86
- }
87
- export interface RawMerchandising {
88
- Items: Array<RawMerchandisingItem>;
89
- }
90
- export interface RawPageContent {
91
- ZoneName: string;
92
- Items: Array<RawMerchandisingItem>;
93
- }
94
- export interface RawSearchSelectionItem {
95
- Label: string;
96
- Value: string;
97
- }
98
- export interface RawSearchSelection {
99
- Label: string;
100
- Items: Array<RawSearchSelectionItem>;
101
- }
102
- export interface RawSearchSelections {
103
- [field: string]: RawSearchSelection;
104
- }
105
- export interface RawSearchPagination {
106
- CurrentPage: number;
107
- IsShowFirstLink: boolean;
108
- IsShowLastLink: boolean;
109
- MaxPerPage: number;
110
- NofPages: number;
111
- NofResults: number;
112
- NumberOfPageLinks: number;
113
- Items: Array<{
114
- Label: string;
115
- PageSize: number;
116
- Selected: boolean;
117
- Default: boolean;
118
- }>;
119
- }
120
- export interface RawSearchSorting {
121
- Value?: string;
122
- Items: Array<{
123
- Label: string;
124
- Value: string;
125
- IsDefault: boolean;
126
- Selected: boolean;
127
- }>;
128
- }
129
- export interface RawSearchRedirect {
130
- Location: string;
131
- Target?: string;
132
- }
133
- export type RawSearchResultsItemDocument = Record<string, Array<string>> & RawVariantDocument;
134
- export interface RawSearchResultsItem {
135
- DocId: string;
136
- Document: RawSearchResultsItemDocument;
137
- IsPin: boolean;
138
- IsVisible: boolean;
139
- Score: number;
140
- }
141
- export interface RawSearchResponse {
142
- AdjustedKeyword?: string;
143
- Breadcrumb?: string;
144
- CustomHtml?: string;
145
- DidYouMean?: Array<string>;
146
- Facets?: Array<RawFacet>;
147
- FeaturedItems?: RawFeaturedItems;
148
- HeaderTitle?: string;
149
- Keyword?: string;
150
- Merchandising?: RawMerchandising;
151
- MetaDescription?: string;
152
- MetaKeywords?: string;
153
- MetaRobots?: string;
154
- PageContent?: Array<RawPageContent>;
155
- PageHeading?: string;
156
- PageLayoutId?: number;
157
- PageLayoutHtml?: string;
158
- Pagination?: RawSearchPagination;
159
- Redirect?: RawSearchRedirect;
160
- RelCanonical?: string;
161
- Results?: Array<RawSearchResultsItem>;
162
- Selections?: RawSearchSelections;
163
- Sorting?: RawSearchSorting;
164
- Success: boolean;
165
- TrackingId: string;
166
- }
167
- export interface RawSearchRequest {
168
- ClientData?: {
169
- UserAgent?: string;
170
- VisitorId?: string;
171
- VisitId?: string;
172
- };
173
- ClientGuid: string;
174
- CustomURL?: string;
175
- IgnoreSpellcheck?: boolean;
176
- IndexName?: string;
177
- IsInPreview?: boolean;
178
- Keyword?: string;
179
- FacetSelections?: Record<string, Array<string> | undefined>;
180
- MaxPerPage?: number;
181
- PageNo?: number;
182
- SearchWithin?: string;
183
- SortBy?: string;
184
- Variants?: {
185
- CountFacetHitOnChild?: boolean;
186
- MaxPerPage?: number;
187
- PageNo?: number;
188
- SortBy?: string;
189
- SortCode?: string;
190
- };
191
- }
@@ -1,31 +0,0 @@
1
- import { Item } from './base.models';
2
- /**
3
- * @category Recommendations
4
- */
5
- export interface RecommendationsRequest {
6
- widgetId: string;
7
- itemId?: string;
8
- url?: string;
9
- }
10
- /**
11
- * @category Recommendations
12
- */
13
- export interface RecommendationsItem extends Item {
14
- }
15
- /**
16
- * @category Recommendations
17
- */
18
- export interface RecommendationsWidget {
19
- id: string;
20
- requestId: string;
21
- title: string;
22
- carousel: boolean;
23
- items?: Array<RecommendationsItem>;
24
- }
25
- /**
26
- * @category Recommendations
27
- */
28
- export interface RecommendationsResponse {
29
- requestId: string;
30
- widgets?: Array<RecommendationsWidget>;
31
- }
@@ -1,237 +0,0 @@
1
- import { Item, ItemType, ItemVariant } from './base.models';
2
- import { ContentZones } from './content.models';
3
- /**
4
- * @category Search
5
- */
6
- export type FacetValueState = {
7
- toggled?: boolean;
8
- };
9
- /**
10
- * @category Search
11
- */
12
- export type FacetState = {
13
- id: number;
14
- collapsed?: boolean;
15
- filter?: string;
16
- toggled?: boolean;
17
- values?: Record<string, FacetValueState>;
18
- };
19
- /**
20
- * @category Search
21
- */
22
- export type FacetType = 'checkbox' | 'color' | 'date-range' | 'link' | 'numeric-range' | 'range-slider' | 'recent-searches' | 'related-searches' | 'search' | 'size' | 'tabs' | 'unsupported';
23
- /**
24
- * @category Search
25
- */
26
- export interface ContentConfiguration {
27
- breadcrumbs?: string;
28
- customHtml?: string;
29
- heading?: string;
30
- }
31
- /**
32
- * @category Search
33
- */
34
- export interface SelectedFacetValue {
35
- title: string;
36
- value: string;
37
- excluded: boolean;
38
- }
39
- /**
40
- * @category Search
41
- */
42
- export interface SelectedFacet {
43
- field: string;
44
- currency: boolean;
45
- title: string;
46
- values: Array<SelectedFacetValue>;
47
- }
48
- /**
49
- * @category Search
50
- */
51
- export interface FacetScrolling {
52
- height?: number;
53
- threshold: number;
54
- }
55
- /**
56
- * @category Search
57
- */
58
- export interface FacetTruncation {
59
- threshold: number;
60
- }
61
- /**
62
- * @category Search
63
- */
64
- export interface FacetSearch {
65
- threshold: number;
66
- }
67
- /**
68
- * @category Search
69
- */
70
- export interface FacetValueColor {
71
- name: string;
72
- hex?: string;
73
- imageUrl?: string;
74
- }
75
- /**
76
- * @category Search
77
- */
78
- export interface FacetValue {
79
- title: string;
80
- imageUrl?: string;
81
- value?: string;
82
- color?: FacetValueColor;
83
- count?: number;
84
- level?: number;
85
- selected?: boolean;
86
- excluded?: boolean;
87
- children?: Array<FacetValue>;
88
- }
89
- /**
90
- * @category Search
91
- */
92
- interface FacetRange<T> {
93
- type: string;
94
- min: T;
95
- max: T;
96
- start: T;
97
- end: T;
98
- }
99
- /**
100
- * @category Search
101
- */
102
- export interface DateFacetRange extends FacetRange<Date> {
103
- type: 'date';
104
- }
105
- /**
106
- * @category Search
107
- */
108
- export interface NumericFacetRange extends FacetRange<number> {
109
- type: 'numeric';
110
- }
111
- /**
112
- * @category Search
113
- */
114
- export interface Facet {
115
- id: number;
116
- type: FacetType;
117
- title: string;
118
- values?: Array<FacetValue>;
119
- field: string;
120
- collapsible: boolean;
121
- collapsed?: boolean;
122
- displayCount?: boolean;
123
- range?: DateFacetRange | NumericFacetRange;
124
- scrolling?: FacetScrolling;
125
- search?: FacetSearch;
126
- searchWithin?: string;
127
- tooltip?: string;
128
- truncation?: FacetTruncation;
129
- visible: boolean;
130
- }
131
- /**
132
- * @category Search
133
- */
134
- export interface PaginationOption {
135
- title: string;
136
- pageSize: number;
137
- selected: boolean;
138
- default: boolean;
139
- }
140
- /**
141
- * @category Search
142
- */
143
- export interface Pagination {
144
- page: number;
145
- pageSize: number;
146
- totalPages: number;
147
- totalResults: number;
148
- maxPageLinks?: number;
149
- displayFirstLink: boolean;
150
- displayLastLink: boolean;
151
- options: Array<PaginationOption>;
152
- }
153
- /**
154
- * @category Search
155
- */
156
- export interface Redirect {
157
- url: string;
158
- target?: string;
159
- }
160
- /**
161
- * @category Search
162
- */
163
- export interface SeoConfiguration {
164
- canonicalUrl?: string;
165
- description?: string;
166
- keywords?: string;
167
- robots?: string;
168
- title?: string;
169
- }
170
- /**
171
- * @category Search
172
- */
173
- export interface SortingOption {
174
- title: string;
175
- value: string;
176
- default: boolean;
177
- selected: boolean;
178
- }
179
- /**
180
- * @category Search
181
- */
182
- export interface Sorting {
183
- value?: string;
184
- options: Array<SortingOption>;
185
- }
186
- /**
187
- * @category Search
188
- */
189
- export interface SearchResultsItemVariant extends ItemVariant {
190
- }
191
- /**
192
- * @category Search
193
- */
194
- export interface SearchResultsItem extends Item {
195
- pinned: boolean;
196
- score: number;
197
- type: ItemType;
198
- }
199
- /**
200
- * @category Search
201
- */
202
- export interface SearchResponse {
203
- content?: ContentConfiguration;
204
- contentZones?: ContentZones;
205
- customLayout?: string;
206
- facets?: Array<Facet>;
207
- modifiedQuery?: string;
208
- pagination?: Pagination;
209
- query?: string;
210
- querySuggestions?: Array<string>;
211
- redirect?: Redirect;
212
- results?: Array<SearchResultsItem>;
213
- selectedFacets?: Array<SelectedFacet>;
214
- seo?: SeoConfiguration;
215
- sorting?: Sorting;
216
- success: boolean;
217
- trackingId: string;
218
- }
219
- /**
220
- * @category Search
221
- */
222
- export type SelectedFacets = Record<string, Array<string> | undefined>;
223
- /**
224
- * @category Search
225
- */
226
- export interface SearchRequest {
227
- disableSpellcheck?: boolean;
228
- facets?: SelectedFacets;
229
- newRequest: boolean;
230
- pageSize?: number;
231
- page?: number;
232
- query?: string;
233
- searchWithin?: string;
234
- sort?: string;
235
- url?: string;
236
- }
237
- export {};
@@ -1,42 +0,0 @@
1
- /**
2
- * @category Tracking
3
- */
4
- export declare enum AutocompleteItemType {
5
- Search = 1,
6
- Category = 2,
7
- Product = 3,
8
- Content = 4
9
- }
10
- /**
11
- * @category Tracking
12
- */
13
- export declare enum EventType {
14
- PageLoad = 1,
15
- Search = 2,
16
- Click = 3,
17
- AddToCart = 4,
18
- Rate = 5,
19
- Sale = 6,
20
- BannerClick = 7,
21
- BannerImpression = 8,
22
- RecommendationClick = 10,
23
- AutocompleteClick = 11,
24
- AddToCartMultiple = 14
25
- }
26
- /**
27
- * @category Tracking
28
- */
29
- export declare enum PageType {
30
- Item = 1,
31
- Landing = 2,
32
- Cart = 3,
33
- Order = 4,
34
- Custom = 5
35
- }
36
- /**
37
- * @category Tracking
38
- */
39
- export declare enum SearchType {
40
- Initial = 1,
41
- Refinement = 2
42
- }
@@ -1,11 +0,0 @@
1
- import { AutocompleteResponse } from '@models';
2
- import { BaseService } from '@services';
3
- export declare class AutocompleteService extends BaseService {
4
- protected baseUrl: string;
5
- private decodeQuery;
6
- query(query?: string): Promise<AutocompleteResponse>;
7
- private executeAutocomplete;
8
- private convertResponse;
9
- bindComponent(autocompleteResponse: AutocompleteResponse): void;
10
- }
11
- export declare const autocompleteService: AutocompleteService;
@@ -1,63 +0,0 @@
1
- import { HawkSearchComponents } from '@configuration';
2
- import { ItemVariant, RawVariantDocument } from '@models';
3
- export interface FieldMappings {
4
- description: Array<string>;
5
- imageUrl: Array<string>;
6
- price: Array<string>;
7
- rating: Array<string>;
8
- salePrice: Array<string>;
9
- sku: Array<string>;
10
- title: Array<string>;
11
- type: Array<string>;
12
- url: Array<string>;
13
- }
14
- export interface VariantFieldMappings {
15
- color: {
16
- name: Array<string>;
17
- hex: Array<string>;
18
- imageUrl: Array<string>;
19
- };
20
- description: Array<string>;
21
- id: Array<string>;
22
- imageUrl: Array<string>;
23
- price: Array<string>;
24
- rating: Array<string>;
25
- salePrice: Array<string>;
26
- sku: Array<string>;
27
- title: Array<string>;
28
- url: Array<string>;
29
- }
30
- export declare abstract class BaseService {
31
- protected abstract baseUrl: string;
32
- protected fieldMappings: FieldMappings;
33
- protected variantFieldMappings: VariantFieldMappings;
34
- queryStringParams: {
35
- disableSpellcheck: string;
36
- page: string;
37
- pageSize: string;
38
- query: string;
39
- searchWithin: string;
40
- sort: string;
41
- };
42
- searchUrl: string;
43
- protected get onSearchPage(): boolean;
44
- constructor();
45
- protected httpPost<T>(relativeUrl: string, body?: any): Promise<T>;
46
- private getHeaders;
47
- private getFieldMappings;
48
- protected getVisitorId(): string;
49
- protected getVisitId(): string;
50
- protected generateGuid(): string;
51
- protected stripHtml(input: string): string;
52
- protected getValue(data: object, fieldMappings: Array<string>): Array<string> | undefined;
53
- protected getString(data: object, fieldMappings: Array<string>, defaultValue?: string): string | undefined;
54
- protected getNumber(data: object, fieldMappings: Array<string>, defaultValue?: number): number | undefined;
55
- protected getUrl(data: object, fieldMappings: Array<string>, prefix?: string | undefined): string | undefined;
56
- protected getFullUrl(url: string | undefined, prefix: string | undefined): string | undefined;
57
- protected getVariants(document: RawVariantDocument): {
58
- items: Array<ItemVariant> | undefined;
59
- selectedItem?: ItemVariant;
60
- };
61
- protected triggerBindEvent<T>(component: keyof HawkSearchComponents, data: T, filter?: string): void;
62
- protected triggerEvent<T>(name: string, data: T): void;
63
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * @module Services
3
- */
4
- export * from './base.service';
5
- export * from './autocomplete.service';
6
- export * from './recommendations.service';
7
- export * from './search.service';
8
- export * from './tracking.service';
@@ -1,10 +0,0 @@
1
- import { RecommendationsRequest, RecommendationsResponse } from '@models';
2
- import { BaseService } from '@services';
3
- export declare class RecommendationsService extends BaseService {
4
- protected baseUrl: string;
5
- getItems(recommendationsRequest: RecommendationsRequest): Promise<RecommendationsResponse>;
6
- private executeRecommendations;
7
- private convertResponse;
8
- bindComponents(recommendationsResponse: RecommendationsResponse): void;
9
- }
10
- export declare const recommendationsService: RecommendationsService;