@searchstax-inc/searchstudio-ux-angular 4.1.0 → 4.1.5

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 (63) hide show
  1. package/CHANGELOG.md +30 -15
  2. package/README.md +6 -2
  3. package/esm2022/lib/components/searchstax-input/searchstax-input.component.mjs +81 -0
  4. package/esm2022/lib/components/searchstax-results/searchstax-results.component.mjs +88 -0
  5. package/esm2022/lib/components/searchstax-search-answer/searchstax-search-answer.component.mjs +47 -0
  6. package/esm2022/lib/components/searchstax-search-external/searchstax-search-external.component.mjs +41 -0
  7. package/esm2022/lib/components/searchstax-search-facets/searchstax-search-facets.component.mjs +114 -0
  8. package/esm2022/lib/components/searchstax-search-location/searchstax-search-location.component.mjs +92 -0
  9. package/esm2022/lib/components/searchstax-search-overview/searchstax-search-overview.component.mjs +42 -0
  10. package/esm2022/lib/components/searchstax-search-pagination/searchstax-search-pagination.component.mjs +64 -0
  11. package/esm2022/lib/components/searchstax-search-related/searchstax-search-related.component.mjs +45 -0
  12. package/esm2022/lib/components/searchstax-search-sorting/searchstax-search-sorting.component.mjs +46 -0
  13. package/esm2022/lib/components/searchstax-wrapper.component.mjs +93 -0
  14. package/esm2022/lib/components/templates/SearchstaxLocationWidgetTemplateConfig.mjs +91 -0
  15. package/esm2022/lib/components/templates/searchstax-search-answer-template.mjs +119 -0
  16. package/esm2022/lib/components/templates/searchstax-search-external-template.mjs +107 -0
  17. package/esm2022/lib/components/templates/searchstax-search-facet-desktop-template.mjs +207 -0
  18. package/esm2022/lib/components/templates/searchstax-search-facet-mobile-template.mjs +343 -0
  19. package/esm2022/lib/components/templates/searchstax-search-input-template.mjs +126 -0
  20. package/esm2022/lib/components/templates/searchstax-search-location-template.mjs +152 -0
  21. package/esm2022/lib/components/templates/searchstax-search-no-results-template.mjs +85 -0
  22. package/esm2022/lib/components/templates/searchstax-search-overview-template.mjs +87 -0
  23. package/esm2022/lib/components/templates/searchstax-search-pagination-infinite-template.mjs +60 -0
  24. package/esm2022/lib/components/templates/searchstax-search-pagination-template.mjs +96 -0
  25. package/esm2022/lib/components/templates/searchstax-search-related-template.mjs +81 -0
  26. package/esm2022/lib/components/templates/searchstax-search-results-template.mjs +175 -0
  27. package/esm2022/lib/components/templates/searchstax-search-sorting-template.mjs +76 -0
  28. package/esm2022/lib/searchstudio-ux-angular.module.mjs +138 -0
  29. package/esm2022/lib/services/store-service.service.mjs +17 -0
  30. package/esm2022/public-api.mjs +30 -0
  31. package/esm2022/searchstax-inc-searchstudio-ux-angular.mjs +5 -0
  32. package/fesm2022/searchstax-inc-searchstudio-ux-angular.mjs +2601 -0
  33. package/fesm2022/searchstax-inc-searchstudio-ux-angular.mjs.map +1 -0
  34. package/index.d.ts +5 -0
  35. package/lib/components/searchstax-input/searchstax-input.component.d.ts +37 -0
  36. package/lib/components/searchstax-results/searchstax-results.component.d.ts +27 -0
  37. package/lib/components/searchstax-search-answer/searchstax-search-answer.component.d.ts +19 -0
  38. package/lib/components/searchstax-search-external/searchstax-search-external.component.d.ts +17 -0
  39. package/lib/components/searchstax-search-facets/searchstax-search-facets.component.d.ts +37 -0
  40. package/lib/components/searchstax-search-location/searchstax-search-location.component.d.ts +33 -0
  41. package/lib/components/searchstax-search-overview/searchstax-search-overview.component.d.ts +17 -0
  42. package/lib/components/searchstax-search-pagination/searchstax-search-pagination.component.d.ts +21 -0
  43. package/lib/components/searchstax-search-related/searchstax-search-related.component.d.ts +19 -0
  44. package/lib/components/searchstax-search-sorting/searchstax-search-sorting.component.d.ts +18 -0
  45. package/lib/components/searchstax-wrapper.component.d.ts +31 -0
  46. package/lib/components/templates/SearchstaxLocationWidgetTemplateConfig.d.ts +13 -0
  47. package/lib/components/templates/searchstax-search-answer-template.d.ts +7 -0
  48. package/lib/components/templates/searchstax-search-external-template.d.ts +7 -0
  49. package/lib/components/templates/searchstax-search-facet-desktop-template.d.ts +7 -0
  50. package/lib/components/templates/searchstax-search-facet-mobile-template.d.ts +7 -0
  51. package/lib/components/templates/searchstax-search-input-template.d.ts +7 -0
  52. package/lib/components/templates/searchstax-search-location-template.d.ts +7 -0
  53. package/lib/components/templates/searchstax-search-no-results-template.d.ts +7 -0
  54. package/lib/components/templates/searchstax-search-overview-template.d.ts +7 -0
  55. package/lib/components/templates/searchstax-search-pagination-infinite-template.d.ts +7 -0
  56. package/lib/components/templates/searchstax-search-pagination-template.d.ts +7 -0
  57. package/lib/components/templates/searchstax-search-related-template.d.ts +7 -0
  58. package/lib/components/templates/searchstax-search-results-template.d.ts +7 -0
  59. package/lib/components/templates/searchstax-search-sorting-template.d.ts +7 -0
  60. package/lib/searchstudio-ux-angular.module.d.ts +32 -0
  61. package/lib/services/store-service.service.d.ts +8 -0
  62. package/package.json +2 -5
  63. package/public-api.d.ts +26 -0
@@ -0,0 +1,2601 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, EventEmitter, Output, Input, Component, ViewChild, NgModule } from '@angular/core';
3
+ import { Searchstax } from '@searchstax-inc/searchstudio-ux-js';
4
+ import * as i1 from '@angular/common';
5
+ import { CommonModule } from '@angular/common';
6
+ import * as i2 from '@angular/forms';
7
+ import { FormsModule } from '@angular/forms';
8
+
9
+ class StoreServiceService {
10
+ constructor() {
11
+ this.searchstax = new Searchstax('vue');
12
+ }
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StoreServiceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
14
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StoreServiceService, providedIn: 'root' }); }
15
+ }
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StoreServiceService, decorators: [{
17
+ type: Injectable,
18
+ args: [{
19
+ providedIn: 'root'
20
+ }]
21
+ }], ctorParameters: () => [] });
22
+
23
+ class SearchstaxWrapper {
24
+ constructor(storeServiceService) {
25
+ this.storeServiceService = storeServiceService;
26
+ this.language = 'en';
27
+ this.model = '';
28
+ this.searchURL = '';
29
+ this.suggesterURL = '';
30
+ this.trackApiKey = '';
31
+ this.searchAuth = '';
32
+ this.analyticsBaseUrl = '';
33
+ this.analyticsSrc = '';
34
+ this.questionURL = '';
35
+ this.authType = 'basic';
36
+ this.autoCorrect = true;
37
+ this.initialized = new EventEmitter();
38
+ this.hooks = {};
39
+ }
40
+ ngOnInit() {
41
+ if (this.beforeSearch) {
42
+ this.hooks.beforeSearch = this.beforeSearch;
43
+ }
44
+ if (this.afterSearch) {
45
+ this.hooks.afterSearch = this.afterSearch;
46
+ }
47
+ this.storeServiceService.searchstax.initialize({
48
+ language: this.language,
49
+ model: this.model,
50
+ searchURL: this.searchURL,
51
+ suggesterURL: this.suggesterURL,
52
+ trackApiKey: this.trackApiKey,
53
+ searchAuth: this.searchAuth,
54
+ authType: this.authType,
55
+ autoCorrect: this.autoCorrect,
56
+ router: this.router,
57
+ hooks: this.hooks,
58
+ analyticsBaseUrl: this.analyticsBaseUrl,
59
+ analyticsSrc: this.analyticsSrc,
60
+ sessionId: this.sessionId,
61
+ questionURL: this.questionURL
62
+ });
63
+ this.initialized.emit(this.storeServiceService.searchstax);
64
+ }
65
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxWrapper, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
66
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxWrapper, selector: "app-searchstax-wrapper", inputs: { language: "language", model: "model", searchURL: "searchURL", suggesterURL: "suggesterURL", trackApiKey: "trackApiKey", searchAuth: "searchAuth", sessionId: "sessionId", analyticsBaseUrl: "analyticsBaseUrl", analyticsSrc: "analyticsSrc", questionURL: "questionURL", authType: "authType", autoCorrect: "autoCorrect", router: "router", beforeSearch: "beforeSearch", afterSearch: "afterSearch" }, outputs: { initialized: "initialized" }, ngImport: i0, template: `
67
+ <div>
68
+ <ng-content></ng-content>
69
+ </div>
70
+ `, isInline: true }); }
71
+ }
72
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxWrapper, decorators: [{
73
+ type: Component,
74
+ args: [{ selector: 'app-searchstax-wrapper', template: `
75
+ <div>
76
+ <ng-content></ng-content>
77
+ </div>
78
+ ` }]
79
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { language: [{
80
+ type: Input
81
+ }], model: [{
82
+ type: Input
83
+ }], searchURL: [{
84
+ type: Input
85
+ }], suggesterURL: [{
86
+ type: Input
87
+ }], trackApiKey: [{
88
+ type: Input
89
+ }], searchAuth: [{
90
+ type: Input
91
+ }], sessionId: [{
92
+ type: Input
93
+ }], analyticsBaseUrl: [{
94
+ type: Input
95
+ }], analyticsSrc: [{
96
+ type: Input
97
+ }], questionURL: [{
98
+ type: Input
99
+ }], authType: [{
100
+ type: Input
101
+ }], autoCorrect: [{
102
+ type: Input
103
+ }], router: [{
104
+ type: Input
105
+ }], beforeSearch: [{
106
+ type: Input
107
+ }], afterSearch: [{
108
+ type: Input
109
+ }], initialized: [{
110
+ type: Output
111
+ }] } });
112
+
113
+ //CUT START
114
+ const config = {
115
+ appId: "APP_ID",
116
+ relatedSearchesAPIKey: "KEY"
117
+ };
118
+ const locationWidgetConfig = {
119
+ locationDecode: (term) => {
120
+ return new Promise((resolve) => {
121
+ // make a request to google geocoding API to retrieve lat, lon and address
122
+ const geocodingAPIKey = "GEOCODING_API_KEY";
123
+ const geocodingURL = `https://maps.googleapis.com/maps/api/geocode/json?address=${encodeURIComponent(term)}&key=${geocodingAPIKey}`;
124
+ fetch(geocodingURL)
125
+ .then((response) => response.json())
126
+ .then((data) => {
127
+ if (data.status === "OK" && data.results.length > 0) {
128
+ const result = data.results[0];
129
+ const location = {
130
+ lat: result.geometry.location.lat,
131
+ lon: result.geometry.location.lng,
132
+ address: result.formatted_address,
133
+ };
134
+ resolve(location);
135
+ }
136
+ else {
137
+ resolve({
138
+ address: undefined,
139
+ lat: undefined,
140
+ lon: undefined,
141
+ error: true,
142
+ });
143
+ }
144
+ })
145
+ .catch(() => {
146
+ resolve({
147
+ address: undefined,
148
+ lat: undefined,
149
+ lon: undefined,
150
+ error: true,
151
+ });
152
+ });
153
+ });
154
+ },
155
+ locationDecodeCoordinatesToAddress: (lat, lon) => {
156
+ return new Promise((resolve) => {
157
+ fetch(`https://geocoding-staging.searchstax.co/reverse?location=${lat},${lon}&components=country:US&app_id=${config.appId}`, {
158
+ method: "GET",
159
+ headers: {
160
+ Authorization: `Token ${config.relatedSearchesAPIKey}`,
161
+ },
162
+ })
163
+ .then((response) => response.json())
164
+ .then((data) => {
165
+ if (data.status === "OK" && data.results.length > 0) {
166
+ const result = data.results[0];
167
+ resolve({
168
+ address: result.formatted_address,
169
+ lat: lat,
170
+ lon: lon,
171
+ error: false,
172
+ });
173
+ }
174
+ else {
175
+ resolve({
176
+ address: undefined,
177
+ lat: lat,
178
+ lon: lon,
179
+ error: true,
180
+ });
181
+ }
182
+ })
183
+ .catch(() => {
184
+ resolve({
185
+ address: undefined,
186
+ lat: lat,
187
+ lon: lon,
188
+ error: true,
189
+ });
190
+ });
191
+ });
192
+ },
193
+ locationSearchEnabled: false,
194
+ locationValuesOverride: {
195
+ locationDistanceEnabled: true,
196
+ filterValues: ["any", "1000"],
197
+ filterUnit: "miles",
198
+ locationFilterDefaultValue: "any"
199
+ },
200
+ };
201
+
202
+ // reusable-template.component.ts
203
+ class LocationTemplateComponent {
204
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocationTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
205
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: LocationTemplateComponent, selector: "app-location-template", viewQueries: [{ propertyName: "locationTemplate", first: true, predicate: ["locationTemplate"], descendants: true }], ngImport: i0, template: `
206
+ <ng-template
207
+ #locationTemplate
208
+ let-context="context"
209
+ let-locationData="locationData"
210
+ let-inputValue="inputValue"
211
+ let-selectValue="selectValue"
212
+ let-radiusChange="radiusChange"
213
+ let-inputChange="inputChange"
214
+ let-locationBlur="locationBlur"
215
+ let-locationError="locationError"
216
+ let-getCurrentLocation="getCurrentLocation"
217
+ >
218
+ <div
219
+ class="searchstax-location-input-container"
220
+ data-test-id="searchstax-location-input-container"
221
+ *ngIf="locationData"
222
+ >
223
+ <div class="searchstax-location-input-wrapper">
224
+ <span class="searchstax-location-input-label">NEAR</span>
225
+ <div class="searchstax-location-input-wrapper-inner">
226
+ <input
227
+ type="text"
228
+ id="searchstax-location-input"
229
+ class="searchstax-location-input"
230
+ [ngClass]="{
231
+ 'searchstax-input-location-error': locationError
232
+ }"
233
+ placeholder="Zip, Postal Code or City..."
234
+ aria-label="Search Location Input"
235
+ data-test-id="searchstax-location-input"
236
+ [value]="inputValue"
237
+ (change)="inputChange($event, context)"
238
+ (blur)="locationBlur(context)"
239
+ />
240
+ <button
241
+ (click)="getCurrentLocation(context)"
242
+ class="searchstax-get-current-location-button"
243
+ >
244
+ Use my current location
245
+ </button>
246
+ </div>
247
+ <span
248
+ *ngIf="locationData.shouldShowLocationDistanceDropdown"
249
+ class="searchstax-location-input-label"
250
+ >WITHIN</span
251
+ >
252
+ <select
253
+ *ngIf="locationData.shouldShowLocationDistanceDropdown"
254
+ id="searchstax-location-radius-select"
255
+ class="searchstax-location-radius-select"
256
+ aria-label="Search Location Radius Select"
257
+ data-test-id="searchstax-location-radius-select"
258
+ (change)="radiusChange($event, context)"
259
+ [(ngModel)]="context.selectValue"
260
+ >
261
+ <option
262
+ *ngFor="let value of locationData.locationSearchDistanceValues"
263
+ [value]="value.value"
264
+ >
265
+ {{ value.label }}
266
+ </option>
267
+ </select>
268
+ </div>
269
+ </div>
270
+ </ng-template>
271
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
272
+ }
273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: LocationTemplateComponent, decorators: [{
274
+ type: Component,
275
+ args: [{
276
+ selector: "app-location-template",
277
+ template: `
278
+ <ng-template
279
+ #locationTemplate
280
+ let-context="context"
281
+ let-locationData="locationData"
282
+ let-inputValue="inputValue"
283
+ let-selectValue="selectValue"
284
+ let-radiusChange="radiusChange"
285
+ let-inputChange="inputChange"
286
+ let-locationBlur="locationBlur"
287
+ let-locationError="locationError"
288
+ let-getCurrentLocation="getCurrentLocation"
289
+ >
290
+ <div
291
+ class="searchstax-location-input-container"
292
+ data-test-id="searchstax-location-input-container"
293
+ *ngIf="locationData"
294
+ >
295
+ <div class="searchstax-location-input-wrapper">
296
+ <span class="searchstax-location-input-label">NEAR</span>
297
+ <div class="searchstax-location-input-wrapper-inner">
298
+ <input
299
+ type="text"
300
+ id="searchstax-location-input"
301
+ class="searchstax-location-input"
302
+ [ngClass]="{
303
+ 'searchstax-input-location-error': locationError
304
+ }"
305
+ placeholder="Zip, Postal Code or City..."
306
+ aria-label="Search Location Input"
307
+ data-test-id="searchstax-location-input"
308
+ [value]="inputValue"
309
+ (change)="inputChange($event, context)"
310
+ (blur)="locationBlur(context)"
311
+ />
312
+ <button
313
+ (click)="getCurrentLocation(context)"
314
+ class="searchstax-get-current-location-button"
315
+ >
316
+ Use my current location
317
+ </button>
318
+ </div>
319
+ <span
320
+ *ngIf="locationData.shouldShowLocationDistanceDropdown"
321
+ class="searchstax-location-input-label"
322
+ >WITHIN</span
323
+ >
324
+ <select
325
+ *ngIf="locationData.shouldShowLocationDistanceDropdown"
326
+ id="searchstax-location-radius-select"
327
+ class="searchstax-location-radius-select"
328
+ aria-label="Search Location Radius Select"
329
+ data-test-id="searchstax-location-radius-select"
330
+ (change)="radiusChange($event, context)"
331
+ [(ngModel)]="context.selectValue"
332
+ >
333
+ <option
334
+ *ngFor="let value of locationData.locationSearchDistanceValues"
335
+ [value]="value.value"
336
+ >
337
+ {{ value.label }}
338
+ </option>
339
+ </select>
340
+ </div>
341
+ </div>
342
+ </ng-template>
343
+ `,
344
+ }]
345
+ }], propDecorators: { locationTemplate: [{
346
+ type: ViewChild,
347
+ args: ["locationTemplate"]
348
+ }] } });
349
+
350
+ class SearchstaxSearchLocationWidget {
351
+ constructor(storeServiceService) {
352
+ this.storeServiceService = storeServiceService;
353
+ this.locationData = null;
354
+ this.inputValue = "";
355
+ this.selectValue = "";
356
+ this.locationAdded = false;
357
+ this.locationError = false;
358
+ this.rand = Math.random();
359
+ this.context = this;
360
+ }
361
+ ngOnInit() {
362
+ if (this.storeServiceService.searchstax) {
363
+ this.attachObservables();
364
+ setTimeout(() => {
365
+ this.addWidget();
366
+ }, 100);
367
+ }
368
+ else {
369
+ throw Error("Searchstax instance needs to be passed via props");
370
+ }
371
+ }
372
+ locationBlur(context) {
373
+ context.storeServiceService.searchstax.searchLocationWidget?.triggerGeocoder(context.inputValue);
374
+ }
375
+ radiusChange(e, context) {
376
+ const target = e.target;
377
+ context.selectValue = target.value;
378
+ context.storeServiceService.searchstax.searchLocationWidget?.setRadiusValue(context.selectValue);
379
+ }
380
+ inputChange(e, context) {
381
+ const target = e.target;
382
+ context.inputValue = target.value;
383
+ }
384
+ getCurrentLocation(context) {
385
+ context.storeServiceService.searchstax.searchLocationWidget?.getCurrentLocation();
386
+ }
387
+ addWidget() {
388
+ if (!this.locationAdded &&
389
+ this.storeServiceService.searchstax.routerHelper) {
390
+ this.locationAdded = true;
391
+ this.storeServiceService.searchstax.addSearchLocationWidget("searchstax-location-container" + this.rand, {
392
+ hooks: {
393
+ locationDecode: this.locationDecode,
394
+ locationDecodeCoordinatesToAddress: this.locationDecodeCoordinatesToAddress,
395
+ },
396
+ locationSearchEnabled: this.locationSearchEnabled,
397
+ locationValuesOverride: this.locationValuesOverride,
398
+ });
399
+ }
400
+ }
401
+ attachObservables() {
402
+ this.storeServiceService.searchstax.dataLayer.$locationWidgetTemplateData.subscribe((sortingData) => {
403
+ this.locationData = sortingData;
404
+ });
405
+ this.storeServiceService.searchstax.dataLayer.$searchObject.subscribe((result) => {
406
+ this.inputValue = result.location.address ?? "";
407
+ this.selectValue = result.location.radius || "";
408
+ });
409
+ this.storeServiceService.searchstax.dataLayer.$locationError.subscribe((locationError) => {
410
+ this.locationError = locationError;
411
+ });
412
+ this.storeServiceService.searchstax.dataLayer.$searchLocationChange.subscribe((location) => {
413
+ this.inputValue = location;
414
+ });
415
+ this.storeServiceService.searchstax.dataLayer.$searchRadiusChange.subscribe((radius) => {
416
+ this.selectValue = radius;
417
+ });
418
+ }
419
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchLocationWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
420
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchLocationWidget, selector: "app-searchstax-search-location", inputs: { templateOverride: "templateOverride", locationSearchEnabled: "locationSearchEnabled", locationValuesOverride: "locationValuesOverride", locationDecode: "locationDecode", locationDecodeCoordinatesToAddress: "locationDecodeCoordinatesToAddress" }, ngImport: i0, template: "<div\n [id]=\"'searchstax-location-container' + rand\"\n class=\"searchstax-location-container\"\n>\n <div *ngIf=\"!!locationData && !templateOverride\">\n <app-location-template #ref></app-location-template>\n <ng-template\n *ngTemplateOutlet=\"ref.locationTemplate; context: context\"\n ></ng-template>\n </div>\n\n <div *ngIf=\"!!locationData && templateOverride\">\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: LocationTemplateComponent, selector: "app-location-template" }] }); }
421
+ }
422
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchLocationWidget, decorators: [{
423
+ type: Component,
424
+ args: [{ selector: "app-searchstax-search-location", template: "<div\n [id]=\"'searchstax-location-container' + rand\"\n class=\"searchstax-location-container\"\n>\n <div *ngIf=\"!!locationData && !templateOverride\">\n <app-location-template #ref></app-location-template>\n <ng-template\n *ngTemplateOutlet=\"ref.locationTemplate; context: context\"\n ></ng-template>\n </div>\n\n <div *ngIf=\"!!locationData && templateOverride\">\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n" }]
425
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
426
+ type: Input
427
+ }], locationSearchEnabled: [{
428
+ type: Input
429
+ }], locationValuesOverride: [{
430
+ type: Input
431
+ }], locationDecode: [{
432
+ type: Input
433
+ }], locationDecodeCoordinatesToAddress: [{
434
+ type: Input
435
+ }] } });
436
+
437
+ // reusable-template.component.ts
438
+ class InputTemplateComponent {
439
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
440
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: InputTemplateComponent, selector: "app-input-template", viewQueries: [{ propertyName: "inputTemplate", first: true, predicate: ["inputTemplate"], descendants: true }], ngImport: i0, template: `
441
+ <ng-template
442
+ #inputTemplate
443
+ let-suggestions="suggestions"
444
+ let-onMouseLeave="onMouseLeave"
445
+ let-onMouseOver="onMouseOver"
446
+ let-onMouseClick="onMouseClick"
447
+ let-context="context"
448
+ let-locationWidgetConfig="locationWidgetConfig"
449
+ >
450
+ <div class="searchstax-search-input-wrapper">
451
+ <input
452
+ type="text"
453
+ id="searchstax-search-input"
454
+ class="searchstax-search-input"
455
+ placeholder="SEARCH FOR..."
456
+ aria-label="search"
457
+ />
458
+ <div
459
+ class="searchstax-autosuggest-container"
460
+ [ngClass]="{ hidden: suggestions.length === 0 }"
461
+ (mouseleave)="onMouseLeave(context)"
462
+ >
463
+ <div
464
+ class="searchstax-autosuggest-item"
465
+ *ngFor="let suggestion of suggestions"
466
+ >
467
+ <div
468
+ class="searchstax-autosuggest-item-term-container"
469
+ [innerHtml]="suggestion.term"
470
+ (mouseover)="onMouseOver(suggestion, context)"
471
+ tabindex="0"
472
+ (click)="onMouseClick($event, context)"
473
+ ></div>
474
+ </div>
475
+ </div>
476
+ </div>
477
+ <app-searchstax-search-location
478
+ [locationDecode]="locationWidgetConfig.locationDecode"
479
+ [locationDecodeCoordinatesToAddress]="
480
+ locationWidgetConfig.locationDecodeCoordinatesToAddress
481
+ "
482
+ [locationSearchEnabled]="locationWidgetConfig.locationSearchEnabled"
483
+ [locationValuesOverride]="locationWidgetConfig.locationValuesOverride"
484
+ >
485
+ </app-searchstax-search-location>
486
+ <button
487
+ class="searchstax-spinner-icon"
488
+ id="searchstax-search-input-action-button"
489
+ role="button"
490
+ aria-label="search"
491
+ ></button>
492
+ </ng-template>
493
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: SearchstaxSearchLocationWidget, selector: "app-searchstax-search-location", inputs: ["templateOverride", "locationSearchEnabled", "locationValuesOverride", "locationDecode", "locationDecodeCoordinatesToAddress"] }] }); }
494
+ }
495
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: InputTemplateComponent, decorators: [{
496
+ type: Component,
497
+ args: [{
498
+ selector: "app-input-template",
499
+ template: `
500
+ <ng-template
501
+ #inputTemplate
502
+ let-suggestions="suggestions"
503
+ let-onMouseLeave="onMouseLeave"
504
+ let-onMouseOver="onMouseOver"
505
+ let-onMouseClick="onMouseClick"
506
+ let-context="context"
507
+ let-locationWidgetConfig="locationWidgetConfig"
508
+ >
509
+ <div class="searchstax-search-input-wrapper">
510
+ <input
511
+ type="text"
512
+ id="searchstax-search-input"
513
+ class="searchstax-search-input"
514
+ placeholder="SEARCH FOR..."
515
+ aria-label="search"
516
+ />
517
+ <div
518
+ class="searchstax-autosuggest-container"
519
+ [ngClass]="{ hidden: suggestions.length === 0 }"
520
+ (mouseleave)="onMouseLeave(context)"
521
+ >
522
+ <div
523
+ class="searchstax-autosuggest-item"
524
+ *ngFor="let suggestion of suggestions"
525
+ >
526
+ <div
527
+ class="searchstax-autosuggest-item-term-container"
528
+ [innerHtml]="suggestion.term"
529
+ (mouseover)="onMouseOver(suggestion, context)"
530
+ tabindex="0"
531
+ (click)="onMouseClick($event, context)"
532
+ ></div>
533
+ </div>
534
+ </div>
535
+ </div>
536
+ <app-searchstax-search-location
537
+ [locationDecode]="locationWidgetConfig.locationDecode"
538
+ [locationDecodeCoordinatesToAddress]="
539
+ locationWidgetConfig.locationDecodeCoordinatesToAddress
540
+ "
541
+ [locationSearchEnabled]="locationWidgetConfig.locationSearchEnabled"
542
+ [locationValuesOverride]="locationWidgetConfig.locationValuesOverride"
543
+ >
544
+ </app-searchstax-search-location>
545
+ <button
546
+ class="searchstax-spinner-icon"
547
+ id="searchstax-search-input-action-button"
548
+ role="button"
549
+ aria-label="search"
550
+ ></button>
551
+ </ng-template>
552
+ `,
553
+ }]
554
+ }], propDecorators: { inputTemplate: [{
555
+ type: ViewChild,
556
+ args: ["inputTemplate"]
557
+ }] } });
558
+
559
+ class SearchstaxInputWidget {
560
+ constructor(storeServiceService) {
561
+ this.storeServiceService = storeServiceService;
562
+ this.searchInputId = "";
563
+ this.hooks = {};
564
+ this.suggestions = [];
565
+ this.context = this;
566
+ this.templateData = null;
567
+ this.locationWidgetConfig = locationWidgetConfig;
568
+ }
569
+ ngOnInit() {
570
+ if (this.storeServiceService.searchstax) {
571
+ this.attachObservables();
572
+ // const hooks: { [key: string]: (prop: any) => any } = {}
573
+ if (this.afterAutosuggest) {
574
+ this.hooks["afterAutosuggest"] = this.afterAutosuggest;
575
+ }
576
+ if (this.beforeAutosuggest) {
577
+ this.hooks["beforeAutosuggest"] = this.beforeAutosuggest;
578
+ }
579
+ setTimeout(() => {
580
+ this.storeServiceService.searchstax.addSearchInputWidget("searchstax-input-container", {
581
+ suggestAfterMinChars: this.suggestAfterMinChars,
582
+ hooks: this.hooks,
583
+ templates: {
584
+ mainTemplate: {
585
+ template: ``,
586
+ searchInputId: this.searchInputId ?? "searchstax-search-input",
587
+ },
588
+ },
589
+ });
590
+ this.storeServiceService.searchstax.dataLayer.setInputTemplateRendered(true);
591
+ }, 100);
592
+ }
593
+ else {
594
+ throw Error("Searchstax instance needs to be passed via props");
595
+ }
596
+ }
597
+ onMouseLeave(context) {
598
+ context.storeServiceService.searchstax.searchInputWidget?.resetAutosuggestSelection();
599
+ context.storeServiceService.searchstax.searchInputWidget?.markActiveAutosuggestItem();
600
+ }
601
+ onMouseOver(suggestion, context) {
602
+ context.storeServiceService.searchstax.searchInputWidget?.onSuggestionEnter(suggestion);
603
+ }
604
+ onMouseClick(e, context) {
605
+ e.stopImmediatePropagation();
606
+ context.storeServiceService.searchstax.searchInputWidget?.suggestionChosen();
607
+ }
608
+ attachObservables() {
609
+ this.storeServiceService.searchstax.dataLayer.$autosuggestResults.subscribe((suggestions) => {
610
+ this.suggestions = suggestions?.suggestions ?? [];
611
+ });
612
+ this.storeServiceService.searchstax.dataLayer.$inputWidgetTemplateData.subscribe((data) => {
613
+ this.templateData = data;
614
+ });
615
+ }
616
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxInputWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
617
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxInputWidget, selector: "app-searchstax-input", inputs: { afterAutosuggest: "afterAutosuggest", beforeAutosuggest: "beforeAutosuggest", searchInputId: "searchInputId", suggestAfterMinChars: "suggestAfterMinChars", templateOverride: "templateOverride" }, ngImport: i0, template: "<div id=\"searchstax-input-container\">\n <div\n class=\"searchstax-search-input-container searchstax-search-input-container-new\"\n [class]=\"{\n 'searchstax-alternative-render': !!templateData?.locationEnabled\n }\"\n >\n <ng-container *ngIf=\"!templateOverride\">\n <app-input-template #ref></app-input-template>\n <ng-template\n *ngTemplateOutlet=\"ref.inputTemplate; context: context\"\n ></ng-template>\n </ng-container>\n <ng-container *ngIf=\"templateOverride\">\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: InputTemplateComponent, selector: "app-input-template" }] }); }
618
+ }
619
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxInputWidget, decorators: [{
620
+ type: Component,
621
+ args: [{ selector: "app-searchstax-input", template: "<div id=\"searchstax-input-container\">\n <div\n class=\"searchstax-search-input-container searchstax-search-input-container-new\"\n [class]=\"{\n 'searchstax-alternative-render': !!templateData?.locationEnabled\n }\"\n >\n <ng-container *ngIf=\"!templateOverride\">\n <app-input-template #ref></app-input-template>\n <ng-template\n *ngTemplateOutlet=\"ref.inputTemplate; context: context\"\n ></ng-template>\n </ng-container>\n <ng-container *ngIf=\"templateOverride\">\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </ng-container>\n </div>\n</div>\n" }]
622
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { afterAutosuggest: [{
623
+ type: Input
624
+ }], beforeAutosuggest: [{
625
+ type: Input
626
+ }], searchInputId: [{
627
+ type: Input
628
+ }], suggestAfterMinChars: [{
629
+ type: Input
630
+ }], templateOverride: [{
631
+ type: Input
632
+ }] } });
633
+
634
+ // reusable-template.component.ts
635
+ class ResultsTemplateComponent {
636
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResultsTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
637
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ResultsTemplateComponent, selector: "app-results-template", viewQueries: [{ propertyName: "resultsTemplate", first: true, predicate: ["resultsTemplate"], descendants: true }], ngImport: i0, template: `
638
+ <ng-template
639
+ #resultsTemplate
640
+ let-searchResults="searchResults"
641
+ let-resultClicked="resultClicked"
642
+ let-isImage="isImage"
643
+ let-context="context"
644
+ >
645
+ <div class="searchstax-search-results">
646
+ <a
647
+ *ngFor="let searchResult of searchResults"
648
+ [href]="searchResult.url"
649
+ [attr.data-searchstax-unique-result-id]="searchResult.uniqueId"
650
+ (click)="resultClicked(searchResult, $event, context)"
651
+ (keyup.enter)="resultClicked(searchResult, $event, context)"
652
+ (keyup.space)="resultClicked(searchResult, $event, context)"
653
+ [attr.aria-labelledby]="'title-' + searchResult.uniqueId"
654
+ tabindex="0"
655
+ class="searchstax-result-item-link searchstax-result-item-link-wrapping"
656
+ >
657
+ <div
658
+ class="searchstax-search-result"
659
+ [ngClass]="{ 'has-thumbnail': searchResult.thumbnail }"
660
+ >
661
+ <div
662
+ *ngIf="searchResult.promoted"
663
+ class="searchstax-search-result-promoted"
664
+ ></div>
665
+ <div
666
+ *ngIf="searchResult.ribbon"
667
+ [innerHTML]="searchResult.ribbon"
668
+ class="searchstax-search-result-ribbon"
669
+ ></div>
670
+ <img
671
+ alt=""
672
+ *ngIf="searchResult.thumbnail"
673
+ [src]="searchResult.thumbnail"
674
+ class="searchstax-thumbnail"
675
+ />
676
+ <div class="searchstax-search-result-title-container">
677
+ <span
678
+ class="searchstax-search-result-title"
679
+ [id]="'title-' + searchResult.uniqueId"
680
+ [innerHTML]="searchResult.title"
681
+ ></span>
682
+ </div>
683
+ <p
684
+ *ngIf="searchResult.paths"
685
+ class="searchstax-search-result-common"
686
+ [innerHTML]="searchResult.paths"
687
+ ></p>
688
+ <p
689
+ *ngIf="searchResult.description"
690
+ [innerHTML]="searchResult.description"
691
+ class="searchstax-search-result-description searchstax-search-result-common"
692
+ ></p>
693
+ <div *ngFor="let unmappedField of searchResult.unmappedFields">
694
+ <div
695
+ *ngIf="isImage(unmappedField)"
696
+ class="searchstax-search-result-image-container"
697
+ >
698
+ <img
699
+ alt=""
700
+ [src]="unmappedField.value"
701
+ class="searchstax-result-image"
702
+ />
703
+ </div>
704
+ <div *ngIf="!isImage(unmappedField)">
705
+ <p
706
+ class="searchstax-search-result-common"
707
+ [innerHTML]="unmappedField.value"
708
+ ></p>
709
+ </div>
710
+ </div>
711
+ </div>
712
+ </a>
713
+ </div>
714
+ </ng-template>
715
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
716
+ }
717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ResultsTemplateComponent, decorators: [{
718
+ type: Component,
719
+ args: [{
720
+ selector: "app-results-template",
721
+ template: `
722
+ <ng-template
723
+ #resultsTemplate
724
+ let-searchResults="searchResults"
725
+ let-resultClicked="resultClicked"
726
+ let-isImage="isImage"
727
+ let-context="context"
728
+ >
729
+ <div class="searchstax-search-results">
730
+ <a
731
+ *ngFor="let searchResult of searchResults"
732
+ [href]="searchResult.url"
733
+ [attr.data-searchstax-unique-result-id]="searchResult.uniqueId"
734
+ (click)="resultClicked(searchResult, $event, context)"
735
+ (keyup.enter)="resultClicked(searchResult, $event, context)"
736
+ (keyup.space)="resultClicked(searchResult, $event, context)"
737
+ [attr.aria-labelledby]="'title-' + searchResult.uniqueId"
738
+ tabindex="0"
739
+ class="searchstax-result-item-link searchstax-result-item-link-wrapping"
740
+ >
741
+ <div
742
+ class="searchstax-search-result"
743
+ [ngClass]="{ 'has-thumbnail': searchResult.thumbnail }"
744
+ >
745
+ <div
746
+ *ngIf="searchResult.promoted"
747
+ class="searchstax-search-result-promoted"
748
+ ></div>
749
+ <div
750
+ *ngIf="searchResult.ribbon"
751
+ [innerHTML]="searchResult.ribbon"
752
+ class="searchstax-search-result-ribbon"
753
+ ></div>
754
+ <img
755
+ alt=""
756
+ *ngIf="searchResult.thumbnail"
757
+ [src]="searchResult.thumbnail"
758
+ class="searchstax-thumbnail"
759
+ />
760
+ <div class="searchstax-search-result-title-container">
761
+ <span
762
+ class="searchstax-search-result-title"
763
+ [id]="'title-' + searchResult.uniqueId"
764
+ [innerHTML]="searchResult.title"
765
+ ></span>
766
+ </div>
767
+ <p
768
+ *ngIf="searchResult.paths"
769
+ class="searchstax-search-result-common"
770
+ [innerHTML]="searchResult.paths"
771
+ ></p>
772
+ <p
773
+ *ngIf="searchResult.description"
774
+ [innerHTML]="searchResult.description"
775
+ class="searchstax-search-result-description searchstax-search-result-common"
776
+ ></p>
777
+ <div *ngFor="let unmappedField of searchResult.unmappedFields">
778
+ <div
779
+ *ngIf="isImage(unmappedField)"
780
+ class="searchstax-search-result-image-container"
781
+ >
782
+ <img
783
+ alt=""
784
+ [src]="unmappedField.value"
785
+ class="searchstax-result-image"
786
+ />
787
+ </div>
788
+ <div *ngIf="!isImage(unmappedField)">
789
+ <p
790
+ class="searchstax-search-result-common"
791
+ [innerHTML]="unmappedField.value"
792
+ ></p>
793
+ </div>
794
+ </div>
795
+ </div>
796
+ </a>
797
+ </div>
798
+ </ng-template>
799
+ `,
800
+ }]
801
+ }], propDecorators: { resultsTemplate: [{
802
+ type: ViewChild,
803
+ args: ["resultsTemplate"]
804
+ }] } });
805
+
806
+ // reusable-template.component.ts
807
+ class NoResultsTemplateComponent {
808
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NoResultsTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
809
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: NoResultsTemplateComponent, selector: "app-no-results-template", viewQueries: [{ propertyName: "noResultsTemplate", first: true, predicate: ["noResultsTemplate"], descendants: true }], ngImport: i0, template: `
810
+ <ng-template
811
+ #noResultsTemplate
812
+ let-metadata="metadata"
813
+ let-searchTerm="searchTerm"
814
+ let-executeSearch="executeSearch"
815
+ let-context="context"
816
+ >
817
+ <div class="searchstax-no-results">
818
+ Showing <strong>no results</strong> for
819
+ <strong>"{{ searchTerm }}"</strong>
820
+ <br />
821
+ <span *ngIf="metadata?.spellingSuggestion"
822
+ >&nbsp;Did you mean
823
+ <a
824
+ href="#"
825
+ [attr.aria-label]="'did you mean: ' + metadata?.spellingSuggestion"
826
+ class="searchstax-suggestion-term"
827
+ (click)="
828
+ executeSearch(metadata?.spellingSuggestion ?? '', $event, context)
829
+ "
830
+ >{{ metadata?.spellingSuggestion }}</a
831
+ >?</span
832
+ >
833
+ </div>
834
+ <ul>
835
+ <li>
836
+ Try searching for search related terms or topics. We offer a wide
837
+ variety of content to help you get the information you need.
838
+ </li>
839
+ <li>Lost? Click on the ‘X” in the Search Box to reset your search.</li>
840
+ </ul>
841
+ </ng-template>
842
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
843
+ }
844
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: NoResultsTemplateComponent, decorators: [{
845
+ type: Component,
846
+ args: [{
847
+ selector: "app-no-results-template",
848
+ template: `
849
+ <ng-template
850
+ #noResultsTemplate
851
+ let-metadata="metadata"
852
+ let-searchTerm="searchTerm"
853
+ let-executeSearch="executeSearch"
854
+ let-context="context"
855
+ >
856
+ <div class="searchstax-no-results">
857
+ Showing <strong>no results</strong> for
858
+ <strong>"{{ searchTerm }}"</strong>
859
+ <br />
860
+ <span *ngIf="metadata?.spellingSuggestion"
861
+ >&nbsp;Did you mean
862
+ <a
863
+ href="#"
864
+ [attr.aria-label]="'did you mean: ' + metadata?.spellingSuggestion"
865
+ class="searchstax-suggestion-term"
866
+ (click)="
867
+ executeSearch(metadata?.spellingSuggestion ?? '', $event, context)
868
+ "
869
+ >{{ metadata?.spellingSuggestion }}</a
870
+ >?</span
871
+ >
872
+ </div>
873
+ <ul>
874
+ <li>
875
+ Try searching for search related terms or topics. We offer a wide
876
+ variety of content to help you get the information you need.
877
+ </li>
878
+ <li>Lost? Click on the ‘X” in the Search Box to reset your search.</li>
879
+ </ul>
880
+ </ng-template>
881
+ `,
882
+ }]
883
+ }], propDecorators: { noResultsTemplate: [{
884
+ type: ViewChild,
885
+ args: ["noResultsTemplate"]
886
+ }] } });
887
+
888
+ class SearchstaxResultsWidget {
889
+ get hooks() {
890
+ const hooks = {};
891
+ if (this.afterLinkClick) {
892
+ hooks['afterLinkClick'] = this.afterLinkClick;
893
+ }
894
+ return hooks;
895
+ }
896
+ constructor(storeServiceService) {
897
+ this.storeServiceService = storeServiceService;
898
+ this.searchResults = null;
899
+ this.metadata = null;
900
+ this.searchTerm = '';
901
+ this.context = this;
902
+ }
903
+ ngOnInit() {
904
+ if (this.storeServiceService.searchstax) {
905
+ this.attachObservables();
906
+ setTimeout(() => {
907
+ this.storeServiceService.searchstax.addSearchResultsWidget('searchstax-results-container', {
908
+ templates: {},
909
+ hooks: this.hooks,
910
+ renderMethod: this.renderMethod ?? "pagination",
911
+ resultsPerPage: this.resultsPerPage,
912
+ });
913
+ }, 0);
914
+ }
915
+ else {
916
+ throw Error('Searchstax instance needs to be passed via props');
917
+ }
918
+ }
919
+ executeSearch(term, event, context) {
920
+ event.preventDefault();
921
+ context.storeServiceService.searchstax.executeSearch(term);
922
+ }
923
+ attachObservables() {
924
+ this.storeServiceService.searchstax.dataLayer.$searchResults.subscribe((results) => {
925
+ const current = this.searchResults ? [...this.searchResults] : [];
926
+ const newResults = results ?? [];
927
+ const resultsCombined = this.renderMethod === "infiniteScroll"
928
+ ? [...current, ...newResults]
929
+ : results;
930
+ if (this.storeServiceService.searchstax.dataLayer.$searchObject.value?.page === 1) {
931
+ this.searchResults = newResults;
932
+ }
933
+ else {
934
+ this.searchResults = resultsCombined;
935
+ }
936
+ });
937
+ this.storeServiceService.searchstax.dataLayer.$searchTermChange.subscribe((result) => {
938
+ this.searchTerm = result;
939
+ });
940
+ this.storeServiceService.searchstax.dataLayer.$searchResultsMetadata.subscribe((value) => {
941
+ this.metadata = value;
942
+ });
943
+ }
944
+ resultClicked(result, event, context) {
945
+ event.preventDefault();
946
+ event.stopPropagation();
947
+ context.storeServiceService.searchstax.executeLinkClick(result.uniqueId);
948
+ }
949
+ isImage(field) {
950
+ return field.isImage && typeof field.value === 'string';
951
+ }
952
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxResultsWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
953
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxResultsWidget, selector: "app-searchstax-results", inputs: { afterLinkClick: "afterLinkClick", noResultsTemplate: "noResultsTemplate", resultsTemplate: "resultsTemplate", renderMethod: "renderMethod", resultsPerPage: "resultsPerPage" }, ngImport: i0, template: "<div id=\"searchstax-results-container\">\n <section aria-label=\"search results container\" tabindex=\"0\">\n <div\n class=\"searchstax-search-results-container\"\n id=\"searchstax-search-results-container\"\n >\n <div id=\"searchstax-result-container\">\n <div\n *ngIf=\"\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n .firstSearchHappened &&\n !noResultsTemplate\n \"\n >\n <app-no-results-template #ref></app-no-results-template>\n <ng-template\n *ngTemplateOutlet=\"ref.noResultsTemplate; context: context\"\n ></ng-template>\n </div>\n <div\n *ngIf=\"\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n .firstSearchHappened &&\n noResultsTemplate\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"noResultsTemplate; context: context\"\n ></ng-container>\n </div>\n\n <ng-container\n *ngIf=\"searchResults && searchResults.length && !resultsTemplate\"\n >\n <app-results-template #ref></app-results-template>\n <ng-template\n *ngTemplateOutlet=\"ref.resultsTemplate; context: context\"\n ></ng-template>\n </ng-container>\n\n <div *ngIf=\"searchResults && searchResults.length && resultsTemplate\">\n <ng-container\n *ngTemplateOutlet=\"resultsTemplate; context: context\"\n ></ng-container>\n </div>\n </div>\n </div>\n </section>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ResultsTemplateComponent, selector: "app-results-template" }, { kind: "component", type: NoResultsTemplateComponent, selector: "app-no-results-template" }] }); }
954
+ }
955
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxResultsWidget, decorators: [{
956
+ type: Component,
957
+ args: [{ selector: 'app-searchstax-results', template: "<div id=\"searchstax-results-container\">\n <section aria-label=\"search results container\" tabindex=\"0\">\n <div\n class=\"searchstax-search-results-container\"\n id=\"searchstax-search-results-container\"\n >\n <div id=\"searchstax-result-container\">\n <div\n *ngIf=\"\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n .firstSearchHappened &&\n !noResultsTemplate\n \"\n >\n <app-no-results-template #ref></app-no-results-template>\n <ng-template\n *ngTemplateOutlet=\"ref.noResultsTemplate; context: context\"\n ></ng-template>\n </div>\n <div\n *ngIf=\"\n searchResults?.length === 0 &&\n searchTerm !== '' &&\n searchTerm !== '*' &&\n storeServiceService.searchstax.dataLayer.parsedData\n .firstSearchHappened &&\n noResultsTemplate\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"noResultsTemplate; context: context\"\n ></ng-container>\n </div>\n\n <ng-container\n *ngIf=\"searchResults && searchResults.length && !resultsTemplate\"\n >\n <app-results-template #ref></app-results-template>\n <ng-template\n *ngTemplateOutlet=\"ref.resultsTemplate; context: context\"\n ></ng-template>\n </ng-container>\n\n <div *ngIf=\"searchResults && searchResults.length && resultsTemplate\">\n <ng-container\n *ngTemplateOutlet=\"resultsTemplate; context: context\"\n ></ng-container>\n </div>\n </div>\n </div>\n </section>\n</div>\n" }]
958
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { afterLinkClick: [{
959
+ type: Input
960
+ }], noResultsTemplate: [{
961
+ type: Input
962
+ }], resultsTemplate: [{
963
+ type: Input
964
+ }], renderMethod: [{
965
+ type: Input
966
+ }], resultsPerPage: [{
967
+ type: Input
968
+ }] } });
969
+
970
+ // reusable-template.component.ts
971
+ class OverviewTemplateComponent {
972
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OverviewTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
973
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: OverviewTemplateComponent, selector: "app-overview-template", viewQueries: [{ propertyName: "overviewTemplate", first: true, predicate: ["feedbackTemplate"], descendants: true }], ngImport: i0, template: `
974
+ <ng-template
975
+ #feedbackTemplate
976
+ let-searchFeedbackData="searchFeedbackData"
977
+ let-onOriginalQueryClick="onOriginalQueryClick"
978
+ let-context="context"
979
+ >
980
+ <h2 class="searchstax-feedback-container">
981
+ Showing
982
+ <b
983
+ >{{ searchFeedbackData!.startResultIndex }} -
984
+ {{ searchFeedbackData!.endResultIndex }}</b
985
+ >
986
+ of <b>{{ searchFeedbackData!.totalResults }}</b> results
987
+ <span *ngIf="searchFeedbackData.searchTerm"
988
+ >for "<b>{{ searchFeedbackData!.searchTerm }}</b
989
+ >"
990
+ </span>
991
+ <div class="searchstax-feedback-container-suggested">
992
+ <div *ngIf="searchFeedbackData.autoCorrectedQuery">
993
+ Search instead for
994
+ <a
995
+ href="#"
996
+ (click)="onOriginalQueryClick($event, context)"
997
+ class="searchstax-feedback-original-query"
998
+ [attr.aria-label]="
999
+ 'Search instead for: ' + searchFeedbackData!.originalQuery
1000
+ "
1001
+ >{{ searchFeedbackData!.originalQuery }}</a
1002
+ >
1003
+ </div>
1004
+ </div>
1005
+ </h2>
1006
+ </ng-template>
1007
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1008
+ }
1009
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: OverviewTemplateComponent, decorators: [{
1010
+ type: Component,
1011
+ args: [{
1012
+ selector: "app-overview-template",
1013
+ template: `
1014
+ <ng-template
1015
+ #feedbackTemplate
1016
+ let-searchFeedbackData="searchFeedbackData"
1017
+ let-onOriginalQueryClick="onOriginalQueryClick"
1018
+ let-context="context"
1019
+ >
1020
+ <h2 class="searchstax-feedback-container">
1021
+ Showing
1022
+ <b
1023
+ >{{ searchFeedbackData!.startResultIndex }} -
1024
+ {{ searchFeedbackData!.endResultIndex }}</b
1025
+ >
1026
+ of <b>{{ searchFeedbackData!.totalResults }}</b> results
1027
+ <span *ngIf="searchFeedbackData.searchTerm"
1028
+ >for "<b>{{ searchFeedbackData!.searchTerm }}</b
1029
+ >"
1030
+ </span>
1031
+ <div class="searchstax-feedback-container-suggested">
1032
+ <div *ngIf="searchFeedbackData.autoCorrectedQuery">
1033
+ Search instead for
1034
+ <a
1035
+ href="#"
1036
+ (click)="onOriginalQueryClick($event, context)"
1037
+ class="searchstax-feedback-original-query"
1038
+ [attr.aria-label]="
1039
+ 'Search instead for: ' + searchFeedbackData!.originalQuery
1040
+ "
1041
+ >{{ searchFeedbackData!.originalQuery }}</a
1042
+ >
1043
+ </div>
1044
+ </div>
1045
+ </h2>
1046
+ </ng-template>
1047
+ `,
1048
+ }]
1049
+ }], propDecorators: { overviewTemplate: [{
1050
+ type: ViewChild,
1051
+ args: ["feedbackTemplate"]
1052
+ }] } });
1053
+
1054
+ class SearchstaxSearchFeedbackWidget {
1055
+ constructor(storeServiceService) {
1056
+ this.storeServiceService = storeServiceService;
1057
+ this.searchFeedbackData = null;
1058
+ this.rand = Math.random();
1059
+ this.context = this;
1060
+ }
1061
+ ngOnInit() {
1062
+ if (this.storeServiceService.searchstax) {
1063
+ this.attachObservables();
1064
+ setTimeout(() => {
1065
+ this.storeServiceService.searchstax.addSearchFeedbackWidget("search-feedback-container" + this.rand, {});
1066
+ }, 0);
1067
+ }
1068
+ else {
1069
+ throw Error("Searchstax instance needs to be passed via props");
1070
+ }
1071
+ }
1072
+ onOriginalQueryClick(e, context) {
1073
+ e.stopImmediatePropagation();
1074
+ context.storeServiceService.searchstax.searchFeedbackWidget?.onOriginalQueryClick(e);
1075
+ }
1076
+ attachObservables() {
1077
+ this.storeServiceService.searchstax.dataLayer.$searchFeedbackData.subscribe((searchFeedbackData) => {
1078
+ this.searchFeedbackData = searchFeedbackData;
1079
+ });
1080
+ }
1081
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchFeedbackWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
1082
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchFeedbackWidget, selector: "app-searchstax-search-feedback", inputs: { templateOverride: "templateOverride" }, ngImport: i0, template: "<div\n class=\"search-feedback-container\"\n [id]=\"'search-feedback-container' + rand\"\n>\n <div\n class=\"searchstax-feedback-container\"\n *ngIf=\"\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n !templateOverride &&\n searchFeedbackData?.totalResults\n \"\n >\n <app-overview-template #ref></app-overview-template>\n <ng-template\n *ngTemplateOutlet=\"ref.overviewTemplate; context: context\"\n ></ng-template>\n </div>\n\n <div\n *ngIf=\"\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n templateOverride &&\n searchFeedbackData?.totalResults\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: OverviewTemplateComponent, selector: "app-overview-template" }] }); }
1083
+ }
1084
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchFeedbackWidget, decorators: [{
1085
+ type: Component,
1086
+ args: [{ selector: "app-searchstax-search-feedback", template: "<div\n class=\"search-feedback-container\"\n [id]=\"'search-feedback-container' + rand\"\n>\n <div\n class=\"searchstax-feedback-container\"\n *ngIf=\"\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n !templateOverride &&\n searchFeedbackData?.totalResults\n \"\n >\n <app-overview-template #ref></app-overview-template>\n <ng-template\n *ngTemplateOutlet=\"ref.overviewTemplate; context: context\"\n ></ng-template>\n </div>\n\n <div\n *ngIf=\"\n searchFeedbackData &&\n searchFeedbackData?.searchExecuted &&\n templateOverride &&\n searchFeedbackData?.totalResults\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n" }]
1087
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
1088
+ type: Input
1089
+ }] } });
1090
+
1091
+ // reusable-template.component.ts
1092
+ class PaginationTemplateComponent {
1093
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaginationTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1094
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PaginationTemplateComponent, selector: "app-pagination-template", viewQueries: [{ propertyName: "paginationTemplate", first: true, predicate: ["paginationTemplate"], descendants: true }], ngImport: i0, template: `
1095
+ <ng-template
1096
+ #paginationTemplate
1097
+ let-paginationData="paginationData"
1098
+ let-previousPage="previousPage"
1099
+ let-nextPage="nextPage"
1100
+ let-context="context"
1101
+ >
1102
+ <div class="searchstax-pagination-container">
1103
+ <div class="searchstax-pagination-content">
1104
+ <a
1105
+ class="searchstax-pagination-previous"
1106
+ [class]="paginationData.isFirstPage ? 'disabled' : ''"
1107
+ (click)="previousPage($event, context)"
1108
+ (keyup.enter)="previousPage($event, context)"
1109
+ (keyup.space)="previousPage($event, context)"
1110
+ tabindex="0"
1111
+ id="searchstax-pagination-previous"
1112
+ >
1113
+ &lt; Previous
1114
+ </a>
1115
+ <div class="searchstax-pagination-details">
1116
+ {{ paginationData?.startResultIndex }} -
1117
+ {{ paginationData?.endResultIndex }} of
1118
+ {{ paginationData?.totalResults }}
1119
+ </div>
1120
+ <a
1121
+ class="searchstax-pagination-next"
1122
+ [class]="paginationData.isLastPage ? 'disabled' : ''"
1123
+ (click)="nextPage($event, context)"
1124
+ (keyup.enter)="nextPage($event, context)"
1125
+ (keyup.space)="nextPage($event, context)"
1126
+ tabindex="0"
1127
+ id="searchstax-pagination-next"
1128
+ >Next ></a
1129
+ >
1130
+ </div>
1131
+ </div>
1132
+ </ng-template>
1133
+ `, isInline: true }); }
1134
+ }
1135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaginationTemplateComponent, decorators: [{
1136
+ type: Component,
1137
+ args: [{
1138
+ selector: "app-pagination-template",
1139
+ template: `
1140
+ <ng-template
1141
+ #paginationTemplate
1142
+ let-paginationData="paginationData"
1143
+ let-previousPage="previousPage"
1144
+ let-nextPage="nextPage"
1145
+ let-context="context"
1146
+ >
1147
+ <div class="searchstax-pagination-container">
1148
+ <div class="searchstax-pagination-content">
1149
+ <a
1150
+ class="searchstax-pagination-previous"
1151
+ [class]="paginationData.isFirstPage ? 'disabled' : ''"
1152
+ (click)="previousPage($event, context)"
1153
+ (keyup.enter)="previousPage($event, context)"
1154
+ (keyup.space)="previousPage($event, context)"
1155
+ tabindex="0"
1156
+ id="searchstax-pagination-previous"
1157
+ >
1158
+ &lt; Previous
1159
+ </a>
1160
+ <div class="searchstax-pagination-details">
1161
+ {{ paginationData?.startResultIndex }} -
1162
+ {{ paginationData?.endResultIndex }} of
1163
+ {{ paginationData?.totalResults }}
1164
+ </div>
1165
+ <a
1166
+ class="searchstax-pagination-next"
1167
+ [class]="paginationData.isLastPage ? 'disabled' : ''"
1168
+ (click)="nextPage($event, context)"
1169
+ (keyup.enter)="nextPage($event, context)"
1170
+ (keyup.space)="nextPage($event, context)"
1171
+ tabindex="0"
1172
+ id="searchstax-pagination-next"
1173
+ >Next ></a
1174
+ >
1175
+ </div>
1176
+ </div>
1177
+ </ng-template>
1178
+ `,
1179
+ }]
1180
+ }], propDecorators: { paginationTemplate: [{
1181
+ type: ViewChild,
1182
+ args: ["paginationTemplate"]
1183
+ }] } });
1184
+
1185
+ // reusable-template.component.ts
1186
+ class PaginationInfiniteTemplateComponent {
1187
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaginationInfiniteTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1188
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PaginationInfiniteTemplateComponent, selector: "app-pagination-infinite-template", viewQueries: [{ propertyName: "infiniteScrollTemplate", first: true, predicate: ["infiniteScrollTemplate"], descendants: true }], ngImport: i0, template: `
1189
+ <ng-template
1190
+ #infiniteScrollTemplate
1191
+ let-paginationData="paginationData"
1192
+ let-nextPage="nextPage"
1193
+ let-context="context"
1194
+ >
1195
+ <div class="searchstax-pagination-container">
1196
+ <div class="searchstax-pagination-content">
1197
+ <a
1198
+ class="searchstax-pagination-load-more"
1199
+ (click)="nextPage($event, context)"
1200
+ (keyup.enter)="nextPage($event, context)"
1201
+ (keyup.space)="nextPage($event, context)"
1202
+ tabindex="0"
1203
+ >
1204
+ Load More
1205
+ </a>
1206
+ </div>
1207
+ </div>
1208
+ </ng-template>
1209
+ `, isInline: true }); }
1210
+ }
1211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PaginationInfiniteTemplateComponent, decorators: [{
1212
+ type: Component,
1213
+ args: [{
1214
+ selector: "app-pagination-infinite-template",
1215
+ template: `
1216
+ <ng-template
1217
+ #infiniteScrollTemplate
1218
+ let-paginationData="paginationData"
1219
+ let-nextPage="nextPage"
1220
+ let-context="context"
1221
+ >
1222
+ <div class="searchstax-pagination-container">
1223
+ <div class="searchstax-pagination-content">
1224
+ <a
1225
+ class="searchstax-pagination-load-more"
1226
+ (click)="nextPage($event, context)"
1227
+ (keyup.enter)="nextPage($event, context)"
1228
+ (keyup.space)="nextPage($event, context)"
1229
+ tabindex="0"
1230
+ >
1231
+ Load More
1232
+ </a>
1233
+ </div>
1234
+ </div>
1235
+ </ng-template>
1236
+ `,
1237
+ }]
1238
+ }], propDecorators: { infiniteScrollTemplate: [{
1239
+ type: ViewChild,
1240
+ args: ["infiniteScrollTemplate"]
1241
+ }] } });
1242
+
1243
+ class SearchstaxSearchPaginationWidget {
1244
+ constructor(storeServiceService) {
1245
+ this.storeServiceService = storeServiceService;
1246
+ this.paginationData = null;
1247
+ this.rand = Math.random();
1248
+ this.context = this;
1249
+ this.paginationAdded = false;
1250
+ }
1251
+ ngOnInit() {
1252
+ if (this.storeServiceService.searchstax) {
1253
+ this.attachObservables();
1254
+ setTimeout(() => {
1255
+ this.addWidget();
1256
+ }, 0);
1257
+ }
1258
+ else {
1259
+ throw Error("Searchstax instance needs to be passed via props");
1260
+ }
1261
+ }
1262
+ nextPage(event, context) {
1263
+ event.stopImmediatePropagation();
1264
+ if (!context.paginationData?.isLastPage) {
1265
+ context.storeServiceService.searchstax.searchPaginationWidget?.nextPage(event);
1266
+ }
1267
+ }
1268
+ previousPage(event, context) {
1269
+ event.stopImmediatePropagation();
1270
+ if (!context.paginationData?.isFirstPage) {
1271
+ context.storeServiceService.searchstax.searchPaginationWidget?.previousPage(event);
1272
+ }
1273
+ }
1274
+ addWidget() {
1275
+ if (!this.paginationAdded &&
1276
+ this.storeServiceService.searchstax.routerHelper) {
1277
+ this.paginationAdded = true;
1278
+ this.storeServiceService.searchstax.addPaginationWidget("searchstax-pagination-container" + this.rand, {});
1279
+ }
1280
+ }
1281
+ attachObservables() {
1282
+ this.storeServiceService.searchstax.dataLayer.$searchObject.subscribe((pagination) => {
1283
+ this.addWidget();
1284
+ });
1285
+ this.storeServiceService.searchstax.dataLayer.$paginationData.subscribe((pagination) => {
1286
+ this.paginationData = pagination;
1287
+ });
1288
+ }
1289
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchPaginationWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
1290
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchPaginationWidget, selector: "app-searchstax-search-pagination", inputs: { templateOverride: "templateOverride", infiniteScrollTemplateOverride: "infiniteScrollTemplateOverride" }, ngImport: i0, template: "<div [id]=\"'searchstax-pagination-container' + rand\">\n <ng-container\n *ngIf=\"\n paginationData?.totalResults &&\n !templateOverride &&\n !paginationData?.isInfiniteScroll\n \"\n >\n <app-pagination-template #ref></app-pagination-template>\n <ng-template\n *ngTemplateOutlet=\"ref.paginationTemplate; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n paginationData?.totalResults &&\n templateOverride &&\n !paginationData?.isInfiniteScroll\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n\n <ng-container\n *ngIf=\"\n paginationData?.totalResults &&\n !infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n \"\n >\n <app-pagination-infinite-template #ref></app-pagination-infinite-template>\n <ng-template\n *ngTemplateOutlet=\"ref.infiniteScrollTemplate; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n paginationData?.totalResults &&\n infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"infiniteScrollTemplateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PaginationTemplateComponent, selector: "app-pagination-template" }, { kind: "component", type: PaginationInfiniteTemplateComponent, selector: "app-pagination-infinite-template" }] }); }
1291
+ }
1292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchPaginationWidget, decorators: [{
1293
+ type: Component,
1294
+ args: [{ selector: "app-searchstax-search-pagination", template: "<div [id]=\"'searchstax-pagination-container' + rand\">\n <ng-container\n *ngIf=\"\n paginationData?.totalResults &&\n !templateOverride &&\n !paginationData?.isInfiniteScroll\n \"\n >\n <app-pagination-template #ref></app-pagination-template>\n <ng-template\n *ngTemplateOutlet=\"ref.paginationTemplate; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n paginationData?.totalResults &&\n templateOverride &&\n !paginationData?.isInfiniteScroll\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n\n <ng-container\n *ngIf=\"\n paginationData?.totalResults &&\n !infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n \"\n >\n <app-pagination-infinite-template #ref></app-pagination-infinite-template>\n <ng-template\n *ngTemplateOutlet=\"ref.infiniteScrollTemplate; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n paginationData?.totalResults &&\n infiniteScrollTemplateOverride &&\n paginationData?.totalResults !== 0 &&\n !paginationData?.isLastPage &&\n paginationData?.isInfiniteScroll\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"infiniteScrollTemplateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n" }]
1295
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
1296
+ type: Input
1297
+ }], infiniteScrollTemplateOverride: [{
1298
+ type: Input
1299
+ }] } });
1300
+
1301
+ // reusable-template.component.ts
1302
+ class FacetDesktopTemplateComponent {
1303
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FacetDesktopTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1304
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FacetDesktopTemplateComponent, selector: "app-facet-desktop-template", viewQueries: [{ propertyName: "templateOverrideDesktop", first: true, predicate: ["templateOverrideDesktop"], descendants: true }], ngImport: i0, template: `
1305
+ <ng-template
1306
+ #templateOverrideDesktop
1307
+ let-facetsTemplateDataDesktop="facetsTemplateDataDesktop"
1308
+ let-isNotDeactivated="isNotDeactivated"
1309
+ let-context="context"
1310
+ let-toggleFacetGroup="toggleFacetGroup"
1311
+ let-facetValues="facetValues"
1312
+ let-isChecked="isChecked"
1313
+ let-selectFacet="selectFacet"
1314
+ let-showMoreLessDesktop="showMoreLessDesktop"
1315
+ >
1316
+ <div class="searchstax-facets-container-desktop">
1317
+ <div
1318
+ class="searchstax-facet-container"
1319
+ *ngFor="let facet of facetsTemplateDataDesktop?.facets"
1320
+ [class]="{ active: isNotDeactivated(facet.name, context) }"
1321
+ >
1322
+ <div>
1323
+ <div
1324
+ class="searchstax-facet-title-container"
1325
+ (click)="toggleFacetGroup(facet.name, context)"
1326
+ >
1327
+ <div class="searchstax-facet-title">
1328
+ {{ facet.label }}
1329
+ </div>
1330
+ <div class="searchstax-facet-title-arrow active"></div>
1331
+ </div>
1332
+ <div class="searchstax-facet-values-container" aria-live="polite">
1333
+ <div
1334
+ *ngFor="let facetValue of facetValues(facet); index as key"
1335
+ class="searchstax-facet-value-container"
1336
+ [class]="{
1337
+ 'searchstax-facet-value-disabled': facetValue.disabled
1338
+ }"
1339
+ #ref
1340
+ >
1341
+ <div class="searchstax-facet-input">
1342
+ <input
1343
+ type="checkbox"
1344
+ class="searchstax-facet-input-checkbox"
1345
+ [checked]="isChecked(facetValue, context)"
1346
+ [attr.aria-label]="
1347
+ facetValue.value + ' ' + facetValue.count
1348
+ "
1349
+ [disabled]="facetValue.disabled"
1350
+ (click)="
1351
+ selectFacet(ref, $event, facetValue, true, context)
1352
+ "
1353
+ />
1354
+ </div>
1355
+ <div
1356
+ class="searchstax-facet-value-label"
1357
+ (click)="selectFacet(ref, $event, facetValue, false, context)"
1358
+ >
1359
+ {{ facetValue.value }}
1360
+ </div>
1361
+ <div
1362
+ class="searchstax-facet-value-count"
1363
+ (click)="selectFacet(ref, $event, facetValue, false, context)"
1364
+ >
1365
+ ({{ facetValue.count }})
1366
+ </div>
1367
+ </div>
1368
+ <div
1369
+ class="searchstax-facet-show-more-container"
1370
+ *ngIf="facet.hasMoreFacets"
1371
+ >
1372
+ <div
1373
+ class="searchstax-facet-show-more-container"
1374
+ (click)="showMoreLessDesktop($event, facet, context)"
1375
+ (keyup.enter)="showMoreLessDesktop($event, facet, context)"
1376
+ (keyup.space)="showMoreLessDesktop($event, facet, context)"
1377
+ tabindex="0"
1378
+ >
1379
+ <div
1380
+ *ngIf="facet.showingAllFacets"
1381
+ class="searchstax-facet-show-less-button searchstax-facet-show-button"
1382
+ >
1383
+ less
1384
+ </div>
1385
+ <div
1386
+ *ngIf="!facet.showingAllFacets"
1387
+ class="searchstax-facet-show-more-button searchstax-facet-show-button"
1388
+ >
1389
+ more
1390
+ </div>
1391
+ </div>
1392
+ </div>
1393
+ </div>
1394
+ </div>
1395
+ </div>
1396
+ </div>
1397
+ </ng-template>
1398
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1399
+ }
1400
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FacetDesktopTemplateComponent, decorators: [{
1401
+ type: Component,
1402
+ args: [{
1403
+ selector: "app-facet-desktop-template",
1404
+ template: `
1405
+ <ng-template
1406
+ #templateOverrideDesktop
1407
+ let-facetsTemplateDataDesktop="facetsTemplateDataDesktop"
1408
+ let-isNotDeactivated="isNotDeactivated"
1409
+ let-context="context"
1410
+ let-toggleFacetGroup="toggleFacetGroup"
1411
+ let-facetValues="facetValues"
1412
+ let-isChecked="isChecked"
1413
+ let-selectFacet="selectFacet"
1414
+ let-showMoreLessDesktop="showMoreLessDesktop"
1415
+ >
1416
+ <div class="searchstax-facets-container-desktop">
1417
+ <div
1418
+ class="searchstax-facet-container"
1419
+ *ngFor="let facet of facetsTemplateDataDesktop?.facets"
1420
+ [class]="{ active: isNotDeactivated(facet.name, context) }"
1421
+ >
1422
+ <div>
1423
+ <div
1424
+ class="searchstax-facet-title-container"
1425
+ (click)="toggleFacetGroup(facet.name, context)"
1426
+ >
1427
+ <div class="searchstax-facet-title">
1428
+ {{ facet.label }}
1429
+ </div>
1430
+ <div class="searchstax-facet-title-arrow active"></div>
1431
+ </div>
1432
+ <div class="searchstax-facet-values-container" aria-live="polite">
1433
+ <div
1434
+ *ngFor="let facetValue of facetValues(facet); index as key"
1435
+ class="searchstax-facet-value-container"
1436
+ [class]="{
1437
+ 'searchstax-facet-value-disabled': facetValue.disabled
1438
+ }"
1439
+ #ref
1440
+ >
1441
+ <div class="searchstax-facet-input">
1442
+ <input
1443
+ type="checkbox"
1444
+ class="searchstax-facet-input-checkbox"
1445
+ [checked]="isChecked(facetValue, context)"
1446
+ [attr.aria-label]="
1447
+ facetValue.value + ' ' + facetValue.count
1448
+ "
1449
+ [disabled]="facetValue.disabled"
1450
+ (click)="
1451
+ selectFacet(ref, $event, facetValue, true, context)
1452
+ "
1453
+ />
1454
+ </div>
1455
+ <div
1456
+ class="searchstax-facet-value-label"
1457
+ (click)="selectFacet(ref, $event, facetValue, false, context)"
1458
+ >
1459
+ {{ facetValue.value }}
1460
+ </div>
1461
+ <div
1462
+ class="searchstax-facet-value-count"
1463
+ (click)="selectFacet(ref, $event, facetValue, false, context)"
1464
+ >
1465
+ ({{ facetValue.count }})
1466
+ </div>
1467
+ </div>
1468
+ <div
1469
+ class="searchstax-facet-show-more-container"
1470
+ *ngIf="facet.hasMoreFacets"
1471
+ >
1472
+ <div
1473
+ class="searchstax-facet-show-more-container"
1474
+ (click)="showMoreLessDesktop($event, facet, context)"
1475
+ (keyup.enter)="showMoreLessDesktop($event, facet, context)"
1476
+ (keyup.space)="showMoreLessDesktop($event, facet, context)"
1477
+ tabindex="0"
1478
+ >
1479
+ <div
1480
+ *ngIf="facet.showingAllFacets"
1481
+ class="searchstax-facet-show-less-button searchstax-facet-show-button"
1482
+ >
1483
+ less
1484
+ </div>
1485
+ <div
1486
+ *ngIf="!facet.showingAllFacets"
1487
+ class="searchstax-facet-show-more-button searchstax-facet-show-button"
1488
+ >
1489
+ more
1490
+ </div>
1491
+ </div>
1492
+ </div>
1493
+ </div>
1494
+ </div>
1495
+ </div>
1496
+ </div>
1497
+ </ng-template>
1498
+ `,
1499
+ }]
1500
+ }], propDecorators: { templateOverrideDesktop: [{
1501
+ type: ViewChild,
1502
+ args: ["templateOverrideDesktop"]
1503
+ }] } });
1504
+
1505
+ // reusable-template.component.ts
1506
+ class FacetMobileTemplateComponent {
1507
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FacetMobileTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1508
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: FacetMobileTemplateComponent, selector: "app-facet-mobile-template", viewQueries: [{ propertyName: "templateOverrideMobile", first: true, predicate: ["templateOverrideMobile"], descendants: true }], ngImport: i0, template: `
1509
+ <ng-template
1510
+ #templateOverrideMobile
1511
+ let-isNotDeactivated="isNotDeactivated"
1512
+ let-context="context"
1513
+ let-toggleFacetGroup="toggleFacetGroup"
1514
+ let-facetValues="facetValues"
1515
+ let-isChecked="isChecked"
1516
+ let-selectFacet="selectFacet"
1517
+ let-openOverlay="openOverlay"
1518
+ let-selectedFacetsCheckboxes="selectedFacetsCheckboxes"
1519
+ let-unselectFacet="unselectFacet"
1520
+ let-unselectAll="unselectAll"
1521
+ let-facetMobileData="facetMobileData"
1522
+ let-facetsTemplateDataMobile="facetsTemplateDataMobile"
1523
+ let-closeOverlay="closeOverlay"
1524
+ let-showMoreLessDesktop="showMoreLessDesktop"
1525
+ let-showMoreLessMobile="showMoreLessMobile"
1526
+ >
1527
+ <div class="searchstax-facets-container-mobile">
1528
+ <div class="searchstax-facets-pills-container">
1529
+ <div
1530
+ class="searchstax-facets-pill searchstax-facets-pill-filter-by"
1531
+ (click)="openOverlay(context)"
1532
+ >
1533
+ <div class="searchstax-facets-pill-label">Filter By</div>
1534
+ </div>
1535
+ <div class="searchstax-facets-pills-selected">
1536
+ <div
1537
+ class="searchstax-facets-pill searchstax-facets-pill-facets"
1538
+ *ngFor="let facet of selectedFacetsCheckboxes"
1539
+ (click)="unselectFacet(facet, context)"
1540
+ >
1541
+ <div class="searchstax-facets-pill-label">
1542
+ {{ facet.value }} ({{ facet.count }})
1543
+ </div>
1544
+ <div class="searchstax-facets-pill-icon-close"></div>
1545
+ </div>
1546
+ </div>
1547
+ <div
1548
+ class="searchstax-facets-pill searchstax-clear-filters searchstax-facets-pill-clear-all"
1549
+ *ngIf="selectedFacetsCheckboxes.length"
1550
+ (click)="unselectAll(context)"
1551
+ >
1552
+ <div class="searchstax-facets-pill-label">Clear Filters</div>
1553
+ </div>
1554
+ </div>
1555
+ <div
1556
+ class="searchstax-facets-mobile-overlay"
1557
+ [class]="{
1558
+ 'searchstax-show': facetMobileData(facetsTemplateDataMobile)
1559
+ ?.overlayOpened
1560
+ }"
1561
+ >
1562
+ <div class="searchstax-facets-mobile-overlay-header">
1563
+ <div class="searchstax-facets-mobile-overlay-header-title">
1564
+ Filter By
1565
+ </div>
1566
+ <div
1567
+ class="searchstax-search-close"
1568
+ (click)="closeOverlay(context)"
1569
+ ></div>
1570
+ </div>
1571
+ <div class="searchstax-facets-container-mobile">
1572
+ <div
1573
+ *ngFor="let facet of facetsTemplateDataMobile?.facets"
1574
+ class="searchstax-facet-container"
1575
+ [class]="{
1576
+ active: isNotDeactivated(facet.name, context)
1577
+ }"
1578
+ >
1579
+ <div>
1580
+ <div
1581
+ class="searchstax-facet-title-container"
1582
+ (click)="toggleFacetGroup(facet.name, context)"
1583
+ >
1584
+ <div class="searchstax-facet-title">
1585
+ {{ facet.label }}
1586
+ </div>
1587
+ <div class="searchstax-facet-title-arrow active"></div>
1588
+ </div>
1589
+ <div
1590
+ class="searchstax-facet-values-container"
1591
+ aria-live="polite"
1592
+ >
1593
+ <div
1594
+ *ngFor="let facetValue of facetValues(facet); index as key"
1595
+ class="searchstax-facet-value-container"
1596
+ [class]="{
1597
+ 'searchstax-facet-value-disabled': facetValue.disabled
1598
+ }"
1599
+ #ref
1600
+ >
1601
+ <div class="searchstax-facet-input">
1602
+ <input
1603
+ type="checkbox"
1604
+ class="searchstax-facet-input-checkbox"
1605
+ [checked]="isChecked(facetValue, context)"
1606
+ [attr.aria-label]="
1607
+ facetValue.value + ' ' + facetValue.count
1608
+ "
1609
+ [disabled]="facetValue.disabled"
1610
+ (click)="
1611
+ selectFacet(ref, $event, facetValue, true, context)
1612
+ "
1613
+ />
1614
+ </div>
1615
+ <div
1616
+ class="searchstax-facet-value-label"
1617
+ (click)="
1618
+ selectFacet(ref, $event, facetValue, false, context)
1619
+ "
1620
+ >
1621
+ {{ facetValue.value }}
1622
+ </div>
1623
+ <div
1624
+ class="searchstax-facet-value-count"
1625
+ (click)="
1626
+ selectFacet(ref, $event, facetValue, false, context)
1627
+ "
1628
+ >
1629
+ ({{ facetValue.count }})
1630
+ </div>
1631
+ </div>
1632
+ <div
1633
+ class="searchstax-facet-show-more-container"
1634
+ *ngIf="facet.hasMoreFacets"
1635
+ >
1636
+ <div
1637
+ class="searchstax-facet-show-more-container"
1638
+ (click)="showMoreLessMobile($event, facet, context)"
1639
+ (keyup.enter)="showMoreLessMobile($event, facet, context)"
1640
+ (keyup.space)="showMoreLessMobile($event, facet, context)"
1641
+ tabindex="0"
1642
+ >
1643
+ <div
1644
+ *ngIf="facet.showingAllFacets"
1645
+ class="searchstax-facet-show-less-button searchstax-facet-show-button"
1646
+ >
1647
+ less
1648
+ </div>
1649
+ <div
1650
+ *ngIf="!facet.showingAllFacets"
1651
+ class="searchstax-facet-show-more-button searchstax-facet-show-button"
1652
+ >
1653
+ more
1654
+ </div>
1655
+ </div>
1656
+ </div>
1657
+ </div>
1658
+ </div>
1659
+ </div>
1660
+ </div>
1661
+ <button
1662
+ class="searchstax-facets-mobile-overlay-done"
1663
+ (click)="closeOverlay(context)"
1664
+ >
1665
+ Done
1666
+ </button>
1667
+ </div>
1668
+ </div>
1669
+ </ng-template>
1670
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1671
+ }
1672
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: FacetMobileTemplateComponent, decorators: [{
1673
+ type: Component,
1674
+ args: [{
1675
+ selector: "app-facet-mobile-template",
1676
+ template: `
1677
+ <ng-template
1678
+ #templateOverrideMobile
1679
+ let-isNotDeactivated="isNotDeactivated"
1680
+ let-context="context"
1681
+ let-toggleFacetGroup="toggleFacetGroup"
1682
+ let-facetValues="facetValues"
1683
+ let-isChecked="isChecked"
1684
+ let-selectFacet="selectFacet"
1685
+ let-openOverlay="openOverlay"
1686
+ let-selectedFacetsCheckboxes="selectedFacetsCheckboxes"
1687
+ let-unselectFacet="unselectFacet"
1688
+ let-unselectAll="unselectAll"
1689
+ let-facetMobileData="facetMobileData"
1690
+ let-facetsTemplateDataMobile="facetsTemplateDataMobile"
1691
+ let-closeOverlay="closeOverlay"
1692
+ let-showMoreLessDesktop="showMoreLessDesktop"
1693
+ let-showMoreLessMobile="showMoreLessMobile"
1694
+ >
1695
+ <div class="searchstax-facets-container-mobile">
1696
+ <div class="searchstax-facets-pills-container">
1697
+ <div
1698
+ class="searchstax-facets-pill searchstax-facets-pill-filter-by"
1699
+ (click)="openOverlay(context)"
1700
+ >
1701
+ <div class="searchstax-facets-pill-label">Filter By</div>
1702
+ </div>
1703
+ <div class="searchstax-facets-pills-selected">
1704
+ <div
1705
+ class="searchstax-facets-pill searchstax-facets-pill-facets"
1706
+ *ngFor="let facet of selectedFacetsCheckboxes"
1707
+ (click)="unselectFacet(facet, context)"
1708
+ >
1709
+ <div class="searchstax-facets-pill-label">
1710
+ {{ facet.value }} ({{ facet.count }})
1711
+ </div>
1712
+ <div class="searchstax-facets-pill-icon-close"></div>
1713
+ </div>
1714
+ </div>
1715
+ <div
1716
+ class="searchstax-facets-pill searchstax-clear-filters searchstax-facets-pill-clear-all"
1717
+ *ngIf="selectedFacetsCheckboxes.length"
1718
+ (click)="unselectAll(context)"
1719
+ >
1720
+ <div class="searchstax-facets-pill-label">Clear Filters</div>
1721
+ </div>
1722
+ </div>
1723
+ <div
1724
+ class="searchstax-facets-mobile-overlay"
1725
+ [class]="{
1726
+ 'searchstax-show': facetMobileData(facetsTemplateDataMobile)
1727
+ ?.overlayOpened
1728
+ }"
1729
+ >
1730
+ <div class="searchstax-facets-mobile-overlay-header">
1731
+ <div class="searchstax-facets-mobile-overlay-header-title">
1732
+ Filter By
1733
+ </div>
1734
+ <div
1735
+ class="searchstax-search-close"
1736
+ (click)="closeOverlay(context)"
1737
+ ></div>
1738
+ </div>
1739
+ <div class="searchstax-facets-container-mobile">
1740
+ <div
1741
+ *ngFor="let facet of facetsTemplateDataMobile?.facets"
1742
+ class="searchstax-facet-container"
1743
+ [class]="{
1744
+ active: isNotDeactivated(facet.name, context)
1745
+ }"
1746
+ >
1747
+ <div>
1748
+ <div
1749
+ class="searchstax-facet-title-container"
1750
+ (click)="toggleFacetGroup(facet.name, context)"
1751
+ >
1752
+ <div class="searchstax-facet-title">
1753
+ {{ facet.label }}
1754
+ </div>
1755
+ <div class="searchstax-facet-title-arrow active"></div>
1756
+ </div>
1757
+ <div
1758
+ class="searchstax-facet-values-container"
1759
+ aria-live="polite"
1760
+ >
1761
+ <div
1762
+ *ngFor="let facetValue of facetValues(facet); index as key"
1763
+ class="searchstax-facet-value-container"
1764
+ [class]="{
1765
+ 'searchstax-facet-value-disabled': facetValue.disabled
1766
+ }"
1767
+ #ref
1768
+ >
1769
+ <div class="searchstax-facet-input">
1770
+ <input
1771
+ type="checkbox"
1772
+ class="searchstax-facet-input-checkbox"
1773
+ [checked]="isChecked(facetValue, context)"
1774
+ [attr.aria-label]="
1775
+ facetValue.value + ' ' + facetValue.count
1776
+ "
1777
+ [disabled]="facetValue.disabled"
1778
+ (click)="
1779
+ selectFacet(ref, $event, facetValue, true, context)
1780
+ "
1781
+ />
1782
+ </div>
1783
+ <div
1784
+ class="searchstax-facet-value-label"
1785
+ (click)="
1786
+ selectFacet(ref, $event, facetValue, false, context)
1787
+ "
1788
+ >
1789
+ {{ facetValue.value }}
1790
+ </div>
1791
+ <div
1792
+ class="searchstax-facet-value-count"
1793
+ (click)="
1794
+ selectFacet(ref, $event, facetValue, false, context)
1795
+ "
1796
+ >
1797
+ ({{ facetValue.count }})
1798
+ </div>
1799
+ </div>
1800
+ <div
1801
+ class="searchstax-facet-show-more-container"
1802
+ *ngIf="facet.hasMoreFacets"
1803
+ >
1804
+ <div
1805
+ class="searchstax-facet-show-more-container"
1806
+ (click)="showMoreLessMobile($event, facet, context)"
1807
+ (keyup.enter)="showMoreLessMobile($event, facet, context)"
1808
+ (keyup.space)="showMoreLessMobile($event, facet, context)"
1809
+ tabindex="0"
1810
+ >
1811
+ <div
1812
+ *ngIf="facet.showingAllFacets"
1813
+ class="searchstax-facet-show-less-button searchstax-facet-show-button"
1814
+ >
1815
+ less
1816
+ </div>
1817
+ <div
1818
+ *ngIf="!facet.showingAllFacets"
1819
+ class="searchstax-facet-show-more-button searchstax-facet-show-button"
1820
+ >
1821
+ more
1822
+ </div>
1823
+ </div>
1824
+ </div>
1825
+ </div>
1826
+ </div>
1827
+ </div>
1828
+ </div>
1829
+ <button
1830
+ class="searchstax-facets-mobile-overlay-done"
1831
+ (click)="closeOverlay(context)"
1832
+ >
1833
+ Done
1834
+ </button>
1835
+ </div>
1836
+ </div>
1837
+ </ng-template>
1838
+ `,
1839
+ }]
1840
+ }], propDecorators: { templateOverrideMobile: [{
1841
+ type: ViewChild,
1842
+ args: ["templateOverrideMobile"]
1843
+ }] } });
1844
+
1845
+ class SearchstaxSearchFacetsWidget {
1846
+ // @ViewChildren("facetContainers") facetContainers: QueryList<ElementRef>;
1847
+ constructor(storeServiceService) {
1848
+ this.storeServiceService = storeServiceService;
1849
+ this.facetsTemplateDataDesktop = null;
1850
+ this.facetsTemplateDataMobile = null;
1851
+ this.context = this;
1852
+ this.selectedFacetsCheckboxes = [];
1853
+ this.selectedFacetsRange = [];
1854
+ this.rand = Math.random();
1855
+ }
1856
+ ngOnInit() {
1857
+ if (this.storeServiceService.searchstax) {
1858
+ this.attachObservables();
1859
+ setTimeout(() => {
1860
+ this.addWidget();
1861
+ }, 0);
1862
+ }
1863
+ else {
1864
+ throw Error("Searchstax instance needs to be passed via props");
1865
+ }
1866
+ }
1867
+ addWidget() {
1868
+ this.storeServiceService.searchstax.addFacetsWidget('searchstax-facets-container' + this.rand, {
1869
+ facetingType: this.facetingType,
1870
+ specificFacets: this.specificFacets,
1871
+ itemsPerPageDesktop: this.itemsPerPageDesktop,
1872
+ itemsPerPageMobile: this.itemsPerPageMobile
1873
+ });
1874
+ }
1875
+ attachObservables() {
1876
+ this.storeServiceService.searchstax.dataLayer.$facetsTemplateData.subscribe((data) => {
1877
+ if (data?.isMobile) {
1878
+ this.facetsTemplateDataMobile = data;
1879
+ }
1880
+ else {
1881
+ this.facetsTemplateDataDesktop = data;
1882
+ }
1883
+ });
1884
+ this.storeServiceService.searchstax.dataLayer.$selectedFacetsTemplateData.subscribe((data) => {
1885
+ const da = data ?? [];
1886
+ this.selectedFacetsCheckboxes = da.filter((d) => d.type === 'checkbox');
1887
+ });
1888
+ }
1889
+ unselectFacet(facet, context) {
1890
+ context.storeServiceService.searchstax.searchFacetsWidget?.unselectFacet(facet);
1891
+ }
1892
+ unselectAll(context) {
1893
+ context.storeServiceService.searchstax.searchFacetsWidget?.removeSelectedFacets();
1894
+ }
1895
+ isNotDeactivated(name, context) {
1896
+ return !context.storeServiceService.searchstax.searchFacetsWidget?.deactivatedFacets[name];
1897
+ }
1898
+ toggleFacetGroup(name, context) {
1899
+ if (context.storeServiceService.searchstax.searchFacetsWidget)
1900
+ if (context.isNotDeactivated(name, context)) {
1901
+ context.storeServiceService.searchstax.searchFacetsWidget.deactivatedFacets[name] = true;
1902
+ }
1903
+ else {
1904
+ context.storeServiceService.searchstax.searchFacetsWidget.deactivatedFacets[name] = false;
1905
+ }
1906
+ }
1907
+ isChecked(facetValue, context) {
1908
+ return context.storeServiceService.searchstax.searchFacetsWidget?.isChecked(facetValue);
1909
+ }
1910
+ selectFacet(el, event, data, isInput, context) {
1911
+ const wrapperDiv = document.createElement('div');
1912
+ wrapperDiv.innerHTML = el.outerHTML;
1913
+ context.storeServiceService.searchstax.searchFacetsWidget?.onFacetSelect(event, data, el, isInput);
1914
+ }
1915
+ showMoreLessDesktop(e, data, context) {
1916
+ context.storeServiceService.searchstax.searchFacetsWidget?.onShowMoreLessClick(e, data, false);
1917
+ }
1918
+ showMoreLessMobile(e, data, context) {
1919
+ context.storeServiceService.searchstax.searchFacetsWidget?.onShowMoreLessClick(e, data, true);
1920
+ }
1921
+ openOverlay(context) {
1922
+ context.storeServiceService.searchstax.searchFacetsWidget?.openOverlay();
1923
+ }
1924
+ closeOverlay(context) {
1925
+ context.storeServiceService.searchstax.searchFacetsWidget?.closeOverlay();
1926
+ }
1927
+ facetValues(facet) {
1928
+ return facet.values;
1929
+ }
1930
+ facetMobileData(facet) {
1931
+ return facet;
1932
+ }
1933
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchFacetsWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
1934
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchFacetsWidget, selector: "app-searchstax-search-facets", inputs: { templateOverrideMobile: "templateOverrideMobile", templateOverrideDesktop: "templateOverrideDesktop", facetingType: "facetingType", itemsPerPageDesktop: "itemsPerPageDesktop", itemsPerPageMobile: "itemsPerPageMobile", specificFacets: "specificFacets" }, ngImport: i0, template: "<div [id]=\"'searchstax-facets-container' + rand\">\n <ng-container\n *ngIf=\"\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n !templateOverrideDesktop\n \"\n >\n <app-facet-desktop-template #ref></app-facet-desktop-template>\n <ng-template\n *ngTemplateOutlet=\"ref.templateOverrideDesktop; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n templateOverrideDesktop\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverrideDesktop; context: context\"\n ></ng-container>\n </div>\n\n <ng-container\n *ngIf=\"\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n !templateOverrideMobile\n \"\n >\n <app-facet-mobile-template #ref></app-facet-mobile-template>\n <ng-template\n *ngTemplateOutlet=\"ref.templateOverrideMobile; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n templateOverrideMobile\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverrideMobile; context: context\"\n ></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: FacetDesktopTemplateComponent, selector: "app-facet-desktop-template" }, { kind: "component", type: FacetMobileTemplateComponent, selector: "app-facet-mobile-template" }] }); }
1935
+ }
1936
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchFacetsWidget, decorators: [{
1937
+ type: Component,
1938
+ args: [{ selector: "app-searchstax-search-facets", template: "<div [id]=\"'searchstax-facets-container' + rand\">\n <ng-container\n *ngIf=\"\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n !templateOverrideDesktop\n \"\n >\n <app-facet-desktop-template #ref></app-facet-desktop-template>\n <ng-template\n *ngTemplateOutlet=\"ref.templateOverrideDesktop; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n facetsTemplateDataDesktop?.hasResultsOrExternalPromotions &&\n templateOverrideDesktop\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverrideDesktop; context: context\"\n ></ng-container>\n </div>\n\n <ng-container\n *ngIf=\"\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n !templateOverrideMobile\n \"\n >\n <app-facet-mobile-template #ref></app-facet-mobile-template>\n <ng-template\n *ngTemplateOutlet=\"ref.templateOverrideMobile; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n facetsTemplateDataMobile?.hasResultsOrExternalPromotions &&\n templateOverrideMobile\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverrideMobile; context: context\"\n ></ng-container>\n </div>\n</div>\n" }]
1939
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverrideMobile: [{
1940
+ type: Input
1941
+ }], templateOverrideDesktop: [{
1942
+ type: Input
1943
+ }], facetingType: [{
1944
+ type: Input
1945
+ }], itemsPerPageDesktop: [{
1946
+ type: Input
1947
+ }], itemsPerPageMobile: [{
1948
+ type: Input
1949
+ }], specificFacets: [{
1950
+ type: Input
1951
+ }] } });
1952
+
1953
+ // reusable-template.component.ts
1954
+ class SortingTemplateComponent {
1955
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SortingTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1956
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SortingTemplateComponent, selector: "app-sorting-template", viewQueries: [{ propertyName: "sortingTemplate", first: true, predicate: ["sortingTemplateOverride"], descendants: true }], ngImport: i0, template: `
1957
+ <ng-template
1958
+ #sortingTemplateOverride
1959
+ let-selectedSorting="selectedSorting"
1960
+ let-orderChange="orderChange"
1961
+ let-context="context"
1962
+ >
1963
+ <div class="searchstax-sorting-container">
1964
+ <label
1965
+ class="searchstax-sorting-label"
1966
+ for="searchstax-search-order-select"
1967
+ >Sort By</label
1968
+ >
1969
+ <select
1970
+ id="searchstax-search-order-select"
1971
+ class="searchstax-search-order-select"
1972
+ [(ngModel)]="context.selectedSorting"
1973
+ (change)="orderChange($event, context)"
1974
+ >
1975
+ <option
1976
+ *ngFor="let sortOption of context.sortingData.sortOptions"
1977
+ [value]="sortOption.key"
1978
+ >
1979
+ {{ sortOption.value }}
1980
+ </option>
1981
+ </select>
1982
+ </div>
1983
+ </ng-template>
1984
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
1985
+ }
1986
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SortingTemplateComponent, decorators: [{
1987
+ type: Component,
1988
+ args: [{
1989
+ selector: "app-sorting-template",
1990
+ template: `
1991
+ <ng-template
1992
+ #sortingTemplateOverride
1993
+ let-selectedSorting="selectedSorting"
1994
+ let-orderChange="orderChange"
1995
+ let-context="context"
1996
+ >
1997
+ <div class="searchstax-sorting-container">
1998
+ <label
1999
+ class="searchstax-sorting-label"
2000
+ for="searchstax-search-order-select"
2001
+ >Sort By</label
2002
+ >
2003
+ <select
2004
+ id="searchstax-search-order-select"
2005
+ class="searchstax-search-order-select"
2006
+ [(ngModel)]="context.selectedSorting"
2007
+ (change)="orderChange($event, context)"
2008
+ >
2009
+ <option
2010
+ *ngFor="let sortOption of context.sortingData.sortOptions"
2011
+ [value]="sortOption.key"
2012
+ >
2013
+ {{ sortOption.value }}
2014
+ </option>
2015
+ </select>
2016
+ </div>
2017
+ </ng-template>
2018
+ `,
2019
+ }]
2020
+ }], propDecorators: { sortingTemplate: [{
2021
+ type: ViewChild,
2022
+ args: ["sortingTemplateOverride"]
2023
+ }] } });
2024
+
2025
+ class SearchstaxSearchSortingWidget {
2026
+ constructor(storeServiceService) {
2027
+ this.storeServiceService = storeServiceService;
2028
+ this.sortingData = null;
2029
+ this.rand = Math.random();
2030
+ this.context = this;
2031
+ this.selectedSorting = "";
2032
+ }
2033
+ ngOnInit() {
2034
+ if (this.storeServiceService.searchstax) {
2035
+ this.attachObservables();
2036
+ setTimeout(() => {
2037
+ this.storeServiceService.searchstax.addSearchSortingWidget("search-sorting-container" + this.rand, {});
2038
+ }, 0);
2039
+ }
2040
+ else {
2041
+ throw Error("Searchstax instance needs to be passed via props");
2042
+ }
2043
+ }
2044
+ orderChange(e, context) {
2045
+ e.stopImmediatePropagation();
2046
+ context.storeServiceService.searchstax.searchSortingWidget?.setOrderQuery(e.target.value);
2047
+ }
2048
+ attachObservables() {
2049
+ this.storeServiceService.searchstax.dataLayer.$searchSortingData.subscribe((sortingData) => {
2050
+ this.sortingData = sortingData;
2051
+ });
2052
+ this.storeServiceService.searchstax.dataLayer.$searchObject.subscribe((searchObject) => {
2053
+ this.selectedSorting = decodeURIComponent(searchObject?.order ?? '');
2054
+ });
2055
+ }
2056
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchSortingWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
2057
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchSortingWidget, selector: "app-searchstax-search-sorting", inputs: { templateOverride: "templateOverride" }, ngImport: i0, template: "<div class=\"search-feedback-container\" [id]=\"'search-sorting-container' + rand\">\n <ng-container\n *ngIf=\"\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n !templateOverride\n \"\n >\n <app-sorting-template #ref></app-sorting-template>\n <ng-template\n *ngTemplateOutlet=\"ref.sortingTemplate; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n templateOverride\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: SortingTemplateComponent, selector: "app-sorting-template" }] }); }
2058
+ }
2059
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchSortingWidget, decorators: [{
2060
+ type: Component,
2061
+ args: [{ selector: "app-searchstax-search-sorting", template: "<div class=\"search-feedback-container\" [id]=\"'search-sorting-container' + rand\">\n <ng-container\n *ngIf=\"\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n !templateOverride\n \"\n >\n <app-sorting-template #ref></app-sorting-template>\n <ng-template\n *ngTemplateOutlet=\"ref.sortingTemplate; context: context\"\n ></ng-template>\n </ng-container>\n\n <div\n *ngIf=\"\n sortingData &&\n sortingData?.searchExecuted &&\n sortingData?.hasResultsOrExternalPromotions &&\n templateOverride\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n" }]
2062
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
2063
+ type: Input
2064
+ }] } });
2065
+
2066
+ // reusable-template.component.ts
2067
+ class AnswerTemplateComponent {
2068
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AnswerTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2069
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: AnswerTemplateComponent, selector: "app-answer-template", viewQueries: [{ propertyName: "answerTemplate", first: true, predicate: ["answerTemplate"], descendants: true }], ngImport: i0, template: `
2070
+ <ng-template
2071
+ #answerTemplate
2072
+ let-answerData="answerData"
2073
+ let-showMore="showMore"
2074
+ let-context="context"
2075
+ >
2076
+ <div class="searchstax-answer-wrap">
2077
+ <div class="searchstax-answer-icon"></div>
2078
+ <div>
2079
+ <div
2080
+ [class]="{
2081
+ 'searchstax-answer-container': true,
2082
+ 'searchstax-answer-show-more': answerData.showMoreButtonVisible
2083
+ }"
2084
+ >
2085
+ <div class="searchstax-answer-title">Smart Answers</div>
2086
+ <div
2087
+ class="searchstax-answer-error"
2088
+ *ngIf="answerData.shouldShowAnswerError"
2089
+ [innerHTML]="answerData.answerErrorMessage"
2090
+ ></div>
2091
+ <div
2092
+ class="searchstax-answer-description"
2093
+ [innerHTML]="answerData.fullAnswerFormatted"
2094
+ ></div>
2095
+ <div
2096
+ *ngIf="answerData.answerLoading"
2097
+ class="searchstax-answer-loading"
2098
+ ></div>
2099
+ </div>
2100
+ <div
2101
+ *ngIf="answerData.showMoreButtonVisible"
2102
+ class="searchstax-answer-load-more-button-container"
2103
+ >
2104
+ <button
2105
+ class="searchstax-answer-load-more-button"
2106
+ (click)="showMore($event, context)"
2107
+ >
2108
+ Read More
2109
+ </button>
2110
+ </div>
2111
+ </div>
2112
+ <div class="searchstax-answer-footer">
2113
+ <div id="feedbackWidgetContainer"></div>
2114
+ <div class="searchstax-lightweight-widget-separator-inline"></div>
2115
+ <p class="searchstax-disclaimer">Generative AI is Experimental</p>
2116
+ </div>
2117
+ </div>
2118
+ </ng-template>
2119
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
2120
+ }
2121
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: AnswerTemplateComponent, decorators: [{
2122
+ type: Component,
2123
+ args: [{
2124
+ selector: "app-answer-template",
2125
+ template: `
2126
+ <ng-template
2127
+ #answerTemplate
2128
+ let-answerData="answerData"
2129
+ let-showMore="showMore"
2130
+ let-context="context"
2131
+ >
2132
+ <div class="searchstax-answer-wrap">
2133
+ <div class="searchstax-answer-icon"></div>
2134
+ <div>
2135
+ <div
2136
+ [class]="{
2137
+ 'searchstax-answer-container': true,
2138
+ 'searchstax-answer-show-more': answerData.showMoreButtonVisible
2139
+ }"
2140
+ >
2141
+ <div class="searchstax-answer-title">Smart Answers</div>
2142
+ <div
2143
+ class="searchstax-answer-error"
2144
+ *ngIf="answerData.shouldShowAnswerError"
2145
+ [innerHTML]="answerData.answerErrorMessage"
2146
+ ></div>
2147
+ <div
2148
+ class="searchstax-answer-description"
2149
+ [innerHTML]="answerData.fullAnswerFormatted"
2150
+ ></div>
2151
+ <div
2152
+ *ngIf="answerData.answerLoading"
2153
+ class="searchstax-answer-loading"
2154
+ ></div>
2155
+ </div>
2156
+ <div
2157
+ *ngIf="answerData.showMoreButtonVisible"
2158
+ class="searchstax-answer-load-more-button-container"
2159
+ >
2160
+ <button
2161
+ class="searchstax-answer-load-more-button"
2162
+ (click)="showMore($event, context)"
2163
+ >
2164
+ Read More
2165
+ </button>
2166
+ </div>
2167
+ </div>
2168
+ <div class="searchstax-answer-footer">
2169
+ <div id="feedbackWidgetContainer"></div>
2170
+ <div class="searchstax-lightweight-widget-separator-inline"></div>
2171
+ <p class="searchstax-disclaimer">Generative AI is Experimental</p>
2172
+ </div>
2173
+ </div>
2174
+ </ng-template>
2175
+ `,
2176
+ }]
2177
+ }], propDecorators: { answerTemplate: [{
2178
+ type: ViewChild,
2179
+ args: ["answerTemplate"]
2180
+ }] } });
2181
+
2182
+ class SearchstaxSearchAnswerWidget {
2183
+ constructor(storeServiceService) {
2184
+ this.storeServiceService = storeServiceService;
2185
+ this.answerData = null;
2186
+ this.rand = Math.random();
2187
+ this.context = this;
2188
+ }
2189
+ ngOnInit() {
2190
+ if (this.storeServiceService.searchstax) {
2191
+ this.attachObservables();
2192
+ setTimeout(() => {
2193
+ this.storeServiceService.searchstax.addAnswerWidget('searchstax-answer-container' + this.rand, { showMoreAfterWordCount: this.showMoreAfterWordCount, feedbackwidget: this.feedbackwidget });
2194
+ }, 0);
2195
+ }
2196
+ else {
2197
+ throw Error("Searchstax instance needs to be passed via props");
2198
+ }
2199
+ }
2200
+ showMore(event, context) {
2201
+ if (context.storeServiceService.searchstax) {
2202
+ context.storeServiceService.searchstax.answerWidget?.showMore(event);
2203
+ }
2204
+ }
2205
+ attachObservables() {
2206
+ this.storeServiceService.searchstax.dataLayer.$answerData.subscribe((answerData) => {
2207
+ this.answerData = answerData;
2208
+ });
2209
+ }
2210
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchAnswerWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
2211
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchAnswerWidget, selector: "app-searchstax-answer", inputs: { templateOverride: "templateOverride", feedbackwidget: "feedbackwidget", showMoreAfterWordCount: "showMoreAfterWordCount" }, ngImport: i0, template: "<div [id]=\"'searchstax-answer-container' + rand\">\n <div\n *ngIf=\"\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n !templateOverride\n \"\n >\n <app-answer-template #ref></app-answer-template>\n <ng-template\n [ngTemplateOutlet]=\"ref.answerTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-template>\n </div>\n <div\n *ngIf=\"\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n templateOverride\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: AnswerTemplateComponent, selector: "app-answer-template" }] }); }
2212
+ }
2213
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchAnswerWidget, decorators: [{
2214
+ type: Component,
2215
+ args: [{ selector: "app-searchstax-answer", template: "<div [id]=\"'searchstax-answer-container' + rand\">\n <div\n *ngIf=\"\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n !templateOverride\n \"\n >\n <app-answer-template #ref></app-answer-template>\n <ng-template\n [ngTemplateOutlet]=\"ref.answerTemplate\"\n [ngTemplateOutletContext]=\"context\"\n ></ng-template>\n </div>\n <div\n *ngIf=\"\n answerData &&\n answerData?.searchExecuted &&\n answerData.shouldShowAnswer &&\n templateOverride\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n" }]
2216
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
2217
+ type: Input
2218
+ }], feedbackwidget: [{
2219
+ type: Input
2220
+ }], showMoreAfterWordCount: [{
2221
+ type: Input
2222
+ }] } });
2223
+
2224
+ // reusable-template.component.ts
2225
+ class RelatedTemplateComponent {
2226
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RelatedTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2227
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: RelatedTemplateComponent, selector: "app-related-template", viewQueries: [{ propertyName: "relatedTemplate", first: true, predicate: ["relatedTemplate"], descendants: true }], ngImport: i0, template: `
2228
+ <ng-template
2229
+ #relatedTemplate
2230
+ let-rand="rand"
2231
+ let-relatedData="relatedData"
2232
+ let-executeSearch="executeSearch"
2233
+ let-context="context"
2234
+ >
2235
+ <div
2236
+ class="searchstax-related-searches-container"
2237
+ [id]="'searchstax-related-searches-container' + rand"
2238
+ >
2239
+ Related searches: <span id="searchstax-related-searches"></span>
2240
+ <span
2241
+ class="searchstax-related-search"
2242
+ *ngIf="relatedData.relatedSearches"
2243
+ >
2244
+ <span
2245
+ *ngFor="let related of relatedData.relatedSearches"
2246
+ (click)="executeSearch(related, context)"
2247
+ (keyup.enter)="executeSearch(related, context)"
2248
+ (keyup.space)="executeSearch(related, context)"
2249
+ tabindex="0"
2250
+ class="searchstax-related-search searchstax-related-search-item"
2251
+ [attr.aria-label]="'Related search: ' + related.related_search"
2252
+ >
2253
+ {{ related.related_search }}<span *ngIf="!related.last">,</span>
2254
+ </span>
2255
+ </span>
2256
+ </div>
2257
+ </ng-template>
2258
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
2259
+ }
2260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: RelatedTemplateComponent, decorators: [{
2261
+ type: Component,
2262
+ args: [{
2263
+ selector: "app-related-template",
2264
+ template: `
2265
+ <ng-template
2266
+ #relatedTemplate
2267
+ let-rand="rand"
2268
+ let-relatedData="relatedData"
2269
+ let-executeSearch="executeSearch"
2270
+ let-context="context"
2271
+ >
2272
+ <div
2273
+ class="searchstax-related-searches-container"
2274
+ [id]="'searchstax-related-searches-container' + rand"
2275
+ >
2276
+ Related searches: <span id="searchstax-related-searches"></span>
2277
+ <span
2278
+ class="searchstax-related-search"
2279
+ *ngIf="relatedData.relatedSearches"
2280
+ >
2281
+ <span
2282
+ *ngFor="let related of relatedData.relatedSearches"
2283
+ (click)="executeSearch(related, context)"
2284
+ (keyup.enter)="executeSearch(related, context)"
2285
+ (keyup.space)="executeSearch(related, context)"
2286
+ tabindex="0"
2287
+ class="searchstax-related-search searchstax-related-search-item"
2288
+ [attr.aria-label]="'Related search: ' + related.related_search"
2289
+ >
2290
+ {{ related.related_search }}<span *ngIf="!related.last">,</span>
2291
+ </span>
2292
+ </span>
2293
+ </div>
2294
+ </ng-template>
2295
+ `,
2296
+ }]
2297
+ }], propDecorators: { relatedTemplate: [{
2298
+ type: ViewChild,
2299
+ args: ["relatedTemplate"]
2300
+ }] } });
2301
+
2302
+ class SearchstaxSearchRelatedSearchesWidget {
2303
+ constructor(storeServiceService) {
2304
+ this.storeServiceService = storeServiceService;
2305
+ this.relatedData = null;
2306
+ this.rand = Math.random();
2307
+ this.context = this;
2308
+ }
2309
+ ngOnInit() {
2310
+ if (this.storeServiceService.searchstax) {
2311
+ this.attachObservables();
2312
+ setTimeout(() => {
2313
+ this.storeServiceService.searchstax.addRelatedSearchesWidget("searchstax-related-searches-container" + this.rand, { relatedSearchesURL: this.relatedSearchesURL ?? "", relatedSearchesAPIKey: this.relatedSearchesAPIKey ?? "" });
2314
+ }, 0);
2315
+ }
2316
+ else {
2317
+ throw Error("Searchstax instance needs to be passed via props");
2318
+ }
2319
+ }
2320
+ executeSearch(result, context) {
2321
+ context.storeServiceService.searchstax.relatedSearchesWidget?.executeSearch(result);
2322
+ }
2323
+ attachObservables() {
2324
+ this.storeServiceService.searchstax.dataLayer.$searchRelatedSearchesData.subscribe((relatedData) => {
2325
+ this.relatedData = relatedData;
2326
+ });
2327
+ }
2328
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchRelatedSearchesWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
2329
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchRelatedSearchesWidget, selector: "app-searchstax-related-searches", inputs: { relatedSearchesURL: "relatedSearchesURL", relatedSearchesAPIKey: "relatedSearchesAPIKey", templateOverride: "templateOverride" }, ngImport: i0, template: "<ng-container\n *ngIf=\"\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n !templateOverride\n \"\n>\n <app-related-template #ref></app-related-template>\n <ng-template\n *ngTemplateOutlet=\"ref.relatedTemplate; context: context\"\n ></ng-template>\n</ng-container>\n\n<div\n *ngIf=\"\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n templateOverride\n \"\n>\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: RelatedTemplateComponent, selector: "app-related-template" }] }); }
2330
+ }
2331
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchRelatedSearchesWidget, decorators: [{
2332
+ type: Component,
2333
+ args: [{ selector: "app-searchstax-related-searches", template: "<ng-container\n *ngIf=\"\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n !templateOverride\n \"\n>\n <app-related-template #ref></app-related-template>\n <ng-template\n *ngTemplateOutlet=\"ref.relatedTemplate; context: context\"\n ></ng-template>\n</ng-container>\n\n<div\n *ngIf=\"\n relatedData &&\n relatedData?.searchExecuted &&\n relatedData?.hasRelatedSearches &&\n templateOverride\n \"\n>\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n</div>\n" }]
2334
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { relatedSearchesURL: [{
2335
+ type: Input
2336
+ }], relatedSearchesAPIKey: [{
2337
+ type: Input
2338
+ }], templateOverride: [{
2339
+ type: Input
2340
+ }] } });
2341
+
2342
+ // reusable-template.component.ts
2343
+ class ExternalPromotionsTemplateComponent {
2344
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ExternalPromotionsTemplateComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2345
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: ExternalPromotionsTemplateComponent, selector: "app-external-template", viewQueries: [{ propertyName: "externalPromotionsTemplate", first: true, predicate: ["externalPromotionsTemplate"], descendants: true }], ngImport: i0, template: `
2346
+ <ng-template
2347
+ #externalPromotionsTemplate
2348
+ let-context="context"
2349
+ let-externalPromotionsData="externalPromotionsData"
2350
+ let-trackClick="trackClick"
2351
+ >
2352
+ <div
2353
+ class="searchstax-external-promotions-container"
2354
+ id="searchstax-external-promotions-container"
2355
+ >
2356
+ <div
2357
+ class="searchstax-external-promotion searchstax-search-result"
2358
+ *ngFor="
2359
+ let externalPromotion of externalPromotionsData.externalPromotions
2360
+ "
2361
+ >
2362
+ <div class="icon-elevated"></div>
2363
+ <a
2364
+ *ngIf="externalPromotion.url"
2365
+ [href]="externalPromotion.url"
2366
+ (click)="trackClick(externalPromotion, $event, context)"
2367
+ class="searchstax-result-item-link"
2368
+ ></a>
2369
+ <div class="searchstax-search-result-title-container">
2370
+ <span class="searchstax-search-result-title">{{
2371
+ externalPromotion.name
2372
+ }}</span>
2373
+ </div>
2374
+ <p
2375
+ *ngIf="externalPromotion.description"
2376
+ class="searchstax-search-result-description searchstax-search-result-common"
2377
+ >
2378
+ {{ externalPromotion.description }}
2379
+ </p>
2380
+ <p
2381
+ *ngIf="externalPromotion.url"
2382
+ class="searchstax-search-result-description searchstax-search-result-common"
2383
+ >
2384
+ {{ externalPromotion.url }}
2385
+ </p>
2386
+ </div>
2387
+ </div>
2388
+ </ng-template>
2389
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
2390
+ }
2391
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: ExternalPromotionsTemplateComponent, decorators: [{
2392
+ type: Component,
2393
+ args: [{
2394
+ selector: "app-external-template",
2395
+ template: `
2396
+ <ng-template
2397
+ #externalPromotionsTemplate
2398
+ let-context="context"
2399
+ let-externalPromotionsData="externalPromotionsData"
2400
+ let-trackClick="trackClick"
2401
+ >
2402
+ <div
2403
+ class="searchstax-external-promotions-container"
2404
+ id="searchstax-external-promotions-container"
2405
+ >
2406
+ <div
2407
+ class="searchstax-external-promotion searchstax-search-result"
2408
+ *ngFor="
2409
+ let externalPromotion of externalPromotionsData.externalPromotions
2410
+ "
2411
+ >
2412
+ <div class="icon-elevated"></div>
2413
+ <a
2414
+ *ngIf="externalPromotion.url"
2415
+ [href]="externalPromotion.url"
2416
+ (click)="trackClick(externalPromotion, $event, context)"
2417
+ class="searchstax-result-item-link"
2418
+ ></a>
2419
+ <div class="searchstax-search-result-title-container">
2420
+ <span class="searchstax-search-result-title">{{
2421
+ externalPromotion.name
2422
+ }}</span>
2423
+ </div>
2424
+ <p
2425
+ *ngIf="externalPromotion.description"
2426
+ class="searchstax-search-result-description searchstax-search-result-common"
2427
+ >
2428
+ {{ externalPromotion.description }}
2429
+ </p>
2430
+ <p
2431
+ *ngIf="externalPromotion.url"
2432
+ class="searchstax-search-result-description searchstax-search-result-common"
2433
+ >
2434
+ {{ externalPromotion.url }}
2435
+ </p>
2436
+ </div>
2437
+ </div>
2438
+ </ng-template>
2439
+ `,
2440
+ }]
2441
+ }], propDecorators: { externalPromotionsTemplate: [{
2442
+ type: ViewChild,
2443
+ args: ["externalPromotionsTemplate"]
2444
+ }] } });
2445
+
2446
+ class SearchstaxSearchExternalPromotionsWidget {
2447
+ constructor(storeServiceService) {
2448
+ this.storeServiceService = storeServiceService;
2449
+ this.externalPromotionsData = null;
2450
+ this.rand = Math.random();
2451
+ this.context = this;
2452
+ }
2453
+ ngOnInit() {
2454
+ if (this.storeServiceService.searchstax) {
2455
+ this.attachObservables();
2456
+ setTimeout(() => {
2457
+ this.storeServiceService.searchstax.addExternalPromotionsWidget("searchstax-external-promotions-layout-container" + this.rand, {});
2458
+ }, 0);
2459
+ }
2460
+ else {
2461
+ throw Error("Searchstax instance needs to be passed via props");
2462
+ }
2463
+ }
2464
+ trackClick(externalPromotion, event, context) {
2465
+ context.storeServiceService.searchstax.externalPromotionsWidget?.trackClick(externalPromotion, event);
2466
+ }
2467
+ attachObservables() {
2468
+ this.storeServiceService.searchstax.dataLayer.$searchExternalPromotionsData.subscribe((externalPromotionsData) => {
2469
+ this.externalPromotionsData = externalPromotionsData;
2470
+ });
2471
+ }
2472
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchExternalPromotionsWidget, deps: [{ token: StoreServiceService }], target: i0.ɵɵFactoryTarget.Component }); }
2473
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: SearchstaxSearchExternalPromotionsWidget, selector: "app-searchstax-external-promotions", inputs: { templateOverride: "templateOverride" }, ngImport: i0, template: "<div [id]=\"'searchstax-external-promotions-layout-container' + rand\">\n <ng-container\n *ngIf=\"\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n !templateOverride\n \"\n >\n <app-external-template #ref></app-external-template>\n <ng-template\n *ngTemplateOutlet=\"ref.externalPromotionsTemplate; context: context\"\n ></ng-template>\n </ng-container>\n <div\n *ngIf=\"\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n templateOverride\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ExternalPromotionsTemplateComponent, selector: "app-external-template" }] }); }
2474
+ }
2475
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstaxSearchExternalPromotionsWidget, decorators: [{
2476
+ type: Component,
2477
+ args: [{ selector: "app-searchstax-external-promotions", template: "<div [id]=\"'searchstax-external-promotions-layout-container' + rand\">\n <ng-container\n *ngIf=\"\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n !templateOverride\n \"\n >\n <app-external-template #ref></app-external-template>\n <ng-template\n *ngTemplateOutlet=\"ref.externalPromotionsTemplate; context: context\"\n ></ng-template>\n </ng-container>\n <div\n *ngIf=\"\n externalPromotionsData &&\n externalPromotionsData?.searchExecuted &&\n externalPromotionsData?.hasExternalPromotions &&\n templateOverride\n \"\n >\n <ng-container\n *ngTemplateOutlet=\"templateOverride; context: context\"\n ></ng-container>\n </div>\n</div>\n" }]
2478
+ }], ctorParameters: () => [{ type: StoreServiceService }], propDecorators: { templateOverride: [{
2479
+ type: Input
2480
+ }] } });
2481
+
2482
+ class SearchstudioUxAngularModule {
2483
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstudioUxAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
2484
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: SearchstudioUxAngularModule, declarations: [SearchstaxWrapper,
2485
+ SearchstaxInputWidget,
2486
+ SearchstaxResultsWidget,
2487
+ SearchstaxSearchFeedbackWidget,
2488
+ SearchstaxSearchPaginationWidget,
2489
+ SearchstaxSearchFacetsWidget,
2490
+ SearchstaxSearchSortingWidget,
2491
+ SearchstaxSearchRelatedSearchesWidget,
2492
+ SearchstaxSearchExternalPromotionsWidget,
2493
+ SearchstaxSearchAnswerWidget,
2494
+ SearchstaxSearchLocationWidget,
2495
+ AnswerTemplateComponent,
2496
+ OverviewTemplateComponent,
2497
+ InputTemplateComponent,
2498
+ LocationTemplateComponent,
2499
+ PaginationTemplateComponent,
2500
+ PaginationInfiniteTemplateComponent,
2501
+ ResultsTemplateComponent,
2502
+ NoResultsTemplateComponent,
2503
+ ExternalPromotionsTemplateComponent,
2504
+ SortingTemplateComponent,
2505
+ RelatedTemplateComponent,
2506
+ FacetDesktopTemplateComponent,
2507
+ FacetMobileTemplateComponent], imports: [CommonModule, FormsModule], exports: [SearchstaxWrapper,
2508
+ SearchstaxInputWidget,
2509
+ SearchstaxResultsWidget,
2510
+ SearchstaxSearchFeedbackWidget,
2511
+ SearchstaxSearchPaginationWidget,
2512
+ SearchstaxSearchFacetsWidget,
2513
+ SearchstaxSearchSortingWidget,
2514
+ SearchstaxSearchRelatedSearchesWidget,
2515
+ SearchstaxSearchExternalPromotionsWidget,
2516
+ SearchstaxSearchAnswerWidget,
2517
+ SearchstaxSearchLocationWidget,
2518
+ AnswerTemplateComponent,
2519
+ OverviewTemplateComponent,
2520
+ InputTemplateComponent,
2521
+ LocationTemplateComponent,
2522
+ PaginationTemplateComponent,
2523
+ PaginationInfiniteTemplateComponent,
2524
+ ResultsTemplateComponent,
2525
+ NoResultsTemplateComponent,
2526
+ ExternalPromotionsTemplateComponent,
2527
+ SortingTemplateComponent,
2528
+ RelatedTemplateComponent,
2529
+ FacetDesktopTemplateComponent,
2530
+ FacetMobileTemplateComponent] }); }
2531
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstudioUxAngularModule, imports: [CommonModule, FormsModule] }); }
2532
+ }
2533
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SearchstudioUxAngularModule, decorators: [{
2534
+ type: NgModule,
2535
+ args: [{
2536
+ declarations: [
2537
+ SearchstaxWrapper,
2538
+ SearchstaxInputWidget,
2539
+ SearchstaxResultsWidget,
2540
+ SearchstaxSearchFeedbackWidget,
2541
+ SearchstaxSearchPaginationWidget,
2542
+ SearchstaxSearchFacetsWidget,
2543
+ SearchstaxSearchSortingWidget,
2544
+ SearchstaxSearchRelatedSearchesWidget,
2545
+ SearchstaxSearchExternalPromotionsWidget,
2546
+ SearchstaxSearchAnswerWidget,
2547
+ SearchstaxSearchLocationWidget,
2548
+ AnswerTemplateComponent,
2549
+ OverviewTemplateComponent,
2550
+ InputTemplateComponent,
2551
+ LocationTemplateComponent,
2552
+ PaginationTemplateComponent,
2553
+ PaginationInfiniteTemplateComponent,
2554
+ ResultsTemplateComponent,
2555
+ NoResultsTemplateComponent,
2556
+ ExternalPromotionsTemplateComponent,
2557
+ SortingTemplateComponent,
2558
+ RelatedTemplateComponent,
2559
+ FacetDesktopTemplateComponent,
2560
+ FacetMobileTemplateComponent
2561
+ ],
2562
+ imports: [CommonModule, FormsModule],
2563
+ exports: [
2564
+ SearchstaxWrapper,
2565
+ SearchstaxInputWidget,
2566
+ SearchstaxResultsWidget,
2567
+ SearchstaxSearchFeedbackWidget,
2568
+ SearchstaxSearchPaginationWidget,
2569
+ SearchstaxSearchFacetsWidget,
2570
+ SearchstaxSearchSortingWidget,
2571
+ SearchstaxSearchRelatedSearchesWidget,
2572
+ SearchstaxSearchExternalPromotionsWidget,
2573
+ SearchstaxSearchAnswerWidget,
2574
+ SearchstaxSearchLocationWidget,
2575
+ AnswerTemplateComponent,
2576
+ OverviewTemplateComponent,
2577
+ InputTemplateComponent,
2578
+ LocationTemplateComponent,
2579
+ PaginationTemplateComponent,
2580
+ PaginationInfiniteTemplateComponent,
2581
+ ResultsTemplateComponent,
2582
+ NoResultsTemplateComponent,
2583
+ ExternalPromotionsTemplateComponent,
2584
+ SortingTemplateComponent,
2585
+ RelatedTemplateComponent,
2586
+ FacetDesktopTemplateComponent,
2587
+ FacetMobileTemplateComponent
2588
+ ],
2589
+ }]
2590
+ }] });
2591
+
2592
+ /*
2593
+ * Public API Surface of searchstudio-ux-angular
2594
+ */
2595
+
2596
+ /**
2597
+ * Generated bundle index. Do not edit.
2598
+ */
2599
+
2600
+ export { AnswerTemplateComponent, ExternalPromotionsTemplateComponent, FacetDesktopTemplateComponent, FacetMobileTemplateComponent, InputTemplateComponent, LocationTemplateComponent, NoResultsTemplateComponent, OverviewTemplateComponent, PaginationInfiniteTemplateComponent, PaginationTemplateComponent, RelatedTemplateComponent, ResultsTemplateComponent, SearchstaxInputWidget, SearchstaxResultsWidget, SearchstaxSearchAnswerWidget, SearchstaxSearchExternalPromotionsWidget, SearchstaxSearchFacetsWidget, SearchstaxSearchFeedbackWidget, SearchstaxSearchLocationWidget, SearchstaxSearchPaginationWidget, SearchstaxSearchRelatedSearchesWidget, SearchstaxSearchSortingWidget, SearchstaxWrapper, SearchstudioUxAngularModule, SortingTemplateComponent, StoreServiceService };
2601
+ //# sourceMappingURL=searchstax-inc-searchstudio-ux-angular.mjs.map